private void delete_Click(object sender, EventArgs e) { if (karty.SelectedCells.Count != 1) { return; } Karta karta = karty.SelectedCells[0].Value as Karta; if (karta == null) { return; } projekt.Karty.Remove(karta); wyswietlKarty(); }
private void karty_SelectionChanged(object sender, EventArgs e) { if (karty.SelectedCells.Count != 1) { return; } Karta karta = karty.SelectedCells[0].Value as Karta; if (karta == null) { return; } lewy.Image = getImage(karta.Awers); prawy.Image = getImage(karta.Rewers); }