mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-25 18:06:12 +02:00
Mostly text updates, with a few adjustments to dialog box layouts or controls. Presets for Threshold, for example, where changed from buttons to a combobox selections. Allowed the line splits added by Designer to remain, but did fix any mid-word breaks.
50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
/*
|
|
* GNU AFFERO GENERAL PUBLIC LICENSE
|
|
* Version 3, 19 November 2007
|
|
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using UVtools.Core.Objects;
|
|
|
|
namespace UVtools.Core.Operations
|
|
{
|
|
public class OperationRepairLayers : Operation
|
|
{
|
|
public override string Title => "Repair layers and issues";
|
|
public override string Description => null;
|
|
|
|
public override string ConfirmationText => "attempt this repair?";
|
|
|
|
public override string ProgressTitle =>
|
|
$"Reparing layers {LayerIndexStart} through {LayerIndexEnd}";
|
|
|
|
public override string ProgressAction => "Repaired layers";
|
|
|
|
public override StringTag Validate(params object[] parameters)
|
|
{
|
|
var sb = new StringBuilder();
|
|
|
|
if (!RepairIslands && !RemoveEmptyLayers && !RepairResinTraps)
|
|
{
|
|
sb.AppendLine("You must select at least one repair operation.");
|
|
}
|
|
|
|
return new StringTag(sb.ToString());
|
|
}
|
|
|
|
public bool RepairIslands { get; set; } = true;
|
|
public bool RepairResinTraps { get; set; } = true;
|
|
public bool RemoveEmptyLayers { get; set; } = true;
|
|
public byte RemoveIslandsBelowEqualPixelCount { get; set; } = 5;
|
|
public uint GapClosingIterations { get; set; } = 1;
|
|
public uint NoiseRemovalIterations { get; set; } = 0;
|
|
|
|
public List<LayerIssue> Issues { get; set; }
|
|
|
|
}
|
|
}
|