Exemple #1
0
 private void lbl_alert_MouseLeftButtonUp(object sender, EventArgs e)
 {
     if ((sender is Button) && (curr_node != 0xff))
     {
         Button l  = sender as Button;
         byte   id = curr_node;
         if (l.Name == "lbl_alert1") //alert solved
         {
             NodeMaster.ClearErrors(id);
         }
         if (l.Name == "lbl_alert2") //alert force
         {
             NodeMaster.Action(new byte[] { id }, "empty");
             NodeMaster.ClearErrors(id);
         }
         if (l.Name == "lbl_alert3") //alert disable
         {
             if ((NodeMaster.GetStatus(id) == NodeStatus.ST_LOST) || (NodeMaster.GetStatus(id) == NodeStatus.ST_DISABLED))
             {
                 NodeMaster.SetStatus(id, NodeStatus.ST_IDLE);
             }
             else
             {
                 NodeMaster.SetStatus(id, NodeStatus.ST_DISABLED);
             }
         }
         if (l.Name == "lbl_alert4") //alert quit
         {
         }
         curr_node = 0xff;
         UpdateAlertWindow(false);
     }
 }