public void CloseForm() { if (controlForm == null || !controlForm.Visible) { return; } controlForm.Hide(); controlForm.Dispose(); controlForm = null; }
public void ShowForm() { if (controlForm != null && controlForm.Visible) { controlForm.WindowState = System.Windows.Forms.FormWindowState.Normal; controlForm.Focus(); return; } controlForm = new FanControlForm(sensors, this, settings); controlForm.Show(); }