Beispiel #1
0
        public static void ExerciseHandler(string currentSelection)
        {
            ExerciseOptions options = new ExerciseOptions();

            Console.Clear();
            // This is where you add your options. Cases must match the parameters you pass to Menu.Options, else the application will default to exit.
            switch (currentSelection)
            {
            case "Exercise 1":
                if (true)
                {
                    Exercise_1 exercise = new Exercise_1();
                    exercise.schoolName = "Suncoast Technical College";
                    exercise.schoolDesc = "A solid technical school located in Sarasota, Florida. They offer a great programming course called .NET Applications!";
                    exercise.schoolColors.Add("Blue");
                    exercise.schoolColors.Add("White");
                    exercise.Run();
                }

                break;

            case "Exercise 3":
                if (true)
                {
                    Exercise_3 exercise = new Exercise_3();
                    exercise.Run();
                }
                break;

            case "Exercise 5":
                if (true)
                {
                    Exercise_5 exercise = new Exercise_5();
                    exercise.Run();
                }
                break;

            case "Exercise 6":
                if (true)
                {
                    Exercise_6 exercise = new Exercise_6();
                    exercise.Run();
                }
                break;

            case "Exercise 7":
                if (true)
                {
                    Exercise_7 exercise = new Exercise_7();
                    exercise.Run();
                }
                break;

            default:
                Environment.Exit(0);
                break;
            }
            options.Options(currentSelection);
        }
Beispiel #2
0
        public static void ExerciseHandler(string currentSelection)
        {
            ExerciseOptions options = new ExerciseOptions();
            dynamic         dynamic_ex;

            Console.Clear();
            // This is where you add your options. Cases must match the parameters you pass to Menu.Options, else the application will default to exit.
            switch (currentSelection)
            {
            case "Exercise 1":
                dynamic_ex = new Chapter_7.Exercises.Exercise_1.Exercise();
                dynamic_ex.Run();
                break;

            case "Exercise 3":
                dynamic_ex = new Chapter_7.Exercises.Exercise_3.Exercise();
                dynamic_ex.Run();
                break;

            case "Exercise 4":
                dynamic_ex = new Chapter_7.Exercises.Exercise_4.Exercise();
                dynamic_ex.Run();
                break;

            case "Exercise 5":
                dynamic_ex = new Chapter_7.Exercises.Exercise_5.Exercise();
                dynamic_ex.Run();
                break;

            case "Exercise 8":
                dynamic_ex = new Chapter_7.Exercises.Exercise_8.Exercise();
                dynamic_ex.Run();
                break;

            default:
                Environment.Exit(0);
                break;
            }
            //After the exercise has finished running, enable the options input.
            options.Options(currentSelection);
        }