private static void ShowNewGame(NewGameMessage message) { NewGameWindow window = new NewGameWindow { DataContext = message.NewGameVM }; message.NewGameVM.RequestClose += (sender, e) => { window.Close(); }; window.ShowDialog(); message.Process(); }
private static void ShowNewGame(NewGameMessage message) { try { NewGameWindow window = new NewGameWindow { DataContext = message.NewGameVM, Owner = Application.Current.MainWindow, }; message.NewGameVM.RequestClose += (sender, e) => { window.Close(); }; window.ShowDialog(); message.Process(); } catch (Exception ex) { ExceptionUtils.HandleException(ex); } }