private bool CanSwitchPage(EmpePage newPage) { if (announcementAddOpened) return false; return true; }
private void CloseActualPage() { grMainPage.Children.Clear(); actualPage = EmpePage.NoPage; }
private void ShowPage(EmpePage newPage) { CloseActualPage(); switch (newPage) { case EmpePage.Calendar: CalendarControl cc = new CalendarControl(); grMainPage.Children.Add(cc); break; case EmpePage.AnnouncementAdd: AnnounceAddControl ac = new AnnounceAddControl(); ac.PageClosed += new RoutedEventHandler(CloseAnnouncementAdd); grMainPage.Children.Add(ac); announcementAddOpened = true; break; case EmpePage.AnnouncementLive: break; } actualPage = newPage; EnableButtons(); }