//关闭窗体 (不关闭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(); } } } }
//关闭窗体 (不关闭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(); } } } }