Exemple #1
0
 private void recurseSelection(ComponentArt.Web.UI.Menu menu)
 {
     for (int x = 0; x < menu.Items.Count; x++)
     {
         recurseSelection(menu.Items[x]);
     }
 }
Exemple #2
0
        protected override void CreateChildControls()
        {
            if (MenuCacheControl.MenuExists(this._catalogID, this._linkFormat))
            {
                _cached = true;
            }
            else
            {
                _menu = new ComponentArt.Web.UI.Menu();

                _menu.ID                      = this.ID + "_menu";
                _menu.CssClass                = "TopGroup";
                _menu.EnableViewState         = false;
                _menu.Orientation             = GroupOrientation.Vertical;
                _menu.DefaultGroupCssClass    = "MenuGroup";
                _menu.DefaultGroupItemSpacing = 1;
                _menu.ImagesBaseUrl           = "~/";
                _menu.EnableViewState         = false;
                _menu.Width                   = _width;
//				_menu.ClientScriptLocation = "~/componentart_webui_client";

                // Create default Item Look
                ItemLook itmLook = new ItemLook();
                itmLook.LookId             = "MenuItem";
                itmLook.CssClass           = "MenuItem";
                itmLook.HoverCssClass      = "MenuItemHover";
                itmLook.ActiveCssClass     = "MenuItemDown";
                itmLook.ExpandedCssClass   = "MenuItemDown";
                itmLook.LabelPaddingLeft   = Unit.Pixel(5);
                itmLook.LabelPaddingRight  = Unit.Pixel(15);
                itmLook.LabelPaddingTop    = Unit.Pixel(2);
                itmLook.LabelPaddingBottom = Unit.Pixel(2);

                _menu.ItemLooks.Add(itmLook);

                _menu.DefaultItemLookId = "MenuItem";

                Controls.Add(_menu);
            }

            ChildControlsCreated = true;
        }
Exemple #3
0
        private void GenerateMenu(ComponentArt.Web.UI.Menu menu)
        {
            ComponentArt.Web.UI.MenuItem subItem;

            subItem                     = new ComponentArt.Web.UI.MenuItem();
            subItem.LookId              = "TopItemLook";
            subItem.NavigateUrl         = "../Documents/DocumentEdit.aspx?ProjectID=" + ProjectID;
            subItem.Text                = LocRM.GetString("tDocumentAdd");
            subItem.Look.LeftIconUrl    = ResolveUrl("~/Layouts/Images/icons/document_create.gif");
            subItem.Look.LeftIconHeight = Unit.Pixel(16);
            subItem.Look.LeftIconWidth  = Unit.Pixel(16);
            menu.Items.Add(subItem);

            ComponentArt.Web.UI.MenuItem topMenuItem = new ComponentArt.Web.UI.MenuItem();
            topMenuItem.Text                = LocRM2.GetString("Export");
            topMenuItem.Look.LeftIconUrl    = ResolveUrl("~/Layouts/Images/downbtn1.gif");
            topMenuItem.Look.LeftIconHeight = Unit.Pixel(5);
            topMenuItem.Look.LeftIconWidth  = Unit.Pixel(16);
            topMenuItem.LookId              = "TopItemLook";

            subItem = new ComponentArt.Web.UI.MenuItem();
            subItem.Look.LeftIconUrl    = "~/Layouts/Images/icons/xlsexport.gif";
            subItem.Look.LeftIconWidth  = Unit.Pixel(16);
            subItem.Look.LeftIconHeight = Unit.Pixel(16);
            subItem.NavigateUrl         = "../Documents/default.aspx?Export=1&ProjectID=" + ProjectID;
            subItem.Text = LocRM.GetString("Export");
            topMenuItem.Items.Add(subItem);

            subItem = new ComponentArt.Web.UI.MenuItem();
            subItem.Look.LeftIconUrl    = "~/Layouts/Images/icons/xmlexport.gif";
            subItem.Look.LeftIconWidth  = Unit.Pixel(16);
            subItem.Look.LeftIconHeight = Unit.Pixel(16);
            subItem.NavigateUrl         = "../Documents/default.aspx?Export=2&ProjectID=" + ProjectID;
            subItem.Text = LocRM.GetString("XMLExport");
            topMenuItem.Items.Add(subItem);

            menu.Items.Add(topMenuItem);
        }
Exemple #4
0
 public MenuBinder(string connectionString, int catalogId, ComponentArt.Web.UI.Menu menu)
     : this()
 {
     OpenCatalog(catalogId);
     __menu = menu;
 }
Exemple #5
0
 public MenuBinder(DbContentCatalog rootCatalog, ComponentArt.Web.UI.Menu menu) : this()
 {
     __rootCatalog = rootCatalog;
     __menu        = menu;
 }