Esempio n. 1
0
        public static void AppendGroupList(Widget control, params Union <string, Widget, HTMLElement>[] typos)
        {
            if (typos == null || typos.Length == 0)
            {
                return;
            }

            var length = typos.Length;
            var list   = new Union <string, Widget, HTMLElement> [length];

            for (int i = 0; i < length; i++)
            {
                if (typos[i] == null)
                {
                    list[i] = new FormGroup();
                    continue;
                }

                if (typos[i].Is <FormGroup>() || typos[i].Is <BootFormType>())
                {
                    list[i] = typos[i];
                }
                else
                {
                    list[i] = new FormGroup(typos[i]);
                }
            }
            Widget.AppendTypos(control, list);
        }
Esempio n. 2
0
 public Form(BootFormType formType = BootFormType.None, params Union <string, Widget, HTMLElement>[] typos) : base(new HTMLFormElement())
 {
     if (formType != BootFormType.None)
     {
         Content.ClassName = "form-" + formType.ToString("G").ToLower();
     }
     FormGroup.AppendGroupList(this, typos);
 }
Esempio n. 3
0
 public FormGroupList(params Union <string, Widget, HTMLElement>[] typos) : base()
 {
     FormGroup.AppendGroupList(this, typos);
 }