public static DeptStandardPoint GetInstance() { if (weform == null || weform.IsDisposed) { weform = new DeptStandardPoint(); } return(weform); }
private void barButtonItem部门标准单点成本_ItemClick(object sender, ItemClickEventArgs e) { bool isopen = true; foreach (Form f in this.MdiChildren) { if (f.Name == "DeptStandardPoint") { f.Visible = true; f.Activate(); f.WindowState = FormWindowState.Maximized; isopen = false; break; } } if (isopen) { DeptStandardPoint Frm = DeptStandardPoint.GetInstance(); Frm.MdiParent = this; Frm.WindowState = FormWindowState.Maximized; Frm.Show(); } }