private void ShowCountriesSelector(int rowIndex) { using (var countrySelectorForm = new CountrySelectorForm()) { if (countrySelectorForm.ShowDialog() == DialogResult.OK) { int playerId = (int)dgv.Rows[rowIndex].Cells[DBPlayer.COLUMN_PLAYERS_ID].Value; if (countrySelectorForm.ReturnValue != null && !countrySelectorForm.ReturnValue.Equals(string.Empty)) { _presenter.SaveNewPlayerCountry(playerId, countrySelectorForm.ReturnValue); dgv.Rows[rowIndex].Cells[DBPlayer.COLUMN_PLAYERS_COUNTRY_NAME].Value = countrySelectorForm.ReturnValue; dgv.Rows[rowIndex].Cells[DGVPlayer.COLUMN_PLAYERS_COUNTRY_FLAG].Value = CountryFlags.GetFlagImage(countrySelectorForm.ReturnValue); } } } }
internal static ICountrySelectorPresenter provideCountrySelectorPresenter( CountrySelectorForm countrySelectorForm) { return(new CountrySelectorPresenter(countrySelectorForm)); }