Ejemplo n.º 1
0
        private void InitUI()
        {
            wisesafetooperate.init();
            wisesafetooperate.Connected = true;
            wisesafetooperate.ReadProfile();

            textBoxCloudCoverPercent.Text = wisesafetooperate.cloudsSensor.MaxAsString;
            textBoxRain.Text         = wisesafetooperate.rainSensor.MaxAsString;
            textBoxWind.Text         = wisesafetooperate.windSensor.MaxAsString;
            textBoxHumidity.Text     = wisesafetooperate.humiditySensor.MaxAsString;
            textBoxSunElevation.Text = wisesafetooperate.sunSensor.MaxAsString;

            textBoxAge.Text           = wisesafetooperate.ageMaxSeconds.ToString();
            textBoxRestoreSafety.Text = wisesafetooperate._stabilizationPeriod.Minutes.ToString();

            checkBoxCloud.Checked    = wisesafetooperate.cloudsSensor.Enabled;
            checkBoxHumidity.Checked = wisesafetooperate.humiditySensor.Enabled;
            checkBoxRain.Checked     = wisesafetooperate.rainSensor.Enabled;
            checkBoxSun.Checked      = wisesafetooperate.sunSensor.Enabled;
            checkBoxWind.Checked     = wisesafetooperate.windSensor.Enabled;

            textBoxCloudIntervalSeconds.Text    = wisesafetooperate.cloudsSensor.Interval.ToString();
            textBoxHumidityIntervalSeconds.Text = wisesafetooperate.humiditySensor.Interval.ToString();
            textBoxRainIntervalSeconds.Text     = wisesafetooperate.rainSensor.Interval.ToString();
            textBoxSunIntervalSeconds.Text      = wisesafetooperate.sunSensor.Interval.ToString();
            textBoxWindIntervalSeconds.Text     = wisesafetooperate.windSensor.Interval.ToString();

            textBoxCloudRepeats.Text    = wisesafetooperate.cloudsSensor.Repeats.ToString();
            textBoxHumidityRepeats.Text = wisesafetooperate.humiditySensor.Repeats.ToString();
            textBoxRainRepeats.Text     = wisesafetooperate.rainSensor.Repeats.ToString();
            textBoxSunRepeats.Text      = wisesafetooperate.sunSensor.Repeats.ToString();
            textBoxWindRepeats.Text     = wisesafetooperate.windSensor.Repeats.ToString();

            toolTip1.SetToolTip(textBoxHumidity, "0 to 100 (%)");
            toolTip1.SetToolTip(textBoxAge, "0 to use data of any age (sec)");
            toolTip1.SetToolTip(textBoxHumidity, "between 0 and 100 (%)");
            toolTip1.SetToolTip(textBoxWind, "greter than 0 (mps)");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Wise40.SafeToOperate"/> class.
 /// Must be public for COM registration.
 /// </summary>
 public SafetyMonitor()
 {
     wisesafetooperate = WiseSafeToOperate.InstanceOpen;
     wisesafetooperate.init();
     driverDescription = wisesafetooperate.Description;
 }