Пример #1
0
        /// <summary>
        /// Configure the IR Server plugin.
        /// </summary>
        public void Configure(IWin32Window owner)
        {
            _config = new Config();
            ConfigManagement.LoadSettings(ref _config);

            ConfigurationDialog configDialog = new ConfigurationDialog();

            configDialog.LearnTimeout       = _config.LearnTimeout;
            configDialog.DisableMceServices = _config._disableMceServices;

            configDialog.EnableRemote            = _config.EnableRemoteInput;
            configDialog.UseSystemRatesForRemote = _config.UseSystemRatesRemote;
            configDialog.RemoteRepeatDelay       = _config.RemoteFirstRepeat;
            configDialog.RemoteHeldDelay         = _config.RemoteHeldRepeats;
            configDialog.DisableAutomaticButtons = _config._disableAutomaticButtons;

            configDialog.EnableKeyboard            = _config.EnableKeyboardInput;
            configDialog.UseSystemRatesForKeyboard = _config.UseSystemRatesKeyboard;
            configDialog.KeyboardRepeatDelay       = _config.KeyboardFirstRepeat;
            configDialog.KeyboardHeldDelay         = _config.KeyboardHeldRepeats;
            configDialog.HandleKeyboardLocal       = _config.HandleKeyboardLocally;
            configDialog.UseQwertzLayout           = _config.UseQwertzLayout;

            configDialog.EnableMouse      = _config.EnableMouseInput;
            configDialog.HandleMouseLocal = _config.HandleMouseLocally;
            configDialog.MouseSensitivity = _config.MouseSensitivity;

            if (configDialog.ShowDialog(owner) == DialogResult.OK)
            {
                _config.LearnTimeout        = configDialog.LearnTimeout;
                _config._disableMceServices = configDialog.DisableMceServices;

                _config.EnableRemoteInput        = configDialog.EnableRemote;
                _config.UseSystemRatesRemote     = configDialog.UseSystemRatesForRemote;
                _config.RemoteFirstRepeat        = configDialog.RemoteRepeatDelay;
                _config.RemoteHeldRepeats        = configDialog.RemoteHeldDelay;
                _config._disableAutomaticButtons = configDialog.DisableAutomaticButtons;

                _config.EnableKeyboardInput    = configDialog.EnableKeyboard;
                _config.UseSystemRatesKeyboard = configDialog.UseSystemRatesForKeyboard;
                _config.KeyboardFirstRepeat    = configDialog.KeyboardRepeatDelay;
                _config.KeyboardHeldRepeats    = configDialog.KeyboardHeldDelay;
                _config.HandleKeyboardLocally  = configDialog.HandleKeyboardLocal;

                _config.EnableMouseInput   = configDialog.EnableMouse;
                _config.HandleMouseLocally = configDialog.HandleMouseLocal;
                _config.MouseSensitivity   = configDialog.MouseSensitivity;

                ConfigManagement.SaveSettings(_config);
            }
        }
Пример #2
0
        /// <summary>
        /// Configure the IR Server plugin.
        /// </summary>
        public void Configure(IWin32Window owner)
        {
            _config = new Config();
            ConfigManagement.LoadSettings(ref _config);

            InitDeviceList();

            ConfigurationDialog configDialog = new ConfigurationDialog(_deviceList);

            configDialog.DeviceGuid = _config.DeviceGUID;
            configDialog.AxisLimit  = _config.AxisLimit;

            if (configDialog.ShowDialog(owner) == DialogResult.OK)
            {
                if (!String.IsNullOrEmpty(configDialog.DeviceGuid))
                {
                    _config.DeviceGUID = configDialog.DeviceGuid;
                    _config.AxisLimit  = configDialog.AxisLimit;

                    ConfigManagement.SaveSettings(_config);
                }
            }
        }
Пример #3
0
        /// <summary>
        /// Configure the IR Server plugin.
        /// </summary>
        public void Configure(IWin32Window owner)
        {
            Debug.WriteLine("Configure()");
            _config = new Config();
            ConfigManagement.LoadSettings(ref _config);

            ConfigurationDialog configDialog = new ConfigurationDialog();

            configDialog.DoRepeats           = _config.DoRepeats;
            configDialog.UseSystemRatesDelay = _config.UseSystemRatesDelay;
            configDialog.FirstRepeatDelay    = _config.FirstRepeatDelay;
            configDialog.HeldRepeatDelay     = _config.HeldRepeatDelay;

            if (configDialog.ShowDialog(owner) == DialogResult.OK)
            {
                _config.DoRepeats           = configDialog.DoRepeats;
                _config.UseSystemRatesDelay = configDialog.UseSystemRatesDelay;
                _config.FirstRepeatDelay    = configDialog.FirstRepeatDelay;
                _config.HeldRepeatDelay     = configDialog.HeldRepeatDelay;

                ConfigManagement.SaveSettings(_config);
            }
            Debug.WriteLine("Configure(): Completed");
        }