Esempio n. 1
0
        public void LockSwitch(API.Msg.MsgObject_GetLockStatus lockSwitch)
        {
            switch (lockSwitch.GetLockID)
            {
            case API.Msg.eLockID.Lock1:
                if (lockSwitch.GetLockStatus == API.Msg.eSwitchStatus.Close)
                {
                    this.checkboxLock1.IsChecked = false;
                }
                else
                {
                    this.checkboxLock1.IsChecked = true;
                }
                break;

            case API.Msg.eLockID.Lock2:
                if (lockSwitch.GetLockStatus == API.Msg.eSwitchStatus.Close)
                {
                    this.checkboxLock2.IsChecked = false;
                }
                else
                {
                    this.checkboxLock2.IsChecked = true;
                }
                break;
            }
            MessageBox.Show(lockSwitch.GetLockID + "" + lockSwitch.GetLockStatus);
        }
Esempio n. 2
0
 private void checkboxLock2_Checked(object sender, RoutedEventArgs e)
 {
     API.Msg.MsgObject_GetLockStatus locked = new API.Msg.MsgObject_GetLockStatus()
     {
         Address = 1
     };
     connected.SendSyncMsg(locked);
 }