mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-17 06:56:36 +08:00
项目结构调整
This commit is contained in:
53
Extensions/AIStudio.Wpf.SFC/ViewModels/SFCActionNode.cs
Normal file
53
Extensions/AIStudio.Wpf.SFC/ViewModels/SFCActionNode.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
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 root, SelectableItemBase designer) : base(root, designer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user