private void btnIzbrishi_Click(object sender, EventArgs e) { if (lbKonferecii.SelectedIndex != -1) { Konf temp = (Konf)lbKonferecii.SelectedItem; if (AllConferences.conferences.GroupBy(k => k.Year).ToDictionary(k => k.Key, k => k.ToList())[temp.Year].Count() == 1) { cbGodina.Items.Remove(temp.Year); } AllConferences.conferences.Remove(temp); updateConferences(); } }
private void btnDodadi_Click(object sender, EventArgs e) { konferencija = new Konf((int)nudGodina.Value, txtIme.Text); DialogResult = DialogResult.OK; }