Beispiel #1
0
        public void MainMenu(User ActiveUser)
        {
            SpecificUserActions SpecificMenu = new SpecificUserActions();

            while (true)
            {
                switch (Showmenu(ActiveUser.TypeOfUser))
                {
                case FORUM:
                    SpecificMenu.ShowForumMenu(DataProvider, ActiveUser);
                    break;

                case PERSONAL_MESSAGES:
                    SpecificMenu.ShowPersonalMenu(ActiveUser, DataProvider);
                    break;

                case MANAGE_USERS:
                    SpecificMenu.ShowManageUserMenu(ActiveUser, DataProvider);
                    break;

                case LOGOUT:
                    return;

                default:
                    Environment.Exit(0);
                    break;
                }
            }
        }
Beispiel #2
0
        public bool DeleteUser()
        {
            SpecificUserActions SUA = new SpecificUserActions();

            User SelectedUser = MainActions.AdminSelectsUser();

            string UpdateSelection = SelectMenu.Horizontal(new List <string>
            {
                DELETE_USER,
                BACK
            }).NameOfChoice;

            switch (UpdateSelection)
            {
            case DELETE_USER:
            default:
                return(DataProvider.DeleteUser(SelectedUser));

            case BACK:
                return(false);
            }
        }