static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); controller = new ApplicationController(); GameModel gm = new GameModel(); controller.Add(GameForms.Menu, new CommonPresenter(new frmMenu())); controller.Add(GameForms.Reference, new CommonPresenter(new frmReference())); controller.Add(GameForms.Win, new CommonPresenter(new frmWinLose(GameState.Win))); controller.Add(GameForms.Lose, new CommonPresenter(new frmWinLose(GameState.Lose))); controller.Add(GameForms.SetInfo, new SetGamePresenter(new SetGameView(new frmSetLevelGame()), gm)); controller.Add(GameForms.Game, new GamePresenter(new GameView(new frmGame()), gm)); controller.RunForm(GameForms.Menu); Application.Run(); }
static void Main(string[] args) { strMenu = loadResources("MenuFox.txt"); strWin = loadResources("Win.txt"); strReference = loadResources("Reference.txt"); strExit = loadResources("ExitGame.txt"); controller = new ApplicationController(); GameModel gm = new GameModel(); controller.Add(GameForms.Menu, new CommonPresenter(new ProgramMenuControl(strMenu, new ProgramMenu(), new MenuForm()))); controller.Add(GameForms.Reference, new CommonPresenter(new ReferenceProgram(strReference))); controller.Add(GameForms.SetInfo, new SetGamePresenter(new SetGameView(new SetUpGame()), gm)); controller.Add(GameForms.Game, new GamePresenter(new GameView(new GameProgramControl(strExit)), gm)); controller.Add(GameForms.Win, new CommonPresenter(new WinLoseGame(strWin, GameState.Win))); controller.Add(GameForms.Lose, new CommonPresenter(new WinLoseGame(strWin, GameState.Lose))); Program.controller.RunForm(GameForms.Menu); }