private void BtnCreateNewTeacher_Click(object sender, EventArgs e) { var teacher = new TeacherDetails(); Children.Add(teacher); teacher.OnClosingEvent += TeacherForm_OnClosingEvent; teacher.Show(); }
private void BtnCreateNewTeacher_Click(object sender, EventArgs e) { TeacherDetails details = new TeacherDetails(); Children.Add(details); details.Show(); details.OnClosingEvent += TeacherDetails_OnCLosingEvent; }
private void LstTeachers_DoubleClick(object sender, EventArgs e) { if (LstTeachers.SelectedItem != null) { var teacher = new TeacherDetails((Teacher)LstTeachers.SelectedItem); Children.Add(teacher); teacher.Show(); } }
private void LstTeachers_DoubleClick(object sender, EventArgs e) { if (LstTeachers.SelectedItem != null) { TeacherDetails details = new TeacherDetails((Teacher)LstParticipants.SelectedItem); details.Show(); Children.Add(details); details.OnClosingEvent += TeacherDetails_OnCLosingEvent; } }