コード例 #1
0
ファイル: TPMPanel.cs プロジェクト: Tossler/DCSFlightpanels
        public string GetKeyPressForLoggingPurposes(TPMPanelSwitch tpmPanelSwitch)
        {
            var result = "";

            foreach (var keyBinding in _keyBindings)
            {
                if (keyBinding.OSKeyPress != null && keyBinding.TPMSwitch == tpmPanelSwitch.TPMSwitch && keyBinding.WhenTurnedOn == tpmPanelSwitch.IsOn)
                {
                    result = keyBinding.OSKeyPress.GetNonFunctioningVirtualKeyCodesAsString();
                }
            }
            return(result);
        }
コード例 #2
0
ファイル: TPMPanel.cs プロジェクト: Tossler/DCSFlightpanels
 private void TPMSwitchChanged(TPMPanelSwitch tpmPanelSwitch)
 {
     if (!ForwardKeyPresses)
     {
         return;
     }
     foreach (var keyBinding in _keyBindings)
     {
         if (keyBinding.TPMSwitch == tpmPanelSwitch.TPMSwitch && keyBinding.WhenTurnedOn == tpmPanelSwitch.IsOn)
         {
             keyBinding.OSKeyPress.Execute();
         }
     }
 }
コード例 #3
0
ファイル: TPMPanel.cs プロジェクト: Tossler/DCSFlightpanels
 private void CreateSwitchKeys()
 {
     _tpmPanelSwitches = TPMPanelSwitch.GetTPMPanelSwitches();
 }
コード例 #4
0
ファイル: TPMPanel.cs プロジェクト: Tossler/DCSFlightpanels
 private static bool FlagValue(byte[] currentValue, TPMPanelSwitch tpmPanelSwitch)
 {
     return((currentValue[tpmPanelSwitch.Group] & tpmPanelSwitch.Mask) > 0);
 }