public static RentExpense GetInstance() { if (reform == null || reform.IsDisposed) { reform = new RentExpense(); } return(reform); }
private void barButtonItem租赁费用_ItemClick(object sender, ItemClickEventArgs e) { bool isopen = true; foreach (Form f in this.MdiChildren) { if (f.Name == "RentExpense") { f.Visible = true; f.Activate(); f.WindowState = FormWindowState.Maximized; isopen = false; break; } } if (isopen) { RentExpense Frm = RentExpense.GetInstance(); Frm.MdiParent = this; Frm.WindowState = FormWindowState.Maximized; Frm.Show(); } }