Пример #1
0
 protected void CaptureState_Changed(object sender, StateChangedEventArgs e)
 {
     // Update tray icon based on new state
     if (e.State == CaptureState.UserDisabled)
     {
         miTrainingMode.Enabled = false;
         miDisableGestures.Checked = true;
         TrayIcon.Icon = Icon.FromHandle(HighSign.Properties.Resources.MouseIconDisabled.GetHicon());
     }
     else
     {
         miTrainingMode.Enabled = true;
         miDisableGestures.Checked = false;
         // Consider state of Training Mode and load according icon
         if (miTrainingMode.Checked)
             TrayIcon.Icon = Icon.FromHandle(HighSign.Properties.Resources.MouseIconTraining.GetHicon());
         else
             TrayIcon.Icon = Icon.FromHandle(HighSign.Properties.Resources.MouseIcon.GetHicon());
     }
 }
Пример #2
0
 protected virtual void OnStateChanged(StateChangedEventArgs e)
 {
     StateChanged(this, e);
 }