diff --git a/Library.Framework/NodeFlow/FlipflopContext.cs b/Library.Framework/NodeFlow/FlipflopContext.cs index cf39e0c..93092db 100644 --- a/Library.Framework/NodeFlow/FlipflopContext.cs +++ b/Library.Framework/NodeFlow/FlipflopContext.cs @@ -61,6 +61,7 @@ namespace Serein.Library.Framework.NodeFlow public FlipflopStateType State { get; set; } //public TResult? Data { get; set; } public TriggerData TriggerData { get; set; } + public FlipflopContext(FlipflopStateType ffState) { State = ffState; diff --git a/Library.Framework/Serein.Library.Framework.csproj b/Library.Framework/Serein.Library.Framework.csproj index 9a4e167..9c4327c 100644 --- a/Library.Framework/Serein.Library.Framework.csproj +++ b/Library.Framework/Serein.Library.Framework.csproj @@ -55,7 +55,7 @@ - {9FCE93C2-2278-46F3-96AB-CDAAFF27A55F} + {5E19D0F2-913A-4D1C-A6F8-1E1227BAA0E3} Serein.Library diff --git a/Library/Entity/SereinProjectData.cs b/Library/Entity/SereinProjectData.cs index 9598e82..bc942f9 100644 --- a/Library/Entity/SereinProjectData.cs +++ b/Library/Entity/SereinProjectData.cs @@ -63,10 +63,6 @@ namespace Serein.Library.Entity /// public string Versions { get; set; } - - // 预览位置 - - // 缩放比例 } /// /// 画布 @@ -76,11 +72,31 @@ namespace Serein.Library.Entity /// /// 宽度 /// - public float Width { get; set; } + public double Width { get; set; } /// /// 高度 /// - public float Lenght { get; set; } + public double Lenght { get; set; } + + /// + /// 预览位置X + /// + public double ViewX { get; set; } + + /// + /// 预览位置Y + /// + public double ViewY { get; set; } + + /// + /// 缩放比例X + /// + public double ScaleX { get; set; } + + /// + /// 缩放比例Y + /// + public double ScaleY { get; set; } } /// diff --git a/WorkBench/App.xaml.cs b/WorkBench/App.xaml.cs index 6ee511f..d0f448d 100644 --- a/WorkBench/App.xaml.cs +++ b/WorkBench/App.xaml.cs @@ -120,7 +120,7 @@ namespace Serein.WorkBench /// /// 成功加载的工程文件 /// - public static SereinProjectData? FData { get; set; } + public static SereinProjectData? FlowProjectData { get; set; } public static string FileDataPath = ""; private void Application_Startup(object sender, StartupEventArgs e) { @@ -141,7 +141,7 @@ namespace Serein.WorkBench { // 读取文件内容 string content = System.IO.File.ReadAllText(filePath); // 读取整个文件内容 - FData = JsonConvert.DeserializeObject(content); + FlowProjectData = JsonConvert.DeserializeObject(content); FileDataPath = System.IO.Path.GetDirectoryName(filePath) ?? ""; } catch (Exception ex) @@ -150,13 +150,16 @@ namespace Serein.WorkBench Shutdown(); // 关闭应用程序 } } - else if (1 == 1) + else { - string filePath = @"F:\临时\project\new project.dnf"; +#if DEBUG + //string filePath = @"F:\临时\project\new project.dnf"; + string filePath = @"F:\临时\project\tmp\project.dnf"; //string filePath = @"D:\Project\C#\DynamicControl\SereinFlow\.Output\Debug\net8.0-windows7.0\U9 project.dnf"; string content = System.IO.File.ReadAllText(filePath); // 读取整个文件内容 - App.FData = JsonConvert.DeserializeObject(content); - App.FileDataPath = filePath;//System.IO.Path.GetDirectoryName(filePath)!; + App.FlowProjectData = JsonConvert.DeserializeObject(content); + App.FileDataPath = filePath;//System.IO.Path.GetDirectoryName(filePath)!; +#endif } } diff --git a/WorkBench/MainWindow.xaml b/WorkBench/MainWindow.xaml index 9f18b27..22992b3 100644 --- a/WorkBench/MainWindow.xaml +++ b/WorkBench/MainWindow.xaml @@ -20,8 +20,8 @@ - - + + @@ -46,12 +46,12 @@ + + + Visibility="Collapsed"/>