Ejemplo n.º 1
0
        /// <summary>
        /// 以操作信息初始化
        /// </summary>
        /// <param name="OperationInfo"></param>
        public void SetOperationInfo(OperationInfo OperationInfo)
        {
            if (Entity != null && Entity.Equals(OperationInfo))
            {
                return;
            }
            if (OperationInfo != null)
            {
                //第二后缀,标识参数类型,这样设计免得还要建立一个操作与参数类型的关联 //czs, 2015.10.22
                this.ParamTypeName = OperationInfo.ParamTypeName;
                if(! this.ParamNameManager.Contains(this.ParamTypeName)  ){
                    MessageBox.Show("参数未注册或未授权!" + this.ParamTypeName);
                    return ;
                }
                var paramName = ParamNameManager[ParamTypeName];
                var paramObj = Activator.CreateInstance(paramName.AssemblyName, paramName.FullName);
                var ParamType = paramObj.Unwrap().GetType();

                //初始化表格
              // InitTable(this.OperationManager.Get(OperationInfo.OperationName).ParamType);
                InitTable(ParamType);
                Parameters = OperationParamManager.GetParams(OperationInfo);
            }
            this.Entity = OperationInfo;
            ObjToUi();
        }
Ejemplo n.º 2
0
        public ParamEditControl()
        {
            InitializeComponent();
            this.IsChangeSaved = true;

            ParamIoerManager = ParamIoerManager.Default;
            OperationManager = GnsserOperationManager.Default;
            ParamNameManager = ParamNameManager.Default;

            OperationParamManager = new OperationParamManager(); 
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 以操作信息初始化
 /// </summary>
 /// <param name="OperationInfo"></param>
 public void SetOperationInfo2(OperationInfo OperationInfo)
 {
     if (Entity != null && Entity.Equals(OperationInfo))
     {
         return;
     }
     if (OperationInfo != null)
     {
         //第二后缀,标识参数类型,这样设计免得还要建立一个操作与参数类型的关联 //czs, 2015.10.22
         this.ParamTypeName = OperationInfo.ParamTypeName;
         //初始化表格
         InitTable(this.OperationManager.Get(OperationInfo.OperationName).ParamType);
         Parameters = OperationParamManager.GetParams(OperationInfo);
     }
     this.Entity = OperationInfo;
     ObjToUi();
 }
Ejemplo n.º 4
0
 public void SaveChanges()
 {
     OperationParamManager.SaveChanges();
     this.IsChangeSaved = true;
 }