Beispiel #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;
              
        }
Beispiel #2
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;
              
        }