/// <summary> /// Shows the form. /// </summary> private void ShowForm() { logger.LogInformation("+ ShowForm()"); if (mainForm == null) { mainForm = new MainForm(); mainForm.Text = "Window Manager"; mainForm.FormClosed += MainForm_FormClosed; mainForm.Show(); } else { mainForm.Activate(); mainForm.Show(); } logger.LogInformation("- ShowForm()"); }
/// <summary> /// Handles the FormClosed event of the MainForm control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="FormClosedEventArgs"/> instance containing the event data.</param> private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { logger.LogInformation("+ MainForm_FormClosed()"); mainForm = null; logger.LogInformation("- MainForm_FormClosed()"); }