コード例 #1
0
ファイル: MainForm.cs プロジェクト: MChehadeh/userTerminal
		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 );
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            this.myRenderer = new LBMyAnalogMeterRenderer();
        }