Exemplo n.º 1
0
        void _screen_GameSelected(object sender, GameSelectedEventArgs e)
        {
            String s = e.StoryFileName;

            for (int i = 0; i < LastPlayedGames.Count; i++)
            {
                if (String.IsNullOrWhiteSpace(LastPlayedGames[i]) || String.Compare(LastPlayedGames[i], s, true) == 0)
                {
                    LastPlayedGames.RemoveAt(i--);
                }
            }

            LastPlayedGames.Add(s);


            while (LastPlayedGames.Count > Properties.Settings.Default.LastPlayedGamesCount)
            {
                LastPlayedGames.RemoveAt(0);
            }

            Properties.Settings.Default.LastPlayedGames = String.Join("|", LastPlayedGames.ToArray());
            Properties.Settings.Default.Save();

            _storyFileName = e.StoryFileName;
            _blorbFile     = e.BlorbFile;

            miGameInfo.IsEnabled = (_blorbFile != null);
        }
Exemplo n.º 2
0
 protected void OnStoryStarted(GameSelectedEventArgs e)
 {
     if (GameSelected != null)
     {
         GameSelected(this, e);
     }
 }
Exemplo n.º 3
0
 protected void OnStoryStarted(GameSelectedEventArgs e)
 {
     if (GameSelected != null) GameSelected(this, e);
 }
Exemplo n.º 4
0
        void _screen_GameSelected(object sender, GameSelectedEventArgs e)
        {
            String s = e.StoryFileName;

            for (int i = 0; i < LastPlayedGames.Count; i++)
            {
                if (String.IsNullOrWhiteSpace(LastPlayedGames[i]) || String.Compare(LastPlayedGames[i], s, true) == 0)
                {
                    LastPlayedGames.RemoveAt(i--);
                }
            }

            LastPlayedGames.Add(s);


            while (LastPlayedGames.Count > Properties.Settings.Default.LastPlayedGamesCount)
            {
                LastPlayedGames.RemoveAt(0);
            }

            Properties.Settings.Default.LastPlayedGames = String.Join("|", LastPlayedGames.ToArray());
            Properties.Settings.Default.Save();

            _storyFileName = e.StoryFileName;
            _blorbFile = e.BlorbFile;

            miGameInfo.IsEnabled = (_blorbFile != null);
        }