public static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var model = new Model(); var view = new View(); var controller = new IncController(view, model); Application.Run(view); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Application.Run(new MainForm()); // Create the View, Model and Controller object yourself and comment out the Application.Run with a new form // Create a controller object with the concreate implementation IncController and pass the view and model. // Controller will store its associated model and view inside the constructor // View which is inside the form will tie the controller automatically who was associated in this step // Run the view object created by you which is infact the form MainForm view = new MainForm(); IModel mdl = new IncModel(); IController cnt = new IncController(view, mdl); Application.Run(view); }