mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
de9e21f0d1
Removed most logic from FilePicker.xaml in favor of a VM
257 lines
11 KiB
XML
257 lines
11 KiB
XML
<UserControl
|
|
x:Class="Wabbajack.CompilerView"
|
|
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:local="clr-namespace:Wabbajack"
|
|
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<Viewbox Stretch="Uniform">
|
|
<Grid Margin="4,0,4,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="435" />
|
|
<RowDefinition Height="10" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="320" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="638" />
|
|
<ColumnDefinition Width="4" />
|
|
<ColumnDefinition Width="638" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Margin="0,8,0,8"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Text="Compiling" />
|
|
<TextBlock FontSize="16" Text=" : " />
|
|
<TextBlock FontSize="16" Text="{Binding MOProfile}" />
|
|
</StackPanel>
|
|
|
|
<Grid
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="0,8,0,8"
|
|
IsEnabled="{Binding UIReady}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Image
|
|
Grid.Row="0"
|
|
Source="{Binding Image}"
|
|
Stretch="Fill" />
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Label Grid.Column="0" Content="Splash Screen Path:" />
|
|
<local:FilePicker
|
|
Grid.Column="1"
|
|
Width="534"
|
|
HorizontalAlignment="Left"
|
|
DataContext="{Binding ImagePath}"
|
|
IsEnabled="{Binding UIReady}" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<ScrollViewer
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Background="Transparent"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
IsEnabled="{Binding UIReady}"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<StackPanel 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>
|
|
</StackPanel.Resources>
|
|
<TextBlock Margin="{StaticResource TitleMargin}" Text="ModList Name" />
|
|
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding ModListName}" />
|
|
<TextBlock Margin="{StaticResource TitleMargin}" Text="Author" />
|
|
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding AuthorName}" />
|
|
<TextBlock Margin="{StaticResource TitleMargin}" Text="Description" />
|
|
<TextBox
|
|
Height="150"
|
|
mahapps:TextBoxHelper.Watermark="(700 characters max)"
|
|
AcceptsReturn="True"
|
|
AcceptsTab="False"
|
|
MaxLength="700"
|
|
Style="{StaticResource ValueStyle}"
|
|
Text="{Binding Summary}"
|
|
TextWrapping="Wrap" />
|
|
<TextBlock Margin="{StaticResource TitleMargin}" Text="Website" />
|
|
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding Website}" />
|
|
<TextBlock
|
|
Margin="{StaticResource TitleMargin}"
|
|
Text="Readme Path"
|
|
ToolTip="Path to a readme file." />
|
|
<local:FilePicker
|
|
DataContext="{Binding ReadMeText}"
|
|
ToolTip="Path to a readme file." />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
<ProgressBar
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
Margin="1,0,1,0"
|
|
Background="#444444"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="{Binding MWVM.QueueProgress, Mode=OneWay}" />
|
|
|
|
<!-- Log -->
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Margin="0,16,0,8"
|
|
FontSize="14"
|
|
Text="Log:" />
|
|
<ListBox
|
|
Grid.Row="4"
|
|
Margin="0,0,2,0"
|
|
local:AutoScrollBehavior.ScrollOnNewItem="True"
|
|
ItemsSource="{Binding MWVM.Log}" />
|
|
<!-- End Log -->
|
|
|
|
<!-- Location -->
|
|
<Grid
|
|
Grid.Row="5"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="0"
|
|
Margin="-4,10,0,10"
|
|
HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition MinHeight="10" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Label
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Content="Installation Location:" />
|
|
<local:FilePicker
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
IsEnabled="{Binding UIReady}"
|
|
DataContext="{Binding Location}" />
|
|
<Label
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Content="Download Location:" />
|
|
<local:FilePicker
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
IsEnabled="{Binding UIReady}"
|
|
DataContext="{Binding DownloadLocation}" />
|
|
</Grid>
|
|
<!-- End Location -->
|
|
|
|
|
|
<!-- Work Queue Start -->
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Column="2"
|
|
Margin="0,16,0,8"
|
|
FontSize="14"
|
|
Text="Work Queue:" />
|
|
|
|
<ListBox
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Width="Auto"
|
|
HorizontalAlignment="Stretch"
|
|
ItemsSource="{Binding MWVM.StatusList}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ProgressBar
|
|
Grid.Column="0"
|
|
Width="100"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Value="{Binding Progress, Mode=OneTime}">
|
|
<ProgressBar.Style>
|
|
<Style TargetType="ProgressBar">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Progress}" Value="0">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ProgressBar.Style>
|
|
</ProgressBar>
|
|
<TextBlock Grid.Column="1" Text=" CPU " />
|
|
<TextBlock Grid.Column="2" Text="{Binding ID}" />
|
|
<TextBlock Grid.Column="3" Text=" - " />
|
|
<TextBlock Grid.Column="4" Text="{Binding Msg}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<!-- Work Queue End -->
|
|
|
|
<Grid
|
|
Grid.Row="5"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="2"
|
|
Margin="0,10,0,10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30" />
|
|
<RowDefinition Height="30" />
|
|
</Grid.RowDefinitions>
|
|
<Button
|
|
Grid.Row="0"
|
|
Margin="0,0,0,4"
|
|
Command="{Binding ShowReportCommand}"
|
|
Visibility="{Binding HTMLReport, Converter={StaticResource IsNotNullVisibilityConverter}}">
|
|
<TextBlock FontSize="13" FontWeight="Bold">View ModList Contents</TextBlock>
|
|
</Button>
|
|
<Button
|
|
Grid.Row="1"
|
|
Margin="0,4,0,0"
|
|
Command="{Binding BeginCommand}">
|
|
<TextBlock FontSize="13" FontWeight="Bold">Begin</TextBlock>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</Viewbox>
|
|
</UserControl>
|