private void tsmiInnerbox_Click(object sender, EventArgs e) { FrmInnerboxOld frm = FrmInnerboxOld.GetSingleton(); frm.MdiParent = this; frm.Show(); frm.Activate(); }
/// <summary> /// 单例模式,返回单个窗体对象 /// </summary> /// <returns></returns> public static FrmInnerboxOld GetSingleton() { //if(frm==null || frm.IsDisposed) if (frm == null) { frm = new FrmInnerboxOld(); } return(frm); }