Example #1
0
        public override DcsOutputAndColorBinding CreateDcsOutputAndColorBinding(SaitekPanelLEDPosition saitekPanelLEDPosition, PanelLEDColor panelLEDColor, DCSBIOSOutput dcsBiosOutput)
        {
            var dcsOutputAndColorBinding = new DcsOutputAndColorBindingPZ55();

            dcsOutputAndColorBinding.DCSBiosOutputLED  = dcsBiosOutput;
            dcsOutputAndColorBinding.LEDColor          = panelLEDColor;
            dcsOutputAndColorBinding.SaitekLEDPosition = saitekPanelLEDPosition;
            return(dcsOutputAndColorBinding);
        }
Example #2
0
 public override void ImportSettings(List <string> settings)
 {
     //Clear current bindings
     ClearSettings();
     if (settings == null || settings.Count == 0)
     {
         return;
     }
     foreach (var setting in settings)
     {
         if (!setting.StartsWith("#") && setting.Length > 2 && setting.Contains(InstanceId))
         {
             if (setting.StartsWith("SwitchPanelKey{"))
             {
                 var keyBinding = new KeyBindingPZ55();
                 keyBinding.ImportSettings(setting);
                 _keyBindings.Add(keyBinding);
             }
             else if (setting.StartsWith("SwitchPanelOSPZ55"))
             {
                 var osCommand = new OSCommandBindingPZ55();
                 osCommand.ImportSettings(setting);
                 _osCommandBindings.Add(osCommand);
             }
             else if (setting.StartsWith("SwitchPanelLed"))
             {
                 var colorOutput = new DcsOutputAndColorBindingPZ55();
                 colorOutput.ImportSettings(setting);
                 _listColorOutputBinding.Add(colorOutput);
             }
             else if (setting.StartsWith("SwitchPanelDCSBIOSControl{"))
             {
                 var dcsBIOSBindingPZ55 = new DCSBIOSBindingPZ55();
                 dcsBIOSBindingPZ55.ImportSettings(setting);
                 _dcsBiosBindings.Add(dcsBIOSBindingPZ55);
             }
             else if (setting.StartsWith("SwitchPanelBIPLink{"))
             {
                 var bipLinkPZ55 = new BIPLinkPZ55();
                 bipLinkPZ55.ImportSettings(setting);
                 _bipLinks.Add(bipLinkPZ55);
             }
             else if (setting.StartsWith("ManualLandingGearLEDs{"))
             {
                 _manualLandingGearLeds = setting.Contains("True");
             }
         }
     }
     OnSettingsApplied();
     _keyBindings = KeyBindingPZ55.SetNegators(_keyBindings);
 }
 //SetLandingGearLED(cavb.PanelPZ55LEDPosition, cavb.PanelPZ55LEDColor);
 public void SetLandingGearLED(DcsOutputAndColorBindingPZ55 dcsOutputAndColorBindingPZ55)
 {
     SetLandingGearLED((SwitchPanelPZ55LEDPosition)dcsOutputAndColorBindingPZ55.SaitekLEDPosition.GetPosition(), dcsOutputAndColorBindingPZ55.LEDColor);
 }