Beispiel #1
0
        private Store OptionSelect(User potentialUser)
        {
            PrintColoredText($"\n||| HOME |||\nWelcome {potentialUser.Name.First} {potentialUser.Name.Last}");
            Console.WriteLine(_viewOrderHistory);
            Console.WriteLine(_viewLocations);
            Console.WriteLine(_selectALocation);
            Console.WriteLine(_logoutOption);

            string option = CleanString(Console.ReadLine());
            Store  store  = null;

            if (option == _signOut)
            {
                Console.WriteLine(_loggingOut);
                IntroScreen intro = new IntroScreen();
                intro.Begin();
            }
            else if (option == $"{_view} {_locations}")
            {
                StoreLocations.PrintStores();
            }
            else if (option == $"{_view} {_history}")
            {
                potentialUser.PrintOrderHistory();
            }
            else if (option.Contains(_select))
            {
                store = StoreLocations.GetStoreByAddress(option.Replace(_select, "").Trim());
            }
            else
            {
                Console.WriteLine(_invalidArgument);
            }
            return(store);
        }
Beispiel #2
0
        private Order SelectOrderType(User realUser, Store s)
        {
            PrintColoredText($"\n||| PIZZA SELECTION |||\n");
            Console.WriteLine(_choosePizza);
            Console.WriteLine(_logoutOption);
            string option = CleanString(Console.ReadLine());
            Order  order  = null;

            if (option == _signOut)
            {
                Console.WriteLine(_loggingOut);
                IntroScreen intro = new IntroScreen();
                intro.Begin();
            }
            else if (option == _custom)
            {
                Console.WriteLine("Coming Soon");
            }
            else
            {
                Console.WriteLine(_invalidArgument);
            }
            return(order);
        }