Ejemplo n.º 1
0
        private void updateTop3(int index)
        {
            string name0 = si[index - 1].Name;
            string name  = Global.getUsernameBySeat(index);

            Log.Info("updateTop3: index=" + index + ", name=" + Global.getUsernameBySeat(index) + ", " + name);
            //①②③
            if (label_top3_1.Text.Length <= 1)
            {
                label_top3_1.Text = "① " + name;
            }
            else if (label_top3_2.Text.Length <= 1)
            {
                label_top3_2.Text = "② " + name;
            }
            else if (label_top3_3.Text.Length <= 1)
            {
                label_top3_3.Text = "③ " + name;
            }

            int left1 = screenWidth / 3 - label_top3_1.Size.Width / 2 - 50;
            int left2 = (screenWidth - label_top3_2.Size.Width) / 2;
            int left3 = screenWidth * 2 / 3 - label_top3_3.Size.Width / 2 + 50;

            label_top3_1.Left = left1;
            label_top3_2.Left = left2;
            label_top3_3.Left = left3;
        }