diff --git a/StatisticsAnalysisTool/StatisticsAnalysisTool/MainWindow.xaml.cs b/StatisticsAnalysisTool/StatisticsAnalysisTool/MainWindow.xaml.cs index a0bbdaf21..cb5e5a29a 100644 --- a/StatisticsAnalysisTool/StatisticsAnalysisTool/MainWindow.xaml.cs +++ b/StatisticsAnalysisTool/StatisticsAnalysisTool/MainWindow.xaml.cs @@ -185,7 +185,33 @@ private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) if (e.ClickCount == 2 && WindowState == WindowState.Maximized) WindowState = WindowState.Normal; } - private void MaximizedButton_Click(object sender, RoutedEventArgs e) => WindowState = (WindowState == WindowState.Normal) ? WindowState.Maximized : WindowState.Normal; + private static Rect _storedSize; + private static bool _isWindowMaximized; + + private void MaximizedButton_Click(object sender, RoutedEventArgs e) + { + if (_isWindowMaximized) + { + Left = _storedSize.Left; + Top = _storedSize.Top; + Height = _storedSize.Height; + Width = _storedSize.Width; + CenterWindowOnScreen(); + MaximizedButton.Content = 1; + _isWindowMaximized = false; + } + else + { + _storedSize.Width = Width; + _storedSize.Height = Height; + Left = SystemParameters.WorkArea.Left; + Top = SystemParameters.WorkArea.Top; + Height = SystemParameters.WorkArea.Height; + Width = SystemParameters.WorkArea.Width; + MaximizedButton.Content = 2; + _isWindowMaximized = true; + } + } private void CbMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { diff --git a/StatisticsAnalysisTool/StatisticsAnalysisTool/Properties/AssemblyInfo.cs b/StatisticsAnalysisTool/StatisticsAnalysisTool/Properties/AssemblyInfo.cs index cbfd9ece1..43f51056c 100644 --- a/StatisticsAnalysisTool/StatisticsAnalysisTool/Properties/AssemblyInfo.cs +++ b/StatisticsAnalysisTool/StatisticsAnalysisTool/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.1.*")] -[assembly: AssemblyFileVersion("1.2.1.0")] +[assembly: AssemblyVersion("1.2.2.*")] +[assembly: AssemblyFileVersion("1.2.2.0")]