private void ColorSchemeComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems?[0] == null) { return; } SettingsSelector.SetConfigurationValue("ColorScheme", e.AddedItems[0] as string); App.ColorSchemeLoader.ApplyColors(); }
private void LanguageSelectComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems?[0] == null) { return; } SettingsSelector.SetConfigurationValue("Language", e.AddedItems[0] as string); LocaleSelector.SetLocaleIdentifier(e.AddedItems[0] as string); }
public MainWindow() { InitializeComponent(); CreateConnection(); DirectoryGuard.DirectoriesSanityCheck(); InitializeChatView(); InitializeStatistics(); _glowFadeOutAnimation = new ColorAnimation(Colors.WindowActiveGlow, Colors.WindowInactiveGlow, new Duration(new TimeSpan(0, 0, 0, 0, 150))); _glowFadeInAnimation = new ColorAnimation(Colors.WindowInactiveGlow, Colors.WindowActiveGlow, new Duration(new TimeSpan(0, 0, 0, 0, 150))); var borderActivateAnimation = new ColorAnimation(Colors.WindowInactiveBorder, Colors.WindowActiveBorder, new Duration(new TimeSpan(0, 0, 0, 0, 150))); var borderDeactivateAnimation = new ColorAnimation(Colors.WindowActiveBorder, Colors.WindowInactiveBorder, new Duration(new TimeSpan(0, 0, 0, 0, 150))); _borderActivateStoryboard = new Storyboard(); _borderDeactivateStoryboard = new Storyboard(); Storyboard.SetTarget(borderActivateAnimation, WindowBorder); Storyboard.SetTargetProperty(borderActivateAnimation, new PropertyPath("(Border.BorderBrush).(SolidColorBrush.Color)")); _borderActivateStoryboard.Children.Add(borderActivateAnimation); Storyboard.SetTarget(borderDeactivateAnimation, WindowBorder); Storyboard.SetTargetProperty(borderDeactivateAnimation, new PropertyPath("(Border.BorderBrush).(SolidColorBrush.Color)")); _borderDeactivateStoryboard.Children.Add(borderDeactivateAnimation); SettingsSelector.SettingsChanged += SettingsSelector_SettingsChanged; _debuggingWindow = new DebugWindow(App.Connection); _settingsWindow = new SettingsWindow(); _aboutWindow = new AboutWindow(); _archiveWindow = new ArchiveWindow(); _escTimer = new Timer(800); _escTimer.Elapsed += escTimer_Elapsed; SettingsSelector.SetConfigurationValue("Voivodeship", SettingsSelector.GetConfigurationValue <string>("Voivodeship")); }
private void VoivodeshipSelectComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { SettingsSelector.SetConfigurationValue("Voivodeship", VoivodeshipSelectComboBox.SelectedIndex.ToString()); }
private void MessageMarginsCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Appearance_MessageMargins", "False"); }
private void UpperCaseMenuHeaderCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Appearance_UppercaseMenuHeaders", "False"); }
private void ToggleCopyViewOnDoubleClickCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Behavior_CopyViewOnLogDoubleClick", "False"); }
private void SendChatstateCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Behavior_SendChatstate", "False"); }
private void SendUserAgentCheckBox_OnChecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Behavior_SendUserAgent", "True"); }
private void StartupWithSystemCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Behavior_StartupWithSystem", "False"); SetStartup(false); }
private void SendSexQueryCheckBox_OnUnchecked(object sender, RoutedEventArgs e) { SettingsSelector.SetConfigurationValue("Behavior_SendSexQueryOnStart", "False"); }