/// <summary>Ajoute le croupier au salon de jeu.</summary> /// <param name="croupier">Croupier à ajouter.</param> public void AjouterCroupier(Croupier croupier) { ControlParticipant ctrl = croupier.Control; ctrl.Location = new Point(12, 12); if (InvokeRequired) { Invoke(new MethodInvoker(delegate { Controls.Add(ctrl); })); } else { Controls.Add(ctrl); } }
/// <summary>Crée un participant.</summary> /// <param name="nom">Nom du participant.</param> /// <exception cref="ArgumentException">Le nom du participant ne peut pas être une chaine vide.</exception> /// <exception cref="ArgumentNullException">Le nom du participant ne peut pas être la valeur null.</exception> protected Participant(string nom) { this.nom = nom == "" ? throw new ArgumentException("Le nom du participant ne peut pas être une chaine vide.", "nom") : nom ?? throw new ArgumentNullException("nom", "Le nom du participant ne peut pas être la valeur null."); main = new List <Carte>(2); control = new ControlParticipant(nom); }