コード例 #1
0
        public static void AppendGroupList(Control control, params Union <string, Control, HTMLElement>[] typos)
        {
            if (typos == null || typos.Length == 0)
            {
                return;
            }

            var length = typos.Length;
            var list   = new Union <string, Control, 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]);
                }
            }
            BootWidget.AppendTypos(control, list);
        }
コード例 #2
0
 public BootForm(BootFormType formType = BootFormType.None, params Union <string, Control, HTMLElement>[] typos) : base(new HTMLFormElement())
 {
     if (formType != BootFormType.None)
     {
         Content.ClassName = "form-" + formType.ToString("G").ToLower();
     }
     FormGroup.AppendGroupList(this, typos);
 }
コード例 #3
0
 public FormGroupList(params Union <string, Control, HTMLElement>[] typos) : base()
 {
     FormGroup.AppendGroupList(this, typos);
 }