Пример #1
0
        public void AddButton(params RsToolbarButton[] buttons)
        {
            foreach (RsToolbarButton b in buttons)
            {
                ToolBarItem item = new ToolBarItem();

                if (b == RsToolbarButton.Separator)
                {
                    item.Type = ToolBarItemType.Separator;
                }
                else if (b == RsToolbarButton.DropDownMenu)
                {
                    ToolBarItemCollection coll   = base.ItemTemplates;
                    ToolBarItem           item11 = new ToolBarItem();
                    item11.Type = ToolBarItemType.Custom;
                    coll.Add(item11);

                    ToolBarItemCollection col2  = base.Items;
                    ToolBarItem           item1 = new ToolBarItem();
                    item1.Type = ToolBarItemType.Custom;
                    col2.Add(item1);
                }
                else
                {
                    item.Type        = ToolBarItemType.Button;
                    item.CommandName = b.ToString("d");
                    item.ImageUrl    = "~/Web/Img/Toolbar/" + b.ToString("d") + ".png";
                }


                base.Items.Add(item);
            }
        }
Пример #2
0
		public ToolBar()
		{
			this.CssClass = "toolbar";
			_items = new ToolBarItemCollection(this);
		}