private void TimeReport_FormClosed(object sender, FormClosedEventArgs e) { timeReport.Dispose(); timeReport = null; reset(); this.Show(); }
private void timeOnClick(object sender, EventArgs e) { if (report == null) { timeReport = new ViewTimeSpentOnTaskForm(instance, theUser); timeReport.StartPosition = FormStartPosition.CenterScreen; timeReport.FormClosed += TimeReport_FormClosed; timeReport.ShowDialog(); } else { timeReport.Activate(); } }