static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); /* << VIEWS >> */ BaseForm baseForm = new BaseForm(); IGameView gameView = new GameFormView(); // injecting new << View >> //IGameView_Render gameView = new GameFormView_Render(); // injecting new << View >> //IGameView_Manual gameView = new GameFormView_Manual(); IFilerView filerView = new FilerFormView(); IDesignerView designerView = new DesignerFormView(); /* << MODELS >> */ IFiler filer = new Filer(); IDesigner designer = new Designer(); IFileable designerFileable = (IFileable)designer; IGame game = new Game(); IFileable gameFileable = (IFileable)game; /* << CONTROLLER(S) >> */ IGameController gameController = new GameController(gameView, filerView, filer, game, gameFileable); IDesignerController designerController = new DesignerController(filerView, designerView, filer, designer, designerFileable); baseForm.SetControllers(gameController, designerController); //gameView.SetController(gameController); // Set Controller for injected View Application.Run(baseForm); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //<<VIEW>> BaseForm baseFrm = new BaseForm(); IGameView gameView = new GameFormView(); IFilerView filerView = new FilerFormView(); /*MANUAL DESIGNER*/ //IManualDesignerView manualDesignerView = new ManualDesignerFormView(); /*DYNAMIC BUTTONS*/ //IDesignerButtonView designerButtonView = new DesignerButtonFormView(); /*DYNAMIC DRAWING VIEW*/ IDesignerView designerView = new DesignerFormView(); //<<MODELS>> IFiler filer = new Filer(); IDesigner designer = new Designer(); IGame game = new Game(); IFileable designerFileable = (IFileable)designer; IFileable gameFileable = (IFileable)game; baseFrm.StartPosition = FormStartPosition.CenterScreen; //<<CONTROLLERS>> IGameController gameController = new GameController(gameView, filerView, filer, game, gameFileable); /*MANUAL DESIGNER*/ //IDesignerController designerController = new DesignerController(manualDesignerView, filerView, filer, designer, designerFileable); /*DYNAMIC BUTTONS*/ //IDesignerController designerController = new DesignerController(designerButtonView, filerView, filer, designer, designerFileable); /*DYNAMIC DRAWING VIEW*/ IDesignerController designerController = new DesignerController(designerView, filerView, filer, designer, designerFileable); //<<SET CONTROLLERS>> baseFrm.SetControllers(gameController, designerController); /*MANUAL DESIGNER*/ //manualDesignerView.SetController(designerController); Application.Run(baseFrm); }