Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.WPF/Controls/Tools/ToolLayerExportHeatMapControl.axaml.cs')
-rw-r--r--UVtools.WPF/Controls/Tools/ToolLayerExportHeatMapControl.axaml.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/UVtools.WPF/Controls/Tools/ToolLayerExportHeatMapControl.axaml.cs b/UVtools.WPF/Controls/Tools/ToolLayerExportHeatMapControl.axaml.cs
new file mode 100644
index 0000000..6c6d74e
--- /dev/null
+++ b/UVtools.WPF/Controls/Tools/ToolLayerExportHeatMapControl.axaml.cs
@@ -0,0 +1,37 @@
+using System.Collections.Generic;
+using System.IO;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using UVtools.Core.Operations;
+
+namespace UVtools.WPF.Controls.Tools
+{
+ public partial class ToolLayerExportHeatMapControl : ToolControl
+ {
+ public OperationLayerExportHeatMap Operation => BaseOperation as OperationLayerExportHeatMap;
+ public ToolLayerExportHeatMapControl()
+ {
+ InitializeComponent();
+ BaseOperation = new OperationLayerExportHeatMap(SlicerFile);
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+
+ public async void ChooseFilePath()
+ {
+ var dialog = new SaveFileDialog
+ {
+ Filters = Helpers.ImagesFullFileFilter,
+ InitialFileName = Path.GetFileName(SlicerFile.FileFullPath) + ".heatmap.png",
+ Directory = Path.GetDirectoryName(SlicerFile.FileFullPath),
+ };
+ var file = await dialog.ShowAsync(ParentWindow);
+ if (string.IsNullOrWhiteSpace(file)) return;
+ Operation.FilePath = file;
+ }
+ }
+}