コード例 #1
0
 public SemaphoreViewModel()
 {
     _game = SemaphoreGames.Instance.GetNextGame();
     _winner = Visibility.Hidden;
     _game.Start += _game_Start;
     _game.Updated += _game_Updated;
     _game.Finished += _game_Finished;
 }
コード例 #2
0
 public SemaphoreViewModel()
 {
     _game           = SemaphoreGames.Instance.GetNextGame();
     _winner         = Visibility.Hidden;
     _game.Start    += _game_Start;
     _game.Updated  += _game_Updated;
     _game.Finished += _game_Finished;
 }
コード例 #3
0
ファイル: SemaphoreGames.cs プロジェクト: atosorigin/Kinect
        private void GenerateGames()
        {
            ////TODO: Read XML File
            Games.Clear();
            using (var sr = new StreamReader(Settings.Default.SemaphoreGamesFilePath))
            {
                string gameline = sr.ReadLine();
                while (gameline != null)
                {
                    var game = new SemaphoreGame();
                    foreach (char semaphore in gameline)
                    {
                        game.Semaphores.Add(new SemaphoreImage(semaphore));
                    }

                    Games.Add(game);
                    gameline = sr.ReadLine();
                }
            }
        }