diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-11-14 08:26:49 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-11-14 08:26:49 +0300 |
commit | 6d661821b522c6c8cc2c5b645693e8dd3dab76b4 (patch) | |
tree | ab5b947f47baf1a9c51bf84f6e365461c86d6215 /UVtools.WPF/UserSettings.cs | |
parent | 3455f09c24daa26c12346a7e0cd451e6d947e8a7 (diff) |
v1.3.0v1.3.0
* (Add) Changelog description to the new version update dialog
* (Add) Tool - Infill: Proper configurable infills
* (Add) Pixel area as "px²" to the layer bounds and ROI at layer bottom information bar
* (Add) Pixel dimming: Alternate pattern every x layers
* (Add) Pixel dimming: Lattice infill
* (Add) Solidify: Required minimum/maximum area to solidify found areas (Default values will produce the old behaviour)
* (Add) Issues: Allow to hide and ignore selected issues
* (Add) Issue - Touch boundary: Allow to configure Left, Top, Right, Bottom margins in pixels, defaults to 5px (#94)
* (Add) UVJ: Allow convert to another formats (#96)
* (Add) Setters to some internal Core properties for more abstraction
* (Improvement) Issue - Touch boundary: Only check boundary pixels if layer bounds overlap the set margins, otherwise, it will not waste cycles on check individual rows of pixels when not need to
* (Change) Place .ctb extension show first than .cbddlp due more popular this days
* (Change) Pixel dimming: Text "Borders" to "Walls"
* (Change) Issues: Remove "Remove" text from button, keep only the icon to free up space
* (Change) Ungroup extensions on "covert to" menu (#97)
* (Fix) Issues: Detect button has a incorrect "save" icon
* (Fix) SL1: Increase NumSlow property limit
* (Fix) UVJ: not decoding nor showing preview images
* (Fix) "Convert to" menu shows same options than previous loaded file when current file dont support convertions (#96)
* (Fix) Hides "Convert to" menu when unable to convert to another format (#96)
* (Fix) Program crash when demo file is disabled and tries to load a file in
* (Fix) Rare crash on startup when mouse dont move in startup period and user types a key in meanwhile
* (Fix) On a slow startup on progress window it will show "Decoded layers" as default text, changed to "Initializing"
Diffstat (limited to 'UVtools.WPF/UserSettings.cs')
-rw-r--r-- | UVtools.WPF/UserSettings.cs | 83 |
1 files changed, 77 insertions, 6 deletions
diff --git a/UVtools.WPF/UserSettings.cs b/UVtools.WPF/UserSettings.cs index f0f9d4f..6f6e3d3 100644 --- a/UVtools.WPF/UserSettings.cs +++ b/UVtools.WPF/UserSettings.cs @@ -14,12 +14,13 @@ using Avalonia.Media; using JetBrains.Annotations; using ReactiveUI; using UVtools.Core; +using UVtools.Core.Objects; using Color=UVtools.WPF.Structures.Color; namespace UVtools.WPF { [Serializable] - public sealed class UserSettings : ReactiveObject + public sealed class UserSettings : BindableBase { #region Constants public const ushort SETTINGS_VERSION = 1; @@ -29,7 +30,7 @@ namespace UVtools.WPF #region General [Serializable] - public sealed class GeneralUserSettings : ReactiveObject + public sealed class GeneralUserSettings : BindableBase { private bool _startMaximized = true; private bool _checkForUpdatesOnStartup = true; @@ -133,7 +134,7 @@ namespace UVtools.WPF #region Layer Preview [Serializable] - public sealed class LayerPreviewUserSettings : ReactiveObject + public sealed class LayerPreviewUserSettings : BindableBase { private Color _tooltipOverlayBackgroundColor = new Color(210, 255, 255, 192); private bool _tooltipOverlay = true; @@ -541,7 +542,7 @@ namespace UVtools.WPF #region Issues [Serializable] - public sealed class IssuesUserSettings : ReactiveObject + public sealed class IssuesUserSettings : BindableBase { private bool _computeIssuesOnLoad = false; private bool _computeIssuesOnClickTab = true; @@ -563,6 +564,12 @@ namespace UVtools.WPF private byte _resinTrapRequiredAreaToProcessCheck = 17; private byte _resinTrapRequiredBlackPixelsToDrain = 10; private byte _resinTrapMaximumPixelBrightnessToDrain = 30; + private byte _touchingBoundMinimumPixelBrightness = 127; + private byte _touchingBoundMarginLeft = 5; + private byte _touchingBoundMarginTop = 5; + private byte _touchingBoundMarginRight = 5; + private byte _touchingBoundMarginBottom = 5; + private bool _touchingBoundSyncMargins = true; public bool ComputeIssuesOnLoad { @@ -684,6 +691,70 @@ namespace UVtools.WPF set => this.RaiseAndSetIfChanged(ref _resinTrapMaximumPixelBrightnessToDrain, value); } + public byte TouchingBoundMinimumPixelBrightness + { + get => _touchingBoundMinimumPixelBrightness; + set => RaiseAndSetIfChanged(ref _touchingBoundMinimumPixelBrightness, value); + } + + public byte TouchingBoundMarginLeft + { + get => _touchingBoundMarginLeft; + set + { + if(!RaiseAndSetIfChanged(ref _touchingBoundMarginLeft, value)) return; + if (_touchingBoundSyncMargins) + { + TouchingBoundMarginRight = value; + } + } + } + + public byte TouchingBoundMarginTop + { + get => _touchingBoundMarginTop; + set + { + if (!RaiseAndSetIfChanged(ref _touchingBoundMarginTop, value)) return; + if (_touchingBoundSyncMargins) + { + TouchingBoundMarginBottom = value; + } + } + } + + public byte TouchingBoundMarginRight + { + get => _touchingBoundMarginRight; + set + { + if(!RaiseAndSetIfChanged(ref _touchingBoundMarginRight, value)) return; + if (_touchingBoundSyncMargins) + { + TouchingBoundMarginLeft = value; + } + } + } + + public byte TouchingBoundMarginBottom + { + get => _touchingBoundMarginBottom; + set + { + if(!RaiseAndSetIfChanged(ref _touchingBoundMarginBottom, value)) return; + if (_touchingBoundSyncMargins) + { + TouchingBoundMarginTop = value; + } + } + } + + public bool TouchingBoundSyncMargins + { + get => _touchingBoundSyncMargins; + set => RaiseAndSetIfChanged(ref _touchingBoundSyncMargins, value); + } + public IssuesUserSettings Clone() { return MemberwiseClone() as IssuesUserSettings; @@ -694,7 +765,7 @@ namespace UVtools.WPF #region Pixel Editor [Serializable] - public sealed class PixelEditorUserSettings : ReactiveObject + public sealed class PixelEditorUserSettings : BindableBase { private Color _addPixelColor = new Color(255, 144, 238, 144); private Color _addPixelHighlightColor = new Color(255, 0, 255, 0); @@ -882,7 +953,7 @@ namespace UVtools.WPF #region Layer Repair [Serializable] - public sealed class LayerRepairUserSettings : ReactiveObject + public sealed class LayerRepairUserSettings : BindableBase { private bool _repairIslands = true; private bool _repairResinTraps = true; |