mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
[FileExplorerAddOns]Improves handling of Gcode Thumbnails (#27947)
* Improves handling of Gcode Thumbnails * Remove Peek support * Moves GcodeHelper to PreviewHandlerCommon * Reverts minor change * Skip unknown data on GcodeHelper.GetBestThumbnail * Replaces QOI.Core with QoiImage * Fixes spellchecker * Reverts changes to NOTICE.md * Minor QoiImage improvements * Use custom QoiPixel struct * Add MIT notice for the QOI reference code * Fix spellcheck for the MIT notice * Update NOTICE.md tweaked notice a bit
This commit is contained in:
@@ -19,14 +19,17 @@ namespace GcodePreviewHandlerUnitTests
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2201:Do not raise reserved exception types", Justification = "new Exception() is fine in test projects.")]
|
||||
public class GcodePreviewHandlerTest
|
||||
{
|
||||
[TestMethod]
|
||||
public void GcodePreviewHandlerControlAddsControlsToFormWhenDoPreviewIsCalled()
|
||||
[DataTestMethod]
|
||||
[DataRow("HelperFiles/sample.gcode")]
|
||||
[DataRow("HelperFiles/sample_JPG.gcode")]
|
||||
[DataRow("HelperFiles/sample_QOI.gcode")]
|
||||
public void GcodePreviewHandlerControlAddsControlsToFormWhenDoPreviewIsCalled(string filePath)
|
||||
{
|
||||
// Arrange
|
||||
using (var gcodePreviewHandlerControl = new GcodePreviewHandlerControl())
|
||||
{
|
||||
// Act
|
||||
var file = File.ReadAllBytes("HelperFiles/sample.gcode");
|
||||
var file = File.ReadAllBytes(filePath);
|
||||
|
||||
gcodePreviewHandlerControl.DoPreview<IStream>(GetMockStream(file));
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="HelperFiles\sample.gcode" />
|
||||
<None Remove="HelperFiles\sample_JPG.gcode" />
|
||||
<None Remove="HelperFiles\sample_QOI.gcode" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -41,6 +43,12 @@
|
||||
<Content Include="HelperFiles\sample.gcode">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="HelperFiles\sample_JPG.gcode">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="HelperFiles\sample_QOI.gcode">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Compile Include="..\STATestClassAttribute.cs" Link="STATestClassAttribute.cs" />
|
||||
<Compile Include="..\STATestMethodAttribute.cs" Link="STATestMethodAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user