public void OpenWindow() { Strategy = new WindowsManagementStrategy <StudentPassTestViewModel, StudentPassTestWindow>( new StudentPassTestViewModel(Test, TestDetails), new StudentPassTestWindow()); Strategy.OpenDialog(); Strategy.CloseParent(); }
public void OpenSuggestWindow() { switch (Role) { case AuthorizationRole.Student: Strategy = new WindowsManagementStrategy <StudentDashboardViewModel, StudentDashboard>( new StudentDashboardViewModel(User), new StudentDashboard()); Strategy.Open(); Strategy.CloseParent(); break; case AuthorizationRole.Teacher: throw new NotSupportedException("This method isn't implemented."); case AuthorizationRole.Administrator: throw new NotSupportedException("This method isn't implemented."); default: throw new ArgumentOutOfRangeException(); } }