コード例 #1
0
        public static void actionTheTask()
        {
            //Program.actionMenu = true;
            Console.Clear();
            MenuGraphics.subMenuHeader();
            Program.DisplayTaskList();

            switch (Console.ReadLine())
            {
            case "1":
                Program.AddTask();
                break;

            case "2":
                Program.CompleteTheTask();
                break;

            case "3":
                Program.IncompleteTask();
                break;

            case "4":
                Program.MainMenu();
                break;

            case "5":
                Outro.signOff();
                break;
            }
        }
コード例 #2
0
        public static bool MainMenu()
        {
            Console.Clear();

            if (toDo.Count > 0)
            {
                MenuGraphics.menuHeader();
                DisplayTaskList();

                switch (Console.ReadLine())
                {
                case "1":
                    AddTask();
                    return(true);

                case "2":
                    ActionTheTask.actionTheTask();
                    return(true);

                case "3":
                    CrossOut();
                    return(true);

                case "4":
                    SkipTask();
                    return(true);

                case "5":
                    Outro.signOff();
                    return(false);

                default:
                    return(true);
                }
            }
            else
            {
                MenuGraphics.limitedMenuHeader();

                switch (Console.ReadLine())
                {
                case "1":
                    AddTask();
                    return(true);

                case "2":
                    Outro.signOff();
                    return(false);

                default:
                    return(true);
                }
            }
        }
コード例 #3
0
        //TODO remove highlighted task should grey it out.  Then at end of list, check for previous action items.
        //TODO only display 15 tasks on the screen
        //TODO add error handling to read txt file
        //TODO if you x out of program, doesnt save state.
        //TODO implement modulus operator for end of list checking. Sample code in EndOfList()
        //TODO stretch add up/down arrow functionality to menu's


        static void Main(string[] args)
        {
            try
            {
                SplashScreen.splashScreen();
                bool displayMenu = true;
                while (displayMenu)
                {
                    displayMenu = MainMenu();
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            finally
            {
                Outro.signOff();
            }
        }