Пример #1
0
 public static CtrlMsg GetInstance()
 {
     // 如果类的实例不存在则创建,否则直接返回
     if (_ctrlMsg == null)
     {
         _ctrlMsg = new CtrlMsg();
     }
     return(_ctrlMsg);
 }
Пример #2
0
 private void checkBoxOut15_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBoxOut15.Checked)
     {
         SendMessage(CtrlMsg.GetInstance().Out15On);
         WriteToIOSendText(CtrlMsg.GetInstance().Out15On);
     }
     else
     {
         SendMessage(CtrlMsg.GetInstance().Out15Off);
         WriteToIOSendText(CtrlMsg.GetInstance().Out15Off);
     }
 }
Пример #3
0
 private void buttonStay_Click(object sender, EventArgs e)
 {
     SendMessage(CtrlMsg.GetInstance().Stay);
     WriteToIOSendText(CtrlMsg.GetInstance().Stay);
 }