Beispiel #1
0
        public NavItem(string text)
        {
            uniqueId  = GetNextUniqueId();
            this.text = text;

            Navbar.AddItem(this);
        }
Beispiel #2
0
        public NavMenuItem(string text, string controller, string action, string icon = "fa-circle", int id = -1, int parent = -1) : base(text, controller, action)
        {
            this.id     = id;
            this.parent = parent;
            this.icon   = icon;

            subItems      = new List <NavMenuItem>();
            notifications = new List <Tuple <string, NavColor> >();

            if (parent != -1)
            {
                NavMenuItem item = Navbar.FindParent(parent);
                item.subItems.Add(this);
            }
        }