This commit is contained in:
艾竹
2023-03-26 23:23:34 +08:00
parent 90e94a7ec0
commit 43b5d82fae
31 changed files with 1692 additions and 518 deletions

View File

@@ -53,7 +53,7 @@ namespace AIStudio.Wpf.DiagramDesigner
get; private set;
}
public int Capacity { get; set; } = 10;
public int Capacity { get; set; } = 100;
public DoCommandManager()
{
@@ -66,10 +66,18 @@ namespace AIStudio.Wpf.DiagramDesigner
UnDoActionStack = new Stack<Command>();
}
public bool BeginDo
{
get;set;
}
private bool _undoing;
public void DoNewCommand(string name, Action action, Action unDoAction, Action clearAction = null, bool doit = true)
{
if (_undoing == true) return;
if (BeginDo == true)
return;
if (_undoing == true)
return;
try
{
_undoing = true;
@@ -103,7 +111,8 @@ namespace AIStudio.Wpf.DiagramDesigner
if (!CanUnDo)
return;
if (_undoing == true) return;
if (_undoing == true)
return;
try
{
_undoing = true;
@@ -123,7 +132,8 @@ namespace AIStudio.Wpf.DiagramDesigner
if (!CanReDo)
return;
if (_undoing == true) return;
if (_undoing == true)
return;
try
{
_undoing = true;