public void ShowRank() { this.Height = screenHeight; this.Width = screenWidth; this.label_title.Visible = false; this.webBrowser1.Visible = false; this.panel1.Visible = false; this.panel2.Visible = false; this.pictureBox_header.Visible = true; List <Group> szGroup = Global.getGroupRanking(); for (int i = 0; i < 10 && i < szGroup.Count(); i++) { szRandDash[i].Font = new System.Drawing.Font("黑体", 10F); szRandDash[i].ForeColor = System.Drawing.Color.LimeGreen; if (i < 3) { szRandNumber[i].Text = "NO." + (i + 1); szRandGroupname[i].Text = " " + szGroup[i].name + "组"; szRandPoint[i].Text = szGroup[i].point + "分"; szRandGroupname[i].Image = global::RueHelper.Properties.Resources.bg_top3; szRandGroupname[i].TextAlign = System.Drawing.ContentAlignment.MiddleCenter; szRandNumber[i].Left = (int)(screenWidth * 0.4) / 10; szRandGroupname[i].Left = (int)(screenWidth * 1.75) / 10; szRandDash[i].Left = (int)(screenWidth * 3) / 10; szRandPoint[i].Left = (int)(screenWidth * 3.6) / 10; pictureBox_top1.Left = (int)(screenWidth * 1.5) / 10; pictureBox_top2.Left = (int)(screenWidth * 1.5) / 10; pictureBox_top3.Left = (int)(screenWidth * 1.5) / 10; int topL = (int)(screenHeight * (1.8 + 3 * i)) / 10; szRandNumber[i].Top = topL; szRandGroupname[i].Top = topL; szRandPoint[i].Top = topL - 8; //----Font & Color---- szRandNumber[i].Font = new System.Drawing.Font("微软雅黑", 30F);//微软雅黑 szRandGroupname[i].Font = new System.Drawing.Font("微软雅黑", 30F); szRandPoint[i].Font = new System.Drawing.Font("微软雅黑", 38F); szRandNumber[i].ForeColor = System.Drawing.Color.Black; szRandGroupname[i].ForeColor = System.Drawing.Color.LimeGreen; szRandPoint[i].ForeColor = System.Drawing.Color.LimeGreen; szRandNumber[i].Visible = true; szRandGroupname[i].Visible = true; szRandPoint[i].Visible = true; if (screenWidth > 1024) { szRandDash[i].Text = "---------"; szRandDash[i].Top = topL + 18; szRandDash[i].TextAlign = System.Drawing.ContentAlignment.BottomCenter; szRandDash[i].Visible = true; } if (i == 0) { pictureBox_top1.Top = szRandGroupname[0].Top - 10; pictureBox_top1.Visible = true; } else if (i == 1) { pictureBox_top2.Top = szRandGroupname[1].Top - 10; pictureBox_top2.Visible = true; } else { pictureBox_top3.Top = szRandGroupname[2].Top - 10; pictureBox_top3.Visible = true; } } else { szRandNumber[i].Text = "NO." + (i + 1); szRandGroupname[i].Text = szGroup[i].name + "组"; szRandPoint[i].Text = szGroup[i].point + "分"; if (screenWidth > 1024) { szRandDash[i].Text = " -------------------------- "; } else { szRandDash[i].Text = " ------------------- "; } szRandNumber[i].Left = (int)(screenWidth * 5.5) / 10; szRandGroupname[i].Left = (int)(screenWidth * 6.5) / 10; szRandDash[i].Left = (int)(screenWidth * 7.2) / 10; szRandPoint[i].Left = (int)(screenWidth * 8.8) / 10; int topR = (int)(screenHeight * (1.5 + 1.1 * (i - 3))) / 10; szRandNumber[i].Top = topR; szRandGroupname[i].Top = topR; szRandPoint[i].Top = topR; szRandDash[i].Top = topR + 8; //----Font & Color---- szRandNumber[i].Font = new System.Drawing.Font("微软雅黑", 22F); szRandGroupname[i].Font = new System.Drawing.Font("微软雅黑", 22F); szRandPoint[i].Font = new System.Drawing.Font("微软雅黑", 22F); szRandNumber[i].ForeColor = System.Drawing.Color.Black; szRandGroupname[i].ForeColor = System.Drawing.Color.Black; szRandPoint[i].ForeColor = System.Drawing.Color.Black; szRandDash[i].TextAlign = System.Drawing.ContentAlignment.BottomCenter; szRandPoint[i].TextAlign = System.Drawing.ContentAlignment.MiddleRight; szRandNumber[i].Visible = true; szRandGroupname[i].Visible = true; szRandPoint[i].Visible = true; szRandDash[i].Visible = true; } szRandGroupname[i].BringToFront(); } //3秒显示,自动隐藏 this.Show(); this.BringToFront(); System.Windows.Forms.Timer t = new System.Windows.Forms.Timer(); t.Interval = 30000; t.Tick += new EventHandler(t_Hide); t.Start(); }