private void lbConferences_SelectedIndexChanged(object sender, EventArgs e) { if (lbConferences.SelectedIndex != -1) { selectedConference = lbConferences.SelectedItem as Conference; } else { selectedConference = null; } }
public Form1() { InitializeComponent(); Conferences = new List<Conference>(); Conference c = new Conference("ICT Innovation", 2014); Conferences.Add(c); c = new Conference("ICT Innovation", 2013); Conferences.Add(c); c = new Conference("ADBIS", 2014); Conferences.Add(c); c = new Conference("CIIT", 2013); Conferences.Add(c); c = new Conference("CIIT", 2012); Conferences.Add(c); selectedYear = -1; loadConferences(selectedYear); loadYears(); }
private void btnSave_Click(object sender, EventArgs e) { Conference = new Conference(tbName.Text, (int)nudYear.Value); this.DialogResult = System.Windows.Forms.DialogResult.OK; }