コード例 #1
0
        public void DecideFirmMenuAction(int userChoice)
        {
            switch (userChoice)
            {
            case 1:
                AddSweepstakes();
                break;

            case 2:
                Sweepstakes foundSweepstakes = FindASweepstakes();
                if (foundSweepstakes != null)
                {
                    foundSweepstakes.isStillEditing = true;
                }

                while (foundSweepstakes != null && foundSweepstakes.isStillEditing == true)
                {
                    UserInterface.SweepstakesFoundMenu(foundSweepstakes.name);
                    int action = UserInterface.GetNumberResponse(1, 7);
                    foundSweepstakes.ConvertUserChoiceToAction(action);
                }
                break;

            case 3:
                Console.Clear();
                _sweepstakesManager.DisplayAllSweepstakes();
                Console.WriteLine("Press Enter to continue.");
                Console.ReadLine();
                Console.Clear();
                break;

            default:
                stillWorking = false;
                break;
            }
        }