private void ShowSelectedSection(LevelSection levelSection) { var page = m_composePages.FirstOrDefault(x => x.Section == levelSection); if (page == null) { switch (levelSection) { case LevelSection.AR1: page = new ReadingQA(Level, LevelSection.AR1); break; case LevelSection.AR2: page = new ReadingPQA(Level, LevelSection.AR2); break; case LevelSection.AR3: page = new ReadingPA(Level, LevelSection.AR3); break; case LevelSection.AR4A: page = new WritingQA(Level, LevelSection.AR4A); break; case LevelSection.AR4B: page = new WritingQA(Level, LevelSection.AR4B); break; case LevelSection.AL1: page = new Listening1QA(Level, LevelSection.AL1); break; case LevelSection.AL2: page = new ListeningQA(Level, LevelSection.AL2); break; case LevelSection.AL3: page = new Listening1QA(Level, LevelSection.AL3); break; } m_composePages.Add(page); } pageTransition.ShowPage(page as UserControl); }
private void ShowSelectedSection(LevelSection levelSection) { var page = m_composePages.FirstOrDefault(x => x.Section == levelSection); if (page == null) { switch (levelSection) { // reading case LevelSection.B1R1: page = new ReadingQA(Level, LevelSection.B1R1); break; case LevelSection.B1R2: page = new ReadingPAB1B2(Level, LevelSection.B1R2); break; case LevelSection.B1R3: page = new ReadingPQAB1B2(Level, LevelSection.B1R3); break; case LevelSection.B1R4: page = new ReadingPQA(Level, LevelSection.B1R4); break; case LevelSection.B1R5: page = new ReadingPA(Level, LevelSection.B1R5); break; // writing case LevelSection.B1W1: page = new WritingQA(Level, LevelSection.B1W1); break; case LevelSection.B1W2: page = new WritingQA(Level, LevelSection.B1W2); break; case LevelSection.B1W3: page = new WritingQA(Level, LevelSection.B1W3); break; // listening case LevelSection.B1L1: page = new ListeningQA(Level, LevelSection.B1L1); break; case LevelSection.B1L2: page = new ListeningQA(Level, LevelSection.B1L2); break; case LevelSection.B1L3: page = new Listening1QA(Level, LevelSection.B1L3); break; case LevelSection.B1L4: page = new Listening1QA(Level, LevelSection.B1L4); break; } m_composePages.Add(page); } pageTransition.ShowPage(page as UserControl); }