MainWindow.xaml.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace ROGOZ
  17. {
  18. /// <summary>
  19. /// Логика взаимодействия для MainWindow.xaml
  20. /// </summary>
  21. public partial class MainWindow : Window
  22. {
  23. public MainWindow()
  24. {
  25. InitializeComponent();
  26. MainFrame.Navigate(new Pages.TaskList());
  27. }
  28. private void Window_MouseDown(object sender, MouseButtonEventArgs e)
  29. {
  30. if (e.LeftButton == MouseButtonState.Pressed) { DragMove(); }
  31. }
  32. private void btnClose_Click(object sender, RoutedEventArgs e)
  33. {
  34. this.Close();
  35. }
  36. private void btnMinimize_Click(object sender, RoutedEventArgs e)
  37. {
  38. Application.Current.MainWindow.WindowState = WindowState.Minimized;
  39. }
  40. private void AccExit_Click(object sender, RoutedEventArgs e)
  41. {
  42. if (MessageBox.Show("Вы уверены, что хотите выйти из аккаунта ESOFT?", "Выйти", MessageBoxButton.YesNo, MessageBoxImage.Question)==MessageBoxResult.Yes)
  43. {
  44. Pages.Authorization authorization = new Pages.Authorization();
  45. authorization.Show();
  46. this.Close();
  47. }
  48. }
  49. }
  50. }