mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
使用设计模式优化一下逻辑图
This commit is contained in:
@@ -12,8 +12,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public abstract class LogicalGateItemViewModelBase : DesignerItemViewModelBase
|
||||
{
|
||||
public ICommand AddInputCommand { get; private set; }
|
||||
public ICommand AddOutputCommand { get; private set; }
|
||||
public ICommand AddInputCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
public ICommand AddOutputCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
|
||||
public LogicalGateItemViewModelBase(LogicalType logicalType) : this(null, logicalType)
|
||||
@@ -96,7 +102,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
protected override void Init(IDiagramViewModel root, bool initNew)
|
||||
{
|
||||
{
|
||||
ShowRotate = false;
|
||||
ShowArrow = false;
|
||||
AddInputCommand = new SimpleCommand(Command_Enable, para => ExecuteAddInput(para));
|
||||
@@ -216,7 +222,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public LogicalType LogicalType { get; set; }
|
||||
public LogicalType LogicalType
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
public Dictionary<int, LogicalConnectorInfo> Input { get; set; } = new Dictionary<int, LogicalConnectorInfo>();
|
||||
@@ -294,6 +303,15 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void GetInput()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void CalculateOutput()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user