Example #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();
             }
         }
     }
 }
Example #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();
             }
         }
     }
 }