mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
08a3c895da
- **File formats:** - (Add) FlashForge SVGX format of FlashDLPrint - (Improvement) Change `DisplayMirror` from `bool` to a `FlipDirection` enumeration, to be able to identify the exact mirror direction - **(Add) PrusaSlicer Printers:** - FlashForge Explorer MAX - FlashForge Focus 8.9 - FlashForge Focus 13.3 - FlashForge Foto 6.0 - FlashForge Foto 8.9 - FlashForge Foto 13.3 - AnyCubic Photon Mono SQ - AnyCubic Photon Ultra - (Add) Pixel arithmetic: Preset "Elephant foot compensation"
43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Markup.Xaml;
|
|
using UVtools.Core.Operations;
|
|
|
|
namespace UVtools.WPF.Controls.Tools
|
|
{
|
|
public partial class ToolPixelArithmeticControl : ToolControl
|
|
{
|
|
public OperationPixelArithmetic Operation => BaseOperation as OperationPixelArithmetic;
|
|
public ToolPixelArithmeticControl()
|
|
{
|
|
BaseOperation = new OperationPixelArithmetic(SlicerFile);
|
|
if (!ValidateSpawn()) return;
|
|
InitializeComponent();
|
|
|
|
Operation.GeneratePattern("Chessboard");
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
|
|
public void PresetElephantFootCompensation()
|
|
{
|
|
ParentWindow.SelectBottomLayers();
|
|
Operation.PresetElephantFootCompensation();
|
|
}
|
|
|
|
public async void LoadPatternFromImage(bool isAlternatePattern = false)
|
|
{
|
|
var dialog = new OpenFileDialog
|
|
{
|
|
AllowMultiple = false,
|
|
Filters = Helpers.ImagesFileFilter,
|
|
};
|
|
var files = await dialog.ShowAsync(ParentWindow);
|
|
if (files is null || files.Length == 0) return;
|
|
Operation.LoadPatternFromImage(files[0], isAlternatePattern);
|
|
}
|
|
}
|
|
}
|