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)
|
|
|
|
|
|
{
|
2021-08-01 22:30:12 +08:00
|
|
|
|
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
|
|
|
|
{
|
2021-08-01 22:30:12 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-01-25 11:11:27 +08:00
|
|
|
|
public SFCActionNode(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
|
2022-12-08 20:54:45 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-01 22:30:12 +08:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|