Files
aistudio-wpf-diagram/Extensions/AIStudio.Wpf.SFC/ViewModels/SFCActionNode.cs

54 lines
1.4 KiB
C#
Raw Normal View History

2021-07-30 18:26:35 +08:00
using System;
using System.Collections.Generic;
using System.Text;
2022-10-28 22:45:39 +08:00
using AIStudio.Wpf.DiagramDesigner;
2023-01-25 11:11:27 +08:00
using AIStudio.Wpf.DiagramDesigner.Models;
2021-07-30 18:26:35 +08:00
namespace AIStudio.Wpf.SFC.ViewModels
{
public class SFCActionNode : SFCNode
{
public SFCActionNode() : base(SFCNodeKinds.Action)
{
FontViewModel.FontSize = 10;
ItemWidth = 60;
ItemHeight = 48;
ExecuteAddLeftInput(null);
2021-07-30 18:26:35 +08:00
}
2023-01-24 17:53:04 +08:00
public SFCActionNode(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer)
2021-07-30 18:26:35 +08:00
{
}
2023-01-25 11:11:27 +08:00
public SFCActionNode(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
{
}
private LinkPoint _linkPoint;
public LinkPoint LinkPoint
{
get
{
return _linkPoint;
}
set
{
SetProperty(ref _linkPoint, value);
}
}
protected override void ExecuteEditCommand(object parameter)
{
SFCActionNodeData data = new SFCActionNodeData(LinkPoint, Expression);
if (visualiserService.ShowDialog(data) == true)
{
this.LinkPoint = data.LinkPoint;
this.Expression = data.Expression;
}
2021-07-30 18:26:35 +08:00
}
}
}