mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
block
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
@@ -248,6 +249,19 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isExecuting;
|
||||
public bool IsExecuting
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isExecuting;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _isExecuting, value);
|
||||
}
|
||||
}
|
||||
|
||||
public string Flag
|
||||
{
|
||||
get; set;
|
||||
@@ -409,11 +423,29 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
#region 执行
|
||||
public virtual void Execute()
|
||||
public void Execute()
|
||||
{
|
||||
BeforeExecute();
|
||||
Executing();
|
||||
AfterExecute();
|
||||
}
|
||||
|
||||
public virtual void BeforeExecute()
|
||||
{
|
||||
IsExecuting = true;
|
||||
}
|
||||
|
||||
public virtual void Executing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void AfterExecute()
|
||||
{
|
||||
IsExecuting = false;
|
||||
Next?.Execute();
|
||||
}
|
||||
|
||||
public virtual object GetResult()
|
||||
{
|
||||
if (FirstContainer != null)
|
||||
|
||||
Reference in New Issue
Block a user