wabbajack/Wabbajack/Views/Installers/InstallationView.xaml

417 lines
19 KiB
Plaintext
Raw Normal View History

<rxui:ReactiveUserControl
x:Class="Wabbajack.InstallationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="clr-namespace:Wabbajack.Common;assembly=Wabbajack.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
2019-11-02 00:17:23 +00:00
xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:lib="clr-namespace:Wabbajack.Lib;assembly=Wabbajack.Lib"
xmlns:local="clr-namespace:Wabbajack"
2020-01-16 02:29:45 +00:00
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
2019-11-02 00:17:23 +00:00
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rxui="http://reactiveui.net"
2019-11-09 01:53:32 +00:00
d:DataContext="{d:DesignInstance local:InstallerVM}"
d:DesignHeight="500"
d:DesignWidth="800"
x:TypeArguments="local:InstallerVM"
mc:Ignorable="d">
<UserControl.Resources>
2019-11-02 00:17:23 +00:00
<Style
x:Key="SlideshowButton"
BasedOn="{StaticResource CircleButtonStyle}"
TargetType="ButtonBase">
<Setter Property="Width" Value="40" />
<Setter Property="Height" Value="40" />
<Setter Property="Margin" Value="4" />
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
2019-11-30 09:08:04 +00:00
<RowDefinition Height="47" />
<RowDefinition Height="4*" />
<RowDefinition Height="*" MinHeight="175" />
</Grid.RowDefinitions>
<Rectangle
2019-11-02 07:17:21 +00:00
x:Name="BorderEdgeFadeDown"
Grid.Row="1"
Grid.RowSpan="2">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#191919" />
<GradientStop Offset="0.4" Color="#00191919" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<local:HeatedBackgroundView
x:Name="HeatedBackground"
Grid.Row="0"
Grid.RowSpan="3" />
2019-11-09 01:53:32 +00:00
<Grid
2019-11-02 00:17:23 +00:00
x:Name="Slideshow"
2019-11-07 05:33:08 +00:00
Grid.Row="1"
2019-11-09 01:53:32 +00:00
Margin="5,0,5,5">
<Border BorderBrush="{StaticResource BorderInterestBrush}" BorderThickness="1,0,1,1">
2020-01-16 02:29:45 +00:00
<Grid>
<local:DetailImageView x:Name="DetailImage" />
<mahapps:ProgressRing x:Name="ModlistLoadingRing" />
2020-01-16 02:29:45 +00:00
</Grid>
2019-11-09 01:53:32 +00:00
</Border>
<Grid
Margin="0,20,25,0"
HorizontalAlignment="Right"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
2019-11-09 01:53:32 +00:00
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
2019-11-09 01:53:32 +00:00
<Grid.Effect>
<DropShadowEffect
BlurRadius="25"
Opacity="1"
Color="Black" />
</Grid.Effect>
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Opacity" Value="0" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, ElementName=Slideshow}" Value="True" />
<Condition Binding="{Binding Installing}" Value="True" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
To="1"
Duration="0:0:0.12" />
</Storyboard>
</BeginStoryboard>
</MultiDataTrigger.EnterActions>
<MultiDataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
<LinearDoubleKeyFrame KeyTime="0:0:0.3" Value="1" />
<LinearDoubleKeyFrame KeyTime="0:0:0.42" Value="0" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</MultiDataTrigger.ExitActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Button
x:Name="SkipSlideButton"
2019-11-09 01:53:32 +00:00
Grid.Column="3"
Width="60"
Height="60"
2019-11-09 01:53:32 +00:00
Margin="6"
Background="{StaticResource BackgroundBrush}"
Style="{StaticResource CircleButtonStyle}"
ToolTip="Skip to the next mod">
<icon:PackIconFontAwesome
Width="28"
Height="28"
Kind="ChevronRightSolid" />
</Button>
<ToggleButton
x:Name="PlayPauseButton"
Grid.Column="2"
Margin="6"
Background="{StaticResource BackgroundBrush}"
Style="{StaticResource SlideshowButton}">
2019-11-09 01:53:32 +00:00
<icon:PackIconMaterial>
<icon:PackIconMaterial.Style>
<Style TargetType="icon:PackIconMaterial">
<Setter Property="Kind" Value="Play" />
<Style.Triggers>
<DataTrigger Binding="{Binding Slideshow.Enable}" Value="True">
2019-11-09 01:53:32 +00:00
<Setter Property="Kind" Value="Pause" />
</DataTrigger>
</Style.Triggers>
</Style>
2019-11-09 01:53:32 +00:00
</icon:PackIconMaterial.Style>
</icon:PackIconMaterial>
</ToggleButton>
<Button
x:Name="OpenWebsite"
Grid.Column="1"
2019-11-09 01:53:32 +00:00
Margin="6"
Background="{StaticResource BackgroundBrush}"
Style="{StaticResource SlideshowButton}"
ToolTip="Open mod's website">
2019-11-09 01:53:32 +00:00
<icon:PackIconMaterial
Width="28"
Height="28"
Kind="Web" />
</Button>
<ToggleButton
x:Name="ShowNSFWButton"
Grid.Column="0"
2019-11-09 01:53:32 +00:00
Background="{StaticResource BackgroundBrush}"
Style="{StaticResource SlideshowButton}">
2019-11-09 01:53:32 +00:00
<Grid>
<TextBlock
Margin="4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="Lucida Sans"
FontSize="9"
FontWeight="Bold"
Text="NSFW" />
<icon:PackIconOcticons
x:Name="NSFWSlashIcon"
2019-11-09 01:53:32 +00:00
Width="40"
Height="40"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="#88FFFFFF"
Kind="CircleSlash" />
2019-11-09 01:53:32 +00:00
</Grid>
</ToggleButton>
</Grid>
2019-11-09 01:53:32 +00:00
</Grid>
2019-11-02 00:17:23 +00:00
<!-- Comes after slideshow control, so that any effects/overlap goes on top -->
2019-11-09 04:21:33 +00:00
<local:TopProgressView
x:Name="TopProgressBar"
2019-11-09 04:21:33 +00:00
Grid.Row="0"
Grid.RowSpan="2">
2019-11-09 04:21:33 +00:00
<!-- Readd when Pause/Stop implementations added -->
<!--<Button Grid.Column="2"
ToolTip="Pause Installation"
Margin="0,0,0,5"
Width="50"
Visibility="{Binding StartedInstallation, Converter={StaticResource bool2VisibilityConverter}}">
2019-11-09 04:21:33 +00:00
<icon:PackIconMaterial
Kind="Pause" />
</Button>
<Button Grid.Column="3"
ToolTip="Stop Installation"
Margin="0,0,0,5"
Width="50"
Visibility="{Binding StartedInstallation, Converter={StaticResource bool2VisibilityConverter}}" >
2019-11-09 04:21:33 +00:00
<icon:PackIconFontAwesome
Width="25"
Height="25"
Kind="TimesCircleSolid" />
</Button>-->
</local:TopProgressView>
2019-11-24 23:42:28 +00:00
<Button
x:Name="BackButton"
Grid.Row="0"
Grid.RowSpan="2"
Width="30"
Height="30"
Margin="7,5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
2019-11-30 09:08:04 +00:00
Style="{StaticResource IconCircleButtonStyle}"
2019-11-24 23:42:28 +00:00
ToolTip="Back to main menu">
<icon:PackIconMaterial Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Kind="ArrowLeft" />
</Button>
2019-11-02 00:17:23 +00:00
<!-- Bottom Area -->
<Grid
x:Name="BottomButtonInputGrid"
2019-11-07 05:33:08 +00:00
Grid.Row="2"
Margin="5,0,5,5"
ClipToBounds="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="4" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
2019-11-02 00:17:23 +00:00
<Grid Grid.Column="0" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
2019-11-02 00:17:23 +00:00
<Button
x:Name="OpenReadmePreInstallButton"
2019-11-02 00:17:23 +00:00
Grid.Row="0"
Margin="30,5"
FontSize="20"
Style="{StaticResource LargeButtonStyle}"
2019-12-15 07:10:04 +00:00
ToolTip="Open the readme for the modlist">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="82" />
</Grid.ColumnDefinitions>
<icon:PackIconFontAwesome
Grid.Column="0"
Width="30"
Height="30"
VerticalAlignment="Center"
Kind="ReadmeBrands" />
<TextBlock
Grid.Column="1"
Margin="10,0,0,0"
VerticalAlignment="Center"
Text="Readme" />
</Grid>
</Button>
2019-11-02 00:17:23 +00:00
<Button
x:Name="VisitWebsitePreInstallButton"
2019-11-02 00:17:23 +00:00
Grid.Row="1"
Margin="30,5"
FontSize="20"
Style="{StaticResource LargeButtonStyle}"
2019-12-15 07:10:04 +00:00
ToolTip="Open the webpage for the modlist">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="82" />
</Grid.ColumnDefinitions>
<icon:PackIconMaterial
Grid.Column="0"
Width="30"
Height="30"
VerticalAlignment="Center"
Kind="Web" />
<TextBlock
Grid.Column="1"
Margin="10,0,0,0"
VerticalAlignment="Center"
Text="Website" />
</Grid>
</Button>
2019-11-02 00:17:23 +00:00
<Button
x:Name="ShowManifestPreInstallButton"
2019-11-02 00:17:23 +00:00
Grid.Row="2"
Margin="30,5"
FontSize="20"
Style="{StaticResource LargeButtonStyle}"
2019-12-15 07:10:04 +00:00
ToolTip="Open an explicit listing of all actions this modlist will take">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition Width="82" />
</Grid.ColumnDefinitions>
<icon:PackIconOcticons
Grid.Column="0"
Width="30"
Height="30"
VerticalAlignment="Center"
Kind="Checklist" />
<TextBlock
Grid.Column="1"
Margin="10,0,0,0"
VerticalAlignment="Center"
Text="Manifest" />
</Grid>
</Button>
</Grid>
2019-11-02 00:17:23 +00:00
<Grid
x:Name="InstallationConfigurationView"
Grid.Column="2"
Background="{StaticResource WindowBackgroundBrush}">
2019-12-03 01:00:49 +00:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid
2019-12-03 01:00:49 +00:00
Grid.Column="0"
2019-11-02 00:17:23 +00:00
Margin="5"
VerticalAlignment="Center"
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="5" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="120" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle x:Name="InstallConfigSpacer" Grid.Row="0" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontSize="14"
Text="Target Modlist"
TextAlignment="Center" />
<local:FilePicker
x:Name="ModListLocationPicker"
Grid.Row="1"
Grid.Column="2"
Height="30"
VerticalAlignment="Center"
FontSize="14" />
<ContentPresenter
x:Name="InstallerCustomizationContent"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="3"
VerticalAlignment="Top">
<ContentPresenter.Resources>
<DataTemplate DataType="{x:Type local:MO2InstallerVM}">
<local:MO2InstallerConfigView />
</DataTemplate>
<DataTemplate DataType="{x:Type local:VortexInstallerVM}">
<local:VortexInstallerConfigView />
</DataTemplate>
</ContentPresenter.Resources>
<ContentPresenter.Style>
<Style TargetType="ContentPresenter">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Content}" Value="{x:Null}">
<Setter Property="ContentPresenter.ContentTemplate">
<Setter.Value>
<DataTemplate>
<Rectangle Height="74" />
</DataTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ContentPresenter.Style>
</ContentPresenter>
</Grid>
2019-12-03 01:00:49 +00:00
<local:BeginButton
x:Name="BeginButton"
2019-12-03 01:00:49 +00:00
Grid.Column="2"
Margin="0,0,25,0"
HorizontalAlignment="Right"
VerticalAlignment="Center" />
</Grid>
</Grid>
<Grid
x:Name="MidInstallDisplayGrid"
2019-11-07 05:33:08 +00:00
Grid.Row="2"
Margin="5,0,5,5">
2019-12-08 22:30:49 +00:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*" />
2019-12-08 22:30:49 +00:00
<ColumnDefinition Width="5" />
<ColumnDefinition Width="3*" />
2019-12-08 22:30:49 +00:00
</Grid.ColumnDefinitions>
<local:LogView x:Name="LogView" Grid.Column="0" />
<local:CpuView
x:Name="CpuView"
Grid.Column="2"
ViewModel="{Binding}" />
<local:AttentionBorder x:Name="UserInterventionsControl" Grid.Column="2">
<Grid>
<local:ConfirmationInterventionView DataContext="{Binding ActiveGlobalUserIntervention}" Visibility="{Binding ActiveGlobalUserIntervention, Converter={StaticResource IsTypeVisibilityConverter}, ConverterParameter={x:Type common:ConfirmationIntervention}}" />
<local:ConfirmUpdateOfExistingInstallView Visibility="{Binding ActiveGlobalUserIntervention, Converter={StaticResource IsTypeVisibilityConverter}, ConverterParameter={x:Type lib:ConfirmUpdateOfExistingInstall}}" />
</Grid>
2019-12-19 04:44:43 +00:00
</local:AttentionBorder>
<local:InstallationCompleteView
x:Name="InstallComplete"
Grid.Column="2"
ViewModel="{Binding}" />
</Grid>
</Grid>
</rxui:ReactiveUserControl>