private void btnEdit_Click(object sender, System.EventArgs e) { if (lbCourses.SelectedIndex == -1) { return; } int position = lbCourses.SelectedIndex; FeditCourse fedit = new FeditCourse(State.modified, lbCourses.Items, position); fedit.Show(); }
private void btnAdd_Click(object sender, System.EventArgs e) { FeditCourse fedit = new FeditCourse(State.added, lbCourses.Items, 0); fedit.Show(); }