private void ShowCycliAgentForm() { if (cycliAgentForm == null) { cycliAgentForm = new CycliAgentForm(); cycliAgentForm.Closed += cycliAgentForm_Closed; cycliAgentForm.Show(); } else { cycliAgentForm.Activate(); } }
// null out the forms so we know to create a new one. void cycliAgentForm_Closed(object sender, EventArgs e) { cycliAgentForm = null; }