/// <summary> /// 关闭弹出功能 /// </summary> /// <param name="winName"></param> private void closeWindow(string winName) { BasisComponent _basFunc; ExtendFunction _extfunc; if (Enum.TryParse(winName, out _extfunc)) { //调用扩展功能 SessionExtend.CloseFunction(); } else if (Enum.TryParse(winName, out _basFunc)) { //调用基础功能扩展组件 BasicComponent.CloseFunction(); } else { if (tool != null) { if (tool.IsDisposed) { tool.Close(); } } } }
/// <summary> /// 打开扩展功能 /// </summary> /// <param name="winName">扩展功能控件名</param> /// <param name="winLabel">标签名称</param> /// <param name="paramList">参数</param> /// <returns></returns> private bool openWindow(string winName, string winLabel, string userID, params object[] paramlist) { bool rtn = false; BasisComponent _basFunc; ExtendFunction _extfunc; if (Enum.TryParse(winName, out _extfunc)) { //调用扩展功能 rtn = SessionExtend.ShowFunction(userID, _extfunc); } else if (Enum.TryParse(winName, out _basFunc)) { //调用基础功能扩展组件 rtn = BasicComponent.ShowFunction(userID, _basFunc); } else { try { switch (winName) { case "Setup": tool = new FormBase(userID, winName, "系统设置"); break; case "Tools": tool = new FormBase(userID, winName, "常用工具包"); break; } tool.Show(); rtn = true; } catch { rtn = false; } } return(rtn); }