private void textBoxGameMemo_LostFocus(object sender, EventArgs e) { int listIndex = listBoxAchievements.SelectedIndex; achievementsList.ElementAt(listIndex).Memo = textBoxAchievMemo.Text; GameList.UpdateGameAchiev(GameName, achievementsList); GameList.Save("Daisuke"); }
private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { if (listBoxGames.SelectedIndex >= 0) { GameList.UpdateGameMemo(listBoxGames.SelectedItem.ToString(), TxtBoxGameMemo.Text); GameList.Save(ProfileName); } Application.Exit(); }
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); }
private void TxtBoxGameMemo_Leave(object sender, EventArgs e) { GameList.UpdateGameMemo(listBoxGames.SelectedItem.ToString(), TxtBoxGameMemo.Text); GameList.Save(ProfileName); }