public static IndirectLabourPrice GetInstance() { if (ilpform == null || ilpform.IsDisposed) { ilpform = new IndirectLabourPrice(); } return(ilpform); }
private void barButtonItem间接人工费率_ItemClick(object sender, ItemClickEventArgs e) { bool isopen = true; foreach (Form f in this.MdiChildren) { if (f.Name == "IndirectLabourPrice") { f.Visible = true; f.Activate(); f.WindowState = FormWindowState.Maximized; isopen = false; break; } } if (isopen) { IndirectLabourPrice Frm = IndirectLabourPrice.GetInstance(); Frm.MdiParent = this; Frm.WindowState = FormWindowState.Maximized; Frm.Show(); } }