示例#1
0
        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);
            });
        }
示例#2
0
 static TenSecGameApplication()
 {
     Context = new TenSecGameApplication();
 }