public MainWindowPresenter(MainWindowForm view, MainModel model)
 {
     _model             = model;
     _view              = view;
     _view.OnStart     += new EventHandler <EventArgs>(OnStart);
     _view.OnAnswer    += new EventHandler <EventArgs>(OnAnswer);
     _view.OnNextLevel += new EventHandler <EventArgs>(OnNextLevel);
     _view.OnTips      += new EventHandler <EventArgs>(OnTipsEvent);
     if (_model.GetListgamedata().Count < 15)
     {
         _view.AdminModeOnly();
     }
 }
예제 #2
0
 static void Main()
 {
     try
     {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         MainModel           mainModel       = new MainModel();
         MainWindowForm      mainWindow      = new MainWindowForm(mainModel);
         MainWindowPresenter windowPresenter = new MainWindowPresenter(mainWindow, mainModel);
         Application.Run(mainWindow);
     }
     catch (Exception e)
     {
         System.Console.WriteLine(e.Message);
     }
 }