MainWindow.xaml.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace MyTests
  16. {
  17. /// <summary>
  18. /// Логика взаимодействия для MainWindow.xaml
  19. /// </summary>
  20. public partial class MainWindow : Window
  21. {
  22. public MainWindow()
  23. {
  24. InitializeComponent();
  25. MainFrame.Content = new Pages.ProfilePage();
  26. }
  27. private void Border_MouseDown(object sender, MouseButtonEventArgs e)
  28. {
  29. if (e.LeftButton == MouseButtonState.Pressed)
  30. DragMove();
  31. }
  32. private void ButtonMininize_Click(object sender, RoutedEventArgs e)
  33. {
  34. Application.Current.MainWindow.WindowState = WindowState.Minimized;
  35. }
  36. private void WindowStateButton_Click(object sender, RoutedEventArgs e)
  37. {
  38. if (Application.Current.MainWindow.WindowState != WindowState.Maximized)
  39. Application.Current.MainWindow.WindowState = WindowState.Maximized;
  40. else
  41. Application.Current.MainWindow.WindowState = WindowState.Normal;
  42. }
  43. private void CloseButton_Click(object sender, RoutedEventArgs e)
  44. {
  45. Application.Current.Shutdown();
  46. }
  47. private void ProfileClick(object sender, RoutedEventArgs e)
  48. {
  49. MainFrame.Content = new Pages.ProfilePage();
  50. }
  51. private void TestsCatalogClick(object sender, RoutedEventArgs e)
  52. {
  53. //MainFrame.Content = new СatalogPage();
  54. }
  55. private void CreateTestClick(object sender, RoutedEventArgs e)
  56. {
  57. //MainFrame.Content = new СatalogPage();
  58. }
  59. }
  60. }