private void DoubleClickingTeacher(object sender, EventArgs e) { var objectName = (sender as ListBox).SelectedItem; if (objectName != null) { var teacherName = objectName.ToString(); var formSchedlue = new FormSchedlue("Учитель - " + teacherName, SchedlueMaker.GetTeacherByName(teacherName)); formSchedlue.Show(); } }
private void DoubleClickingGrade(object sender, EventArgs e) { var objectName = (sender as ListBox).SelectedItem; if (objectName != null) { var gradeeName = objectName.ToString(); var formSchedlue = new FormSchedlue("Класс - " + gradeeName, SchedlueMaker.GetGradeByName(gradeeName)); formSchedlue.Show(); } }