Code Scanning fixes

This commit is contained in:
Miha Kralj
2024-10-05 15:41:25 -07:00
parent 3458b14ebb
commit b6ecf537cd
5 changed files with 15 additions and 20 deletions
+4 -5
View File
@@ -27,7 +27,7 @@ public abstract class IndicatorBase : Indicator, IWatchlistIndicator
[InputParameter("Show cold values", sortIndex: 20)]
public bool ShowColdValues { get; set; } = true;
public int MinHistoryDepths;
public int MinHistoryDepths { get; set; }
// LineSeries.LineSeries(string, Color, int, LineStyle)'
@@ -37,7 +37,7 @@ public abstract class IndicatorBase : Indicator, IWatchlistIndicator
int IWatchlistIndicator.MinHistoryDepths => 0;
protected IndicatorBase() : base()
protected IndicatorBase()
{
OnBackGround = true;
SeparateWindow = false;
@@ -45,7 +45,6 @@ public abstract class IndicatorBase : Indicator, IWatchlistIndicator
Series = new(name: $"{Name}", color: Color.Yellow, width: 2, style: LineStyle.Solid);
AddLineSeries(Series);
InitIndicator();
}
protected virtual void InitIndicator()
@@ -95,7 +94,7 @@ public abstract class IndicatorBase : Indicator, IWatchlistIndicator
{
base.OnPaintChart(args);
List<Point> allPoints = new List<Point>();
if (CurrentChart == null) return;
if (CurrentChart == null) { return; }
Graphics gr = args.Graphics;
var mainWindow = this.CurrentChart.Windows[args.WindowIndex];
@@ -126,7 +125,7 @@ public abstract class IndicatorBase : Indicator, IWatchlistIndicator
private void DrawSmoothCombinedCurve(Graphics gr, List<Point> allPoints, int hotCount)
{
if (allPoints.Count < 2) return;
if (allPoints.Count < 2) { return; }
using (Pen defaultPen = new(Series!.Color, Series.Width) { DashStyle = ConvertLineStyleToDashStyle(Series.Style) })
using (Pen coldPen = new(Series!.Color, Series.Width) { DashStyle = DashStyle.Dot })