private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!IsLoaded) { return; } Properties.Settings.Default.ShortcutIndex = cboShortcut.SelectedIndex; Properties.Settings.Default.Save(); api.SetHotkeys(Properties.Settings.Default.ShortcutIndex); }
public SetupViewControl(SpeechApi api) { InitializeComponent(); this.api = api; foreach (VoiceRate voice in api.Voices) { lvVoices.Items.Add(voice); } lvVoices.SelectedIndex = 0; sliderVolume.Value = api.Volume; cbFocus.IsChecked = Properties.Settings.Default.IsFocus; cbStartupFocus.IsChecked = Properties.Settings.Default.IsStartupFocus; cboShortcut.SelectedIndex = Properties.Settings.Default.ShortcutIndex; api.SetHotkeys(Properties.Settings.Default.ShortcutIndex); }