Ejemplo n.º 1
0
        private void GetNextQuestion()
        {
            //throw new NotImplementedException();
            Question ques = (new BLL()).GetNextQuestion(_nextQuestion.Id);

            if (ques == null)// cau 10 done
            {
                this.Close();
                return;
            }
            _nextQuestion = ques;
            if (_nextQuestion != null)
            {
                //sắp xong
                if (_view is V_MC_Vong3)
                {
                    V_MC_Vong3 view = _view as V_MC_Vong3;
                    view.QuestionNumText = _nextQuestion.STT;
                    view.QuestionContent = _nextQuestion.QuestionContentToString();
                    view.AnswerKey       = _nextQuestion.AnswerKey;
                    //view.KeyIsShown = false;
                    //if (_nextQuestion.Image64String != null && _nextQuestion.Image64String != "")
                    //view.QuestionImg = Image.FromStream(new MemoryStream(Convert.FromBase64String(_nextQuestion.Image64String)));
                }
            }
            _nextQuestion = new Question();
        }
Ejemplo n.º 2
0
        public void GetTeams()
        {
            if (!(_view is V_MC_Vong3))
            {
                return;
            }
            //int year = DateTime.UtcNow.Year;

            teams = (new BLL()).GetTeams();
            V_MC_Vong3 view = _view as V_MC_Vong3;

            if (teams != null && teams.Count != 0)
            {
                view.IDDoi1 = teams[0].ID;
                view.IDDoi2 = teams[1].ID;
                view.IDDoi3 = teams[2].ID;

                //
                view.TenDoi1 = teams[0].Name;
                view.TenDoi2 = teams[1].Name;
                view.TenDoi3 = teams[2].Name;
                //
                view.DiemDoi1 = teams[0].Score;
                view.DiemDoi2 = teams[1].Score;
                view.DiemDoi3 = teams[2].Score;
            }
        }
Ejemplo n.º 3
0
 public MC_Vong3_Controller(V_MC_Vong3 v) : base(v)
 {
     v.Load += V_Load;
 }
Ejemplo n.º 4
0
 public App(V_MC_Vong3 view)
 {
     _view            = view;
     _controller      = new MC_Vong3_Controller(view);
     _view.Controller = _controller;
 }