From 98a9fc7286512494cbb5d2ea3dd876a5b97ce689 Mon Sep 17 00:00:00 2001
From: fengjiayi <12821976+ning_xi@user.noreply.gitee.com>
Date: Fri, 20 Sep 2024 17:11:31 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=BF=9D=E5=AD=98?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BD=BF=E5=85=B6?=
=?UTF-8?q?=E8=83=BD=E5=B0=86=E4=BE=9D=E8=B5=96=E7=9A=84dll=E4=BF=9D?=
=?UTF-8?q?=E5=AD=98=E5=88=B0=E9=A1=B9=E7=9B=AE=E6=96=87=E4=BB=B6=E4=BF=9D?=
=?UTF-8?q?=E5=AD=98=E7=9B=AE=E5=BD=95=E3=80=82=E5=9C=A8=E9=80=89=E5=8F=96?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=9A=84=E5=9F=BA=E5=B1=82=E4=B8=8A=E5=AE=9E?=
=?UTF-8?q?=E7=8E=B0=E4=BA=86=E8=8A=82=E7=82=B9=E7=9A=84=E6=89=B9=E9=87=8F?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E3=80=82=E8=8A=82=E7=82=B9=E5=8F=B3=E9=94=AE?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=AF=B9=E9=BD=90?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8F=AF=E5=B0=86=E5=BD=93=E5=89=8D?=
=?UTF-8?q?=E9=80=89=E5=8F=96=E7=9A=84=E8=8A=82=E7=82=B9=E8=BF=9B=E8=A1=8C?=
=?UTF-8?q?=E5=AF=B9=E9=BD=90=EF=BC=88=E5=AE=9E=E9=AA=8C=E6=80=A7=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Library.Framework/NodeFlow/FlipflopContext.cs | 1 +
.../Serein.Library.Framework.csproj | 2 +-
Library/Entity/SereinProjectData.cs | 28 +-
WorkBench/App.xaml.cs | 15 +-
WorkBench/MainWindow.xaml | 30 +-
WorkBench/MainWindow.xaml.cs | 596 +++++++++++++-----
6 files changed, 499 insertions(+), 173 deletions(-)
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 @@
-
+
-
+
-
-
-
-
+
+
@@ -86,6 +86,8 @@
+
+
+ Visibility="Collapsed"/>