mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Split LogCpuView
This commit is contained in:
@ -1,44 +1,17 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Wabbajack.LogCpuView"
|
x:Class="Wabbajack.CpuView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Wabbajack"
|
xmlns:local="clr-namespace:Wabbajack"
|
||||||
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
d:DesignHeight="250"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
BorderThickness="0"
|
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Rectangle Fill="{StaticResource HeatedBorderBrush}" Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="5" />
|
|
||||||
<ColumnDefinition Width="500" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Rectangle
|
|
||||||
Grid.Column="0"
|
|
||||||
Fill="{StaticResource HeatedBorderBrush}"
|
|
||||||
Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
||||||
<ListBox
|
<ListBox
|
||||||
Grid.Column="0"
|
|
||||||
local:AutoScrollBehavior.ScrollOnNewItem="True"
|
|
||||||
BorderBrush="Transparent"
|
|
||||||
BorderThickness="1"
|
|
||||||
ItemsSource="{Binding Log}"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding ShortDescription}" TextWrapping="WrapWithOverflow" />
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
<Rectangle
|
|
||||||
Grid.Column="2"
|
|
||||||
Fill="{StaticResource HeatedBorderBrush}"
|
|
||||||
Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
|
||||||
<ListBox
|
|
||||||
Grid.Column="2"
|
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
@ -1,22 +1,34 @@
|
|||||||
using System.Windows;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Wabbajack
|
namespace Wabbajack
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for LogCpuView.xaml
|
/// Interaction logic for CpuView.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class LogCpuView : UserControl
|
public partial class CpuView : UserControl
|
||||||
{
|
{
|
||||||
public double ProgressPercent
|
public double ProgressPercent
|
||||||
{
|
{
|
||||||
get => (double)GetValue(ProgressPercentProperty);
|
get => (double)GetValue(ProgressPercentProperty);
|
||||||
set => SetValue(ProgressPercentProperty, value);
|
set => SetValue(ProgressPercentProperty, value);
|
||||||
}
|
}
|
||||||
public static readonly DependencyProperty ProgressPercentProperty = DependencyProperty.Register(nameof(ProgressPercent), typeof(double), typeof(LogCpuView),
|
public static readonly DependencyProperty ProgressPercentProperty = DependencyProperty.Register(nameof(ProgressPercent), typeof(double), typeof(CpuView),
|
||||||
new FrameworkPropertyMetadata(default(double)));
|
new FrameworkPropertyMetadata(default(double)));
|
||||||
|
|
||||||
public LogCpuView()
|
public CpuView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
26
Wabbajack/Views/Common/LogView.xaml
Normal file
26
Wabbajack/Views/Common/LogView.xaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Wabbajack.LogView"
|
||||||
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Grid>
|
||||||
|
<Rectangle Fill="{StaticResource HeatedBorderBrush}" Opacity="{Binding ProgressPercent, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
||||||
|
<ListBox
|
||||||
|
local:AutoScrollBehavior.ScrollOnNewItem="True"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
BorderThickness="1"
|
||||||
|
ItemsSource="{Binding Log}"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding ShortDescription}" TextWrapping="WrapWithOverflow" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
36
Wabbajack/Views/Common/LogView.xaml.cs
Normal file
36
Wabbajack/Views/Common/LogView.xaml.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace Wabbajack
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for LogView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class LogView : UserControl
|
||||||
|
{
|
||||||
|
public double ProgressPercent
|
||||||
|
{
|
||||||
|
get => (double)GetValue(ProgressPercentProperty);
|
||||||
|
set => SetValue(ProgressPercentProperty, value);
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty ProgressPercentProperty = DependencyProperty.Register(nameof(ProgressPercent), typeof(double), typeof(LogView),
|
||||||
|
new FrameworkPropertyMetadata(default(double)));
|
||||||
|
|
||||||
|
public LogView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -240,7 +240,13 @@
|
|||||||
Grid.ColumnSpan="5"
|
Grid.ColumnSpan="5"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Visibility="{Binding Compiling, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}">
|
Visibility="{Binding Compiling, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}">
|
||||||
<local:LogCpuView ProgressPercent="{Binding PercentCompleted}" />
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="5" />
|
||||||
|
<ColumnDefinition Width="500" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<local:LogView Grid.Column="0" ProgressPercent="{Binding PercentCompleted, Mode=OneWay}" />
|
||||||
|
<local:CpuView Grid.Column="2" ProgressPercent="{Binding PercentCompleted, Mode=OneWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -343,7 +343,13 @@
|
|||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="5,0,5,5"
|
Margin="5,0,5,5"
|
||||||
Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}">
|
Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}">
|
||||||
<local:LogCpuView ProgressPercent="{Binding PercentCompleted, Mode=OneWay}" />
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="5" />
|
||||||
|
<ColumnDefinition Width="500" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<local:LogView Grid.Column="0" ProgressPercent="{Binding PercentCompleted, Mode=OneWay}" />
|
||||||
|
<local:CpuView Grid.Column="2" ProgressPercent="{Binding PercentCompleted, Mode=OneWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -173,6 +173,12 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
<Compile Include="Converters\EqualsToBoolConverter.cs" />
|
<Compile Include="Converters\EqualsToBoolConverter.cs" />
|
||||||
|
<Compile Include="Views\Common\CpuView.xaml.cs">
|
||||||
|
<DependentUpon>CpuView.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Views\Common\LogView.xaml.cs">
|
||||||
|
<DependentUpon>LogView.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="View Models\UserInterventionHandlers.cs" />
|
<Compile Include="View Models\UserInterventionHandlers.cs" />
|
||||||
<Compile Include="View Models\WebBrowserVM.cs" />
|
<Compile Include="View Models\WebBrowserVM.cs" />
|
||||||
<Compile Include="Views\Installers\MO2InstallerConfigView.xaml.cs">
|
<Compile Include="Views\Installers\MO2InstallerConfigView.xaml.cs">
|
||||||
@ -234,9 +240,6 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="View Models\Compilers\CompilerVM.cs" />
|
<Compile Include="View Models\Compilers\CompilerVM.cs" />
|
||||||
<Compile Include="View Models\MainWindowVM.cs" />
|
<Compile Include="View Models\MainWindowVM.cs" />
|
||||||
<Compile Include="Views\Common\LogCpuView.xaml.cs">
|
|
||||||
<DependentUpon>LogCpuView.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Converters\LeftMarginMultiplierConverter.cs" />
|
<Compile Include="Converters\LeftMarginMultiplierConverter.cs" />
|
||||||
<Compile Include="Util\TreeViewItemExtensions.cs" />
|
<Compile Include="Util\TreeViewItemExtensions.cs" />
|
||||||
<Compile Include="View Models\SlideShow.cs" />
|
<Compile Include="View Models\SlideShow.cs" />
|
||||||
@ -256,6 +259,14 @@
|
|||||||
<Compile Include="Views\WebBrowserView.xaml.cs">
|
<Compile Include="Views\WebBrowserView.xaml.cs">
|
||||||
<DependentUpon>WebBrowserView.xaml</DependentUpon>
|
<DependentUpon>WebBrowserView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Page Include="Views\Common\CpuView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Views\Common\LogView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Views\Installers\MO2InstallerConfigView.xaml">
|
<Page Include="Views\Installers\MO2InstallerConfigView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@ -304,10 +315,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Views\Common\LogCpuView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\MainWindow.xaml">
|
<Page Include="Views\MainWindow.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
Reference in New Issue
Block a user