///// <summary> ///// 返回一个FORM对象 ///// </summary> ///// <returns></returns> public object GetObject() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } Form frm = new Form(); FrmFZYY_ZDWH FrmFZYY_ZDWH = null; switch (_functionName) { case "Fun_ts_fzyy_zd": FrmFZYY_ZDWH = new FrmFZYY_ZDWH(); if (_mdiParent != null) { FrmFZYY_ZDWH.MdiParent = _mdiParent; } frm = FrmFZYY_ZDWH; break; case "Fun_ts_jc_fzyyzd_ys": FrmFZYY_ZDWH frmFzYyZd_ys = new FrmFZYY_ZDWH(""); if (_mdiParent != null) { FrmFZYY_ZDWH.MdiParent = _mdiParent; } frm = FrmFZYY_ZDWH; break; } return(frm); }
/// <summary> /// 根据函数名称实例化窗体 /// </summary> public void InstanceWorkForm() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } FrmFZYY_ZDWH FrmFZYY_ZDWH = null; switch (_functionName) { case "Fun_ts_fzyy_zd": FrmFZYY_ZDWH = new FrmFZYY_ZDWH(); if (_mdiParent != null) { FrmFZYY_ZDWH.MdiParent = _mdiParent; } FrmFZYY_ZDWH.BringToFront(); FrmFZYY_ZDWH.Show(); FrmFZYY_ZDWH.WindowState = FormWindowState.Maximized; break; case "Fun_ts_jc_fzyyzd_ys": FrmFZYY_ZDWH = new FrmFZYY_ZDWH(""); if (_mdiParent != null) { FrmFZYY_ZDWH.MdiParent = _mdiParent; } FrmFZYY_ZDWH.Show(); FrmFZYY_ZDWH.WindowState = FormWindowState.Maximized; break; default: throw new Exception("引出函数名错误!"); } }