public void CloseDialogWithResult(IDialogWindow dialog, DialogResults <T> results) { NewStat = results.MyStat; DialogResult = results.decisions; if (dialog != null) { dialog.DialogResult = true; } }
public DialogResults <T> OpenDialog <T>(DialogViewModelBase <T> viewModel) { IDialogWindow window = new DialogWindow(); window.DataContext = viewModel; window.ShowDialog(); DialogResults <T> dialogResults = new DialogResults <T> { decisions = viewModel.DialogResult, Equipment = viewModel.Equipment, MyStat = viewModel.NewStat }; return(dialogResults); }