Exemplo n.º 1
0
 private void Movechallenge_Load(object sender, EventArgs e)
 {
     viewarray = new List <ViewList>();
     for (int i = 0; i < studentname.Length; i++)
     {
         ViewList viewList = new ViewList();
         viewList.Settext((i + 1).ToString(), studentname[i]);
         if (i == 0) // 첫 줄은 타이틀
         {
             ViewList title = new ViewList();
             title.Settitle();
             result.Add(title.GetList());
             viewarray.Add(title);
         }
         viewarray.Add(viewList);
     }
     viewarray.ForEach(x => x.Dock = DockStyle.Top);
     viewarray.Reverse <ViewList>().ToList().ForEach(x => panel1.Controls.Add(x)); // 역순 추가해야 마지막이 최상단에 위치
     buzzer.SetMsgNo(Handle);
     if (!buzzer.SetConnection())
     {
         MessageBox.Show("수신기 연결 오류");
     }
     Receiver303.StartVote(buzzer.ComNo);
     checkbuzzer    = new bool[bps];
     rank           = new Dictionary <string, string>(studentname.Length);
     panel1.Visible = true;
 }
Exemplo n.º 2
0
 private void Pacer_Load(object sender, EventArgs e)
 {
     rank = new Dictionary <string, string>(studentname.Length);
     buzzer.SetMsgNo(Handle);
     if (!buzzer.SetConnection())
     {
         MessageBox.Show("수신기 연결 오류");
     }
     Receiver303.StartVote(buzzer.ComNo);
     Game.recordhistory = game.Recordhistory().OrderByDescending(x => x[1]).ToList();;  // 역대 recordhistory 가져오기
     Ranking();
 }