mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-19 16:06:35 +08:00
do redo
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user