1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System.Windows;
- using System.Windows.Input;
- namespace MyTests
- {
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- MainFrame.Content = new Pages.LoginPage();
- }
- #region Menu Bar
- private void Border_MouseDown(object sender, MouseButtonEventArgs e)
- {
- if (e.LeftButton == MouseButtonState.Pressed)
- DragMove();
- }
- private void ButtonMininize_Click(object sender, RoutedEventArgs e)
- {
- Application.Current.MainWindow.WindowState = WindowState.Minimized;
- }
- private void WindowStateButton_Click(object sender, RoutedEventArgs e)
- {
- if (Application.Current.MainWindow.WindowState != WindowState.Maximized)
- Application.Current.MainWindow.WindowState = WindowState.Maximized;
- else
- Application.Current.MainWindow.WindowState = WindowState.Normal;
- }
- private void CloseButton_Click(object sender, RoutedEventArgs e)
- {
- Application.Current.Shutdown();
- }
- #endregion
- }
- }
|