From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点

---
 HMI.UnitTest/MainWindow.xaml.cs |   44 ++++++++++++++++++++++++++++++++------------
 1 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/HMI.UnitTest/MainWindow.xaml.cs b/HMI.UnitTest/MainWindow.xaml.cs
index 4dc0549..d0fbc30 100644
--- a/HMI.UnitTest/MainWindow.xaml.cs
+++ b/HMI.UnitTest/MainWindow.xaml.cs
@@ -2,8 +2,11 @@
 using HMI.Core.Api;
 using HMI.Core.Util;
 using HMI.Simple.Util;
+using HslCommunication.Core.Pipe;
+using HslCommunication.Profinet.Siemens;
 using log4net;
 using Panuon.WPF.UI;
+using PLCHelper;
 using Plugin.DataBoard;
 using Plugin.TestResult_WPF;
 using Plugin.TsExecution;
@@ -11,7 +14,7 @@
 using System;
 using System.IO;
 using System.Windows;
-using Util.ManualDebug;
+using System.Xml.Linq;
 namespace UnitTest
 {
     /// <summary>
@@ -22,16 +25,32 @@
         private ILog log = LogManager.GetLogger("UnitTest");
         public MainWindow()
         {
-            ProductModelHelper.GetModelBySNR("cc123", out string model, out string msg);
-            LangUtil.Load();
-            InitializeComponent();
-            //RebuildDb();
-            border2.Child = new TcpDebugger();
+            //ProductModelHelper.GetModelBySNR("cc123", out string model, out string msg);
+            //LangUtil.Load();
+            //InitializeComponent();
+            ////RebuildDb();
+            //border2.Child = new TcpDebugger();
 
-           
+            var client = new SiemensS7Net(SiemensPLCS.S1500);
+            PipeTcpNet pipeTcpNet = new PipeTcpNet("127.0.0.1", 102);
+            pipeTcpNet.ConnectTimeOut = 200;
+            pipeTcpNet.ReceiveTimeOut = 200;
+            client.CommunicationPipe = pipeTcpNet;
+            client.ConnectServer();
+
+            var ss = new IntReader(client, "DB10.DBW100", 0);
+            ss.DataChanged += Ss_DataChanged;
+            ss.Run();
+
+
 
 
             //page.Children.Add(new UserControl1());
+        }
+
+        private void Ss_DataChanged(object sender, DataChangedArg<int> e)
+        {
+            MessageBox.Show($"{e.oldValue} => {e.newValue}");
         }
 
         TcpClientWrapper tcpClient;
@@ -128,12 +147,13 @@
 
         private void Button_Click(object sender, RoutedEventArgs e)
         {
-            var win = new ManualDebug()
-            {
-                seqPath = "C:\\Users\\chrry\\Desktop\\鎵嬪姩璋冭瘯绀轰緥.seq"
-            };
+            //var win = new ManualDebug()
+            //{
+            //    seqPath = "C:\\Users\\chrry\\Desktop\\鎵嬪姩璋冭瘯绀轰緥.seq"
+            //};
 
-            win.Show();
+            //win.Show();
+
             //Task.Run(() =>
             //{
             //    for (int j = 0; j < 1000; j++)

--
Gitblit v1.9.1