示例#1
0
 private void AddDuo()
 {
     if (!String.IsNullOrWhiteSpace(txtDuo1.Text) && txtDuo1.Text.Length > 0 && !String.IsNullOrWhiteSpace(txtDuo2.Text) && txtDuo2.Text.Length > 0)
     {
         Player teammate = new Player(null, txtDuo2.Text, 0);
         pList.AddDuo(new Player(teammate, txtDuo1.Text, 2));
         txtDuo1.Clear();
         txtDuo2.Clear();
         txtDuo1.Select();
         txtDuo1.Focus();
         lblCount.Text = "Total Players: " + pList.totalPlayers;
     }
 }
示例#2
0
 public Player(Player team, String playerName, int playerCount)
 {
     teammate = team;
     name = playerName;
     count = playerCount;
 }
示例#3
0
 public void AddSolo(Player player)
 {
     playerList.Add(player);
     soloCount++;
     totalPlayers++;
 }
示例#4
0
 public void AddDuo(Player player)
 {
     playerList.Add(player);
     duoCount++;
     totalPlayers += 2;
 }