private void Passed_OnStateChanged(object sender, Valve.ValveEventArgs e)
 {
     if (e.passed.isOpen)
     {
         Override_Open.Background  = Brushes.Green;
         Override_Close.Background = Brushes.Red;
         Command.Text = "Open";
     }
     else
     {
         Override_Close.Background = Brushes.Green;
         Override_Open.Background  = Brushes.Red;
         Command.Text = "Close";
     }
     if (e.passed.Feedback == Valve.State.Unknown)
     {
         Feedback.Text = "Unknown";
     }
     else if (e.passed.Feedback == Valve.State.Nominal)
     {
         Feedback.Text = "Nominal";
     }
     else
     {
         Feedback.Text = "Failue";
     }
 }
示例#2
0
 private void Passed_OnStateChanged(object sender, Valve.ValveEventArgs e)
 {
     if (e.passed.isOpen)
     {
         Override_Open.Background  = Brushes.Green;
         Override_Close.Background = Brushes.Red;
     }
     else
     {
         Override_Close.Background = Brushes.Green;
         Override_Open.Background  = Brushes.Red;
     }
 }