private void PersonInformationButton_Click(object sender, EventArgs e) { Person currentPerson = (Person)PeopleList.CurrentRow.DataBoundItem; if (currentPerson == null) { return; } PersonInformationForm personInformationForm = new PersonInformationForm(); personInformationForm.Show(currentPerson); }
//Метод, когда происходит двойной щелчек по челвоеку private void PeopleList_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { Person currentPerson = (Person)PeopleList.CurrentRow.DataBoundItem; if (currentPerson == null) { return; } PersonInformationForm personInformationForm = new PersonInformationForm(); personInformationForm.Show(currentPerson); }
private void InformationButtonClick() { if (FightChoiceControl.SelectedEnemy == null) { FightChoiceControl.ShowError("Персонаж не выбран"); return; } PersonInformationForm personInformationForm = new PersonInformationForm(FightChoiceControl.SelectedEnemy); personInformationForm.Show(); }