blob: 08f5df5dcec95a385636b69a2050e31f151cb4b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using System.IO;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using UVtools.Core.Operations;
namespace UVtools.WPF.Controls.Tools
{
public partial class ToolLayerExportImageControl : ToolControl
{
public OperationLayerExportImage Operation => BaseOperation as OperationLayerExportImage;
public ToolLayerExportImageControl()
{
BaseOperation = new OperationLayerExportImage(SlicerFile);
if (!ValidateSpawn()) return;
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
public async void ChooseFolder()
{
var dialog = new OpenFolderDialog
{
Directory = Path.GetDirectoryName(SlicerFile.FileFullPath),
};
var folder = await dialog.ShowAsync(ParentWindow);
if (string.IsNullOrWhiteSpace(folder)) return;
Operation.OutputFolder = folder;
}
}
}
|