Exemplo n.º 1
0
        public void AddButton(WebButtonType type, string Command = "", string ImageURL = "", string Style = "", string ToolTip = "")
        {
            WebButton b = new WebButton();

            b.Type = type;

            if (ImageURL != "")
            {
                b.ImageURL = ImageURL;
            }
            else
            {
                b.ImageURL = Page.ClientScript.GetWebResourceUrl(this.GetType(), _images[(int)type]);
            }

            if (Command != "")
            {
                b.Command = Command;
            }
            else
            {
                b.Command = _commands[(int)type];
            }

            if (Style != "")
            {
                b.Style = Style;
            }
            else
            {
                b.Style = _styles[(int)type];
            }

            if (ToolTip != "")
            {
                b.ToolTip = ToolTip;
            }
            else
            {
                b.ToolTip = _tooltips[(int)type];
            }

            List <WebButton> btns = Buttons;

            btns.Add(b);
            Buttons = btns;
        }
Exemplo n.º 2
0
        public void AddButton(WebButtonType type, string command = "", string imageUrl = "", string style = "", string toolTip = "")
        {
            WebButton b = new WebButton();

            b.Type = type;

            if (imageUrl != "")
            {
                b.ImageURL = imageUrl;
            }
            else
            {
                b.ImageURL = Page.ClientScript.GetWebResourceUrl(this.GetType(), _images[(int)type]);
            }

            if (command != "")
            {
                b.Command = command;
            }
            else
            {
                b.Command = _commands[(int)type];
            }

            if (style != "")
            {
                b.Style = style;
            }
            else
            {
                b.Style = _styles[(int)type];
            }

            if (toolTip != "")
            {
                b.ToolTip = toolTip;
            }
            else
            {
                b.ToolTip = _tooltips[(int)type];
            }

            List <WebButton> btns = Buttons;

            btns.Add(b);
            Buttons = btns;
        }
Exemplo n.º 3
0
        public void AddButton(WebButtonType type, string Command = "", string imageURL = "", string style = "")
        {
            WebButton b = new WebButton();

            b.Type = type;


            if (imageURL != "")
            {
                b.ImageURL = imageURL;
            }
            else
            {
                b.ImageURL = Page.ClientScript.GetWebResourceUrl(this.GetType(), _images[(int)type]);
            }

            if (Command != "")
            {
                b.Command = Command;
            }
            else
            {
                b.Command = _commands[(int)type];
            }

            if (style != "")
            {
                b.style = style;
            }
            else
            {
                b.style = _stiles[(int)type];
            }


            List <WebButton> btns = Buttons;

            btns.Add(b);
            Buttons = btns;
        }
Exemplo n.º 4
0
        public void AddButton(WebButtonType type, string Command = "", string ImageURL = "",  string Style="", string ToolTip="" )
        {
            WebButton b = new WebButton();
            b.Type = type;
            
            if (ImageURL != "")
            {
                b.ImageURL = ImageURL;
            }
            else
            {
                b.ImageURL = Page.ClientScript.GetWebResourceUrl(this.GetType(), _images[(int)type]);
            }

            if (Command != "")
            {
                b.Command = Command;
            }
            else
            {
                b.Command = _commands[(int)type];
            }

            if (Style != "")
            {
                b.Style = Style;
            }
            else
            {
                b.Style = _styles[(int)type];
            }

            if (ToolTip != "")
            {
                b.ToolTip = ToolTip;
            }
            else
            {
                b.ToolTip = _tooltips[(int)type];
            }

            List<WebButton> btns = Buttons;
            btns.Add(b);
            Buttons = btns;
              
        }
Exemplo n.º 5
0
        public void AddButton(WebButtonType type, string Command = "", string imageURL = "",  string style="" )
        {
            WebButton b = new WebButton();

            b.Type = type;

            
            if (imageURL != "")
            {
                b.ImageURL = imageURL;
            }
            else
            {
                b.ImageURL = Page.ClientScript.GetWebResourceUrl(this.GetType(), _images[(int)type]);
            }

            if (Command != "")
            {
                b.Command = Command;
            }
            else
            {
                b.Command = _commands[(int)type];
            }

            if (style != "")
            {
                b.style = style;
            }
            else
            {
                b.style =  _stiles[(int)type];
            }


            List<WebButton> btns = Buttons;
            btns.Add(b);
            Buttons = btns;
              
        }