From 8dfba1cab2ea59fca7b2c9cfad2da68e9f49b440 Mon Sep 17 00:00:00 2001
From: czw <selecti@yeah.net>
Date: 星期三, 09 七月 2025 16:39:40 +0800
Subject: [PATCH] 1

---
 2025年6月12日/AuxAllWCS/Build/Project/代码/界面事件.cs |   95 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 65 insertions(+), 30 deletions(-)

diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs"
index e4d9dda..277fb05 100644
--- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs"
+++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs"
@@ -63,6 +63,7 @@
             }
             View1_Init(sender, e);
 
+
             /// <summary>
             /// 绋嬪簭鐗囨:鍒濆鍖栭厤缃�             /// 鎻忚堪:
@@ -794,35 +795,37 @@
                 }
                 ExitJudgeStack.TryPop(out int exitJudgeVal);
             });
-            //鎵ц澶氭
-            for (int iii = 0; iii < 1; iii++)
+            /// <summary>
+            /// 绋嬪簭鐗囨:Ipping
+            /// 鎻忚堪:妫�祴IP鍦板潃閫氭柇
+            /// </summary>
+            System.Threading.Tasks.Task.Factory.StartNew(() =>
             {
-                if (IsExitApp) { break; }
-                try
+                System.Threading.Thread.CurrentThread.IsBackground = true;
+                ExitJudgeStack.Push(0);
+                //涓�洿鎵ц锛岀洿鍒版弧瓒崇粨鏉熸潯浠�+                while (true)
                 {
-                    #region    [鑴氭湰][20250323151832119][涓氬姟閫昏緫.Program4]
+                    if (IsExitApp) { break; }
+                    try
+                    {
+                        #region    [鑴氭湰][20250323151832119][涓氬姟閫昏緫.Ipping]
 
-                    //LogHelper.Info($"<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>");
-                    //LogHelper.Info($"<<<<<<<<<<<<<<<<<绋嬪簭路鍚姩>>>>>>>>>>>>>>");
-
-                    //// 浣跨敤鎷︽埅鍣�-                    //var interceptor = new ConsoleInterceptor();
-                    //Console.SetOut(interceptor);
-
-                    //LogHelper.Info($"<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>");
-                    //AnsiConsole.Markup("[underline red]Hello[/] World!");
-                    // AnsiConsole.Markup("[underline red]Hello[/] World!");
-                    #endregion [鑴氭湰][20250323151832119][涓氬姟閫昏緫.Program4]
+                        //var hkr = AutoThread.InvokeMethod(AutoThread.Instance, "IsMachineOnline", new object[] { "192.168.1.103", 1000 });
+                        //Console.WriteLine("192.168.1.103 > " + hkr.ToString());
+                        #endregion [鑴氭湰][20250323151832119][涓氬姟閫昏緫.Ipping]
+                    }
+                    catch (Exception ex)
+                    {
+                        Conn.榛樿鏃ュ織.Error(ex.ToString());
+                    }
+                    finally
+                    {
+                        System.Threading.Thread.Sleep(3000);
+                    }
                 }
-                catch (Exception ex)
-                {
-                    Conn.榛樿鏃ュ織.Error(ex.ToString());
-                }
-                finally
-                {
-                    System.Threading.Thread.Sleep(3000);
-                }
-            }
+                ExitJudgeStack.TryPop(out int exitJudgeVal);
+            });
             /// <summary>
             /// 绋嬪簭鐗囨:鏂扮嚎绋嬫�绾�             /// 鎻忚堪:1
@@ -838,7 +841,7 @@
                     try
                     {
                         #region    [鑴氭湰][20250708095248653][涓氬姟閫昏緫.鏂扮嚎绋嬫�绾縘
-                        AutoThread.InvokeMethod(AutoThread.Instance, "ThreaTotal", new object[] { tag });
+                        AutoThread.InvokeMethod(AutoThread.Instance, "ThreaTotal", new object[] { tag, Device });
                         #endregion [鑴氭湰][20250708095248653][涓氬姟閫昏緫.鏂扮嚎绋嬫�绾縘
                     }
                     catch (Exception ex)
@@ -955,8 +958,24 @@
                     Device.A2030鍙栬揣浜や簰?.Stop();
                     Device.RGV?.Stop();
                     Device.p鍙戦偅绉�涓嬬嚎?.Stop();
-                    Device.p鍙戦偅绉�涓婄嚎?.Stop();
-                    Device.p鍙戦偅绉�涓婄嚎?.Stop();
+                    Device.D瀹氬瓙1鍙锋満姊版墜?.Stop();
+                    Device.D瀹氬瓙2鍙锋満姊版墜?.Stop();
+                    Device.S2027Read?.Stop();
+                    Device.S2020Read?.Stop();
+                    Device.S2013Read?.Stop();
+                    Device.S2027Write?.Stop();
+                    Device.S2020Write?.Stop();
+                    Device.S2013Write?.Stop();
+                    Device.S2001Write?.Stop();
+                    Device.S2008Write?.Stop();
+                    Device.S3001Read?.Stop();
+                    Device.S3006Read?.Stop();
+                    Device.S3005Read?.Stop();
+                    Device.S3010Read?.Stop();
+                    Device.A3001鏀捐揣浜や簰?.Stop();
+                    Device.A3005鍙栬揣浜や簰?.Stop();
+                    Device.A3006鏀捐揣浜や簰?.Stop();
+                    Device.A3010鍙栬揣浜や簰?.Stop();
                 }
                 catch (Exception ex)
                 {
@@ -1008,8 +1027,24 @@
                         || (Device.A2030鍙栬揣浜や簰 == null ? false : Device.A2030鍙栬揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
                         || (Device.RGV == null ? false : Device.RGV.State != GZ.Device.PLC.PlcRunState.Stoped)
                         || (Device.p鍙戦偅绉�涓嬬嚎 == null ? false : Device.p鍙戦偅绉�涓嬬嚎.State != GZ.Device.PLC.PlcRunState.Stoped)
-                        || (Device.p鍙戦偅绉�涓婄嚎 == null ? false : Device.p鍙戦偅绉�涓婄嚎.State != GZ.Device.PLC.PlcRunState.Stoped)
-                        || (Device.p鍙戦偅绉�涓婄嚎 == null ? false : Device.p鍙戦偅绉�涓婄嚎.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.D瀹氬瓙1鍙锋満姊版墜 == null ? false : Device.D瀹氬瓙1鍙锋満姊版墜.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.D瀹氬瓙2鍙锋満姊版墜 == null ? false : Device.D瀹氬瓙2鍙锋満姊版墜.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2027Read == null ? false : Device.S2027Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2020Read == null ? false : Device.S2020Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2013Read == null ? false : Device.S2013Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2027Write == null ? false : Device.S2027Write.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2020Write == null ? false : Device.S2020Write.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2013Write == null ? false : Device.S2013Write.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2001Write == null ? false : Device.S2001Write.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2008Write == null ? false : Device.S2008Write.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S3001Read == null ? false : Device.S3001Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S3006Read == null ? false : Device.S3006Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S3005Read == null ? false : Device.S3005Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S3010Read == null ? false : Device.S3010Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.A3001鏀捐揣浜や簰 == null ? false : Device.A3001鏀捐揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.A3005鍙栬揣浜や簰 == null ? false : Device.A3005鍙栬揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.A3006鏀捐揣浜や簰 == null ? false : Device.A3006鏀捐揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.A3010鍙栬揣浜や簰 == null ? false : Device.A3010鍙栬揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
                     )
                     {
                         System.Threading.Thread.Sleep(1000);

--
Gitblit v1.9.1