mirror of
https://github.com/WowUp/WowUp.git
synced 2026-04-23 07:17:00 -04:00
209 lines
11 KiB
XML
209 lines
11 KiB
XML
<Window x:Class="WowUp.WPF.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:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:WowUp.WPF"
|
|
xmlns:vw = "clr-namespace:WowUp.WPF.Views"
|
|
xmlns:tb="http://www.hardcodet.net/taskbar"
|
|
mc:Ignorable="d"
|
|
Title="WowUp.io"
|
|
Padding="0"
|
|
AllowsTransparency="True"
|
|
Background="#383773"
|
|
Height="450"
|
|
Width="1024"
|
|
WindowStyle="None"
|
|
BorderThickness="0"
|
|
Margin="0"
|
|
MinWidth="800"
|
|
MinHeight="400"
|
|
SizeChanged="Window_SizeChanged"
|
|
BorderBrush="Transparent"
|
|
ResizeMode="CanResize"
|
|
StateChanged="Window_StateChanged"
|
|
IsVisibleChanged="Window_IsVisibleChanged"
|
|
Loaded="Window_Loaded">
|
|
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome CaptionHeight="32"
|
|
CornerRadius="0"
|
|
GlassFrameThickness="0"
|
|
ResizeBorderThickness="4" />
|
|
</WindowChrome.WindowChrome>
|
|
|
|
<Window.Resources>
|
|
<ResourceDictionary >
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="Views/Styles.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
|
|
<Border Style="{StaticResource WindowMainPanelStyle}">
|
|
<Grid Background="{StaticResource Dark3}" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<!--TOOLBAR-->
|
|
<Grid Grid.Row="0" Background="{StaticResource Purple1}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Grid.Column="0" Padding="10, 0" >
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="Assets/wowup_logo_512np.png" Margin="0, 0, 10, 0" Height="40"
|
|
RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<TextBlock Text="{Binding Title}" Foreground="White" VerticalAlignment="Center" FontSize="15"/>
|
|
</StackPanel>
|
|
</Border>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
<Button
|
|
x:Name="MinimizeButton"
|
|
Click="MinimizeButton_Click"
|
|
RenderOptions.EdgeMode="Aliased"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18,15 H 28"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
<Button x:Name="MaximizeButton"
|
|
Click="MaximizeRestoreButton_Click"
|
|
Visibility="{Binding MaximizeVisibility}"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
<Button x:Name="RestoreButton"
|
|
Click="MaximizeRestoreButton_Click"
|
|
Visibility="{Binding RestoreVisibility}"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
<Button x:Name="CloseButton"
|
|
Command="{Binding CloseWindowCommand}"
|
|
Style="{StaticResource TitleBarCloseButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18,11 27,20 M 18,20 27,11"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
<!--UPDATE VIEW-->
|
|
<vw:ApplicationUpdateControl Grid.Row="1" DataContext="{Binding ApplicationUpdateControlViewModel}" />
|
|
<!--SELECT FOLDER BLURB-->
|
|
<StackPanel Visibility="{Binding ShowWowSelection, Converter={StaticResource BoolToVisibilty}}"
|
|
Grid.Row="2"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center">
|
|
<TextBlock Text="Welcome" FontSize="20" HorizontalAlignment="Center" />
|
|
<TextBlock Text="We were unable to detect any installed World of Warcraft clients."
|
|
FontSize="14"
|
|
HorizontalAlignment="Center"/>
|
|
<TextBlock Text="Please ensure your Battle.net app is up to date!"
|
|
Foreground="{StaticResource White2Brush}"
|
|
FontSize="12"
|
|
HorizontalAlignment="Center"/>
|
|
|
|
<Label Margin="0 20 0 0" HorizontalAlignment="Center">
|
|
Manually Select World of Warcraft client location to get started.
|
|
</Label>
|
|
<StackPanel Margin="0 0 0 10" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<Label>World of Warcraft Client</Label>
|
|
<ComboBox x:Name="WowClientComboBox"
|
|
SelectedItem="{Binding SelectedClientType}"
|
|
Style="{StaticResource ComboBoxFlatStyle}"
|
|
ToolTip="World of Warcraft client type"
|
|
ItemsSource="{Binding WowClientTypes}">
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<i:InvokeCommandAction Command="{Binding SelectedWowClientChangedCommand}"
|
|
CommandParameter="{Binding ElementName=WowClientComboBox, Path=SelectedValue}"/>
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
<Button Command="{Binding SetWowLocationCommand}"
|
|
Style="{StaticResource purpleButton}"
|
|
ToolTip="Select World of Warcraft Folder">
|
|
Select Location
|
|
</Button>
|
|
<Label Foreground="{StaticResource White2Brush}"
|
|
HorizontalAlignment="Center"
|
|
Content="{Binding WowClientHint}"></Label>
|
|
</StackPanel>
|
|
<!--TABS-->
|
|
<TabControl x:Name="Tabs"
|
|
Grid.Row="2"
|
|
Visibility="{Binding ShowTabs, Converter={StaticResource BoolToVisibilty}}"
|
|
SelectedIndex="{Binding SelectedTabIndex}"
|
|
Style="{StaticResource CustomTabStyle}"
|
|
ItemsSource="{Binding TabItems}">
|
|
</TabControl>
|
|
<!--FOOTER-->
|
|
<Border Grid.Row="3" Padding="10 5" Background="{StaticResource Dark4}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Margin="0 0" HorizontalAlignment="Left" VerticalAlignment="Center">
|
|
<Hyperlink x:Name="PatreonLink" NavigateUri="https://www.patreon.com/jliddev" TextDecorations="None" RequestNavigate="PatreonLink_RequestNavigate">
|
|
<Image Source="/Assets/patron.png" Height="25" />
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="10 0">
|
|
<TextBlock Text="{Binding StatusText}"></TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="10 0" >
|
|
<TextBlock Text="{Binding ContextText}" Foreground="{StaticResource White3Brush}"></TextBlock>
|
|
</StackPanel>
|
|
<TextBlock Grid.Column="3" Text="{Binding Version}" VerticalAlignment="Center" Foreground="{StaticResource White3Brush}"></TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<tb:TaskbarIcon
|
|
x:Name="TrayIcon"
|
|
IconSource="/Assets/wowup_logo_512np_RRT_icon.ico"
|
|
ToolTipText="WowUp"
|
|
NoLeftClickDelay="True"
|
|
LeftClickCommand="{Binding TaskbarIconClickCommand}">
|
|
<tb:TaskbarIcon.ContextMenu>
|
|
<ContextMenu Style="{StaticResource DarkMenu}">
|
|
<MenuItem Header="WowUp" IsEnabled="False">
|
|
<MenuItem.Icon>
|
|
<Image Source="/Assets/wowup_logo_512np_RRT_icon.ico"
|
|
Width="16" Height="16" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Header="Quit WowUp" Command="{Binding TaskbarIconCloseCommand}" />
|
|
</ContextMenu>
|
|
</tb:TaskbarIcon.ContextMenu>
|
|
</tb:TaskbarIcon>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|