wabbajack/Wabbajack/Views/Compilers/CompilerView.xaml

315 lines
14 KiB
Plaintext
Raw Normal View History

2020-01-20 21:59:26 +00:00
<rxui:ReactiveUserControl
2019-11-02 00:17:23 +00:00
x:Class="Wabbajack.CompilerView"
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"
2019-11-02 00:17:23 +00:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
2019-11-24 23:42:28 +00:00
xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
2019-11-02 00:17:23 +00:00
xmlns:local="clr-namespace:Wabbajack"
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"
2020-01-20 21:59:26 +00:00
xmlns:rxui="http://reactiveui.net"
xmlns:wabbacommon="clr-namespace:Wabbajack.Common;assembly=Wabbajack.Common"
d:DataContext="{d:DesignInstance local:CompilerVM}"
2019-11-02 00:17:23 +00:00
d:DesignHeight="450"
d:DesignWidth="800"
2020-01-20 21:59:26 +00:00
x:TypeArguments="local:CompilerVM"
2019-11-02 00:17:23 +00:00
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
2019-11-30 09:08:04 +00:00
<RowDefinition Height="47" />
<RowDefinition Height="4*" />
<RowDefinition Height="*" MinHeight="150" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5" />
<ColumnDefinition Width="2*" />
2019-11-29 23:35:47 +00:00
<ColumnDefinition Width="5" />
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5" />
</Grid.ColumnDefinitions>
<local:HeatedBackgroundView
2020-01-20 21:59:26 +00:00
x:Name="HeatedBackground"
2019-11-29 05:52:23 +00:00
Grid.Row="0"
Grid.RowSpan="3"
Grid.Column="0"
2020-01-20 21:59:26 +00:00
Grid.ColumnSpan="5" />
2019-11-29 23:35:47 +00:00
<Border
2019-11-29 05:52:23 +00:00
x:Name="ModlistDetailsBackground"
Grid.Row="1"
Grid.Column="1"
2019-11-29 23:35:47 +00:00
Grid.ColumnSpan="2"
Margin="1,1,5,0"
Background="{StaticResource WindowBackgroundBrush}"
BorderThickness="0,0,1,1">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
<GradientStop Offset="0.5" Color="{StaticResource DarkBackgroundColor}" />
<GradientStop Offset="1" Color="{StaticResource WindowBackgroundColor}" />
</LinearGradientBrush>
</Border.BorderBrush>
</Border>
<Border
x:Name="ModlistDetailsHeatBorder"
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="2"
Margin="1,1,5,0"
BorderBrush="{StaticResource HeatedBorderBrush}"
2020-01-20 21:59:26 +00:00
BorderThickness="1" />
2019-11-29 23:35:47 +00:00
<Border
Grid.Row="1"
Grid.Column="3"
BorderBrush="{StaticResource BorderInterestBrush}"
BorderThickness="1,0,1,1">
2020-01-20 21:59:26 +00:00
<local:DetailImageView x:Name="DetailImage" BorderThickness="0" />
2019-11-29 23:35:47 +00:00
</Border>
<!-- Comes after image area so shadow can overlay -->
<local:TopProgressView
2020-01-20 21:59:26 +00:00
x:Name="TopProgressBar"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="0"
Grid.ColumnSpan="5"
2020-01-20 21:59:26 +00:00
OverhangShadow="True" />
2019-11-24 23:42:28 +00:00
<Button
x:Name="BackButton"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="5"
Width="30"
Height="30"
Margin="12,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>
<ScrollViewer
2020-01-20 21:59:26 +00:00
x:Name="SettingsScrollViewer"
Grid.Row="1"
Grid.Column="1"
2019-11-10 06:39:40 +00:00
Margin="5"
Background="Transparent"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
<StackPanel
Margin="0,5,0,0"
Background="Transparent"
Orientation="Vertical">
<StackPanel.Resources>
<Thickness
x:Key="TitleMargin"
Bottom="1"
Left="5" />
<Style
x:Key="ValueStyle"
BasedOn="{StaticResource MainTextBoxStyle}"
TargetType="TextBox">
<Setter Property="MaxLength" Value="50" />
<Setter Property="AcceptsTab" Value="False" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Margin" Value="0,0,0,6" />
</Style>
2019-11-17 07:28:33 +00:00
<Style
x:Key="PickerStyle"
BasedOn="{StaticResource MainFilePickerStyle}"
TargetType="local:FilePicker">
<Setter Property="Margin" Value="0,0,0,6" />
</Style>
</StackPanel.Resources>
<TextBlock Margin="{StaticResource TitleMargin}" Text="ModList Name" />
2020-01-20 21:59:26 +00:00
<TextBox x:Name="ModListNameSetting" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Author" />
2020-01-20 21:59:26 +00:00
<TextBox x:Name="AuthorNameSetting" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Description" />
<TextBox
2020-01-20 21:59:26 +00:00
x:Name="DescriptionSetting"
Height="150"
mahapps:TextBoxHelper.Watermark="(700 characters max)"
AcceptsReturn="True"
AcceptsTab="False"
MaxLength="700"
Style="{StaticResource ValueStyle}"
TextWrapping="Wrap" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Image" />
<local:FilePicker
2020-01-20 21:59:26 +00:00
x:Name="ImageFilePicker"
Style="{StaticResource PickerStyle}"
ToolTip="Path to an image to display for the modlist." />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Website" />
2020-01-20 21:59:26 +00:00
<TextBox x:Name="WebsiteSetting" Style="{StaticResource ValueStyle}" />
<TextBlock
Margin="{StaticResource TitleMargin}"
2019-12-20 07:14:43 +00:00
Text="Readme"
ToolTip="Path to a readme file." />
2019-12-20 07:14:43 +00:00
<Grid Margin="0,0,0,6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<local:FilePicker
2020-01-20 21:59:26 +00:00
x:Name="ReadmeFilePickerSetting"
2019-12-20 07:14:43 +00:00
Grid.Column="0"
Height="27"
Margin="0,0,3,0"
VerticalAlignment="Center"
2020-01-20 21:59:26 +00:00
ToolTip="Path to a readme file." />
2019-12-20 07:14:43 +00:00
<TextBox
2020-01-20 21:59:26 +00:00
x:Name="ReadmeWebsiteSetting"
2019-12-20 07:14:43 +00:00
Grid.Column="0"
Height="27"
Margin="0,0,3,0"
VerticalAlignment="Center"
2020-01-20 21:59:26 +00:00
ToolTip="Readme website" />
2019-12-20 07:14:43 +00:00
<Button
2020-01-20 21:59:26 +00:00
x:Name="SwapToReadmeWebsiteButton"
2019-12-20 07:14:43 +00:00
Grid.Column="1"
Width="27"
ToolTip="Set readme to be a website">
<Button.Style>
<Style BasedOn="{StaticResource IconBareButtonStyle}" TargetType="Button">
<Style.Triggers>
2020-01-20 21:59:26 +00:00
<DataTrigger Binding="{Binding CurrentModlistSettings.ReadmeIsWebsite}" Value="True">
2019-12-20 07:14:43 +00:00
<Setter Property="Foreground" Value="{StaticResource SecondaryBrush}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
<icon:PackIconMaterial
Width="20"
Height="20"
Kind="Web" />
</Button>
<Button
2020-01-20 21:59:26 +00:00
x:Name="SwapToReadmeFileButton"
2019-12-20 07:14:43 +00:00
Grid.Column="2"
Width="27"
ToolTip="Source readme from a local file (txt | html)">
<Button.Style>
<Style BasedOn="{StaticResource IconBareButtonStyle}" TargetType="Button">
<Style.Triggers>
2020-01-20 21:59:26 +00:00
<DataTrigger Binding="{Binding CurrentModlistSettings.ReadmeIsWebsite}" Value="False">
2019-12-20 07:14:43 +00:00
<Setter Property="Foreground" Value="{StaticResource SecondaryBrush}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
<icon:PackIconMaterial
Width="20"
Height="20"
Kind="File" />
</Button>
</Grid>
</StackPanel>
</ScrollViewer>
<Border
2019-11-29 05:52:23 +00:00
x:Name="BottomBarBackground"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="5"
Margin="5"
Background="{StaticResource WindowBackgroundBrush}" />
<Grid
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="5"
MaxWidth="1000">
<Grid
2020-01-20 21:59:26 +00:00
x:Name="BottomCompilerSettingsGrid"
Margin="35,0,35,0"
VerticalAlignment="Center"
2020-01-20 21:59:26 +00:00
ClipToBounds="False">
<Grid.RowDefinitions>
2019-11-10 06:39:40 +00:00
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
2019-11-10 06:39:40 +00:00
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
2019-11-10 06:39:40 +00:00
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
2019-11-10 06:39:40 +00:00
<Grid
Grid.Row="0"
2019-11-10 06:39:40 +00:00
Grid.RowSpan="5"
Grid.Column="0"
2019-11-10 06:39:40 +00:00
Margin="15"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:ImageRadioButtonView
2020-01-20 21:59:26 +00:00
x:Name="MO2CompilerButton"
2019-11-10 06:39:40 +00:00
Grid.Row="0"
Height="35"
Margin="4"
IsChecked="{Binding SelectedCompilerType, Converter={StaticResource EqualsToBoolConverter}, ConverterParameter={x:Static wabbacommon:ModManager.MO2}}">
2019-11-10 06:39:40 +00:00
<local:ImageRadioButtonView.Image>
<BitmapImage UriSource="../../Resources/MO2Button.png" />
2019-11-10 06:39:40 +00:00
</local:ImageRadioButtonView.Image>
</local:ImageRadioButtonView>
<local:ImageRadioButtonView
2020-01-20 21:59:26 +00:00
x:Name="VortexCompilerButton"
2019-11-10 06:39:40 +00:00
Grid.Row="1"
Height="35"
Margin="4"
IsChecked="{Binding SelectedCompilerType, Converter={StaticResource EqualsToBoolConverter}, ConverterParameter={x:Static wabbacommon:ModManager.Vortex}}">
2019-11-10 06:39:40 +00:00
<local:ImageRadioButtonView.Image>
<BitmapImage UriSource="../../Resources/VortexButton.png" />
2019-11-10 06:39:40 +00:00
</local:ImageRadioButtonView.Image>
</local:ImageRadioButtonView>
</Grid>
<ContentPresenter
2020-01-20 21:59:26 +00:00
x:Name="CustomCompilerSettingsPresenter"
2019-11-10 06:39:40 +00:00
Grid.Row="1"
2020-01-20 21:59:26 +00:00
Grid.Column="1">
<ContentPresenter.Resources>
<DataTemplate DataType="{x:Type local:MO2CompilerVM}">
<local:MO2CompilerConfigView />
</DataTemplate>
2019-11-16 23:10:17 +00:00
<DataTemplate DataType="{x:Type local:VortexCompilerVM}">
<local:VortexCompilerConfigView />
</DataTemplate>
</ContentPresenter.Resources>
</ContentPresenter>
<local:BeginButton
2020-01-20 21:59:26 +00:00
x:Name="BeginButton"
Grid.Row="0"
Grid.RowSpan="3"
2020-01-20 21:59:26 +00:00
Grid.Column="5" />
</Grid>
</Grid>
<Grid
2020-01-20 21:59:26 +00:00
x:Name="MidCompilationGrid"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="5"
2020-01-20 21:59:26 +00:00
Margin="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>
2020-01-20 21:59:26 +00:00
<local:LogView x:Name="LogView" Grid.Column="0" />
<local:CpuView
2020-01-20 21:59:26 +00:00
x:Name="CpuView"
Grid.Column="2"
ViewModel="{Binding}" />
2020-01-20 21:59:26 +00:00
<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}}" />
</Grid>
2019-12-19 04:44:43 +00:00
</local:AttentionBorder>
<local:CompilationCompleteView
x:Name="CompilationComplete"
Grid.Column="2"
ViewModel="{Binding}" />
</Grid>
</Grid>
2020-01-20 21:59:26 +00:00
</rxui:ReactiveUserControl>