public IViewComponentResult Invoke(
        ILocalizableString text,
        string name,
        string icon,
        string id,
        ILocalizableString busyText,
        FontIconType iconType,
        AbpButtonType type,
        AbpButtonSize size,
        bool disabled)
    {
        Check.NotNull(text, nameof(text));

        return(View(
                   "~/Pages/Shared/Components/AbpPageToolbar/Button/Default.cshtml",
                   new AbpPageToolbarButtonViewModel(
                       text.Localize(StringLocalizerFactory),
                       name,
                       icon,
                       id,
                       busyText?.Localize(StringLocalizerFactory),
                       iconType,
                       type,
                       size,
                       disabled
                       )
                   ));
    }
 public AbpPageToolbarButtonViewModel(
     string text,
     string name,
     string icon,
     string id,
     string busyText,
     FontIconType iconType,
     AbpButtonType type,
     AbpButtonSize size,
     bool disabled)
 {
     Text     = text;
     Name     = name;
     Icon     = icon;
     Id       = id;
     BusyText = busyText;
     IconType = iconType;
     Type     = type;
     Size     = size;
     Disabled = disabled;
 }
        public static PageToolbar AddButton(
            this PageToolbar toolbar,
            ILocalizableString text,
            string icon = null,
            string name = null,
            string id   = null,
            ILocalizableString busyText = null,
            FontIconType iconType       = FontIconType.FontAwesome,
            AbpButtonType type          = AbpButtonType.Primary,
            AbpButtonSize size          = AbpButtonSize.Small,
            bool disabled             = false,
            int order                 = 0,
            string requiredPolicyName = null)
        {
            if (busyText == null)
            {
                busyText = new LocalizableString(typeof(AbpUiResource), "ProcessingWithThreeDot");
            }

            toolbar.AddComponent <AbpPageToolbarButtonViewComponent>(
                new
            {
                text,
                icon,
                name,
                id,
                busyText,
                iconType,
                type,
                size,
                disabled
            },
                order,
                requiredPolicyName
                );

            return(toolbar);
        }