/// <summary> /// Agregar Item /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddNavItem_Click(object sender, EventArgs e) { if (uC_NavMenu1.ActiveGroup == null) { return; } //Si se agrega a un arbol es un TreeNodeButton if (((BarGroup)uC_NavMenu1.ActiveGroup.Tag).ContainTree) { TreeNodeButton newTreeNodeButton = new TreeNodeButton(); //Asigno el padre del nodo if (_CurrentButtonBase != null) { newTreeNodeButton.ParentID = _CurrentButtonBase.Id; } //determino que el actual nodo es el q acabo de crear _CurrentButtonBase = (Fwk.UI.Controls.Menu.ButtonBase)newTreeNodeButton; } //Si se agrega a una simple navbar es un ButtonBase (como simple link) else { _CurrentButtonBase = new Fwk.UI.Controls.Menu.ButtonBase(); } LoadControl <UC_ButtonBaseEditor>(_CurrentButtonBase, ActionTypes.Create, uC_NavMenu1.ActiveGroup.Tag); }
void Update_UC_TreeNavBar(DevExpress.XtraNavBar.NavBarGroup navBarGroup, TreeNodeButton pMenuBarTreeNode) { BarGroup wBarGroup = (BarGroup)navBarGroup.Tag; wBarGroup.MenuBarTree.Add(pMenuBarTreeNode); UC_TreeNavBar treeList = (UC_TreeNavBar)((System.Windows.Forms.Control)(navBarGroup.ControlContainer)).Controls[0]; //treeList = navBarGroup treeList.Populate(wBarGroup.MenuBarTree, this.IsOnDesignMode); }
void treeList_OnNodeClick(TreeNodeButton node) { LinkButtonClick((Fwk.UI.Controls.Menu.ButtonBase)node); }
void Update_UC_TreeNavBar(DevExpress.XtraNavBar.NavBarGroup navBarGroup, TreeNodeButton pMenuBarTreeNode) { BarGroup wBarGroup = (BarGroup)navBarGroup.Tag; wBarGroup.MenuBarTree.Add(pMenuBarTreeNode); UC_TreeNavBar treeList = (UC_TreeNavBar)((System.Windows.Forms.Control)(navBarGroup.ControlContainer)).Controls[0]; //treeList = navBarGroup treeList.Populate(wBarGroup.MenuBarTree,this.IsOnDesignMode); }