Example #1
0
 public void DetachGui()
 {
     if (m_guiData.MainWindow is System.Windows.Forms.Form)
     {
         if (m_subMenuItem != null)
         {
             m_subMenuItem.Parent.MenuItems.Remove(m_subMenuItem);
             m_subMenuItem.Dispose();
             m_subMenuItem = null;
         }
         if (m_form != null)
         {
             m_form.AllowClose = true;
             m_form.Close();
             m_form = null;
         }
     }
     m_guiData = null;
 }
Example #2
0
 private void menu_Click(object sender, EventArgs e)
 {
     if (m_guiData.MainWindow is System.Windows.Forms.Form)
     {
         if (m_form == null)
         {
             m_form = new UI.FormCpu();
             m_form.Init(m_target);
             m_form.FormClosed += delegate(object obj, System.Windows.Forms.FormClosedEventArgs arg)
             {
                 m_form = null;
             };
             m_form.Show((System.Windows.Forms.Form)m_guiData.MainWindow);
         }
         else
         {
             m_form.Show();
             m_form.Activate();
         }
     }
 }