Exemple #1
0
        public void InitPlayerFormation()
        {
            _formation = new Formation();
            _formation.InitPlayerFormation();

            foreach (KeyValuePair<GeneralInfo, PositionPair> pair in _formation.FormationMap)
            {
                Label lb_General = new Label();
                lb_General.Text = pair.Key.GeneralConfig.Name;

                int r = pair.Value.RowIndex;
                int c = pair.Value.ColumnIndex;

                lb_General.TextAlign = ContentAlignment.MiddleCenter;
                tableLayoutPanel1.Controls.Add(lb_General, c,r);
                //Console.WriteLine("添加了Formation table{0}{1}, 武将{2}", r,c,lb_General.Text);
            }

            LB_TeamName.Text = _formation.TeamName;
            LB_BattlePower.Text = _formation.TeamBattlePowerPoint.ToString();
        }