From 1ba1594df23f53cea12e3e0bd7a2cc2d5bfe4add Mon Sep 17 00:00:00 2001 From: Adrien Allard Date: Mon, 26 Feb 2024 18:44:48 +0100 Subject: [PATCH] chore: Replace design data in ConversionJobControl (since d:DesignData is not working anymore) --- .../Controls/ConversionJobControl.xaml | 21 +++++++++++-------- .../ConversionJobs/ConversionJob.cs | 11 +++++++--- .../FileConverter/FileConverter.csproj | 4 ---- .../SampleData/ConversionJobSampleData.xaml | 14 ------------- 4 files changed, 20 insertions(+), 30 deletions(-) delete mode 100644 Application/FileConverter/SampleData/ConversionJobSampleData.xaml diff --git a/Application/FileConverter/Controls/ConversionJobControl.xaml b/Application/FileConverter/Controls/ConversionJobControl.xaml index 7a18468..0e90b87 100644 --- a/Application/FileConverter/Controls/ConversionJobControl.xaml +++ b/Application/FileConverter/Controls/ConversionJobControl.xaml @@ -1,13 +1,16 @@  + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:project="clr-namespace:FileConverter.Properties" + xmlns:conversionJobs="clr-namespace:FileConverter.ConversionJobs" + x:Class="FileConverter.Controls.ConversionJobControl" + mc:Ignorable="d" + d:DesignHeight="100" d:DesignWidth="800"> + + + diff --git a/Application/FileConverter/ConversionJobs/ConversionJob.cs b/Application/FileConverter/ConversionJobs/ConversionJob.cs index 1f633ec..dade5f0 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob.cs @@ -25,11 +25,16 @@ namespace FileConverter.ConversionJobs public ConversionJob() { - this.State = ConversionState.InProgress; + this.UserState = "Design Mode"; + this.ConversionPreset = null; this.initialInputPath = string.Empty; - this.InputFilePath = "C:\\My file.png"; - this.UserState = "Design Mode"; + this.InputFilePath = @"C:\Path\To\AVery\Long\Location\WithAVeryNiceFile.png"; + this.OutputFilePaths = new[] { "C:\\Path\\To\\AVery\\Long\\Location\\WithAVeryNiceFile.jpg" }; + this.StartTime = DateTime.Now - TimeSpan.FromMinutes(1.2); + this.State = ConversionState.InProgress; + this.StateFlags = ConversionFlags.None; + this.Progress = 0.6f; } public ConversionJob(ConversionPreset conversionPreset, string inputFilePath) diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj index 36ffd16..88a40ec 100644 --- a/Application/FileConverter/FileConverter.csproj +++ b/Application/FileConverter/FileConverter.csproj @@ -277,10 +277,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - MSBuild:Compile Designer diff --git a/Application/FileConverter/SampleData/ConversionJobSampleData.xaml b/Application/FileConverter/SampleData/ConversionJobSampleData.xaml deleted file mode 100644 index 2a5267e..0000000 --- a/Application/FileConverter/SampleData/ConversionJobSampleData.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.6 - - -