Example #1
0
 /// <summary> Saves the current states to restore later, after the show for example. </summary>
 public static void Save()
 {
     savedStates = new ToggleableKeyStates(numLock.State, capsLock.State, scrollLock.State);
 }
Example #2
0
 public static void Set(ToggleableKeyStates toggleableKeyStates)
 {
     numLock.State    = toggleableKeyStates.NumLockState;
     capsLock.State   = toggleableKeyStates.CapsLockState;
     scrollLock.State = toggleableKeyStates.ScrollLockState;
 }
Example #3
0
 public void Set(ToggleableKeyStates toggleableKeyStates)
 {
     SetColors(toggleableKeyStates.NumLockState ? Color.Green : Color.Red,
               toggleableKeyStates.CapsLockState ? Color.Green : Color.Red,
               toggleableKeyStates.ScrollLockState ? Color.Green : Color.Red);
 }
 private void PatternShowController_ProgressReported(int currentPatternProgressPercentage, int totalShowProgressPercentage, ToggleableKeyStates currentToggleableKeyStates)
 {
     patternGV.ClearSelection();
     if (currentPatternProgressPercentage > 0)
     {
         patternGV.Invoke(new MethodInvoker(delegate
         {
             patternGV.Rows[(int)Math.Round(Pattern.StatesList.Count * (double)currentPatternProgressPercentage / 100) - 1].Selected = true;
             patternGV.FirstDisplayedScrollingRowIndex = patternGV.SelectedRows[0].Index;
         }));
         toggeableKeyStatesVisualizer.Invoke(new MethodInvoker(
                                                 delegate { toggeableKeyStatesVisualizer.Set(currentToggleableKeyStates); }));
     }
 }
Example #5
0
 private void PatternShowController_ProgressReported(int currentPatternProgressPercentage, int totalShowProgressPercentage, ToggleableKeyStates currentToggleableKeyStates)
 {
     patternShowPB.Invoke(new MethodInvoker(delegate
     {
         if (patternShowController.IsShowContinuous())
         {
             patternShowPB.Style = ProgressBarStyle.Marquee;
         }
         else
         {
             patternShowPB.Value = totalShowProgressPercentage;
         }
     }));
     toggeableKeyStatesVisualizer.Invoke(new MethodInvoker(
                                             delegate { toggeableKeyStatesVisualizer.Set(currentToggleableKeyStates); }));
 }