BattleShip.GameBoard.AddCoordinates C# (CSharp) Метод

AddCoordinates() приватный Метод

Creation of dynamic labels for coordonate
private AddCoordinates ( int coord, int pos ) : void
coord int coordinate
pos int the position corresponding to the coordinate
Результат void
        private void AddCoordinates(int coord, int pos)
        {
            Label lblNumbers = new Label();
            lblNumbers.Text = (coord + 1).ToString();
            lblNumbers.Height = SIZE;
            lblNumbers.Width = SIZE;
            lblNumbers.TextAlign = ContentAlignment.MiddleCenter;
            lblNumbers.Font = this.LabelFont;
            lblNumbers.BackColor = BACK_COLOR;
            lblNumbers.Location = new Point(this.Location.X, pos + this.Location.Y);
            this.Coordinates.Add(lblNumbers);

            Label lblLetters = new Label();
            lblLetters.Text = letters[coord].ToString();
            lblLetters.Height = SIZE;
            lblLetters.Width = SIZE;
            lblLetters.TextAlign = ContentAlignment.MiddleCenter;
            lblLetters.Font = this.LabelFont;
            lblLetters.BackColor = BACK_COLOR;
            lblLetters.Location = new Point(pos + this.Location.X, this.Location.Y);
            this.Coordinates.Add(lblLetters);
        }