Beispiel #1
0
        //-------------------------------------------------------------------------------------- CSS & HTML --
        public new static string GetCssTree()
        {
            string rtn = MenuItemUI.GetCssTree() + Panel_UserUI.GetCssTree() + Panel_GroupUI.GetCssTree();

            rtn += GetCssRoot();
            return(rtn);
        }
Beispiel #2
0
        //----------------------------------------------------------------------------------------------------
        public void MenuItem_Clicked(MenuItemUI menuItemUI)
        {
            this.ViewModel.LastMenuItem = menuItemUI;
            if (this.UserUI.IsOpen)
            {
                this.UserUI.Close();
            }
            if (this.GroupUI.IsOpen)
            {
                this.GroupUI.Close();
            }

            this.ViewModel.CurrentId = menuItemUI.Model.Id;
            if (menuItemUI.Model.MenuType == UsersMenuItem.MenuTypes.User)
            {
                this.UserUI.Open();
            }
            else if (menuItemUI.Model.MenuType == UsersMenuItem.MenuTypes.Group)
            {
                this.GroupUI.Open();
            }


            this.TurnOff_AllMenuItems();
            if (this.ViewModel.CurrentTabId == 1)
            {
                if (this.MenuItemUIs_1 != null)
                {
                    for (int i = 0; i < this.MenuItemUIs_1.Length; i++)
                    {
                        if (this.MenuItemUIs_1[i].Model.Id == menuItemUI.Model.Id)
                        {
                            this.MenuItemUIs_1[i].TurnOn();
                        }
                    }
                }
            }
            else if (this.ViewModel.CurrentTabId == 2)
            {
                if (this.MenuItemUIs_2 != null)
                {
                    for (int i = 0; i < this.MenuItemUIs_2.Length; i++)
                    {
                        if (this.MenuItemUIs_2[i].Model.Id == menuItemUI.Model.Id)
                        {
                            this.MenuItemUIs_2[i].TurnOn();
                        }
                    }
                }
            }
            else if (this.ViewModel.CurrentTabId == 3)
            {
                if (this.MenuItemUIs_3 != null)
                {
                    for (int i = 0; i < this.MenuItemUIs_3.Length; i++)
                    {
                        if (this.MenuItemUIs_3[i].Model.Id == menuItemUI.Model.Id)
                        {
                            this.MenuItemUIs_3[i].TurnOn();
                        }
                    }
                }
            }
            else if (this.ViewModel.CurrentTabId == 4)
            {
                if (this.MenuItemUIs_4 != null)
                {
                    for (int i = 0; i < this.MenuItemUIs_4.Length; i++)
                    {
                        if (this.MenuItemUIs_4[i].Model.Id == menuItemUI.Model.Id)
                        {
                            this.MenuItemUIs_4[i].TurnOn();
                        }
                    }
                }
            }
        }