BattleShip.Form1.GameFinish C# (CSharp) Метод

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

Permet d'afficher en gros le texte "Défaite" ou "Victoire"
private GameFinish ( string text, Color couleur ) : void
text string Text à afficher
couleur Color Couleur du text
Результат void
        private void GameFinish(string text, Color couleur)
        {
            Label StatusGame = new Label();
            StatusGame.Name = "GameFinish";
            StatusGame.Text = text;
            StatusGame.AutoSize = true;
            StatusGame.TextAlign = ContentAlignment.MiddleCenter;
            StatusGame.Font = new Font("Arial", 50);
            StatusGame.BackColor = Color.Transparent;
            StatusGame.ForeColor = couleur;
            StatusGame.Location = new Point(this.Height / 2, this.Width / 2);
            StatusGame.BringToFront();
            this.Controls.Add(StatusGame);
        }
        #endregion