protected override void OnFormClosing(FormClosingEventArgs e) { history.games = new List <Game>(); foreach (ListViewItem i in historyList.Items) { history.games.Add(GameConverter.ItemToGame(i)); } history.Save(); base.OnFormClosing(e); }