private void statistics_Click(object sender, EventArgs e) { if (statisticsForm.IsDisposed) { statisticsForm = new StatisticsForm(sessions); } statisticsForm.Show(); }
private void LoadSessions() { if (File.Exists(Properties.Settings.Default.filename)) { sessions = JsonConvert.DeserializeObject <List <SessionData> >(File.ReadAllText(Properties.Settings.Default.filename)); } else { sessions = new List <SessionData>(); } statisticsForm = new StatisticsForm(sessions); }