/// <summary> /// 根据函数名称实例化窗体 /// </summary> public void InstanceWorkForm() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } frmYZDY frmYzdy = null; switch (_functionName) { case "Fun_ts_zyhs_yzdy": frmYzdy = new frmYZDY(_chineseName); if (_mdiParent != null) { frmYzdy.MdiParent = _mdiParent; } frmYzdy.Show(); break; case "Fun_ts_zyhs_yzdy_xgjl": frmYzdy = new frmYZDY(_chineseName); if (_mdiParent != null) { frmYzdy.MdiParent = _mdiParent; } frmYzdy.xgjl = true; frmYzdy.Show(); break; default: throw new Exception("引出函数名称错误!"); } }
public object GetObject() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } frmYZDY frmYzdy = null; switch (_functionName) { case "Fun_ts_zyhs_yzdy_emr": if (_communicateValue != null) { frmYzdy = new frmYZDY(_chineseName, _communicateValue); } else { frmYzdy = new frmYZDY(_chineseName); } break; case "Fun_ts_zyhs_yzdy_xgjl": if (_communicateValue != null) { frmYzdy = new frmYZDY(_chineseName, _communicateValue); } else { frmYzdy = new frmYZDY(_chineseName); } frmYzdy.xgjl = true; break; default: throw new Exception("引出函数名称错误!"); } return(frmYzdy); }