Exemple #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     timer1.Enabled = false;
     JInverterTh.StateIn ret = inverter.State;
     prs(ret != null ? ret.ToString() : null);
     if (inverter.IsComplete)
     {
         foreach (Button b in Controls.OfType <Button>())
         {
             b.Enabled = true;
         }
         checkBox1.Text    = "Пуск";
         checkBox1.Checked = false;
     }
     else if (inverter.IsError)
     {
         prs(inverter.LastError);
         inverter.Finish();
         foreach (Button b in Controls.OfType <Button>())
         {
             b.Enabled = true;
         }
         checkBox1.Checked = false;
         checkBox1.Text    = "Пуск";
     }
     else
     {
         timer1.Enabled = true;
     }
 }
Exemple #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     JInverterTh.StateIn ret = inverter.StateRead();
     if (ret != null)
     {
         prs(ret.ToString());
     }
     else
     {
         prs(inverter.LastError);
     }
 }