public static MssParamInfo Create(MssParamType paramType, string paramName)
        {
            MssParamInfo paramInfo;

            switch (paramType)
            {
                case MssParamType.Number:
                    {
                        paramInfo = new MssNumberParamInfo();
                        paramInfo.Init(paramName);
                        break;
                    }
                case MssParamType.Waveform:
                    {
                        paramInfo = new MssWaveformParamInfo();
                        paramInfo.Init(paramName);
                        break;
                    }
                case MssParamType.Integer:
                    {
                        paramInfo = new MssIntegerParamInfo();
                        paramInfo.Init(paramName);
                        break;
                    }
                default:
                    {
                        paramInfo = null;
                        //Unknown parameter type
                        Debug.Assert(false);
                        break;
                    }
            }
            return paramInfo;
        }
        /// <summary>
        ///     Populates paramDict with default info about each parameter
        /// </summary>
        public void Init()
        {
            MssParamInfo defaultParameterInfo = new MssNumberParamInfo();
            defaultParameterInfo.Init("");

            MssParamInfo tempParameterInfo;

            //Populate paramDict with default values for each parameter
            tempParameterInfo = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "A";
            this.variableParamDict.Add(MssParameterID.VariableA, tempParameterInfo);

            tempParameterInfo = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "B";
            this.variableParamDict.Add(MssParameterID.VariableB, tempParameterInfo);

            tempParameterInfo = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "C";
            this.variableParamDict.Add(MssParameterID.VariableC, tempParameterInfo);

            tempParameterInfo = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "D";
            this.variableParamDict.Add(MssParameterID.VariableD, tempParameterInfo);

            tempParameterInfo = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "E";
            this.variableParamDict.Add(MssParameterID.VariableE, tempParameterInfo);
        }
示例#3
0
        /// <summary>
        ///     Populates paramDict with default info about each parameter
        /// </summary>
        public void Init()
        {
            MssParamInfo defaultParameterInfo = new MssNumberParamInfo();

            defaultParameterInfo.Init("");

            MssParamInfo tempParameterInfo;

            //Populate paramDict with default values for each parameter
            tempParameterInfo      = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "A";
            this.variableParamDict.Add(MssParameterID.VariableA, tempParameterInfo);

            tempParameterInfo      = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "B";
            this.variableParamDict.Add(MssParameterID.VariableB, tempParameterInfo);

            tempParameterInfo      = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "C";
            this.variableParamDict.Add(MssParameterID.VariableC, tempParameterInfo);

            tempParameterInfo      = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "D";
            this.variableParamDict.Add(MssParameterID.VariableD, tempParameterInfo);

            tempParameterInfo      = defaultParameterInfo.Clone();
            tempParameterInfo.Name = "E";
            this.variableParamDict.Add(MssParameterID.VariableE, tempParameterInfo);
        }
        public static MssParamInfo Create(MssParamType paramType, string paramName)
        {
            MssParamInfo paramInfo;

            switch (paramType)
            {
            case MssParamType.Number:
            {
                paramInfo = new MssNumberParamInfo();
                paramInfo.Init(paramName);
                break;
            }

            case MssParamType.Waveform:
            {
                paramInfo = new MssWaveformParamInfo();
                paramInfo.Init(paramName);
                break;
            }

            case MssParamType.Integer:
            {
                paramInfo = new MssIntegerParamInfo();
                paramInfo.Init(paramName);
                break;
            }

            default:
            {
                paramInfo = null;
                //Unknown parameter type
                Debug.Assert(false);
                break;
            }
            }
            return(paramInfo);
        }