Exemple #1
0
        //Sensor input change event handler
        //Set the textbox content based on the input index that is communicating
        //with the interface kit
        void ifKit_SensorChange(object sender, SensorChangeEventArgs e)
        {
            sensorInArray[e.Index].Text = e.Value.ToString();

            if (advSensorForm != null)
            {
                advSensorForm.SetValue(e.Index, e.Value);
            }
        }
 private void button1_Click(object sender, EventArgs e)
 {
     if ((advSensorForm == null) || (advSensorForm.IsDisposed))
     {
         advSensorForm = new AdvancedSensorForm();
         advSensorForm.Show();
         advSensorForm.SetSensorCount(ifKit.sensors.Count);
         for (int i = 0; i < ifKit.sensors.Count; i++)
         {
             advSensorForm.SetValue(i, Convert.ToInt32(sensorInArray[i].Text));
         }
     }
     advSensorForm.Focus();
 }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if ((advSensorForm == null) || (advSensorForm.IsDisposed))
     {
         advSensorForm = new AdvancedSensorForm();
         advSensorForm.Show();
         advSensorForm.SetSensorCount(ifKit.sensors.Count);
         for (int i = 0; i < ifKit.sensors.Count; i++)
         {
             advSensorForm.SetValue(i, Convert.ToInt32(sensorInArray[i].Text));
         }
     }
     advSensorForm.Focus();
 }