Ejemplo n.º 1
0
        /// <summary>
        /// Gets the class name associated with <paramref name="size"/>.
        /// </summary>
        /// <param name="size">The <see cref="InputSizes"/>.</param>
        /// <returns>The associated CSS class name.</returns>
        public static string GetClassName(ButtonSizes size)
        {
            switch (size)
            {
            case ButtonSizes.Large:
                return(" btn-lg");

            case ButtonSizes.Small:
                return(" btn-sm");

            case ButtonSizes.Mini:
                return(" btn-xs");

            case ButtonSizes.Default:
            default:
                return(String.Empty);
            }
        }
        /// <summary>
        /// Merges the values of this group with another ResponsiveButtonGroupAttribute.
        /// </summary>
        /// <param name="other">The attribute to combine with.</param>
        protected override void CombineValuesWith(PropertyGroupAttribute other)
        {
            var otherAttr = other as ResponsiveButtonGroupAttribute;

            if (other == null)
            {
                return;
            }

            if (otherAttr.DefaultButtonSize != ButtonSizes.Medium)
            {
                this.DefaultButtonSize = otherAttr.DefaultButtonSize;
            }
            else if (this.DefaultButtonSize != ButtonSizes.Medium)
            {
                otherAttr.DefaultButtonSize = this.DefaultButtonSize;
            }

            this.UniformLayout = this.UniformLayout || otherAttr.UniformLayout;
        }
Ejemplo n.º 3
0
 public Button(string str, ButtonSizes size)
 {
 }
Ejemplo n.º 4
0
 public Button(ButtonSizes size)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Creates a button in the inspector with a custom name.
 /// </summary>
 /// <param name="name">Custom name for the button.</param>
 /// <param name="buttonSize">Size of the button.</param>
 public ButtonAttribute(string name, ButtonSizes buttonSize = ButtonSizes.Small)
 {
     this.Name         = name;
     this.ButtonHeight = (int)buttonSize;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a button in the inspector named after the method.
 /// </summary>
 /// <param name="buttonSize">The size of the button.</param>
 public ButtonAttribute(ButtonSizes buttonSize = ButtonSizes.Small)
 {
     this.Name         = null;
     this.ButtonHeight = (int)buttonSize;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Creates a button in the inspector named after the method.
 /// </summary>
 /// <param name="size">The size of the button.</param>
 public ButtonAttribute(ButtonSizes size)
 {
     this.Name         = null;
     this.ButtonHeight = (int)size;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Creates a button in the inspector with a custom name.
 /// </summary>
 /// <param name="name">Custom name for the button.</param>
 /// <param name="buttonSize">Size of the button.</param>
 /// <param name="parameterBtnStyle">Button style for methods with parameters.</param>
 public ButtonAttribute(string name, ButtonSizes buttonSize, ButtonStyle parameterBtnStyle)
 {
     this.Name         = name;
     this.ButtonHeight = (int)buttonSize;
     this.Style        = parameterBtnStyle;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a button in the inspector named after the method.
 /// </summary>
 /// <param name="size">The size of the button.</param>
 /// <param name="parameterBtnStyle">Button style for methods with parameters.</param>
 public ButtonAttribute(ButtonSizes size, ButtonStyle parameterBtnStyle)
 {
     this.ButtonHeight = (int)size;
     this.Name         = null;
     this.Style        = parameterBtnStyle;
 }
Ejemplo n.º 10
0
 public static T SizeEx <T>(this T btn, ButtonSizes size) where T : class, IBootstrapButon
 {
     btn.SetAttiValue("class", "ButtonSizes", size);
     return(btn);
 }
Ejemplo n.º 11
0
        public BootStrapButton Size(ButtonSizes size)
        {
            base.SetAttiValue("class", "ButtonSizes", size);

            return(this);
        }