private void BindCmbTopic(string t = "", string w = "", string o = "") { List <Topic> lst = new TopicBUS().Topic_GetByTop(t, w, o); lst.Insert(0, new Topic("0", "Select an option")); cmbChuDe.DataSource = lst; cmbChuDe.DisplayMember = "topicName"; cmbChuDe.ValueMember = "Id"; cmbChuDe.SelectedIndex = 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; }