public GameViewModel() { this._scores = new Scores(); this._currentScore = new Score(); this.gameColors = new GameColors(); rows = new ObservableCollection <Row>(); headerRow = new ObservableCollection <Row>(); this.okCommand = new DelegateCommand(new Action <object>((p) => this.NewGame())); this.exitCommand = new DelegateCommand(new Action <object>((p) => Application.Current.Terminate())); this.resumeCommand = new DelegateCommand(new Action <object>((p) => this.resume())); //this.newGameCommand = new DelegateCommand(new Action<object>((p) => this.NewGame())); //this.resetCommand = new DelegateCommand(new Action<object>((p) => this.Reset())); this.NewGame(); dtm.Interval = TimeSpan.FromSeconds(1); dtm.Tick += OnTimerTick; }
public GameViewModel() { this._scores = new Scores(); this._currentScore = new Score(); this.gameColors = new GameColors(); rows = new ObservableCollection<Row>(); headerRow = new ObservableCollection<Row>(); this.okCommand = new DelegateCommand(new Action<object>((p) => this.NewGame())); this.exitCommand = new DelegateCommand(new Action<object>((p) => Application.Current.Terminate())); this.resumeCommand = new DelegateCommand(new Action<object>((p) => this.resume())); //this.newGameCommand = new DelegateCommand(new Action<object>((p) => this.NewGame())); //this.resetCommand = new DelegateCommand(new Action<object>((p) => this.Reset())); this.NewGame(); dtm.Interval = TimeSpan.FromSeconds(1); dtm.Tick += OnTimerTick; }