public static void AppendItemList(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 ListItem(); continue; } if (typos[i].Is <ListItem>()) { list[i] = typos[i]; } else { list[i] = new ListItem(typos[i]); } } BootWidget.AppendTypos(control, list); }
public ParagraphList(params Union <string, Control, HTMLElement>[] typos) : base(new HTMLDivElement()) { 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 Paragraph(); continue; } if (typos[i].Is <Paragraph>()) { list[i] = typos[i]; } else { list[i] = new Paragraph(typos[i]); } } BootWidget.AppendTypos(this, list); }
public static void AppendDataRow(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 TableCell(); continue; } if (typos[i].Is <TableCell>()) { list[i] = typos[i]; } else if (typos[i].Is <TableHeader>()) { var x = ((TableHeader)typos[i]); list[i] = x; x.Content.SetAttribute("scope", "row"); } else { list[i] = new TableCell(typos[i]); } } BootWidget.AppendTypos(control, list); }