mirror of
https://github.com/JosefNemec/Playnite.git
synced 2026-01-09 06:11:22 +08:00
91 lines
5.1 KiB
XML
91 lines
5.1 KiB
XML
<Window x:Class="PlayniteInstaller.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:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:local="clr-namespace:PlayniteInstaller"
|
|
mc:Ignorable="d"
|
|
WindowStartupLocation="CenterScreen" ResizeMode="NoResize"
|
|
Background="#252422"
|
|
Title="Playnite Installer" Width="600" SizeToContent="Height">
|
|
|
|
<StackPanel Margin="10">
|
|
<StackPanel.Resources>
|
|
<local:InstallStatusToVisibilityConverter x:Key="InstallStatusToVisibilityConverter" />
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}" />
|
|
</StackPanel.Resources>
|
|
|
|
<TextBlock FontSize="20" VerticalAlignment="Center" Margin="15,10,10,0">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
|
|
<Setter Property="Text" Value="Install Playnite" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Status}" Value="{x:Static local:InstallStatus.Downloading}">
|
|
<Setter Property="Text" Value="Downloading..." />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Status}" Value="{x:Static local:InstallStatus.Installing}">
|
|
<Setter Property="Text" Value="Installing..." />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
|
|
<Expander Header="Options" Margin="10" FontSize="{StaticResource FontSize}"
|
|
Visibility="{Binding Status, Converter={StaticResource InstallStatusToVisibilityConverter}, ConverterParameter={x:Static local:InstallStatus.Idle}}">
|
|
<StackPanel>
|
|
<DockPanel Margin="5">
|
|
<TextBlock Text="Destionation Folder" DockPanel.Dock="Left" Margin="10,5,10,5" />
|
|
<Button Content="Browse..." DockPanel.Dock="Right"
|
|
Command="{Binding BrowseCommand}"
|
|
Padding="10,0,10,0" Margin="10,0,10,0"/>
|
|
<TextBox DockPanel.Dock="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding DestionationFolder}" />
|
|
</DockPanel>
|
|
|
|
<CheckBox Content="Portable" HorizontalAlignment="Left"
|
|
IsChecked="{Binding Portable}"
|
|
ToolTipService.InitialShowDelay="0"
|
|
ToolTip="Installs Playnite in Portable mode.
All configuration files and game database will be stored in application's folder."
|
|
Margin="15,10,10,10"/>
|
|
</StackPanel>
|
|
</Expander>
|
|
|
|
<ProgressBar HorizontalAlignment="Stretch" Height="25" Margin="15,10,15,10"
|
|
Minimum="0" Maximum="100" Value="{Binding ProgressValue}">
|
|
<ProgressBar.Style>
|
|
<Style TargetType="ProgressBar" BasedOn="{StaticResource {x:Type ProgressBar}}">
|
|
<Setter Property="IsIndeterminate" Value="False" />
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Status}" Value="{x:Static local:InstallStatus.Installing}">
|
|
<Setter Property="IsIndeterminate" Value="True" />
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Status}" Value="{x:Static local:InstallStatus.Downloading}">
|
|
<Setter Property="IsIndeterminate" Value="False" />
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ProgressBar.Style>
|
|
</ProgressBar>
|
|
|
|
<DockPanel Margin="15,0,15,10">
|
|
<Button Content="Cancel" Padding="20,5,20,5"
|
|
IsCancel="True" DockPanel.Dock="Right"
|
|
Command="{Binding CancelCommand}"/>
|
|
<Button Content="Install" Padding="20,5,20,5" Margin="0,0,10,0"
|
|
IsDefault="True" DockPanel.Dock="Right"
|
|
Command="{Binding InstallCommand}"/>
|
|
<TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">
|
|
<Hyperlink Command="{Binding NavigateUrlCommand}"
|
|
CommandParameter="https://github.com/JosefNemec/Playnite/wiki/Installation-troubleshooting">
|
|
<Run Text="Having issues?" />
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</Window>
|