| | |
| | | /// tab临时选项卡 |
| | | /// </summary> |
| | | private static readonly Dictionary<string, XtraTabPage> TabPageDic = new Dictionary<string, XtraTabPage>(); |
| | | private string OldorgFids = ""; |
| | | |
| | | public FrmMain() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | return; |
| | | } |
| | | foreach (XtraTabPage item in tabControl.TabPages) |
| | | { |
| | | if (item.Name == name) |
| | | { |
| | | //后来加上,为了释放窗体资源beg |
| | | //foreach (Control control in item.Controls) |
| | | //{ |
| | | // if (control is Form) |
| | | // { |
| | | // Form myForm = control as Form; |
| | | // myForm.Invoke((MethodInvoker)delegate { myForm.Dispose(); }); // 确保 UI 线程安全地释放资源 |
| | | // } |
| | | //} |
| | | //后来加上,为了释放窗体资源end |
| | | tabControl.TabPages.Remove(item); |
| | | item.Dispose(); |
| | | TabPageDic.Remove(name); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |