static void Main(string[] args) { int width = 50; int height = 50; int scale = 10; var consoleModel = new Model(0, width, 0, height); var consoleView = new ConsoleView(width, height, consoleModel); var consoleRunner = new OverAndOverAgainActionRunner(); var consoleModelPresenter = new ConsolPresenter(consoleModel, consoleView, consoleRunner); var winModel = new Model(0, width, 0, height); var winView = new WinFormView(width, height, scale, winModel); var winRunner = new OverAndOverAgainActionRunner(); var winPresenter = new WinFormsPresenter(winModel, winView, winRunner); Task.Factory.StartNew(() => consoleView.ReadArrow()); Application.Run(winView); }
static void Main(string[] args) { int width = 50; int height = 50; int scale = 10; IActionRunner runner = new OverAndOverAgainActionRunner(); var model = new Model(0, width, 0, height); var controller = new Controller(model, runner); var consoleView = new ConsoleView(width, height); var winFormsView = new WinFormView(width, height, scale); controller.Subscribe(consoleView); controller.Subscribe(winFormsView); consoleView.SetController(controller); winFormsView.SetController(controller); Task.Factory.StartNew(() => consoleView.ReadArrow()); Application.Run(winFormsView); }