Dart.Emulation Namespace > Vt Class : AnsiColor Property |
Public Property AnsiColor As AnsiColor
public AnsiColor AnsiColor {get; set;}
public: __property AnsiColor* get_AnsiColor(); public: __property void set_AnsiColor( AnsiColor* value );
public: property AnsiColor^ AnsiColor { AnsiColor^ get(); void set ( AnsiColor^ value); }
private void updateColors(Vt vt, int intensity) { //Update colors to a specified intensity (0-100). //0 is black and 100 is the bold color. int val = ((255 * intensity) / 100); vt.AnsiColor.BlackBold = Color.Gray; vt.AnsiColor.RedBold = Color.Red; vt.AnsiColor.GreenBold = Color.Lime; vt.AnsiColor.YellowBold = Color.Yellow; vt.AnsiColor.BlueBold = Color.Blue; vt.AnsiColor.MagentaBold = Color.Magenta; vt.AnsiColor.CyanBold = Color.Cyan; vt.AnsiColor.WhiteBold = Color.White; vt.AnsiColor.Black = Color.Black; vt.AnsiColor.Red = Color.FromArgb(val, 0, 0); vt.AnsiColor.Green = Color.FromArgb(0, val, 0); vt.AnsiColor.Yellow = Color.FromArgb(val, val, 0); vt.AnsiColor.Blue = Color.FromArgb(0, 0, val); vt.AnsiColor.Magenta = Color.FromArgb(val, 0, val); vt.AnsiColor.Cyan = Color.FromArgb(0, val, val); vt.AnsiColor.White = Color.FromArgb(val, val, val); vt.Refresh(); }
Private Sub updateColors(ByVal vt As Vt, ByVal intensity As Integer) 'Update colors to a specified intensity (0-100). '0 is black and 100 is the bold color. Dim val As Integer = ((255 * intensity) / 100) vt.AnsiColor.BlackBold = Color.Gray vt.AnsiColor.RedBold = Color.Red vt.AnsiColor.GreenBold = Color.Lime vt.AnsiColor.YellowBold = Color.Yellow vt.AnsiColor.BlueBold = Color.Blue vt.AnsiColor.MagentaBold = Color.Magenta vt.AnsiColor.CyanBold = Color.Cyan vt.AnsiColor.WhiteBold = Color.White vt.AnsiColor.Black = Color.Black vt.AnsiColor.Red = Color.FromArgb(val, 0, 0) vt.AnsiColor.Green = Color.FromArgb(0, val, 0) vt.AnsiColor.Yellow = Color.FromArgb(val, val, 0) vt.AnsiColor.Blue = Color.FromArgb(0, 0, val) vt.AnsiColor.Magenta = Color.FromArgb(val, 0, val) vt.AnsiColor.Cyan = Color.FromArgb(0, val, val) vt.AnsiColor.White = Color.FromArgb(val, val, val) vt.Refresh() End Sub