思维导图修改成回车新增子节点

This commit is contained in:
艾竹
2023-05-03 23:42:34 +08:00
parent 071490f5ee
commit 940512589c
11 changed files with 153 additions and 27 deletions

View File

@@ -14,6 +14,7 @@ using AIStudio.Wpf.DiagramDesigner.Helpers;
using AIStudio.Wpf.DiagramDesigner.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using static System.Net.Mime.MediaTypeNames;
namespace AIStudio.Wpf.DiagramDesigner
{
@@ -735,6 +736,15 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
private ICommand _nextCommand;
public ICommand NextCommand
{
get
{
return this._nextCommand ?? (this._nextCommand = new SimpleCommand(ExecuteEnable, ExecuteNextCommand));
}
}
private ICommand _alignTopCommand;
public ICommand AlignTopCommand
{
@@ -1511,6 +1521,11 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
public virtual void ExecuteNextCommand(object parameter)
{
}
private void ExecuteSelectAllCommand(object parameter)
{
List<SelectableDesignerItemViewModelBase> selectedItems = Items.ToList();
@@ -3146,7 +3161,11 @@ namespace AIStudio.Wpf.DiagramDesigner
ReplaceAllCommand.Execute(new object[] { SearchText, ReplaceText });
return true;
}
else if (DiagramOption.ShortcutOption.Next(e))
{
NextCommand.Execute(null);
return true;
}
return false;
}
#endregion