public MainForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.myRenderer = new LBMyAnalogMeterRenderer(); LBMeterThreshold threshold = new LBMeterThreshold(); threshold.Color = Color.Yellow; threshold.StartValue = 50; threshold.EndValue = 70; this.lbAnalogMeter1.Thresholds.Add ( threshold ); threshold = new LBMeterThreshold(); threshold.Color = Color.Red; threshold.StartValue = 70; threshold.EndValue = 100; this.lbAnalogMeter1.Thresholds.Add ( threshold ); this.lbAnalogMeter1.Renderer = this.myRenderer; threshold = new LBMeterThreshold(); threshold.Color = Color.Yellow; threshold.StartValue = 50; threshold.EndValue = 70; this.lbAnalogMeter2.Thresholds.Add ( threshold ); threshold = new LBMeterThreshold(); threshold.Color = Color.Red; threshold.StartValue = 70; threshold.EndValue = 100; this.lbAnalogMeter2.Thresholds.Add ( threshold ); }
public MainForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.myRenderer = new LBMyAnalogMeterRenderer(); LBMeterThreshold threshold = new LBMeterThreshold(); threshold.Color = Color.Yellow; threshold.StartValue = 50; threshold.EndValue = 70; this.lbAnalogMeter1.Thresholds.Add(threshold); threshold = new LBMeterThreshold(); threshold.Color = Color.Red; threshold.StartValue = 70; threshold.EndValue = 100; this.lbAnalogMeter1.Thresholds.Add(threshold); this.lbAnalogMeter1.Renderer = this.myRenderer; threshold = new LBMeterThreshold(); threshold.Color = Color.Yellow; threshold.StartValue = 50; threshold.EndValue = 70; this.lbAnalogMeter2.Thresholds.Add(threshold); threshold = new LBMeterThreshold(); threshold.Color = Color.Red; threshold.StartValue = 70; threshold.EndValue = 100; this.lbAnalogMeter2.Thresholds.Add(threshold); }
public MainForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.myRenderer = new LBMyAnalogMeterRenderer(); }