示例#1
0
        static void Main(string[] args)
        {
            ISort itemSelected;

            menuItems = GetMenuItems();

            while (true)
            {
                imageList = JSONLoader.ReadJSON();

                PrintMenuItems(menuItems);
                var option = Console.ReadLine();

                int.TryParse(option, out int optionValue);

                if (optionValue == 0)
                {
                    break;
                }

                if (optionValue > menuItems.Count)
                {
                    break;
                }

                itemSelected = Execute(optionValue);
                Console.ReadKey();
            }
        }