private void SaveAndExit(object sender, MouseButtonEventArgs e) { ControllerSettings.SaveModel(this.modelGroupItem, this, this.viewGroupItem); ControllerGroupItem.ChangeGroupItem(this.modelGroupItem); this.Close(MessageBoxResult.Yes); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (result == MessageBoxResult.No) { result = System.Windows.MessageBox.Show("Сохранить изменения?", "Yes/No", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { ControllerSettings.SaveModel(this.modelGroupItem, this, this.viewGroupItem); ControllerGroupItem.ChangeGroupItem(this.modelGroupItem); } } }