diff --git a/MMExNotifier/Views/MainWindow.xaml.cs b/MMExNotifier/Views/MainWindow.xaml.cs index 83e6d2a..5b3df41 100644 --- a/MMExNotifier/Views/MainWindow.xaml.cs +++ b/MMExNotifier/Views/MainWindow.xaml.cs @@ -3,6 +3,7 @@ using Drawing = System.Drawing; using System.Reflection; using WpfUi = Wpf.Ui.Controls; +using System.ComponentModel; namespace MMExNotifier { @@ -29,10 +30,8 @@ private void Settings_Click(object sender, RoutedEventArgs e) settingsPanel.Visibility = Visibility.Visible; } - private void Close_Click(object sender, RoutedEventArgs e) + protected override void OnClosing(CancelEventArgs e) { - Close(); - Properties.Settings.Default.WindowPosition = new Drawing.Point((int)Left, (int)Top); Properties.Settings.Default.WindowSize = new Drawing.Size((int)Width, (int)Height); Properties.Settings.Default.Save(); @@ -69,7 +68,7 @@ private void TitleBar_HelpClicked(WpfUi.TitleBar sender, RoutedEventArgs args) $"Version {appVersion}\n\n" + "This software is provided free of charge and may be used, copied, and distributed without restriction."; - System.Windows.MessageBox.Show(this, aboutMessage, "About MMExNotifier", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show(this, aboutMessage, "About MMExNotifier", MessageBoxButton.OK, MessageBoxImage.Information); } } }