可以自定义连接点

This commit is contained in:
艾竹
2023-01-29 22:54:06 +08:00
parent ba9e3bdf58
commit 5ee0c1ce26
15 changed files with 548 additions and 125 deletions

View File

@@ -43,6 +43,7 @@ namespace AIStudio.Wpf.DiagramDesigner
ConnectorHeight = 30;
DeleteLabelCommand = new SimpleCommand(Command_Enable, DeleteLabel);
EditCommand = new SimpleCommand(Command_Enable, ExecuteEditCommand);
}
protected override void LoadDesignerItemViewModel(SelectableItemBase designerbase)
@@ -81,7 +82,7 @@ namespace AIStudio.Wpf.DiagramDesigner
get; set;
}
//private bool _isSelected;
private bool _isSelected;
public override bool IsSelected
{
get
@@ -106,6 +107,11 @@ namespace AIStudio.Wpf.DiagramDesigner
{
get; set;
}
public SimpleCommand EditCommand
{
get; private set;
}
#endregion
private bool updating = false;
@@ -198,5 +204,11 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
protected virtual void ExecuteEditCommand(object param)
{
if (IsReadOnly == true) return;
RaisePropertyChanged("ShowText");
}
}
}