Ejemplo n.º 1
0
 /// <summary>
 /// 显示
 /// </summary>
 public virtual void show()
 {
     if (m_isWinForm)
     {
         FCSize        windowSize   = new FCSize();
         List <FCView> controls     = m_window.m_controls;
         int           controlsSize = controls.Count;
         m_winForm = new BugHoleForm();
         for (int i = 0; i < controlsSize; i++)
         {
             FCView subControl = controls[i];
             if (!(subControl is WindowButton))
             {
                 windowSize        = subControl.Size;
                 subControl.Margin = new FCPadding(0, 0, 0, 0);
                 m_winForm.addBugHole(Native, subControl);
                 break;
             }
         }
         Native         = m_winForm.Native;
         m_winForm.Text = m_window.Text;
         if (m_window.WindowState == WindowStateA.Max)
         {
             m_winForm.WindowState = FormWindowState.Maximized;
         }
         else if (m_window.WindowState == WindowStateA.Min)
         {
             m_winForm.WindowState = FormWindowState.Minimized;
         }
         else
         {
             m_winForm.ClientSize = new Size(windowSize.cx, windowSize.cy);
         }
         m_winForm.Window = this;
         m_winForm.Show();
     }
     else
     {
         m_window.Location = new FCPoint(-m_window.Width, -m_window.Height);
         m_window.animateShow(false);
         m_window.invalidate();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void delete()
 {
     if (!IsDeleted)
     {
         if (m_winForm != null && m_winForm.Window != null)
         {
             m_winForm.Window = null;
             m_winForm.Close();
             m_winForm = null;
         }
         if (m_window != null)
         {
             m_window.removeEvent(m_invokeEvent, FCEventID.INVOKE);
             m_invokeEvent = null;
             m_window.close();
             m_window.delete();
             m_window = null;
         }
         base.delete();
     }
 }