Ejemplo n.º 1
0
 public ToggleButtonGroup(StylingColor activeButtonStylingColor, StylingColor inactiveButtonStylingColor)
 {
     ClassName = "btn-group";
     SetAttribute("role", "group");
     _activeButtonClassName   = "btn-" + Enum.GetName(typeof(StylingColor), activeButtonStylingColor).ToLower();
     _inActiveButtonClassName = "btn-" + Enum.GetName(typeof(StylingColor), inactiveButtonStylingColor).ToLower();
 }
Ejemplo n.º 2
0
 public CellColoring(TableHeadEntry tableHeadEntry, string textValue, StylingColor color, int tableHeadIndex)
 {
     TableHeadEntry = tableHeadEntry;
     TextValue      = textValue;
     Color          = color;
     TableHeadIndex = tableHeadIndex;
 }
Ejemplo n.º 3
0
            public TableDataEntry(string value, int colspan = 1, StylingColor color = StylingColor.Light) : base("td")
            {
                if (value != "")
                {
                    Text = value;
                }
                if (colspan != 1)
                {
                    SetAttribute("colspan", colspan);
                }

                if (color != StylingColor.Light)
                {
                    ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower();
                }
            }
Ejemplo n.º 4
0
        public Button(StylingColor buttonType = StylingColor.Primary, bool asOutline = false, ButtonSize size = ButtonSize.Normal, bool asBlock = false, string text = "", int widthInPx = -1, string fontAwesomeIcon = "") : base("button")
        {
            SetAttribute("type", "button");
            ClassName  = $"btn btn-{(asOutline == true ? "outline-" : "")}{Enum.GetName(typeof(StylingColor), buttonType).ToLower()}";
            ClassName += (size == ButtonSize.Large ? " btn-lg" : size == ButtonSize.Small ? " btn-sm" : "");
            ClassName += (asBlock == true ? " btn-block" : "");
            if (string.IsNullOrWhiteSpace(text) == false)
            {
                Text = text;
            }

            if (widthInPx > 0)
            {
                Style.Width = widthInPx;
            }
            SetFontAwesomeIcon(fontAwesomeIcon);
        }
Ejemplo n.º 5
0
            public TableDataEntry(Button content, int colspan = 1, StylingColor color = StylingColor.Light) : base("td")
            {
                if (content != null)
                {
                    AppendChild(content);
                }
                if (colspan != 1)
                {
                    SetAttribute("colspan", colspan);
                }

                if (color != StylingColor.Light)
                {
                    ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower();
                }

                AddStyling(StylingOption.PaddingTop, 1);
                AddStyling(StylingOption.PaddingBottom, 1);
                AddStyling(StylingOption.PaddingLeft, 1);
                AddStyling(StylingOption.PaddingRight, 1);
            }
Ejemplo n.º 6
0
            public TableHeadEntry(string scope, string value, CaretStyle caretStyle = CaretStyle.None, StylingColor color = StylingColor.Light) : base("th")
            {
                CurrentCaretStyle = caretStyle;
                if (scope != "")
                {
                    SetAttribute("scope", scope);
                }
                if (value != "")
                {
                    Text = value;
                }

                if (caretStyle != CaretStyle.None)
                {
                    switch (caretStyle)
                    {
                    case CaretStyle.Up:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort-up float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    case CaretStyle.Down:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort-down float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    case CaretStyle.UpDown:
                        AppendChild(new MyIElement()
                        {
                            ClassName = "fas fa-sort float-right", Style = { LineHeight = 1.5 }
                        });
                        break;

                    default:
                        throw new ArgumentOutOfRangeException(nameof(caretStyle), caretStyle, null);
                    }
                }
                if (color != StylingColor.Light)
                {
                    ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower();
                }
            }