mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
block
This commit is contained in:
@@ -41,7 +41,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
ItemHeight = double.NaN;
|
||||
AddConnector(new BlockConnectorInfo(this.Root, this, ConnectorOrientation.Top));
|
||||
AddConnector(new BlockConnectorInfo(this.Root, this, ConnectorOrientation.Bottom));
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void Init(IDiagramViewModel root, bool initNew)
|
||||
@@ -423,27 +423,29 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
#region 执行
|
||||
public void Execute()
|
||||
public async Task Execute()
|
||||
{
|
||||
BeforeExecute();
|
||||
Executing();
|
||||
AfterExecute();
|
||||
await BeforeExecute();
|
||||
await Executing();
|
||||
await AfterExecute();
|
||||
}
|
||||
|
||||
public virtual void BeforeExecute()
|
||||
public virtual Task BeforeExecute()
|
||||
{
|
||||
IsExecuting = true;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public virtual void Executing()
|
||||
public virtual Task Executing()
|
||||
{
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public virtual void AfterExecute()
|
||||
public virtual async Task AfterExecute()
|
||||
{
|
||||
IsExecuting = false;
|
||||
Next?.Execute();
|
||||
if (Next != null)
|
||||
await Next.Execute();
|
||||
}
|
||||
|
||||
public virtual object GetResult()
|
||||
|
||||
Reference in New Issue
Block a user