public SemaphoreViewModel() { _game = SemaphoreGames.Instance.GetNextGame(); _winner = Visibility.Hidden; _game.Start += _game_Start; _game.Updated += _game_Updated; _game.Finished += _game_Finished; }
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(); } } }