public void GetOptionFromMenu()
        {
            bool       menuFlag    = true;
            MenuOutput menuPrinter = new MenuOutput(_menuName);



            while (menuFlag)
            {
                var choice = menuPrinter.PrintOUt(Options);

                var ValidationFlag = validator.ChoiceValidator(choice);
                if (ValidationFlag)
                {
                    if (Int32.Parse(choice) != Options.Count)
                    {
                        DictOptions[choice].RunOption();
                    }
                    else
                    {
                        menuFlag = false;
                    }
                }
            }
        }
Example #2
0
        public void GetOptionFromMenu()
        {
            bool       menuFlag    = true;
            MenuOutput menuPrinter = new MenuOutput(_menuName);

            while (menuFlag)
            {
                var choice = menuPrinter.PrintOUt(Options);

                bool validationFlag = validator.ChoiceValidator(choice);
                if (validationFlag)
                {
                    if (choice != "exit")
                    {
                        DictOptions[choice].RunOption();
                    }
                    else
                    {
                        menuFlag = false;
                    }
                }
            }
        }