Example #1
0
        public static void Interactive()
        {
            try
            {
                IsInteractive = true;
                AddMenu(Assembly.GetEntryAssembly(), "Main", 'm', new ConsoleMenuDelegate(ShowMenu));
                AddMenu(Assembly.GetEntryAssembly(), "Test", 't', new ConsoleMenuDelegate(UnitTestMenu));

                ShowMenu(Assembly.GetEntryAssembly(), OtherMenus.ToArray(), "Main");
            }
            catch (Exception ex)
            {
                if (ex is ReflectionTypeLoadException typeLoadEx)
                {
                    ex = new ReflectionTypeLoadAggregateException(typeLoadEx);
                }
                OutLine(ex.Message);
                OutLine(ex.StackTrace);
                throw;
            }
        }
Example #2
0
        protected static void MainMenu(string header)
        {
            AddMenu(Assembly.GetEntryAssembly(), header, 'm', new ConsoleMenuDelegate(ShowMenu));

            ShowMenu(Assembly.GetEntryAssembly(), OtherMenus.ToArray(), header);
        }
Example #3
0
 protected static void AddMenu(ConsoleMenu menu)
 {
     OtherMenus.Add(menu);
 }
Example #4
0
 protected static void StartMainMenu()
 {
     AddMenu(Assembly.GetCallingAssembly(), "Main Menu", 'm', new ConsoleMenuDelegate(ShowMenu), "Select an option below:");
     ShowMenu(Assembly.GetCallingAssembly(), OtherMenus.ToArray(), "Select an option below:");
 }