Example #1
0
        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();
        }
Example #2
0
        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);
        }