private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { if (listBoxGames.SelectedIndex >= 0) { GameList.UpdateGameMemo(listBoxGames.SelectedItem.ToString(), TxtBoxGameMemo.Text); GameList.Save(ProfileName); } Application.Exit(); }
private void TxtBoxGameMemo_Leave(object sender, EventArgs e) { GameList.UpdateGameMemo(listBoxGames.SelectedItem.ToString(), TxtBoxGameMemo.Text); GameList.Save(ProfileName); }