345 lines
17 KiB
XML
345 lines
17 KiB
XML
<Window x:Class="MultiWoWLauncher.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:MultiWoWLauncher"
|
|
mc:Ignorable="d"
|
|
Title="WoW Launcher" Height="450" Width="800"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterScreen"
|
|
WindowStyle="None"
|
|
AllowsTransparency="True"
|
|
BorderThickness="1"
|
|
BorderBrush="#333333"
|
|
Loaded="Window_Loaded"
|
|
Closed="Window_Closed">
|
|
|
|
<Grid>
|
|
<!-- Main background video -->
|
|
<MediaElement x:Name="BackgroundVideo"
|
|
Stretch="UniformToFill"
|
|
LoadedBehavior="Manual"
|
|
MediaOpened="BackgroundVideo_MediaOpened"
|
|
MediaEnded="BackgroundVideo_MediaEnded"
|
|
MediaFailed="BackgroundVideo_MediaFailed"
|
|
Volume="0" />
|
|
|
|
<!-- Fallback background -->
|
|
<Rectangle x:Name="FallbackBackground" Fill="#FF152238" Visibility="Collapsed"/>
|
|
|
|
<!-- Main content grid -->
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="36" />
|
|
<!-- Title bar height -->
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Custom title bar -->
|
|
<Border Grid.Row="0"
|
|
Background="#1a1a1a"
|
|
MouseDown="TitleBar_MouseDown">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="1" Opacity="0.6" BlurRadius="3"/>
|
|
</Border.Effect>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- WoW Icon/Logo (add your own image) -->
|
|
<Image Grid.Column="0"
|
|
Source="/Assets/wow_icon.png"
|
|
Width="22" Height="22"
|
|
Margin="8,0,0,0"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<!-- Title text with glow effect -->
|
|
<TextBlock Grid.Column="1"
|
|
Text="Plezi-WoW Laucher (Version 1.0.0)"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Left"
|
|
Margin="0,0,0,0"
|
|
FontFamily="Segoe UI"
|
|
FontWeight="SemiBold"
|
|
FontSize="14"
|
|
Foreground="#00aeff">
|
|
<TextBlock.Effect>
|
|
<BlurEffect Radius="0.5"/>
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
|
|
<!-- Close button with enhanced hover and click effects -->
|
|
<Button Grid.Column="2"
|
|
Content="✕"
|
|
Width="36" Height="36"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Foreground="#CCCCCC"
|
|
FontSize="16"
|
|
Cursor="Hand"
|
|
Click="CloseButton_Click">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="ButtonBackground"
|
|
Background="{TemplateBinding Background}"
|
|
CornerRadius="0">
|
|
<Grid>
|
|
<TextBlock x:Name="CloseText"
|
|
Text="{TemplateBinding Content}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<TextBlock.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform x:Name="ContentScale" ScaleX="1" ScaleY="1"/>
|
|
</TransformGroup>
|
|
</TextBlock.RenderTransform>
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<!-- Hover effect: background changes to red -->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ButtonBackground" Property="Background" Value="#E81123"/>
|
|
<Setter TargetName="CloseText" Property="Foreground" Value="White"/>
|
|
<!-- Optional glow effect on hover -->
|
|
<Setter TargetName="ButtonBackground" Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="0" Color="#E81123" Opacity="0.5" BlurRadius="10"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
|
|
<!-- Pressed effect: scale down slightly and darken -->
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="ButtonBackground" Property="Background" Value="#C1000F"/>
|
|
<Setter TargetName="CloseText" Property="Foreground" Value="#F0F0F0"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
<!-- Use animations instead of direct property setters for the scaling effect -->
|
|
<Button.Triggers>
|
|
<EventTrigger RoutedEvent="Button.PreviewMouseDown">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX"
|
|
To="0.9" Duration="0:0:0.1"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY"
|
|
To="0.9" Duration="0:0:0.1"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
<EventTrigger RoutedEvent="Button.PreviewMouseUp">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX"
|
|
To="1" Duration="0:0:0.1"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY"
|
|
To="1" Duration="0:0:0.1"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</Button.Triggers>
|
|
<Button.RenderTransform>
|
|
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
|
</Button.RenderTransform>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Semi-transparent overlay for the main content area -->
|
|
<Grid Grid.Row="1">
|
|
<Grid.Background>
|
|
<SolidColorBrush Color="Black" Opacity="0.3"/>
|
|
</Grid.Background>
|
|
|
|
<!-- Online Players Count Display -->
|
|
<Border HorizontalAlignment="Left"
|
|
VerticalAlignment="Bottom"
|
|
Margin="20,0,0,20"
|
|
Background="#33000000"
|
|
BorderBrush="#66FFFFFF"
|
|
BorderThickness="1"
|
|
CornerRadius="5"
|
|
Padding="10,5" Grid.Column="1">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="2" Opacity="0.3" BlurRadius="5"/>
|
|
</Border.Effect>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Ellipse x:Name="StatusIndicator"
|
|
Width="10" Height="10"
|
|
Fill="#4CAF50"
|
|
Margin="0,0,8,0"
|
|
VerticalAlignment="Center">
|
|
<Ellipse.Effect>
|
|
<DropShadowEffect ShadowDepth="0" Color="#4CAF50" Opacity="0.7" BlurRadius="6"/>
|
|
</Ellipse.Effect>
|
|
</Ellipse>
|
|
<TextBlock x:Name="OnlinePlayersText"
|
|
Text="Loading..."
|
|
Foreground="White"
|
|
FontSize="14"
|
|
FontWeight="Medium"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- News section in left column -->
|
|
<Border Grid.Column="0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Margin="450,20,20,100"
|
|
Background="#33000000"
|
|
BorderBrush="#66FFFFFF"
|
|
BorderThickness="1"
|
|
CornerRadius="8">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- News Header -->
|
|
<Border Grid.Row="0"
|
|
Background="#212121"
|
|
BorderBrush="#66FFFFFF"
|
|
BorderThickness="0,0,0,1"
|
|
CornerRadius="8,8,0,0">
|
|
<TextBlock Text="LATEST NEWS"
|
|
Foreground="#00aeff"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Margin="15,10"
|
|
HorizontalAlignment="Left"/>
|
|
</Border>
|
|
|
|
<TextBlock x:Name="LastUpdatedText"
|
|
Text="Updating..."
|
|
Foreground="#888888"
|
|
FontSize="10"
|
|
FontStyle="Italic"
|
|
Margin="0,0,10,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<!-- News Content Area -->
|
|
<ScrollViewer Grid.Row="1"
|
|
VerticalScrollBarVisibility="Auto"
|
|
Padding="0,0,5,0"
|
|
Background="Transparent"
|
|
Margin="0,0,0,0">
|
|
<!-- StackPanel for news items -->
|
|
<StackPanel x:Name="NewsPanel" Margin="15,10">
|
|
<!-- News items will be added here programmatically -->
|
|
<TextBlock Text="Loading news updates..."
|
|
Foreground="#CCCCCC"
|
|
FontStyle="Italic"
|
|
Margin="0,10"/>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Play button in bottom right -->
|
|
<Button Content="Play Game" Width="180" Height="50" Click="LaunchWoW_Click"
|
|
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
|
Margin="0,0,20,20">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="ButtonBorder"
|
|
Background="#00aeff"
|
|
BorderBrush="#000000"
|
|
BorderThickness="1"
|
|
CornerRadius="8">
|
|
<Border.Effect>
|
|
<BlurEffect Radius="1"/>
|
|
</Border.Effect>
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
TextBlock.Foreground="White"
|
|
TextBlock.FontWeight="Bold"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Background" Value="#59dded"/>
|
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#AAFFFFFF"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Background" Value="#4ab8c6"/>
|
|
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#99FFFFFF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<!-- Add this checkbox near your Play Game button -->
|
|
<CheckBox x:Name="ClearCacheCheckBox"
|
|
Content="Clear Cache"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Margin="0,0,220,30"
|
|
Foreground="White"
|
|
Checked="ClearCacheCheckBox_CheckedChanged"
|
|
Unchecked="ClearCacheCheckBox_CheckedChanged">
|
|
<CheckBox.Style>
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Custom checkbox -->
|
|
<Border x:Name="checkBoxBorder"
|
|
Width="18" Height="18"
|
|
Background="#333333"
|
|
BorderBrush="#66FFFFFF"
|
|
BorderThickness="1"
|
|
CornerRadius="3"
|
|
Margin="0,0,8,0">
|
|
<Path x:Name="checkMark"
|
|
Fill="#00aeff"
|
|
Data="M 3,8 L 7,12 L 14,5"
|
|
Stretch="Uniform"
|
|
Margin="2"
|
|
Visibility="Collapsed"
|
|
StrokeThickness="2"
|
|
Stroke="#00aeff"/>
|
|
</Border>
|
|
|
|
<!-- Checkbox text -->
|
|
<ContentPresenter Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Left"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
|
<Setter TargetName="checkBoxBorder" Property="Background" Value="#1a4363"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="#99FFFFFF"/>
|
|
<Setter TargetName="checkBoxBorder" Property="Background" Value="#444444"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</CheckBox.Style>
|
|
</CheckBox>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Window> |