コード例 #1
0
ファイル: UCAgent.cs プロジェクト: funtomi/MyNewCode
        public UserControlPLM GetFuncUC(string str_name)
        {
            if (!this.ht_ucinfolst.Contains(str_name))
            {
                return(null);
            }
            DEUCInfo info = (DEUCInfo)this.ht_ucinfolst[str_name];

            return((UserControlPLM)Activator.CreateInstance(Assembly.LoadFrom(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\" + info.PLM_FrmDLLName).GetType(info.PLM_FrmClsName)));
        }
コード例 #2
0
ファイル: UCAgent.cs プロジェクト: funtomi/MyNewCode
        public string GetFunctionLabel(string str_name)
        {
            string str = "";

            if (!this.ht_ucinfolst.Contains(str_name))
            {
                return(str);
            }
            DEUCInfo info = (DEUCInfo)this.ht_ucinfolst[str_name];

            return(info.PLM_LABEL);
        }
コード例 #3
0
ファイル: UCAgent.cs プロジェクト: funtomi/MyNewCode
        private void InitParam()
        {
            this.al_clsnamelst.Clear();
            this.al_relnamelst.Clear();
            this.al_attrnamelst.Clear();
            this.al_clsnamelst.Add("HasFile");
            this.al_clsnamelst.Add("HasRelObject");
            this.al_clsnamelst.Add("HasParentRelObject");
            this.al_attrnamelst.Add("AttrUser2Org");
            DEUCInfo info = new DEUCInfo {
                PLM_ID         = 1,
                PLM_NAME       = "UCHasFile",
                PLM_LABEL      = "对象是否存在文件",
                PLM_FuncName   = "HasFile",
                PLM_FrmClsName = "Thyt.TiPLM.UIL.Common.UserControl.UCHasFile",
                PLM_FrmDLLName = "Thyt.TiPLM.UIL.Common.UserControl.dll",
                PLM_TYPE       = 1
            };

            if (!this.ht_ucinfolst.ContainsKey("HasFile"))
            {
                this.ht_ucinfolst.Add("HasFile", info);
            }
            DEUCInfo info2 = new DEUCInfo {
                PLM_ID         = 2,
                PLM_NAME       = "UCHasRelObject",
                PLM_LABEL      = "是否存在关联对象",
                PLM_FuncName   = "HasRelObject",
                PLM_FrmClsName = "Thyt.TiPLM.UIL.Common.UserControl.UCHasRelObject",
                PLM_FrmDLLName = "Thyt.TiPLM.UIL.Common.UserControl.dll",
                PLM_TYPE       = 1
            };

            if (!this.ht_ucinfolst.ContainsKey("HasRelObject"))
            {
                this.ht_ucinfolst.Add("HasRelObject", info2);
            }
            DEUCInfo info3 = new DEUCInfo {
                PLM_ID         = 3,
                PLM_NAME       = "UCHasLinkedObject",
                PLM_LABEL      = "是否存在被关联对象",
                PLM_FuncName   = "SearchInProject",
                PLM_FrmClsName = "Thyt.TiPLM.UIL.Common.UserControl.UCHasLinkedObject",
                PLM_FrmDLLName = "Thyt.TiPLM.UIL.Common.UserControl.dll",
                PLM_TYPE       = 1
            };

            if (!this.ht_ucinfolst.ContainsKey("HasParentRelObject"))
            {
                this.ht_ucinfolst.Add("HasParentRelObject", info3);
            }
            DEUCInfo info4 = new DEUCInfo {
                PLM_ID         = 4,
                PLM_NAME       = "UCAttrUser2Org",
                PLM_LABEL      = "和登录用户组织的隶属关系",
                PLM_FuncName   = "AttrUser2Org",
                PLM_FrmClsName = "Thyt.TiPLM.UIL.Common.UserControl.UCAttrUser2Org",
                PLM_FrmDLLName = "Thyt.TiPLM.UIL.Common.UserControl.dll",
                PLM_TYPE       = 3
            };

            if (!this.ht_ucinfolst.ContainsKey("AttrUser2Org"))
            {
                this.ht_ucinfolst.Add("AttrUser2Org", info4);
            }
        }