-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
205 lines (205 loc) · 12.6 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<Window x:Class="GameLauncher1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:GameLauncher1"
xmlns:svg="http://sharpvectors.codeplex.com/svg"
WindowStartupLocation="CenterScreen"
ContentRendered="Window_ContentRendered"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Title="Game Launcher" Height="720" Width="1280"
WindowStyle="None">
<Window.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black"/>
<GradientStop Color="Teal" Offset=".3"/>
<GradientStop Color="Cyan" Offset=".5"/>
</LinearGradientBrush>
</Window.Background>
<Window.Resources>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="LightBlue"/>
<Setter Property="BorderBrush" TargetName="border" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="Teal"/>
<Setter Property="BorderBrush" TargetName="border" Value="Teal"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MinimizeButtonStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="LightBlue"/>
<Setter Property="BorderBrush" TargetName="border" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="Teal"/>
<Setter Property="BorderBrush" TargetName="border" Value="Teal"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.Effect>
<DropShadowEffect
BlurRadius="30"
ShadowDepth="2"
Direction="90"
Color="Gray">
</DropShadowEffect>
</Grid.Effect>
<Image Stretch="UniformToFill" Source="/Assets/Images/rasters/PokiBG.png" HorizontalAlignment="Right"></Image>
<TextBlock Name="VersionText" VerticalAlignment="Bottom" HorizontalAlignment="Right" FontSize="20" Foreground="Black" Margin="0, 0, 5, 0" Text="AAA"/>
<Button x:Name="PlayButton" Style="{DynamicResource RoundButton}" Content="Checking For Updates" Click="PlayButton_Click" Height="125" FontSize="50" FontWeight="Bold" Margin="0,0,0,60" VerticalAlignment="Bottom" HorizontalAlignment="Center" MinWidth="500" Grid.Row="2" Padding="10,10,10,10" FontFamily="Dosis" BorderBrush="#FF8DFFFF" BorderThickness="5,5,5,5">
<Button.Effect>
<DropShadowEffect/>
</Button.Effect>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="40"/>
</Style>
<Style TargetType="Button" x:Key="RoundButton">
<Style.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="40"/>
</Style>
</Style.Resources>
</Style>
</Button.Resources>
<Button.RenderTransform>
<TransformGroup>
<SkewTransform AngleX="{Binding PlayButtonAngleX}"/>
</TransformGroup>
</Button.RenderTransform>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF01DEDE"/>
<GradientStop Color="#FF00C8C8" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
<Button.Foreground>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF80FFFF"/>
<GradientStop Color="#FFC8FFFF" Offset="1"/>
</LinearGradientBrush>
</Button.Foreground>
</Button>
<Grid Height="80"
VerticalAlignment="Top">
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Cyan" Offset="0.8"/>
<GradientStop Color="#0000FFFF" Offset="1"/>
</LinearGradientBrush>
</Grid.Background>
<TextBlock Text="Game Launcher"
FontFamily="Dosis Bold"
FontSize="32"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="#009999" Margin="0,0,0,16"/>
<Button Style="{DynamicResource CloseButtonStyle}" Height="48"
Width="48"
Background="Transparent"
BorderThickness="0"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Margin="0,0,24,16"
Click="Exit">
<Image Name="ExitButtonImage" Source="/Assets/Images/rasters/1icons8-close-1600.png" Margin="0,0,0,0">
</Image>
</Button>
<Button Style="{DynamicResource MinimizeButtonStyle}" Height="48"
Width="48"
Background="Transparent"
BorderThickness="0"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Margin="0,0,120,16"
Click="Minimize">
<Image Name="MinimizeButtonImage" Source="/Assets/Images/rasters/windows 11 minus icon.png.icons8.png" Margin="0,0,0,0">
</Image>
</Button>
</Grid>
<TextBlock Margin="80,120,80,215" FontSize="18" FontFamily="Doppio One" Foreground="White">
Credits:<LineBreak/>
/// Poki - Background<LineBreak/>
/// NicoDevo - Some Music<LineBreak/>
/// Kasper_100 - Stuff from Physics gaem<LineBreak/>
/// C# Design Pro - Some Help with Launcher Stuff and Design<LineBreak/>
/// icons8 - Close/Minimize Button<LineBreak/>
</TextBlock>
</Grid>
</Window>