Ejemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            try
            {
                GameModel.T         model      = ModelException.TryThrow <GameModel.T>(GameModel.tryCreate());
                GameController.T    controller = GameController.create(model);
                MainWindowViewModel viewModel  = new MainWindowViewModel(model);

                MainWindow win = new GUI.MainWindow(viewModel, controller);
                MainWindow = win;
                win.Show();
            }
            catch (Exception exc)
            {
                MessageBox.Show(string.Format("Aplikaci Latrunculi se nepodařilo spustit:{0}{1}", Environment.NewLine, ViewModelCommon.ConvertExceptionToString(exc)),
                                "Chyba", MessageBoxButton.OK, MessageBoxImage.Error);
                Shutdown(-1);
            }
        }
Ejemplo n.º 2
0
 public MainWindowViewModel(GameModel.T model)
 {
     Model = model;
     InitModel();
 }