private void lstLectures_MouseDoubleClick(object sender, MouseEventArgs e) { if (lstLectures.SelectedItems.Count != 1) { return; } var casted = (Lecture)lstLectures.SelectedItems[0].Tag; var viewLectureForm = new ViewLectureForm(_serviceLocator, casted); viewLectureForm.ShowDialog(); }
private void btnStartLecture_Click(object sender, EventArgs e) { if (lstCourses.SelectedItems.Count != 1) { MessageBox.Show("Please Select a Course!"); return; } var newLecture = _coursesService.StartLecture(_selectedCourse.Id); var viewLectureForm = new ViewLectureForm(_serviceLocator, newLecture); viewLectureForm.ShowDialog(); }