예제 #1
0
        /// <summary>
        /// The start of the application; the code starts its execution from here
        /// </summary>
        public static void Main()
        {
            IModel model = new Model ();
            IView view = new TestView ();
            IController controller = new Controller ();

            model.SetView (view);
            view.SetController (controller);
            controller.SetModel (model);

            // Start the app
            view.Start ();

            // Keep the console open till a key is pressed
            Console.ReadKey ();
        }
예제 #2
0
        /// <summary>
        /// The entry point of the program, where the program control starts and ends.
        /// </summary>
        /// <param name="args">The arguments, if any, that are given to this program from the command line</param>
        public static void Main(string[] args)
        {
            Console.WriteLine ("Started");

            Console.WriteLine ("Initialized Application");

            // Create the model, view, and controller of the Model-View-Controller architecture
            // implemented in KeyboardCode
            // FOR MORE INFORMATION ON MVC, SEE README.MD (ALL CAPS)
            IView view = new View ();
            IModel model = new Model ();
            IController controller = new Controller ();

            model.SetView (view);
            view.SetController (controller);
            controller.SetModel (model);

            Console.WriteLine ("Initialized Model, View, and Controller");

            // Start the application
            view.Start ();

            Console.WriteLine ("Started View");
        }