Esempio n. 1
0
        //private ProgressBar bar;

        public TemperatureOverviewItem(SensorNode sens, Overview overview) : base(sens, overview)
        {
            this.Controls.Add(nameLabel);
            nameLabel.Location = new Point(0, 0);
            nameLabel.AutoSize = true;

            this.Controls.Add(valueLabel);
            valueLabel.Location  = new Point(100, 0);
            valueLabel.AutoSize  = true;
            valueLabel.Font      = new Font(FontFamily.GenericMonospace, 10);
            valueLabel.BackColor = Color.Black;
            valueLabel.ForeColor = Color.LightGreen;

            // Progress bar Damelei

            /*bar = new ProgressBar();
             *
             *
             * this.Controls.Add(bar);
             * bar.Location = new Point(170, 3);
             * bar.Height = 10;
             * bar.Width = 150;*/

            this.Height = 17;
            //this.Width = 340;
            this.Width = 250;
        }
Esempio n. 2
0
        public FanOverviewItem(SensorNode sens, Overview overview) : base(sens, overview)
        {
            this.Controls.Add(nameLabel);
            nameLabel.Location = new Point(0, 3);
            nameLabel.AutoSize = true;

            this.Controls.Add(valueLabel);
            valueLabel.Location  = new Point(100, 3);
            valueLabel.AutoSize  = true;
            valueLabel.Font      = new Font(FontFamily.GenericMonospace, 10);
            valueLabel.BackColor = Color.Black;
            valueLabel.ForeColor = Color.LightGreen;


            if (sens.Sensor.Affector != null)
            {
                controller.Minimum = 0;
                controller.Maximum = 100;
                if (sens.Sensor.Affector.Value.HasValue)
                {
                    controller.Value = (sens.Sensor.Affector.Control.UseCalibrated)
                        ? ((int)(sens.Sensor.Affector.Control.Calibrated.Get(sens.Sensor.Affector.Value.Value / 100f * sens.Sensor.Affector.Control.MaxRPM)))
                        : ((int)(sens.Sensor.Affector.Value));
                }
                this.Controls.Add(controller);
                controller.Location      = new Point(180, 0);
                controller.Width         = 50;
                controller.ValueChanged += new System.EventHandler(this.controller_ValueChanged);

                UpdateControllerToolTip();
            }

            this.Height = 20;
            this.Width  = 250;
        }
Esempio n. 3
0
 public OverviewItem(SensorNode sens, Overview overview)
 {
     this.sensorNode      = sens;
     this.nameLabel       = new Label();
     this.nameLabel.Text  = sensorNode.Sensor.Name;
     this.valueLabel      = new Label();
     this.valueLabel.Text = sensorNode.ValueToString(sensorNode.Sensor.Value);
     this.overview        = overview;
 }