Ejemplo n.º 1
0
        /// <summary>
        /// Choose a command
        /// </summary>
        /// <param name="input">The users input.</param>
        public static void ChooseCommand(string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                Print.Color("red", "You must enter a command.");
                Introduction();
            }
            else
            {
                switch (input)
                {
                case "view all":
                    ListController.ViewAll();
                    Introduction();
                    break;

                case "create list":
                    ListController.Create();
                    Introduction();
                    break;

                case "help":
                    Command.HelpCommand.ShowHomeCommands();
                    Introduction();
                    break;

                case "create website":
                    Command.CreateWebsite.Execute();
                    Introduction();
                    break;

                case "get news":
                    Command.ScraperNews.Execute();
                    Introduction();
                    break;

                case "get stocks":
                    Command.GetStockPrices.Execute();
                    Introduction();
                    break;

                default:
                    Navigate(input);
                    break;
                }
            }
            Introduction();
        }