Пример #1
0
        public void EvaluateChoice(string userChoice)
        {
            switch (userChoice)
            {
            case "1":
                var contactAdder  = new AddNewContact();
                var singleContact = contactAdder.Execute();
                var printer       = new ContactPrinter();
                printer.PrintSingleContact(singleContact);
                Console.ReadLine();

                break;

            case "2":
                Console.Write("coming soon");
                break;

            case "3":
                var            displayContacts = new DisplayContacts();
                List <Contact> contactList     = displayContacts.Execute();
                var            printer2        = new ContactPrinter();
                printer2.PrintContactList(contactList);
                Console.ReadLine();
                break;

            case "4":
                Console.WriteLine("ComingSoon");
                break;

            case "5":
                Console.WriteLine("coming soon");
                break;

            case "6":
                Console.WriteLine("Move a contact");
                break;

            case "Q":
                break;

            default:
                Console.WriteLine("That was not a valid choice!");
                break;
            }
        }
Пример #2
0
        public void EvaluateChoice(string userChoice)
        {
            switch (userChoice)
            {
                case "1":
                    var contactAdder = new AddNewContact();
                   var singleContact = contactAdder.Execute();
                    var printer = new ContactPrinter();
                    printer.PrintSingleContact(singleContact);
                    Console.ReadLine();

                    break;
                case "2":
                    Console.Write("coming soon");
                    break;
                case"3":
                    var displayContacts = new DisplayContacts();
               List<Contact> contactList=    displayContacts.Execute();
                    var printer2 = new ContactPrinter();
                    printer2.PrintContactList(contactList);
                    Console.ReadLine();
                    break;
                case "4":
                    Console.WriteLine("ComingSoon");
                    break;
                case "5":
                    Console.WriteLine("coming soon");
                    break;
                case"6":
                    Console.WriteLine("Move a contact");
                    break;
                case"Q":
                    break;
                default:
                    Console.WriteLine("That was not a valid choice!");
                    break;

            }
        }