private void initializeAllDgv() { DgvArmors.Initialize(dgvArmors); DgvKnights.Initialize(dgvKnights); DgvTournaments.Initialize(dgvTournaments); DgvWeapons.Initialize(dgvWeapons); DgvFights.Initialize(dgvFights); }
private void UpdateFightsTable(DataGridView dgv) { if (dgv != dgvFights) { dgvFights.CellValidated -= new DataGridViewCellEventHandler(dgv_CellValidated); dgvFights.CellValidating -= new DataGridViewCellValidatingEventHandler(dgv_CellValidating); dgvFights.RowValidated -= new DataGridViewCellEventHandler(dgv_RowValidated); dgvFights.RowValidating -= new DataGridViewCellCancelEventHandler(dgv_RowValidating); dgvFights.UserDeletingRow -= new DataGridViewRowCancelEventHandler(dgv_UserDeletingRow); DgvFights.Initialize(dgvFights); dgvFights.CellValidated += new DataGridViewCellEventHandler(dgv_CellValidated); dgvFights.CellValidating += new DataGridViewCellValidatingEventHandler(dgv_CellValidating); dgvFights.RowValidated += new DataGridViewCellEventHandler(dgv_RowValidated); dgvFights.RowValidating += new DataGridViewCellCancelEventHandler(dgv_RowValidating); dgvFights.UserDeletingRow += new DataGridViewRowCancelEventHandler(dgv_UserDeletingRow); } }