Files
UVtools/UVtools.WPF/Controls/Tools/ToolLayerArithmeticControl.axaml.cs
T
Tiago Conceição 3cd46728f1 v2.11.1
- **Shortcuts:**
   - (Add) (Ctrl + Shift + R) to turn on and cycle the Rotate modes
   - (Add) (Ctrl + Shift + F) to turn on and cycle the Flip modes
   - (Add) (Ctrl + Shift + B) to select the build volume as ROI
- **GUI:**
   - (Add) Allow to drag and drop '.uvtop' files into UVtools to sequential show and load operations from files
   - (Change) Rotate icon on layer preview
   - (Upgrade) AvaloniaUI from 0.10.3 to 0.10.4
- **Tools:**
   - (Add) 'Reset to defaults' button on every dialog
   - (Improvement) Window size and position handling
   - (Improvement) Constrain profile box width to not stretch the window
   - (Improvement) ROI section design
- **Dynamic lift:**
   - (Add) View buttons to show the largest/smallest layers
   - (Add) Light-off mode: Set the light-off with an extra delay
   - (Add) Light-off mode: Set the light-off without an extra delay
   - (Add) Light-off mode: Set the light-off to zero
   - (Improvement) Disable bottom and/or normal layer fields when the selected range is outside
- (Add) Settings - Automations: Light-off delay set modes
- (Fix) Exposure time finder: Add staircase, bullseye and counter triangles to feature count at thumbnail
2021-05-11 19:10:36 +01:00

41 lines
1.3 KiB
C#

using Avalonia.Markup.Xaml;
using UVtools.Core.Operations;
using UVtools.WPF.Windows;
namespace UVtools.WPF.Controls.Tools
{
public class ToolLayerArithmeticControl : ToolControl
{
public OperationLayerArithmetic Operation => BaseOperation as OperationLayerArithmetic;
public ToolLayerArithmeticControl()
{
InitializeComponent();
BaseOperation = new OperationLayerArithmetic(SlicerFile);
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
public override void Callback(ToolWindow.Callbacks callback)
{
switch (callback)
{
case ToolWindow.Callbacks.Init:
case ToolWindow.Callbacks.Loaded:
ParentWindow.ButtonOkEnabled = !string.IsNullOrWhiteSpace(Operation.Sentence);
Operation.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == nameof(Operation.Sentence))
{
ParentWindow.ButtonOkEnabled = !string.IsNullOrWhiteSpace(Operation.Sentence);
}
};
break;
}
}
}
}