Skip to content

Commit

Permalink
Add maximized button on main window
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Schultz committed Jan 24, 2020
1 parent 0be07c8 commit 120a8d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions StatisticsAnalysisTool/StatisticsAnalysisTool/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<Grid>
<Grid ZIndex="-1" Background="{StaticResource SolidColorBrush.Background.Second}" Height="40" VerticalAlignment="Top" MouseDown="Hotbar_MouseDown" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
<Button x:Name="CloseButton" Style="{StaticResource WindowButtonStyle}" Content="r" Margin="-2,0,0,0" Click="CloseButton_Click"/>
<Button x:Name="MinimizeButton" Style="{StaticResource WindowButtonStyle}" Content="0" Margin="0,0,28,0" Click="MinimizeButton_Click"/>
<Label x:Name="LblToolName" Content="AlbionOnline - STATISTICS ANALYSIS TOOL | VERSION" Margin="52,0,61,0" VerticalContentAlignment="Center" VerticalAlignment="Top" Height="40" FontSize="20" Foreground="{StaticResource SolidColorBrush.Foreground.First}" FontWeight="Bold"/>
<Button x:Name="MaximizedButton" Style="{StaticResource WindowButtonStyle}" Content="1" Margin="0,0,28,0" Click="MaximizedButton_Click" />
<Button x:Name="MinimizeButton" Style="{StaticResource WindowButtonStyle}" Content="0" Margin="0,0,58,0" Click="MinimizeButton_Click"/>
<Label x:Name="LblToolName" Content="AlbionOnline - STATISTICS ANALYSIS TOOL | VERSION" Margin="52,0,128,0" VerticalContentAlignment="Center" VerticalAlignment="Top" Height="40" FontSize="20" Foreground="{StaticResource SolidColorBrush.Foreground.First}" FontWeight="Bold"/>
<Image HorizontalAlignment="Left" Height="37" VerticalAlignment="Top" Width="37" Source="logo.ico" Margin="10,0,0,0"/>
</Grid>
<Grid ZIndex="-1" Background="{StaticResource SolidColorBrush.Background.Second}" Height="40" VerticalAlignment="Top" Margin="0,40,0,0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Models;
using StatisticsAnalysisTool.Properties;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
Expand Down Expand Up @@ -187,6 +185,8 @@ 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 void CbMode_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var mode = (ComboboxMarketMode) CbMode.SelectedItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
)]


Expand All @@ -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.0.*")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.2.1.*")]
[assembly: AssemblyFileVersion("1.2.1.0")]

0 comments on commit 120a8d8

Please sign in to comment.