public GamePageViewModel(TenSecGameApplication model) { if (this.IsInDesignMode) { return; } this.model = model; this.CountDownStartCommand = new RelayCommand(() => { if (this.IsStarted) { model.Game.Stop(); this.Messenger.SendWithViewModelToken( this, new NavigationMessage(NavigationBehavior.Back)); } else { model.Game.Start(); } this.RaisePropertyChanged(() => IsStarted); }); }
static TenSecGameApplication() { Context = new TenSecGameApplication(); }