private void ResetWindow() { WindowState = WindowState.Normal; Width = 250; Height = 387; StaticHelper.CenterOnScreen(this); Activate(); }
private void MenuItemAbout_Click(object sender, RoutedEventArgs e) { if (_settingsWindow != null) { return; } if (_termsOfUseWindow != null) { _termsOfUseWindow.Activate(); return; } _termsOfUseWindow = new TermsOfUseWindow(); StaticHelper.CenterOnScreen(_termsOfUseWindow); _termsOfUseWindow.ShowDialog(); _termsOfUseWindow = null; }
private void MenuItemSettings_Click(object sender, RoutedEventArgs e) { if (_termsOfUseWindow != null) { return; } if (_settingsWindow != null) { _settingsWindow.Activate(); return; } _settingsWindow = new SettingsWindow(); StaticHelper.CenterOnScreen(_settingsWindow); bool?dialogResult = _settingsWindow.ShowDialog(); if (dialogResult.HasValue && dialogResult.Value == true) { ApplySettings(); } _settingsWindow = null; }