mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-12 03:22:32 +02:00
3cd46728f1
- **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
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System.Diagnostics;
|
|
using System.Timers;
|
|
using Avalonia.Markup.Xaml;
|
|
using UVtools.Core.Operations;
|
|
|
|
namespace UVtools.WPF.Controls.Tools
|
|
{
|
|
public class ToolChangeResolutionControl : ToolControl
|
|
{
|
|
private OperationChangeResolution.Resolution _selectedPresetItem;
|
|
public OperationChangeResolution Operation => BaseOperation as OperationChangeResolution;
|
|
|
|
public OperationChangeResolution.Resolution SelectedPresetItem
|
|
{
|
|
get => _selectedPresetItem;
|
|
set
|
|
{
|
|
RaiseAndSetIfChanged(ref _selectedPresetItem, value);
|
|
if (_selectedPresetItem is null || _selectedPresetItem.IsEmpty) return;
|
|
Operation.NewResolutionX = _selectedPresetItem.ResolutionX;
|
|
Operation.NewResolutionY = _selectedPresetItem.ResolutionY;
|
|
|
|
//SelectedPresetItem = null;
|
|
Timer timer = new(1);
|
|
timer.Elapsed += (sender, args) =>
|
|
{
|
|
SelectedPresetItem = null;
|
|
timer.Dispose();
|
|
};
|
|
timer.Start();
|
|
}
|
|
}
|
|
|
|
public ToolChangeResolutionControl()
|
|
{
|
|
InitializeComponent();
|
|
BaseOperation = new OperationChangeResolution(SlicerFile);
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
}
|
|
}
|