Beispiel #1
0
        private void BtnAddSteamGame_Click(object sender, EventArgs e)
        {
            string gameName = comboBoxGameList.SelectedItem.ToString();
            Game   g        = ownedGames.Find(x => x.Name == gameName);

            if (g != null)
            {
                GameList.AddSteamGame(g.AppID, g.Name);
                UpdateGameList();
                comboBoxGameList.SelectedIndex = -1;
                listBoxGames.SelectedIndex     = listBoxGames.Items.Count - 1;
            }
        }
Beispiel #2
0
        private void listBoxAchievements_DrawItem(object sender, DrawItemEventArgs e)
        {
            Brush  myBrush     = Brushes.Black;
            string achieveName = listBoxAchievements.Items[e.Index].ToString();

            if (GameList.DoesAchieveGotMemo(GameName, achieveName))
            {
                myBrush = Brushes.YellowGreen;
            }

            e.DrawBackground();
            e.Graphics.DrawString(listBoxAchievements.Items[e.Index].ToString(), listBoxAchievements.Font, myBrush, e.Bounds);

            /*foreach (ListBox.ObjectCollection i in listBoxAchievements.Items) {
             *
             * }*/
        }
Beispiel #3
0
 public void UpdateGameList()
 {
     listBoxGames.Items.Clear();
     foreach (string name in GameList.GetAllGameNames())
     {
         listBoxGames.Items.Add(name);
     }
     if (listBoxGames.Items.Count > 0)
     {
         listBoxGames.SelectedIndex = 0;
     }
     else
     {
         TxtBoxGameMemo.Text    = "";
         TxtBoxGameMemo.Enabled = false;
     }
     GameList.Save(ProfileName);
 }
Beispiel #4
0
 private void TxtBoxGameMemo_Leave(object sender, EventArgs e)
 {
     GameList.UpdateGameMemo(listBoxGames.SelectedItem.ToString(), TxtBoxGameMemo.Text);
     GameList.Save(ProfileName);
 }
Beispiel #5
0
 private void btnDeleteGame_Click(object sender, EventArgs e)
 {
     GameList.RemoveGame(listBoxGames.SelectedItem.ToString());
     UpdateGameList();
 }
Beispiel #6
0
 private void LoadGameList()
 {
     GameList.Load(ProfileName);
     UpdateGameList();
 }