예제 #1
0
 //关闭窗体 (不关闭OutPutWindow)
 public void CloseAllDocumentBut(JForm exceptForm)
 {
     if (DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
     {
         foreach (Form form in MdiChildren)
         {
             if (form != exceptForm && !(form is OutPutWindow))
                 form.Close();
         }
     }
     else
     {
         foreach (IDockContent document in DockPanel.DocumentsToArray())
         {
             if (document != exceptForm && !(document is OutPutWindow))
             {
                 document.DockHandler.Close();
             }
         }
     }
 }
예제 #2
0
 //关闭窗体 (不关闭OutPutWindow)
 public void CloseAllDocumentBut(JForm exceptForm)
 {
     if (DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
     {
         foreach (Form form in MdiChildren)
         {
             if (form != exceptForm && !(form is OutPutWindow))
             {
                 form.Close();
             }
         }
     }
     else
     {
         foreach (IDockContent document in DockPanel.DocumentsToArray())
         {
             if (document != exceptForm && !(document is OutPutWindow))
             {
                 document.DockHandler.Close();
             }
         }
     }
 }