Пример #1
0
        private void SetupHandler()
        {
            bool   correctinput = true;
            string message      = "What type of sweepstakes management will your company use? stack or queue";

            do
            {
                if (!correctinput)
                {
                    message = "Invalid handler, please try again. Stack or queue, s/q";
                }

                UserInterface.DisplayInline(message);
                correctinput = ChooseHandler(Console.ReadLine());
            } while (!correctinput);
            UserInterface.Clear();
        }
Пример #2
0
        public void CreateContestant()
        {
            string     response = "";
            Contestant newContestant;

            do
            {
                newContestant = new Contestant(
                    UserInterface.GetinputClear("enter contestant first name."),
                    UserInterface.GetInputInline("enter contestant last name."),
                    UserInterface.GetEmail("enter contestant email"),
                    count.ToString());
                UserInterface.Clear();
                PrintContestantInfo(newContestant);
                response = UserInterface.GetInputInline("is this information correct?");
            } while (response.ToLower() != "y" && response.ToLower() != "yes");

            RegisterContestant(newContestant);
        }
Пример #3
0
 private void RegisterContestant(Contestant contestant)
 {
     contestants.Add(count.ToString(), contestant);
     count++;
     UserInterface.Clear();
 }