From 6bcafc823e836ecd5790f87178a906333699f868 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 10 四月 2025 10:46:47 +0800
Subject: [PATCH] 优化插件结构;

---
 Plugin.TestResult/DataTable.xaml                       |    2 
 Plugin.TestBuilder/UI/InnerWindow.xaml.cs              |   24 
 Plugin.SNGenerateTool/Plugin.SNGenerateTool.csproj     |  144 +
 Plugin.TestResult/TestResultView.xaml.cs               |   47 
 Plugin.TestBuilder/Model/Step.cs                       |   17 
 Plugin.TestBuilder/Properties/Settings.settings        |    7 
 Plugin.TestBuilder/TestBuilder.xaml                    |   30 
 Plugin.SNGenerateTool/UserControl1.xaml.cs             |  252 ++
 HMI.UI/Controls/NumberPanel.xaml                       |    2 
 Plugin.TestBuilder/Container/SequnceList.xaml          |   48 
 Plugin.SNGenerateTool/HashPlus.cs                      |   89 
 Plugin.TestResult/ViewControl.xaml.cs                  |   21 
 WPFProject/UI/WorkWindow.xaml.cs                       |   16 
 Plugin.TestBuilder/Properties/Resources.resx           |   13 
 Plugin.TestBuilder/Properties/Settings.Designer.cs     |   30 
 Plugin.TestBuilder/UI/BottomBar.xaml                   |    5 
 OPCClient/OPCClient.csproj                             |   64 
 Plugin.SNGenerateTool/Properties/Settings.settings     |    7 
 WPFProject/App.config                                  |    2 
 Plugin.TestBuilder/UI/MinInnerWindow.xaml              |   10 
 OPCClient/Commond.cs                                   |   37 
 WPFProject/packages.config                             |   12 
 Plugin.SNGenerateTool/app.config                       |   11 
 Plugin.TestBuilder/Container/StepSetting.xaml.cs       |   15 
 Plugin.SNGenerateTool/packages.config                  |   18 
 Plugin.TestBuilder/Model/Variable.cs                   |   16 
 Plugin.TestBuilder/UI/DdDragHandler.cs                 |   10 
 Plugin.TestBuilder/Container/ProgramList.xaml.cs       |    9 
 HMI.UI/Controls/NumberPanel.xaml.cs                    |   12 
 Plugin.SNGenerateTool/Properties/Resources.Designer.cs |   62 
 Plugin.TestBuilder/UI/Resize.cs                        |   23 
 HMI.UI/Style/PanuonResource.xaml                       |   14 
 WPFProject/WPFProject.sln                              |   54 
 HMI.UnitTest/App.xaml                                  |   12 
 WPFProject/Controls/MenuTabControl.xaml.cs             |   43 
 WPFProject/BuildCmd.txt                                |    1 
 HMI.UnitTest/App.config                                |   10 
 Plugin.SNGenerateTool/UserControl1.xaml                |  265 ++
 Plugin.TestBuilder/TestBuilder.xaml.cs                 |  179 -
 Plugin.SNGenerateTool/Form1.cs                         | 1986 ++++++++++++++++++
 HMI.IOMonitor/IOMonitor.xaml.cs                        |    7 
 Plugin.SNGenerateTool/Properties/AssemblyInfo.cs       |   52 
 Plugin.TestBuilder/UI/InnerWindow.xaml                 |   19 
 Plugin.TestResult/InfoWindow.xaml.cs                   |  106 
 Plugin.TestResult/SingleCell.xaml.cs                   |  101 
 Plugin.TestResult/DataTable.xaml.cs                    |   12 
 Plugin.SNGenerateTool/Properties/Resources.resx        |   13 
 Plugin.TestBuilder/Container/FunctionSetting.xaml.cs   |   28 
 Plugin.TestBuilder/Container/ProgramList.xaml          |   24 
 Plugin.TestBuilder/Properties/AssemblyInfo.cs          |   52 
 Plugin.TestResult/Chart.xaml.cs                        |  121 +
 Plugin.DOControl/DataModal.xaml                        |   23 
 Plugin.TestBuilder/Workspace.xaml                      |   16 
 Plugin.TestBuilder/Container/FunctionSetting.xaml      |   44 
 OPCClient/packages.config                              |    4 
 HMI.UnitTest/MainWindow.xaml                           |   18 
 WPFProject/UI/WorkWindow.xaml                          |   25 
 Plugin.ServoManage/Plugin.ServoManage.csproj           |   10 
 Plugin.TestBuilder/UI/CanvasHelper.cs                  |    4 
 Plugin.ServoManage/ServoManage.xaml.cs                 |    9 
 HMI.UnitTest/MainWindow.xaml.cs                        |  135 +
 Plugin.SNGenerateTool/Form1.Designer.cs                |    3 
 WPFProject/MainWindow.xaml                             |    1 
 HMI.Core/Api/IFolderOwner.cs                           |    2 
 Plugin.TestBuilder/packages.config                     |    7 
 Plugin.TestBuilder/Properties/Resources.Designer.cs    |   62 
 Libs/SupersocketCommon.dll                             |    0 
 Plugin.TestBuilder/Plugin.TestBuilder.csproj           |  200 +
 OPCClient/Properties/AssemblyInfo.cs                   |   33 
 Plugin.TestBuilder/Model/Sequence.cs                   |    9 
 Plugin.TestBuilder/Container/SequnceList.xaml.cs       |   11 
 Plugin.TestBuilder/UI/DdDropHandler.cs                 |   11 
 Plugin.TestBuilder/UI/BottomBar.xaml.cs                |    3 
 Plugin.TestBuilder/Workspace.xaml.cs                   |  179 -
 Plugin.TestResult/Model/BaseConfig.cs                  |   13 
 HMI.Core/Api/IPlugin.cs                                |    5 
 Plugin.TestBuilder/Entity/CanvasPosition.cs            |    2 
 HMI.Base/PluginLoader.cs                               |    5 
 WPFProject/WPFProject.csproj                           |  137 -
 Plugin.SNGenerateTool/Properties/Settings.Designer.cs  |   30 
 Plugin.TestBuilder/Model/FuncModel.cs                  |    9 
 HMI.IOMonitor/HMI.IOMonitor.csproj                     |   10 
 Plugin.TestBuilder/Model/Program.cs                    |   12 
 Plugin.TestBuilder/Container/StepSetting.xaml          |   31 
 Plugin.DOControl/Plugin.DOControl.csproj               |   24 
 Plugin.DOControl/DataModal.xaml.cs                     |   10 
 Plugin.DOControl/Entity/DOControlData.cs               |   14 
 Plugin.TestResult/InfoWindow.xaml                      |  102 
 OPCClient/OPCClient.cs                                 |  664 ++++++
 Plugin.SNGenerateTool/Entity/DataInfo.cs               |   53 
 Plugin.DOControl/DOControl.xaml.cs                     |  101 
 WPFProject/Controls/MainTabControl.xaml.cs             |    5 
 WPFProject/Utils/LogCleanner.cs                        |    6 
 /dev/null                                              |   19 
 WPFProject/Utils/CommonLogger.cs                       |    3 
 HMI.UnitTest/HMI.UnitTest.csproj                       |   17 
 HMI.UI/Style/Colors.xaml                               |    6 
 Plugin.SNGenerateTool/Entity/UserSetting.cs            |  130 +
 Plugin.TestBuilder/UI/MinInnerWindow.xaml.cs           |    2 
 99 files changed, 5,537 insertions(+), 836 deletions(-)

diff --git a/HMI.Base/PluginLoader.cs b/HMI.Base/PluginLoader.cs
index e7be956..6b4ba0b 100644
--- a/HMI.Base/PluginLoader.cs
+++ b/HMI.Base/PluginLoader.cs
@@ -62,6 +62,7 @@
         }
 
         private IPluginContainer pluginContainer;
+
         public void LoadMenuAndPlugin(IPluginContainer container, Dispatcher dispatcher)
         {
             pluginContainer = container;
@@ -76,6 +77,7 @@
                 });
             }
         }
+
         private void LoadChildrenMenu()
         {
             foreach (var menu in Plugins)
@@ -139,7 +141,7 @@
                     }
                     catch (Exception ex)
                     {
-                        log.Error("Load Plugin Failed.", ex);
+                        log.Error($"Load Plugin [{menu.Name}] Failed.", ex);
                         LoadMessageAppend?.Invoke(this, new LoadMsg
                         {
                             Type = LoadMsgType.LOADING,
@@ -217,6 +219,5 @@
             }
             return data;
         }
-
     }
 }
diff --git a/HMI.Core/Api/IFolderOwner.cs b/HMI.Core/Api/IFolderOwner.cs
index b6abc70..85d3067 100644
--- a/HMI.Core/Api/IFolderOwner.cs
+++ b/HMI.Core/Api/IFolderOwner.cs
@@ -9,7 +9,7 @@
     public interface IFolderOwner
     {
         /// <summary>
-        /// 鍩虹璺緞
+        /// 鎻掍欢鍔犺浇瀹屼箣鍚庝細鍒嗛厤涓�涓矾寰勶紝鍙互瀛樻斁涓�浜涚嫭绔嬬殑鏂囦欢
         /// </summary>
         /// <param name="folder"></param>
         void SetBaseFolder(string folder);
diff --git a/HMI.Core/Api/IPlugin.cs b/HMI.Core/Api/IPlugin.cs
index 7edfb0c..fd98378 100644
--- a/HMI.Core/Api/IPlugin.cs
+++ b/HMI.Core/Api/IPlugin.cs
@@ -53,10 +53,5 @@
         /// <param name="sender"></param>
         /// <param name="args"></param>
         void OnTabChange(object sender, object args);
-        /// <summary>
-        /// 鎻掍欢鍔犺浇瀹屼箣鍚庝細鍒嗛厤涓�涓矾寰勶紝鍙互瀛樻斁涓�浜涚嫭绔嬬殑鏂囦欢
-        /// </summary>
-        /// <param name="folder"></param>
-        void SetBaseFolder(string folder);
     }
 }
diff --git a/HMI.IOMonitor/HMI.IOMonitor.csproj b/HMI.IOMonitor/HMI.IOMonitor.csproj
index c693278..cc932b2 100644
--- a/HMI.IOMonitor/HMI.IOMonitor.csproj
+++ b/HMI.IOMonitor/HMI.IOMonitor.csproj
@@ -139,9 +139,9 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HMI.Old\OPCInterface\OpcInterface\OpcInterface.csproj">
-      <Project>{e1464149-2c0a-499d-ab90-0c72e6ed1c53}</Project>
-      <Name>OpcInterface</Name>
+    <ProjectReference Include="..\..\ConnectionUtil\ConnectionUtil\ConnectionUtil.csproj">
+      <Project>{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}</Project>
+      <Name>ConnectionUtil</Name>
     </ProjectReference>
     <ProjectReference Include="..\HMI.Base\HMI.Base.csproj">
       <Project>{2a6f9720-a890-4036-9d73-41a0dae28341}</Project>
@@ -155,6 +155,10 @@
       <Project>{f17de6b5-af1d-48c6-94a0-6b763a6546a6}</Project>
       <Name>HMI.UI</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OPCClient\OPCClient.csproj">
+      <Project>{e5740bb5-9fc6-4a20-b7c2-cc90c281ed05}</Project>
+      <Name>OPCClient</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
diff --git a/HMI.IOMonitor/IOMonitor.xaml.cs b/HMI.IOMonitor/IOMonitor.xaml.cs
index fd059d9..5778b04 100644
--- a/HMI.IOMonitor/IOMonitor.xaml.cs
+++ b/HMI.IOMonitor/IOMonitor.xaml.cs
@@ -1,4 +1,5 @@
-锘縰sing HMI.Base;
+锘縰sing ConnectionUtil;
+using HMI.Base;
 using HMI.Core.Setting;
 using HMI.Core.Util;
 using HMI.IOMonitor.Entity;
@@ -7,11 +8,13 @@
 using NPOI.HSSF.UserModel;
 using NPOI.SS.UserModel;
 using NPOI.XSSF.UserModel;
+using OPCConnection;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.IO;
 using System.Linq;
+using System.Net.Sockets;
 using System.Timers;
 using System.Windows;
 using System.Windows.Controls;
@@ -33,7 +36,7 @@
         private string DQTag = string.Empty;
         private SystemSetting systemSetting;
         private Timer MonitorTimer;
-        private OpcInterface.OpcInterface lTSCADAApi = new OpcInterface.OpcInterface();
+        private SCADAApi lTSCADAApi = new OPCClient();
 
 
         /// <summary>
diff --git a/HMI.UI/Controls/NumberPanel.xaml b/HMI.UI/Controls/NumberPanel.xaml
index 3a42b00..7dfa844 100644
--- a/HMI.UI/Controls/NumberPanel.xaml
+++ b/HMI.UI/Controls/NumberPanel.xaml
@@ -73,6 +73,6 @@
         <Button Grid.Row="4" Grid.Column="2" Tag="3" Click="Button_Click" Content="3"/>
 
         <Button Grid.Row="5" Grid.ColumnSpan="2" Tag="0" Click="Button_Click" Content="0"/>
-        <Button Grid.Row="5" Grid.Column="2" Tag="." Click="Button_Click" Content="."/>
+        <Button Grid.Row="5" Grid.Column="2" Tag="." IsEnabled="{Binding DotEnabled}" Click="Button_Click" Content="."/>
     </Grid>
 </pu:WindowX>
diff --git a/HMI.UI/Controls/NumberPanel.xaml.cs b/HMI.UI/Controls/NumberPanel.xaml.cs
index abdd3df..5bddb7a 100644
--- a/HMI.UI/Controls/NumberPanel.xaml.cs
+++ b/HMI.UI/Controls/NumberPanel.xaml.cs
@@ -16,6 +16,18 @@
             InitializeComponent();
         }
 
+        private bool dotEnabled = true;
+
+        public bool DotEnabled
+        {
+            get { return dotEnabled; }
+            set
+            {
+                Set(ref dotEnabled, value);
+            }
+        }
+
+
         public double? Data { get; private set; }
 
         private bool _isProcessing;
diff --git a/HMI.UI/Style/Colors.xaml b/HMI.UI/Style/Colors.xaml
index 3bd20ff..d9b0900 100644
--- a/HMI.UI/Style/Colors.xaml
+++ b/HMI.UI/Style/Colors.xaml
@@ -54,6 +54,12 @@
         <GradientStop Color="#23458c" Offset="1"/>
     </LinearGradientBrush>
 
+    <LinearGradientBrush x:Key="ReVerBar" StartPoint="0.5,0" EndPoint="0.5,1">
+        <GradientStop Color="#23458c" Offset="0"/>
+        <GradientStop Color="#4268b1" Offset="0.5"/>
+        <GradientStop Color="#5d87d2" Offset="1"/>
+    </LinearGradientBrush>
+
     <LinearGradientBrush x:Key="GreenVerBar" StartPoint="0.5,0" EndPoint="0.5,1">
         <GradientStop Color="#28ea1d" Offset="0"/>
         <GradientStop Color="#21c418" Offset="0.5"/>
diff --git a/HMI.UI/Style/PanuonResource.xaml b/HMI.UI/Style/PanuonResource.xaml
index 0b103f5..5d6734a 100644
--- a/HMI.UI/Style/PanuonResource.xaml
+++ b/HMI.UI/Style/PanuonResource.xaml
@@ -12,7 +12,7 @@
              xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI">
     <ResourceDictionary.MergedDictionaries>
         <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
-        <pu:StyleDictionary Includes="PasswordBox,TextBox,ComboBox,Button,DataGrid,TreeView,Menu" />
+        <pu:StyleDictionary Includes="PasswordBox,TextBox,ComboBox,Button,DataGrid,TreeView,Menu,ListBox" />
         <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
     </ResourceDictionary.MergedDictionaries>
     <sys:Double x:Key="TitleFontSize">20</sys:Double>
@@ -290,4 +290,16 @@
            Opacity="0"
            Visibility="Visible" />
     </Popup>
+
+    <Style x:Key="DefaultListBox" TargetType="ListBox" BasedOn="{StaticResource {x:Static pu:StyleKeys.ListBoxStyle}}">
+        <Setter Property="pu:ListBoxHelper.ItemsHoverBackground" Value="{StaticResource SecondPrimaryColor}"/>
+        <Setter Property="pu:ListBoxHelper.ItemsHoverForeground" Value="{StaticResource SecondPrimaryColorContract}"/>
+        <Setter Property="pu:ListBoxHelper.ItemsSelectedBackground" Value="{StaticResource PrimaryColor}"/>
+        <Setter Property="pu:ListBoxHelper.ItemsSelectedForeground" Value="{StaticResource PrimaryColorContract}"/>
+        <Setter Property="pu:ListBoxHelper.ItemsMargin" Value="0"/>
+        <Setter Property="pu:ListBoxHelper.ItemsPadding" Value="7,5,7,5"/>
+        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
+        <Setter Property="Background" Value="Transparent"/>
+        <Setter Property="BorderThickness" Value="0"/>
+    </Style>
 </ResourceDictionary>
\ No newline at end of file
diff --git a/HMI.UnitTest/App.config b/HMI.UnitTest/App.config
index 56efbc7..7d84477 100644
--- a/HMI.UnitTest/App.config
+++ b/HMI.UnitTest/App.config
@@ -1,6 +1,14 @@
-锘�<?xml version="1.0" encoding="utf-8" ?>
+锘�<?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
     </startup>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
 </configuration>
\ No newline at end of file
diff --git a/HMI.UnitTest/App.xaml b/HMI.UnitTest/App.xaml
index 0976a73..293171a 100644
--- a/HMI.UnitTest/App.xaml
+++ b/HMI.UnitTest/App.xaml
@@ -4,13 +4,25 @@
              xmlns:local="clr-namespace:UnitTest"
             xmlns:pw="https://opensource.panuon.com/wpf"
             xmlns:pu="https://opensource.panuon.com/wpf-ui"
+              xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
+ xmlns:hc="clr-namespace:HMI.Core;assembly=HMI.Core"
              StartupUri="MainWindow.xaml">
     <Application.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="/HMI.UI;component/Style/BaseWindow.xaml"/>
                 <ResourceDictionary Source="/HMI.UI;component/Style/FormStyle.xaml"/>
+                <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
+                <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
+                <ResourceDictionary Source="/HMI.UI;component/Style/PanuonResource.xaml"/>
+                <ResourceDictionary Source="/HMI.UI;component/Style/MsgBoxStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
             <Style TargetType="{x:Type pu:FormGroup}" BasedOn="{StaticResource InputFormGroupStyle}"></Style>
+            <uic:PathImageConverter x:Key="path2Image"/>
+            <uic:DataGridRowNumberConverter x:Key="rowNumber"/>
+            <uic:VisibilityBoolConverter x:Key="vbConverter"/>
+            <uic:DataGridRowFlagConverter x:Key="rowFlag"/>
+            <hc:LangConverter x:Key="lc"/>
         </ResourceDictionary>
     </Application.Resources>
 </Application>
diff --git a/HMI.UnitTest/HMI.UnitTest.csproj b/HMI.UnitTest/HMI.UnitTest.csproj
index d4cc6cd..fcae4fc 100644
--- a/HMI.UnitTest/HMI.UnitTest.csproj
+++ b/HMI.UnitTest/HMI.UnitTest.csproj
@@ -68,6 +68,7 @@
     <Reference Include="System.Configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Web" />
+    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Core" />
@@ -127,6 +128,14 @@
     <None Include="App.config" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\ConnectionUtil\ConnectionUtil\ConnectionUtil.csproj">
+      <Project>{d0806fa6-3f6d-4304-81b8-ead9da7cb5b2}</Project>
+      <Name>ConnectionUtil</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HMI.Base\HMI.Base.csproj">
+      <Project>{2A6F9720-A890-4036-9D73-41A0DAE28341}</Project>
+      <Name>HMI.Base</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HMI.Core\HMI.Core.csproj">
       <Project>{3e3bf44a-0b69-45c5-9512-528cb48a7106}</Project>
       <Name>HMI.Core</Name>
@@ -139,6 +148,14 @@
       <Project>{f17de6b5-af1d-48c6-94a0-6b763a6546a6}</Project>
       <Name>HMI.UI</Name>
     </ProjectReference>
+    <ProjectReference Include="..\Plugin.SNGenerateTool\Plugin.SNGenerateTool.csproj">
+      <Project>{3e18af3f-8212-45a5-a6e3-f5b1cfa3afae}</Project>
+      <Name>Plugin.SNGenerateTool</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Plugin.TestResult\Plugin.TestResult.csproj">
+      <Project>{7375b74c-b6bf-4814-9838-e1caacad1897}</Project>
+      <Name>Plugin.TestResult</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>
\ No newline at end of file
diff --git a/HMI.UnitTest/MainWindow.xaml b/HMI.UnitTest/MainWindow.xaml
index cab718c..c2cb78f 100644
--- a/HMI.UnitTest/MainWindow.xaml
+++ b/HMI.UnitTest/MainWindow.xaml
@@ -5,8 +5,24 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:UnitTest"
         mc:Ignorable="d"
+        Loaded="Window_Loaded"
         Title="MainWindow" Height="450" Width="800">
     <Grid x:Name="page">
-        
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <Button Click="Button_Click">娴嬭瘯</Button>
+        <!--<Button Click="Button_Click2" Grid.Row="1">鍙戦��</Button>
+        <Button Click="Button_Click3" Grid.Row="2">鍙戦�乀CP</Button>
+        <Button Click="Button_Click4" Grid.Row="4">鍙戦�丏ata</Button>-->
+        <TextBox x:Name="input" Height="0" Grid.Row="3"></TextBox>
+        <TextBlock Grid.Row="5" Height="0" x:Name="console"></TextBlock>
+        <Border Grid.Row="6" x:Name="border"></Border>
     </Grid>
 </Window>
diff --git a/HMI.UnitTest/MainWindow.xaml.cs b/HMI.UnitTest/MainWindow.xaml.cs
index d6a2c49..cda9a3a 100644
--- a/HMI.UnitTest/MainWindow.xaml.cs
+++ b/HMI.UnitTest/MainWindow.xaml.cs
@@ -1,18 +1,9 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+锘縰sing ConnectionUtil;
+using HMI.Core.Api;
+using HMI.Core.Util;
+using Plugin.TestResult_WPF;
+using System;
 using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using HMI.SettingControl;
 
 namespace UnitTest
 {
@@ -23,9 +14,121 @@
     {
         public MainWindow()
         {
+            LangUtil.Load();
             InitializeComponent();
-            page.Children.Clear();
-            //page.Children.Add(new SettingControl());
+            //page.Children.Add(new UserControl1());
+        }
+
+        TcpClientWrapper tcpClient;
+
+        PipeClient2 client;
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            //client = new PipeClient2("DAService");
+            ////client.OnData += Client_OnData1;
+            //client.Connect();
+
+            //tcpClient = new TcpClientWrapper("127.0.0.1", 5555);
+            //tcpClient.Connect();
+
+            viewControl.View.GetDataTable(0).GetSingleCell(0).SetStatus("testing");
+
+            //new Thread(new ThreadStart(PipeServerMessage)).Start();
+            //new Thread(new ThreadStart(PipeClientMessage)).Start();
+        }
+
+        private void Client_OnData1(object sender, PipeDataEventArgs e)
+        {
+            Console.WriteLine($"{e.Data}");
+        }
+
+        private void Client_OnData(object sender, PipeDataEventArgs e)
+        {
+            Dispatcher.Invoke(() =>
+            {
+                console.Text += e.Data;
+            });
+        }
+
+        private void Button_Click2(object sender, RoutedEventArgs e)
+        {
+            var allStart = DateTime.Now;
+            for (int i = 0; i < 100; i++)
+            {
+                var start = DateTime.Now;
+                if (client.SendMessage("ping", out string res))
+                {
+                    var interval = (DateTime.Now - start).TotalMilliseconds;
+                    Console.WriteLine($"{interval}: {res}");
+                }
+            }
+            Console.WriteLine($"Total: {(DateTime.Now - allStart).TotalMilliseconds}");
+        }
+
+        private void Button_Click3(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                var allStart = DateTime.Now;
+                for (int i = 0; i < 500; i++)
+                {
+                    var start = DateTime.Now;
+                    string data = input.Text;
+                    string str = $"{{\"command\":5,\"value\":{data},\"id\":\"DITag0\"}}\r\n";
+                    string res = tcpClient.SendMessage(str);
+                    var interval = (DateTime.Now - start).TotalMilliseconds;
+                    Console.WriteLine($"{interval}: {res}");
+                }
+                Console.WriteLine($"Total: {(DateTime.Now - allStart).TotalMilliseconds}");
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        private void Button_Click4(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                var allStart = DateTime.Now;
+                for (int i = 0; i < 500; i++)
+                {
+                    var start = DateTime.Now;
+                    string data = input.Text;
+                    string str = $"{{\"command\":5,\"value\":{data},\"id\":\"DITag0\"}}";
+                    client.SendMessage(str, out string res);
+                    var interval = (DateTime.Now - start).TotalMilliseconds;
+                    Console.WriteLine($"{interval}: {res}");
+                }
+                Console.WriteLine($"Total: {(DateTime.Now - allStart).TotalMilliseconds}");
+
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.StackTrace);
+            }
+        }
+
+        private void HandlePlugin(object obj)
+        {
+            if (obj is IPlugin plugin)
+            {
+                plugin.SetBaseFolder(PathHelper.AppFolder);
+                plugin.InitFinish();
+            }
+
+        }
+
+        private ViewControl viewControl;
+
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            viewControl = new ViewControl();
+            HandlePlugin(viewControl);
+            border.Child = viewControl;
+            this.Loaded -= Window_Loaded;
         }
     }
 }
diff --git a/Libs/SupersocketCommon.dll b/Libs/SupersocketCommon.dll
new file mode 100644
index 0000000..972c05c
--- /dev/null
+++ b/Libs/SupersocketCommon.dll
Binary files differ
diff --git a/OPCClient/Commond.cs b/OPCClient/Commond.cs
new file mode 100644
index 0000000..4d675aa
--- /dev/null
+++ b/OPCClient/Commond.cs
@@ -0,0 +1,37 @@
+锘縰sing LT.Utils.Json;
+using System.Collections.Generic;
+
+namespace OPCConnection
+{
+    internal class Commond
+    {
+        private const string Cmd_STX = "02h";
+        private const string Cmd_End = "\r\n";
+
+
+        /// <summary>
+        /// 鍒涘缓璇锋眰鍛戒护
+        /// </summary>
+        /// <param name="Code"></param>
+        /// <param name="Parameters"></param>
+        /// <returns></returns>
+        public static string BuildCmd(string Code, List<string> Parameters)
+        {
+            string str = "02h;" + Code + ";";
+            foreach (string str2 in Parameters)
+            {
+                str = str + str2 + ";";
+            }
+            return (str + "\r\n");
+        }
+
+        /// <summary>
+        /// 鍒涘缓璇锋眰鍛戒护
+        /// </summary>
+        /// <param name="_object"></param>
+        /// <returns></returns>
+        public static string BuildCmdScada(object _object) =>
+            JsonExtensions.ToJson(_object, false, false, false);
+    }
+
+}
diff --git a/OPCClient/OPCClient.cs b/OPCClient/OPCClient.cs
new file mode 100644
index 0000000..b135858
--- /dev/null
+++ b/OPCClient/OPCClient.cs
@@ -0,0 +1,664 @@
+锘縰sing ConnectionUtil;
+using LT.Utils.Json;
+using Newtonsoft.Json;
+using SuperSocketServer.Common;
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading;
+
+namespace OPCConnection
+{
+    public class OPCClient : SCADAApi
+    {
+        private Socket ClientSocket = null;
+
+        /// <summary>
+        /// 杩炴帴瓒呮椂浜嬩欢ms
+        /// </summary>
+        public int _ConnectTimeout = 20000;
+        private int Size = 0x989680;
+        private Dictionary<int, string> paraMPairs = new Dictionary<int, string>();
+
+
+        /// <summary>
+        /// IP杩炴帴Scada鏈嶅姟鍣�
+        /// </summary>
+        /// <param name="IP">MES鏈嶅姟鍣↖P</param>
+        /// <param name="Port"> MES鏈嶅姟鍣≒ort鍙�</param>
+        /// <param name="LocalIP">鏈湴杩炴帴IP</param>
+        /// <param name="LocalPort">鏈湴杩炴帴绔彛</param>
+        /// <returns></returns>
+        public bool Connect(string IP, int Port, string LocalIP, int LocalPort)
+        {
+            try
+            {
+                this.ClientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                IPAddress address = IPAddress.Parse(IP);
+                IPEndPoint point = new IPEndPoint(IPAddress.Parse(LocalIP), LocalPort);
+                IPEndPoint remoteEP = new IPEndPoint(address, Port);
+                this.ClientSocket.Connect(remoteEP);
+                return true;
+            }
+            catch (Exception)
+            {
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 杩炴帴Scada绠$悊鏈嶅姟鍣�
+        /// </summary>
+        /// <param name="IP"> Scada鏈嶅姟鍣↖P</param>
+        /// <param name="Port">ScadPort鍙�</param>
+        /// <param name="LocalPort">鏈湴杩炴帴绔彛</param>
+        /// <param name="errMsg"></param>
+        /// <param name="socket"></param>
+        /// <returns></returns>
+        public bool Connect2(string IP, int Port, int LocalPort, out string errMsg, Socket socket = null)
+        {
+            try
+            {
+                errMsg = string.Empty;
+                if (!this.TcpPing(IP, Port, out errMsg))
+                {
+                    throw new Exception(errMsg);
+                }
+                if (socket != null)
+                {
+                    this.ClientSocket = socket;
+                }
+                else
+                {
+                    this.ClientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                }
+                IPAddress address = IPAddress.Parse(IP);
+                this.ClientSocket.Connect(address, Port);
+                if (!this.DoLogin("admin", "LT123456", out string str))
+                {
+                    throw new Exception(str);
+                }
+                return true;
+            }
+            catch (Exception exception)
+            {
+                errMsg = "杩炴帴SCADA鏈嶅姟澶辫触:" + exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        ///  杩炴帴Scada绠$悊鏈嶅姟鍣�
+        /// </summary>
+        /// <param name="IP">ScadaManagerIP</param>
+        /// <param name="Port">ScadaManagerPort鍙�</param>
+        /// <param name="LocalPort">鏈湴杩炴帴绔彛</param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool ConnectManager(string IP, int Port, int LocalPort, out string errMsg)
+        {
+            try
+            {
+                errMsg = string.Empty;
+                if (!this.TcpPing(IP, Port, out errMsg))
+                {
+                    throw new Exception(errMsg);
+                }
+                this.ClientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                IPAddress address = IPAddress.Parse(IP);
+                this.ClientSocket.Connect(address, Port);
+                return true;
+            }
+            catch (Exception exception)
+            {
+                errMsg = "杩炴帴SCADA鏈嶅姟澶辫触:" + exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 鏂紑鏈嶅姟鍣ㄨ繛鎺�
+        /// </summary>
+        public void DisConnect()
+        {
+            try
+            {
+                if (this.ClientSocket != null)
+                {
+                    //this.ClientSocket.Shutdown(SocketShutdown.Both);
+                    this.ClientSocket.Close();
+                }
+            }
+            catch (Exception exception)
+            {
+                throw new Exception("鏂紑SCADA鏈嶅姟鍣ㄥけ璐�:" + exception.Message);
+            }
+        }
+
+        /// <summary>
+        /// 閲婃斁璧勬簮
+        /// </summary>
+        public void Dispose()
+        {
+            if (this.ClientSocket != null)
+            {
+                this.ClientSocket.Dispose();
+            }
+        }
+
+        /// <summary>
+        /// 鎵归噺鍐欏鍔犲弬鏁�
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="par"></param>
+        /// <returns></returns>
+        public bool DoAddParWriteMultiple(int id, string par)
+        {
+            if (this.paraMPairs.ContainsKey(id))
+            {
+                return false;
+            }
+            this.paraMPairs.Add(id, par);
+            return true;
+        }
+
+        /// <summary>
+        /// 鎹㈠瀷
+        /// </summary>
+        /// <param name="_ProductLineName"></param>
+        /// <param name="_ProductName"></param>
+        /// <param name="errMsg"></param>
+        /// <param name="_WorkStationName"></param>
+        /// <returns></returns>
+        public bool DoDoChangeModel(string _ProductLineName, string _ProductName, out string errMsg, string _WorkStationName = null)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 7,
+                    ProductLineName = _ProductLineName,
+                    ProductName = _ProductName,
+                    WorkStationName = _WorkStationName
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 鎵归噺璇诲��
+        /// </summary>
+        /// <param name="_Id"></param>
+        /// <returns></returns>
+        public string[,] DoFctReadMultiple(int[] _Id)
+        {
+            string[,] strArray2;
+            try
+            {
+                var type = new
+                {
+                    command = 2,
+                    comefrom = 1,
+                    paraM = _Id
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                if (this.ResquestResult(resquestStr, out Result result, out _))
+                {
+                    Dictionary<string, string> dictionary = JsonUtil.ToObject<Dictionary<string, string>>(result.result.ToString());
+                    string[,] strArray = new string[dictionary.Count, 2];
+                    int num = 0;
+                    foreach (KeyValuePair<string, string> pair in dictionary)
+                    {
+                        strArray[num, 0] = pair.Key;
+                        strArray[num, 1] = pair.Value;
+                        num++;
+                    }
+                    return strArray;
+                }
+                strArray2 = null;
+            }
+            catch (Exception exception)
+            {
+                throw new Exception(exception.Message);
+            }
+            return strArray2;
+        }
+
+        /// <summary>
+        /// 鍗曚竴璇诲��
+        /// </summary>
+        /// <param name="_name"></param>
+        /// <param name="result"></param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool DoFctReadSingle(string _name, out string result, out string errMsg)
+        {
+            result = string.Empty;
+            try
+            {
+                var type = new
+                {
+                    command = 0x31,
+                    id = _name,
+                    comefrom = 1
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                if (this.ResquestResult(resquestStr, out Result result2, out errMsg))
+                {
+                    result = result2.result?.ToString();
+                    return true;
+                }
+                return false;
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+            finally
+            {
+                GC.Collect();
+            }
+        }
+
+        /// <summary>
+        /// 鍗曚竴鍐欏��
+        /// </summary>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool DoFctWriteMultiple(out string errMsg)
+        {
+            bool flag2;
+            errMsg = string.Empty;
+            try
+            {
+                if (this.ToFctWriteMultiple(this.paraMPairs, out errMsg))
+                {
+                    return true;
+                }
+                flag2 = false;
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                flag2 = false;
+            }
+            finally
+            {
+                this.InitParWriteMultiple();
+            }
+            return flag2;
+        }
+
+        /// <summary>
+        /// 鍐欏崟涓�鍊�
+        /// </summary>
+        /// <param name="_name"></param>
+        /// <param name="_value"></param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool DoFctWriteSingle(string _name, string _value, out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 5,
+                    id = _name,
+                    value = _value
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// mqtt鍙戝竷娑堟伅
+        /// </summary>
+        /// <param name="topic">涓婚</param>
+        /// <param name="_value">鍊�</param>
+        /// <param name="errMsg">閿欒淇℃伅></param>
+        /// <returns></returns>
+        public bool DoMqttPublish(string topic, string _value, out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 12,
+                    Tag = topic,
+                    value = _value
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="_user"></param>
+        /// <param name="_password"></param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool DoLogin(string _user, string _password, out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 11,
+                    user = _user,
+                    password = _password
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 閲嶅惎DataServer鏈嶅姟鍣�
+        /// </summary>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool DoReSETDataServer(out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 10
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        ///  鑾峰彇鍔ㄦ�両P
+        /// </summary>
+        /// <returns></returns>
+        public string getLocalIP()
+        {
+            string str2 = null;
+            IPHostEntry hostByName = Dns.GetHostByName(Dns.GetHostName());
+            int length = hostByName.AddressList.Length;
+            for (int i = 0; i < length; i++)
+            {
+                IPAddress address = hostByName.AddressList[i];
+                str2 = Convert.ToString(address);
+                if (str2.Substring(0, 5) == "10.10")
+                {
+                    return str2;
+                }
+            }
+            return str2;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="_paraMPairs"></param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public short[,] GetLowerComputerStatus(short[] _paraMPairs, out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 9,
+                    paraM = _paraMPairs
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                if (this.ResquestResult(resquestStr, out Result result, out errMsg))
+                {
+                    Dictionary<short, short> dictionary = JsonUtil.ToObject<Dictionary<short, short>>(result.result.ToString());
+                    short[,] numArray = new short[dictionary.Count, 2];
+                    int num = 0;
+                    foreach (KeyValuePair<short, short> pair in dictionary)
+                    {
+                        numArray[num, 0] = pair.Key;
+                        numArray[num, 1] = pair.Value;
+                        num++;
+                    }
+                    return numArray;
+                }
+                return null;
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨壒閲忓啓鍙傛暟
+        /// </summary>
+        public void InitParWriteMultiple()
+        {
+            this.paraMPairs.Clear();
+        }
+
+        /// <summary>
+        /// 妫�鏌ヤ笌LTSCADA鏄惁鏂紑杩炴帴浜�
+        /// </summary>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        public bool IsConnected(out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 6
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="Pars"></param>
+        /// <returns></returns>
+        private static string ParsToString<T>(T Pars) =>
+            null;
+
+        /// <summary>
+        /// 杩斿洖璇锋眰淇℃伅
+        /// </summary>
+        /// <param name="ResquestStr"></param>
+        /// <param name="JResult"></param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        private bool ResquestResult(string ResquestStr, out Result JResult, out string errMsg)
+        {
+            errMsg = string.Empty;
+            JResult = null;
+            try
+            {
+                JResult = JsonConvert.DeserializeObject<Result>(ResquestStr);
+                if (!JResult.success)
+                {
+                    errMsg = "璇锋眰澶辫触:" + JResult.message;
+                    return false;
+                }
+                return true;
+            }
+            catch (Exception exception)
+            {
+                errMsg = JResult?.message + " --- " + exception.Message;
+                return false;
+            }
+        }
+
+
+        /// <summary>
+        /// 鎺ユ敹鏁版嵁瓒呮椂鏃堕棿
+        /// </summary>
+        public uint TimeRecOut { set; get; } = 20000;
+
+        /// <summary>
+        /// 绾跨▼閿�
+        /// </summary>
+        private readonly object objLock = new object();
+
+        /// <summary>
+        /// 鍙戦�佽姹備俊鎭�
+        /// </summary>
+        /// <param name="Cmd"></param>
+        /// <returns></returns>
+        private string SendSocketMessage(string Cmd)
+        {
+            string str2;
+            try
+            {
+                string str = "";
+                byte[] bytes = Encoding.UTF8.GetBytes(Cmd + "\r\n");
+                lock (objLock)
+                {
+                    int available = this.ClientSocket.Available;
+                    if (available > 0)
+                    {
+                        byte[] buffer2 = new byte[available];
+                        this.ClientSocket.Receive(buffer2, 0, available, SocketFlags.None);
+                    }
+                    this.ClientSocket.Send(bytes);
+                    bool flag = false;
+                    int tickCount = Environment.TickCount;
+                    int size = this.ClientSocket.Available;
+                    bool flag2 = false;
+                    while (((size < this.Size) && !flag) && !(flag2 = str.Contains("\r\n")))
+                    {
+                        Thread.Sleep(2);
+                        size = this.ClientSocket.Available;
+                        if ((size > this.Size) || (str.Length > this.Size))
+                        {
+                            throw new Exception($"鎺ユ敹鏁版嵁瓒呰繃璁惧畾鍊納this.Size}BYTE锛�");
+                        }
+                        flag = (Environment.TickCount - tickCount) > TimeRecOut;
+                        if (flag)
+                        {
+                            if (size > 0)
+                            {
+                                byte[] buffer3 = new byte[size];
+                                this.ClientSocket.Receive(buffer3, 0, size, SocketFlags.None);
+                            }
+                            throw new Exception("鎺ユ敹鏁版嵁瓒呮椂锛�");
+                        }
+                        if (!flag && (size > 0))
+                        {
+                            byte[] buffer4 = new byte[size];
+                            this.ClientSocket.Receive(buffer4, 0, size, SocketFlags.None);
+                            str = str + Encoding.UTF8.GetString(buffer4);
+                        }
+                    }
+                }
+                str2 = str;
+            }
+            catch (Exception exception)
+            {
+                throw new Exception(exception.Message);
+            }
+            return str2;
+        }
+
+        /// <summary>
+        /// TcpPing
+        /// </summary>
+        /// <param name="Host"></param>
+        /// <param name="Port"></param>
+        /// <param name="errMsg"></param>
+        /// <returns></returns>
+        private bool TcpPing(string Host, int Port, out string errMsg)
+        {
+            bool flag = false;
+            errMsg = string.Empty;
+            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+            try
+            {
+                bool flag2 = socket.BeginConnect(Host, Port, null, null).AsyncWaitHandle.WaitOne(this._ConnectTimeout, true);
+                if (!flag2)
+                {
+                    errMsg = "errTCPConnectionFailed";
+                }
+                flag = flag2;
+            }
+            catch
+            {
+                errMsg = "errTCPConnectionFailed";
+                flag = false;
+            }
+            socket.Close();
+            return flag;
+        }
+
+        /// <summary>
+        /// 鎵归噺鍐�
+        /// </summary>
+        /// <param name="_paraMPairs">鍙傛暟鍒楄〃</param>
+        /// <param name="errMsg">閿欒淇℃伅</param>
+        /// <returns>澶勭悊缁撴灉</returns>
+        public bool ToFctWriteMultiple(Dictionary<int, string> _paraMPairs, out string errMsg)
+        {
+            try
+            {
+                var type = new
+                {
+                    command = 15,
+                    paraM = _paraMPairs
+                };
+                string resquestStr = this.SendSocketMessage(JsonExtensions.ToJson(type, false, false, false));
+                return this.ResquestResult(resquestStr, out _, out errMsg);
+            }
+            catch (Exception exception)
+            {
+                errMsg = exception.Message;
+                return false;
+            }
+        }
+
+        public bool Connect(object config, out string errMsg)
+        {
+            errMsg = null;
+            return false;
+        }
+    }
+}
diff --git a/OPCClient/OPCClient.csproj b/OPCClient/OPCClient.csproj
new file mode 100644
index 0000000..8f0a730
--- /dev/null
+++ b/OPCClient/OPCClient.csproj
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OPCClient</RootNamespace>
+    <AssemblyName>OPCClient</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="SupersocketCommon">
+      <HintPath>..\Libs\SupersocketCommon.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Commond.cs" />
+    <Compile Include="OPCClient.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\ConnectionUtil\ConnectionUtil\ConnectionUtil.csproj">
+      <Project>{d0806fa6-3f6d-4304-81b8-ead9da7cb5b2}</Project>
+      <Name>ConnectionUtil</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/OPCClient/Properties/AssemblyInfo.cs b/OPCClient/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..2ffcc97
--- /dev/null
+++ b/OPCClient/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
+[assembly: AssemblyTitle("OPCClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OPCClient")]
+[assembly: AssemblyCopyright("Copyright 漏  2025")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆�
+[assembly: ComVisible(false)]
+
+// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID
+[assembly: Guid("e5740bb5-9fc6-4a20-b7c2-cc90c281ed05")]
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�: 
+//
+//      涓荤増鏈�
+//      娆$増鏈�
+//      鐢熸垚鍙�
+//      淇鍙�
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OPCClient/packages.config b/OPCClient/packages.config
new file mode 100644
index 0000000..5eaa239
--- /dev/null
+++ b/OPCClient/packages.config
@@ -0,0 +1,4 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
+</packages>
\ No newline at end of file
diff --git a/Plugin.DOControl/DOControl.xaml.cs b/Plugin.DOControl/DOControl.xaml.cs
index 4ec40cc..b5e1924 100644
--- a/Plugin.DOControl/DOControl.xaml.cs
+++ b/Plugin.DOControl/DOControl.xaml.cs
@@ -1,4 +1,5 @@
-锘縰sing HMI.Base;
+锘縰sing ConnectionUtil;
+using HMI.Base;
 using HMI.Core.Setting;
 using HMI.Core.Util;
 using HMI.UI;
@@ -13,7 +14,6 @@
 using System.Linq;
 using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Documents;
 using System.Windows.Media;
 
 namespace Plugin.DOControl
@@ -26,7 +26,8 @@
         /// <summary>
         /// 瀹炰緥鍖栨湇鍔″櫒鎺ュ彛鍑芥暟
         /// </summary>
-        private OpcInterface.OpcInterface lTSCADAApi = new OpcInterface.OpcInterface();
+        //private OpcInterface.OpcInterface lTSCADAApi = new OpcInterface.OpcInterface();
+        private PipeClient pipeClient = new PipeClient("DAService");
 
         private ObservableCollection<string> groups;
         public ObservableCollection<string> Groups
@@ -124,15 +125,14 @@
 
         private void LoadData()
         {
+            ObservableCollection<DOControlData> datas = new ObservableCollection<DOControlData>();
             try
             {
                 motorMonitorTimer.Enabled = false;
-                ObservableCollection<DOControlData> datas = new ObservableCollection<DOControlData>();
                 if (File.Exists(FilePath))
                 {
                     datas = XmlHelper.DeserializeFromXml<ObservableCollection<DOControlData>>(FilePath);
                 }
-                Datasource = datas;
                 GroupMap = datas.GroupBy(x => x.Group)
                    .ToDictionary(
                        group => group.Key,
@@ -157,6 +157,7 @@
             {
                 motorMonitorTimer.Enabled = true;
             }
+            Datasource = datas;
         }
 
         private void MotorMonitorTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -174,7 +175,7 @@
                         string value = GetPlcValue(data.Address);
                         switch (data.ControlType)
                         {
-                            case ControlType.Button:
+                            case ControlType.BOOL:
                                 var color = Application.Current.FindResource("VerBar") as Brush;
                                 if (value == data.PressDownValue)
                                 {
@@ -183,12 +184,12 @@
                             ((Button)ui).Background = color;
                                 ((Button)ui).Content = value;
                                 break;
-                            case ControlType.Int16:
-                            case ControlType.Int32:
-                            case ControlType.Real:
-                            case ControlType.LReal:
-                            case ControlType.String:
-                            case ControlType.WString:
+                            case ControlType.INT:
+                            case ControlType.WORD:
+                            case ControlType.REAL:
+                            case ControlType.LREAL:
+                            case ControlType.STRING:
+                            case ControlType.WSTRING:
                                 ((Button)ui).Content = value;
                                 break;
                             default:
@@ -235,19 +236,14 @@
                         FrameworkElement ui = null;
                         switch (data.ControlType)
                         {
-                            case ControlType.Button:
-                            case ControlType.ClickButton:
+                            case ControlType.BOOL:
+                            case ControlType.PULSE:
                                 ui = CreateButton(data);
                                 break;
-                            case ControlType.Int16:
-                            case ControlType.Int32:
-                            case ControlType.Real:
-                            case ControlType.LReal:
-                            case ControlType.String:
-                            case ControlType.WString:
-                                ui = CreateNumberInput(data);
+                            case ControlType.TIME:
                                 break;
                             default:
+                                ui = CreateInput(data);
                                 break;
                         }
                         if (ui != null)
@@ -294,11 +290,11 @@
                 MinWidth = 180,
                 MinHeight = 40
             };
-            if (data.ControlType == ControlType.Button)
+            if (data.ControlType == ControlType.BOOL)
             {
                 btn.Click += ControlButton_Click;
             }
-            else if (data.ControlType == ControlType.ClickButton)
+            else if (data.ControlType == ControlType.PULSE)
             {
                 btn.Content = data.Address;
                 btn.PreviewMouseLeftButtonDown += Btn_MouseLeftButtonDown;
@@ -341,7 +337,7 @@
             }
         }
 
-        private Button CreateNumberInput(DOControlData data)
+        private Button CreateInput(DOControlData data)
         {
             Style btnStyle = Application.Current.FindResource("PrimaryButton") as Style;
             var tb = new Button
@@ -361,7 +357,7 @@
                 return tb;
             }
 
-            if (data.ControlType == ControlType.String || data.ControlType == ControlType.WString)
+            if (data.ControlType == ControlType.STRING || data.ControlType == ControlType.WSTRING)
             {
                 tb.Click += StringInput_Click;
             }
@@ -380,22 +376,25 @@
         /// <param name="value">鍊�</param>
         private void SetPlcValue(string key, string value)
         {
-            if (!lTSCADAApi.DoFctWriteSingle(key, value, out string errMsg))
-            {
-                throw new Exception(errMsg);
-            }
+            //if (!lTSCADAApi.DoFctWriteSingle(key, value, out string errMsg))
+            //{
+            //    ToastHelper.Error(this, errMsg);
+            //}
+
+            pipeClient.SendMessage("asdsadasda", out _);
         }
 
         private string GetPlcValue(string key)
         {
-            if (lTSCADAApi.DoFctReadSingle(key, out string Val, out string errMsg))
-            {
-                return Val;
-            }
-            else
-            {
-                return null;
-            }
+            //if (lTSCADAApi.DoFctReadSingle(key, out string Val, out string errMsg))
+            //{
+            //    return Val;
+            //}
+            //else
+            //{
+            //    return null;
+            //}
+            return null;
         }
 
         private void ControlButton_Click(object sender, RoutedEventArgs args)
@@ -437,7 +436,8 @@
             NumberPanel np = new NumberPanel
             {
                 Title = data.Name,
-                Owner = Window.GetWindow(this)
+                Owner = Window.GetWindow(this),
+                DotEnabled = data.ControlType == ControlType.REAL || data.ControlType == ControlType.LREAL
             };
             if (np.Open(tb.Content?.ToString()) == true)
             {
@@ -450,19 +450,34 @@
             LoadData();
             if (SystemSetting.Instance.PlcEnabled)
             {
-                if (lTSCADAApi.Connect2("127.0.0.1", 6543, 18888, out string errMsg))
+                //if (lTSCADAApi.Connect2("127.0.0.1", 6543, 18888, out string errMsg))
+                //{
+                //    motorMonitorTimer.Enabled = true;
+                //    RefreshControl();
+                //}
+                //else
+                //{
+                //    MsgBoxHelper2.Error(errMsg);
+                //}
+                try
                 {
-                    motorMonitorTimer.Enabled = true;
-                    RefreshControl();
+                    pipeClient.OnConnected += PipeClient_OnConnected;
+
+                    pipeClient.Connect();
                 }
-                else
+                catch (Exception ex)
                 {
-                    MsgBoxHelper2.Error(errMsg);
+                    MsgBoxHelper.Error(this, ex.Message);
                 }
             }
             Loaded -= UserControl_Loaded;
         }
 
+        private void PipeClient_OnConnected(object sender, EventArgs e)
+        {
+
+        }
+
         private void Button_Click(object sender, RoutedEventArgs e)
         {
             Button btn = sender as Button;
diff --git a/Plugin.DOControl/DataModal.xaml b/Plugin.DOControl/DataModal.xaml
index 1edace3..16952b4 100644
--- a/Plugin.DOControl/DataModal.xaml
+++ b/Plugin.DOControl/DataModal.xaml
@@ -6,13 +6,24 @@
             xmlns:local="clr-namespace:Plugin.DOControl"
             xmlns:pw="https://opensource.panuon.com/wpf"
             xmlns:pu="https://opensource.panuon.com/wpf-ui"
-            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
+            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" 
+            xmlns:sys="clr-namespace:System;assembly=mscorlib"
+            xmlns:ety="clr-namespace:Plugin.DOControl.Entity"
             mc:Ignorable="d"
             Title="Form"
             SizeToContent="Height"
             Width="600"
             WindowStartupLocation="CenterOwner"
             Style="{StaticResource ModalWindow}">
+    <Window.Resources>
+        <ObjectDataProvider x:Key="enumValues" 
+                        MethodName="GetValues" 
+                        ObjectType="{x:Type sys:Enum}">
+            <ObjectDataProvider.MethodParameters>
+                <x:Type TypeName="ety:ControlType"/>
+            </ObjectDataProvider.MethodParameters>
+        </ObjectDataProvider>
+    </Window.Resources>
     <Grid Margin="10">
         <StackPanel x:Name="formPanel">
             <pu:FormGroup x:Name="FgGroup" 
@@ -69,15 +80,17 @@
 Style="{StaticResource InputFormGroupStyle}"
 dp:FormGroupHelper.IsRequired="True"
 GroupName="MyFormGroup">
-                <ComboBox x:Name="CbControlType" Style="{StaticResource FormComboxStyle}" SelectedValuePath="Content">
-                    <ComboBoxItem>0</ComboBoxItem>
+                <ComboBox x:Name="CbControlType" Style="{StaticResource FormComboxStyle}" 
+                          ItemsSource="{Binding Source={StaticResource enumValues}}"
+                          SelectedValuePath="Content">
+                    <!--<ComboBoxItem>0</ComboBoxItem>
                     <ComboBoxItem>1</ComboBoxItem>
                     <ComboBoxItem>2</ComboBoxItem>
                     <ComboBoxItem>3</ComboBoxItem>
-                    <ComboBoxItem>4</ComboBoxItem>
+                    <ComboBoxItem>4</ComboBoxItem> 
                     <ComboBoxItem>5</ComboBoxItem>
                     <ComboBoxItem>6</ComboBoxItem>
-                    <ComboBoxItem>7</ComboBoxItem>
+                    <ComboBoxItem>7</ComboBoxItem>-->
                 </ComboBox>
             </pu:FormGroup>
         </StackPanel>
diff --git a/Plugin.DOControl/DataModal.xaml.cs b/Plugin.DOControl/DataModal.xaml.cs
index 573d967..b52b38f 100644
--- a/Plugin.DOControl/DataModal.xaml.cs
+++ b/Plugin.DOControl/DataModal.xaml.cs
@@ -108,7 +108,7 @@
                 Data.ReadOnly = CxReadOnly.IsChecked == true;
                 Data.PressDownValue = TbPressDownValue.Text;
                 Data.PressUpValue = TbPressUpValue.Text;
-                Data.ControlType = (ControlType)int.Parse(CbControlType.SelectedValue.ToString());
+                Data.ControlType = (ControlType)CbControlType.SelectedItem;
             }
             return flag;
         }
@@ -124,13 +124,17 @@
             CxReadOnly.IsChecked = Data.ReadOnly;
             TbPressDownValue.Text = Data.PressDownValue;
             TbPressUpValue.Text = Data.PressUpValue;
-            CbControlType.SelectedValue = (int)Data.ControlType;
+            CbControlType.SelectedItem = Data.ControlType;
             return this.ShowDialog();
         }
 
         private void SaveOrUpdateData()
         {
-            int index = Datasource.IndexOf(Data);
+            int index = -1;
+            if (Datasource != null)
+            {
+                index = Datasource.IndexOf(Data);
+            }
             if (index < 0)
             {
                 InsertData(Data);
diff --git a/Plugin.DOControl/Entity/DOControlData.cs b/Plugin.DOControl/Entity/DOControlData.cs
index a945bb8..d9c3735 100644
--- a/Plugin.DOControl/Entity/DOControlData.cs
+++ b/Plugin.DOControl/Entity/DOControlData.cs
@@ -5,7 +5,19 @@
 {
     public enum ControlType
     {
-        Button, Int16, Int32, Real, LReal, String, WString, ClickButton
+        BOOL = 0,
+        BYTE = 1,
+        INT = 2,
+        UINT = 3,
+        DINT = 4,
+        UDINT = 5,
+        REAL = 6,
+        LREAL = 7,
+        TIME = 8,
+        WORD = 9,
+        STRING = 10,
+        WSTRING = 11,
+        PULSE = 12
     }
     public class DOControlData : SelectBase
     {
diff --git a/Plugin.DOControl/Plugin.DOControl.csproj b/Plugin.DOControl/Plugin.DOControl.csproj
index f2dbe82..c380687 100644
--- a/Plugin.DOControl/Plugin.DOControl.csproj
+++ b/Plugin.DOControl/Plugin.DOControl.csproj
@@ -31,6 +31,24 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="log4net, Version=3.0.4.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
       <HintPath>..\WPFProject\packages\log4net.3.0.4\lib\net462\log4net.dll</HintPath>
@@ -107,9 +125,9 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HMI.Old\OPCInterface\OpcInterface\OpcInterface.csproj">
-      <Project>{e1464149-2c0a-499d-ab90-0c72e6ed1c53}</Project>
-      <Name>OpcInterface</Name>
+    <ProjectReference Include="..\..\ConnectionUtil\ConnectionUtil\ConnectionUtil.csproj">
+      <Project>{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}</Project>
+      <Name>ConnectionUtil</Name>
     </ProjectReference>
     <ProjectReference Include="..\HMI.Base\HMI.Base.csproj">
       <Project>{2a6f9720-a890-4036-9d73-41a0dae28341}</Project>
diff --git a/Plugin.SNGenerateTool/Entity/DataInfo.cs b/Plugin.SNGenerateTool/Entity/DataInfo.cs
new file mode 100644
index 0000000..365d101
--- /dev/null
+++ b/Plugin.SNGenerateTool/Entity/DataInfo.cs
@@ -0,0 +1,53 @@
+锘縰sing System;
+
+namespace Plugin.SNGenerateTool.Entity
+{
+    public class DataInfo
+    {
+        public string GUID { get; set; }
+
+        public string OrderID { get; set; }
+
+        public string Model { get; set; }
+
+        public string MESSN { get; set; }
+
+        public string XDSN { get; set; }
+
+        public string DHUID { get; set; }
+
+        public string ProductSN { get; set; }
+
+        public string HW { get; set; }
+
+        public string SW { get; set; }
+
+        public string GeelyDU { get; set; }
+
+        public string GeelyHWSD { get; set; }
+
+        public string SXBL { get; set; }
+
+        public string SXDI_SXBL { get; set; }
+
+        public string ECUDAPN { get; set; }
+
+        public string ECUCAPN { get; set; }
+
+        public string HSMKey { get; set; }
+
+        public string JtagKey { get; set; }
+
+        public string TEEKey { get; set; }
+
+        public int Status { get; set; }
+
+        public DateTime CreateTime { get; set; }
+
+        public DateTime ModifyTime { get; set; }
+
+        public bool IsPrint { get; set; }
+
+        public DateTime PrintTime { get; set; }
+    }
+}
diff --git a/Plugin.SNGenerateTool/Entity/UserSetting.cs b/Plugin.SNGenerateTool/Entity/UserSetting.cs
new file mode 100644
index 0000000..4ffe590
--- /dev/null
+++ b/Plugin.SNGenerateTool/Entity/UserSetting.cs
@@ -0,0 +1,130 @@
+锘縰sing Microsoft.Extensions.Configuration;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Plugin.SNGenerateTool.Entity
+{
+    public class UserSettings
+    {
+        public string OrderId { get; set; }
+
+        public string Model { get; set; }
+
+        public string SNPrefix { get; set; }
+
+        public string MESSstartSN { get; set; }
+
+        public string MESEndSN { get; set; }
+
+        public string XDSNDate { get; set; }
+
+        public string XDSNDaySN { get; set; }
+
+        public string XDSNSpecialSN { get; set; }
+
+        public string PartNo { get; set; }
+
+        public string HW { get; set; }
+
+        public string SW { get; set; }
+
+        public string GeelyDU { get; set; }
+
+        public string GeelyHWSD { get; set; }
+
+        public string SXBL { get; set; }
+
+        public string SXDISXBL { get; set; }
+
+        public string VolvoDU { get; set; }
+
+        public string VolvoHWSD { get; set; }
+
+        public string DBConn { get; set; }
+
+        private string IP { get; set; }
+
+        private string DataBase { get; set; }
+
+        private string Uid { get; set; }
+
+        private string Pwd { get; set; }
+
+        public string Models { get; set; }
+
+        public string Field { get; set; }
+
+        [DllImport("kernel32")]
+        private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
+
+        [DllImport("kernel32")]
+        private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
+
+        [DllImport("kernel32")]
+        private static extern int GetPrivateProfileString(string section, string key, string def, byte[] retVal, int size, string filePath);
+
+        public UserSettings(string file)
+        {
+            GetString(file);
+        }
+
+        public UserSettings(string section, string file)
+        {
+            GetString(section, file);
+        }
+
+        private void GetString(string fPath)
+        {
+            //IL_0027: Unknown result type (might be due to invalid IL or missing references)
+            //IL_002d: Expected O, but got Unknown
+            if (!File.Exists(fPath))
+            {
+                MessageBox.Show("閰嶇疆鏂囦欢涓嶅瓨鍦紝璇诲彇澶辫触", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+                return;
+            }
+            ConfigurationBuilder val = new ConfigurationBuilder();
+            IniConfigurationExtensions.AddIniFile((IConfigurationBuilder)(object)val, fPath);
+            IConfigurationRoot val2 = val.Build();
+            IP = ((IConfiguration)val2)["Server:ip"];
+            DataBase = ((IConfiguration)val2)["Server:database"];
+            Uid = ((IConfiguration)val2)["Server:uid"];
+            Pwd = ((IConfiguration)val2)["Server:pwd"];
+            DBConn = "Server=" + IP + ";DataBase=" + DataBase + ";Uid=" + Uid + ";Pwd=" + Pwd;
+            Models = ((IConfiguration)val2)["UserDefined:models"];
+            Field = ((IConfiguration)val2)["UserDefined:field"];
+        }
+
+        private void GetString(string section, string fPath)
+        {
+            //IL_0027: Unknown result type (might be due to invalid IL or missing references)
+            //IL_002d: Expected O, but got Unknown
+            if (!File.Exists(fPath))
+            {
+                MessageBox.Show("閰嶇疆鏂囦欢涓嶅瓨鍦紝璇诲彇澶辫触", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+                return;
+            }
+            ConfigurationBuilder val = new ConfigurationBuilder();
+            IniConfigurationExtensions.AddIniFile((IConfigurationBuilder)(object)val, fPath);
+            IConfigurationRoot val2 = val.Build();
+            OrderId = ((IConfiguration)val2)[section + ":Orderid"];
+            Model = ((IConfiguration)val2)[section + ":Model"];
+            SNPrefix = ((IConfiguration)val2)[section + ":SNPrefix"];
+            MESSstartSN = ((IConfiguration)val2)[section + ":MESStartSN"];
+            MESEndSN = ((IConfiguration)val2)[section + ":MESEndSN"];
+            XDSNDate = ((IConfiguration)val2)[section + ":XDSNDate"];
+            XDSNDaySN = ((IConfiguration)val2)[section + ":XDSNDaySN"];
+            XDSNSpecialSN = ((IConfiguration)val2)[section + ":XDSNSpecialSN"];
+            PartNo = ((IConfiguration)val2)[section + ":PartNo"];
+            HW = ((IConfiguration)val2)[section + ":HW"];
+            SW = ((IConfiguration)val2)[section + ":SW"];
+            GeelyDU = ((IConfiguration)val2)[section + ":GeelyDU"];
+            GeelyHWSD = ((IConfiguration)val2)[section + ":GeelyHWSD"];
+            SXBL = ((IConfiguration)val2)[section + ":SXBL"];
+            SXDISXBL = ((IConfiguration)val2)[section + ":SXDISXBL"];
+            VolvoDU = ((IConfiguration)val2)[section + ":VolvoDU"];
+            VolvoHWSD = ((IConfiguration)val2)[section + ":VolvoHWSD"];
+        }
+    }
+}
diff --git a/Plugin.SNGenerateTool/Form1.Designer.cs b/Plugin.SNGenerateTool/Form1.Designer.cs
new file mode 100644
index 0000000..bbc08e7
--- /dev/null
+++ b/Plugin.SNGenerateTool/Form1.Designer.cs
@@ -0,0 +1,3 @@
+锘縩amespace Plugin.SNGenerateTool
+{
+}
\ No newline at end of file
diff --git a/Plugin.SNGenerateTool/Form1.cs b/Plugin.SNGenerateTool/Form1.cs
new file mode 100644
index 0000000..43385d6
--- /dev/null
+++ b/Plugin.SNGenerateTool/Form1.cs
@@ -0,0 +1,1986 @@
+锘縰sing Plugin.SNGenerateTool;
+using Plugin.SNGenerateTool.Entity;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Data.SqlClient;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Globalization;
+using System.IO;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Timers;
+using System.Windows.Forms;
+public class Form1 : Form
+{
+    private Point Point;
+
+    private string iniFile = Path.Combine(Application.StartupPath, "Config", "UserSettings.ini");
+
+    private UserSettings settings1;
+
+    private UserSettings settings2;
+
+    private DataTable table = new DataTable();
+
+    private bool flag;
+
+    private string[] years = new string[30]
+    {
+        "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+        "B", "C", "D", "E", "F", "G", "H", "J", "K", "L",
+        "M", "N", "P", "R", "S", "T", "V", "W", "X", "Y"
+    };
+
+    private string[] months = new string[12]
+    {
+        "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+        "B", "C"
+    };
+
+    private string[] days = new string[31]
+    {
+        "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+        "B", "C", "D", "E", "F", "G", "H", "J", "K", "L",
+        "M", "N", "P", "R", "S", "T", "V", "W", "X", "Y",
+        "Z"
+    };
+
+    private string[] F18CY = new string[10] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+    private System.Timers.Timer timer = new System.Timers.Timer();
+
+    private string fileNameWithoutExt = string.Empty;
+
+    private ProgressBar progressBar = new ProgressBar();
+
+    private IContainer components = null;
+
+    private ToolStripPanel BottomToolStripPanel;
+
+    private ToolStripPanel TopToolStripPanel;
+
+    private ToolStripPanel RightToolStripPanel;
+
+    private ToolStripPanel LeftToolStripPanel;
+
+    private ToolStripContentPanel ContentPanel;
+
+    private TabControl tabControl1;
+
+    private TabPage tabPage1;
+
+    private Panel panel1;
+
+    private GroupBox groupBox2;
+
+    private TextBox txt_FactoryCode;
+
+    private Label label4;
+
+    private TextBox txt_PCODE;
+
+    private TextBox txt_LineNo1;
+
+    private Label label5;
+
+    private Label label6;
+
+    private GroupBox groupBox1;
+
+    private TextBox txt_StartSN;
+
+    private Label label1;
+
+    private TextBox txt_SNPrefix;
+
+    private Label label2;
+
+    private TabPage tabPage2;
+
+    private StatusStrip statusStrip1;
+
+    private GroupBox groupBox3;
+
+    private TextBox txt_StartDHUIDSN;
+
+    private Label label11;
+
+    private TextBox txt_ShiftsNo;
+
+    private Label label12;
+
+    private TextBox txt_Date2;
+
+    private Label label13;
+
+    private TextBox txt_PN;
+
+    private Label label14;
+
+    private TextBox txt_VendorCode;
+
+    private Label label15;
+
+    private Label label17;
+
+    private TextBox txt_EndDaySN;
+
+    private TextBox txt_MinSpecialSN;
+
+    private Label label10;
+
+    private TextBox txt_StartDaySN;
+
+    private Label label9;
+
+    private TextBox txt_Date1;
+
+    private Label label8;
+
+    private Label label7;
+
+    private TextBox txt_EndSN;
+
+    private TextBox txt_MaxSpecialSN;
+
+    private Label label18;
+
+    private TextBox txt_EndDHUIDSN;
+
+    private Label label19;
+
+    private GroupBox groupBox4;
+
+    private TextBox txt_HW;
+
+    private TextBox txt_GeelyHWSD;
+
+    private Label label21;
+
+    private Label label20;
+
+    private TextBox txt_SW;
+
+    private Label label25;
+
+    private TextBox txt_VolvoDU;
+
+    private Label label24;
+
+    private TextBox txt_VolvoHWSD;
+
+    private Label label23;
+
+    private TextBox txt_GeelyDU;
+
+    private Label label22;
+
+    private Button btn_ClearText;
+
+    private Button btn_ImportData;
+
+    private Button btn_CreateSN;
+
+    private DataGridView dataGridView1;
+
+    private ToolStripStatusLabel toolStripStatusLabel1;
+
+    private ToolStripStatusLabel toolStripStatusLabel2;
+
+    private ToolStripStatusLabel toolStripStatusLabel3;
+
+    private ToolStripStatusLabel toolStripStatusLabel4;
+
+    private ToolStripStatusLabel toolStripStatusLabel5;
+
+    private ToolStripStatusLabel toolStripStatusLabel6;
+
+    private ToolTip toolTip1;
+
+    private ErrorProvider errorProvider1;
+
+    private Label label3;
+
+    private Label lbl_Title;
+
+    private TextBox txt_MachineCode;
+
+    private Label label16;
+
+    private Button btn_Close;
+
+    private Button btn_Minimize;
+
+    private ToolStripStatusLabel toolStripStatusLabel7;
+
+    private ToolStripStatusLabel toolStripStatusLabel8;
+
+    private DataGridView dataGridView2;
+
+    private Panel panel2;
+
+    private Label label28;
+
+    private Label label27;
+
+    private Button btn_Delete;
+
+    private Button btn_Modify;
+
+    private Button btn_Query;
+
+    private ComboBox cbox_Field;
+
+    private TextBox tbx_content;
+
+    private ComboBox cbox_Model;
+
+    private Label label26;
+
+    private TextBox txt_SXBL;
+
+    private Label label29;
+
+    private TextBox txt_SXDISXBL;
+
+    private Label label30;
+
+    private TextBox tbx_OrderID;
+
+    private Button btn_OpenDlg;
+
+    private Button btn_Export;
+
+    [DllImport("kernel32")]
+    private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
+
+    [DllImport("kernel32")]
+    private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
+
+    public Form1()
+    {
+        InitializeComponent();
+        settings1 = new UserSettings(iniFile);
+        SetMainForm();
+        SetTabControl();
+        SetToolStrip();
+        SetToolTip();
+        SetErrorProvider();
+        SetControls(base.Controls);
+        SetDataGridColumn(dataGridView1);
+        Timer(timer, Realtime);
+    }
+
+    private string GetVersion()
+    {
+        return "绋嬪簭闆嗙増鏈細" + Assembly.GetExecutingAssembly().GetName().Version.ToString();
+    }
+
+    private void SetMainForm()
+    {
+        Text = "E04 SN Generate Tool";
+        base.ControlBox = false;
+        base.FormBorderStyle = FormBorderStyle.None;
+        base.StartPosition = FormStartPosition.CenterScreen;
+        BackColor = Color.FromArgb(71, 236, 255);
+    }
+
+    private void SetTabControl()
+    {
+        tabControl1.DrawMode = TabDrawMode.OwnerDrawFixed;
+        tabControl1.ItemSize = new Size(75, 25);
+        tabControl1.SizeMode = TabSizeMode.Fixed;
+    }
+
+    private void SetToolStrip()
+    {
+        statusStrip1.BackColor = Color.FromArgb(227, 237, 243);
+        statusStrip1.ForeColor = Color.MediumBlue;
+        toolStripStatusLabel1.Text = "";
+        toolStripStatusLabel1.AutoSize = false;
+        toolStripStatusLabel1.Width = 700;
+        toolStripStatusLabel2.Text = "褰撳墠鐢ㄦ埛锛�";
+        toolStripStatusLabel3.Text = "";
+        toolStripStatusLabel3.AutoSize = false;
+        toolStripStatusLabel3.Width = 50;
+        toolStripStatusLabel4.Text = GetVersion();
+        toolStripStatusLabel5.Text = "";
+        toolStripStatusLabel5.AutoSize = false;
+        toolStripStatusLabel5.Width = 50;
+        toolStripStatusLabel6.Text = "绯荤粺鏃堕棿锛�" + DateTime.Now.ToString("G");
+        toolStripStatusLabel7.Text = "";
+        toolStripStatusLabel7.AutoSize = false;
+        toolStripStatusLabel7.Width = 50;
+        toolStripStatusLabel8.Text = "0琛�";
+    }
+
+    private void SetToolTip()
+    {
+        toolTip1.InitialDelay = 10;
+        toolTip1.ReshowDelay = 10;
+        toolTip1.SetToolTip(txt_Date1, "鏃ユ湡鏍煎紡锛歽yyyMMdd");
+        toolTip1.SetToolTip(txt_Date2, "鏃ユ湡鏍煎紡锛歽yyyMMdd");
+        toolTip1.SetToolTip(btn_Minimize, "鏈�灏忓寲");
+        toolTip1.SetToolTip(btn_Close, "鍏抽棴");
+    }
+
+    private void SetErrorProvider()
+    {
+        errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
+    }
+
+    private void SetControls(Control.ControlCollection controls)
+    {
+        foreach (Control control in controls)
+        {
+            if (control is TabControl tabControl)
+            {
+                tabControl.DrawItem += tabControl1_DrawItem;
+            }
+            else if (control is Panel panel)
+            {
+                panel.BackColor = Color.FromArgb(227, 237, 243);
+            }
+            else if (control is GroupBox groupBox)
+            {
+                groupBox.ForeColor = ColorTranslator.FromHtml("#442A9D");
+            }
+            else if (control is TextBox textBox)
+            {
+                textBox.ImeMode = ImeMode.Disable;
+                if (textBox.Name == "txt_Date1" || textBox.Name == "txt_Date2")
+                {
+                    textBox.Text = DateTime.Now.ToString("yyyyMMdd");
+                }
+                if (textBox.Name == "txt_EndDaySN" || textBox.Name == "txt_MaxSpecialSN" || textBox.Name == "txt_EndDHUIDSN")
+                {
+                    textBox.Enabled = false;
+                }
+                textBox.KeyPress += textBox_KeyPress;
+                if (textBox.Name == "tbx_content")
+                {
+                    textBox.Validated += textBox_Validated;
+                }
+                else
+                {
+                    textBox.Validating += textBox_Validating;
+                }
+            }
+            else if (control is Label label)
+            {
+                label.ForeColor = ColorTranslator.FromHtml("#442A9D");
+                if (label.Name == "lbl_Title")
+                {
+                    label.MouseDown += LabelMouseDown;
+                    label.MouseMove += LabelMouseMove;
+                }
+            }
+            else if (control is Button button)
+            {
+                if (button.Name == "btn_Minimize" || button.Name == "btn_Close" || button.Name == "btn_OpenDlg")
+                {
+                    button.BackColor = Color.Transparent;
+                    button.BackgroundImageLayout = ImageLayout.Zoom;
+                    button.FlatStyle = FlatStyle.Flat;
+                    button.FlatAppearance.BorderSize = 0;
+                    button.FlatAppearance.MouseOverBackColor = Color.FromArgb(9, 229, 255);
+                    button.FlatAppearance.MouseDownBackColor = Color.FromArgb(64, 177, 255);
+                }
+                else
+                {
+                    button.BackColor = ColorTranslator.FromHtml("#442A9D");
+                    button.ForeColor = Color.White;
+                    button.FlatStyle = FlatStyle.Flat;
+                    button.FlatAppearance.BorderColor = Color.FromArgb(0, 0, 0, 0);
+                    button.FlatAppearance.BorderSize = 0;
+                    button.FlatAppearance.MouseDownBackColor = Color.FromArgb(58, 102, 127);
+                }
+                button.Cursor = Cursors.Hand;
+            }
+            else if (control is DataGridView dataGridStyle)
+            {
+                SetDataGridStyle(dataGridStyle);
+            }
+            else if (control is ComboBox comboBox)
+            {
+                if (comboBox.Name == "cbox_Model")
+                {
+                    ComboBox.ObjectCollection items = comboBox.Items;
+                    object[] items2 = settings1.Models.Split(',');
+                    items.AddRange(items2);
+                    comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
+                }
+                else
+                {
+                    ComboBox.ObjectCollection items3 = comboBox.Items;
+                    object[] items2 = settings1.Field.Split(',');
+                    items3.AddRange(items2);
+                    comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
+                }
+                comboBox.Validating += ComboBox_Validating;
+            }
+            if (control.HasChildren)
+            {
+                SetControls(control.Controls);
+            }
+        }
+    }
+
+    private void tabControl1_DrawItem(object sender, DrawItemEventArgs e)
+    {
+        Font font;
+        Brush brush;
+        Brush brush2;
+        if (e.Index == tabControl1.SelectedIndex)
+        {
+            font = new Font(e.Font, FontStyle.Bold);
+            brush = new LinearGradientBrush(e.Bounds, Color.FromArgb(71, 236, 255), Color.FromArgb(0, 150, 255), LinearGradientMode.Vertical);
+            brush2 = new SolidBrush(Color.FromArgb(255, 255, 255));
+        }
+        else
+        {
+            font = e.Font;
+            brush = new SolidBrush(SystemColors.Control);
+            brush2 = new SolidBrush(Color.DimGray);
+        }
+        string s = tabControl1.TabPages[e.Index].Text;
+        StringFormat stringFormat = new StringFormat();
+        stringFormat.LineAlignment = StringAlignment.Center;
+        stringFormat.Alignment = StringAlignment.Center;
+        e.Graphics.FillRectangle(brush, e.Bounds);
+        Rectangle bounds = e.Bounds;
+        bounds = new Rectangle(bounds.X, bounds.Y + 4, bounds.Width, bounds.Height - 4);
+        e.Graphics.DrawString(s, font, brush2, bounds, stringFormat);
+    }
+
+    private void GDIPaint(object sender, PaintEventArgs e)
+    {
+        Label label = sender as Label;
+        Graphics graphics = e.Graphics;
+        Color color = Color.FromArgb(71, 236, 255);
+        Color color2 = Color.FromArgb(64, 177, 255);
+        Color color3 = Color.FromArgb(9, 229, 255);
+        Color color4 = Color.FromArgb(0, 150, 255);
+        Brush brush = new LinearGradientBrush(label.ClientRectangle, color, color2, LinearGradientMode.Vertical);
+        graphics.FillRectangle(brush, label.ClientRectangle);
+    }
+
+    private void LabelMouseDown(object sender, MouseEventArgs e)
+    {
+        Point = e.Location;
+    }
+
+    private void LabelMouseMove(object sender, MouseEventArgs e)
+    {
+        if (e.Button == MouseButtons.Left)
+        {
+            base.Location = new Point(base.Location.X + e.X - Point.X, base.Location.Y + e.Y - Point.Y);
+        }
+    }
+
+    private void textBox_Validated(object sender, EventArgs e)
+    {
+        TextBox textBox = sender as TextBox;
+        ValidatingText(textBox, "姝ら」涓哄繀濉」");
+    }
+
+    private void textBox_Validating(object sender, CancelEventArgs e)
+    {
+        TextBox textBox = sender as TextBox;
+        ValidatingText(textBox, "姝ら」涓哄繀濉」");
+    }
+
+    private void ComboBox_Validated(object sender, EventArgs e)
+    {
+        ComboBox comboBox = sender as ComboBox;
+        ValidatingText(comboBox, "璇烽�夋嫨鏌ヨ瀛楁");
+    }
+
+    private void ComboBox_Validating(object sender, CancelEventArgs e)
+    {
+        ComboBox comboBox = sender as ComboBox;
+        ValidatingText(comboBox, "璇烽�夋嫨鏌ヨ瀛楁");
+    }
+
+    private void textBox_KeyPress(object sender, KeyPressEventArgs e)
+    {
+        TextBox textBox = sender as TextBox;
+        if (textBox.Name == "txt_StartSN" || textBox.Name == "txt_EndSN" || textBox.Name == "txt_StartDaySN" || textBox.Name == "txt_EndDaySN" || textBox.Name == "txt_MinSpecialSN" || textBox.Name == "txt_MaxSpecialSN" || textBox.Name == "txt_StartDHUIDSN" || textBox.Name == "txt_EndDHUIDSN")
+        {
+            if (char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || char.IsControl(e.KeyChar))
+            {
+                e.Handled = false;
+            }
+            else
+            {
+                e.Handled = true;
+            }
+        }
+        else if (char.IsLetterOrDigit(e.KeyChar) || char.IsPunctuation(e.KeyChar) || e.KeyChar == '\b' || char.IsControl(e.KeyChar))
+        {
+            e.Handled = false;
+        }
+        else
+        {
+            e.Handled = true;
+        }
+        e.KeyChar = char.ToUpper(e.KeyChar);
+    }
+
+    private bool ValidatingText(TextBox textBox, string errorMsg)
+    {
+        if (textBox.Text.Length == 0)
+        {
+            errorProvider1.SetError(textBox, errorMsg);
+            return false;
+        }
+        errorProvider1.SetError(textBox, string.Empty);
+        return true;
+    }
+
+    private bool ValidatingText(ComboBox comboBox, string errorMsg)
+    {
+        if (comboBox.Text.Length == 0)
+        {
+            errorProvider1.SetError(comboBox, errorMsg);
+            return false;
+        }
+        errorProvider1.SetError(comboBox, string.Empty);
+        return true;
+    }
+
+    private void SetDataGridColumn(DataGridView dataGrid)
+    {
+        string[] array = new string[23]
+        {
+            "GUID", "Orderid", "Model", "MESSN", "XDSN", "DHUID", "ProductSN", "HW", "SW", "GeelyDU",
+            "GeelyHWSD", "SXBL", "SXDI_SXBL", "ECUDAPN", "ECUCAPN", "HSMKey", "JtagKey", "TEEKey", "Status", "CreateTime",
+            "ModifyTime", "IsPrint", "PrintTime"
+        };
+        for (int i = 0; i < array.Length; i++)
+        {
+            table.Columns.Add(array[i]);
+        }
+        dataGrid.DataSource = table.DefaultView;
+    }
+
+    private void SetDataGridStyle(DataGridView dataGrid)
+    {
+        dataGrid.BackgroundColor = Color.White;
+        dataGrid.AllowUserToAddRows = false;
+        dataGrid.AllowUserToDeleteRows = false;
+        dataGrid.AllowUserToOrderColumns = false;
+        dataGrid.AllowUserToResizeColumns = true;
+        dataGrid.AllowUserToResizeRows = false;
+        dataGrid.ReadOnly = true;
+        dataGrid.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+        dataGrid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+        dataGrid.RowHeadersWidth = 35;
+        dataGrid.ColumnHeadersHeight = 30;
+        dataGrid.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
+        foreach (DataGridViewColumn column in dataGrid.Columns)
+        {
+            column.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
+            column.SortMode = DataGridViewColumnSortMode.Programmatic;
+        }
+        dataGrid.RowPostPaint += dataGridView_RowPostPaint;
+        dataGrid.RowHeadersDefaultCellStyle.Padding = new Padding(dataGridView1.RowHeadersWidth);
+    }
+
+    private void dataGridView_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
+    {
+        DataGridView dataGridView = sender as DataGridView;
+        Rectangle bounds = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, dataGridView1.RowHeadersWidth - 1, e.RowBounds.Height);
+        TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), dataGridView.RowHeadersDefaultCellStyle.Font, bounds, dataGridView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter);
+        List<int> list = new List<int> { e.RowIndex + 1 };
+    }
+
+    private void btn_CreateSN_Click(object sender, EventArgs e)
+    {
+        SaveSettings(cbox_Model.Text, iniFile);
+        CreateSN();
+    }
+
+    private void CreateSN()
+    {
+        if (table.Rows.Count > 0)
+        {
+            table.Clear();
+        }
+        try
+        {
+            int num = Convert.ToInt32(txt_StartSN.Text);
+            int num2 = Convert.ToInt32(txt_EndSN.Text);
+            int num3 = Convert.ToInt32(txt_StartDaySN.Text);
+            int num4 = Convert.ToInt32(txt_MinSpecialSN.Text);
+            int num5 = Convert.ToInt32(txt_StartDHUIDSN.Text);
+            int num6 = Convert.ToInt32(txt_Date1.Text.Substring(0, 4)) % 2001;
+            int num7 = Convert.ToInt32(txt_Date1.Text.Substring(4, 2)) - 1;
+            int num8 = Convert.ToInt32(txt_Date1.Text.Substring(6, 2)) - 1;
+            if (Convert.ToInt32(txt_Date1.Text.Substring(0, 4)) < 2020)
+            {
+                MessageBox.Show("鐢熶骇鏃ユ湡涓殑骞翠唤鏃╀簬褰撳墠骞翠唤锛�", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+                return;
+            }
+            int num9 = Convert.ToInt32(txt_Date1.Text.Substring(0, 4)) % 2020;
+            GregorianCalendar gregorianCalendar = new GregorianCalendar();
+            DateTime time = DateTime.ParseExact(txt_Date1.Text, "yyyyMMdd", CultureInfo.CurrentCulture);
+            int weekOfYear = gregorianCalendar.GetWeekOfYear(time, CalendarWeekRule.FirstFullWeek, DayOfWeek.Monday);
+            int num10 = 0;
+            switch (time.DayOfWeek.ToString())
+            {
+                case "Monday":
+                    num10 = 1;
+                    break;
+                case "Tuesday":
+                    num10 = 2;
+                    break;
+                case "Wednesday":
+                    num10 = 3;
+                    break;
+                case "Thursday":
+                    num10 = 4;
+                    break;
+                case "Friday":
+                    num10 = 5;
+                    break;
+                case "Saturday":
+                    num10 = 6;
+                    break;
+                case "Sunday":
+                    num10 = 7;
+                    break;
+            }
+            if (txt_StartSN.Text != null && txt_EndSN.Text != null && num <= num2 && txt_EndSN.TextLength < 5)
+            {
+                int num11 = num;
+                int num12 = num3;
+                int num13 = num4;
+                int num14 = num5;
+                while (num11 <= num2)
+                {
+                    DataRow dataRow = table.NewRow();
+                    if (num12.ToString().Length < 5 && num13.ToString().Length < 8 && num14.ToString().Length < 5)
+                    {
+                        string text = txt_PCODE.Text.Trim() + years[num6] + num13.ToString().PadLeft(7, '0');
+                        string text2 = HashPlus.GetHashMD5(text).ToUpper();
+                        text2 = text2.Substring(0, 8) + "-" + text2.Substring(8, 4) + "-" + text2.Substring(12, 4) + "-" + text2.Substring(16, 4) + "-" + text2.Substring(20, 12);
+                        string text3 = txt_SNPrefix.Text + num11.ToString().PadLeft(4, '0');
+                        string text4 = txt_PCODE.Text + txt_MachineCode.Text + txt_FactoryCode.Text + txt_LineNo1.Text + years[num6] + months[num7] + days[num8] + num12.ToString().PadLeft(4, '0') + num13.ToString().PadLeft(7, '0');
+                        string text5 = txt_VendorCode.Text + txt_PN.Text + years[num6] + months[num7] + days[num8] + txt_ShiftsNo.Text + num14.ToString().PadLeft(4, '0');
+                        string empty = string.Empty;
+                        empty = F18CY[num9] + weekOfYear.ToString().PadLeft(2, '0') + num10 + num12.ToString().PadLeft(4, '0');
+                        if (text3.Length != 14 && text4.Length != 24 && text5.Length != 24)
+                        {
+                            MessageBox.Show("MESSN / XDSN / DHUID闀垮害鏈夎锛岃妫�鏌ヨ緭鍏ョ殑鏁版嵁鏄惁鏈夎锛�", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+                            return;
+                        }
+                        dataRow["GUID"] = text2;
+                        dataRow["Orderid"] = tbx_OrderID.Text.Trim();
+                        dataRow["Model"] = cbox_Model.Text.Trim();
+                        dataRow["MESSN"] = text3.Trim();
+                        dataRow["XDSN"] = text4.Trim();
+                        dataRow["DHUID"] = text5.Trim();
+                        dataRow["ProductSN"] = empty.Trim();
+                        dataRow["HW"] = txt_HW.Text.PadRight(16, '0').Trim();
+                        dataRow["SW"] = txt_SW.Text.Trim();
+                        dataRow["SXBL"] = txt_SXBL.Text.Trim();
+                        dataRow["SXDI_SXBL"] = txt_SXDISXBL.Text.Trim();
+                        dataRow["GeelyDU"] = txt_GeelyDU.Text.Trim();
+                        dataRow["GeelyHWSD"] = txt_GeelyHWSD.Text.Trim();
+                        dataRow["ECUDAPN"] = txt_VolvoDU.Text.Trim();
+                        dataRow["ECUCAPN"] = txt_VolvoHWSD.Text.Trim();
+                        dataRow["Status"] = 0;
+                        dataRow["CreateTime"] = Convert.ToDateTime(DateTime.Now.ToString("G"));
+                        table.Rows.Add(dataRow);
+                        num11++;
+                        num12++;
+                        num13++;
+                        num14++;
+                        continue;
+                    }
+                    MessageBox.Show("鏃ユ祦姘村彿鎴栬繛缁彿浣嶆暟瓒呭嚭鑼冨洿", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+                    break;
+                }
+                dataGridView1.DataSource = table.DefaultView;
+                dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
+                toolStripStatusLabel8.Text = $"{table.Rows.Count}琛�";
+            }
+            else
+            {
+                MessageBox.Show("璇锋鏌ユ墍鏈夋枃鏈鏄惁鏈夊~鍐欙紝骞剁‘璁N鐨勬祦姘村彿鍙婁綅鏁版槸鍚︽湁璇�", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox.Show(ex.Message, "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        }
+    }
+
+    private void btn_ImportData_Click(object sender, EventArgs e)
+    {
+        ImportData();
+    }
+
+    private void ImportData()
+    {
+        //if (MessageBox.Show("纭鏄惁瀵煎叆鏁版嵁搴�?", "娑堟伅鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
+        //{
+        //    return;
+        //}
+        //if (table.Rows.Count != 0)
+        //{
+        //    PwdForm pwdForm = new PwdForm();
+        //    if (pwdForm.ShowDialog() != DialogResult.OK)
+        //    {
+        //        return;
+        //    }
+        //    using (SqlConnection sqlConnection = new SqlConnection(settings1.DBConn))
+        //    {
+        //        try
+        //        {
+        //            sqlConnection.Open();
+        //            SqlBulkCopy sqlBulkCopy = new SqlBulkCopy(sqlConnection);
+        //            sqlBulkCopy.DestinationTableName = "SNDTL";
+        //            sqlBulkCopy.WriteToServer(table);
+        //            sqlBulkCopy.Close();
+        //            MessageBox.Show("鏁版嵁瀵煎叆鎴愬姛锛�", "娑堟伅鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+        //            return;
+        //        }
+        //        catch (SqlException ex)
+        //        {
+        //            throw new Exception(ex.Message);
+        //        }
+        //        finally
+        //        {
+        //            sqlConnection.Close();
+        //        }
+        //    }
+        //}
+        MessageBox.Show("鏁版嵁涓虹┖锛屽鍏ュけ璐ワ紝璇风敓鎴愬簭鍒楀彿鍚庡啀瀵煎叆锛�", "娑堟伅鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+    }
+
+    private void btn_ClearText_Click(object sender, EventArgs e)
+    {
+        ClearText(base.Controls);
+    }
+
+    private void ClearText(Control.ControlCollection controls)
+    {
+        foreach (Control control in controls)
+        {
+            if (control is TextBox textBox)
+            {
+                textBox.ResetText();
+            }
+            if (control.HasChildren)
+            {
+                ClearText(control.Controls);
+            }
+        }
+    }
+
+    private void btn_Mininimze_Click(object sender, EventArgs e)
+    {
+        base.WindowState = FormWindowState.Minimized;
+    }
+
+    private void btn_Close_Click(object sender, EventArgs e)
+    {
+        Close();
+    }
+
+    private void MainForm_Paint(object sender, PaintEventArgs e)
+    {
+        Graphics graphics = e.Graphics;
+        Color color = Color.FromArgb(71, 236, 255);
+        Color color2 = Color.FromArgb(64, 177, 255);
+        Color color3 = Color.FromArgb(9, 229, 255);
+        Color color4 = Color.FromArgb(0, 150, 255);
+        Brush brush = new LinearGradientBrush(base.ClientRectangle, color, color2, LinearGradientMode.Vertical);
+        graphics.FillRectangle(brush, base.ClientRectangle);
+    }
+
+    private void Timer(System.Timers.Timer t, Action<object, ElapsedEventArgs> action)
+    {
+        t.Elapsed += action.Invoke;
+        t.AutoReset = true;
+        t.Enabled = true;
+    }
+
+    private void Realtime(object sender, EventArgs e)
+    {
+        timer.Interval = 1000.0;
+        toolStripStatusLabel6.Text = "绯荤粺鏃堕棿锛�" + DateTime.Now.ToString("G");
+        timer.Enabled = true;
+    }
+
+    private void cbx_Field_SelectedIndexChanged(object sender, EventArgs e)
+    {
+        if (cbox_Field.Text.Equals("鏈�澶ц繛缁彿"))
+        {
+            tbx_content.Visible = false;
+            btn_Query_Click(sender, e);
+        }
+        else
+        {
+            tbx_content.Visible = true;
+        }
+    }
+
+    private void btn_Query_Click(object sender, EventArgs e)
+    {
+        if (cbox_Field.Text.Equals("鏈�澶ц繛缁彿"))
+        {
+            using (SqlConnection sqlConnection = new SqlConnection(settings1.DBConn))
+            {
+                string empty = string.Empty;
+                string text = cbox_Field.Text;
+                string text2 = text;
+                if (text2 == "鏈�澶ц繛缁彿")
+                {
+                    empty = "Subtring(XDSN,0,7)Substring(XDSN,11,1)Right(XDSN,7)";
+                }
+                string text3 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE 'SHU1011%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE1";
+                string text4 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE 'SHU104S%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE2";
+                string text5 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE 'SHU206S%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE3";
+                string text6 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE '02647G1%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE4";
+                string text7 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE '02647G2%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE5";
+                string text8 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE '02648G3%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE6";
+                string text9 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE '02648G1%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE7";
+                string text10 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE '02648G2%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE8";
+                string text11 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE '02601P3%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLE9";
+                string text12 = "select * FROM (select TOP(1) * FROM DBO.SNDTL WHERE XDSN LIKE 'DHU057L%' ORDER BY SUBSTRING(XDSN,0,7)+SUBSTRING(XDSN,11,1)+RIGHT(XDSN,7) DESC) AS TABLEA";
+                string cmdText = text3 + "\r\nUNION\r\n" + text4 + "\r\nUNION\r\n" + text5 + "\r\nUNION\r\n" + text6 + "\r\nUNION\r\n" + text7 + "\r\nUNION\r\n" + text8 + "\r\nUNION\r\n" + text9 + "\r\nUNION\r\n" + text10 + "\r\nUNION\r\n" + text11 + "\r\nUNION\r\n" + text12;
+                using (SqlCommand selectCommand = new SqlCommand(cmdText, sqlConnection))
+                {
+                    sqlConnection.Open();
+                    SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(selectCommand);
+                    DataSet dataSet = new DataSet();
+                    sqlDataAdapter.Fill(dataSet);
+                    dataGridView2.DataSource = dataSet.Tables[0];
+                    dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
+                    toolStripStatusLabel8.Text = $"{dataSet.Tables[0].Rows.Count}琛�";
+                    sqlDataAdapter.Dispose();
+                    dataSet.Dispose();
+                    sqlConnection.Close();
+                    return;
+                }
+            }
+        }
+        if (!ValidatingText(cbox_Field, "璇烽�夋嫨鏌ヨ瀛楁") || !ValidatingText(tbx_content, "璇疯緭鍏ユ煡璇㈠唴瀹�"))
+        {
+            return;
+        }
+        using (SqlConnection sqlConnection2 = new SqlConnection(settings1.DBConn))
+        {
+            string text13 = string.Empty;
+            switch (cbox_Field.Text)
+            {
+                case "宸ュ崟鍙�":
+                    text13 = "orderid";
+                    break;
+                case "鏈哄瀷":
+                    text13 = "Model";
+                    break;
+                case "杩囩珯鐮�":
+                    text13 = "MESSN";
+                    break;
+                case "XDSN":
+                    text13 = "XDSN";
+                    break;
+                case "DHUID":
+                    text13 = "DHUID";
+                    break;
+                case "GeelyDU":
+                    text13 = "DU";
+                    break;
+                case "纭欢鐗堟湰":
+                    text13 = "HW";
+                    break;
+                case "杞欢鐗堟湰":
+                    text13 = "SW";
+                    break;
+                case "JtagKey":
+                    text13 = "JtagKey";
+                    break;
+            }
+            string cmdText2 = "select * from [dbo].[SNDTL] where " + text13 + " like @value";
+            using (SqlCommand sqlCommand = new SqlCommand(cmdText2, sqlConnection2))
+            {
+                sqlCommand.Parameters.AddWithValue("@value", "%" + tbx_content.Text + "%");
+                sqlConnection2.Open();
+                SqlDataAdapter sqlDataAdapter2 = new SqlDataAdapter(sqlCommand);
+                DataSet dataSet2 = new DataSet();
+                sqlDataAdapter2.Fill(dataSet2);
+                dataGridView2.DataSource = dataSet2.Tables[0];
+                dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
+                toolStripStatusLabel8.Text = $"{dataSet2.Tables[0].Rows.Count}琛�";
+                sqlDataAdapter2.Dispose();
+                dataSet2.Dispose();
+                sqlConnection2.Close();
+            }
+        }
+    }
+
+    private void tbx_content_KeyPress(object sender, KeyPressEventArgs e)
+    {
+        if (e.KeyChar == '\r')
+        {
+            btn_Query_Click(sender, e);
+        }
+    }
+
+    private void btn_Modify_Click(object sender, EventArgs e)
+    {
+        MessageBox.Show("姝ゅ姛鑳芥殏鏈紑鏀撅紒", "Tips:", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+    }
+
+    private void btn_Delete_Click(object sender, EventArgs e)
+    {
+        MessageBox.Show("姝ゅ姛鑳芥殏鏈紑鏀撅紒", "Tips:", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+    }
+
+    private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
+    {
+        ShowDataGridRows(base.Controls);
+    }
+
+    private void ShowDataGridRows(Control.ControlCollection controls)
+    {
+        foreach (Control control in controls)
+        {
+            if (control is DataGridView dataGridView)
+            {
+                toolStripStatusLabel8.Text = $"{dataGridView.Rows}琛�";
+            }
+            if (control.HasChildren)
+            {
+                ShowDataGridRows(control.Controls);
+            }
+        }
+    }
+
+    private void cbx_Model_SelectedIndexChanged(object sender, EventArgs e)
+    {
+        if (!string.IsNullOrEmpty(fileNameWithoutExt))
+        {
+            string file = Path.Combine(Environment.CurrentDirectory, "Config", fileNameWithoutExt + ".ini");
+            settings2 = new UserSettings(cbox_Model.Text, file);
+        }
+        else
+        {
+            settings2 = new UserSettings(cbox_Model.Text, iniFile);
+        }
+        GetVal();
+        Commonparams(cbox_Model.Text);
+    }
+
+    private void Commonparams(string model)
+    {
+        switch (model)
+        {
+            case "E371-H-CN":
+                txt_SNPrefix.Text = $"002101G1{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU1011";
+                break;
+            case "E371-L-CN":
+                txt_SNPrefix.Text = $"002101G2{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU1011";
+                break;
+            case "HY11-H-CN":
+                txt_SNPrefix.Text = $"002104S1{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU104S";
+                break;
+            case "HY11-L-CN":
+                txt_SNPrefix.Text = $"002104S2{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU104S";
+                break;
+            case "HS11-H-CN":
+                txt_SNPrefix.Text = $"002104S3{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU104S";
+                break;
+            case "HS11-L-CN":
+                txt_SNPrefix.Text = $"002104S4{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU104S";
+                break;
+            case "HY11-H-EU":
+                txt_SNPrefix.Text = $"002206S1{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU206S";
+                break;
+            case "HY11-L-EU":
+                txt_SNPrefix.Text = $"002206S2{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU206S";
+                break;
+            case "HS11-H-EU":
+                txt_SNPrefix.Text = $"002206S3{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU206S";
+                break;
+            case "HS11-L-EU":
+                txt_SNPrefix.Text = $"002206S4{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "SHU206S";
+                break;
+            case "E245-H-CN":
+                txt_SNPrefix.Text = $"002647G1{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "02647G1";
+                break;
+            case "E245-L-CN":
+                txt_SNPrefix.Text = $"002647G2{DateTime.Now:yyMMdd}";
+                txt_PCODE.Text = "02647G2";
+                break;
+        }
+        if (model.Contains("E245"))
+        {
+            txt_MachineCode.Text = "0";
+            txt_FactoryCode.Text = "D";
+            txt_LineNo1.Text = "9";
+            txt_VendorCode.Text = "999722";
+            txt_ShiftsNo.Text = "0";
+        }
+        else
+        {
+            txt_MachineCode.Text = "0";
+            txt_FactoryCode.Text = "D";
+            txt_LineNo1.Text = "1";
+            txt_VendorCode.Text = "999722";
+            txt_ShiftsNo.Text = "A";
+        }
+    }
+
+    private void txt_StartSN_TextChanged(object sender, EventArgs e)
+    {
+        TextBox textBox = txt_StartDHUIDSN;
+        string text2 = (txt_StartDaySN.Text = txt_StartSN.Text);
+        textBox.Text = text2;
+    }
+
+    private void txt_StartDaySN_TextChanged(object sender, EventArgs e)
+    {
+        txt_StartDHUIDSN.Text = txt_StartDaySN.Text;
+    }
+
+    private void txt_Date1_TextChanged(object sender, EventArgs e)
+    {
+        txt_Date2.Text = txt_Date1.Text;
+    }
+
+    private void txt_GeelyDU_TextChanged(object sender, EventArgs e)
+    {
+        txt_PN.Text = txt_GeelyDU.Text.Split('/')[0];
+    }
+
+    private void GetVal()
+    {
+        tbx_OrderID.Text = settings2.OrderId;
+        cbox_Model.SelectedItem = settings2.Model;
+        txt_SNPrefix.Text = settings2.SNPrefix;
+        txt_StartSN.Text = settings2.MESSstartSN;
+        txt_EndSN.Text = settings2.MESEndSN;
+        txt_Date1.Text = settings2.XDSNDate;
+        txt_StartDaySN.Text = settings2.XDSNDaySN;
+        txt_MinSpecialSN.Text = settings2.XDSNSpecialSN;
+        txt_PN.Text = settings2.PartNo;
+        txt_HW.Text = settings2.HW;
+        txt_SW.Text = settings2.SW;
+        txt_GeelyDU.Text = settings2.GeelyDU;
+        txt_GeelyHWSD.Text = settings2.GeelyHWSD;
+        txt_SXBL.Text = settings2.SXBL;
+        txt_SXDISXBL.Text = settings2.SXDISXBL;
+        txt_VolvoDU.Text = settings2.VolvoDU;
+        txt_VolvoHWSD.Text = settings2.VolvoHWSD;
+    }
+
+    private void SaveSettings(string file)
+    {
+        if (!File.Exists(file))
+        {
+            MessageBox.Show("閰嶇疆鏂囦欢涓嶅瓨鍦紝淇濆瓨澶辫触", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+            return;
+        }
+        WritePrivateProfileString("Settings", "OrderId", tbx_OrderID.Text, file);
+        WritePrivateProfileString("Settings", "PartNo", txt_PN.Text, file);
+        WritePrivateProfileString("Settings", "HW", txt_HW.Text, file);
+        WritePrivateProfileString("Settings", "SW", txt_SW.Text, file);
+        WritePrivateProfileString("Settings", "GeelyDU", txt_GeelyDU.Text, file);
+        WritePrivateProfileString("Settings", "GeelyHWSD", txt_GeelyHWSD.Text, file);
+        WritePrivateProfileString("Settings", "SXBL", txt_SXBL.Text, file);
+        WritePrivateProfileString("Settings", "SXDISXBL", txt_SXDISXBL.Text, file);
+        WritePrivateProfileString("Settings", "VolvoDU", txt_VolvoDU.Text, file);
+        WritePrivateProfileString("Settings", "VolvoHWSD", txt_VolvoHWSD.Text, file);
+    }
+
+    private void SaveSettings(string section, string file)
+    {
+        if (!File.Exists(file))
+        {
+            MessageBox.Show("閰嶇疆鏂囦欢涓嶅瓨鍦紝淇濆瓨澶辫触", "閿欒鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+            return;
+        }
+        WritePrivateProfileString(section, "OrderId", tbx_OrderID.Text, file);
+        WritePrivateProfileString(section, "SNPrefix", txt_SNPrefix.Text, file);
+        WritePrivateProfileString(section, "MESStartSN", txt_StartSN.Text, file);
+        WritePrivateProfileString(section, "MESEndSN", txt_EndSN.Text, file);
+        WritePrivateProfileString(section, "XDSNDate", txt_Date1.Text, file);
+        WritePrivateProfileString(section, "XDSNDaySN", txt_StartDaySN.Text, file);
+        WritePrivateProfileString(section, "XDSNSpecialSN", txt_MinSpecialSN.Text, file);
+        WritePrivateProfileString(section, "PartNo", txt_PN.Text, file);
+        WritePrivateProfileString(section, "HW", txt_HW.Text, file);
+        WritePrivateProfileString(section, "SW", txt_SW.Text, file);
+        WritePrivateProfileString(section, "GeelyDU", txt_GeelyDU.Text, file);
+        WritePrivateProfileString(section, "GeelyHWSD", txt_GeelyHWSD.Text, file);
+        WritePrivateProfileString(section, "SXBL", txt_SXBL.Text, file);
+        WritePrivateProfileString(section, "SXDISXBL", txt_SXDISXBL.Text, file);
+        WritePrivateProfileString(section, "VolvoDU", txt_VolvoDU.Text, file);
+        WritePrivateProfileString(section, "VolvoHWSD", txt_VolvoHWSD.Text, file);
+    }
+
+    private void btn_OpenDlg_Click(object sender, EventArgs e)
+    {
+        cbox_Model.SelectedIndexChanged -= cbx_Model_SelectedIndexChanged;
+        OpenFileDialog openFileDialog = new OpenFileDialog();
+        openFileDialog.InitialDirectory = Path.Combine(Application.StartupPath, "Config");
+        openFileDialog.Filter = "INI鏂囦欢(*.ini)|*.ini|鎵�鏈夋枃浠�(*.*)|*.*";
+        openFileDialog.Multiselect = false;
+        if (openFileDialog.ShowDialog() == DialogResult.OK)
+        {
+            fileNameWithoutExt = Path.GetFileNameWithoutExtension(openFileDialog.FileName);
+            tbx_OrderID.Text = fileNameWithoutExt;
+            string file = Path.Combine(Environment.CurrentDirectory, "Config", fileNameWithoutExt + ".ini");
+            settings2 = new UserSettings("Config", file);
+            GetVal();
+            Commonparams(cbox_Model.Text);
+        }
+        else
+        {
+            openFileDialog.Dispose();
+        }
+        cbox_Model.SelectedIndexChanged += cbx_Model_SelectedIndexChanged;
+        fileNameWithoutExt = string.Empty;
+    }
+
+    private void btn_Export_Click(object sender, EventArgs e)
+    {
+        if (dataGridView2.DataSource != null)
+        {
+            SaveFileDialog saveFileDialog = new SaveFileDialog();
+            saveFileDialog.Filter = "Excel 97-2003宸ヤ綔绨縷*.xls";
+            DialogResult dialogResult = saveFileDialog.ShowDialog();
+            if (dialogResult == DialogResult.OK)
+            {
+                progressBar.Value = 0;
+                progressBar.Minimum = 0;
+                progressBar.Maximum = ((DataTable)dataGridView2.DataSource).Rows.Count;
+                string fileName = saveFileDialog.FileName;
+                //if (nPOIHelper.ExportExcel((DataTable)dataGridView2.DataSource, "瀵煎嚭鏁版嵁", fileName, progressBar))
+                //{
+                //    MessageBox.Show("鏁版嵁瀵煎嚭瀹屾垚!", "鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+                //    return;
+                //}
+                MessageBox.Show("鏁版嵁瀵煎嚭澶辫触!", "鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+                progressBar.Value = 0;
+            }
+        }
+        else
+        {
+            MessageBox.Show("鏈彂鐜版暟鎹紝瀵煎嚭澶辫触!", "閿欒", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        }
+    }
+
+    protected override void Dispose(bool disposing)
+    {
+        if (disposing && components != null)
+        {
+            components.Dispose();
+        }
+        base.Dispose(disposing);
+    }
+
+    private void InitializeComponent()
+    {
+        this.components = new System.ComponentModel.Container();
+        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
+        this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel();
+        this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel();
+        this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel();
+        this.LeftToolStripPanel = new System.Windows.Forms.ToolStripPanel();
+        this.ContentPanel = new System.Windows.Forms.ToolStripContentPanel();
+        this.tabControl1 = new System.Windows.Forms.TabControl();
+        this.tabPage1 = new System.Windows.Forms.TabPage();
+        this.dataGridView1 = new System.Windows.Forms.DataGridView();
+        this.panel1 = new System.Windows.Forms.Panel();
+        this.groupBox4 = new System.Windows.Forms.GroupBox();
+        this.txt_SXBL = new System.Windows.Forms.TextBox();
+        this.label29 = new System.Windows.Forms.Label();
+        this.txt_SXDISXBL = new System.Windows.Forms.TextBox();
+        this.label30 = new System.Windows.Forms.Label();
+        this.btn_ClearText = new System.Windows.Forms.Button();
+        this.txt_GeelyHWSD = new System.Windows.Forms.TextBox();
+        this.label21 = new System.Windows.Forms.Label();
+        this.btn_ImportData = new System.Windows.Forms.Button();
+        this.txt_SW = new System.Windows.Forms.TextBox();
+        this.label25 = new System.Windows.Forms.Label();
+        this.btn_CreateSN = new System.Windows.Forms.Button();
+        this.txt_VolvoDU = new System.Windows.Forms.TextBox();
+        this.txt_VolvoHWSD = new System.Windows.Forms.TextBox();
+        this.label23 = new System.Windows.Forms.Label();
+        this.label24 = new System.Windows.Forms.Label();
+        this.txt_GeelyDU = new System.Windows.Forms.TextBox();
+        this.label22 = new System.Windows.Forms.Label();
+        this.txt_HW = new System.Windows.Forms.TextBox();
+        this.label20 = new System.Windows.Forms.Label();
+        this.groupBox3 = new System.Windows.Forms.GroupBox();
+        this.txt_EndDHUIDSN = new System.Windows.Forms.TextBox();
+        this.label19 = new System.Windows.Forms.Label();
+        this.txt_StartDHUIDSN = new System.Windows.Forms.TextBox();
+        this.label11 = new System.Windows.Forms.Label();
+        this.txt_ShiftsNo = new System.Windows.Forms.TextBox();
+        this.label12 = new System.Windows.Forms.Label();
+        this.txt_Date2 = new System.Windows.Forms.TextBox();
+        this.label13 = new System.Windows.Forms.Label();
+        this.txt_PN = new System.Windows.Forms.TextBox();
+        this.label14 = new System.Windows.Forms.Label();
+        this.txt_VendorCode = new System.Windows.Forms.TextBox();
+        this.label15 = new System.Windows.Forms.Label();
+        this.groupBox2 = new System.Windows.Forms.GroupBox();
+        this.txt_MachineCode = new System.Windows.Forms.TextBox();
+        this.label16 = new System.Windows.Forms.Label();
+        this.txt_MaxSpecialSN = new System.Windows.Forms.TextBox();
+        this.label18 = new System.Windows.Forms.Label();
+        this.label17 = new System.Windows.Forms.Label();
+        this.txt_EndDaySN = new System.Windows.Forms.TextBox();
+        this.txt_MinSpecialSN = new System.Windows.Forms.TextBox();
+        this.label10 = new System.Windows.Forms.Label();
+        this.txt_StartDaySN = new System.Windows.Forms.TextBox();
+        this.label9 = new System.Windows.Forms.Label();
+        this.txt_Date1 = new System.Windows.Forms.TextBox();
+        this.label8 = new System.Windows.Forms.Label();
+        this.txt_FactoryCode = new System.Windows.Forms.TextBox();
+        this.label4 = new System.Windows.Forms.Label();
+        this.txt_PCODE = new System.Windows.Forms.TextBox();
+        this.txt_LineNo1 = new System.Windows.Forms.TextBox();
+        this.label5 = new System.Windows.Forms.Label();
+        this.label6 = new System.Windows.Forms.Label();
+        this.groupBox1 = new System.Windows.Forms.GroupBox();
+        this.tbx_OrderID = new System.Windows.Forms.TextBox();
+        this.btn_OpenDlg = new System.Windows.Forms.Button();
+        this.cbox_Model = new System.Windows.Forms.ComboBox();
+        this.label26 = new System.Windows.Forms.Label();
+        this.label3 = new System.Windows.Forms.Label();
+        this.label7 = new System.Windows.Forms.Label();
+        this.txt_EndSN = new System.Windows.Forms.TextBox();
+        this.txt_StartSN = new System.Windows.Forms.TextBox();
+        this.label1 = new System.Windows.Forms.Label();
+        this.txt_SNPrefix = new System.Windows.Forms.TextBox();
+        this.label2 = new System.Windows.Forms.Label();
+        this.tabPage2 = new System.Windows.Forms.TabPage();
+        this.dataGridView2 = new System.Windows.Forms.DataGridView();
+        this.panel2 = new System.Windows.Forms.Panel();
+        this.btn_Export = new System.Windows.Forms.Button();
+        this.tbx_content = new System.Windows.Forms.TextBox();
+        this.cbox_Field = new System.Windows.Forms.ComboBox();
+        this.btn_Delete = new System.Windows.Forms.Button();
+        this.btn_Modify = new System.Windows.Forms.Button();
+        this.btn_Query = new System.Windows.Forms.Button();
+        this.label28 = new System.Windows.Forms.Label();
+        this.label27 = new System.Windows.Forms.Label();
+        this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+        this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel4 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel6 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolStripStatusLabel8 = new System.Windows.Forms.ToolStripStatusLabel();
+        this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+        this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
+        this.lbl_Title = new System.Windows.Forms.Label();
+        this.btn_Close = new System.Windows.Forms.Button();
+        this.btn_Minimize = new System.Windows.Forms.Button();
+        this.tabControl1.SuspendLayout();
+        this.tabPage1.SuspendLayout();
+        ((System.ComponentModel.ISupportInitialize)this.dataGridView1).BeginInit();
+        this.panel1.SuspendLayout();
+        this.groupBox4.SuspendLayout();
+        this.groupBox3.SuspendLayout();
+        this.groupBox2.SuspendLayout();
+        this.groupBox1.SuspendLayout();
+        this.tabPage2.SuspendLayout();
+        ((System.ComponentModel.ISupportInitialize)this.dataGridView2).BeginInit();
+        this.panel2.SuspendLayout();
+        this.statusStrip1.SuspendLayout();
+        ((System.ComponentModel.ISupportInitialize)this.errorProvider1).BeginInit();
+        base.SuspendLayout();
+        this.BottomToolStripPanel.Location = new System.Drawing.Point(0, 0);
+        this.BottomToolStripPanel.Name = "BottomToolStripPanel";
+        this.BottomToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
+        this.BottomToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
+        this.BottomToolStripPanel.Size = new System.Drawing.Size(0, 0);
+        this.TopToolStripPanel.Location = new System.Drawing.Point(0, 0);
+        this.TopToolStripPanel.Name = "TopToolStripPanel";
+        this.TopToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
+        this.TopToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
+        this.TopToolStripPanel.Size = new System.Drawing.Size(0, 0);
+        this.RightToolStripPanel.Location = new System.Drawing.Point(0, 0);
+        this.RightToolStripPanel.Name = "RightToolStripPanel";
+        this.RightToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
+        this.RightToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
+        this.RightToolStripPanel.Size = new System.Drawing.Size(0, 0);
+        this.LeftToolStripPanel.Location = new System.Drawing.Point(0, 0);
+        this.LeftToolStripPanel.Name = "LeftToolStripPanel";
+        this.LeftToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
+        this.LeftToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
+        this.LeftToolStripPanel.Size = new System.Drawing.Size(0, 0);
+        this.ContentPanel.AutoScroll = true;
+        this.ContentPanel.Size = new System.Drawing.Size(1578, 819);
+        this.tabControl1.Controls.Add(this.tabPage1);
+        this.tabControl1.Controls.Add(this.tabPage2);
+        this.tabControl1.Location = new System.Drawing.Point(0, 81);
+        this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tabControl1.Name = "tabControl1";
+        this.tabControl1.SelectedIndex = 0;
+        this.tabControl1.Size = new System.Drawing.Size(1902, 925);
+        this.tabControl1.TabIndex = 1;
+        this.tabControl1.SelectedIndexChanged += new System.EventHandler(tabControl1_SelectedIndexChanged);
+        this.tabPage1.Controls.Add(this.dataGridView1);
+        this.tabPage1.Controls.Add(this.panel1);
+        this.tabPage1.Location = new System.Drawing.Point(4, 25);
+        this.tabPage1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tabPage1.Name = "tabPage1";
+        this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tabPage1.Size = new System.Drawing.Size(1894, 896);
+        this.tabPage1.TabIndex = 0;
+        this.tabPage1.Text = "鍒涘缓鍙风爜鈼�";
+        this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+        this.dataGridView1.Location = new System.Drawing.Point(5, 298);
+        this.dataGridView1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.dataGridView1.Name = "dataGridView1";
+        this.dataGridView1.RowHeadersWidth = 51;
+        this.dataGridView1.RowTemplate.Height = 30;
+        this.dataGridView1.Size = new System.Drawing.Size(1886, 594);
+        this.dataGridView1.TabIndex = 0;
+        this.panel1.Controls.Add(this.groupBox4);
+        this.panel1.Controls.Add(this.groupBox3);
+        this.panel1.Controls.Add(this.groupBox2);
+        this.panel1.Controls.Add(this.groupBox1);
+        this.panel1.Location = new System.Drawing.Point(5, 5);
+        this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.panel1.Name = "panel1";
+        this.panel1.Size = new System.Drawing.Size(1886, 289);
+        this.panel1.TabIndex = 0;
+        this.groupBox4.Controls.Add(this.txt_SXBL);
+        this.groupBox4.Controls.Add(this.label29);
+        this.groupBox4.Controls.Add(this.txt_SXDISXBL);
+        this.groupBox4.Controls.Add(this.label30);
+        this.groupBox4.Controls.Add(this.btn_ClearText);
+        this.groupBox4.Controls.Add(this.txt_GeelyHWSD);
+        this.groupBox4.Controls.Add(this.label21);
+        this.groupBox4.Controls.Add(this.btn_ImportData);
+        this.groupBox4.Controls.Add(this.txt_SW);
+        this.groupBox4.Controls.Add(this.label25);
+        this.groupBox4.Controls.Add(this.btn_CreateSN);
+        this.groupBox4.Controls.Add(this.txt_VolvoDU);
+        this.groupBox4.Controls.Add(this.txt_VolvoHWSD);
+        this.groupBox4.Controls.Add(this.label23);
+        this.groupBox4.Controls.Add(this.label24);
+        this.groupBox4.Controls.Add(this.txt_GeelyDU);
+        this.groupBox4.Controls.Add(this.label22);
+        this.groupBox4.Controls.Add(this.txt_HW);
+        this.groupBox4.Controls.Add(this.label20);
+        this.groupBox4.Location = new System.Drawing.Point(5, 183);
+        this.groupBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox4.Name = "groupBox4";
+        this.groupBox4.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox4.Size = new System.Drawing.Size(1876, 100);
+        this.groupBox4.TabIndex = 21;
+        this.groupBox4.TabStop = false;
+        this.groupBox4.Text = "鐗堟湰淇℃伅";
+        this.txt_SXBL.Location = new System.Drawing.Point(800, 22);
+        this.txt_SXBL.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_SXBL.Name = "txt_SXBL";
+        this.txt_SXBL.Size = new System.Drawing.Size(202, 25);
+        this.txt_SXBL.TabIndex = 29;
+        this.label29.AutoSize = true;
+        this.label29.Location = new System.Drawing.Point(755, 27);
+        this.label29.Name = "label29";
+        this.label29.Size = new System.Drawing.Size(39, 15);
+        this.label29.TabIndex = 31;
+        this.label29.Text = "SXBL";
+        this.txt_SXDISXBL.Location = new System.Drawing.Point(801, 63);
+        this.txt_SXDISXBL.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_SXDISXBL.Name = "txt_SXDISXBL";
+        this.txt_SXDISXBL.Size = new System.Drawing.Size(201, 25);
+        this.txt_SXDISXBL.TabIndex = 28;
+        this.label30.AutoSize = true;
+        this.label30.Location = new System.Drawing.Point(716, 68);
+        this.label30.Name = "label30";
+        this.label30.Size = new System.Drawing.Size(79, 15);
+        this.label30.TabIndex = 30;
+        this.label30.Text = "SXDI_SXBL";
+        this.btn_ClearText.Location = new System.Drawing.Point(1751, 41);
+        this.btn_ClearText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_ClearText.Name = "btn_ClearText";
+        this.btn_ClearText.Size = new System.Drawing.Size(110, 47);
+        this.btn_ClearText.TabIndex = 8;
+        this.btn_ClearText.Text = "娓呯┖鍐呭";
+        this.btn_ClearText.UseVisualStyleBackColor = true;
+        this.btn_ClearText.Click += new System.EventHandler(btn_ClearText_Click);
+        this.txt_GeelyHWSD.Location = new System.Drawing.Point(444, 63);
+        this.txt_GeelyHWSD.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_GeelyHWSD.Name = "txt_GeelyHWSD";
+        this.txt_GeelyHWSD.Size = new System.Drawing.Size(201, 25);
+        this.txt_GeelyHWSD.TabIndex = 2;
+        this.label21.AutoSize = true;
+        this.label21.Location = new System.Drawing.Point(351, 68);
+        this.label21.Name = "label21";
+        this.label21.Size = new System.Drawing.Size(87, 15);
+        this.label21.TabIndex = 19;
+        this.label21.Text = "Geely HWSD";
+        this.btn_ImportData.Location = new System.Drawing.Point(1622, 41);
+        this.btn_ImportData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_ImportData.Name = "btn_ImportData";
+        this.btn_ImportData.Size = new System.Drawing.Size(110, 47);
+        this.btn_ImportData.TabIndex = 7;
+        this.btn_ImportData.Text = "瀵煎叆鏁版嵁搴�";
+        this.btn_ImportData.UseVisualStyleBackColor = true;
+        this.btn_ImportData.Click += new System.EventHandler(btn_ImportData_Click);
+        this.txt_SW.Location = new System.Drawing.Point(89, 63);
+        this.txt_SW.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_SW.Name = "txt_SW";
+        this.txt_SW.Size = new System.Drawing.Size(236, 25);
+        this.txt_SW.TabIndex = 1;
+        this.label25.AutoSize = true;
+        this.label25.Location = new System.Drawing.Point(16, 68);
+        this.label25.Name = "label25";
+        this.label25.Size = new System.Drawing.Size(67, 15);
+        this.label25.TabIndex = 27;
+        this.label25.Text = "杞欢鐗堟湰";
+        this.btn_CreateSN.Location = new System.Drawing.Point(1490, 41);
+        this.btn_CreateSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_CreateSN.Name = "btn_CreateSN";
+        this.btn_CreateSN.Size = new System.Drawing.Size(110, 47);
+        this.btn_CreateSN.TabIndex = 6;
+        this.btn_CreateSN.Text = "鐢熸垚搴忓垪鍙�";
+        this.btn_CreateSN.UseVisualStyleBackColor = true;
+        this.btn_CreateSN.Click += new System.EventHandler(btn_CreateSN_Click);
+        this.txt_VolvoDU.Location = new System.Drawing.Point(1155, 22);
+        this.txt_VolvoDU.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_VolvoDU.Name = "txt_VolvoDU";
+        this.txt_VolvoDU.Size = new System.Drawing.Size(202, 25);
+        this.txt_VolvoDU.TabIndex = 5;
+        this.txt_VolvoHWSD.Location = new System.Drawing.Point(1155, 63);
+        this.txt_VolvoHWSD.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_VolvoHWSD.Name = "txt_VolvoHWSD";
+        this.txt_VolvoHWSD.Size = new System.Drawing.Size(202, 25);
+        this.txt_VolvoHWSD.TabIndex = 4;
+        this.label23.AutoSize = true;
+        this.label23.Location = new System.Drawing.Point(1062, 68);
+        this.label23.Name = "label23";
+        this.label23.Size = new System.Drawing.Size(87, 15);
+        this.label23.TabIndex = 23;
+        this.label23.Text = "Volvo HWSD";
+        this.label24.AutoSize = true;
+        this.label24.Location = new System.Drawing.Point(1062, 27);
+        this.label24.Name = "label24";
+        this.label24.Size = new System.Drawing.Size(71, 15);
+        this.label24.TabIndex = 25;
+        this.label24.Text = "Volvo DU";
+        this.txt_GeelyDU.Location = new System.Drawing.Point(443, 22);
+        this.txt_GeelyDU.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_GeelyDU.Name = "txt_GeelyDU";
+        this.txt_GeelyDU.Size = new System.Drawing.Size(202, 25);
+        this.txt_GeelyDU.TabIndex = 3;
+        this.txt_GeelyDU.TextChanged += new System.EventHandler(txt_GeelyDU_TextChanged);
+        this.label22.AutoSize = true;
+        this.label22.Location = new System.Drawing.Point(366, 27);
+        this.label22.Name = "label22";
+        this.label22.Size = new System.Drawing.Size(71, 15);
+        this.label22.TabIndex = 21;
+        this.label22.Text = "Geely DU";
+        this.txt_HW.Location = new System.Drawing.Point(89, 22);
+        this.txt_HW.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_HW.Name = "txt_HW";
+        this.txt_HW.Size = new System.Drawing.Size(236, 25);
+        this.txt_HW.TabIndex = 0;
+        this.label20.AutoSize = true;
+        this.label20.Location = new System.Drawing.Point(16, 27);
+        this.label20.Name = "label20";
+        this.label20.Size = new System.Drawing.Size(67, 15);
+        this.label20.TabIndex = 17;
+        this.label20.Text = "纭欢鐗堟湰";
+        this.groupBox3.Controls.Add(this.txt_EndDHUIDSN);
+        this.groupBox3.Controls.Add(this.label19);
+        this.groupBox3.Controls.Add(this.txt_StartDHUIDSN);
+        this.groupBox3.Controls.Add(this.label11);
+        this.groupBox3.Controls.Add(this.txt_ShiftsNo);
+        this.groupBox3.Controls.Add(this.label12);
+        this.groupBox3.Controls.Add(this.txt_Date2);
+        this.groupBox3.Controls.Add(this.label13);
+        this.groupBox3.Controls.Add(this.txt_PN);
+        this.groupBox3.Controls.Add(this.label14);
+        this.groupBox3.Controls.Add(this.txt_VendorCode);
+        this.groupBox3.Controls.Add(this.label15);
+        this.groupBox3.Location = new System.Drawing.Point(5, 119);
+        this.groupBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox3.Name = "groupBox3";
+        this.groupBox3.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox3.Size = new System.Drawing.Size(1876, 59);
+        this.groupBox3.TabIndex = 12;
+        this.groupBox3.TabStop = false;
+        this.groupBox3.Text = "DHUID";
+        this.txt_EndDHUIDSN.Location = new System.Drawing.Point(1147, 22);
+        this.txt_EndDHUIDSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_EndDHUIDSN.Name = "txt_EndDHUIDSN";
+        this.txt_EndDHUIDSN.Size = new System.Drawing.Size(84, 25);
+        this.txt_EndDHUIDSN.TabIndex = 5;
+        this.label19.AutoSize = true;
+        this.label19.Location = new System.Drawing.Point(1119, 27);
+        this.label19.Name = "label19";
+        this.label19.Size = new System.Drawing.Size(22, 15);
+        this.label19.TabIndex = 15;
+        this.label19.Text = "鍒�";
+        this.txt_StartDHUIDSN.Location = new System.Drawing.Point(1032, 22);
+        this.txt_StartDHUIDSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_StartDHUIDSN.Name = "txt_StartDHUIDSN";
+        this.txt_StartDHUIDSN.Size = new System.Drawing.Size(82, 25);
+        this.txt_StartDHUIDSN.TabIndex = 4;
+        this.label11.AutoSize = true;
+        this.label11.Location = new System.Drawing.Point(940, 27);
+        this.label11.Name = "label11";
+        this.label11.Size = new System.Drawing.Size(82, 15);
+        this.label11.TabIndex = 10;
+        this.label11.Text = "鐢熶骇娴佹按鍙�";
+        this.txt_ShiftsNo.Location = new System.Drawing.Point(848, 22);
+        this.txt_ShiftsNo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_ShiftsNo.Name = "txt_ShiftsNo";
+        this.txt_ShiftsNo.Size = new System.Drawing.Size(69, 25);
+        this.txt_ShiftsNo.TabIndex = 3;
+        this.label12.AutoSize = true;
+        this.label12.Location = new System.Drawing.Point(756, 27);
+        this.label12.Name = "label12";
+        this.label12.Size = new System.Drawing.Size(82, 15);
+        this.label12.TabIndex = 8;
+        this.label12.Text = "鐢熶骇鐝鍙�";
+        this.txt_Date2.Location = new System.Drawing.Point(632, 22);
+        this.txt_Date2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_Date2.Name = "txt_Date2";
+        this.txt_Date2.Size = new System.Drawing.Size(104, 25);
+        this.txt_Date2.TabIndex = 2;
+        this.label13.AutoSize = true;
+        this.label13.Location = new System.Drawing.Point(556, 27);
+        this.label13.Name = "label13";
+        this.label13.Size = new System.Drawing.Size(67, 15);
+        this.label13.TabIndex = 6;
+        this.label13.Text = "鐢熶骇鏃ユ湡";
+        this.txt_PN.Location = new System.Drawing.Point(308, 22);
+        this.txt_PN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_PN.Name = "txt_PN";
+        this.txt_PN.Size = new System.Drawing.Size(229, 25);
+        this.txt_PN.TabIndex = 1;
+        this.label14.AutoSize = true;
+        this.label14.Location = new System.Drawing.Point(7, 27);
+        this.label14.Name = "label14";
+        this.label14.Size = new System.Drawing.Size(82, 15);
+        this.label14.TabIndex = 0;
+        this.label14.Text = "渚涘簲鍟嗕唬鐮�";
+        this.txt_VendorCode.Location = new System.Drawing.Point(100, 22);
+        this.txt_VendorCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_VendorCode.Name = "txt_VendorCode";
+        this.txt_VendorCode.Size = new System.Drawing.Size(100, 25);
+        this.txt_VendorCode.TabIndex = 0;
+        this.label15.AutoSize = true;
+        this.label15.Location = new System.Drawing.Point(215, 27);
+        this.label15.Name = "label15";
+        this.label15.Size = new System.Drawing.Size(82, 15);
+        this.label15.TabIndex = 2;
+        this.label15.Text = "闆堕儴浠剁紪鍙�";
+        this.groupBox2.Controls.Add(this.txt_MachineCode);
+        this.groupBox2.Controls.Add(this.label16);
+        this.groupBox2.Controls.Add(this.txt_MaxSpecialSN);
+        this.groupBox2.Controls.Add(this.label18);
+        this.groupBox2.Controls.Add(this.label17);
+        this.groupBox2.Controls.Add(this.txt_EndDaySN);
+        this.groupBox2.Controls.Add(this.txt_MinSpecialSN);
+        this.groupBox2.Controls.Add(this.label10);
+        this.groupBox2.Controls.Add(this.txt_StartDaySN);
+        this.groupBox2.Controls.Add(this.label9);
+        this.groupBox2.Controls.Add(this.txt_Date1);
+        this.groupBox2.Controls.Add(this.label8);
+        this.groupBox2.Controls.Add(this.txt_FactoryCode);
+        this.groupBox2.Controls.Add(this.label4);
+        this.groupBox2.Controls.Add(this.txt_PCODE);
+        this.groupBox2.Controls.Add(this.txt_LineNo1);
+        this.groupBox2.Controls.Add(this.label5);
+        this.groupBox2.Controls.Add(this.label6);
+        this.groupBox2.Location = new System.Drawing.Point(5, 59);
+        this.groupBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox2.Name = "groupBox2";
+        this.groupBox2.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox2.Size = new System.Drawing.Size(1876, 55);
+        this.groupBox2.TabIndex = 9;
+        this.groupBox2.TabStop = false;
+        this.groupBox2.Text = "XDSN";
+        this.txt_MachineCode.Location = new System.Drawing.Point(284, 22);
+        this.txt_MachineCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_MachineCode.Name = "txt_MachineCode";
+        this.txt_MachineCode.Size = new System.Drawing.Size(97, 25);
+        this.txt_MachineCode.TabIndex = 1;
+        this.label16.AutoSize = true;
+        this.label16.Location = new System.Drawing.Point(204, 27);
+        this.label16.Name = "label16";
+        this.label16.Size = new System.Drawing.Size(67, 15);
+        this.label16.TabIndex = 15;
+        this.label16.Text = "鏁存満浠g爜";
+        this.txt_MaxSpecialSN.Location = new System.Drawing.Point(1487, 22);
+        this.txt_MaxSpecialSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_MaxSpecialSN.Name = "txt_MaxSpecialSN";
+        this.txt_MaxSpecialSN.Size = new System.Drawing.Size(92, 25);
+        this.txt_MaxSpecialSN.TabIndex = 8;
+        this.label18.AutoSize = true;
+        this.label18.Location = new System.Drawing.Point(1458, 27);
+        this.label18.Name = "label18";
+        this.label18.Size = new System.Drawing.Size(22, 15);
+        this.label18.TabIndex = 13;
+        this.label18.Text = "鍒�";
+        this.label17.AutoSize = true;
+        this.label17.Location = new System.Drawing.Point(1163, 27);
+        this.label17.Name = "label17";
+        this.label17.Size = new System.Drawing.Size(22, 15);
+        this.label17.TabIndex = 9;
+        this.label17.Text = "鍒�";
+        this.txt_EndDaySN.Location = new System.Drawing.Point(1192, 22);
+        this.txt_EndDaySN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_EndDaySN.Name = "txt_EndDaySN";
+        this.txt_EndDaySN.Size = new System.Drawing.Size(92, 25);
+        this.txt_EndDaySN.TabIndex = 6;
+        this.txt_MinSpecialSN.Location = new System.Drawing.Point(1360, 22);
+        this.txt_MinSpecialSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_MinSpecialSN.Name = "txt_MinSpecialSN";
+        this.txt_MinSpecialSN.Size = new System.Drawing.Size(92, 25);
+        this.txt_MinSpecialSN.TabIndex = 7;
+        this.label10.AutoSize = true;
+        this.label10.Location = new System.Drawing.Point(1297, 26);
+        this.label10.Name = "label10";
+        this.label10.Size = new System.Drawing.Size(52, 15);
+        this.label10.TabIndex = 10;
+        this.label10.Text = "杩炵画鍙�";
+        this.txt_StartDaySN.Location = new System.Drawing.Point(1073, 22);
+        this.txt_StartDaySN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_StartDaySN.Name = "txt_StartDaySN";
+        this.txt_StartDaySN.Size = new System.Drawing.Size(85, 25);
+        this.txt_StartDaySN.TabIndex = 5;
+        this.txt_StartDaySN.TextChanged += new System.EventHandler(txt_StartDaySN_TextChanged);
+        this.label9.AutoSize = true;
+        this.label9.Location = new System.Drawing.Point(993, 27);
+        this.label9.Name = "label9";
+        this.label9.Size = new System.Drawing.Size(67, 15);
+        this.label9.TabIndex = 8;
+        this.label9.Text = "鏃ユ祦姘村彿";
+        this.txt_Date1.Location = new System.Drawing.Point(877, 22);
+        this.txt_Date1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_Date1.Name = "txt_Date1";
+        this.txt_Date1.Size = new System.Drawing.Size(97, 25);
+        this.txt_Date1.TabIndex = 4;
+        this.txt_Date1.TextChanged += new System.EventHandler(txt_Date1_TextChanged);
+        this.label8.AutoSize = true;
+        this.label8.Location = new System.Drawing.Point(797, 27);
+        this.label8.Name = "label8";
+        this.label8.Size = new System.Drawing.Size(67, 15);
+        this.label8.TabIndex = 6;
+        this.label8.Text = "鐢熶骇鏃ユ湡";
+        this.txt_FactoryCode.Location = new System.Drawing.Point(492, 22);
+        this.txt_FactoryCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_FactoryCode.Name = "txt_FactoryCode";
+        this.txt_FactoryCode.Size = new System.Drawing.Size(97, 25);
+        this.txt_FactoryCode.TabIndex = 2;
+        this.label4.AutoSize = true;
+        this.label4.Location = new System.Drawing.Point(16, 27);
+        this.label4.Name = "label4";
+        this.label4.Size = new System.Drawing.Size(47, 15);
+        this.label4.TabIndex = 0;
+        this.label4.Text = "PCODE";
+        this.txt_PCODE.Location = new System.Drawing.Point(73, 22);
+        this.txt_PCODE.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_PCODE.Name = "txt_PCODE";
+        this.txt_PCODE.Size = new System.Drawing.Size(96, 25);
+        this.txt_PCODE.TabIndex = 0;
+        this.txt_LineNo1.Location = new System.Drawing.Point(684, 22);
+        this.txt_LineNo1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_LineNo1.Name = "txt_LineNo1";
+        this.txt_LineNo1.Size = new System.Drawing.Size(97, 25);
+        this.txt_LineNo1.TabIndex = 3;
+        this.label5.AutoSize = true;
+        this.label5.Location = new System.Drawing.Point(412, 27);
+        this.label5.Name = "label5";
+        this.label5.Size = new System.Drawing.Size(67, 15);
+        this.label5.TabIndex = 2;
+        this.label5.Text = "宸ュ巶浠g爜";
+        this.label6.AutoSize = true;
+        this.label6.Location = new System.Drawing.Point(604, 27);
+        this.label6.Name = "label6";
+        this.label6.Size = new System.Drawing.Size(67, 15);
+        this.label6.TabIndex = 4;
+        this.label6.Text = "浜х嚎缂栧彿";
+        this.groupBox1.Controls.Add(this.tbx_OrderID);
+        this.groupBox1.Controls.Add(this.btn_OpenDlg);
+        this.groupBox1.Controls.Add(this.cbox_Model);
+        this.groupBox1.Controls.Add(this.label26);
+        this.groupBox1.Controls.Add(this.label3);
+        this.groupBox1.Controls.Add(this.label7);
+        this.groupBox1.Controls.Add(this.txt_EndSN);
+        this.groupBox1.Controls.Add(this.txt_StartSN);
+        this.groupBox1.Controls.Add(this.label1);
+        this.groupBox1.Controls.Add(this.txt_SNPrefix);
+        this.groupBox1.Controls.Add(this.label2);
+        this.groupBox1.Location = new System.Drawing.Point(3, 2);
+        this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox1.Name = "groupBox1";
+        this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.groupBox1.Size = new System.Drawing.Size(1878, 52);
+        this.groupBox1.TabIndex = 8;
+        this.groupBox1.TabStop = false;
+        this.groupBox1.Text = "SN";
+        this.tbx_OrderID.Location = new System.Drawing.Point(70, 17);
+        this.tbx_OrderID.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tbx_OrderID.Name = "tbx_OrderID";
+        this.tbx_OrderID.Size = new System.Drawing.Size(172, 25);
+        this.tbx_OrderID.TabIndex = 13;
+        this.btn_OpenDlg.Location = new System.Drawing.Point(248, 15);
+        this.btn_OpenDlg.Name = "btn_OpenDlg";
+        this.btn_OpenDlg.Size = new System.Drawing.Size(41, 27);
+        this.btn_OpenDlg.TabIndex = 12;
+        this.btn_OpenDlg.Text = "...";
+        this.btn_OpenDlg.UseVisualStyleBackColor = true;
+        this.btn_OpenDlg.Click += new System.EventHandler(btn_OpenDlg_Click);
+        this.cbox_Model.FormattingEnabled = true;
+        this.cbox_Model.Location = new System.Drawing.Point(390, 16);
+        this.cbox_Model.Name = "cbox_Model";
+        this.cbox_Model.Size = new System.Drawing.Size(192, 23);
+        this.cbox_Model.TabIndex = 11;
+        this.cbox_Model.SelectedIndexChanged += new System.EventHandler(cbx_Model_SelectedIndexChanged);
+        this.label26.AutoSize = true;
+        this.label26.Location = new System.Drawing.Point(351, 19);
+        this.label26.Name = "label26";
+        this.label26.Size = new System.Drawing.Size(37, 15);
+        this.label26.TabIndex = 10;
+        this.label26.Text = "鏈哄瀷";
+        this.label3.AutoSize = true;
+        this.label3.Location = new System.Drawing.Point(12, 20);
+        this.label3.Name = "label3";
+        this.label3.Size = new System.Drawing.Size(52, 15);
+        this.label3.TabIndex = 9;
+        this.label3.Text = "宸ュ崟鍙�";
+        this.label7.AutoSize = true;
+        this.label7.Location = new System.Drawing.Point(1110, 18);
+        this.label7.Name = "label7";
+        this.label7.Size = new System.Drawing.Size(22, 15);
+        this.label7.TabIndex = 8;
+        this.label7.Text = "鍒�";
+        this.txt_EndSN.Location = new System.Drawing.Point(1139, 14);
+        this.txt_EndSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_EndSN.Name = "txt_EndSN";
+        this.txt_EndSN.Size = new System.Drawing.Size(92, 25);
+        this.txt_EndSN.TabIndex = 3;
+        this.txt_StartSN.Location = new System.Drawing.Point(1016, 14);
+        this.txt_StartSN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_StartSN.Name = "txt_StartSN";
+        this.txt_StartSN.Size = new System.Drawing.Size(89, 25);
+        this.txt_StartSN.TabIndex = 2;
+        this.txt_StartSN.TextChanged += new System.EventHandler(txt_StartSN_TextChanged);
+        this.label1.AutoSize = true;
+        this.label1.Location = new System.Drawing.Point(612, 18);
+        this.label1.Name = "label1";
+        this.label1.Size = new System.Drawing.Size(53, 15);
+        this.label1.TabIndex = 0;
+        this.label1.Text = "SN鍓嶇紑";
+        this.txt_SNPrefix.Location = new System.Drawing.Point(676, 14);
+        this.txt_SNPrefix.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.txt_SNPrefix.Name = "txt_SNPrefix";
+        this.txt_SNPrefix.Size = new System.Drawing.Size(231, 25);
+        this.txt_SNPrefix.TabIndex = 1;
+        this.label2.AutoSize = true;
+        this.label2.Location = new System.Drawing.Point(953, 18);
+        this.label2.Name = "label2";
+        this.label2.Size = new System.Drawing.Size(52, 15);
+        this.label2.TabIndex = 2;
+        this.label2.Text = "娴佹按鍙�";
+        this.tabPage2.Controls.Add(this.dataGridView2);
+        this.tabPage2.Controls.Add(this.panel2);
+        this.tabPage2.Location = new System.Drawing.Point(4, 25);
+        this.tabPage2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tabPage2.Name = "tabPage2";
+        this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tabPage2.Size = new System.Drawing.Size(1894, 896);
+        this.tabPage2.TabIndex = 1;
+        this.tabPage2.Text = "鏌ヨ鍙风爜鈼�";
+        this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+        this.dataGridView2.Location = new System.Drawing.Point(4, 83);
+        this.dataGridView2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.dataGridView2.Name = "dataGridView2";
+        this.dataGridView2.RowHeadersWidth = 51;
+        this.dataGridView2.RowTemplate.Height = 30;
+        this.dataGridView2.Size = new System.Drawing.Size(1886, 809);
+        this.dataGridView2.TabIndex = 1;
+        this.panel2.Controls.Add(this.btn_Export);
+        this.panel2.Controls.Add(this.tbx_content);
+        this.panel2.Controls.Add(this.cbox_Field);
+        this.panel2.Controls.Add(this.btn_Delete);
+        this.panel2.Controls.Add(this.btn_Modify);
+        this.panel2.Controls.Add(this.btn_Query);
+        this.panel2.Controls.Add(this.label28);
+        this.panel2.Controls.Add(this.label27);
+        this.panel2.Location = new System.Drawing.Point(3, 5);
+        this.panel2.Name = "panel2";
+        this.panel2.Size = new System.Drawing.Size(1888, 73);
+        this.panel2.TabIndex = 0;
+        this.btn_Export.Location = new System.Drawing.Point(1718, 11);
+        this.btn_Export.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_Export.Name = "btn_Export";
+        this.btn_Export.Size = new System.Drawing.Size(110, 47);
+        this.btn_Export.TabIndex = 22;
+        this.btn_Export.Text = "瀵煎嚭鏁版嵁";
+        this.btn_Export.UseVisualStyleBackColor = true;
+        this.btn_Export.Click += new System.EventHandler(btn_Export_Click);
+        this.tbx_content.Location = new System.Drawing.Point(424, 24);
+        this.tbx_content.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.tbx_content.Name = "tbx_content";
+        this.tbx_content.Size = new System.Drawing.Size(383, 25);
+        this.tbx_content.TabIndex = 21;
+        this.tbx_content.KeyPress += new System.Windows.Forms.KeyPressEventHandler(tbx_content_KeyPress);
+        this.cbox_Field.FormattingEnabled = true;
+        this.cbox_Field.Location = new System.Drawing.Point(97, 24);
+        this.cbox_Field.Name = "cbox_Field";
+        this.cbox_Field.Size = new System.Drawing.Size(199, 23);
+        this.cbox_Field.TabIndex = 20;
+        this.cbox_Field.SelectedIndexChanged += new System.EventHandler(cbx_Field_SelectedIndexChanged);
+        this.btn_Delete.Location = new System.Drawing.Point(1436, 11);
+        this.btn_Delete.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_Delete.Name = "btn_Delete";
+        this.btn_Delete.Size = new System.Drawing.Size(110, 47);
+        this.btn_Delete.TabIndex = 19;
+        this.btn_Delete.Text = "鍒犻櫎";
+        this.btn_Delete.UseVisualStyleBackColor = true;
+        this.btn_Delete.Visible = false;
+        this.btn_Delete.Click += new System.EventHandler(btn_Delete_Click);
+        this.btn_Modify.Location = new System.Drawing.Point(1295, 11);
+        this.btn_Modify.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_Modify.Name = "btn_Modify";
+        this.btn_Modify.Size = new System.Drawing.Size(110, 47);
+        this.btn_Modify.TabIndex = 18;
+        this.btn_Modify.Text = "淇敼";
+        this.btn_Modify.UseVisualStyleBackColor = true;
+        this.btn_Modify.Visible = false;
+        this.btn_Modify.Click += new System.EventHandler(btn_Modify_Click);
+        this.btn_Query.Location = new System.Drawing.Point(1577, 11);
+        this.btn_Query.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        this.btn_Query.Name = "btn_Query";
+        this.btn_Query.Size = new System.Drawing.Size(110, 47);
+        this.btn_Query.TabIndex = 17;
+        this.btn_Query.Text = "鏌ヨ";
+        this.btn_Query.UseVisualStyleBackColor = true;
+        this.btn_Query.Click += new System.EventHandler(btn_Query_Click);
+        this.label28.AutoSize = true;
+        this.label28.Location = new System.Drawing.Point(351, 27);
+        this.label28.Name = "label28";
+        this.label28.Size = new System.Drawing.Size(67, 15);
+        this.label28.TabIndex = 14;
+        this.label28.Text = "鏌ヨ鍐呭";
+        this.label27.AutoSize = true;
+        this.label27.Location = new System.Drawing.Point(24, 27);
+        this.label27.Name = "label27";
+        this.label27.Size = new System.Drawing.Size(67, 15);
+        this.label27.TabIndex = 11;
+        this.label27.Text = "鏌ヨ瀛楁";
+        this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
+        this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[8] { this.toolStripStatusLabel1, this.toolStripStatusLabel2, this.toolStripStatusLabel3, this.toolStripStatusLabel4, this.toolStripStatusLabel5, this.toolStripStatusLabel6, this.toolStripStatusLabel7, this.toolStripStatusLabel8 });
+        this.statusStrip1.Location = new System.Drawing.Point(0, 1007);
+        this.statusStrip1.Name = "statusStrip1";
+        this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);
+        this.statusStrip1.Size = new System.Drawing.Size(1902, 26);
+        this.statusStrip1.TabIndex = 2;
+        this.statusStrip1.Text = "statusStrip1";
+        this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
+        this.toolStripStatusLabel1.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel1.Text = "toolStripStatusLabel1";
+        this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
+        this.toolStripStatusLabel2.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel2.Text = "toolStripStatusLabel2";
+        this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
+        this.toolStripStatusLabel3.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel3.Text = "toolStripStatusLabel3";
+        this.toolStripStatusLabel4.Name = "toolStripStatusLabel4";
+        this.toolStripStatusLabel4.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel4.Text = "toolStripStatusLabel4";
+        this.toolStripStatusLabel5.Name = "toolStripStatusLabel5";
+        this.toolStripStatusLabel5.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel5.Text = "toolStripStatusLabel5";
+        this.toolStripStatusLabel6.Name = "toolStripStatusLabel6";
+        this.toolStripStatusLabel6.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel6.Text = "toolStripStatusLabel6";
+        this.toolStripStatusLabel7.Name = "toolStripStatusLabel7";
+        this.toolStripStatusLabel7.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel7.Text = "toolStripStatusLabel7";
+        this.toolStripStatusLabel8.Name = "toolStripStatusLabel8";
+        this.toolStripStatusLabel8.Size = new System.Drawing.Size(167, 20);
+        this.toolStripStatusLabel8.Text = "toolStripStatusLabel8";
+        this.errorProvider1.ContainerControl = this;
+        this.lbl_Title.Font = new System.Drawing.Font("寰蒋闆呴粦", 30f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 134);
+        this.lbl_Title.Location = new System.Drawing.Point(0, 0);
+        this.lbl_Title.Name = "lbl_Title";
+        this.lbl_Title.Size = new System.Drawing.Size(1902, 66);
+        this.lbl_Title.TabIndex = 3;
+        this.lbl_Title.Text = "SN Generate Tool";
+        //this.btn_Close.BackgroundImage = Hexiv.JK.SNGenerateTool.Properties.Resources.鍏抽棴3;
+        this.btn_Close.Location = new System.Drawing.Point(1858, 5);
+        this.btn_Close.Name = "btn_Close";
+        this.btn_Close.Size = new System.Drawing.Size(32, 32);
+        this.btn_Close.TabIndex = 5;
+        this.btn_Close.UseVisualStyleBackColor = false;
+        this.btn_Close.Click += new System.EventHandler(btn_Close_Click);
+        //this.btn_Minimize.BackgroundImage = Hexiv.JK.SNGenerateTool.Properties.Resources.鏈�灏忓寲;
+        this.btn_Minimize.Location = new System.Drawing.Point(1803, 5);
+        this.btn_Minimize.Name = "btn_Minimize";
+        this.btn_Minimize.Size = new System.Drawing.Size(32, 32);
+        this.btn_Minimize.TabIndex = 4;
+        this.btn_Minimize.UseVisualStyleBackColor = false;
+        this.btn_Minimize.Click += new System.EventHandler(btn_Mininimze_Click);
+        base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 15f);
+        base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        base.ClientSize = new System.Drawing.Size(1902, 1033);
+        base.Controls.Add(this.btn_Close);
+        base.Controls.Add(this.btn_Minimize);
+        base.Controls.Add(this.lbl_Title);
+        base.Controls.Add(this.tabControl1);
+        base.Controls.Add(this.statusStrip1);
+        //base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
+        base.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+        base.Name = "MainForm";
+        this.Text = "Form1";
+        base.Paint += new System.Windows.Forms.PaintEventHandler(MainForm_Paint);
+        this.tabControl1.ResumeLayout(false);
+        this.tabPage1.ResumeLayout(false);
+        ((System.ComponentModel.ISupportInitialize)this.dataGridView1).EndInit();
+        this.panel1.ResumeLayout(false);
+        this.groupBox4.ResumeLayout(false);
+        this.groupBox4.PerformLayout();
+        this.groupBox3.ResumeLayout(false);
+        this.groupBox3.PerformLayout();
+        this.groupBox2.ResumeLayout(false);
+        this.groupBox2.PerformLayout();
+        this.groupBox1.ResumeLayout(false);
+        this.groupBox1.PerformLayout();
+        this.tabPage2.ResumeLayout(false);
+        ((System.ComponentModel.ISupportInitialize)this.dataGridView2).EndInit();
+        this.panel2.ResumeLayout(false);
+        this.panel2.PerformLayout();
+        this.statusStrip1.ResumeLayout(false);
+        this.statusStrip1.PerformLayout();
+        ((System.ComponentModel.ISupportInitialize)this.errorProvider1).EndInit();
+        base.ResumeLayout(false);
+        base.PerformLayout();
+    }
+}
diff --git a/Plugin.SNGenerateTool/HashPlus.cs b/Plugin.SNGenerateTool/HashPlus.cs
new file mode 100644
index 0000000..b516b23
--- /dev/null
+++ b/Plugin.SNGenerateTool/HashPlus.cs
@@ -0,0 +1,89 @@
+锘縰sing System.Security.Cryptography;
+using System.Text;
+
+namespace Plugin.SNGenerateTool
+{
+    internal class HashPlus
+    {
+        public static string GetHashSHA256(string text)
+        {
+            byte[] bytes = Encoding.Unicode.GetBytes(text);
+            using (SHA256Managed sHA256Managed = new SHA256Managed())
+            {
+                byte[] array = sHA256Managed.ComputeHash(bytes);
+                string text2 = string.Empty;
+                byte[] array2 = array;
+                foreach (byte b in array2)
+                {
+                    text2 += $"{b:x2}";
+                }
+                return text2;
+            }
+        }
+
+        public static string GetHashSHA512(string text)
+        {
+            byte[] bytes = Encoding.Unicode.GetBytes(text);
+            using (SHA512Managed sHA512Managed = new SHA512Managed())
+            {
+                byte[] array = sHA512Managed.ComputeHash(bytes);
+                string text2 = string.Empty;
+                byte[] array2 = array;
+                foreach (byte b in array2)
+                {
+                    text2 += $"{b:x2}";
+                }
+                return text2;
+            }
+        }
+
+        public static string GetHashSHA384(string text)
+        {
+            byte[] bytes = Encoding.Unicode.GetBytes(text);
+            using (SHA384Managed sHA384Managed = new SHA384Managed())
+            {
+                byte[] array = sHA384Managed.ComputeHash(bytes);
+                string text2 = string.Empty;
+                byte[] array2 = array;
+                foreach (byte b in array2)
+                {
+                    text2 += $"{b:x2}";
+                }
+                return text2;
+            }
+        }
+
+        public static string GetHashSHA1(string text)
+        {
+            byte[] bytes = Encoding.Unicode.GetBytes(text);
+            using (SHA1Managed sHA1Managed = new SHA1Managed())
+            {
+                byte[] array = sHA1Managed.ComputeHash(bytes);
+                string text2 = string.Empty;
+                byte[] array2 = array;
+                foreach (byte b in array2)
+                {
+                    text2 += $"{b:x2}";
+                }
+                return text2;
+            }
+        }
+
+        public static string GetHashMD5(string text)
+        {
+            byte[] bytes = Encoding.Unicode.GetBytes(text);
+            using (MD5 mD = MD5.Create())
+            {
+                byte[] array = mD.ComputeHash(bytes);
+                string text2 = string.Empty;
+                byte[] array2 = array;
+                foreach (byte b in array2)
+                {
+                    text2 += $"{b:x2}";
+                }
+                return text2;
+            }
+        }
+    }
+
+}
diff --git a/Plugin.SNGenerateTool/Plugin.SNGenerateTool.csproj b/Plugin.SNGenerateTool/Plugin.SNGenerateTool.csproj
new file mode 100644
index 0000000..e456031
--- /dev/null
+++ b/Plugin.SNGenerateTool/Plugin.SNGenerateTool.csproj
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}</ProjectGuid>
+    <OutputType>library</OutputType>
+    <RootNamespace>Plugin.SNGenerateTool</RootNamespace>
+    <AssemblyName>Plugin.SNGenerateTool</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Extensions.Configuration, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.Configuration.9.0.3\lib\net462\Microsoft.Extensions.Configuration.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.Configuration.Abstractions.9.0.3\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.Configuration.FileExtensions.9.0.3\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.Ini, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.Configuration.Ini.9.0.3\lib\net462\Microsoft.Extensions.Configuration.Ini.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.FileProviders.Abstractions.9.0.3\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.FileProviders.Physical.9.0.3\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.FileSystemGlobbing.9.0.3\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Primitives, Version=9.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Microsoft.Extensions.Primitives.9.0.3\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
+    </Reference>
+    <Reference Include="Panuon.WPF, Version=1.1.2.2, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Panuon.WPF.1.1.3\lib\net472\Panuon.WPF.dll</HintPath>
+    </Reference>
+    <Reference Include="Panuon.WPF.UI, Version=1.3.0.2, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Panuon.WPF.UI.1.3.0.2\lib\net472\Panuon.WPF.UI.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="UserControl1.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="Entity\DataInfo.cs" />
+    <Compile Include="Entity\UserSetting.cs" />
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="HashPlus.cs" />
+    <Compile Include="UserControl1.xaml.cs">
+      <DependentUpon>UserControl1.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="app.config" />
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/Plugin.SNGenerateTool/Properties/AssemblyInfo.cs b/Plugin.SNGenerateTool/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1d07d66
--- /dev/null
+++ b/Plugin.SNGenerateTool/Properties/AssemblyInfo.cs
@@ -0,0 +1,52 @@
+锘縰sing System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
+[assembly: AssemblyTitle("Plugin.SNGenerateTool")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Plugin.SNGenerateTool")]
+[assembly: AssemblyCopyright("Copyright 漏  2025")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆�
+[assembly: ComVisible(false)]
+
+//鑻ヨ寮�濮嬬敓鎴愬彲鏈湴鍖栫殑搴旂敤绋嬪簭锛岃璁剧疆
+//.csproj 鏂囦欢涓殑 <UICulture>CultureYouAreCodingWith</UICulture>
+//鍦� <PropertyGroup> 涓�備緥濡傦紝濡傛灉浣犱娇鐢ㄧ殑鏄編鍥借嫳璇��
+//浣跨敤鐨勬槸缇庡浗鑻辫锛岃灏� <UICulture> 璁剧疆涓� en-US銆�  鐒跺悗鍙栨秷
+//瀵逛互涓� NeutralResourceLanguage 鐗规�х殑娉ㄩ噴銆�  鏇存柊
+//浠ヤ笅琛屼腑鐨勨�渆n-US鈥濅互鍖归厤椤圭洰鏂囦欢涓殑 UICulture 璁剧疆銆�
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly:ThemeInfo(
+    ResourceDictionaryLocation.None, //涓婚鐗瑰畾璧勬簮璇嶅吀鎵�澶勪綅缃�
+                             //(鏈湪椤甸潰涓壘鍒拌祫婧愭椂浣跨敤锛�
+                             //鎴栧簲鐢ㄧ▼搴忚祫婧愬瓧鍏镐腑鎵惧埌鏃朵娇鐢�)
+    ResourceDictionaryLocation.SourceAssembly //甯歌璧勬簮璇嶅吀鎵�澶勪綅缃�
+                                      //(鏈湪椤甸潰涓壘鍒拌祫婧愭椂浣跨敤锛�
+                                      //銆佸簲鐢ㄧ▼搴忔垨浠讳綍涓婚涓撶敤璧勬簮瀛楀吀涓壘鍒版椂浣跨敤)
+)]
+
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�: 
+//
+//      涓荤増鏈�
+//      娆$増鏈�
+//      鐢熸垚鍙�
+//      淇鍙�
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Plugin.SNGenerateTool/Properties/Resources.Designer.cs b/Plugin.SNGenerateTool/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..ce28cea
--- /dev/null
+++ b/Plugin.SNGenerateTool/Properties/Resources.Designer.cs
@@ -0,0 +1,62 @@
+锘�//------------------------------------------------------------------------------
+// <auto-generated>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//     杩愯鏃剁増鏈�: 4.0.30319.42000
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
+//     閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Plugin.SNGenerateTool.Properties {
+    
+    
+    /// <summary>
+    ///   寮虹被鍨嬭祫婧愮被锛岀敤浜庢煡鎵炬湰鍦板寲瀛楃涓茬瓑銆�
+    /// </summary>
+    // 姝ょ被鏄敱 StronglyTypedResourceBuilder
+    // 绫婚�氳繃绫讳技浜� ResGen 鎴� Visual Studio 鐨勫伐鍏疯嚜鍔ㄧ敓鎴愮殑銆�
+    // 鑻ヨ娣诲姞鎴栫Щ闄ゆ垚鍛橈紝璇风紪杈� .ResX 鏂囦欢锛岀劧鍚庨噸鏂拌繍琛� ResGen
+    // (浠� /str 浣滀负鍛戒护閫夐」)锛屾垨閲嶆柊鐢熸垚 VS 椤圭洰銆�
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   杩斿洖姝ょ被浣跨敤鐨勭紦瀛� ResourceManager 瀹炰緥銆�
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if ((resourceMan == null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Plugin.SNGenerateTool.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   閲嶅啓褰撳墠绾跨▼鐨� CurrentUICulture 灞炴�э紝瀵�
+        ///   浣跨敤姝ゅ己绫诲瀷璧勬簮绫荤殑鎵�鏈夎祫婧愭煡鎵炬墽琛岄噸鍐欍��
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}
diff --git a/WPFProject/Forms/Form1.resx b/Plugin.SNGenerateTool/Properties/Resources.resx
similarity index 89%
rename from WPFProject/Forms/Form1.resx
rename to Plugin.SNGenerateTool/Properties/Resources.resx
index 1af7de1..af7dbeb 100644
--- a/WPFProject/Forms/Form1.resx
+++ b/Plugin.SNGenerateTool/Properties/Resources.resx
@@ -46,7 +46,7 @@
     
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
     
     mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,7 +60,6 @@
             : and then encoded with base64 encoding.
     -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
         <xsd:choice maxOccurs="unbounded">
@@ -69,10 +68,9 @@
               <xsd:sequence>
                 <xsd:element name="value" type="xsd:string" minOccurs="0" />
               </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
               <xsd:attribute name="type" type="xsd:string" />
               <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="assembly">
@@ -87,10 +85,9 @@
                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="resheader">
@@ -112,9 +109,9 @@
     <value>2.0</value>
   </resheader>
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
 </root>
\ No newline at end of file
diff --git a/Plugin.SNGenerateTool/Properties/Settings.Designer.cs b/Plugin.SNGenerateTool/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..42641cf
--- /dev/null
+++ b/Plugin.SNGenerateTool/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+锘�//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Plugin.SNGenerateTool.Properties
+{
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}
diff --git a/Plugin.SNGenerateTool/Properties/Settings.settings b/Plugin.SNGenerateTool/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/Plugin.SNGenerateTool/Properties/Settings.settings
@@ -0,0 +1,7 @@
+锘�<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
\ No newline at end of file
diff --git a/Plugin.SNGenerateTool/UserControl1.xaml b/Plugin.SNGenerateTool/UserControl1.xaml
new file mode 100644
index 0000000..a3a9568
--- /dev/null
+++ b/Plugin.SNGenerateTool/UserControl1.xaml
@@ -0,0 +1,265 @@
+锘�<UserControl x:Class="Plugin.SNGenerateTool.UserControl1"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Plugin.SNGenerateTool"
+             mc:Ignorable="d" 
+             xmlns:pw="https://opensource.panuon.com/wpf"
+             xmlns:pu="https://opensource.panuon.com/wpf-ui"
+             Background="#FFF"
+             FontSize="18"
+             d:DesignHeight="450" d:DesignWidth="1920">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <pu:StyleDictionary Includes="DataGrid" />
+            </ResourceDictionary.MergedDictionaries>
+            <Style TargetType="TextBox">
+                <Setter Property="MinWidth" Value="100"/>
+                <Setter Property="VerticalContentAlignment" Value="Center"/>
+                <Setter Property="Height" Value="36"/>
+            </Style>
+
+            <Style TargetType="pu:FormGroup">
+                <Setter Property="Margin" Value="0,10,30,10"/>
+            </Style>
+
+            <Style TargetType="GroupBox">
+            </Style>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
+    <TabControl>
+        <TabItem Header="鍒涘缓鍙风爜">
+            <Grid Background="LightGray">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition/>
+                </Grid.RowDefinitions>
+
+                <StackPanel Margin="10">
+                    <GroupBox Header="SN">
+                        <StackPanel Orientation="Horizontal">
+                            <pu:FormGroup Header="宸ュ崟鍙�">
+                                <TextBox x:Name="tbx_OrderID" Width="200"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鏈哄瀷">
+                                <ComboBox x:Name="cbox_Model"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="SN鍓嶇紑">
+                                <TextBox x:Name="txt_SNPrefix" Width="200"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="娴佹按鍙�" Margin="0,10,0,10">
+                                <TextBox x:Name="txt_StartSN"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鍒�">
+                                <TextBox x:Name="txt_EndSN"/>
+                            </pu:FormGroup>
+                        </StackPanel>
+                    </GroupBox>
+
+                    <GroupBox Header="XDSN">
+                        <StackPanel Orientation="Horizontal">
+                            <pu:FormGroup Header="PCODE">
+                                <TextBox x:Name="txt_PCODE"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鏁存満浠g爜">
+                                <TextBox x:Name="txt_MachineCode"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="宸ュ巶浠g爜">
+                                <TextBox x:Name="txt_FactoryCode"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="浜х嚎缂栧彿">
+                                <TextBox x:Name="txt_LineNo1"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鐢熶骇鏃ユ湡">
+                                <TextBox x:Name="txt_Date1"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鏃ユ祦姘村彿" Margin="0,10,0,10">
+                                <TextBox x:Name="txt_StartDaySN"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鍒�">
+                                <TextBox IsEnabled="False"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="杩炵画鍙�" Margin="0,10,0,10">
+                                <TextBox x:Name="txt_MinSpecialSN"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鍒�">
+                                <TextBox IsEnabled="False"/>
+                            </pu:FormGroup>
+                        </StackPanel>
+                    </GroupBox>
+
+                    <GroupBox Header="DHUID">
+                        <StackPanel Orientation="Horizontal">
+                            <pu:FormGroup Header="渚涘簲鍟嗕唬鐮�">
+                                <TextBox x:Name="txt_VendorCode"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="闆堕儴浠剁紪鍙�">
+                                <TextBox x:Name="txt_PN"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鐢熶骇鏃ユ湡">
+                                <TextBox/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鐢熶骇鐝鍙�">
+                                <TextBox x:Name="txt_ShiftsNo"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鐢熶骇娴佹按鍙�" Margin="0,10,0,10">
+                                <TextBox x:Name="txt_StartDHUIDSN"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Header="鍒�">
+                                <TextBox IsEnabled="False"/>
+                            </pu:FormGroup>
+                        </StackPanel>
+                    </GroupBox>
+
+                    <GroupBox Header="鐗堟湰淇℃伅">
+                        <GroupBox.Resources>
+                            <Style TargetType="TextBox">
+                                <Setter Property="MinWidth" Value="200"/>
+                            </Style>
+                        </GroupBox.Resources>
+                        <Grid>
+                            <Grid.RowDefinitions>
+                                <RowDefinition/>
+                                <RowDefinition/>
+                            </Grid.RowDefinitions>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                            </Grid.ColumnDefinitions>
+                            <pu:FormGroup Grid.Row="0" Grid.Column="0" Header="纭欢鐗堟湰" GroupName="Version">
+                                <TextBox x:Name="txt_HW"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Grid.Row="1" Grid.Column="0" Header="杞欢鐗堟湰" GroupName="Version">
+                                <TextBox x:Name="txt_SW"/>
+                            </pu:FormGroup>
+
+                            <pu:FormGroup Grid.Row="0" Grid.Column="1" Header="Geely DU" GroupName="Version">
+                                <TextBox x:Name="txt_GeelyDU"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Grid.Row="1" Grid.Column="1" Header="Geely HWSD" GroupName="Version">
+                                <TextBox x:Name="txt_GeelyHWSD"/>
+                            </pu:FormGroup>
+
+                            <pu:FormGroup Grid.Row="0" Grid.Column="2" Header="SXBL" GroupName="Version">
+                                <TextBox x:Name="txt_SXBL"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Grid.Row="1" Grid.Column="2" Header="SXDI_SXBL" GroupName="Version">
+                                <TextBox x:Name="txt_SXDISXBL"/>
+                            </pu:FormGroup>
+
+                            <pu:FormGroup Grid.Row="0" Grid.Column="3" Header="Volvo DU" GroupName="Version">
+                                <TextBox x:Name="txt_VolvoDU"/>
+                            </pu:FormGroup>
+                            <pu:FormGroup Grid.Row="1" Grid.Column="3" Header="Volvo HWSD" GroupName="Version">
+                                <TextBox x:Name="txt_VolvoHWSD"/>
+                            </pu:FormGroup>
+
+                            <StackPanel Orientation="Horizontal"
+                                        Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2">
+                                <Button Click="Button_Click">鐢熸垚搴忓垪鍙�</Button>
+                                <Button>瀵煎叆鏁版嵁搴�</Button>
+                                <Button>娓呯┖鍐呭</Button>
+                            </StackPanel>
+                        </Grid>
+                    </GroupBox>
+                </StackPanel>
+                <DataGrid Grid.Row="1" x:Name="table1" AutoGenerateColumns="False" 
+                          CanUserAddRows="False"
+                          CanUserDeleteRows="False"
+                          ItemsSource="{Binding Datasource}">
+                    <DataGrid.Columns>
+                        <DataGridTemplateColumn Header="#" IsReadOnly="True" CanUserResize="False">
+
+                        </DataGridTemplateColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding GUID}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="GUID"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding OrderID}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="OrderId"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding Model}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="Model"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding MESSN}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="MESSN"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding XDSN}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="XDSN"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding DHUID}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="DHUID"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding ProductSN}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="ProductSN"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding HW}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="HW"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding SW}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="SW"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding GeelyDU}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="GeelyDU"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding GeelyHWSD}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="GeelyHWSD"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding SXBL}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="SXBL"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+
+                        <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding SXDI_SXBL}">
+                            <DataGridTextColumn.Header>
+                                <TextBlock Text="SXDI_SXBL"/>
+                            </DataGridTextColumn.Header>
+                        </DataGridTextColumn>
+                    </DataGrid.Columns>
+                </DataGrid>
+            </Grid>
+        </TabItem>
+        <TabItem Header="鏌ヨ鍙风爜"></TabItem>
+    </TabControl>
+
+</UserControl>
diff --git a/Plugin.SNGenerateTool/UserControl1.xaml.cs b/Plugin.SNGenerateTool/UserControl1.xaml.cs
new file mode 100644
index 0000000..5538e26
--- /dev/null
+++ b/Plugin.SNGenerateTool/UserControl1.xaml.cs
@@ -0,0 +1,252 @@
+锘縰sing Panuon.WPF.UI;
+using Plugin.SNGenerateTool.Entity;
+using System;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Data;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Plugin.SNGenerateTool
+{
+    /// <summary>
+    /// UserControl1.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
+    public partial class UserControl1 : UserControl, INotifyPropertyChanged
+    {
+        #region ...
+        public virtual event PropertyChangedEventHandler PropertyChanged;
+
+        protected virtual void Set(string name)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+        }
+
+        protected void Set<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
+        {
+            old = @new;
+            if (propertyName != null)
+            {
+                Set(propertyName);
+            }
+        }
+        #endregion
+
+        private string iniFile = Path.Combine(Environment.CurrentDirectory, "Config", "UserSettings.ini");
+
+        private string[] years = new string[30]
+    {
+        "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+        "B", "C", "D", "E", "F", "G", "H", "J", "K", "L",
+        "M", "N", "P", "R", "S", "T", "V", "W", "X", "Y"
+    };
+
+        private string[] months = new string[12]
+        {
+        "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+        "B", "C"
+        };
+
+        private string[] days = new string[31]
+        {
+        "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
+        "B", "C", "D", "E", "F", "G", "H", "J", "K", "L",
+        "M", "N", "P", "R", "S", "T", "V", "W", "X", "Y",
+        "Z"
+        };
+
+        private string[] F18CY = new string[10] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+        private ObservableCollection<DataInfo> datasource = new ObservableCollection<DataInfo>();
+        public ObservableCollection<DataInfo> Datasource
+        {
+            get => datasource;
+            set
+            {
+                Set(ref datasource, value);
+            }
+        }
+
+
+        public UserControl1()
+        {
+            this.DataContext = this;
+            InitializeComponent();
+        }
+
+        [DllImport("kernel32")]
+        private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
+
+        [DllImport("kernel32")]
+        private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
+
+
+        private void SaveSettings(string section, string file)
+        {
+            if (!File.Exists(file))
+            {
+                MessageBox.Show("閰嶇疆鏂囦欢涓嶅瓨鍦紝淇濆瓨澶辫触", "閿欒鎻愮ず", MessageBoxButton.OK, MessageBoxImage.Hand);
+                return;
+            }
+            WritePrivateProfileString(section, "OrderId", tbx_OrderID.Text, file);
+            WritePrivateProfileString(section, "SNPrefix", txt_SNPrefix.Text, file);
+            WritePrivateProfileString(section, "MESStartSN", txt_StartSN.Text, file);
+            WritePrivateProfileString(section, "MESEndSN", txt_EndSN.Text, file);
+            WritePrivateProfileString(section, "XDSNDate", txt_Date1.Text, file);
+            WritePrivateProfileString(section, "XDSNDaySN", txt_StartDaySN.Text, file);
+            WritePrivateProfileString(section, "XDSNSpecialSN", txt_MinSpecialSN.Text, file);
+            WritePrivateProfileString(section, "PartNo", txt_PN.Text, file);
+            WritePrivateProfileString(section, "HW", txt_HW.Text, file);
+            WritePrivateProfileString(section, "SW", txt_SW.Text, file);
+            WritePrivateProfileString(section, "GeelyDU", txt_GeelyDU.Text, file);
+            WritePrivateProfileString(section, "GeelyHWSD", txt_GeelyHWSD.Text, file);
+            WritePrivateProfileString(section, "SXBL", txt_SXBL.Text, file);
+            WritePrivateProfileString(section, "SXDISXBL", txt_SXDISXBL.Text, file);
+            WritePrivateProfileString(section, "VolvoDU", txt_VolvoDU.Text, file);
+            WritePrivateProfileString(section, "VolvoHWSD", txt_VolvoHWSD.Text, file);
+        }
+
+        public void CreateSN()
+        {
+            Datasource.Clear();
+
+            try
+            {
+                int num = Convert.ToInt32(txt_StartSN.Text);
+                int num2 = Convert.ToInt32(txt_EndSN.Text);
+                int num3 = Convert.ToInt32(txt_StartDaySN.Text);
+                int num4 = Convert.ToInt32(txt_MinSpecialSN.Text);
+                int num5 = Convert.ToInt32(txt_StartDHUIDSN.Text);
+                int num6 = Convert.ToInt32(txt_Date1.Text.Substring(0, 4)) % 2001;
+                int num7 = Convert.ToInt32(txt_Date1.Text.Substring(4, 2)) - 1;
+                int num8 = Convert.ToInt32(txt_Date1.Text.Substring(6, 2)) - 1;
+                if (Convert.ToInt32(txt_Date1.Text.Substring(0, 4)) < 2020)
+                {
+                    MessageBox.Show("鐢熶骇鏃ユ湡涓殑骞翠唤鏃╀簬褰撳墠骞翠唤锛�", "閿欒鎻愮ず", MessageBoxButton.OK, MessageBoxImage.Hand);
+                    return;
+                }
+                int num9 = Convert.ToInt32(txt_Date1.Text.Substring(0, 4)) % 2020;
+                GregorianCalendar gregorianCalendar = new GregorianCalendar();
+                DateTime time = DateTime.ParseExact(txt_Date1.Text, "yyyyMMdd", CultureInfo.CurrentCulture);
+                int weekOfYear = gregorianCalendar.GetWeekOfYear(time, CalendarWeekRule.FirstFullWeek, DayOfWeek.Monday);
+                int num10 = 0;
+                switch (time.DayOfWeek.ToString())
+                {
+                    case "Monday":
+                        num10 = 1;
+                        break;
+                    case "Tuesday":
+                        num10 = 2;
+                        break;
+                    case "Wednesday":
+                        num10 = 3;
+                        break;
+                    case "Thursday":
+                        num10 = 4;
+                        break;
+                    case "Friday":
+                        num10 = 5;
+                        break;
+                    case "Saturday":
+                        num10 = 6;
+                        break;
+                    case "Sunday":
+                        num10 = 7;
+                        break;
+                }
+                if (txt_StartSN.Text != null && txt_EndSN.Text != null && num <= num2 && txt_EndSN.Text.Length < 5)
+                {
+                    int num11 = num;
+                    int num12 = num3;
+                    int num13 = num4;
+                    int num14 = num5;
+                    while (num11 <= num2)
+                    {
+                        DataRow dataRow = null;
+                        DataInfo di = new DataInfo();
+                        if (num12.ToString().Length < 5 && num13.ToString().Length < 8 && num14.ToString().Length < 5)
+                        {
+                            string text = txt_PCODE.Text.Trim() + years[num6] + num13.ToString().PadLeft(7, '0');
+                            string text2 = HashPlus.GetHashMD5(text).ToUpper();
+                            text2 = text2.Substring(0, 8) + "-" + text2.Substring(8, 4) + "-" + text2.Substring(12, 4) + "-" + text2.Substring(16, 4) + "-" + text2.Substring(20, 12);
+                            string text3 = txt_SNPrefix.Text + num11.ToString().PadLeft(4, '0');
+                            string text4 = txt_PCODE.Text + txt_MachineCode.Text + txt_FactoryCode.Text + txt_LineNo1.Text + years[num6] + months[num7] + days[num8] + num12.ToString().PadLeft(4, '0') + num13.ToString().PadLeft(7, '0');
+                            string text5 = txt_VendorCode.Text + txt_PN.Text + years[num6] + months[num7] + days[num8] + txt_ShiftsNo.Text + num14.ToString().PadLeft(4, '0');
+                            string empty = string.Empty;
+                            empty = F18CY[num9] + weekOfYear.ToString().PadLeft(2, '0') + num10 + num12.ToString().PadLeft(4, '0');
+                            if (text3.Length != 14 && text4.Length != 24 && text5.Length != 24)
+                            {
+                                MessageBox.Show("MESSN / XDSN / DHUID闀垮害鏈夎锛岃妫�鏌ヨ緭鍏ョ殑鏁版嵁鏄惁鏈夎锛�", "Error", MessageBoxButton.OK, MessageBoxImage.Hand);
+                                return;
+                            }
+                            //dataRow["GUID"] = text2;
+                            //dataRow["Orderid"] = tbx_OrderID.Text.Trim();
+                            //dataRow["Model"] = cbox_Model.Text.Trim();
+                            //dataRow["MESSN"] = text3.Trim();
+                            //dataRow["XDSN"] = text4.Trim();
+                            //dataRow["DHUID"] = text5.Trim();
+                            //dataRow["ProductSN"] = empty.Trim();
+                            //dataRow["HW"] = txt_HW.Text.PadRight(16, '0').Trim();
+                            //dataRow["SW"] = txt_SW.Text.Trim();
+                            //dataRow["SXBL"] = txt_SXBL.Text.Trim();
+                            //dataRow["SXDI_SXBL"] = txt_SXDISXBL.Text.Trim();
+                            //dataRow["GeelyDU"] = txt_GeelyDU.Text.Trim();
+                            //dataRow["GeelyHWSD"] = txt_GeelyHWSD.Text.Trim();
+                            //dataRow["ECUDAPN"] = txt_VolvoDU.Text.Trim();
+                            //dataRow["ECUCAPN"] = txt_VolvoHWSD.Text.Trim();
+                            //dataRow["Status"] = 0;
+                            //dataRow["CreateTime"] = Convert.ToDateTime(DateTime.Now.ToString("G"));
+
+                            di.GUID = text2;
+                            di.OrderID = tbx_OrderID.Text.Trim();
+                            di.Model = cbox_Model.Text.Trim();
+                            di.MESSN = text3.Trim();
+                            di.XDSN = text4.Trim();
+                            di.DHUID = text5.Trim();
+                            di.ProductSN = empty.Trim();
+                            di.HW = txt_HW.Text.PadRight(16, '0').Trim();
+                            di.SW = txt_SW.Text.Trim();
+                            di.SXBL = txt_SXBL.Text.Trim();
+                            di.SXDI_SXBL = txt_SXDISXBL.Text.Trim();
+                            di.GeelyDU = txt_GeelyDU.Text.Trim();
+                            di.GeelyHWSD = txt_GeelyHWSD.Text.Trim();
+                            di.ECUDAPN = txt_VolvoDU.Text.Trim();
+                            di.ECUCAPN = txt_VolvoHWSD.Text.Trim();
+                            di.Status = 0;
+                            di.CreateTime = Convert.ToDateTime(DateTime.Now.ToString("G"));
+                            Datasource.Add(di);
+                            num11++;
+                            num12++;
+                            num13++;
+                            num14++;
+                            continue;
+                        }
+                        MessageBox.Show("鏃ユ祦姘村彿鎴栬繛缁彿浣嶆暟瓒呭嚭鑼冨洿", "閿欒鎻愮ず", MessageBoxButton.OK, MessageBoxImage.Hand);
+                        break;
+                    }
+                    //toolStripStatusLabel8.Text = $"{table.Rows.Count}琛�";
+                }
+                else
+                {
+                    MessageBox.Show("璇锋鏌ユ墍鏈夋枃鏈鏄惁鏈夊~鍐欙紝骞剁‘璁N鐨勬祦姘村彿鍙婁綅鏁版槸鍚︽湁璇�", "閿欒鎻愮ず", MessageBoxButton.OK, MessageBoxImage.Hand);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message, "閿欒鎻愮ず", MessageBoxButton.OK, MessageBoxImage.Hand);
+            }
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            SaveSettings(cbox_Model.Text, iniFile);
+            CreateSN();
+        }
+    }
+}
diff --git a/Plugin.SNGenerateTool/app.config b/Plugin.SNGenerateTool/app.config
new file mode 100644
index 0000000..1696df6
--- /dev/null
+++ b/Plugin.SNGenerateTool/app.config
@@ -0,0 +1,11 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>
\ No newline at end of file
diff --git a/Plugin.SNGenerateTool/packages.config b/Plugin.SNGenerateTool/packages.config
new file mode 100644
index 0000000..e6f2be1
--- /dev/null
+++ b/Plugin.SNGenerateTool/packages.config
@@ -0,0 +1,18 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Microsoft.Extensions.Configuration" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.Configuration.Abstractions" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.Configuration.FileExtensions" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.Configuration.Ini" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.FileProviders.Abstractions" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.FileProviders.Physical" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.FileSystemGlobbing" version="9.0.3" targetFramework="net472" />
+  <package id="Microsoft.Extensions.Primitives" version="9.0.3" targetFramework="net472" />
+  <package id="Panuon.WPF" version="1.1.3" targetFramework="net472" />
+  <package id="Panuon.WPF.UI" version="1.3.0.2" targetFramework="net472" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net472" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
+</packages>
\ No newline at end of file
diff --git a/Plugin.ServoManage/Plugin.ServoManage.csproj b/Plugin.ServoManage/Plugin.ServoManage.csproj
index 360b0aa..0f6e25d 100644
--- a/Plugin.ServoManage/Plugin.ServoManage.csproj
+++ b/Plugin.ServoManage/Plugin.ServoManage.csproj
@@ -134,9 +134,9 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HMI.Old\OPCInterface\OpcInterface\OpcInterface.csproj">
-      <Project>{e1464149-2c0a-499d-ab90-0c72e6ed1c53}</Project>
-      <Name>OpcInterface</Name>
+    <ProjectReference Include="..\..\ConnectionUtil\ConnectionUtil\ConnectionUtil.csproj">
+      <Project>{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}</Project>
+      <Name>ConnectionUtil</Name>
     </ProjectReference>
     <ProjectReference Include="..\HMI.Base\HMI.Base.csproj">
       <Project>{2a6f9720-a890-4036-9d73-41a0dae28341}</Project>
@@ -154,6 +154,10 @@
       <Project>{f17de6b5-af1d-48c6-94a0-6b763a6546a6}</Project>
       <Name>HMI.UI</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OPCClient\OPCClient.csproj">
+      <Project>{e5740bb5-9fc6-4a20-b7c2-cc90c281ed05}</Project>
+      <Name>OPCClient</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <WCFMetadata Include="Connected Services\" />
diff --git a/Plugin.ServoManage/ServoManage.xaml.cs b/Plugin.ServoManage/ServoManage.xaml.cs
index 39c557b..10e593d 100644
--- a/Plugin.ServoManage/ServoManage.xaml.cs
+++ b/Plugin.ServoManage/ServoManage.xaml.cs
@@ -1,10 +1,12 @@
-锘縰sing HMI.Base;
+锘縰sing ConnectionUtil;
+using HMI.Base;
 using HMI.Core.Entity;
 using HMI.Core.Manager;
 using HMI.Core.Setting;
 using HMI.Core.Util;
 using HMI.UI;
 using HMI.UI.Util;
+using OPCConnection;
 using Plugin.ServoManage.Entity;
 using System;
 using System.Collections.Generic;
@@ -91,7 +93,7 @@
         /// <summary>
         /// 瀹炰緥鍖栨湇鍔″櫒鎺ュ彛鍑芥暟
         /// </summary>
-        private OpcInterface.OpcInterface lTSCADAApi = new OpcInterface.OpcInterface();
+        private SCADAApi lTSCADAApi = new OPCClient();
         private bool isActived = false;
         private System.Timers.Timer motorMonitorTimer;
 
@@ -402,7 +404,8 @@
                     MsgBoxHelper2.Error(ex.Message);
                 }
             }
-            else {
+            else
+            {
                 motorMonitorTimer.Enabled = true;
             }
         }
diff --git a/Plugin.TestBuilder/Container/FunctionSetting.xaml b/Plugin.TestBuilder/Container/FunctionSetting.xaml
new file mode 100644
index 0000000..5544887
--- /dev/null
+++ b/Plugin.TestBuilder/Container/FunctionSetting.xaml
@@ -0,0 +1,44 @@
+锘�<UserControl x:Class="Plugin.TestBuilder.FunctionSetting"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Plugin.TestBuilder"
+             xmlns:pw="https://opensource.panuon.com/wpf"
+             xmlns:pu="https://opensource.panuon.com/wpf-ui"
+             xmlns:dd="urn:gong-wpf-dragdrop"
+             xmlns:m="clr-namespace:Plugin.TestBuilder.Model"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <pu:StyleDictionary Includes="TreeView"/>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
+    <Grid>
+        <TabControl>
+            <TabItem Header="鍑芥暟鍒楄〃">
+                <StackPanel>
+                    <!--<hc:SearchBar hc:InfoElement.Placeholder="杈撳叆鏂囨湰鏌ヨ"  Style="{StaticResource SearchBarPlus}" Margin="10,5,10,5"/>-->
+                    <TreeView ItemsSource="{Binding FuncModels}"
+                              Style="{StaticResource DefaultTreeView}"
+                              dd:DragDrop.IsDragSource="True"
+                                dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
+                                dd:DragDrop.UseDefaultDragAdorner="True"
+                                dd:DragDrop.DragHandler="{Binding dragHandler}">
+                        <TreeView.ItemTemplate>
+                            <HierarchicalDataTemplate DataType="{x:Type m:FuncModel}" ItemsSource="{Binding Path=Children}">
+                                <ContentControl Content="{Binding Name}"/>
+                            </HierarchicalDataTemplate>
+                        </TreeView.ItemTemplate>
+                    </TreeView>
+                </StackPanel>
+            </TabItem>
+            <TabItem Header="鍙橀噺鍒楄〃">
+            </TabItem>
+        </TabControl>
+    </Grid>
+</UserControl>
diff --git a/WPFProject/UI/Test/FunctionSetting.xaml.cs b/Plugin.TestBuilder/Container/FunctionSetting.xaml.cs
similarity index 76%
rename from WPFProject/UI/Test/FunctionSetting.xaml.cs
rename to Plugin.TestBuilder/Container/FunctionSetting.xaml.cs
index 45dd614..7f2b261 100644
--- a/WPFProject/UI/Test/FunctionSetting.xaml.cs
+++ b/Plugin.TestBuilder/Container/FunctionSetting.xaml.cs
@@ -1,25 +1,11 @@
-锘縰sing System;
-using System.Collections.Generic;
+锘縰sing Plugin.TestBuilder.Model;
+using Plugin.TestBuilder.UI;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
-using System.Linq;
 using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Xml.Serialization;
-using WPFProject.Models;
-using WPFProject.Utils;
 
-namespace WPFProject.UI.Test
+namespace Plugin.TestBuilder
 {
     /// <summary>
     /// FunctionSetting.xaml 鐨勪氦浜掗�昏緫
@@ -50,11 +36,11 @@
 
         public DdDragHandler dragHandler { get; set; } = new DdDragHandler();
 
-        private ObservableCollection<FuncModel> _FuncModels = new ObservableCollection<FuncModel>() { 
-        
-            new FuncModel(){ 
+        private ObservableCollection<FuncModel> _FuncModels = new ObservableCollection<FuncModel>() {
+
+            new FuncModel(){
                 Name = "111",
-                Children = new ObservableCollection<FuncModel>(){ 
+                Children = new ObservableCollection<FuncModel>(){
                     new FuncModel(){ Name = "1123"},
                     new FuncModel(){ Name = "1223"},
                 }
diff --git a/WPFProject/UI/Test/ProgramList.xaml b/Plugin.TestBuilder/Container/ProgramList.xaml
similarity index 62%
rename from WPFProject/UI/Test/ProgramList.xaml
rename to Plugin.TestBuilder/Container/ProgramList.xaml
index 8601d25..aef8888 100644
--- a/WPFProject/UI/Test/ProgramList.xaml
+++ b/Plugin.TestBuilder/Container/ProgramList.xaml
@@ -1,12 +1,12 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.ProgramList"
+锘�<UserControl x:Class="Plugin.TestBuilder.ProgramList"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.UI.Test"
-             xmlns:vm="clr-namespace:WPFProject.ViewModels"
+             xmlns:local="clr-namespace:Plugin.TestBuilder"
              xmlns:dd="urn:gong-wpf-dragdrop"
-             
+             xmlns:pw="https://opensource.panuon.com/wpf"
+             xmlns:pu="https://opensource.panuon.com/wpf-ui"
              mc:Ignorable="d" 
              HorizontalAlignment="Stretch"
              HorizontalContentAlignment="Stretch"
@@ -14,23 +14,19 @@
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="/WPFProject;component/Style/ListViewStyle.xaml"/>
+                <pu:StyleDictionary Includes="ListBox"/>
             </ResourceDictionary.MergedDictionaries>
-
-            <Style TargetType="Label"></Style>
         </ResourceDictionary>
     </UserControl.Resources>
-    
+
     <Grid>
-        <ListView ItemsSource="{Binding Programs}" ItemContainerStyle="{StaticResource a}" 
-                  VerticalContentAlignment="Center"
-        
+        <ListBox ItemsSource="{Binding Programs}" Style="{StaticResource DefaultListBox}" VerticalContentAlignment="Center"
                   SelectionChanged="ListView_SelectionChanged">
-            <ListView.ItemTemplate>
+            <ListBox.ItemTemplate>
                 <DataTemplate>
                     <ContentControl Content="{Binding Name}"/>
                 </DataTemplate>
-            </ListView.ItemTemplate>
-        </ListView>
+            </ListBox.ItemTemplate>
+        </ListBox>
     </Grid>
 </UserControl>
diff --git a/WPFProject/UI/Test/ProgramList.xaml.cs b/Plugin.TestBuilder/Container/ProgramList.xaml.cs
similarity index 93%
rename from WPFProject/UI/Test/ProgramList.xaml.cs
rename to Plugin.TestBuilder/Container/ProgramList.xaml.cs
index e8366aa..0c86bd8 100644
--- a/WPFProject/UI/Test/ProgramList.xaml.cs
+++ b/Plugin.TestBuilder/Container/ProgramList.xaml.cs
@@ -1,14 +1,11 @@
-锘縰sing System;
+锘縰sing Plugin.TestBuilder.Model;
+using System;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
-using System.IO;
 using System.Runtime.CompilerServices;
 using System.Windows.Controls;
-using System.Xml.Serialization;
-using WPFProject.Models;
-using WPFProject.Utils;
 
-namespace WPFProject.UI.Test
+namespace Plugin.TestBuilder
 {
     /// <summary>
     /// ProgramList.xaml 鐨勪氦浜掗�昏緫
diff --git a/WPFProject/UI/Test/SequnceList.xaml b/Plugin.TestBuilder/Container/SequnceList.xaml
similarity index 87%
rename from WPFProject/UI/Test/SequnceList.xaml
rename to Plugin.TestBuilder/Container/SequnceList.xaml
index 2a47d96..e3c3689 100644
--- a/WPFProject/UI/Test/SequnceList.xaml
+++ b/Plugin.TestBuilder/Container/SequnceList.xaml
@@ -1,10 +1,9 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.SequnceList"
+锘�<UserControl x:Class="Plugin.TestBuilder.SequnceList"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.UI.Test"
-             xmlns:hc="https://handyorg.github.io/handycontrol"
+             xmlns:local="clr-namespace:Plugin.TestBuilder"
              xmlns:dd="urn:gong-wpf-dragdrop"
              
              mc:Ignorable="d" 
@@ -12,18 +11,7 @@
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
-                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
-                <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
-                <ResourceDictionary Source="/HMI.UI;component/Style/WindowResources.xaml"/>
-                <ResourceDictionary Source="/WPFProject;component/Style/ListViewStyle.xaml"/>
-            </ResourceDictionary.MergedDictionaries>
-
-            <Style TargetType="Label"></Style>
-            <Style TargetType="ListView"></Style>
-
-            <Style TargetType="DataGridRow" x:Key="CommonRow" BasedOn="{StaticResource DataGridRowStyle}">
+            <Style TargetType="DataGridRow" x:Key="CommonRow">
                 <Setter Property="Margin" Value="0"/>
                 <Setter Property="Template">
                     <Setter.Value>
@@ -76,7 +64,7 @@
                 </Style.Triggers>
             </Style>
 
-            <Style TargetType="DataGridCell" x:Key="CommonCell" BasedOn="{StaticResource DataGridCellStyle}">
+            <Style TargetType="DataGridCell" x:Key="CommonCell">
                 <Setter Property="BorderBrush" Value="{Binding Path=HorizontalGridLinesBrush,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}"/>
                 <Setter Property="BorderThickness" Value="0,0,1,1"/>
                 <Setter Property="Padding" Value="0"/>
@@ -136,37 +124,36 @@
                 </Style.Triggers>
             </Style>
 
-            <Style TargetType="DataGrid" BasedOn="{StaticResource DataGridBaseStyle}">
+            <Style TargetType="DataGrid" BasedOn="{StaticResource DefaultDataGrid}">
                 <Setter Property="GridLinesVisibility" Value="None"/>
                 <Setter Property="HorizontalGridLinesBrush" Value="Gray"/>
                 <Setter Property="RowStyle" Value="{StaticResource CommonRow}"/>
                 <Setter Property="CellStyle" Value="{StaticResource CommonCell}"/>
                 <Setter Property="ColumnHeaderStyle" Value="{StaticResource CommonColumnHeader}"/>
-                <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
                 <Setter Property="RowHeight" Value="30"/>
             </Style>
         </ResourceDictionary>
     </UserControl.Resources>
-    
+
     <Grid>
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="3*"/>
+            <ColumnDefinition Width="2*"/>
             <ColumnDefinition Width="2"/>
-            <ColumnDefinition Width="7*"/>
+            <ColumnDefinition Width="8*"/>
         </Grid.ColumnDefinitions>
-        <ListView ItemContainerStyle="{StaticResource a}" ItemsSource="{Binding Sequences}" BorderThickness="0"
+        <ListBox ItemsSource="{Binding Sequences}" Style="{StaticResource DefaultListBox}" BorderThickness="0"
                   dd:DragDrop.IsDragSource="True"
                   dd:DragDrop.IsDropTarget="True"
                   dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
                   dd:DragDrop.UseDefaultDragAdorner="True"
                   SelectionChanged="ListView_SelectionChanged">
 
-            <ListView.ItemTemplate>
+            <ListBox.ItemTemplate>
                 <DataTemplate>
-                    <ContentControl Content="{Binding Name}"/>
+                    <ContentControl Cursor="Hand" Content="{Binding Name}"/>
                 </DataTemplate>
-            </ListView.ItemTemplate>
-        </ListView>
+            </ListBox.ItemTemplate>
+        </ListBox>
 
         <GridSplitter Grid.Column="1" Background="LightGray" HorizontalAlignment="Center" Width="2" ResizeDirection="Columns"/>
 
@@ -212,15 +199,6 @@
                     </DataGridTemplateColumn>
                 </DataGrid.Columns>
             </DataGrid>
-
-            <!--<ListView >
-                <ListView.View>
-                    <GridView>
-                        
-                    </GridView>
-                </ListView.View>
-            </ListView>-->
         </Grid>
-
     </Grid>
 </UserControl>
diff --git a/WPFProject/UI/Test/SequnceList.xaml.cs b/Plugin.TestBuilder/Container/SequnceList.xaml.cs
similarity index 94%
rename from WPFProject/UI/Test/SequnceList.xaml.cs
rename to Plugin.TestBuilder/Container/SequnceList.xaml.cs
index 19c8bb9..770235a 100644
--- a/WPFProject/UI/Test/SequnceList.xaml.cs
+++ b/Plugin.TestBuilder/Container/SequnceList.xaml.cs
@@ -1,16 +1,13 @@
-锘縰sing AIStudio.Wpf.Controls;
-using GongSolutions.Wpf.DragDrop;
+锘縰sing GongSolutions.Wpf.DragDrop;
+using Plugin.TestBuilder.Model;
+using Plugin.TestBuilder.UI;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Runtime.CompilerServices;
 using System.Windows.Controls;
-using WPFProject.Models;
-using WPFProject.Utils;
 
-namespace WPFProject.UI.Test
+namespace Plugin.TestBuilder
 {
-
-
     /// <summary>
     /// SequnceList.xaml 鐨勪氦浜掗�昏緫
     /// </summary>
diff --git a/Plugin.TestBuilder/Container/StepSetting.xaml b/Plugin.TestBuilder/Container/StepSetting.xaml
new file mode 100644
index 0000000..1f0a71e
--- /dev/null
+++ b/Plugin.TestBuilder/Container/StepSetting.xaml
@@ -0,0 +1,31 @@
+锘�<UserControl x:Class="Plugin.TestBuilder.StepSetting"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Plugin.TestBuilder"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <Style TargetType="Label"></Style>
+            <Style TargetType="ListView"></Style>
+            <Style TargetType="TabControl"/>
+
+            <Color x:Key="DarkPrimaryColor">#e17933</Color>
+            <Color x:Key="PrimaryColor">#e17933</Color>
+            <Color x:Key="PrimaryTextColor">#e17933</Color>
+            <Color x:Key="SecondaryTitleColor">#e17933</Color>
+            <Color x:Key="BorderColor">#e17933</Color>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    
+    <Grid>
+        <TabControl TabStripPlacement="Left">
+            <TabItem Header="鍑芥暟鍒楄〃">
+            </TabItem>
+            <TabItem Header="鍙橀噺鍒楄〃">
+            </TabItem>
+        </TabControl>
+    </Grid>
+</UserControl>
diff --git a/Plugin.TestBuilder/Container/StepSetting.xaml.cs b/Plugin.TestBuilder/Container/StepSetting.xaml.cs
new file mode 100644
index 0000000..345ff9d
--- /dev/null
+++ b/Plugin.TestBuilder/Container/StepSetting.xaml.cs
@@ -0,0 +1,15 @@
+锘縰sing System.Windows.Controls;
+
+namespace Plugin.TestBuilder
+{
+    /// <summary>
+    /// StepSetting.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
+    public partial class StepSetting : UserControl
+    {
+        public StepSetting()
+        {
+            InitializeComponent();
+        }
+    }
+}
diff --git a/WPFProject/Models/CanvasPosition.cs b/Plugin.TestBuilder/Entity/CanvasPosition.cs
similarity index 88%
rename from WPFProject/Models/CanvasPosition.cs
rename to Plugin.TestBuilder/Entity/CanvasPosition.cs
index 7795470..8fdf7f0 100644
--- a/WPFProject/Models/CanvasPosition.cs
+++ b/Plugin.TestBuilder/Entity/CanvasPosition.cs
@@ -1,4 +1,4 @@
-锘縩amespace WPFProject.Models
+锘縩amespace Plugin.TestBuilder.Entity
 {
     public class CanvasPosition
     {
diff --git a/WPFProject/Models/FuncModel.cs b/Plugin.TestBuilder/Model/FuncModel.cs
similarity index 61%
rename from WPFProject/Models/FuncModel.cs
rename to Plugin.TestBuilder/Model/FuncModel.cs
index c247261..fe58c6b 100644
--- a/WPFProject/Models/FuncModel.cs
+++ b/Plugin.TestBuilder/Model/FuncModel.cs
@@ -1,6 +1,7 @@
-锘縰sing System.Collections.ObjectModel;
+锘縰sing HMI.Core.Entity;
+using System.Collections.ObjectModel;
 
-namespace WPFProject.Models
+namespace Plugin.TestBuilder.Model
 {
     public class FuncModel : NotifyBase 
     {
@@ -9,7 +10,7 @@
 		public string Name
 		{
 			get { return _Name; }
-			set => RaiseAndSetIfChanged(ref _Name, value);
+			set => Set(ref _Name, value);
 		}
 
 		private ObservableCollection<FuncModel> _Children;
@@ -17,7 +18,7 @@
 		public ObservableCollection<FuncModel> Children
 		{
 			get { return _Children; }
-			set => RaiseAndSetIfChanged(ref _Children, value);
+			set => Set(ref _Children, value);
 		}
 
 	}
diff --git a/WPFProject/Models/Program.cs b/Plugin.TestBuilder/Model/Program.cs
similarity index 87%
rename from WPFProject/Models/Program.cs
rename to Plugin.TestBuilder/Model/Program.cs
index e448dfd..c081722 100644
--- a/WPFProject/Models/Program.cs
+++ b/Plugin.TestBuilder/Model/Program.cs
@@ -1,11 +1,9 @@
-锘縰sing System;
+锘縰sing HMI.Core.Entity;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Xml.Serialization;
-using HMI.Core.Api;
-using HMI.Core.Entity;
 
-namespace WPFProject.Models
+namespace Plugin.TestBuilder.Model
 {
     public class Program : NotifyBase
     {
@@ -16,7 +14,7 @@
         public string Name
         {
             get { return _Name; }
-            set => RaiseAndSetIfChanged(ref _Name, value);
+            set => Set(ref _Name, value);
         }
 
         /// <summary>
@@ -26,7 +24,7 @@
         public ObservableCollection<Sequence> Sequences
         {
             get { return _Sequences; }
-            set => RaiseAndSetIfChanged(ref _Sequences, value);
+            set => Set(ref _Sequences, value);
         }
 
         /// <summary>
@@ -36,7 +34,7 @@
         public ObservableCollection<Variable> Variables
         {
             get { return _Variables; }
-            set => RaiseAndSetIfChanged(ref _Variables, value);
+            set => Set(ref _Variables, value);
         }
 
         /// <summary>
diff --git a/WPFProject/Models/Sequence.cs b/Plugin.TestBuilder/Model/Sequence.cs
similarity index 84%
rename from WPFProject/Models/Sequence.cs
rename to Plugin.TestBuilder/Model/Sequence.cs
index 52b1492..3c6c553 100644
--- a/WPFProject/Models/Sequence.cs
+++ b/Plugin.TestBuilder/Model/Sequence.cs
@@ -1,7 +1,8 @@
-锘縰sing System.Collections.ObjectModel;
+锘縰sing HMI.Core.Entity;
+using System.Collections.ObjectModel;
 using System.Xml.Serialization;
 
-namespace WPFProject.Models
+namespace Plugin.TestBuilder.Model
 {
     public class Sequence : NotifyBase
     {
@@ -10,7 +11,7 @@
         public string Name
         {
             get { return _Name; }
-            set => RaiseAndSetIfChanged(ref _Name, value);
+            set => Set(ref _Name, value);
         }
 
         [XmlIgnore]
@@ -20,7 +21,7 @@
         public ObservableCollection<Step> Steps
         {
             get { return _Steps; }
-            set => RaiseAndSetIfChanged(ref _Steps, value);
+            set => Set(ref _Steps, value);
         }
 
         public Sequence AddStep(params Step[] steps)
diff --git a/WPFProject/Models/Step.cs b/Plugin.TestBuilder/Model/Step.cs
similarity index 79%
rename from WPFProject/Models/Step.cs
rename to Plugin.TestBuilder/Model/Step.cs
index e07959b..6dc9c6e 100644
--- a/WPFProject/Models/Step.cs
+++ b/Plugin.TestBuilder/Model/Step.cs
@@ -1,10 +1,9 @@
-锘縰sing System;
+锘縰sing HMI.Core.Entity;
 using System.Collections.Generic;
 using System.Reflection;
 using System.Xml.Serialization;
-using HMI.Core.Api;
 
-namespace WPFProject.Models
+namespace Plugin.TestBuilder.Model
 {
     public class Step : NotifyBase
     {
@@ -21,42 +20,42 @@
         public int Index
         {
             get { return _Index; }
-            set => RaiseAndSetIfChanged(ref _Index, value);
+            set => Set(ref _Index, value);
         }
 
         private string _Name;
         public string Name
         {
             get { return _Name; }
-            set => RaiseAndSetIfChanged(ref _Name, value);
+            set => Set(ref _Name, value);
         }
 
         private string _DllPath = "C:/Users/cheng/source/repos/WPFProject/VisionBuilder.Test/bin/Debug/VisionBuilder.Test.dll";
         public string DllPath
         {
             get { return _DllPath; }
-            set => RaiseAndSetIfChanged(ref _DllPath, value);
+            set => Set(ref _DllPath, value);
         }
 
         private string _ClassName = "VisionBuilder.Test.PluginOne";
         public string ClassName
         {
             get { return _ClassName; }
-            set => RaiseAndSetIfChanged(ref _ClassName, value);
+            set => Set(ref _ClassName, value);
         }
 
         private string _MethodName;
         public string MethodName
         {
             get { return _MethodName; }
-            set => RaiseAndSetIfChanged(ref _MethodName, value);
+            set => Set(ref _MethodName, value);
         }
 
         private string _Description;
         public string Description
         {
             get { return _Description; }
-            set => RaiseAndSetIfChanged(ref _Description, value);
+            set => Set(ref _Description, value);
         }
 
         #endregion
diff --git a/WPFProject/Models/Variable.cs b/Plugin.TestBuilder/Model/Variable.cs
similarity index 74%
rename from WPFProject/Models/Variable.cs
rename to Plugin.TestBuilder/Model/Variable.cs
index ea05141..f523f75 100644
--- a/WPFProject/Models/Variable.cs
+++ b/Plugin.TestBuilder/Model/Variable.cs
@@ -1,12 +1,8 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Policy;
-using System.Text;
-using System.Threading.Tasks;
+锘縰sing HMI.Core.Entity;
+using System;
 using System.Xml.Serialization;
 
-namespace WPFProject.Models
+namespace Plugin.TestBuilder.Model
 {
     public class Variable : NotifyBase
     {
@@ -17,7 +13,7 @@
         public string Name
         {
             get { return _Name; }
-            set => RaiseAndSetIfChanged(ref _Name, value);
+            set => Set(ref _Name, value);
         }
 
         /// <summary>
@@ -29,7 +25,7 @@
             get { return _TypeName; }
             set
             {
-                RaiseAndSetIfChanged(ref _TypeName, value);
+                Set(ref _TypeName, value);
                 Type = value == null ? null : Type.GetType(value);
             }
         }
@@ -44,7 +40,7 @@
         public string ValueStr
         {
             get { return _ValueStr; }
-            set => RaiseAndSetIfChanged(ref _ValueStr, value);
+            set => Set(ref _ValueStr, value);
         }
 
         /// <summary>
diff --git a/Plugin.TestBuilder/Plugin.TestBuilder.csproj b/Plugin.TestBuilder/Plugin.TestBuilder.csproj
new file mode 100644
index 0000000..3e28746
--- /dev/null
+++ b/Plugin.TestBuilder/Plugin.TestBuilder.csproj
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{30201EC1-9A82-48DB-94B9-BD5C1190228B}</ProjectGuid>
+    <OutputType>library</OutputType>
+    <RootNamespace>Plugin.TestBuilder</RootNamespace>
+    <AssemblyName>Plugin.TestBuilder</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="GongSolutions.WPF.DragDrop, Version=4.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\gong-wpf-dragdrop.4.0.0\lib\net462\GongSolutions.WPF.DragDrop.dll</HintPath>
+    </Reference>
+    <Reference Include="log4net, Version=3.0.4.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\log4net.3.0.4\lib\net462\log4net.dll</HintPath>
+    </Reference>
+    <Reference Include="Panuon.WPF, Version=1.1.2.2, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Panuon.WPF.1.1.3\lib\net472\Panuon.WPF.dll</HintPath>
+    </Reference>
+    <Reference Include="Panuon.WPF.UI, Version=1.3.0.2, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\WPFProject\packages\Panuon.WPF.UI.1.3.0.2\lib\net472\Panuon.WPF.UI.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="Container\FunctionSetting.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Workspace.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="UI\BottomBar.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="UI\InnerWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="UI\MinInnerWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Container\ProgramList.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Container\SequnceList.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Container\StepSetting.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="TestBuilder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="Entity\CanvasPosition.cs" />
+    <Compile Include="Model\FuncModel.cs" />
+    <Compile Include="Model\Program.cs" />
+    <Compile Include="Model\Sequence.cs" />
+    <Compile Include="Model\Step.cs" />
+    <Compile Include="Model\Variable.cs" />
+    <Compile Include="Workspace.xaml.cs">
+      <DependentUpon>Workspace.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UI\BottomBar.xaml.cs">
+      <DependentUpon>BottomBar.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UI\CanvasHelper.cs" />
+    <Compile Include="Container\FunctionSetting.xaml.cs">
+      <DependentUpon>FunctionSetting.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UI\DdDragHandler.cs" />
+    <Compile Include="UI\DdDropHandler.cs" />
+    <Compile Include="UI\InnerWindow.xaml.cs">
+      <DependentUpon>InnerWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UI\MinInnerWindow.xaml.cs">
+      <DependentUpon>MinInnerWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Container\ProgramList.xaml.cs">
+      <DependentUpon>ProgramList.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UI\Resize.cs" />
+    <Compile Include="Container\SequnceList.xaml.cs">
+      <DependentUpon>SequnceList.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Container\StepSetting.xaml.cs">
+      <DependentUpon>StepSetting.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="TestBuilder.xaml.cs">
+      <DependentUpon>TestBuilder.xaml</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HMI.Base\HMI.Base.csproj">
+      <Project>{2a6f9720-a890-4036-9d73-41a0dae28341}</Project>
+      <Name>HMI.Base</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HMI.Core\HMI.Core.csproj">
+      <Project>{3e3bf44a-0b69-45c5-9512-528cb48a7106}</Project>
+      <Name>HMI.Core</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HMI.UI\HMI.UI.csproj">
+      <Project>{f17de6b5-af1d-48c6-94a0-6b763a6546a6}</Project>
+      <Name>HMI.UI</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HMI.Util\HMI.Util.csproj">
+      <Project>{afea100a-9223-448d-ab10-3015d93dd98c}</Project>
+      <Name>HMI.Util</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/Plugin.TestBuilder/Properties/AssemblyInfo.cs b/Plugin.TestBuilder/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..052fd07
--- /dev/null
+++ b/Plugin.TestBuilder/Properties/AssemblyInfo.cs
@@ -0,0 +1,52 @@
+锘縰sing System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
+[assembly: AssemblyTitle("Plugin.TestBuilder")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Plugin.TestBuilder")]
+[assembly: AssemblyCopyright("Copyright 漏  2025")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆�
+[assembly: ComVisible(false)]
+
+//鑻ヨ寮�濮嬬敓鎴愬彲鏈湴鍖栫殑搴旂敤绋嬪簭锛岃璁剧疆
+//.csproj 鏂囦欢涓殑 <UICulture>CultureYouAreCodingWith</UICulture>
+//鍦� <PropertyGroup> 涓�備緥濡傦紝濡傛灉浣犱娇鐢ㄧ殑鏄編鍥借嫳璇��
+//浣跨敤鐨勬槸缇庡浗鑻辫锛岃灏� <UICulture> 璁剧疆涓� en-US銆�  鐒跺悗鍙栨秷
+//瀵逛互涓� NeutralResourceLanguage 鐗规�х殑娉ㄩ噴銆�  鏇存柊
+//浠ヤ笅琛屼腑鐨勨�渆n-US鈥濅互鍖归厤椤圭洰鏂囦欢涓殑 UICulture 璁剧疆銆�
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly:ThemeInfo(
+    ResourceDictionaryLocation.None, //涓婚鐗瑰畾璧勬簮璇嶅吀鎵�澶勪綅缃�
+                             //(鏈湪椤甸潰涓壘鍒拌祫婧愭椂浣跨敤锛�
+                             //鎴栧簲鐢ㄧ▼搴忚祫婧愬瓧鍏镐腑鎵惧埌鏃朵娇鐢�)
+    ResourceDictionaryLocation.SourceAssembly //甯歌璧勬簮璇嶅吀鎵�澶勪綅缃�
+                                      //(鏈湪椤甸潰涓壘鍒拌祫婧愭椂浣跨敤锛�
+                                      //銆佸簲鐢ㄧ▼搴忔垨浠讳綍涓婚涓撶敤璧勬簮瀛楀吀涓壘鍒版椂浣跨敤)
+)]
+
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�: 
+//
+//      涓荤増鏈�
+//      娆$増鏈�
+//      鐢熸垚鍙�
+//      淇鍙�
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Plugin.TestBuilder/Properties/Resources.Designer.cs b/Plugin.TestBuilder/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..7900792
--- /dev/null
+++ b/Plugin.TestBuilder/Properties/Resources.Designer.cs
@@ -0,0 +1,62 @@
+锘�//------------------------------------------------------------------------------
+// <auto-generated>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//     杩愯鏃剁増鏈�: 4.0.30319.42000
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
+//     閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Plugin.TestBuilder.Properties {
+    
+    
+    /// <summary>
+    ///   寮虹被鍨嬭祫婧愮被锛岀敤浜庢煡鎵炬湰鍦板寲瀛楃涓茬瓑銆�
+    /// </summary>
+    // 姝ょ被鏄敱 StronglyTypedResourceBuilder
+    // 绫婚�氳繃绫讳技浜� ResGen 鎴� Visual Studio 鐨勫伐鍏疯嚜鍔ㄧ敓鎴愮殑銆�
+    // 鑻ヨ娣诲姞鎴栫Щ闄ゆ垚鍛橈紝璇风紪杈� .ResX 鏂囦欢锛岀劧鍚庨噸鏂拌繍琛� ResGen
+    // (浠� /str 浣滀负鍛戒护閫夐」)锛屾垨閲嶆柊鐢熸垚 VS 椤圭洰銆�
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   杩斿洖姝ょ被浣跨敤鐨勭紦瀛� ResourceManager 瀹炰緥銆�
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if ((resourceMan == null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Plugin.TestBuilder.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   閲嶅啓褰撳墠绾跨▼鐨� CurrentUICulture 灞炴�э紝瀵�
+        ///   浣跨敤姝ゅ己绫诲瀷璧勬簮绫荤殑鎵�鏈夎祫婧愭煡鎵炬墽琛岄噸鍐欍��
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}
diff --git a/WPFProject/Forms/Form1.resx b/Plugin.TestBuilder/Properties/Resources.resx
similarity index 89%
copy from WPFProject/Forms/Form1.resx
copy to Plugin.TestBuilder/Properties/Resources.resx
index 1af7de1..af7dbeb 100644
--- a/WPFProject/Forms/Form1.resx
+++ b/Plugin.TestBuilder/Properties/Resources.resx
@@ -46,7 +46,7 @@
     
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
     
     mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,7 +60,6 @@
             : and then encoded with base64 encoding.
     -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
         <xsd:choice maxOccurs="unbounded">
@@ -69,10 +68,9 @@
               <xsd:sequence>
                 <xsd:element name="value" type="xsd:string" minOccurs="0" />
               </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
               <xsd:attribute name="type" type="xsd:string" />
               <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="assembly">
@@ -87,10 +85,9 @@
                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
           <xsd:element name="resheader">
@@ -112,9 +109,9 @@
     <value>2.0</value>
   </resheader>
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
 </root>
\ No newline at end of file
diff --git a/Plugin.TestBuilder/Properties/Settings.Designer.cs b/Plugin.TestBuilder/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..72b0451
--- /dev/null
+++ b/Plugin.TestBuilder/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+锘�//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Plugin.TestBuilder.Properties
+{
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}
diff --git a/Plugin.TestBuilder/Properties/Settings.settings b/Plugin.TestBuilder/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/Plugin.TestBuilder/Properties/Settings.settings
@@ -0,0 +1,7 @@
+锘�<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
\ No newline at end of file
diff --git a/Plugin.TestBuilder/TestBuilder.xaml b/Plugin.TestBuilder/TestBuilder.xaml
new file mode 100644
index 0000000..996c7c8
--- /dev/null
+++ b/Plugin.TestBuilder/TestBuilder.xaml
@@ -0,0 +1,30 @@
+锘�<hb:PluginControl x:Class="Plugin.TestBuilder.TestBuilder"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
+             xmlns:pw="https://opensource.panuon.com/wpf"
+             xmlns:pu="https://opensource.panuon.com/wpf-ui"
+             xmlns:ui="clr-namespace:Plugin.TestBuilder.UI"
+             mc:Ignorable="d"
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <pu:StyleDictionary Includes="ListBox"/>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
+    <Grid>
+        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
+            <Canvas x:Name="WorkArea" Background="{StaticResource CommonBoarder}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                <!--<vt:ProgramList BorderThickness="1" BorderBrush="#000" Canvas.Left="335" Canvas.Top="121" utils:Resize.IsResizeable="True"></vt:ProgramList>
+            <vt:ProgramList BorderThickness="1" BorderBrush="#000" Canvas.Left="600" Canvas.Top="121" FocusableChanged="ProgramList_FocusableChanged"></vt:ProgramList>-->
+
+                <ui:BottomBar x:Name="BottomBar" Canvas.Bottom="0" Panel.ZIndex="9999999"/>
+            </Canvas>
+        </ScrollViewer>
+    </Grid>
+</hb:PluginControl>
diff --git a/WPFProject/UI/WorkControl.xaml.cs b/Plugin.TestBuilder/TestBuilder.xaml.cs
similarity index 62%
copy from WPFProject/UI/WorkControl.xaml.cs
copy to Plugin.TestBuilder/TestBuilder.xaml.cs
index 725407c..9907291 100644
--- a/WPFProject/UI/WorkControl.xaml.cs
+++ b/Plugin.TestBuilder/TestBuilder.xaml.cs
@@ -1,22 +1,20 @@
-锘縰sing System;
+锘縰sing HMI.Base;
+using Plugin.TestBuilder.Entity;
+using Plugin.TestBuilder.UI;
+using System;
 using System.Collections.Generic;
 using System.Windows;
 using System.Windows.Controls;
-using HMI.Base;
-using log4net;
-using WPFProject.Controls;
-using WPFProject.Models;
-using WPFProject.Utils;
+using System.Windows.Media;
 
-namespace WPFProject.UI
+namespace Plugin.TestBuilder
 {
     /// <summary>
     /// WorkControl.xaml 鐨勪氦浜掗�昏緫
     /// </summary>
-    public partial class WorkControl : PluginControl
+    public partial class TestBuilder : PluginControl
     {
-        private ILog log;
-        public WorkControl()
+        public TestBuilder()
         {
             InitializeComponent();
             Loaded += UserControl_Loaded;
@@ -69,49 +67,49 @@
 
         private void UserControl_Loaded(object sender, RoutedEventArgs e)
         {
-            //List<CanvasPosition> pos = InitGridSize();
-            //ProgramList programList = new ProgramList();
-            //InnerWindow p = new InnerWindow(pos[0])
-            //{
-            //    Title = "绋嬪簭鍒楄〃",
-            //    Content = programList
-            //};
-            //HandleInnerWindow(p);
+            List<CanvasPosition> pos = InitGridSize();
+            ProgramList programList = new ProgramList();
+            InnerWindow p = new InnerWindow(pos[0])
+            {
+                Title = "绋嬪簭鍒楄〃",
+                Content = programList
+            };
+            HandleInnerWindow(p);
 
-            //InnerWindow p1 = new InnerWindow(pos[1])
-            //{
-            //    Title = "鍥剧墖",
-            //};
-            //HandleInnerWindow(p1);
+            InnerWindow p1 = new InnerWindow(pos[1])
+            {
+                Title = "鍥剧墖"
+            };
+            HandleInnerWindow(p1);
 
-            //SequnceList sequnceList = new SequnceList();
-            //programList.ProgramChanged += sequnceList.Selected_Program_Changed;
+            SequnceList sequnceList = new SequnceList();
+            programList.ProgramChanged += sequnceList.Selected_Program_Changed;
 
-            //InnerWindow p2 = new InnerWindow(pos[2])
-            //{
-            //    Title = "搴忓垪",
-            //    Content = sequnceList
-            //};
-            //HandleInnerWindow(p2);
+            InnerWindow p2 = new InnerWindow(pos[2])
+            {
+                Title = "搴忓垪",
+                Content = sequnceList
+            };
+            HandleInnerWindow(p2);
 
-            //FunctionSetting functionSetting = new FunctionSetting();
-            //InnerWindow p3 = new InnerWindow(pos[3])
-            //{
-            //    Title = "鍑芥暟",
-            //    Content = functionSetting
-            //};
-            //HandleInnerWindow(p3);
+            FunctionSetting functionSetting = new FunctionSetting();
+            InnerWindow p3 = new InnerWindow(pos[3])
+            {
+                Title = "鍑芥暟",
+                Content = functionSetting
+            };
+            HandleInnerWindow(p3);
 
-            //StepSetting stepSetting = new StepSetting();
-            //InnerWindow p4 = new InnerWindow(pos[4])
-            //{
-            //    Title = "鍗曟璁剧疆",
-            //    Content = stepSetting
-            //};
-            //HandleInnerWindow(p4);
+            StepSetting stepSetting = new StepSetting();
+            InnerWindow p4 = new InnerWindow(pos[4])
+            {
+                Title = "鍗曟璁剧疆",
+                Content = stepSetting
+            };
+            HandleInnerWindow(p4);
 
 
-            //SizeChanged += WorkControl_SizeChanged;
+            SizeChanged += WorkControl_SizeChanged;
             Loaded -= UserControl_Loaded;
 
         }
@@ -199,30 +197,30 @@
         /// <param name="e"></param>
         private void WorkControl_SizeChanged(object sender, SizeChangedEventArgs e)
         {
-            //Size newSize = e.NewSize;
-            //Size previousSize = e.PreviousSize;
+            Size newSize = e.NewSize;
+            Size previousSize = e.PreviousSize;
 
-            //double xRate = newSize.Width / previousSize.Width;
-            //double yRate = newSize.Height / previousSize.Height;
-            //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
-            //{
-            //    UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
-            //    Canvas.SetLeft(child, Canvas.GetLeft(child) * xRate);
-            //    Canvas.SetTop(child, Canvas.GetTop(child) * yRate);
-            //}
+            double xRate = newSize.Width / previousSize.Width;
+            double yRate = newSize.Height / previousSize.Height;
+            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
+            {
+                UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
+                Canvas.SetLeft(child, Canvas.GetLeft(child) * xRate);
+                Canvas.SetTop(child, Canvas.GetTop(child) * yRate);
+            }
 
-            //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
-            //{
-            //    UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
-            //    if (Canvas.GetLeft(child) >= newSize.Width)
-            //    {
-            //        Canvas.SetLeft(child, Canvas.GetLeft(child) + newSize.Width - previousSize.Width);
-            //    }
-            //    if (Canvas.GetTop(child) >= newSize.Height)
-            //    {
-            //        Canvas.SetTop(child, Canvas.GetTop(child) + newSize.Height - previousSize.Height);
-            //    }
-            //}
+            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
+            {
+                UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
+                if (Canvas.GetLeft(child) >= newSize.Width)
+                {
+                    Canvas.SetLeft(child, Canvas.GetLeft(child) + newSize.Width - previousSize.Width);
+                }
+                if (Canvas.GetTop(child) >= newSize.Height)
+                {
+                    Canvas.SetTop(child, Canvas.GetTop(child) + newSize.Height - previousSize.Height);
+                }
+            }
         }
         #endregion
 
@@ -264,50 +262,5 @@
         }
         #endregion
 
-        public void OnTabChange(object sender, SelectionChangedEventArgs args)
-        {
-            if (args.AddedItems.Count > 0)
-            {
-                IconTabItem newTab = args.AddedItems[0] as IconTabItem;
-                if (newTab != null && newTab.Content == this)
-                {
-
-                }
-            }
-
-            if (args.RemovedItems.Count > 0)
-            {
-                IconTabItem oldTab = args.RemovedItems[0] as IconTabItem;
-                if (oldTab != null && oldTab.Content == this)
-                {
-
-                }
-            }
-        }
-
-        public object Active()
-        {
-            return null;
-        }
-
-        public object DeActive()
-        {
-            return null;
-        }
-
-        public void OnTabChange(object sender, object args)
-        {
-
-        }
-
-        public object Init()
-        {
-            return null;
-        }
-
-        public void SetLogger(ILog logger)
-        {
-            log = logger;
-        }
     }
 }
\ No newline at end of file
diff --git a/WPFProject/UI/BottomBar.xaml b/Plugin.TestBuilder/UI/BottomBar.xaml
similarity index 79%
rename from WPFProject/UI/BottomBar.xaml
rename to Plugin.TestBuilder/UI/BottomBar.xaml
index 4cc1152..7116db2 100644
--- a/WPFProject/UI/BottomBar.xaml
+++ b/Plugin.TestBuilder/UI/BottomBar.xaml
@@ -1,10 +1,9 @@
-锘�<UserControl x:Class="WPFProject.UI.BottomBar"
+锘�<UserControl x:Class="Plugin.TestBuilder.UI.BottomBar"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.UI"
-             xmlns:ctls="clr-namespace:WPFProject.Controls"
+             xmlns:local="clr-namespace:Plugin.TestBuilder.UI"
              mc:Ignorable="d" 
              d:DesignHeight="30" d:DesignWidth="800">
     <ScrollViewer HorizontalScrollBarVisibility="Auto" Background="Transparent" VerticalScrollBarVisibility="Hidden">
diff --git a/WPFProject/UI/BottomBar.xaml.cs b/Plugin.TestBuilder/UI/BottomBar.xaml.cs
similarity index 92%
rename from WPFProject/UI/BottomBar.xaml.cs
rename to Plugin.TestBuilder/UI/BottomBar.xaml.cs
index fccca99..dfa725f 100644
--- a/WPFProject/UI/BottomBar.xaml.cs
+++ b/Plugin.TestBuilder/UI/BottomBar.xaml.cs
@@ -1,8 +1,7 @@
 锘縰sing System.Windows;
 using System.Windows.Controls;
-using WPFProject.Controls;
 
-namespace WPFProject.UI
+namespace Plugin.TestBuilder.UI
 {
     /// <summary>
     /// BottomBar.xaml 鐨勪氦浜掗�昏緫
diff --git a/WPFProject/Utils/CanvasHelper.cs b/Plugin.TestBuilder/UI/CanvasHelper.cs
similarity index 90%
rename from WPFProject/Utils/CanvasHelper.cs
rename to Plugin.TestBuilder/UI/CanvasHelper.cs
index 246f2a4..1778663 100644
--- a/WPFProject/Utils/CanvasHelper.cs
+++ b/Plugin.TestBuilder/UI/CanvasHelper.cs
@@ -1,10 +1,8 @@
 锘縰sing System;
 using System.Windows;
-using System.Windows.Controls;
 using System.Windows.Media;
-using WPFProject.Controls;
 
-namespace WPFProject.Utils
+namespace Plugin.TestBuilder.UI
 {
     public class CanvasHelper
     {
diff --git a/WPFProject/Utils/DdDragHandler.cs b/Plugin.TestBuilder/UI/DdDragHandler.cs
similarity index 62%
rename from WPFProject/Utils/DdDragHandler.cs
rename to Plugin.TestBuilder/UI/DdDragHandler.cs
index 0b7ddef..cbf479a 100644
--- a/WPFProject/Utils/DdDragHandler.cs
+++ b/Plugin.TestBuilder/UI/DdDragHandler.cs
@@ -1,13 +1,7 @@
 锘縰sing GongSolutions.Wpf.DragDrop;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using WPFProject.Models;
+using Plugin.TestBuilder.Model;
 
-namespace WPFProject.Utils
+namespace Plugin.TestBuilder.UI
 {
     public class DdDragHandler : DefaultDragHandler
     {
diff --git a/WPFProject/Utils/DdDropHandler.cs b/Plugin.TestBuilder/UI/DdDropHandler.cs
similarity index 95%
rename from WPFProject/Utils/DdDropHandler.cs
rename to Plugin.TestBuilder/UI/DdDropHandler.cs
index 6b60a8d..3ee87bf 100644
--- a/WPFProject/Utils/DdDropHandler.cs
+++ b/Plugin.TestBuilder/UI/DdDropHandler.cs
@@ -1,16 +1,13 @@
 锘縰sing GongSolutions.Wpf.DragDrop;
 using GongSolutions.Wpf.DragDrop.Utilities;
-using System.Collections.Generic;
-using System.ComponentModel;
+using Plugin.TestBuilder.Model;
 using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Markup;
-using System.Linq;
-using System.Collections;
-using WPFProject.Models;
 
-namespace WPFProject.Utils
+namespace Plugin.TestBuilder.UI
 {
     public class DdDropHandler : DefaultDropHandler
     {
diff --git a/WPFProject/Controls/InnerWindow.xaml b/Plugin.TestBuilder/UI/InnerWindow.xaml
similarity index 79%
rename from WPFProject/Controls/InnerWindow.xaml
rename to Plugin.TestBuilder/UI/InnerWindow.xaml
index a3c832e..9163890 100644
--- a/WPFProject/Controls/InnerWindow.xaml
+++ b/Plugin.TestBuilder/UI/InnerWindow.xaml
@@ -1,10 +1,9 @@
-锘�<UserControl x:Class="WPFProject.Controls.InnerWindow"
+锘�<UserControl x:Class="Plugin.TestBuilder.UI.InnerWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.Controls"
-             
+             xmlns:local="clr-namespace:Plugin.TestBuilder.UI"
              mc:Ignorable="d" 
              HorizontalAlignment="Stretch"
              HorizontalContentAlignment="Stretch"
@@ -22,8 +21,8 @@
                 <Setter Property="Template">
                     <Setter.Value>
                         <ControlTemplate>
-                            <Label VerticalContentAlignment="Center" 
-                                   Background="{StaticResource ChildBorder}" Foreground="{Binding HeaderFontColor}" Content="{Binding Title}"/>
+                            <Label VerticalContentAlignment="Center"
+                                   Foreground="{Binding HeaderFontColor}" Content="{Binding Title}"/>
                         </ControlTemplate>
                     </Setter.Value>
                 </Setter>
@@ -33,14 +32,14 @@
 
     <UserControl.Template>
         <ControlTemplate TargetType="UserControl">
-            <AdornerDecorator HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
+            <AdornerDecorator x:Name="PART_Adorner" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
                 <Grid GotFocus="Grid_GotFocus">
                     <Grid.RowDefinitions>
                         <RowDefinition Height="30"/>
                         <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>
 
-                    <Grid>
+                    <Grid Background="{StaticResource ReVerBar}">
                         <Grid.ColumnDefinitions>
                             <ColumnDefinition Width="*"/>
                             <ColumnDefinition Width="Auto"/>
@@ -50,9 +49,9 @@
                            DragStarted="DragStarted" DragCompleted="DragCompleted"/>
 
                         <StackPanel Grid.Column="1" Orientation="Horizontal">
-                            <Button Style="{StaticResource ChildWindowButton}" Click="Min_Click">&#xe650;</Button>
-                            <Button Style="{StaticResource ChildWindowButton}" Click="Max_Click" >&#xe602;</Button>
-                            <Button Style="{StaticResource ChildWindowCloseButton}" Click="CLose_Click">&#xe609;</Button>
+                            <Button Style="{StaticResource ChildWindowButton}" Background="Transparent" Click="Min_Click">&#xe650;</Button>
+                            <Button Style="{StaticResource ChildWindowButton}" Background="Transparent" Click="Max_Click" >&#xe602;</Button>
+                            <!--<Button Style="{StaticResource ChildWindowCloseButton}" Background="Transparent" Click="CLose_Click">&#xe609;</Button>-->
                         </StackPanel>
                     </Grid>
 
diff --git a/WPFProject/Controls/InnerWindow.xaml.cs b/Plugin.TestBuilder/UI/InnerWindow.xaml.cs
similarity index 93%
rename from WPFProject/Controls/InnerWindow.xaml.cs
rename to Plugin.TestBuilder/UI/InnerWindow.xaml.cs
index b665787..5242c2b 100644
--- a/WPFProject/Controls/InnerWindow.xaml.cs
+++ b/Plugin.TestBuilder/UI/InnerWindow.xaml.cs
@@ -1,20 +1,14 @@
-锘縰sing HandyControl.Controls;
+锘縰sing Plugin.TestBuilder.Entity;
 using System;
 using System.ComponentModel;
 using System.Runtime.CompilerServices;
 using System.Windows;
 using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
 using System.Windows.Documents;
 using System.Windows.Input;
 using System.Windows.Media;
-using System.Windows.Shapes;
-using WPFProject.Models;
-using WPFProject.UI.Test;
-using WPFProject.Utils;
-using static WPFProject.Utils.Resize.Resizeable;
 
-namespace WPFProject.Controls
+namespace Plugin.TestBuilder.UI
 {
     /// <summary>
     /// InnerWindow.xaml 鐨勪氦浜掗�昏緫
@@ -46,7 +40,13 @@
         public CanvasPosition canvasPosition;
         private Canvas canvas;
         public WindowState WindowState { get; set; } = WindowState.Normal;
-        public AdornerDecorator ResizeAdornerDecorator { get => VisualTreeHelper.GetChild(this, 0) as AdornerDecorator; }
+        public AdornerDecorator ResizeAdornerDecorator
+        {
+            get
+            {
+                return this.Template.FindName("PART_Adorner", this) as AdornerDecorator;
+            }
+        }
 
         private string _Title;
         public string Title
@@ -83,7 +83,7 @@
         }
 
         public static readonly DependencyProperty HeaderBackgroundProperty =
-            DependencyProperty.Register("HeaderBackground", typeof(Brush), typeof(ProgramList),
+            DependencyProperty.Register("HeaderBackground", typeof(Brush), typeof(InnerWindow),
                 new PropertyMetadata(new SolidColorBrush(Color.FromRgb(54, 146, 225))));
 
         public Brush HeaderFontColor
@@ -93,7 +93,7 @@
         }
 
         public static readonly DependencyProperty HeaderFontColorProperty =
-            DependencyProperty.Register("HeaderFontColor", typeof(Brush), typeof(ProgramList),
+            DependencyProperty.Register("HeaderFontColor", typeof(Brush), typeof(InnerWindow),
                 new PropertyMetadata(new SolidColorBrush(Color.FromRgb(255, 255, 225))));
         #endregion
 
@@ -190,7 +190,7 @@
         {
             if (true)
             {
-               Resize.SetIsResizeable(this, true);
+                Resize.SetIsResizeable(this, true);
             }
             canvas.Children.Add(this);
             this.canvas = canvas;
diff --git a/WPFProject/Controls/MinInnerWindow.xaml b/Plugin.TestBuilder/UI/MinInnerWindow.xaml
similarity index 70%
rename from WPFProject/Controls/MinInnerWindow.xaml
rename to Plugin.TestBuilder/UI/MinInnerWindow.xaml
index 714ab63..426b353 100644
--- a/WPFProject/Controls/MinInnerWindow.xaml
+++ b/Plugin.TestBuilder/UI/MinInnerWindow.xaml
@@ -1,9 +1,9 @@
-锘�<UserControl x:Class="WPFProject.Controls.MinInnerWindow"
+锘�<UserControl x:Class="Plugin.TestBuilder.UI.MinInnerWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.Controls"
+             xmlns:local="clr-namespace:Plugin.TestBuilder.UI"
              mc:Ignorable="d" 
              Height="30"
              d:DesignHeight="450" d:DesignWidth="800">
@@ -16,9 +16,9 @@
         </ResourceDictionary>
     </UserControl.Resources>
 
-    <StackPanel Background="{StaticResource SecondPrimaryColor}" Orientation="Horizontal">
+    <StackPanel Background="{StaticResource VerBar}" Orientation="Horizontal">
         <Label BorderBrush="{StaticResource PrimaryColor}" Foreground="#FFF" BorderThickness="2,0,0,0" VerticalContentAlignment="Center" ToolTip="{Binding Title}" Content="{Binding Title}"/>
-        <Button Style="{StaticResource ChildWindowButton}" Click="Max_Click" >&#xe602;</Button>
-        <Button Style="{StaticResource ChildWindowCloseButton}" Click="CLose_Click">&#xe609;</Button>
+        <Button Style="{StaticResource ChildWindowButton}" Background="Transparent" Click="Max_Click" >&#xe602;</Button>
+        <!--<Button Style="{StaticResource ChildWindowCloseButton}" Click="CLose_Click">&#xe609;</Button>-->
     </StackPanel>
 </UserControl>
diff --git a/WPFProject/Controls/MinInnerWindow.xaml.cs b/Plugin.TestBuilder/UI/MinInnerWindow.xaml.cs
similarity index 96%
rename from WPFProject/Controls/MinInnerWindow.xaml.cs
rename to Plugin.TestBuilder/UI/MinInnerWindow.xaml.cs
index b925b2d..459dfc4 100644
--- a/WPFProject/Controls/MinInnerWindow.xaml.cs
+++ b/Plugin.TestBuilder/UI/MinInnerWindow.xaml.cs
@@ -1,7 +1,7 @@
 锘縰sing System;
 using System.Windows.Controls;
 
-namespace WPFProject.Controls
+namespace Plugin.TestBuilder.UI
 {
     /// <summary>
     /// MinInnerWindow.xaml 鐨勪氦浜掗�昏緫
diff --git a/WPFProject/Utils/Resize.cs b/Plugin.TestBuilder/UI/Resize.cs
similarity index 97%
rename from WPFProject/Utils/Resize.cs
rename to Plugin.TestBuilder/UI/Resize.cs
index d2004f0..400e69e 100644
--- a/WPFProject/Utils/Resize.cs
+++ b/Plugin.TestBuilder/UI/Resize.cs
@@ -1,15 +1,13 @@
-锘縰sing System.Windows.Input;
+锘縰sing System;
 using System.Windows;
-using System.Windows.Controls.Primitives;
 using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
 using System.Windows.Documents;
+using System.Windows.Input;
 using System.Windows.Media;
-using System;
 using System.Windows.Shapes;
-using WPFProject.Controls;
-using System.Xml.Linq;
 
-namespace WPFProject.Utils
+namespace Plugin.TestBuilder.UI
 {
     public class Resize
     {
@@ -80,10 +78,11 @@
                     RoutedEventHandler Loaded_Resize = null;
                     Loaded_Resize = (sender, e1) =>
                     {
-                        Resizeable resize = new Resizeable(element);
-                        resize.Attach();
-                        SetResizeable(element, resize);
-                        element.Loaded -= Loaded_Resize;
+                        FrameworkElement senderElement = sender as FrameworkElement;
+                        Resizeable r = new Resizeable(senderElement);
+                        r.Attach();
+                        SetResizeable(senderElement, r);
+                        senderElement.Loaded -= Loaded_Resize;
                     };
                     element.Loaded += Loaded_Resize;
                 }
@@ -298,7 +297,7 @@
                     {
                         if (element is InnerWindow _inner)
                         {
-                            AdornerLayer layer = _inner.ResizeAdornerDecorator.AdornerLayer;
+                            AdornerLayer layer = _inner.ResizeAdornerDecorator?.AdornerLayer;
                             if (layer == null)
                                 throw new Exception("鑾峰彇鎺т欢瑁呴グ灞傚け璐ワ紝鎺т欢鍙兘娌℃湁瑁呴グ灞傦紒");
                             layer.Add(new ResizeAdorner(layer, grid));
@@ -615,7 +614,7 @@
         static Canvas GetCanvas(DependencyObject element)
         {
             DependencyObject e = element;
-            while (e is not null and not Canvas)
+            while (e != null && !(e is Canvas))
             {
                 e = VisualTreeHelper.GetParent(e);
             }
diff --git a/WPFProject/UI/WorkControl.xaml b/Plugin.TestBuilder/Workspace.xaml
similarity index 84%
rename from WPFProject/UI/WorkControl.xaml
rename to Plugin.TestBuilder/Workspace.xaml
index 84bb897..e482fe0 100644
--- a/WPFProject/UI/WorkControl.xaml
+++ b/Plugin.TestBuilder/Workspace.xaml
@@ -1,27 +1,25 @@
-锘�<hb:PluginControl x:Class="WPFProject.UI.WorkControl"
+锘�<hb:PluginControl x:Class="Plugin.TestBuilder.Workspace"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
-             xmlns:ui="clr-namespace:WPFProject.UI"
-             xmlns:vm="clr-namespace:WPFProject.ViewModels"
-             xmlns:view="clr-namespace:WPFProject.UI"
-             xmlns:utils="clr-namespace:WPFProject.Utils"
-             xmlns:vt="clr-namespace:WPFProject.UI.Test"
+             xmlns:pw="https://opensource.panuon.com/wpf"
+             xmlns:pu="https://opensource.panuon.com/wpf-ui"
+             xmlns:ui="clr-namespace:Plugin.TestBuilder.UI"
              mc:Ignorable="d"
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
+                <pu:StyleDictionary Includes="ListBox"/>
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
     </UserControl.Resources>
-
+    
     <Grid>
         <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
-            <Canvas x:Name="WorkArea" Background="#FFF" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+            <Canvas x:Name="WorkArea" Background="{StaticResource CommonBoarder}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                 <!--<vt:ProgramList BorderThickness="1" BorderBrush="#000" Canvas.Left="335" Canvas.Top="121" utils:Resize.IsResizeable="True"></vt:ProgramList>
                 <vt:ProgramList BorderThickness="1" BorderBrush="#000" Canvas.Left="600" Canvas.Top="121" FocusableChanged="ProgramList_FocusableChanged"></vt:ProgramList>-->
 
diff --git a/WPFProject/UI/WorkControl.xaml.cs b/Plugin.TestBuilder/Workspace.xaml.cs
similarity index 62%
rename from WPFProject/UI/WorkControl.xaml.cs
rename to Plugin.TestBuilder/Workspace.xaml.cs
index 725407c..df6f286 100644
--- a/WPFProject/UI/WorkControl.xaml.cs
+++ b/Plugin.TestBuilder/Workspace.xaml.cs
@@ -1,22 +1,20 @@
-锘縰sing System;
+锘縰sing HMI.Base;
+using Plugin.TestBuilder.Entity;
+using Plugin.TestBuilder.UI;
+using System;
 using System.Collections.Generic;
 using System.Windows;
 using System.Windows.Controls;
-using HMI.Base;
-using log4net;
-using WPFProject.Controls;
-using WPFProject.Models;
-using WPFProject.Utils;
+using System.Windows.Media;
 
-namespace WPFProject.UI
+namespace Plugin.TestBuilder
 {
     /// <summary>
     /// WorkControl.xaml 鐨勪氦浜掗�昏緫
     /// </summary>
-    public partial class WorkControl : PluginControl
+    public partial class Workspace : PluginControl
     {
-        private ILog log;
-        public WorkControl()
+        public Workspace()
         {
             InitializeComponent();
             Loaded += UserControl_Loaded;
@@ -69,49 +67,49 @@
 
         private void UserControl_Loaded(object sender, RoutedEventArgs e)
         {
-            //List<CanvasPosition> pos = InitGridSize();
-            //ProgramList programList = new ProgramList();
-            //InnerWindow p = new InnerWindow(pos[0])
-            //{
-            //    Title = "绋嬪簭鍒楄〃",
-            //    Content = programList
-            //};
-            //HandleInnerWindow(p);
+            List<CanvasPosition> pos = InitGridSize();
+            ProgramList programList = new ProgramList();
+            InnerWindow p = new InnerWindow(pos[0])
+            {
+                Title = "绋嬪簭鍒楄〃",
+                Content = programList
+            };
+            HandleInnerWindow(p);
 
-            //InnerWindow p1 = new InnerWindow(pos[1])
-            //{
-            //    Title = "鍥剧墖",
-            //};
-            //HandleInnerWindow(p1);
+            InnerWindow p1 = new InnerWindow(pos[1])
+            {
+                Title = "鍥剧墖"
+            };
+            HandleInnerWindow(p1);
 
-            //SequnceList sequnceList = new SequnceList();
-            //programList.ProgramChanged += sequnceList.Selected_Program_Changed;
+            SequnceList sequnceList = new SequnceList();
+            programList.ProgramChanged += sequnceList.Selected_Program_Changed;
 
-            //InnerWindow p2 = new InnerWindow(pos[2])
-            //{
-            //    Title = "搴忓垪",
-            //    Content = sequnceList
-            //};
-            //HandleInnerWindow(p2);
+            InnerWindow p2 = new InnerWindow(pos[2])
+            {
+                Title = "搴忓垪",
+                Content = sequnceList
+            };
+            HandleInnerWindow(p2);
 
-            //FunctionSetting functionSetting = new FunctionSetting();
-            //InnerWindow p3 = new InnerWindow(pos[3])
-            //{
-            //    Title = "鍑芥暟",
-            //    Content = functionSetting
-            //};
-            //HandleInnerWindow(p3);
+            FunctionSetting functionSetting = new FunctionSetting();
+            InnerWindow p3 = new InnerWindow(pos[3])
+            {
+                Title = "鍑芥暟",
+                Content = functionSetting
+            };
+            HandleInnerWindow(p3);
 
-            //StepSetting stepSetting = new StepSetting();
-            //InnerWindow p4 = new InnerWindow(pos[4])
-            //{
-            //    Title = "鍗曟璁剧疆",
-            //    Content = stepSetting
-            //};
-            //HandleInnerWindow(p4);
+            StepSetting stepSetting = new StepSetting();
+            InnerWindow p4 = new InnerWindow(pos[4])
+            {
+                Title = "鍗曟璁剧疆",
+                Content = stepSetting
+            };
+            HandleInnerWindow(p4);
 
 
-            //SizeChanged += WorkControl_SizeChanged;
+            SizeChanged += WorkControl_SizeChanged;
             Loaded -= UserControl_Loaded;
 
         }
@@ -199,30 +197,30 @@
         /// <param name="e"></param>
         private void WorkControl_SizeChanged(object sender, SizeChangedEventArgs e)
         {
-            //Size newSize = e.NewSize;
-            //Size previousSize = e.PreviousSize;
+            Size newSize = e.NewSize;
+            Size previousSize = e.PreviousSize;
 
-            //double xRate = newSize.Width / previousSize.Width;
-            //double yRate = newSize.Height / previousSize.Height;
-            //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
-            //{
-            //    UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
-            //    Canvas.SetLeft(child, Canvas.GetLeft(child) * xRate);
-            //    Canvas.SetTop(child, Canvas.GetTop(child) * yRate);
-            //}
+            double xRate = newSize.Width / previousSize.Width;
+            double yRate = newSize.Height / previousSize.Height;
+            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
+            {
+                UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
+                Canvas.SetLeft(child, Canvas.GetLeft(child) * xRate);
+                Canvas.SetTop(child, Canvas.GetTop(child) * yRate);
+            }
 
-            //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
-            //{
-            //    UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
-            //    if (Canvas.GetLeft(child) >= newSize.Width)
-            //    {
-            //        Canvas.SetLeft(child, Canvas.GetLeft(child) + newSize.Width - previousSize.Width);
-            //    }
-            //    if (Canvas.GetTop(child) >= newSize.Height)
-            //    {
-            //        Canvas.SetTop(child, Canvas.GetTop(child) + newSize.Height - previousSize.Height);
-            //    }
-            //}
+            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
+            {
+                UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
+                if (Canvas.GetLeft(child) >= newSize.Width)
+                {
+                    Canvas.SetLeft(child, Canvas.GetLeft(child) + newSize.Width - previousSize.Width);
+                }
+                if (Canvas.GetTop(child) >= newSize.Height)
+                {
+                    Canvas.SetTop(child, Canvas.GetTop(child) + newSize.Height - previousSize.Height);
+                }
+            }
         }
         #endregion
 
@@ -264,50 +262,5 @@
         }
         #endregion
 
-        public void OnTabChange(object sender, SelectionChangedEventArgs args)
-        {
-            if (args.AddedItems.Count > 0)
-            {
-                IconTabItem newTab = args.AddedItems[0] as IconTabItem;
-                if (newTab != null && newTab.Content == this)
-                {
-
-                }
-            }
-
-            if (args.RemovedItems.Count > 0)
-            {
-                IconTabItem oldTab = args.RemovedItems[0] as IconTabItem;
-                if (oldTab != null && oldTab.Content == this)
-                {
-
-                }
-            }
-        }
-
-        public object Active()
-        {
-            return null;
-        }
-
-        public object DeActive()
-        {
-            return null;
-        }
-
-        public void OnTabChange(object sender, object args)
-        {
-
-        }
-
-        public object Init()
-        {
-            return null;
-        }
-
-        public void SetLogger(ILog logger)
-        {
-            log = logger;
-        }
     }
 }
\ No newline at end of file
diff --git a/Plugin.TestBuilder/packages.config b/Plugin.TestBuilder/packages.config
new file mode 100644
index 0000000..4909f4c
--- /dev/null
+++ b/Plugin.TestBuilder/packages.config
@@ -0,0 +1,7 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="gong-wpf-dragdrop" version="4.0.0" targetFramework="net472" />
+  <package id="log4net" version="3.0.4" targetFramework="net472" />
+  <package id="Panuon.WPF" version="1.1.3" targetFramework="net472" />
+  <package id="Panuon.WPF.UI" version="1.3.0.2" targetFramework="net472" />
+</packages>
\ No newline at end of file
diff --git a/Plugin.TestResult/Chart.xaml.cs b/Plugin.TestResult/Chart.xaml.cs
index 16257d5..988f2a2 100644
--- a/Plugin.TestResult/Chart.xaml.cs
+++ b/Plugin.TestResult/Chart.xaml.cs
@@ -1,4 +1,5 @@
-锘縰sing ScottPlot;
+锘縰sing Plugin.TestResult_WPF.Model;
+using ScottPlot;
 using ScottPlot.Plottables;
 using ScottPlot.TickGenerators;
 using System;
@@ -9,6 +10,9 @@
 
 namespace Plugin.TestResult_WPF
 {
+    /// <summary>
+    /// Chart.xaml 鐨勪氦浜掗�昏緫
+    /// </summary>
     /// <summary>
     /// Chart.xaml 鐨勪氦浜掗�昏緫
     /// </summary>
@@ -30,6 +34,7 @@
 
         private double maxYValue = -1;
         private double minYValue = double.MaxValue;
+        private float fontSize = -1;
 
         private Timer timer;
 
@@ -167,6 +172,70 @@
             timer.Elapsed += Timer_Elapsed;
         }
 
+        public Chart(string title, bool multi, float titleSize)
+        {
+            BaseConfig config = new BaseConfig();
+            this.title = title;
+            this.multi = multi;
+            this.maxSize = config.MaxSize;
+            this.refreshInterval = config.RefreshInterval;
+            fontSize = titleSize;
+
+            InitializeComponent();
+            if (this.multi)
+            {
+                xValues = new Dictionary<string, Queue<long>>();
+                yValues = new Dictionary<string, Queue<double>>();
+                //chart.Plot.ShowLegend(Alignment.UpperLeft, Orientation.Vertical);
+                var legend = chart.Plot.ShowLegend(Edge.Top);
+                legend.Alignment = Alignment.UpperLeft;
+                legend.Padding = new PixelPadding(0);
+
+
+                chart.Plot.Axes.Left.TickLabelStyle.FontSize = titleSize - 3;
+                chart.Plot.Axes.Bottom.TickLabelStyle.FontSize = titleSize - 3;
+                chart.Plot.Axes.Left.Label.FontSize = titleSize;
+            }
+            else
+            {
+                singleLogger = InitLogger();
+                singleLogger.Color = Colors.Red;
+                xData = new Queue<long>(maxSize);
+                yData = new Queue<double>(maxSize);
+                chart.Plot.Axes.Left.TickLabelStyle.FontSize = titleSize - 3;
+                chart.Plot.Axes.Bottom.TickLabelStyle.FontSize = titleSize - 3;
+                chart.Plot.Axes.Left.Label.FontSize = titleSize;
+            }
+
+            /// 绂佺敤榧犳爣
+            chart.UserInputProcessor.Disable();
+
+            string CustomFormatter(double position)
+            {
+                if (position > 0)
+                    return TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)).AddMilliseconds(position).ToString("HH:mm:ss");
+                return "";
+            }
+            EvenlySpacedMinorTickGenerator minorTickGen = new EvenlySpacedMinorTickGenerator(10);
+            NumericAutomatic myTickGenerator = new NumericAutomatic()
+            {
+                LabelFormatter = CustomFormatter,
+                MinorTickGenerator = minorTickGen
+            };
+            chart.Plot.Axes.Bottom.TickGenerator = myTickGenerator;
+            if (!string.IsNullOrEmpty(this.title))
+            {
+                chart.Plot.Axes.Left.Label.Text = this.title;
+                chart.Plot.Axes.Left.Label.Bold = false;
+                chart.Plot.Font.Automatic();
+                //RefreshData();
+            }
+
+            timer = new Timer();
+            timer.Interval = this.refreshInterval;
+            timer.Elapsed += Timer_Elapsed;
+        }
+
         private void Timer_Elapsed(object sender, ElapsedEventArgs e)
         {
             if (maxYValue > 0)
@@ -177,16 +246,25 @@
 
         public void RefreshData()
         {
-            /// 闄愬埗y杞�
-            if (maxYValue > -1)
+            bool flag = timer.Enabled;
+            try
             {
-                chart.Plot.Axes.SetLimitsY(minYValue > 5 ? minYValue - 5 : 0, maxYValue + 5);
+                timer.Enabled = false;
+                /// 闄愬埗y杞�
+                if (maxYValue > -1)
+                {
+                    chart.Plot.Axes.SetLimitsY(minYValue > 5 ? minYValue - 5 : 0, maxYValue + 5);
+                }
+                else
+                {
+                    chart.Plot.Axes.SetLimitsY(0, 100);
+                }
+                chart.Refresh();
             }
-            else
+            finally
             {
-                chart.Plot.Axes.SetLimitsY(0, 100);
+                timer.Enabled = flag;
             }
-            chart.Refresh();
         }
 
         public void Clear()
@@ -234,6 +312,20 @@
                 .ToList()
                 .ForEach(m => chart.Plot.Remove(m));
             //RefreshData();
+        }
+
+        public List<double> GetSingleData()
+        {
+            bool flag = timer.Enabled;
+            try
+            {
+                timer.Enabled = false;
+                return yData?.ToList();
+            }
+            finally
+            {
+                timer.Enabled = flag;
+            }
         }
 
         private void InsertData(Queue<long> xAxis, Queue<double> yAxis, long x, double y)
@@ -306,9 +398,18 @@
         private void UserControl_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
         {
             if (this.multi) return;
-            chart.Plot.Axes.Left.Label.FontSize = (float)FontSizeConverter.CountFontSize(15, ActualHeight, 92);
-            chart.Plot.Axes.Left.TickLabelStyle.FontSize = (float)FontSizeConverter.CountFontSize(10, ActualHeight, 92);
-            chart.Plot.Axes.Bottom.TickLabelStyle.FontSize = (float)FontSizeConverter.CountFontSize(10, ActualHeight, 92);
+            if (fontSize < 0)
+            {
+                chart.Plot.Axes.Left.Label.FontSize = (float)FontSizeConverter.CountFontSize(15, ActualHeight, 92);
+                chart.Plot.Axes.Left.TickLabelStyle.FontSize = (float)FontSizeConverter.CountFontSize(10, ActualHeight, 92);
+                chart.Plot.Axes.Bottom.TickLabelStyle.FontSize = (float)FontSizeConverter.CountFontSize(10, ActualHeight, 92);
+            }
+            else
+            {
+                chart.Plot.Axes.Left.Label.FontSize = fontSize - 3;
+                chart.Plot.Axes.Left.TickLabelStyle.FontSize = fontSize - 3;
+                chart.Plot.Axes.Bottom.TickLabelStyle.FontSize = fontSize;
+            }
         }
     }
 }
diff --git a/Plugin.TestResult/DataTable.xaml b/Plugin.TestResult/DataTable.xaml
index 5e5d6a8..b0bfc58 100644
--- a/Plugin.TestResult/DataTable.xaml
+++ b/Plugin.TestResult/DataTable.xaml
@@ -63,7 +63,7 @@
             Converter={StaticResource FontSizeConverter}, ConverterParameter='15,940'}"></local:InfoTable>
         </Grid>
 
-        <UniformGrid x:Name="mainGrid" Grid.Row="1" Columns="6" dp:UniformGridHelper.InnerBorder="1"
+        <UniformGrid x:Name="mainGrid" Grid.Row="1" dp:UniformGridHelper.InnerBorder="1"
                      dp:UniformGridHelper.InnerBorderIgnore="Left,Right,Bottom">
         </UniformGrid>
 
diff --git a/Plugin.TestResult/DataTable.xaml.cs b/Plugin.TestResult/DataTable.xaml.cs
index aa54886..ff7dc36 100644
--- a/Plugin.TestResult/DataTable.xaml.cs
+++ b/Plugin.TestResult/DataTable.xaml.cs
@@ -99,6 +99,7 @@
             this.chartTitle = config.MainChartTitle;
             DataContext = this;
             InitializeComponent();
+            mainGrid.Columns = config.PositionColumn;
             this.chart = new Chart(this.chartTitle, false, config.MaxSize, config.RefreshInterval);
             this.multiChart = new Chart(config.DetailChartTitle, true, config.MaxSize, config.RefreshInterval)
             {
@@ -110,7 +111,7 @@
 
             for (int i = 0; i < this.cellCount; i++)
             {
-                var cell = new SingleCell(title, i, config.CellListMaxSize);
+                var cell = new SingleCell(title, i, config.CellListMaxSize, countIniPath);
                 mainGrid.Children.Add(cell);
                 cells[i] = cell;
             }
@@ -255,6 +256,7 @@
             string LookupStr = e.name == "Zone1" ? $"StationState.SN[{dutNo}]" : $"StationState.SN[{(dutNo + 54)}]";
 
             parent.engine.Globals.SetValString(LookupStr, 0, snrCode);
+            parent.engine.CommitGlobalsToDisk(promptOnSaveConflicts: false);
             string code = parent.engine.Globals.GetValString(LookupStr, 0);
             parent.nameTables[cellInfo.OvenName].GetSingleCell(cellInfo.Index).SetStatus("hadCode");
         }
@@ -496,5 +498,13 @@
                 parent.SetOvenProduct(index, "");
             }
         }
+
+        public void ClearElectricData()
+        {
+            foreach (var cell in cells)
+            {
+                cell.ClearElectricData();
+            }
+        }
     }
 }
diff --git a/Plugin.TestResult/InfoWindow.xaml b/Plugin.TestResult/InfoWindow.xaml
index bc7020a..290ba69 100644
--- a/Plugin.TestResult/InfoWindow.xaml
+++ b/Plugin.TestResult/InfoWindow.xaml
@@ -14,49 +14,67 @@
         xmlns:cc="clr-namespace:HMI.Core;assembly=HMI.Core"
         InteropOwnersMask="False"
         Topmost="False"
+        Loaded="Window_Loaded"
+        Unloaded="Window_Unloaded"
+        SizeChanged="Window_SizeChanged"
         pu:WindowXModalDialog.Buttons="{x:Null}"
         Title="{Binding title}" Height="500" Width="800">
-    <DataGrid ItemsSource="{Binding dataSource}"
-              Style="{StaticResource DefaultDataGrid}">
-        <DataGrid.Columns>
-            <DataGridTemplateColumn Header="#" CanUserResize="False">
-                <DataGridTemplateColumn.CellTemplate>
-                    <DataTemplate>
-                        <TextBlock Text="{Binding Converter={StaticResource rowNumber},
+    <Grid x:Name="mainGrid">
+        <Grid.RowDefinitions>
+            <RowDefinition/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+        </Grid.RowDefinitions>
+        <DataGrid ItemsSource="{Binding dataSource}" AutoGenerateColumns="False"
+              CanUserAddRows="False"
+              CanUserDeleteRows="False"
+              IsReadOnly="True"
+              ColumnWidth="*"
+              VirtualizingStackPanel.VirtualizationMode="Standard"
+              FontSize="16">
+            <DataGrid.Columns>
+                <!--<DataGridTemplateColumn Header="#" CanUserResize="False" Width="Auto">
+                    <DataGridTemplateColumn.CellTemplate>
+                        <DataTemplate>
+                            <TextBlock Text="{Binding Converter={StaticResource rowNumber},
 RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/>
-                    </DataTemplate>
-                </DataGridTemplateColumn.CellTemplate>
-            </DataGridTemplateColumn>
-            <DataGridTextColumn Width="*" Binding="{Binding step}">
-                <DataGridTextColumn.Header>
-                    <TextBlock Text="{DynamicResource Test.Name}"/>
-                </DataGridTextColumn.Header>
-            </DataGridTextColumn>
-            <DataGridTextColumn Width="*" Binding="{Binding value}">
-                <DataGridTextColumn.Header>
-                    <TextBlock Text="{DynamicResource Test.Value}"/>
-                </DataGridTextColumn.Header>
-            </DataGridTextColumn>
-            <DataGridTextColumn Width="*" Binding="{Binding result}">
-                <DataGridTextColumn.Header>
-                    <TextBlock Text="{DynamicResource Test.Result}"/>
-                </DataGridTextColumn.Header>
-            </DataGridTextColumn>
-            <DataGridTextColumn Width="*" Binding="{Binding range}">
-                <DataGridTextColumn.Header>
-                    <TextBlock Text="{DynamicResource Test.Range}"/>
-                </DataGridTextColumn.Header>
-            </DataGridTextColumn>
-            <DataGridTextColumn Width="*" Binding="{Binding condition}">
-                <DataGridTextColumn.Header>
-                    <TextBlock Text="{DynamicResource Test.Condition}"/>
-                </DataGridTextColumn.Header>
-            </DataGridTextColumn>
-            <DataGridTextColumn Width="*" Binding="{Binding updateTime}">
-                <DataGridTextColumn.Header>
-                    <TextBlock Text="{DynamicResource Test.UpdateTime}"/>
-                </DataGridTextColumn.Header>
-            </DataGridTextColumn>
-        </DataGrid.Columns>
-    </DataGrid>
+                        </DataTemplate>
+                    </DataGridTemplateColumn.CellTemplate>
+                </DataGridTemplateColumn>-->
+                <DataGridTextColumn Header="娴嬭瘯椤瑰悕绉�" Binding="{Binding step}"/>
+                <DataGridTextColumn Header="娴嬭瘯鍊�" Binding="{Binding value}"/>
+                <DataGridTextColumn Header="娴嬭瘯缁撴灉" Binding="{Binding result}"/>
+                <DataGridTextColumn Header="娴嬭瘯鑼冨洿" Binding="{Binding range}"/>
+                <DataGridTextColumn Header="娴嬭瘯鏉′欢" Binding="{Binding condition}"/>
+                <DataGridTextColumn Header="鏇存柊鏃堕棿" Binding="{Binding updateTime}"/>
+            </DataGrid.Columns>
+        </DataGrid>
+
+        <Grid Background="#f1eded" Grid.Row="2" Height="25">
+            <DockPanel>
+                <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" Margin="0,0,30,0">
+                    <Label Padding="0" FontSize="12" 
+VerticalAlignment="Center"
+VerticalContentAlignment="Center" Content="鎺㈤拡浣跨敤娆℃暟:"/>
+                    <Label Padding="0" FontSize="12"  Margin="0,0,15,0"
+VerticalAlignment="Center"
+VerticalContentAlignment="Center" Content="{Binding ProbeCount}"/>
+
+
+                    <Label x:Name="alarmLabel" Padding="0" FontSize="12" 
+VerticalAlignment="Center"
+VerticalContentAlignment="Center" Content="棰勮娆℃暟:"/>
+                    <Label x:Name="alarmValue" Padding="0" FontSize="12" 
+VerticalAlignment="Center"
+VerticalContentAlignment="Center" Content="{Binding ProbeWarn}"/>
+
+                    <Button Style="{StaticResource LinkButton}" Margin="10,0,0,0" Click="Button_Click" >娓呯┖</Button>
+                </StackPanel>
+
+                <Label x:Name="probeCountAlarm" Visibility="Collapsed" DockPanel.Dock="Left" Padding="30,0" FontSize="12" Foreground="Red"
+VerticalAlignment="Center"
+VerticalContentAlignment="Center" Content="鎺㈤拡浣跨敤宸茶揪鍒伴璀︽鏁帮紝璇锋敞鎰忥紒"/>
+            </DockPanel>
+        </Grid>
+    </Grid>
 </pu:WindowX>
diff --git a/Plugin.TestResult/InfoWindow.xaml.cs b/Plugin.TestResult/InfoWindow.xaml.cs
index 9c74852..58b265e 100644
--- a/Plugin.TestResult/InfoWindow.xaml.cs
+++ b/Plugin.TestResult/InfoWindow.xaml.cs
@@ -1,6 +1,16 @@
-锘縰sing Panuon.WPF.UI;
+锘縰sing HMI.Core.Api;
+using HMI.Core.Entity;
+using HMI.Core.Manager;
+using HMI.Core.Util;
+using HMI.UI.Util;
+using Panuon.WPF.UI;
 using Plugin.TestResult_WPF.Model;
+using System;
+using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
 
 namespace Plugin.TestResult_WPF
 {
@@ -24,19 +34,109 @@
             get => _dataSource == null ? new ObservableCollection<Info>() : _dataSource;
             set => Set(ref _dataSource, value);
         }
-
-        public InfoWindow(string title, ObservableCollection<Info> infos)
+        private Chart electricChart;
+        public InfoWindow(string title, ObservableCollection<Info> infos, Chart electricChart, int probeCount)
         {
             this.title = title;
             this.dataSource = infos;
             DataContext = this;
             Topmost = false;
             InitializeComponent();
+
+            if (AlarmProbeCount < 0)
+            {
+                alarmLabel.Visibility = Visibility.Collapsed;
+                alarmValue.Visibility = Visibility.Collapsed;
+            }
+            UpdateProbeCount(probeCount);
+
+            this.electricChart = electricChart;
+            mainGrid.Children.Add(electricChart);
+            Grid.SetRow(electricChart, 1);
         }
+
+        private static int AlarmProbeCount;
+        static InfoWindow()
+        {
+            int probeWarn = -1;
+            try
+            {
+                probeWarn = Convert.ToInt32(ParameterManager.GetCommonParameter<List<ParameterData>>()
+                    .FirstOrDefault(x => x.Name == "ProbeWarn")?.Value);
+            }
+            catch (Exception ex)
+            {
+                probeWarn = -1;
+            }
+            AlarmProbeCount = probeWarn;
+        }
+
+        public event EventHandler ClearProbeCountEvent;
+
+        private int probeCount;
+        public int ProbeCount
+        {
+            get => probeCount;
+            set
+            {
+                Set(ref probeCount, value);
+            }
+        }
+
+        public int ProbeWarn
+        {
+            get => AlarmProbeCount;
+            set { }
+        }
+        public void UpdateProbeCount(int count)
+        {
+            Dispatcher.Invoke(() =>
+            {
+                ProbeCount = count;
+                if (AlarmProbeCount >= 0)
+                {
+                    probeCountAlarm.Visibility = (ProbeCount >= AlarmProbeCount) ? Visibility.Visible : Visibility.Collapsed;
+                }
+            });
+        }
+
 
         public void UpdateSource(ObservableCollection<Info> infos)
         {
             this.dataSource = infos;
         }
+
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            DataContext = this;
+        }
+
+        private void Window_Unloaded(object sender, RoutedEventArgs e)
+        {
+            DataContext = null;
+        }
+
+        protected override void OnClosed(EventArgs e)
+        {
+            electricChart = null;
+            mainGrid.Children.Clear();
+            base.OnClosed(e);
+        }
+
+        private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
+        {
+            if (electricChart != null)
+            {
+                electricChart.Height = this.ActualHeight * 0.3;
+            }
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            if (MsgBoxHelper.WarnMessage(this, "纭畾瑕佹竻绌烘帰閽堜娇鐢ㄦ鏁板悧锛�") == MessageBoxResult.OK)
+            {
+                ClearProbeCountEvent?.Invoke(this, null);
+            }
+        }
     }
 }
diff --git a/Plugin.TestResult/Model/BaseConfig.cs b/Plugin.TestResult/Model/BaseConfig.cs
index 4e0d5e0..bdb2a53 100644
--- a/Plugin.TestResult/Model/BaseConfig.cs
+++ b/Plugin.TestResult/Model/BaseConfig.cs
@@ -52,6 +52,19 @@
         }
 
         /// <summary>
+        /// 鐐逛綅鍒楁暟
+        /// </summary>
+        private int positionColumn = 6;
+        public int PositionColumn
+        {
+            get
+            {
+                var data = GetValue();
+                return data == null ? positionColumn : int.Parse(data);
+            }
+        }
+
+        /// <summary>
         /// 姣忎釜鐐夊瓙鐨勭偣浣嶆暟
         /// </summary>
         private int positionCount = 54;
diff --git a/Plugin.TestResult/SingleCell.xaml.cs b/Plugin.TestResult/SingleCell.xaml.cs
index 981c6c9..3886457 100644
--- a/Plugin.TestResult/SingleCell.xaml.cs
+++ b/Plugin.TestResult/SingleCell.xaml.cs
@@ -1,10 +1,12 @@
-锘縰sing Plugin.TestResult_WPF.Constant;
+锘縰sing HMI.Util;
+using Plugin.TestResult_WPF.Constant;
 using Plugin.TestResult_WPF.Model;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
+using System.IO;
 using System.Runtime.CompilerServices;
 using System.Windows;
 using System.Windows.Controls;
@@ -42,13 +44,15 @@
             InitializeComponent();
         }
 
-        public SingleCell(string parentName, int index, int maxSize)
+        public SingleCell(string parentName, int index, int maxSize, string iniFile)
         {
             this.parentName = parentName;
             this.index = index;
             this.maxSize = maxSize;
+            this.countIniPath = iniFile;
             DataContext = this;
             InitializeComponent();
+            LoadProbeCount();
         }
 
         private string _parentName;
@@ -102,7 +106,7 @@
 
         private ConcurrentQueue<Info> queue = new ConcurrentQueue<Info>();
 
-        private ObservableCollection<Info> _infos;
+        private ObservableCollection<Info> _infos = new ObservableCollection<Info>();
 
         public ObservableCollection<Info> infos
         {
@@ -114,12 +118,44 @@
             }
         }
 
+        private string countIniPath;
+        /// <summary>
+        /// 鎺㈤拡瀵垮懡
+        /// </summary>
+        private int probeCount;
+        public int ProbeCount
+        {
+            get => probeCount;
+            set
+            {
+                RaiseAndSetIfchanged(ref probeCount, value);
+            }
+        }
+
+        public void LoadProbeCount()
+        {
+            string temp = IniFileHelper.ReadIniData($"{title}", "ProbeCount", "", countIniPath);
+            if (!string.IsNullOrEmpty(temp))
+            {
+                int count = Convert.ToInt32(temp);
+                ProbeCount = count;
+            }
+        }
+
+        private void UpdateProbeCount(int count)
+        {
+            ProbeCount = count;
+            IniFileHelper.WriteIniData($"{title}", "ProbeCount", ProbeCount.ToString(), countIniPath);
+            if (window != null) window.UpdateProbeCount(ProbeCount);
+        }
+
         private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
         {
             if (window == null)
             {
-                window = new InfoWindow(title, infos);
+                window = new InfoWindow(title, infos, electricChart, ProbeCount);
                 window.Closed += Window_Closed;
+                window.ClearProbeCountEvent += Window_ClearProbeCountEvent;
                 window.Owner = Window.GetWindow(this);
                 window.Show();
             }
@@ -127,6 +163,11 @@
             {
                 window.Activate();
             }
+        }
+
+        private void Window_ClearProbeCountEvent(object sender, EventArgs e)
+        {
+            UpdateProbeCount(0);
         }
 
         private void Window_Closed(object sender, EventArgs e)
@@ -137,12 +178,10 @@
         public void SetStatus(string status)
         {
             this.status = status;
-        }
-
-        public void SetInfos(List<Info> infos)
-        {
-            this.infos = new ObservableCollection<Info>(infos);
-            if (window != null) window.UpdateSource(this.infos);
+            if (status == "testing")
+            {
+                UpdateProbeCount(ProbeCount + 1);
+            }
         }
 
         public void SetInfos(Info info)
@@ -183,5 +222,47 @@
             if (window != null) window.UpdateSource(this.infos);
         }
 
+        private Chart electricChart = new Chart("鐢垫祦鏇茬嚎(A)", false, 20);
+        public void AddElectricData(double data)
+        {
+            electricChart.AddData(data);
+        }
+
+        public void ClearElectricData()
+        {
+            electricChart.Clear();
+        }
+
+        public void SaveElectricDataToCSV(string filePath)
+        {
+            try
+            {
+                List<double> datas = electricChart?.GetSingleData();
+
+                FileInfo fi = new FileInfo(filePath);
+                if (!fi.Directory.Exists)
+                {
+                    fi.Directory.Create();  //鏂囦欢涓嶅瓨鍦紝鍒涘缓鏂囦欢
+                }
+
+                using (FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write))
+                using (StreamWriter sw = new StreamWriter(fs, System.Text.Encoding.UTF8))
+                {
+                    string title = "鐢垫祦鏁版嵁(A)";
+                    sw.WriteLine(title);
+                    if (datas != null)
+                    {
+                        for (int i = 0; i < datas.Count; i++)
+                        {
+                            sw.WriteLine(datas[i].ToString());
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+            }
+        }
     }
 }
diff --git a/Plugin.TestResult/TestResultView.xaml.cs b/Plugin.TestResult/TestResultView.xaml.cs
index 5d452eb..b8bb7d4 100644
--- a/Plugin.TestResult/TestResultView.xaml.cs
+++ b/Plugin.TestResult/TestResultView.xaml.cs
@@ -90,21 +90,21 @@
                 Random random = new Random(i * 13);
                 sb.Elapsed += (s, e) =>
                 {
-
+                    table.RefreshCount(1, 0);
                     table.SetTemperature(random.Next(100));
                     for (int j = 0; j < 3; j++)
                     {
                         table.SetTemperature(j + "89", random.Next(100));
                     }
-                    table.SetOkCount(random.Next(100));
-                    table.SetNgCount(random.Next(100));
+                    //table.SetOkCount(random.Next(100));
+                    //table.SetNgCount(random.Next(100));
                     table.SetStatus(CommonStatus.GetRandomStatus());
                     table.SetStartTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                     table.SetEndTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                     table.SetConsumeTime(random.Next(10000));
+                    tables[0].GetSingleCell(0).AddElectricData(random.Next(100));
 
-
-                    var cell = table.GetSingleCell(random.Next(table.GetSize()));
+                    var cell = tables[0].GetSingleCell(0);//table.GetSingleCell(random.Next(table.GetSize()));
                     cell.SetStatus(CommonStatus.GetRandomStatus());
                     cell.SetInfos(new Info
                     {
@@ -155,7 +155,7 @@
 
         public DataTable GetDataTable(int index)
         {
-            if (index > 0 && index < tables.Length) return tables[index];
+            if (index >= 0 && index < tables.Length) return tables[index];
             return null;
         }
 
@@ -394,6 +394,36 @@
                     tables[ovenIndex].SaveTempFile(folder);
                     return;
                 }
+                if (MethodCode == 13)
+                {
+                    /// 娣诲姞鐢垫祦鏁版嵁
+                    strData = e.uiMsg.StringData;
+                    string[] datas = strData.Split(';');
+                    int ovenIndex = int.Parse(datas[0]);
+                    int cellIndex = int.Parse(datas[1]);
+                    double eData = double.Parse(datas[2]);
+                    tables[ovenIndex].GetSingleCell(cellIndex).AddElectricData(eData);
+                    return;
+                }
+                if (MethodCode == 14)
+                {
+                    /// 娓呯┖鐢垫祦鏁版嵁
+                    strData = e.uiMsg.StringData;
+                    int ovenIndex = int.Parse(strData);
+                    tables[ovenIndex].ClearElectricData();
+                    return;
+                }
+                if (MethodCode == 15)
+                {
+                    /// 娓呯┖鐢垫祦鏁版嵁
+                    strData = e.uiMsg.StringData;
+                    string[] datas = strData.Split(';');
+                    int ovenIndex = int.Parse(datas[0]);
+                    int cellIndex = int.Parse(datas[1]);
+                    string filePath = datas[2];
+                    tables[ovenIndex].GetSingleCell(cellIndex).SaveElectricDataToCSV(filePath);
+                    return;
+                }
             }
             catch (Exception ex)
             {
@@ -447,8 +477,9 @@
             }
         }
 
-        public void SetOvenProduct(int index, string product) { 
-            
+        public void SetOvenProduct(int index, string product)
+        {
+
         }
     }
 }
diff --git a/Plugin.TestResult/ViewControl.xaml.cs b/Plugin.TestResult/ViewControl.xaml.cs
index 3e4794a..548299e 100644
--- a/Plugin.TestResult/ViewControl.xaml.cs
+++ b/Plugin.TestResult/ViewControl.xaml.cs
@@ -72,14 +72,19 @@
             testResultView.testApp.ExecutionClosed += new _ApplicationMgrEvents_ExecutionClosedEventHandler(this.axApplicationMgr_ExecutionClosed);
         }
 
+        public TestResultView View
+        {
+            get => testResultView;
+        }
+
         public override void InitFinish()
         {
             base.InitFinish();
             string path = Path.Combine(BaseFolder, "Count.ini");
             testResultView.SetCountIniPath(path);
             testResultView.InitMainGrid();
-            LoadProduct();
             testResultView.InitTestStandEngine();
+            LoadProduct();
         }
 
         public override void DoClose(object sender, EventArgs e)
@@ -167,7 +172,13 @@
             }
             testResultView.SetProductSource(productSource);
 
-            if (products.Count > 0)
+            string model = testResultView.engine.Globals.GetValString("ProductModel", 0);
+            if (!string.IsNullOrEmpty(model))
+            {
+                this.modelSelect.SelectedItem = model;
+                testResultView.SetCurrentProduct(model);
+            }
+            else if (products.Count > 0)
             {
                 this.modelSelect.SelectedIndex = 0;
                 testResultView.SetCurrentProduct(products[0].Name);
@@ -178,7 +189,8 @@
         {
             try
             {
-                List<ParameterData> parameters = ProductManager.GetParametersByProductName(this.modelSelect.SelectedItem.ToString());
+                string currentModel = this.modelSelect.SelectedItem.ToString();
+                List<ParameterData> parameters = ProductManager.GetParametersByProductName(currentModel);
                 //MessageBox.Show("ParaFile:" + ParaFile + "ParaCount:" + this.parameterManager.Parameters.Count.ToString());
                 //this.TestTemperature = Convert.ToDouble(this.parameterManager.Find("TestTemperature").ParmValue);
                 //this.TestTime = Convert.ToInt32(this.parameterManager.Find("TestTime").ParmValue);
@@ -187,6 +199,9 @@
                 //this.Time_Heating_Low = Convert.ToDouble(this.parameterManager.Find("Time_Heat_Low").ParmValue);
                 //this.Time_Heating_High = Convert.ToDouble(this.parameterManager.Find("Time_Heat_High").ParmValue);
                 testResultView.testSeqFile = parameters.FirstOrDefault(p => p.Name == "TestSequence")?.Value;
+
+                testResultView.engine.Globals.SetValString("ProductModel", 0, currentModel);
+                testResultView.engine.CommitGlobalsToDisk(promptOnSaveConflicts: false);
             }
             catch (Exception ex)
             {
diff --git a/WPFProject/App.config b/WPFProject/App.config
index 7b2d8dc..2f61dd5 100644
--- a/WPFProject/App.config
+++ b/WPFProject/App.config
@@ -3,7 +3,7 @@
 	<configSections>
 		<section name="TestResultConfig" type="System.Configuration.SingleTagSectionHandler" />
 	</configSections>
-	<TestResultConfig Row="1" Column="2" PortStart="6660" />
+	<TestResultConfig Row="2" Column="3" PortStart="6660" PositionColumn="3" PositionCount="18" />
 	<startup>
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
 	</startup>
diff --git a/WPFProject/TextFile1.txt b/WPFProject/BuildCmd.txt
similarity index 95%
rename from WPFProject/TextFile1.txt
rename to WPFProject/BuildCmd.txt
index a1ea64f..d34eeb2 100644
--- a/WPFProject/TextFile1.txt
+++ b/WPFProject/BuildCmd.txt
@@ -13,6 +13,7 @@
 move /y "$(TargeDir)Plugin.TsExecution.dll" $(TargeDir)Plugin\Plugin.TsExecution.dll"
 move /y "$(TargeDir)Plugin.ServoManage.dll" $(TargeDir)Plugin\Plugin.ServoManage.dll"
 move /y "$(TargeDir)Plugin.DOControl.dll" $(TargeDir)Plugin\Plugin.DOControl.dll"
+move /y "$(TargeDir)Plugin.TestBuilder.dll" $(TargeDir)Plugin\Plugin.TestBuilder.dll"
 
 setlocal enabledelayedexpansion
 
diff --git a/WPFProject/Controls/MainTabControl.xaml.cs b/WPFProject/Controls/MainTabControl.xaml.cs
index 41e8557..874fe44 100644
--- a/WPFProject/Controls/MainTabControl.xaml.cs
+++ b/WPFProject/Controls/MainTabControl.xaml.cs
@@ -1,6 +1,5 @@
 锘縰sing HMI.Base;
 using HMI.Core.Api;
-using Microsoft.DwayneNeed.Interop;
 using Panuon.WPF.UI;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
@@ -9,9 +8,6 @@
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
-using System.Windows.Forms.Integration;
-using System.Windows.Media;
-using WPFProject.UI;
 
 namespace WPFProject.Controls
 {
@@ -42,7 +38,6 @@
         private WinFormHolder winFormHolder;
         public MainTabControl()
         {
-            IPlugin plugin = new WorkControl();
             MenuItems = new ObservableCollection<PluginInfo>(PluginLoader.GetLoader().Menus);
             SubMenuItems = MenuItems[0].Children;
             this.DataContext = this;
diff --git a/WPFProject/Controls/MenuTabControl.xaml.cs b/WPFProject/Controls/MenuTabControl.xaml.cs
index 71a1e5e..8d0b400 100644
--- a/WPFProject/Controls/MenuTabControl.xaml.cs
+++ b/WPFProject/Controls/MenuTabControl.xaml.cs
@@ -1,11 +1,10 @@
-锘縰sing System;
+锘縰sing HMI.Core.Api;
+using System;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Runtime.CompilerServices;
 using System.Windows;
 using System.Windows.Controls;
-using HMI.Core.Api;
-using WPFProject.UI;
 
 namespace WPFProject.Controls
 {
@@ -99,26 +98,26 @@
 
         public MenuTabControl()
         {
-            IPlugin plugin = new WorkControl();
-            ChildTabChanged += plugin.OnTabChange;
+            //IPlugin plugin = new WorkControl();
+            //ChildTabChanged += plugin.OnTabChange;
 
-            DataContext = this;
-            InitializeComponent();
-            Items = new ObservableCollection<IconTabItem> {
-            new IconTabItem(){
-                Header="111",
-                Children = new ObservableCollection<IconTabItem>{
-                    new IconTabItem(){
-                        Header = "112",
-                        Content = plugin
-                    }
-                }
-            },
-            new IconTabItem(){
-                Header="222",
-                Children = new ObservableCollection<IconTabItem>()
-            }
-            };
+            //DataContext = this;
+            //InitializeComponent();
+            //Items = new ObservableCollection<IconTabItem> {
+            //new IconTabItem(){
+            //    Header="111",
+            //    Children = new ObservableCollection<IconTabItem>{
+            //        new IconTabItem(){
+            //            Header = "112",
+            //            Content = plugin
+            //        }
+            //    }
+            //},
+            //new IconTabItem(){
+            //    Header="222",
+            //    Children = new ObservableCollection<IconTabItem>()
+            //}
+            //};
         }
 
         private void UserControl_Loaded(object sender, RoutedEventArgs e)
diff --git a/WPFProject/Entity/PluginSettingInfo.cs b/WPFProject/Entity/PluginSettingInfo.cs
deleted file mode 100644
index 4a61b29..0000000
--- a/WPFProject/Entity/PluginSettingInfo.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WPFProject.Entity
-{
-    public class PluginSettingInfo
-    {
-        public string Name { get; set; }
-        public object View { get; set; }
-        public object Setting { get; set; }
-    }
-}
diff --git a/WPFProject/Forms/Form1.Designer.cs b/WPFProject/Forms/Form1.Designer.cs
deleted file mode 100644
index 5f38fef..0000000
--- a/WPFProject/Forms/Form1.Designer.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-锘�
-namespace WPFProject.Forms
-{
-    partial class Form1
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.elementHost1 = new System.Windows.Forms.Integration.ElementHost();
-            this.SuspendLayout();
-            // 
-            // elementHost1
-            // 
-            this.elementHost1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.elementHost1.Location = new System.Drawing.Point(0, 0);
-            this.elementHost1.Name = "elementHost1";
-            this.elementHost1.Size = new System.Drawing.Size(800, 450);
-            this.elementHost1.TabIndex = 0;
-            this.elementHost1.Text = "elementHost1";
-            this.elementHost1.Child = null;
-            // 
-            // Form1
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(800, 450);
-            this.Controls.Add(this.elementHost1);
-            this.Name = "Form1";
-            this.Text = "Form1";
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Integration.ElementHost elementHost1;
-    }
-}
\ No newline at end of file
diff --git a/WPFProject/Forms/Form1.cs b/WPFProject/Forms/Form1.cs
deleted file mode 100644
index 3a6c760..0000000
--- a/WPFProject/Forms/Form1.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace WPFProject.Forms
-{
-    public partial class Form1 : Form
-    {
-        public Form1()
-        {
-            InitializeComponent();
-        }
-
-        public void AddControl(System.Windows.Controls.Control WPFControl)
-        {
-            elementHost1.Child = WPFControl;
-        }
-    }
-}
diff --git a/WPFProject/MainWindow.xaml b/WPFProject/MainWindow.xaml
index e4a2783..c91073a 100644
--- a/WPFProject/MainWindow.xaml
+++ b/WPFProject/MainWindow.xaml
@@ -5,7 +5,6 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:WPFProject"
         xmlns:ctl="clr-namespace:WPFProject.Controls"
-        xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
         xmlns:utils="clr-namespace:WPFProject.Utils"
         WindowStyle="None"
         ResizeMode="NoResize"
diff --git a/WPFProject/Models/NotifyBase.cs b/WPFProject/Models/NotifyBase.cs
deleted file mode 100644
index 4dd2709..0000000
--- a/WPFProject/Models/NotifyBase.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Linq;
-
-namespace WPFProject.Models
-{
-    public class NotifyBase : INotifyPropertyChanged
-    {
-        public event PropertyChangedEventHandler PropertyChanged;
-
-        protected virtual void RaisePropertyChanged(string name)
-        {
-            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
-        }
-
-        protected void RaiseAndSetIfChanged<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
-        {
-            old = @new;
-            if (propertyName != null)
-            {
-                RaisePropertyChanged(propertyName);
-            }
-        }
-    }
-
-}
diff --git a/WPFProject/UI/StepSetting.xaml b/WPFProject/UI/StepSetting.xaml
deleted file mode 100644
index 8c8cb5c..0000000
--- a/WPFProject/UI/StepSetting.xaml
+++ /dev/null
@@ -1,39 +0,0 @@
-锘�<UserControl x:Class="WPFProject.UI.StepSetting"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.UI"
-             xmlns:hc="https://handyorg.github.io/handycontrol"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
-    <UserControl.Resources>
-        <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
-                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
-                <ResourceDictionary Source="/HMI.UI;component/Style/colors.xaml"/>
-                <ResourceDictionary Source="/WPFProject;component/Style/MainTab.xaml"/>
-            </ResourceDictionary.MergedDictionaries>
-
-            <Style TargetType="Label"></Style>
-            <Style TargetType="ListView"></Style>
-            <Style TargetType="TabControl"/>
-
-            <Color x:Key="DarkPrimaryColor">#e17933</Color>
-            <Color x:Key="PrimaryColor">#e17933</Color>
-            <Color x:Key="PrimaryTextColor">#e17933</Color>
-            <Color x:Key="SecondaryTitleColor">#e17933</Color>
-            <Color x:Key="BorderColor">#e17933</Color>
-        </ResourceDictionary>
-    </UserControl.Resources>
-    
-    <Grid>
-        <TabControl Style="{StaticResource ControlStyle}" TabStripPlacement="Left">
-            <TabItem Header="鍑芥暟鍒楄〃">
-            </TabItem>
-            <TabItem Header="鍙橀噺鍒楄〃">
-            </TabItem>
-        </TabControl>
-    </Grid>
-</UserControl>
diff --git a/WPFProject/UI/StepSetting.xaml.cs b/WPFProject/UI/StepSetting.xaml.cs
deleted file mode 100644
index 716a115..0000000
--- a/WPFProject/UI/StepSetting.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace WPFProject.UI
-{
-    /// <summary>
-    /// StepSetting.xaml 鐨勪氦浜掗�昏緫
-    /// </summary>
-    public partial class StepSetting : UserControl
-    {
-        public StepSetting()
-        {
-            InitializeComponent();
-        }
-    }
-}
diff --git a/WPFProject/UI/Test/FunctionSetting.xaml b/WPFProject/UI/Test/FunctionSetting.xaml
deleted file mode 100644
index 794b0ea..0000000
--- a/WPFProject/UI/Test/FunctionSetting.xaml
+++ /dev/null
@@ -1,54 +0,0 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.FunctionSetting"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WPFProject.UI.Test"
-             xmlns:dd="urn:gong-wpf-dragdrop"
-             
-             xmlns:m="clr-namespace:WPFProject.Models"
-             xmlns:util="clr-namespace:WPFProject.Utils"
-             xmlns:hc="https://handyorg.github.io/handycontrol"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
-    <UserControl.Resources>
-        <ResourceDictionary>
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
-                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
-                <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
-                <ResourceDictionary Source="/WPFProject;component/Style/CommonTree.xaml"/>
-                <ResourceDictionary Source="/WPFProject;component/Style/MainTab.xaml"/>
-            </ResourceDictionary.MergedDictionaries>
-            <Style TargetType="Label"/>
-
-            <Style TargetType="TabControl"/>
-            <Style TargetType="TreeView">
-            </Style>
-        </ResourceDictionary>
-    </UserControl.Resources>
-
-    <Grid>
-        <TabControl Style="{StaticResource ControlStyle}">
-            <TabItem Header="鍑芥暟鍒楄〃">
-                <StackPanel>
-                    <hc:SearchBar hc:InfoElement.Placeholder="杈撳叆鏂囨湰鏌ヨ"  Style="{StaticResource SearchBarPlus}" Margin="10,5,10,5"/>
-                    <TreeView BorderThickness="0" ItemsSource="{Binding FuncModels}"
-                              dd:DragDrop.IsDragSource="True"
-                                dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
-                                dd:DragDrop.UseDefaultDragAdorner="True"
-                                dd:DragDrop.DragHandler="{Binding dragHandler}"
-                              >
-                        <TreeView.ItemTemplate>
-                            <HierarchicalDataTemplate DataType="{x:Type m:FuncModel}" ItemsSource="{Binding Path=Children}">
-                                <ContentControl Content="{Binding Name}"/>
-                            </HierarchicalDataTemplate>
-                        </TreeView.ItemTemplate>
-                    </TreeView>
-                </StackPanel>
-            </TabItem>
-            <TabItem Header="鍙橀噺鍒楄〃">
-            </TabItem>
-        </TabControl>
-    </Grid>
-</UserControl>
diff --git a/WPFProject/UI/WorkWindow.xaml b/WPFProject/UI/WorkWindow.xaml
index b535883..7a1b428 100644
--- a/WPFProject/UI/WorkWindow.xaml
+++ b/WPFProject/UI/WorkWindow.xaml
@@ -4,7 +4,6 @@
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:WPFProject.UI"
-        xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
         mc:Ignorable="d"
         Loaded="Window_Loaded"
         Height="450" Width="800">
@@ -15,19 +14,17 @@
         </Grid.RowDefinitions>
         <TextBlock Text="99999999999999"/>
         <!--鍋滈潬甯冨眬锛岃鑿滃崟鏍忓拰宸ュ叿鏍忎綅浜庣獥鍙i《閮�-->
-        <mdi:MdiContainer Name="Container" Grid.Row="1">
-            <mdi:MdiContainer.Menu>
-                <Menu DockPanel.Dock="Top">
-                    <MenuItem Header="鏂囦欢">
-                        <!--鑿滃崟椤逛负MenuItem锛屾枃瀛椾娇鐢ㄥ睘鎬� Header-->
-                        <MenuItem Name="newFile" Header="鏂板缓"></MenuItem>
+        <Grid Name="Container" Grid.Row="1">
+            <Menu DockPanel.Dock="Top">
+                <MenuItem Header="鏂囦欢">
+                    <!--鑿滃崟椤逛负MenuItem锛屾枃瀛椾娇鐢ㄥ睘鎬� Header-->
+                    <MenuItem Name="newFile" Header="鏂板缓"></MenuItem>
 
-                    </MenuItem>
-                    <MenuItem Header="鑺傜偣"></MenuItem>
-                    <MenuItem Header="绐楀彛" x:Name="WindowsMenu" x:FieldModifier="private" />
-                    <MenuItem Header="鍏充簬"></MenuItem>
-                </Menu>
-            </mdi:MdiContainer.Menu>
-        </mdi:MdiContainer>
+                </MenuItem>
+                <MenuItem Header="鑺傜偣"></MenuItem>
+                <MenuItem Header="绐楀彛" x:Name="WindowsMenu" x:FieldModifier="private" />
+                <MenuItem Header="鍏充簬"></MenuItem>
+            </Menu>
+        </Grid>
     </Grid>
 </Window>
diff --git a/WPFProject/UI/WorkWindow.xaml.cs b/WPFProject/UI/WorkWindow.xaml.cs
index 21241a0..9eb3ca5 100644
--- a/WPFProject/UI/WorkWindow.xaml.cs
+++ b/WPFProject/UI/WorkWindow.xaml.cs
@@ -1,18 +1,4 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-using WPF.MDI;
-using WPFProject.Utils;
+锘縰sing System.Windows;
 
 namespace WPFProject.UI
 {
diff --git a/WPFProject/Utils/CommonLogger.cs b/WPFProject/Utils/CommonLogger.cs
index fb0b770..5232b73 100644
--- a/WPFProject/Utils/CommonLogger.cs
+++ b/WPFProject/Utils/CommonLogger.cs
@@ -6,6 +6,9 @@
 
 namespace WPFProject.Utils
 {
+    /// <summary>
+    /// 寰�sqlite鍐欐棩蹇�
+    /// </summary>
     class CommonLogger : ILogWriter
     {
         private static ILog log = LogManager.GetLogger("CommonLogger");
diff --git a/WPFProject/Utils/LogCleanner.cs b/WPFProject/Utils/LogCleanner.cs
index d088a1a..e4a82dc 100644
--- a/WPFProject/Utils/LogCleanner.cs
+++ b/WPFProject/Utils/LogCleanner.cs
@@ -9,6 +9,9 @@
 
 namespace WPFProject.Utils
 {
+    /// <summary>
+    /// 鑷姩鏃ュ織娓呯悊
+    /// </summary>
     public class LogCleanner
     {
 
@@ -24,7 +27,8 @@
             timer.Interval = ms;
             timer.Elapsed += Timer_Elapsed;
             timer.Enabled = true;
-            Task.Run(() => {
+            Task.Run(() =>
+            {
                 Clean();
             });
         }
diff --git a/WPFProject/Utils/XmlUtil.cs b/WPFProject/Utils/XmlUtil.cs
deleted file mode 100644
index 5780a16..0000000
--- a/WPFProject/Utils/XmlUtil.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-锘縰sing System;
-using System.IO;
-using System.Xml.Serialization;
-
-namespace WPFProject.Utils
-{
-    public class XmlUtil
-    {
-        /// <summary>
-        /// 灏嗗璞″簭鍒楀寲鍒癤ml鏂囦欢涓�
-        /// </summary>
-        /// <param name="data">瀵硅薄</param>
-        /// <param name="filePath">xml璺緞</param>
-        public static void SerialToFile(object data, string filePath)
-        {
-            XmlSerializer serializer = new XmlSerializer(data.GetType());
-            string content = string.Empty;
-            //serialize
-            using (StringWriter writer = new StringWriter())
-            {
-                serializer.Serialize(writer, data);
-                content = writer.ToString();
-            }
-            //save to file
-            using (StreamWriter stream_writer = new StreamWriter(filePath))
-            {
-                stream_writer.Write(content);
-            }
-        }
-
-        public static T DeserialFromXml<T>(string filePath)
-        {
-            XmlSerializer serializer = new XmlSerializer(typeof(T));
-            using (StreamReader reader = new StreamReader(filePath))
-            {
-                return (T) serializer.Deserialize(reader);
-            }
-        }
-
-    }
-}
diff --git a/WPFProject/ViewModels/ProgramListViewModel.cs b/WPFProject/ViewModels/ProgramListViewModel.cs
deleted file mode 100644
index efbb5b3..0000000
--- a/WPFProject/ViewModels/ProgramListViewModel.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Media;
-using System.Windows;
-using WPFProject.Models;
-using WPFProject.UI.Test;
-
-namespace WPFProject.ViewModels
-{
-    public class ProgramListViewModel : NotifyBase
-    {
-
-
-    }
-}
diff --git a/WPFProject/WPFProject.csproj b/WPFProject/WPFProject.csproj
index 51dae9e..4be10ba 100644
--- a/WPFProject/WPFProject.csproj
+++ b/WPFProject/WPFProject.csproj
@@ -98,15 +98,6 @@
     <ApplicationManifest>Properties\app.manifest</ApplicationManifest>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="AIStudio.Wpf.Controls, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>packages\AIStudio.Wpf.Controls.1.2.2\lib\net461\AIStudio.Wpf.Controls.dll</HintPath>
-    </Reference>
-    <Reference Include="GongSolutions.WPF.DragDrop, Version=3.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
-      <HintPath>packages\gong-wpf-dragdrop.3.2.1\lib\net47\GongSolutions.WPF.DragDrop.dll</HintPath>
-    </Reference>
-    <Reference Include="HandyControl, Version=3.4.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
-      <HintPath>packages\HandyControl.3.4.0\lib\net472\HandyControl.dll</HintPath>
-    </Reference>
     <Reference Include="log4net, Version=3.0.4.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
       <HintPath>packages\log4net.3.0.4\lib\net462\log4net.dll</HintPath>
     </Reference>
@@ -115,9 +106,6 @@
     </Reference>
     <Reference Include="Microsoft.DwayneNeed.Win32">
       <HintPath>..\Libs\Microsoft.DwayneNeed.Win32.dll</HintPath>
-    </Reference>
-    <Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -135,41 +123,6 @@
     <Reference Include="System.Configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
-    <Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
-      <HintPath>packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
-      <Private>True</Private>
-      <Private>True</Private>
-    </Reference>
     <Reference Include="System.Web" />
     <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Windows.Forms" />
@@ -186,9 +139,6 @@
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
     <Reference Include="WindowsFormsIntegration" />
-    <Reference Include="WPF.MDI, Version=1.1.4.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>packages\WPF.MDI.1.1.4\lib\net40-client\WPF.MDI.dll</HintPath>
-    </Reference>
   </ItemGroup>
   <ItemGroup>
     <ApplicationDefinition Include="App.xaml">
@@ -202,9 +152,6 @@
     <Compile Include="Controls\HolderForm.Designer.cs">
       <DependentUpon>HolderForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="Controls\InnerWindow.xaml.cs">
-      <DependentUpon>InnerWindow.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Controls\MainTabControl.xaml.cs">
       <DependentUpon>MainTabControl.xaml</DependentUpon>
     </Compile>
@@ -214,91 +161,42 @@
     <Compile Include="Controls\MaskControl.Designer.cs">
       <DependentUpon>MaskControl.cs</DependentUpon>
     </Compile>
-    <Compile Include="Controls\MinInnerWindow.xaml.cs">
-      <DependentUpon>MinInnerWindow.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Controls\WinFormHolder.xaml.cs">
       <DependentUpon>WinFormHolder.xaml</DependentUpon>
     </Compile>
     <Compile Include="Entity\PluginLoadMessage.cs" />
-    <Compile Include="Entity\PluginSettingInfo.cs" />
-    <Compile Include="Forms\Form1.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="Forms\Form1.Designer.cs">
-      <DependentUpon>Form1.cs</DependentUpon>
-    </Compile>
     <Compile Include="LoadingWindow.xaml.cs">
       <DependentUpon>LoadingWindow.xaml</DependentUpon>
     </Compile>
     <Compile Include="Login.xaml.cs">
       <DependentUpon>Login.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Models\CanvasPosition.cs" />
-    <Compile Include="Models\FuncModel.cs" />
-    <Compile Include="Models\NotifyBase.cs" />
-    <Compile Include="Models\Variable.cs" />
-    <Compile Include="Models\Program.cs" />
-    <Compile Include="Models\Sequence.cs" />
-    <Compile Include="Models\Step.cs" />
     <Compile Include="PanuonWindow.xaml.cs">
       <DependentUpon>PanuonWindow.xaml</DependentUpon>
     </Compile>
     <Compile Include="TestWindow.xaml.cs">
       <DependentUpon>TestWindow.xaml</DependentUpon>
     </Compile>
-    <Compile Include="UI\BottomBar.xaml.cs">
-      <DependentUpon>BottomBar.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="UI\StepSetting.xaml.cs">
-      <DependentUpon>StepSetting.xaml</DependentUpon>
-    </Compile>
     <Compile Include="UI\TestWindow.xaml.cs">
       <DependentUpon>TestWindow.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="UI\Test\FunctionSetting.xaml.cs">
-      <DependentUpon>FunctionSetting.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="UI\Test\ProgramList.xaml.cs">
-      <DependentUpon>ProgramList.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="UI\Test\SequnceList.xaml.cs">
-      <DependentUpon>SequnceList.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="UI\WorkControl.xaml.cs">
-      <DependentUpon>WorkControl.xaml</DependentUpon>
     </Compile>
     <Compile Include="UI\WorkWindow.xaml.cs">
       <DependentUpon>WorkWindow.xaml</DependentUpon>
     </Compile>
     <Compile Include="Utils\BinUtil.cs" />
-    <Compile Include="Utils\CanvasHelper.cs" />
     <Compile Include="Utils\CommonLogger.cs" />
-    <Compile Include="Utils\DdDragHandler.cs" />
-    <Compile Include="Utils\DdDropHandler.cs" />
     <Compile Include="Utils\Encryptor.cs" />
     <Compile Include="Utils\LogCleanner.cs" />
     <Compile Include="Utils\MainToastHandler.cs" />
-    <Compile Include="Utils\Resize.cs" />
     <Compile Include="Utils\Win32Helper.cs" />
-    <Compile Include="Utils\XmlUtil.cs" />
-    <Compile Include="ViewModels\ProgramListViewModel.cs" />
     <Compile Include="Window1.xaml.cs">
       <DependentUpon>Window1.xaml</DependentUpon>
     </Compile>
-    <Page Include="Controls\InnerWindow.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
     <Page Include="Controls\MainTabControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="Controls\MenuTabControl.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="Controls\MinInnerWindow.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -334,31 +232,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="UI\BottomBar.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="UI\StepSetting.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
     <Page Include="UI\TestWindow.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="UI\Test\FunctionSetting.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="UI\Test\ProgramList.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="UI\Test\SequnceList.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="UI\WorkControl.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
@@ -420,7 +294,7 @@
     <Content Include="Icon\JingCeLogo2.png">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
-    <Resource Include="TextFile1.txt" />
+    <Resource Include="BuildCmd.txt" />
     <Resource Include="JingCeLogo2.ico" />
     <Resource Include="Icon\t1.png" />
     <Resource Include="Icon\t2.png" />
@@ -433,9 +307,6 @@
     <Resource Include="Resources\JingCeLogo.png" />
     <EmbeddedResource Include="Controls\HolderForm.resx">
       <DependentUpon>HolderForm.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Forms\Form1.resx">
-      <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
@@ -570,6 +441,10 @@
       <Project>{1853e00f-6865-4bc6-974b-6a5e1c00bafe}</Project>
       <Name>Plugin.ServoManage</Name>
     </ProjectReference>
+    <ProjectReference Include="..\Plugin.TestBuilder\Plugin.TestBuilder.csproj">
+      <Project>{30201ec1-9a82-48db-94b9-bd5c1190228b}</Project>
+      <Name>Plugin.TestBuilder</Name>
+    </ProjectReference>
     <ProjectReference Include="..\Plugin.TestResult\Plugin.TestResult.csproj">
       <Project>{7375b74c-b6bf-4814-9838-e1caacad1897}</Project>
       <Name>Plugin.TestResult</Name>
@@ -596,6 +471,7 @@
       <Install>false</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PostBuildEvent>move /y "$(TargeDir)HMI.Core.dll" $(TargeDir)Libs\HMI.Core.dll"
@@ -613,6 +489,7 @@
 move /y "$(TargeDir)Plugin.TsExecution.dll" $(TargeDir)Plugin\Plugin.TsExecution.dll"
 move /y "$(TargeDir)Plugin.ServoManage.dll" $(TargeDir)Plugin\Plugin.ServoManage.dll"
 move /y "$(TargeDir)Plugin.DOControl.dll" $(TargeDir)Plugin\Plugin.DOControl.dll"
+move /y "$(TargeDir)Plugin.TestBuilder.dll" $(TargeDir)Plugin\Plugin.TestBuilder.dll"
 
 setlocal enabledelayedexpansion
 
diff --git a/WPFProject/WPFProject.sln b/WPFProject/WPFProject.sln
index cbbe457..a214bd0 100644
--- a/WPFProject/WPFProject.sln
+++ b/WPFProject/WPFProject.sln
@@ -41,9 +41,15 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plugin.ServoManage", "..\Plugin.ServoManage\Plugin.ServoManage.csproj", "{1853E00F-6865-4BC6-974B-6A5E1C00BAFE}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpcInterface", "..\..\HMI.Old\OPCInterface\OpcInterface\OpcInterface.csproj", "{E1464149-2C0A-499D-AB90-0C72E6ED1C53}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plugin.DOControl", "..\Plugin.DOControl\Plugin.DOControl.csproj", "{306A83DC-A7DB-4057-BAA7-477D8756F5D9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectionUtil", "..\..\ConnectionUtil\ConnectionUtil\ConnectionUtil.csproj", "{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OPCClient", "..\OPCClient\OPCClient.csproj", "{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plugin.TestBuilder", "..\Plugin.TestBuilder\Plugin.TestBuilder.csproj", "{30201EC1-9A82-48DB-94B9-BD5C1190228B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plugin.SNGenerateTool", "..\Plugin.SNGenerateTool\Plugin.SNGenerateTool.csproj", "{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -205,22 +211,46 @@
 		{1853E00F-6865-4BC6-974B-6A5E1C00BAFE}.Release|Any CPU.Build.0 = Release|Any CPU
 		{1853E00F-6865-4BC6-974B-6A5E1C00BAFE}.Release|x64.ActiveCfg = Release|Any CPU
 		{1853E00F-6865-4BC6-974B-6A5E1C00BAFE}.Release|x64.Build.0 = Release|Any CPU
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Debug|x64.ActiveCfg = Debug|x64
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Debug|x64.Build.0 = Debug|x64
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Release|Any CPU.Build.0 = Release|Any CPU
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Release|x64.ActiveCfg = Release|Any CPU
-		{E1464149-2C0A-499D-AB90-0C72E6ED1C53}.Release|x64.Build.0 = Release|Any CPU
 		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Debug|x64.Build.0 = Debug|Any CPU
+		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Debug|x64.ActiveCfg = Debug|x64
+		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Debug|x64.Build.0 = Debug|x64
 		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Release|Any CPU.Build.0 = Release|Any CPU
 		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Release|x64.ActiveCfg = Release|Any CPU
 		{306A83DC-A7DB-4057-BAA7-477D8756F5D9}.Release|x64.Build.0 = Release|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Debug|x64.Build.0 = Debug|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Release|x64.ActiveCfg = Release|Any CPU
+		{D0806FA6-3F6D-4304-81B8-EAD9DA7CB5B2}.Release|x64.Build.0 = Release|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Debug|x64.Build.0 = Debug|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Release|x64.ActiveCfg = Release|Any CPU
+		{E5740BB5-9FC6-4A20-B7C2-CC90C281ED05}.Release|x64.Build.0 = Release|Any CPU
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Debug|x64.ActiveCfg = Debug|x64
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Debug|x64.Build.0 = Debug|x64
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Release|x64.ActiveCfg = Release|Any CPU
+		{30201EC1-9A82-48DB-94B9-BD5C1190228B}.Release|x64.Build.0 = Release|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Debug|x64.Build.0 = Debug|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Release|x64.ActiveCfg = Release|Any CPU
+		{3E18AF3F-8212-45A5-A6E3-F5B1CFA3AFAE}.Release|x64.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/WPFProject/packages.config b/WPFProject/packages.config
index f5f1b25..80bed4e 100644
--- a/WPFProject/packages.config
+++ b/WPFProject/packages.config
@@ -1,19 +1,7 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="AIStudio.Wpf.Controls" version="1.2.2" targetFramework="net472" />
-  <package id="gong-wpf-dragdrop" version="3.2.1" targetFramework="net472" />
-  <package id="HandyControl" version="3.4.0" targetFramework="net472" />
   <package id="log4net" version="3.0.4" targetFramework="net472" />
-  <package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.39" targetFramework="net472" />
   <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
   <package id="Panuon.WPF" version="1.1.3" targetFramework="net472" />
   <package id="Panuon.WPF.UI" version="1.3.0.2" targetFramework="net472" />
-  <package id="System.IO" version="4.3.0" targetFramework="net472" />
-  <package id="System.Net.Http" version="4.3.4" targetFramework="net472" />
-  <package id="System.Runtime" version="4.3.0" targetFramework="net472" />
-  <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
-  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
-  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
-  <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
-  <package id="WPF.MDI" version="1.1.4" targetFramework="net472" />
 </packages>
\ No newline at end of file

--
Gitblit v1.9.1