MainPage.xaml.cs 821 B

12345678910111213141516171819202122232425262728
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace MyTests.Pages
  4. {
  5. public partial class MainPage : Page
  6. {
  7. public MainPage()
  8. {
  9. InitializeComponent();
  10. if (Session.User.Post != "Преподаватель")
  11. CreateTest.Visibility = Visibility.Collapsed;
  12. }
  13. private void ProfileClick(object sender, RoutedEventArgs e)
  14. {
  15. MainContentFrame.Content = new Pages.ProfilePage(Session.User);
  16. }
  17. private void TestsCatalogClick(object sender, RoutedEventArgs e)
  18. {
  19. MainContentFrame.Content = new Pages.TestsCatalog();
  20. }
  21. private void CreateTestClick(object sender, RoutedEventArgs e)
  22. {
  23. MainContentFrame.Content = new EditTestPage();
  24. }
  25. }
  26. }