diff --git a/SmartAquaViewer/MainWindow.xaml b/SmartAquaViewer/MainWindow.xaml index fd81c7f..69256c3 100644 --- a/SmartAquaViewer/MainWindow.xaml +++ b/SmartAquaViewer/MainWindow.xaml @@ -9,59 +9,93 @@ xmlns:vm="clr-namespace:SmartAquaViewer.ViewModel" xmlns:helper="clr-namespace:SmartAquaViewer.Helper" mc:Ignorable="d" - Title="MainWindow" Height="1080" Width="1920" WindowStartupLocation="CenterScreen"> + Title="MainWindow" Height="1080" Width="1920" WindowStartupLocation="CenterScreen" Style="{StaticResource WindowChromeStyle}"> + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/SmartAquaViewer/MainWindow.xaml.cs b/SmartAquaViewer/MainWindow.xaml.cs index e1f78ba..641abed 100644 --- a/SmartAquaViewer/MainWindow.xaml.cs +++ b/SmartAquaViewer/MainWindow.xaml.cs @@ -22,12 +22,43 @@ namespace SmartAquaViewer { InitializeComponent(); - Loaded += MainWindow_Loaded; + StateChanged += MainWindow_StateChanged; } - private void MainWindow_Loaded(object sender, RoutedEventArgs e) + private void WindowNormal_Click(object sender, RoutedEventArgs e) { - + WindowState = WindowState.Normal; + appTitle.Margin = new Thickness(20, 0, 0, 0); + } + + private void WindowMax_Click(object sender, RoutedEventArgs e) + { + WindowState = WindowState.Maximized; + appTitle.Margin = new Thickness(20, 5, 0, 0); + } + + private void WindowMin_Click(object sender, RoutedEventArgs e) + { + WindowState = WindowState.Minimized; + } + + private void WindowClose_Click(object sender, RoutedEventArgs e) + { + Close(); + } + + private void MainWindow_StateChanged(object sender, EventArgs e) + { + if (WindowState == WindowState.Maximized) + { + windowNormal.Visibility = Visibility.Visible; + windowMax.Visibility = Visibility.Collapsed; + } + else if (WindowState == WindowState.Normal) + { + windowNormal.Visibility = Visibility.Collapsed; + windowMax.Visibility = Visibility.Visible; + } } } } \ No newline at end of file diff --git a/SmartAquaViewer/Resources/Generic.xaml b/SmartAquaViewer/Resources/Generic.xaml index ef1ba84..6ecf346 100644 --- a/SmartAquaViewer/Resources/Generic.xaml +++ b/SmartAquaViewer/Resources/Generic.xaml @@ -3,7 +3,8 @@ xmlns:helper="clr-namespace:SmartAquaViewer.Helper" xmlns:vm="clr-namespace:SmartAquaViewer.ViewModel" xmlns:model="clr-namespace:SmartAquaViewer.Model" - xmlns:da="clr-namespace:SmartAquaViewer.DataAnalysis"> + xmlns:da="clr-namespace:SmartAquaViewer.DataAnalysis" + xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework"> pack://application:,,,/Fonts/#S-Core Dream 1 Thin pack://application:,,,/Fonts/#S-Core Dream 2 ExtraLight @@ -15,6 +16,45 @@ pack://application:,,,/Fonts/#S-Core Dream 8 Heavy pack://application:,,,/Fonts/#S-Core Dream 9 Black + + + +