From 63f80f007b6b217e124a72bee63063c1868399ad Mon Sep 17 00:00:00 2001
From: chr <chrry550@163.com>
Date: 星期一, 04 三月 2024 11:24:32 +0800
Subject: [PATCH] 新增变量类型

---
 WPFProject.csproj  |    1 
 Models/Step.cs     |   44 ++++++++++
 Models/Param.cs    |   12 +++
 Models/Program.cs  |   92 +++++++++++++++-------
 Models/Variable.cs |   58 ++++++++++++++
 5 files changed, 176 insertions(+), 31 deletions(-)

diff --git a/Models/Param.cs b/Models/Param.cs
new file mode 100644
index 0000000..e5054c5
--- /dev/null
+++ b/Models/Param.cs
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WPFProject.Models
+{
+    public class Param
+    {
+    }
+}
diff --git a/Models/Program.cs b/Models/Program.cs
index e73900f..9e0f86c 100644
--- a/Models/Program.cs
+++ b/Models/Program.cs
@@ -1,29 +1,63 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WPFProject.Models
-{
-    public class Program : NotifyBase
-    {
-        private string _Name;
-
-        public string Name
-        {
-            get { return _Name; }
-            set => RaiseAndSetIfChanged(ref _Name, value);
-        }
-
-        private ObservableCollection<Sequence> _Sequences;
-        public ObservableCollection<Sequence> Sequences
-        {
-            get { return _Sequences; }
-            set => RaiseAndSetIfChanged(ref _Sequences, value);
-        }
-
-
-    }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WPFProject.Models
+{
+    public class Program : NotifyBase
+    {
+        /// <summary>
+        /// 绋嬪簭鍚�
+        /// </summary>
+        private string _Name;
+        public string Name
+        {
+            get { return _Name; }
+            set => RaiseAndSetIfChanged(ref _Name, value);
+        }
+
+        /// <summary>
+        /// 绋嬪簭鎵�闇�鍙傛暟
+        /// </summary>
+        private ObservableCollection<Variable> _Variables;
+        public ObservableCollection<Variable> Variables
+        {
+            get { return _Variables; }
+            set => RaiseAndSetIfChanged(ref _Variables, value);
+        }
+
+        /// <summary>
+        /// 搴忓垪闆嗗悎
+        /// </summary>
+        private ObservableCollection<Sequence> _Sequences;
+        public ObservableCollection<Sequence> Sequences
+        {
+            get { return _Sequences; }
+            set => RaiseAndSetIfChanged(ref _Sequences, value);
+        }
+
+        /// <summary>
+        /// 鎵�闇�鍙傛暟
+        /// </summary>
+        private Dictionary<string, Variable> _Vars;
+        public Dictionary<string, Variable> Vars
+        {
+            get { return _Vars; }
+            set { _Vars = value; }
+        }
+
+        /// <summary>
+        /// 璁$畻涓存椂鍙傛暟
+        /// </summary>
+        private Dictionary<string, Variable> _TempVars;
+        public Dictionary<string, Variable> TempVars
+        {
+            get { return _TempVars; }
+            set { _TempVars = value; }
+        }
+
+    }
+}
diff --git a/Models/Step.cs b/Models/Step.cs
index 2c2a346..e532635 100644
--- a/Models/Step.cs
+++ b/Models/Step.cs
@@ -7,13 +7,53 @@
 namespace WPFProject.Models
 {
     public class Step : NotifyBase
-    {
-        private string _Name;
+    {
+        #region 瀛楁
 
+        private int _Index;
+        public int Index
+        {
+            get { return _Index; }
+            set => RaiseAndSetIfChanged(ref _Index, value);
+        }
+
+        private string _Name;
         public string Name
         {
             get { return _Name; }
             set => RaiseAndSetIfChanged(ref _Name, value);
         }
+
+        private string _DllPath;
+        public string DllPath
+        {
+            get { return _DllPath; }
+            set => RaiseAndSetIfChanged(ref _DllPath, value);
+        }
+
+        private string _ClassName;
+        public string ClassName
+        {
+            get { return _ClassName; }
+            set => RaiseAndSetIfChanged(ref _ClassName, value);
+        }
+
+        private string _MethodName;
+        public string MethodName
+        {
+            get { return _MethodName; }
+            set => RaiseAndSetIfChanged(ref _MethodName, value);
+        }
+
+        private string _Description;
+        public string Description
+        {
+            get { return _Description; }
+            set => RaiseAndSetIfChanged(ref _Description, value);
+        }
+
+        #endregion
+
+
     }
 }
diff --git a/Models/Variable.cs b/Models/Variable.cs
new file mode 100644
index 0000000..bb63f29
--- /dev/null
+++ b/Models/Variable.cs
@@ -0,0 +1,58 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Policy;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WPFProject.Models
+{
+    public class Variable : NotifyBase
+    {
+		/// <summary>
+		/// 鍙傛暟鍚�
+		/// </summary>
+		private string _Name;
+		public string Name
+		{
+			get { return _Name; }
+			set => RaiseAndSetIfChanged(ref _Name, value);
+		}
+
+		/// <summary>
+		/// 鍙傛暟绫诲瀷
+		/// </summary>
+		private string _TypeName;
+		public string TypeName
+		{
+			get { return _TypeName; }
+			set {
+				RaiseAndSetIfChanged(ref _TypeName, value);
+				Type = value == null ? null : Type.GetType(value);
+			}
+		}
+
+		public Type Type { get; private set; }
+
+		/// <summary>
+		/// 鍊煎瓧绗�
+		/// </summary>
+		private string _ValueStr;
+		public string ValueStr
+		{
+			get { return _ValueStr; }
+			set => RaiseAndSetIfChanged(ref _ValueStr, value);
+		}
+
+		/// <summary>
+		/// 鍙傛暟鍊�
+		/// </summary>
+		private object _Value;
+		public object Value
+		{
+			get { return _Value; }
+			set { _Value = value; }
+		}
+
+	}
+}
diff --git a/WPFProject.csproj b/WPFProject.csproj
index a89c777..d3baa9a 100644
--- a/WPFProject.csproj
+++ b/WPFProject.csproj
@@ -134,6 +134,7 @@
     <Compile Include="Models\CanvasPosition.cs" />
     <Compile Include="Models\FuncModel.cs" />
     <Compile Include="Models\NotifyBase.cs" />
+    <Compile Include="Models\Param.cs" />
     <Compile Include="Models\Program.cs" />
     <Compile Include="Models\Sequence.cs" />
     <Compile Include="Models\Step.cs" />

--
Gitblit v1.9.1