public new int CompareTo(object obj) { switch (obj) { case Lesson other: return(LessonName.CompareTo(other.LessonName) + Teacher.CompareTo(other.Teacher) + StartLesson.CompareTo(other.StartLesson) + FinishLesson.CompareTo(other.FinishLesson) + NameGroup.CompareTo(other.NameGroup) + NumberGroup.CompareTo(other.NumberGroup)); default: throw new Exception("Несравнимые объекты"); } }
private void startLesson_Click(object sender, EventArgs e) { StartLesson lessonWindow = new StartLesson(this); lessonWindow.ShowDialog(); }