I'm uncertain about the correct way to convert NT7 Color objects to NT8 Brushes/Brush objects.
In NT7 I had input parameters as -
public Color MYColour1
{
get { return myColour1; }
set { myColour1 = value; }
}
// Serialize our Color object
[Browsable(false)]
public string MYColour1Serialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString( myColour1); }
set { myColour1 = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
}
and variables as -
private Color myColour1=Color.Purple;
private Brushes[] myColours = new Brushes[10];
Assignment (so I can use my colours in an array) as -
myColours[0]=myColour1;
And usage as -
DrawTriangleUp(..., myColours[0]);
Now in NT8 I have input parameters as -
public Brushes MYColour1
{
get { return myColour1; }
set { myColour1 = value; }
}
// Serialize our Color object
[Browsable(false)]
public string MYColour1Serialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString( myColour1); }
set { myColour1 = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
}
and variables as -
private Brushes myColour1 = Brushes.Purple;
private Color[] myColours = new Color[10];
Assignment (so I can use my colours in an array) as -
myColours[0] = myColour1;
But now when I want to draw I have
Draw.TriangleUp(this,..., myColours[0]);
but this method requires a Brush, not Brushes. What is the best/correct method to do this?
Thanks,
Will.
Comment