private void dispatchEntryToolStripMenuItem_Click(object sender, EventArgs e) { if (dispatchForm == null) { dispatchForm = new DispatchForm { MdiParent = this }; dispatchForm.Show(); } if (dispatchForm.IsDisposed) { dispatchForm = new DispatchForm { MdiParent = this }; dispatchForm.Show(); } else { dispatchForm.BringToFront(); } }
public void OnDispatchClick(DateTime date) { if (dispatchForm == null) { dispatchForm = new DispatchForm { MdiParent = this }; dispatchForm.Show(); } if (dispatchForm.IsDisposed) { dispatchForm = new DispatchForm { MdiParent = this }; dispatchForm.Show(); } else { dispatchForm.BringToFront(); } dispatchForm.setValues(date); }