Exemple #1
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("RadioPanelKeyDialPos{"))
                    {
                        var keyBinding = new KeyBindingPZ69DialPosition();
                        keyBinding.ImportSettings(setting);
                        _keyBindings.Add(keyBinding);
                    }
                    else if (setting.StartsWith("RadioPanelOSPZ69Full"))
                    {
                        var osCommand = new OSCommandBindingPZ69FullEmulator();
                        osCommand.ImportSettings(setting);
                        _osCommandBindings.Add(osCommand);
                    }
                    else if (setting.StartsWith("PZ69DisplayValue{"))
                    {
                        var radioPanelPZ69DisplayValue = new RadioPanelPZ69DisplayValue();
                        radioPanelPZ69DisplayValue.ImportSettings(setting);
                        _displayValues.Add(radioPanelPZ69DisplayValue);
                    }
                    else if (setting.StartsWith("RadioPanelBIPLink{"))
                    {
                        var bipLinkPZ69 = new BIPLinkPZ69();
                        bipLinkPZ69.ImportSettings(setting);
                        _bipLinks.Add(bipLinkPZ69);
                    }
                    else if (setting.StartsWith("RadioPanelDCSBIOSLCD{"))
                    {
                        var dcsbiosBindingLCDPZ69 = new DCSBIOSBindingLCDPZ69();
                        dcsbiosBindingLCDPZ69.ImportSettings(setting);
                        _dcsBiosLcdBindings.Add(dcsbiosBindingLCDPZ69);
                    }
                    else if (setting.StartsWith("RadioPanelDCSBIOSControl{"))
                    {
                        var dcsbiosBindingPZ69 = new DCSBIOSBindingPZ69();
                        dcsbiosBindingPZ69.ImportSettings(setting);
                        _dcsBiosBindings.Add(dcsbiosBindingPZ69);
                    }
                }
            }

            _keyBindings = KeyBindingPZ69DialPosition.SetNegators(_keyBindings);
            OnSettingsApplied();
        }
        public override void ImportSettings(GenericPanelBinding genericPanelBinding)
        {
            ClearSettings();

            BindingHash = genericPanelBinding.BindingHash;

            var settings = genericPanelBinding.Settings;

            foreach (var setting in settings)
            {
                if (!setting.StartsWith("#") && setting.Length > 2)
                {
                    if (setting.StartsWith("RadioPanelKeyDialPos{"))
                    {
                        var keyBinding = new KeyBindingPZ69DialPosition();
                        keyBinding.ImportSettings(setting);
                        _keyBindings.Add(keyBinding);
                    }
                    else if (setting.StartsWith("RadioPanelOSPZ69Full"))
                    {
                        var osCommand = new OSCommandBindingPZ69FullEmulator();
                        osCommand.ImportSettings(setting);
                        _osCommandBindings.Add(osCommand);
                    }
                    else if (setting.StartsWith("PZ69DisplayValue{"))
                    {
                        var radioPanelPZ69DisplayValue = new RadioPanelPZ69DisplayValue();
                        radioPanelPZ69DisplayValue.ImportSettings(setting);
                        _displayValues.Add(radioPanelPZ69DisplayValue);
                    }
                    else if (setting.StartsWith("RadioPanelBIPLink{"))
                    {
                        var bipLinkPZ69 = new BIPLinkPZ69();
                        bipLinkPZ69.ImportSettings(setting);
                        _bipLinks.Add(bipLinkPZ69);
                    }
                    else if (setting.StartsWith("RadioPanelDCSBIOSLCD{"))
                    {
                        var dcsbiosBindingLCDPZ69 = new DCSBIOSOutputBindingPZ69();
                        dcsbiosBindingLCDPZ69.ImportSettings(setting);
                        _dcsBiosLcdBindings.Add(dcsbiosBindingLCDPZ69);
                    }
                    else if (setting.StartsWith("RadioPanelDCSBIOSControl{"))
                    {
                        var dcsbiosBindingPZ69 = new DCSBIOSActionBindingPZ69();
                        dcsbiosBindingPZ69.ImportSettings(setting);
                        _dcsBiosBindings.Add(dcsbiosBindingPZ69);
                    }
                }

                _keyBindings = KeyBindingPZ69DialPosition.SetNegators(_keyBindings);
                SettingsApplied();
            }
        }
        public override void ImportSettings(GenericPanelBinding genericPanelBinding)
        {
            ClearSettings();

            BindingHash = genericPanelBinding.BindingHash;

            var settings = genericPanelBinding.Settings;

            foreach (var setting in settings)
            {
                if (!setting.StartsWith("#") && setting.Length > 2)
                {
                    if (setting.StartsWith("RadioPanelKey{"))
                    {
                        var keyBinding = new KeyBindingPZ69();
                        keyBinding.ImportSettings(setting);
                        _keyBindings.Add(keyBinding);
                    }
                    else if (setting.StartsWith("RadioPanelOSPZ69"))
                    {
                        var operatingSystemCommand = new OSCommandBindingPZ69Emulator();
                        operatingSystemCommand.ImportSettings(setting);
                        _operatingSystemCommandBindings.Add(operatingSystemCommand);
                    }
                    else if (setting.StartsWith("PZ69DisplayValue{"))
                    {
                        var radioPanelPZ69DisplayValue = new RadioPanelPZ69DisplayValue();
                        radioPanelPZ69DisplayValue.ImportSettings(setting);
                        _displayValues.Add(radioPanelPZ69DisplayValue);
                    }
                    else if (setting.StartsWith("RadioPanelBIPLink{"))
                    {
                        var bipLinkPZ69 = new BIPLinkPZ69();
                        bipLinkPZ69.ImportSettings(setting);
                        _bipLinks.Add(bipLinkPZ69);
                    }
                }
            }

            _keyBindings = KeyBindingPZ69.SetNegators(_keyBindings);
            AppEventHandler.SettingsApplied(this, HIDSkeletonBase.HIDInstance, TypeOfPanel);
        }
Exemple #4
0
        public override void ImportSettings(GenericPanelBinding genericPanelBinding)
        {
            ClearSettings();

            BindingHash = genericPanelBinding.BindingHash;

            var settings = genericPanelBinding.Settings;

            foreach (var setting in settings)
            {
                if (!setting.StartsWith("#") && setting.Length > 2)
                {
                    if (setting.StartsWith("RadioPanelKey{"))
                    {
                        var keyBinding = new KeyBindingPZ69();
                        keyBinding.ImportSettings(setting);
                        _keyBindings.Add(keyBinding);
                    }
                    else if (setting.StartsWith("RadioPanelOSPZ69"))
                    {
                        var osCommand = new OSCommandBindingPZ69Emulator();
                        osCommand.ImportSettings(setting);
                        _osCommandBindings.Add(osCommand);
                    }
                    else if (setting.StartsWith("PZ69DisplayValue{"))
                    {
                        var radioPanelPZ69DisplayValue = new RadioPanelPZ69DisplayValue();
                        radioPanelPZ69DisplayValue.ImportSettings(setting);
                        _displayValues.Add(radioPanelPZ69DisplayValue);
                    }
                    else if (setting.StartsWith("RadioPanelBIPLink{"))
                    {
                        var bipLinkPZ69 = new BIPLinkPZ69();
                        bipLinkPZ69.ImportSettings(setting);
                        _bipLinks.Add(bipLinkPZ69);
                    }
                }
            }

            _keyBindings = KeyBindingPZ69.SetNegators(_keyBindings);
            SettingsApplied();
        }