Exemplo n.º 1
0
        public void RenderLargeButton(HtmlTextWriter output, Ribbon ribbon, string id, string header, string icon,
            string tooltip, string command, bool enabled, bool down, CommandContext context)
        {
            var buttonId = Control.GetUniqueID("script");
            var largeButton = new LargeButton
            {
                ID = buttonId,
                Header = header,
                Icon = icon,
                Down = down,
                Enabled = enabled,
                ToolTip = tooltip,
                Command = GetClick(command, context, buttonId),
            };

            largeButton.RenderControl(output);
        }
Exemplo n.º 2
0
        public void RenderLargeButton(HtmlTextWriter output, Ribbon ribbon, string id, string header, string icon,
                                      string tooltip, string command, bool enabled, bool down, CommandContext context)
        {
            var buttonId    = Control.GetUniqueID("script");
            var largeButton = new LargeButton
            {
                ID      = buttonId,
                Header  = header,
                Icon    = icon,
                Down    = down,
                Enabled = enabled,
                ToolTip = tooltip,
                Command = GetClick(command, context, buttonId),
            };

            largeButton.RenderControl(output);
        }
Exemplo n.º 3
0
        public void RenderButton(HtmlTextWriter output, ID buttonTemplateId, Ribbon ribbon, string id, string header, string icon,
                                 string tooltip, string command, bool enabled, CommandContext context, string menuPath)
        {
            var buttonId = Control.GetUniqueID("script");

            if (buttonTemplateId == Ribbon.LargeButton)
            {
                var button = new LargeButton
                {
                    ID      = buttonId,
                    Header  = header,
                    Icon    = icon,
                    Enabled = enabled,
                    ToolTip = tooltip,
                    Command = GetClick(command, context, buttonId),
                };
                button.RenderControl(output);
            }
            else if (buttonTemplateId == Ribbon.LargeMenuComboButton)
            {
                var button = new LargeMenuComboButton
                {
                    ID             = buttonId,
                    Header         = header,
                    Icon           = icon,
                    Enabled        = enabled,
                    ToolTip        = tooltip,
                    Command        = GetClick(command, context, buttonId),
                    CommandContext = context,
                    Menu           = menuPath
                };
                button.RenderControl(output);
            }
            else if (buttonTemplateId == Ribbon.SmallButton)
            {
                var button = new SmallButton
                {
                    ID      = buttonId,
                    Header  = header,
                    Icon    = icon,
                    Enabled = enabled,
                    ToolTip = tooltip,
                    Command = GetClick(command, context, buttonId),
                };
                ribbon.RenderSmallButton(output, button);
            }
            else if (buttonTemplateId == Ribbon.SmallMenuComboButton)
            {
                var button = new SmallMenuComboButton
                {
                    ID             = buttonId,
                    Header         = header,
                    Icon           = icon,
                    Enabled        = enabled,
                    ToolTip        = tooltip,
                    Command        = GetClick(command, context, buttonId),
                    CommandContext = context,
                    Menu           = menuPath
                };
                ribbon.RenderSmallButton(output, button);
            }
        }