demo提交

This commit is contained in:
艾竹
2023-01-25 23:55:30 +08:00
parent b857151bdc
commit f11a4170d8
49 changed files with 1220 additions and 184 deletions

View File

@@ -42,8 +42,13 @@ namespace AIStudio.Wpf.DiagramDesigner
{
base.Init();
SelectItemCommand = new SimpleCommand(ExecuteSelectItemCommand);
EditCommand = new SimpleCommand(ExecuteEditCommand);
SelectItemCommand = new SimpleCommand(Command_Enable, ExecuteSelectItemCommand);
EditCommand = new SimpleCommand(Command_Enable, ExecuteEditCommand);
}
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
{
base.LoadDesignerItemViewModel(root, designerbase);
}
public virtual bool InitData()
@@ -62,7 +67,29 @@ namespace AIStudio.Wpf.DiagramDesigner
public ICommand EditCommand
{
get; private set;
}
}
private bool _isSelected;
[Browsable(false)]
public override bool IsSelected
{
get
{
return _isSelected;
}
set
{
if (SetProperty(ref _isSelected, value))
{
//如果没有文字,失去焦点自动清除
if (_isSelected == false && string.IsNullOrEmpty(Text))
{
ShowText = false;
}
}
}
}
private string _text;
[Browsable(true)]