/// <summary> /// Command callback. /// Called to save current settings. /// </summary> private void OnSaveSettings() { bool needRestart = ContentViewModel.IsRestartNeeded(); ContentViewModel.SaveSettings(); Interface.Properties.Settings.Default.Save(); if (needRestart) { MessageBox.Show(NavigationActor.Instance.ActiveWindow, string.Format("Some changes will not take effect until the application is restarted."), "Some settings need restart", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information); } }
/// <summary> /// Command callback. /// Called to save current settings. /// </summary> private async void OnSaveSettings() { bool needRestart = ContentViewModel.IsRestartNeeded(); ContentViewModel.SaveSettings(); Interface.Properties.Settings.Default.Save(); if (needRestart) { await MessageBoxManager.GetMessageBoxStandardWindow(new MessageBoxStandardParams { ButtonDefinitions = ButtonEnum.Ok, ContentTitle = "Some settings need restart", ContentMessage = "Some changes will not take effect until the application is restarted.", Icon = Icon.Info, }).ShowDialog(NavigationActor.Instance.MainWindow); } }