internal void SetUpItem(ModelParamItem MPI)
        {
            ThisParamItem = MPI;
            Name          = ThisParamItem.Fieldname;
            Text          = ThisParamItem.Label;
            ToolTipText   = ThisParamItem.Description;
            switch (ThisParamItem.ParameterType)
            {
            case modelParamtype.mptOutputProvider:
                ImageIndex = SelectedImageIndex = 3;
                break;

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

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

            case modelParamtype.mptInputBase:
                ImageIndex = SelectedImageIndex = 0;
                break;

            default:
                break;
            }
        }
 //----------------------------------------------------------------
 internal void BuildParmList()
 {
     if (FParamManager != null)
     {
         foreach (ModelParameterClass MP in FParamManager.AllModelParameters())
         {
             ModelParamItem MPI = new ModelParamItem(MP);
             FParamItems.Add(MPI);
         }
     }
 }
        //------------------------------------------------------------

        public ParmTreeNode(int ParmCode, ParameterManagerClass aPM)
        {
            FPM = aPM;
            try
            {
                ModelParameterClass MP = aPM.Model_Parameter(ParmCode);
                ThisParamItem = new ModelParamItem(MP);
                SetUpItem(ThisParamItem);
            }
            catch
            {
                ModelParamItem temp = new ModelParamItem();
                temp.SetUndefined(ParmCode);
                ThisParamItem = temp;
                Name          = ThisParamItem.Fieldname;
                Text          = ThisParamItem.Label;
                ImageIndex    = SelectedImageIndex = 6;
            }
        }
 public ParmTreeNode(ModelParamItem MPI, ParameterManagerClass aPM)
 {
     FPM           = aPM;
     ThisParamItem = MPI;
     SetUpItem(MPI);
 }