Beispiel #1
0
        public Option(Form x)
        {
            InitializeComponent();
            parent = x;

            RuleBUS        ruleBus = new RuleBUS();
            QuyDinhTroChoi quyDinh = ruleBus.GetGuideLine();

            labelGuide.Text        = quyDinh.Rule;
            textBoxRound.Text      = quyDinh.NumberRound.ToString();
            textBoxTimeAnswer.Text = quyDinh.TimeForAnswer.ToString();
            DoubleBuffered         = true;
        }
Beispiel #2
0
        private void rectangleShapeSave_MouseClick(object sender, MouseEventArgs e)
        {
            soundButton.Play();
            Regex reg = new Regex("^[0-9]+$", RegexOptions.IgnoreCase);

            if (!reg.IsMatch(textBoxRound.Text) || !reg.IsMatch(textBoxTimeAnswer.Text))
            {
                MessageBox.Show("Hãy nhập vào giá trị là số!");
            }
            else
            {
                QuyDinhTroChoi qd = new QuyDinhTroChoi();
                qd.NumberRound   = Int32.Parse(textBoxRound.Text);
                qd.TimeForAnswer = Int32.Parse(textBoxTimeAnswer.Text);
                RuleBUS ruleBus = new RuleBUS();
                ruleBus.SetThongSo(qd);


                textBoxRound.Enabled      = false;
                textBoxTimeAnswer.Enabled = false;
                MessageBox.Show("Lưu Thành Công!");
            }
        }
Beispiel #3
0
        public Stage(Playerlist l, Form x, WindowsMediaPlayer y)
        {
            InitializeComponent();
            QLTD.SetPlayerlist(l);
            Numplayer      = QLTD.PlayerList().ListPLayer.Count;
            parent         = x;
            hinhChiecNon   = ChiecNonBitmap;
            DoubleBuffered = true;
            wplayer        = y;

            TopicBUS topic = new TopicBUS();

            QLQN.GetListPoint();
            List <ChuDe> list = topic.GetAllTopics();

            for (int i = 0; i < list.Count; i++)
            {
                comboBoxTopic.Items.Add(list[i].NameTopic);
            }

            RuleBUS data = new RuleBUS();

            qd            = data.GetGuideLine();
            TimeCountDown = qd.TimeForAnswer;

            timer1.Interval           = 500;
            timer1.Tick              += Timer1_Tick;
            timerWin.Interval         = 500;
            timerWin.Tick            += TimerWin_Tick;
            timerFinishRound.Interval = 500;
            timerFinishRound.Tick    += TimerFinishRound_Tick;
            timerCountDown.Interval   = 1000;
            timerCountDown.Tick      += TimerCountDown_Tick;
            labelRound.Text           = "Vòng " + Round;
            labelCountDown.Text       = TimeCountDown.ToString();
            // qd.NumberRound = 1;
        }