private void InitMainForm(bool show)
        {
            if (frmMainForm == null || frmMainForm.IsDisposed)
                frmMainForm = new MainForm(mc);

            if (show)
            {
                frmMainForm.Show();
                frmMainForm.Activate();
            }
        }
 private void CloseMainForm()
 {
     frmMainForm.Close();
     frmMainForm = null;
 }