mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
尝试将节点流导出为c#代码文件
This commit is contained in:
@@ -15,8 +15,6 @@ namespace Serein.Workbench.Services
|
||||
{
|
||||
private readonly IFlowEnvironment flowEnvironment;
|
||||
|
||||
public SereinProjectData? FlowProjectData { get; set; }
|
||||
public string FileDataPath { get; set; }
|
||||
|
||||
public FlowProjectService(IFlowEnvironment flowEnvironment)
|
||||
{
|
||||
@@ -32,15 +30,13 @@ namespace Serein.Workbench.Services
|
||||
{
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
string content = System.IO.File.ReadAllText(filePath); // 读取整个文件内容
|
||||
this.FlowProjectData = JsonConvert.DeserializeObject<SereinProjectData>(content);
|
||||
this.FileDataPath = System.IO.Path.GetDirectoryName(filePath)!; // filePath;//
|
||||
/*
|
||||
var dir = Path.GetDirectoryName(filePath);
|
||||
var flowEnvInfo = new FlowEnvInfo
|
||||
{
|
||||
Project = FlowProjectData,
|
||||
};
|
||||
flowEnvironment.LoadProject(flowEnvInfo, FileDataPath);
|
||||
};*/
|
||||
flowEnvironment.LoadProject(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user