Пример #1
0
        private void LoadSettings()
        {
            _settings = PushToTalk.Properties.Settings.Default;
            _settings.Reload();

            // Read settings
            _key = _settings.DefaultKey;
            String message = _lookup.GetMessage(_key);

            lblDirections.Content = "Current Key: ";
            lblKey.Content        = message;

            _keyDownVolumeLevel = (float)_settings.VolumeLevelOnKeyDown;
            _volumeSlider.Value = _settings.VolumeLevelOnKeyDown * 100.0;
            Console.WriteLine("Loaded volume settings. Volume=" + _settings.VolumeLevelOnKeyDown);

            // Apply minimizetotray if applicable
            if (_settings.MinimizeToTray)
            {
                _minimizeCheckBox.IsChecked = true;
                MinimizeToTray.Enable();
            }
            else
            {
                _minimizeCheckBox.IsChecked = false;
                MinimizeToTray.Disable();
            }
        }
Пример #2
0
        private void _minimizeCheckBox_Checked(object sender, RoutedEventArgs e)
        {
            // Disable minimizing to task tray if desired
            if (_minimizeCheckBox.IsChecked == true)
            {
                MinimizeToTray.Enable();
            }
            else
            {
                MinimizeToTray.Disable();
            }

            SaveSettings();
        }