Exemplo n.º 1
0
        public AwesomeIcon5 AddLayer(AwesomeIcon5 newValue)
        {
            var that = NonStatic(this);

            that.Context.Layers.Add(newValue);
            return(that);
        }
Exemplo n.º 2
0
        public AwesomeIcon5 Mask(AwesomeIcon5 newValue)
        {
            if (Context.Mask == newValue)
            {
                return(this);
            }

            var that = NonStatic(this);

            that.Context.Mask = newValue;
            return(that);
        }
Exemplo n.º 3
0
        protected override string WrapTag(TagBuilder tag)
        {
            var    value       = AwesomeIcon5.FromString(Context.Value ?? "fas fa-times").FixedWidth().Grow(8);
            string id          = Context.Id;
            string buttonStyle = "btn-" + (Context.Style == ButtonStyle.Information ? "info" : Context.Style.ToString().ToLowerInvariant());

            var group = new TagBuilder("div");

            if (Context.Append.Count + Context.Prepend.Count > 0)
            {
                group.AddCssClass("input-group-btn");
            }
            else
            {
                group.AddCssClass("btn-group");
            }

            group.InnerHtml =
                "<button id='" + id + "_Button' type='button' class='btn " + buttonStyle + " btn-icon5picker dropdown-toggle' data-toggle='dropdown'>"
                + "<span id='" + id + "_Icon'"
                + (Context.Value == null ? "class='fa-none'" : "")
                + ">" + value + "</span>"
                + "&nbsp;&nbsp;<span class='caret'></span>"
                + "</button>"
                + "<div id='" + id + "_Popup' class='icon5picker-popup'>"
                + "<div class='icon5picker-popup-header form-inline'>"
                + "<label>Search: </label><input type='text' class='form-control' />"
                + "</div>"
                + "<div class='icon5picker-popup-results'></div>"
                + "</div>"
                + "<span id='" + Context.Id + "_IconName'>"
                + GeneratePlaceholder()
                + "</span>";

            return(tag + base.WrapTag(group));
        }
Exemplo n.º 4
0
 private AwesomeIcon5 NonStatic(AwesomeIcon5 original)
 {
     return(original._isStatic ? new AwesomeIcon5(original) : original);
 }
Exemplo n.º 5
0
 private AwesomeIcon5(AwesomeIcon5 original)
     : this(original.Context.Name, original.Context.ClassName, original.Context.Keywords)
 {
     _isStatic = false;
 }