Пример #1
0
        private void navigation(View.MenuView.StartMenuChoice userPreviousChoice)
        {
            View.MenuView.BoatMenuChoice   userBoatNavigationChoice   = View.MenuView.BoatMenuChoice.Invalid;
            View.MenuView.SearchMenuChoice userSearchNavigationChoice = View.MenuView.SearchMenuChoice.Invalid;
            View.MenuView.MemberMenuChoice userMemberNavigationChoice = View.MenuView.MemberMenuChoice.Invalid;

            if (userPreviousChoice == View.MenuView.StartMenuChoice.Member)
            {
                userMemberNavigationChoice = this._menuView.getMemberMenuInput();
                this.memberNavigation(userMemberNavigationChoice);
            }

            if (userPreviousChoice == View.MenuView.StartMenuChoice.Boat)
            {
                userBoatNavigationChoice = this._menuView.getBoatMenuInput();
                this.boatNavigation(userBoatNavigationChoice);
            }

            if (userPreviousChoice == View.MenuView.StartMenuChoice.Search)
            {
                userSearchNavigationChoice = this._menuView.getSearchMenuInput();
                this.searchNavigation(userSearchNavigationChoice, false);
            }

            if (userPreviousChoice == View.MenuView.StartMenuChoice.Exit)
            {
                this._menuView.ExitMessage();
            }

            this.run(); // Display start menu.
        }
Пример #2
0
        private void memberNavigation(View.MenuView.MemberMenuChoice userPreviousChoice)
        {
            View.MenuView.StartMenuChoice userNavigationChoice = View.MenuView.StartMenuChoice.Invalid;

            if (userPreviousChoice == View.MenuView.MemberMenuChoice.Compactlist)
            {
                this._memberController.compactList();
            }

            if (userPreviousChoice == View.MenuView.MemberMenuChoice.Verboselist)
            {
                this._memberController.verboseList();
            }

            if (userPreviousChoice == View.MenuView.MemberMenuChoice.Update)
            {
                this._memberController.updateMemberOnList();
            }

            if (userPreviousChoice == View.MenuView.MemberMenuChoice.Delete)
            {
                this._memberController.deleteMemberFromList();
            }

            if (userPreviousChoice == View.MenuView.MemberMenuChoice.Back)
            {
                userNavigationChoice = this._menuView.getNavigationMenuInput();
                this.navigation(userNavigationChoice);
            }

            this.navigation(View.MenuView.StartMenuChoice.Member);
        }