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_LED_Vong3)
                {
                    V_LED_Vong3 view = _view as V_LED_Vong3;
                    view.STT             = _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();
        }
        public void GetTeams()
        {
            if (!(_view is V_LED_Vong3))
            {
                return;
            }
            //int year = DateTime.UtcNow.Year;

            teams = (new BLL()).GetTeams();
            V_LED_Vong3 view = _view as V_LED_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;
            }
        }
Exemplo n.º 3
0
        //public App()
        //{
        //    _view = new View();
        //    _controller = new LED_Controller(_view);
        //    _view.Controller = _controller;
        //    //

        //}
        //public App(View view)
        //{
        //    _view = view;
        //    _controller = new LED_Controller(_view);
        //    _view.Controller = _controller;
        //}
        public App(V_LED_Vong3 view)
        {
            _view            = view;
            _controller      = new LED_Vong3_Controller(_view);
            _view.Controller = _controller;
        }