Пример #1
0
 private void OnStart()
 {
     foreach (MainModel.Gamedata item in _model.GetListgamedata())
     {
         _view.Group          = int.Parse(item.GroupList);
         _view.TextFieldsData = new string[] { item.Question, item.VarA, item.VarB, item.VarC, item.VarD, item.Uniqindex.ToString() };
         UpdateView(MainModel.Action.Add);
     }
 }
 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();
     }
 }
 private void OnStart(object sender, EventArgs e)
 {
     gameLogics  = new GameLogics(_model.GetListgamedata());
     _view.Score = 0;
     OnNextLevel(sender, e);
 }