コード例 #1
0
        public string GetKeyPressForLoggingPurposes(SwitchPanelKey switchPanelKey)
        {
            var result = "";

            foreach (var keyBinding in _keyBindings)
            {
                if (keyBinding.OSKeyPress != null && keyBinding.SwitchPanelPZ55Key == switchPanelKey.SwitchPanelPZ55Key && keyBinding.WhenTurnedOn == switchPanelKey.IsOn)
                {
                    result = keyBinding.OSKeyPress.GetNonFunctioningVirtualKeyCodesAsString();
                }
            }
            return(result);
        }
コード例 #2
0
 private void PZ55SwitchChanged(SwitchPanelKey switchPanelKey)
 {
     if (!ForwardKeyPresses)
     {
         return;
     }
     foreach (var keyBinding in _keyBindings)
     {
         if (keyBinding.SwitchPanelPZ55Key == switchPanelKey.SwitchPanelPZ55Key && keyBinding.WhenTurnedOn == switchPanelKey.IsOn)
         {
             keyBinding.OSKeyPress.Execute();
         }
     }
 }
コード例 #3
0
 private void CreateSwitchKeys()
 {
     _switchPanelKeys = SwitchPanelKey.GetPanelSwitchKeys();
 }
コード例 #4
0
 private static bool FlagValue(byte[] currentValue, SwitchPanelKey switchPanelKey)
 {
     return((currentValue[switchPanelKey.Group] & switchPanelKey.Mask) > 0);
 }