blob: 9e95c3e41a8f9c407ab59489ea7fb498efa40a05 (
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
|
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using UVtools.Core.Operations;
namespace UVtools.WPF.Controls.Tools
{
public class ToolMorphControl : ToolControl
{
public OperationMorph Operation => BaseOperation as OperationMorph;
private KernelControl _kernelCtrl;
public ToolMorphControl()
{
BaseOperation = new OperationMorph(SlicerFile);
if (!ValidateSpawn()) return;
InitializeComponent();
_kernelCtrl = this.Find<KernelControl>("KernelCtrl");
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
public override bool UpdateOperation()
{
Operation.Kernel.Matrix = _kernelCtrl.GetMatrix();
Operation.Kernel.Anchor = _kernelCtrl.Anchor;
return Operation.Kernel.Matrix is not null;
}
}
}
|