Beispiel #1
0
 private void FinishGameMessageHandler(object sender, EventArgs e)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         var model            = new FinishGameViewModel(_pet);
         var finishGameWindow = new FinishGameWindow(model);
         finishGameWindow.Show();
         this.Close();
     });
 }
Beispiel #2
0
        public FinishGameWindow(FinishGameViewModel viewModel)
        {
            viewModel.RestartGameMessage += RestartGameHandler;
            _viewModel       = viewModel;
            this.DataContext = viewModel;
            _viewModel.RegisterCommandsForWindow(this);
            InitializeComponent();

            Closing += OnClosing;
        }
Beispiel #3
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            FinishGameViewModel vm = DataContext as FinishGameViewModel;

            vm.OnNavigateTo(e.Parameter as IDictionary <string, object>);
        }