private void contact_Click(object sender, EventArgs e) { Button btn = (Button)sender; for (int p = posAtTop, pos = 0; p < players.Length && pos < maxPlayersOnScreen; p++, pos++) { if (btn.Top == contact[pos].Top) { popContactPlayer cp = new popContactPlayer(player, players[p]); cp.ShowDialog(); enabledTypes(); break; } } }
private void contact_Click(object sender, EventArgs e) { Button btn = (Button)sender; for ( int p = posAtTop, pos = 0; p < players.Length && pos < maxPlayersOnScreen; p++, pos++ ) if ( btn.Top == contact[ pos ].Top ) { popContactPlayer cp = new popContactPlayer( player, players[ p ] ); cp.ShowDialog(); enabledTypes(); break; } }