chore: Replace design data in ConversionJobControl (since d:DesignData is not working anymore)

This commit is contained in:
Adrien Allard committed 2024-02-26 18:50:52 +01:00
1 parent c7f49ec59c
commit 1ba1594df2
4 files changed
+20 -30

No files matched your search

@@ -1,13 +1,16 @@
<UserControl
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"
x:Class="FileConverter.Controls.ConversionJobControl"
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="800"
d:DataContext="{d:DesignData /SampleData/ConversionJobSampleData.xaml}">
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">
<d:DesignProperties.DataContext>
<conversionJobs:ConversionJob />
</d:DesignProperties.DataContext>
<Grid Background="{Binding State, Converter={StaticResource ConversionStateToBrush}, ConverterParameter=Background}" Margin="0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
@@ -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)
@@ -277,10 +277,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<DesignData Include="SampleData\ConversionJobSampleData.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</DesignData>
<Page Include="SampleData\SettingsSampleData.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -1,14 +0,0 @@
<conversionJobs:ConversionJob
xmlns:conversionJobs="clr-namespace:FileConverter.ConversionJobs"
ErrorMessage="There is no error for now"
InputFilePath="C:\Path\To\AVery\Long\Location\WithAVeryNiceFile.png"
OutputFilePath="C:\Path\To\AVery\Long\Location\WithAVeryNiceFile.jpg"
StartTime="08/07/2018 22:10:55"
State="InProgress"
StateFlags="None"
UserState="In Progress">
<conversionJobs:ConversionJob.Progress>
0.6
</conversionJobs:ConversionJob.Progress>
</conversionJobs:ConversionJob>