mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using AIStudio.Wpf.DiagramDesigner;
|
|
|
|
namespace AIStudio.Wpf.SFC.ViewModels
|
|
{
|
|
public class SFCActionNode : SFCNode
|
|
{
|
|
public SFCActionNode() : base(SFCNodeKinds.Action)
|
|
{
|
|
FontViewModel.FontSize = 10;
|
|
ItemWidth = 60;
|
|
ItemHeight = 48;
|
|
|
|
ExecuteAddLeftInput(null);
|
|
}
|
|
|
|
public SFCActionNode(IDiagramViewModel parent, DesignerItemBase designer) : base(parent, designer)
|
|
{
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|