diff --git a/Library.Core/Serein.Library.Core.csproj b/Library.Core/Serein.Library.Core.csproj index 0f87f4b..93046da 100644 --- a/Library.Core/Serein.Library.Core.csproj +++ b/Library.Core/Serein.Library.Core.csproj @@ -1,7 +1,7 @@  - net8.0-windows7.0 + net8.0 enable enable D:\Project\C#\DynamicControl\SereinFlow\.Output @@ -11,8 +11,9 @@ Net8运行时需要添加的依赖 README.md https://github.com/fhhyyp/serein-flow - LICENSE + MIT True + true latest diff --git a/Library.Framework/Serein.Library.Framework.csproj b/Library.Framework/Serein.Library.Framework.csproj index 5d7f938..c1aaea5 100644 --- a/Library.Framework/Serein.Library.Framework.csproj +++ b/Library.Framework/Serein.Library.Framework.csproj @@ -18,7 +18,7 @@ true full false - ..\.Output\Debug\net8.0-windows7.0\ + ..\.Output\Debug\net8.0\ DEBUG;TRACE prompt 4 diff --git a/Library/Serein.Library.csproj b/Library/Serein.Library.csproj index 02f0a33..eb7822c 100644 --- a/Library/Serein.Library.csproj +++ b/Library/Serein.Library.csproj @@ -1,16 +1,16 @@  - net8-windows;net462 + net8.0;net462 D:\Project\C#\DynamicControl\SereinFlow\.Output True SereinFow 基础依赖 README.md https://github.com/fhhyyp/serein-flow - LICENSE + MIT True - + true @@ -26,7 +26,7 @@ - + diff --git a/NodeFlow/Serein.NodeFlow.csproj b/NodeFlow/Serein.NodeFlow.csproj index 6a9a6ec..5abf4d8 100644 --- a/NodeFlow/Serein.NodeFlow.csproj +++ b/NodeFlow/Serein.NodeFlow.csproj @@ -1,7 +1,7 @@  - net8.0-windows7.0 + net8.0 enable enable D:\Project\C#\DynamicControl\SereinFlow\.Output @@ -12,7 +12,8 @@ README.md https://github.com/fhhyyp/serein-flow git - LICENSE + MIT + true True diff --git a/Serein.FlowRemoteManagement/Serein.FlowRemoteManagement.csproj b/Serein.FlowRemoteManagement/Serein.FlowRemoteManagement.csproj index cc51859..db24704 100644 --- a/Serein.FlowRemoteManagement/Serein.FlowRemoteManagement.csproj +++ b/Serein.FlowRemoteManagement/Serein.FlowRemoteManagement.csproj @@ -1,7 +1,7 @@  - net8.0-windows7.0 + net8.0 enable enable D:\Project\C#\DynamicControl\SereinFlow\.Output diff --git a/Serein.FlowStartTool/Program.cs b/Serein.FlowStartTool/Program.cs new file mode 100644 index 0000000..b6857db --- /dev/null +++ b/Serein.FlowStartTool/Program.cs @@ -0,0 +1,58 @@ +using Newtonsoft.Json; +using Serein.Library.Api; +using Serein.Library.Entity; +using Serein.NodeFlow; + +namespace Serein.FlowStartTool +{ + public class Program + { + public static void Main(string[] args) + { + Console.WriteLine("Hello~"); + // 检查是否传入了参数 + if (args.Length == 1) + { + // 获取文件路径 + string filePath = args[0]; + // 检查文件是否存在 + if (!File.Exists(filePath)) + { + Console.WriteLine($"文件未找到:{filePath}"); + return; + } + Console.WriteLine(filePath); + return; + SereinProjectData? flowProjectData; + string fileDataPath; + try + { + // 读取文件内容 + string content = System.IO.File.ReadAllText(filePath); // 读取整个文件内容 + flowProjectData = JsonConvert.DeserializeObject(content); + fileDataPath = System.IO.Path.GetDirectoryName(filePath) ?? ""; + if (flowProjectData is null || string.IsNullOrEmpty(fileDataPath)) + { + throw new Exception("项目文件读取异常"); + } + } + catch (Exception ex) + { + Console.WriteLine($"读取文件时发生错误:{ex.Message}"); + return; + } + + _ = StartFlow(flowProjectData, fileDataPath); + } + } + + + public static IFlowEnvironment? Env; + public static async Task StartFlow(SereinProjectData flowProjectData, string fileDataPath) + { + Env = new FlowEnvironment(); + Env.LoadProject(flowProjectData, fileDataPath); // 加载项目 + await Env.StartAsync(); + } + } +} diff --git a/Serein.FlowStartTool/Serein.FlowStartTool.csproj b/Serein.FlowStartTool/Serein.FlowStartTool.csproj new file mode 100644 index 0000000..04d7a2b --- /dev/null +++ b/Serein.FlowStartTool/Serein.FlowStartTool.csproj @@ -0,0 +1,20 @@ + + + + Exe + net8.0 + true + enable + enable + + + + + + + + + + + + diff --git a/SereinFlow.sln b/SereinFlow.sln index ea387dc..4c07d4a 100644 --- a/SereinFlow.sln +++ b/SereinFlow.sln @@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Net462DllTest", "Net462DllT EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serein.FlowRemoteManagement", "Serein.FlowRemoteManagement\Serein.FlowRemoteManagement.csproj", "{3E568C47-74C6-4C28-9D43-C9BA29008DB7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serein.FlowStartTool", "Serein.FlowStartTool\Serein.FlowStartTool.csproj", "{6FB346F6-B83D-49BC-AB4E-291AE6289BBE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -56,6 +58,10 @@ Global {3E568C47-74C6-4C28-9D43-C9BA29008DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU {3E568C47-74C6-4C28-9D43-C9BA29008DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E568C47-74C6-4C28-9D43-C9BA29008DB7}.Release|Any CPU.Build.0 = Release|Any CPU + {6FB346F6-B83D-49BC-AB4E-291AE6289BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6FB346F6-B83D-49BC-AB4E-291AE6289BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6FB346F6-B83D-49BC-AB4E-291AE6289BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6FB346F6-B83D-49BC-AB4E-291AE6289BBE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WorkBench/Serein.WorkBench.csproj b/WorkBench/Serein.WorkBench.csproj index 5d3bc19..122e3c6 100644 --- a/WorkBench/Serein.WorkBench.csproj +++ b/WorkBench/Serein.WorkBench.csproj @@ -2,12 +2,13 @@ WinExe - net8.0-windows7.0 + net8.0-windows enable enable True D:\Project\C#\DynamicControl\SereinFlow\.Output MIT + true diff --git a/WorkBench/Serein.WorkBench_d2hd4tgu_wpftmp.csproj b/WorkBench/Serein.WorkBench_d2hd4tgu_wpftmp.csproj new file mode 100644 index 0000000..c5a404c --- /dev/null +++ b/WorkBench/Serein.WorkBench_d2hd4tgu_wpftmp.csproj @@ -0,0 +1,288 @@ + + + Serein.WorkBench + obj\Release\ + obj\ + D:\Project\C#\DynamicControl\SereinFlow\WorkBench\obj\ + <_TargetAssemblyProjectName>Serein.WorkBench + + + + WinExe + net8.0-windows + enable + enable + True + D:\Project\C#\DynamicControl\SereinFlow\.Output + MIT + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file