Пример #1
0
 internal void BuildParmList()
 {
     if (FParamManager != null)
     {
         foreach (ModelParameterClass MP in FParamManager.AllModelParameters())
         {
             ModelParamItem MPI = new ModelParamItem(MP);
             FParamItems.Add(MPI);
         }
     }
 }
Пример #2
0
        public ParmTreeNode(int ParmCode, ParameterManagerClass aPM)
        {
            FPM = aPM;
            try
            {
                ModelParameterClass MP = aPM.Model_Parameter(ParmCode);
                ThisParamItem = new ModelParamItem(MP);
                Name          = ThisParamItem.Fieldname;
                Text          = ThisParamItem.Label;
                ToolTipText   = ThisParamItem.Description;
                switch (ThisParamItem.ParameterType)
                {
                case modelParamtype.mptInputBase:
                    ImageIndex         = 0;
                    SelectedImageIndex = 0;
                    break;

                case modelParamtype.mptInputProvider:
                    ImageIndex         = 1;
                    SelectedImageIndex = 1;
                    break;

                case modelParamtype.mptOutputBase:
                    ImageIndex         = 2;
                    SelectedImageIndex = 2;
                    break;

                case modelParamtype.mptOutputProvider:
                    ImageIndex         = 3;
                    SelectedImageIndex = 3;
                    break;

                default:
                    ImageIndex         = 4;
                    SelectedImageIndex = 4;
                    break;
                }
            }
            catch
            {
                ModelParamItem temp = new ModelParamItem();
                temp.SetUndefined(ParmCode);
                ThisParamItem = temp;
                Name          = ThisParamItem.Fieldname;
                Text          = ThisParamItem.Label;
                ImageIndex    = SelectedImageIndex = 6;
            }
        }