Example #1
0
        public ListOption LoadListOption(int optionIndex, int itemIndex)
        {
            var lo = new ListOption();

            lo.Name        = GetOptionListItemName(optionIndex, itemIndex);
            lo.Description = GetOptionListItemDesc(optionIndex, itemIndex);
            lo.Key         = GetOptionListItemKey(optionIndex, itemIndex);
            return(lo);
        }
Example #2
0
            public Option(int idx)
            {
                Name        = GetOptionName(idx);
                Key         = GetOptionKey(idx);
                Description = GetOptionDesc(idx);
                OptionType  = (Type)GetOptionType(idx);
                strMaxLen   = GetOptionStringMaxLen(idx);
                min         = GetOptionNumberMin(idx);
                max         = GetOptionNumberMax(idx);
                step        = GetOptionNumberStep(idx);
                int listCount = GetOptionListCount(idx);

                for (int i = 0; i < listCount; i++)
                {
                    ListOption optl = new ListOption(idx, i);
                    ListOptions.Add(optl);
                }
                switch (OptionType)
                {
                case Type.Bool:
                    Default = GetOptionBoolDef(idx).ToString();
                    break;

                case Type.Number:
                    Default = GetOptionNumberDef(idx).ToString();
                    break;

                case Type.String:
                    Default = GetOptionStringDef(idx);
                    break;

                case Type.List:
                    Default = GetOptionListDef(idx);
                    break;
                }
            }
Example #3
0
			public Option(int idx)
			{
				Name = GetOptionName(idx);
				Key = GetOptionKey(idx);
				Description = GetOptionDesc(idx);
				OptionType = (Type) GetOptionType(idx);
				strMaxLen = GetOptionStringMaxLen(idx);
				min = GetOptionNumberMin(idx);
				max = GetOptionNumberMax(idx);
				step = GetOptionNumberStep(idx);
				int listCount = GetOptionListCount(idx);
				for (int i = 0; i < listCount; i++) {
					var optl = new ListOption(idx, i);
					ListOptions.Add(optl);
				}
				switch (OptionType) {
					case Type.Bool:
						Default = GetOptionBoolDef(idx).ToString();
						break;
					case Type.Number:
						Default = GetOptionNumberDef(idx).ToString();
						break;
					case Type.String:
						Default = GetOptionStringDef(idx);
						break;
					case Type.List:
						Default = GetOptionListDef(idx);
						break;
				}
			}
Example #4
0
		public ListOption LoadListOption(int optionIndex, int itemIndex)
		{
			var lo = new ListOption();
			lo.Name = GetOptionListItemName(optionIndex, itemIndex);
			lo.Description = GetOptionListItemDesc(optionIndex, itemIndex);
			lo.Key = GetOptionListItemKey(optionIndex, itemIndex);
			return lo;
		}