From 886fbd13ad6cc8ade9f19079b18546a04b1331b8 Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Sun, 8 Dec 2019 16:30:49 -0600 Subject: [PATCH] Split LogCpuView --- .../Common/{LogCpuView.xaml => CpuView.xaml} | 33 ++--------------- .../{LogCpuView.xaml.cs => CpuView.xaml.cs} | 22 +++++++++--- Wabbajack/Views/Common/LogView.xaml | 26 ++++++++++++++ Wabbajack/Views/Common/LogView.xaml.cs | 36 +++++++++++++++++++ Wabbajack/Views/Compilers/CompilerView.xaml | 8 ++++- .../Views/Installers/InstallationView.xaml | 8 ++++- Wabbajack/Wabbajack.csproj | 21 +++++++---- 7 files changed, 110 insertions(+), 44 deletions(-) rename Wabbajack/Views/Common/{LogCpuView.xaml => CpuView.xaml} (60%) rename Wabbajack/Views/Common/{LogCpuView.xaml.cs => CpuView.xaml.cs} (51%) create mode 100644 Wabbajack/Views/Common/LogView.xaml create mode 100644 Wabbajack/Views/Common/LogView.xaml.cs diff --git a/Wabbajack/Views/Common/LogCpuView.xaml b/Wabbajack/Views/Common/CpuView.xaml similarity index 60% rename from Wabbajack/Views/Common/LogCpuView.xaml rename to Wabbajack/Views/Common/CpuView.xaml index cb5b23b5..ec61a2d4 100644 --- a/Wabbajack/Views/Common/LogCpuView.xaml +++ b/Wabbajack/Views/Common/CpuView.xaml @@ -1,44 +1,17 @@  - - - - - - + - - - - - - - - - /// Interaction logic for LogCpuView.xaml + /// Interaction logic for CpuView.xaml /// - public partial class LogCpuView : UserControl + public partial class CpuView : UserControl { public double ProgressPercent { get => (double)GetValue(ProgressPercentProperty); 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))); - public LogCpuView() + public CpuView() { InitializeComponent(); } diff --git a/Wabbajack/Views/Common/LogView.xaml b/Wabbajack/Views/Common/LogView.xaml new file mode 100644 index 00000000..4e340afc --- /dev/null +++ b/Wabbajack/Views/Common/LogView.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + diff --git a/Wabbajack/Views/Common/LogView.xaml.cs b/Wabbajack/Views/Common/LogView.xaml.cs new file mode 100644 index 00000000..fcb2f5c2 --- /dev/null +++ b/Wabbajack/Views/Common/LogView.xaml.cs @@ -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 +{ + /// + /// Interaction logic for LogView.xaml + /// + 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(); + } + } +} diff --git a/Wabbajack/Views/Compilers/CompilerView.xaml b/Wabbajack/Views/Compilers/CompilerView.xaml index fef694b4..51dbf30d 100644 --- a/Wabbajack/Views/Compilers/CompilerView.xaml +++ b/Wabbajack/Views/Compilers/CompilerView.xaml @@ -240,7 +240,13 @@ Grid.ColumnSpan="5" Margin="5" Visibility="{Binding Compiling, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}"> - + + + + + + + diff --git a/Wabbajack/Views/Installers/InstallationView.xaml b/Wabbajack/Views/Installers/InstallationView.xaml index a7aa4066..0872b3c5 100644 --- a/Wabbajack/Views/Installers/InstallationView.xaml +++ b/Wabbajack/Views/Installers/InstallationView.xaml @@ -343,7 +343,13 @@ Grid.Row="2" Margin="5,0,5,5" Visibility="{Binding InstallingMode, Converter={StaticResource bool2VisibilityConverter}, FallbackValue=Hidden}"> - + + + + + + + diff --git a/Wabbajack/Wabbajack.csproj b/Wabbajack/Wabbajack.csproj index e24a46de..2a35ef84 100644 --- a/Wabbajack/Wabbajack.csproj +++ b/Wabbajack/Wabbajack.csproj @@ -173,6 +173,12 @@ Designer + + CpuView.xaml + + + LogView.xaml + @@ -234,9 +240,6 @@ - - LogCpuView.xaml - @@ -256,6 +259,14 @@ WebBrowserView.xaml + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -304,10 +315,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - MSBuild:Compile Designer