Beispiel #1
0
        public void RaiseSettingsChanged(Control control)
        {
            var ev = SettingChanged;

            if (ev == null)
            {
                return;
            }
            var map = SettingsMap.FirstOrDefault(x => x.Control == control);
            var e   = new SettingChangedEventArgs(map);

            ev(this, e);
        }
Beispiel #2
0
        /// <summary>
        /// Delay settings trough timer so interface will be more responsive on TrackBars.
        /// Or fast changes. Library will be reloaded as soon as user calms down (no setting changes in 500ms).
        /// </summary>
        private void Current_SettingChanged(object sender, SettingChangedEventArgs e)
        {
            var changed = SettingsManager.Current.ApplyAllSettingsToXML();

            // If settings changed then...
            if (changed)
            {
                // Stop updating forms and controls.
                // Update Timer will be started inside Settings timer.
                UpdateTimer.Stop();
                SettingsTimer.Stop();
                // Synchronize settings to HID Guardian.
                //AppHelper.SynchronizeToHidGuardian();
                SettingsTimer.Start();
            }
        }