Exemplo n.º 1
0
 private void playerList_DoubleClick(object sender, EventArgs e)
 {
     if (playerList.SelectedItems.Count > 0)
     {
         PlayerInfo player = playerList.SelectedItems[0].Tag as PlayerInfo;
         SelectedPlayer = player;
         DialogResult = DialogResult.OK;
         Close();
     }
 }
Exemplo n.º 2
0
 private void playerList_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (playerList.SelectedItems.Count > 0)
     {
         var playerInfo = playerList.SelectedItems[0].Tag as PlayerInfo;
         playerPreview.SetPlayer(playerInfo);
         playerPreview.Visible = true;
         SelectedPlayer = playerInfo;
     }
     else
     {
         playerPreview.SetPlayer(null);
         playerPreview.Visible = false;
         SelectedPlayer = null;
     }
 }