[FileExplorer] StlThumbnailProvider (#15568)

* Adds StlThumbnailProvider

* Spell checker fixes

* Adds missing changes

* Attempts to fix alpha background issue

* Adds missing dependency references

* Upgrades .NET Core 3.1 to .NET 5

* Updates Helix Toolkit to fix .net5 compatibility

* Return null bitmap If STL model is empty
This commit is contained in:
Pedro Lamas
2022-01-25 11:51:37 +00:00
committed by GitHub
parent edc43e39ca
commit cccadec44c
22 changed files with 530 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
_gcodeRenderIsEnabled = Settings.Properties.EnableGcodePreview;
_pdfThumbnailIsEnabled = Settings.Properties.EnablePdfThumbnail;
_gcodeThumbnailIsEnabled = Settings.Properties.EnableGcodeThumbnail;
_stlThumbnailIsEnabled = Settings.Properties.EnableStlThumbnail;
}
private bool _svgRenderIsEnabled;
@@ -62,6 +63,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
private bool _svgThumbnailIsEnabled;
private bool _pdfThumbnailIsEnabled;
private bool _gcodeThumbnailIsEnabled;
private bool _stlThumbnailIsEnabled;
public bool SVGRenderIsEnabled
{
@@ -189,6 +191,24 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
public bool STLThumbnailIsEnabled
{
get
{
return _stlThumbnailIsEnabled;
}
set
{
if (value != _stlThumbnailIsEnabled)
{
_stlThumbnailIsEnabled = value;
Settings.Properties.EnableStlThumbnail = value;
RaisePropertyChanged();
}
}
}
public string GetSettingsSubPath()
{
return _settingsConfigFileFolder + "\\" + ModuleName;