Exemplo n.º 1
0
        /// <summary>
        ///     Use this method to define which processor the current Option should be using.
        /// </summary>
        /// <param name="type">OptionType - the type of option the current object should be defined as.</param>
        public void SetProcessor(OptionTypes type)
        {
            switch (type)
            {
            case OptionTypes.CheckBoxes:
                Processor = new CheckBoxes();
                break;

            case OptionTypes.DropDownList:
                Processor = new DropDownList();
                break;

            case OptionTypes.FileUpload:
                Processor = new FileUpload();
                break;

            case OptionTypes.Html:
                Processor = new Html();
                break;

            case OptionTypes.RadioButtonList:
                Processor = new RadioButtonList();
                break;

            case OptionTypes.TextInput:
                Processor = new TextInput();
                break;
            }
        }
Exemplo n.º 2
0
 public Option()
 {
     Bvin         = string.Empty;
     StoreId      = 0;
     Name         = string.Empty;
     NameIsHidden = false;
     IsVariant    = false;
     IsShared     = false;
     Settings     = new OptionSettings();
     TextSettings = new OptionSettings();
     Items        = new List <OptionItem>();
     Processor    = new DropDownList();
 }