wabbajack/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml
EzioTheDeadPoet 7ca983e26a compiler settings file picker QoL changes
allow selection of files for including.
allow selection of files for ignoring.
allow multiselect for files and folders.
allow multiselect for additional profiles.
allow multiselect for always enabled mods.
2022-11-04 20:28:33 +01:00

297 lines
15 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:lib="clr-namespace:Wabbajack;assembly=Wabbajack"
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"
xmlns:controls1="clr-namespace:Wabbajack.View_Models.Controls"
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 Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="HeatedBackground" />
<Border Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
x:Name="ModlistDetailsBackground"
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 Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
x:Name="ModlistDetailsHeatBorder"
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 Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="TopProgressBar"
OverhangShadow="True" />
<Button Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="BackButton"
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 Grid.Row="1" Grid.Column="1"
x:Name="SettingsScrollViewer"
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="Selected Profile (if using MO2)" />
<TextBox x:Name="SelectedProfile" Style="{StaticResource ValueStyle}" />
<Button Margin="5" x:Name="ReInferSettings"> Re-infer Settings </Button>
<TextBlock Margin="{StaticResource TitleMargin}" Text="Version" />
<TextBox
x:Name="VersionSetting"
MaxLength="9"
Style="{StaticResource ValueStyle}" />
<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}" />
<CheckBox
x:Name="NSFWSetting"
Content="NSFW"
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 revealing outfits or gore." />
<CheckBox
x:Name="PublishUpdate"
Content="Publish Update"
ToolTip="Select this if your want Wabbajack to automatically publish this modlist when compilation finished (requires a selected machineURL)" />
<TextBlock
Margin="{StaticResource TitleMargin}"
Text="MachineUrl"
ToolTip="If this box has a value the modlist will be published to this MachineUrl after compilation" />
<TextBox x:Name="MachineUrl" Style="{StaticResource ValueStyle}" />
<StackPanel Orientation="Horizontal">
<Button Name="AddNoMatchInclude">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>No Match Include</Label>
</StackPanel>
<ListBox x:Name="NoMatchInclude">
<ListBox.ItemTemplate>
<DataTemplate>
<controls1:RemovableItemView ViewModel="{Binding}" ></controls1:RemovableItemView>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Orientation="Horizontal">
<Button Name="AddInclude">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>Include Folders</Label>
<Button Name="AddIncludeFiles">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>Include Files</Label>
</StackPanel>
<ListBox x:Name="Include">
<ListBox.ItemTemplate>
<DataTemplate>
<controls1:RemovableItemView ViewModel="{Binding}" ></controls1:RemovableItemView>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Orientation="Horizontal">
<Button Name="AddIgnore">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>Ignore Folders</Label>
<Button Name="AddIgnoreFiles">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>Ignore Files</Label>
</StackPanel>
<ListBox x:Name="Ignore">
<ListBox.ItemTemplate>
<DataTemplate>
<controls1:RemovableItemView ViewModel="{Binding}" ></controls1:RemovableItemView>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Orientation="Horizontal">
<Button Name="AddOtherProfile">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>Other Profiles</Label>
</StackPanel>
<ListBox x:Name="OtherProfiles">
<ListBox.ItemTemplate>
<DataTemplate>
<controls1:RemovableItemView ViewModel="{Binding}" ></controls1:RemovableItemView>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Orientation="Horizontal">
<Button Name="AddAlwaysEnabled">
<icon:Material Kind="Plus"></icon:Material>
</Button>
<Label>Always Enabled Mods</Label>
</StackPanel>
<ListBox x:Name="AlwaysEnabled">
<ListBox.ItemTemplate>
<DataTemplate>
<controls1:RemovableItemView ViewModel="{Binding}" ></controls1:RemovableItemView>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</ScrollViewer>
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="BottomBarBackground"
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>
<local:MO2CompilerConfigView x:Name="CompilerConfigView" Grid.Row="1" Grid.Column="1" />
<local:BeginButton Grid.Row="0" Grid.RowSpan="3" Grid.Column="5"
x:Name="BeginButton" />
<icon:PackIconFontAwesome Grid.Row="2"
Grid.Column="5"
x:Name="ErrorSummaryIconGlow"
HorizontalAlignment="Center"
Foreground="{StaticResource WarningBrush}"
Kind="ExclamationTriangleSolid"
Opacity="0.6">
<icon:PackIconFontAwesome.Effect>
<BlurEffect Radius="15" />
</icon:PackIconFontAwesome.Effect>
</icon:PackIconFontAwesome>
<icon:PackIconFontAwesome Grid.Row="2"
Grid.Column="5"
x:Name="ErrorSummaryIcon"
HorizontalAlignment="Center"
Foreground="{StaticResource WarningBrush}"
Kind="ExclamationTriangleSolid" />
</Grid>
</Grid>
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="MidCompilationGrid"
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 Grid.Column="2"
x:Name="CpuView"
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 local:ConfirmationIntervention}}" />
</Grid>
</local:AttentionBorder>
<local:CompilationCompleteView Grid.Column="2"
x:Name="CompilationComplete"
ViewModel="{Binding}" />
</Grid>
</Grid>
</rxui:ReactiveUserControl>