mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-21 16:46:35 +08:00
LocalFlowEnvironment文件丢失,需要重写
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Serein.Workbench.Services
|
||||
/// </summary>
|
||||
private readonly IFlowEnvironment flowEnvironment;
|
||||
private readonly IFlowEnvironmentEvent flowEnvironmentEvent;
|
||||
private readonly UIContextOperation uIContextOperation;
|
||||
private readonly UIContextOperation uiContextOperation;
|
||||
|
||||
/// <summary>
|
||||
/// 转发流程运行环境各个事件的实现类
|
||||
@@ -41,7 +41,7 @@ namespace Serein.Workbench.Services
|
||||
{
|
||||
this.flowEnvironment = flowEnvironment;
|
||||
this.flowEnvironmentEvent = flowEnvironmentEvent;
|
||||
this.uIContextOperation = uIContextOperation;
|
||||
this.uiContextOperation = uIContextOperation;
|
||||
InitFlowEnvironmentEvent();
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Serein.Workbench.Services
|
||||
/// <param name="value"></param>
|
||||
private void FlowEnvironment_OnEnvOutEvent(InfoType type, string value)
|
||||
{
|
||||
uIContextOperation.Invoke(() =>
|
||||
uiContextOperation.Invoke(() =>
|
||||
{
|
||||
EnvOutput?.Invoke(type, value);
|
||||
});
|
||||
@@ -245,7 +245,10 @@ namespace Serein.Workbench.Services
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void FlowEnvironmentEvent_OnCanvasCreate(CanvasCreateEventArgs eventArgs)
|
||||
{
|
||||
CanvasCreated?.Invoke(eventArgs);
|
||||
uiContextOperation?.Invoke(() =>
|
||||
{
|
||||
CanvasCreated?.Invoke(eventArgs);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -656,11 +656,7 @@ namespace Serein.Workbench.Services
|
||||
{
|
||||
int width = 1200;
|
||||
int height = 780;
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
var result = await flowEnvironment.CreateCanvasAsync("", width, height);
|
||||
Console.WriteLine(result.Guid);
|
||||
});
|
||||
flowEnvironment.CreateCanvas("", width, height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -673,7 +669,7 @@ namespace Serein.Workbench.Services
|
||||
return;
|
||||
}
|
||||
var model = ((FlowCanvasViewModel)CurrentSelectCanvas.DataContext).Model;
|
||||
_ = flowEnvironment.RemoveCanvasAsync(model.Guid);
|
||||
flowEnvironment.RemoveCanvas(model.Guid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -692,7 +688,7 @@ namespace Serein.Workbench.Services
|
||||
{
|
||||
return;
|
||||
}
|
||||
_ = flowEnvironment.CreateNodeAsync(canvasGuid, nodeType, position, methodDetailsInfo);
|
||||
flowEnvironment.CreateNode(canvasGuid, nodeType, position, methodDetailsInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -711,7 +707,7 @@ namespace Serein.Workbench.Services
|
||||
return;
|
||||
}
|
||||
|
||||
_ = flowEnvironment.RemoveNodeAsync(model.CanvasDetails.Guid, model.Guid);
|
||||
flowEnvironment.RemoveNode(model.CanvasDetails.Guid, model.Guid);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -23,6 +23,11 @@ namespace Serein.Workbench.Services
|
||||
this.flowEnvironment = flowEnvironment;
|
||||
}
|
||||
|
||||
public void StartProjectManagementServer()
|
||||
{
|
||||
// CollabrationSideManagement
|
||||
}
|
||||
|
||||
public void LoadLocalProject(string filePath)
|
||||
{
|
||||
if (File.Exists(filePath))
|
||||
|
||||
Reference in New Issue
Block a user