public MultiGradeTabControl(School school) { foreach (Grade grade in school) { GradeTabPage page = new GradeTabPage(grade); page.GpaUpdated += OnGpaUpdated; TabPages.Add(page); if (school.SelectedGrade == grade) SelectedTab = page; } _school = school; }
public MultiGradeTabControl(School school) { _school = school; foreach (Grade grade in school) { GradeTabPage page = new GradeTabPage(grade); page.GpaUpdated += OnGpaUpdated; TabPages.Add(page); if (school.SelectedGrade == grade) { SelectedTab = page; } } }