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;
        }
Example #2
0
 public void Save(Score score)
 {
     var store = IsolatedStorageFile.GetUserStoreForApplication();
     StreamWriter Writer = new StreamWriter(new IsolatedStorageFileStream("score.txt", FileMode.OpenOrCreate, store));
     Writer.WriteLine("tst");
     Writer.Close();
 }
Example #3
0
 public void Add(Score score)
 {
     this.scores.Add(score);
 }