public class FVG
{
public SharpDX.Direct2D1.Brush DxBrushGap;
public SharpDX.Direct2D1.Brush DxBrushGapBorder;
public SharpDX.Direct2D1.Brush DxBrushIconBorder;
public int period; // period for multi FVGs
public int type; // BULL BEAR
public bool showGap; // YES NO
public int status; // OPEN InTRADE EXPIRED CLOSED
it works for coloring my objects, but what is the best way to dispose of the brush.
This is what I use for other brushes, but wasn't sure how to dispose the one that is in the list
if (DxBrushWhite != null) DxBrushWhite.Dispose();
DxBrushWhite = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget, SharpDX.Color.White);
here is the ternary code i was using, but i know I'm not supposed to do too much math inside OnRender.
RenderTarget.FillRectangle(DxRectangle, bull ? setupQuality == GOOD ? DxBrushCyan : DxBrushTeal25 :
setupQuality == GOOD ? DxBrushMagenta : DxBrushCrimson25);
Help please....



Comment