wabbajack/Wabbajack/Views/Compilers/CompilerView.xaml
2020-04-27 11:58:33 +02:00

251 lines
11 KiB
XML

<rxui:ReactiveUserControl
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rxui="http://reactiveui.net"
xmlns:wabbacommon="clr-namespace:Wabbajack.Common;assembly=Wabbajack.Common"
d:DataContext="{d:DesignInstance local:CompilerVM}"
d:DesignHeight="450"
d:DesignWidth="800"
x:TypeArguments="local:CompilerVM"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="47" />
<RowDefinition Height="4*" />
<RowDefinition Height="*" MinHeight="150" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5" />
</Grid.ColumnDefinitions>
<local:HeatedBackgroundView
x:Name="HeatedBackground"
Grid.Row="0"
Grid.RowSpan="3"
Grid.Column="0"
Grid.ColumnSpan="5" />
<Border
x:Name="ModlistDetailsBackground"
Grid.Row="1"
Grid.Column="1"
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}"
BorderThickness="1" />
<Border
Grid.Row="1"
Grid.Column="3"
BorderBrush="{StaticResource BorderInterestBrush}"
BorderThickness="1,0,1,1">
<local:DetailImageView x:Name="DetailImage" BorderThickness="0" />
</Border>
<!-- Comes after image area so shadow can overlay -->
<local:TopProgressView
x:Name="TopProgressBar"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="0"
Grid.ColumnSpan="5"
OverhangShadow="True" />
<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"
Style="{StaticResource IconCircleButtonStyle}"
ToolTip="Back to main menu">
<icon:PackIconMaterial Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Kind="ArrowLeft" />
</Button>
<ScrollViewer
x:Name="SettingsScrollViewer"
Grid.Row="1"
Grid.Column="1"
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="150" />
<Setter Property="AcceptsTab" Value="False" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Margin" Value="0,0,0,6" />
</Style>
<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" />
<TextBox x:Name="ModListNameSetting" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Version" />
<TextBox x:Name="VersionSetting" Style="{StaticResource ValueStyle}" MaxLength="9" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Author" />
<TextBox x:Name="AuthorNameSetting" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Description" />
<TextBox
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
x:Name="ImageFilePicker"
Style="{StaticResource PickerStyle}"
ToolTip="Path to an image to display for the modlist." />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Website" />
<TextBox x:Name="WebsiteSetting" Style="{StaticResource ValueStyle}" />
<TextBlock
Margin="{StaticResource TitleMargin}"
Text="Readme"
ToolTip="Link to the Readme." />
<TextBox x:Name="ReadmeSetting" Style="{StaticResource ValueStyle}"/>
<StackPanel Orientation="Horizontal" Margin="0 6 0 0">
<TextBlock>NSFW:</TextBlock>
<CheckBox x:Name="NSFWSetting" Margin="8 1 0 0"
ToolTip="Select this if your Modlist has adult themed content such as SexLab or other mods involving sexual acts. Nude body replacer do not fall under this category neither do slutty outfits or gore."/>
</StackPanel>
</StackPanel>
</ScrollViewer>
<Border
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
x:Name="BottomCompilerSettingsGrid"
Margin="35,0,35,0"
VerticalAlignment="Center"
ClipToBounds="False">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid
Grid.Row="0"
Grid.RowSpan="5"
Grid.Column="0"
Margin="15"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:ImageRadioButtonView
x:Name="MO2CompilerButton"
Grid.Row="0"
Height="35"
Margin="4"
IsChecked="{Binding SelectedCompilerType, Converter={StaticResource EqualsToBoolConverter}, ConverterParameter={x:Static wabbacommon:ModManager.MO2}}">
<local:ImageRadioButtonView.Image>
<BitmapImage UriSource="../../Resources/MO2Button.png" />
</local:ImageRadioButtonView.Image>
</local:ImageRadioButtonView>
</Grid>
<ContentPresenter
x:Name="CustomCompilerSettingsPresenter"
Grid.Row="1"
Grid.Column="1">
<ContentPresenter.Resources>
<DataTemplate DataType="{x:Type local:MO2CompilerVM}">
<local:MO2CompilerConfigView />
</DataTemplate>
</ContentPresenter.Resources>
</ContentPresenter>
<local:BeginButton
x:Name="BeginButton"
Grid.Row="0"
Grid.RowSpan="3"
Grid.Column="5" />
</Grid>
</Grid>
<Grid
x:Name="MidCompilationGrid"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="5"
Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="3*" />
</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}}" />
</Grid>
</local:AttentionBorder>
<local:CompilationCompleteView
x:Name="CompilationComplete"
Grid.Column="2"
ViewModel="{Binding}" />
</Grid>
</Grid>
</rxui:ReactiveUserControl>