From a54f394767fe561f8ed7e3d5b13bcb42868815cf Mon Sep 17 00:00:00 2001 From: czw <selecti@yeah.net> Date: 星期三, 02 七月 2025 10:09:42 +0800 Subject: [PATCH] 1 --- 2025年6月12日/AuxAllWCS/Build/Project/AuxAllWCS.csproj | 8 ++++++++ 2025年6月12日/AuxAllWCS/Build/Project/界面/View1.xaml | 3 ++- 2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs | 1 + 2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/TcpServer.cs | 11 +++++++---- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/AuxAllWCS.csproj" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/AuxAllWCS.csproj" index 3e2b03a..bc9fe1e 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/AuxAllWCS.csproj" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/AuxAllWCS.csproj" @@ -194,10 +194,14 @@ <DependentUpon>App.xaml</DependentUpon> <SubType>Code</SubType> </Compile> + <Compile Include="鐣岄潰\views2.xaml.cs"> + <DependentUpon>views2.xaml</DependentUpon> + </Compile> <Page Include="鐣岄潰\View1.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Compile Include="浠g爜\VS鑷畾涔夌被\NotifyProperty.cs" /> <Compile Include="鐣岄潰\View1.xaml.cs"> <DependentUpon>View1.xaml</DependentUpon> <SubType>Code</SubType> @@ -213,6 +217,10 @@ <Compile Include="浠g爜\VS鑷畾涔夌被\TcpServer.cs" /> <Compile Include="浠g爜\VS鑷畾涔夌被\AutoThread.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Page Include="鐣岄潰\views2.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> </ItemGroup> <ItemGroup> <None Include="App.config" /> diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" index 7ab5f45..75f3343 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" @@ -1539,6 +1539,7 @@ } public void Thread2030Down(Tag tag) { + Console.WriteLine($"SA2030 浠诲姟鐘舵�锛� =====>"); Console.WriteLine($"SA2030 浠诲姟鐘舵�锛歿tag.SA2030.RtaskState}- 绌洪棽{tag.SA2030.R5绌洪棽} - barcode:{tag.SA2030.R鎵樼洏鐮亇"); } diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/TcpServer.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/TcpServer.cs" index 7bb9c73..f91b6bd 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/TcpServer.cs" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/TcpServer.cs" @@ -14,7 +14,7 @@ public class TcpServer { - public static Dictionary<string,string> TrayIps = new Dictionary<string,string>(); + public static Dictionary<string, string> TrayIps = new Dictionary<string, string>(); public TcpServer(string ip) { Init(ip); @@ -115,15 +115,18 @@ //} //else //{ - Console.WriteLine($"銆怲CP淇℃伅鍗忚寮傚父 {DateTime.Now.Millisecond}銆戯細IP锛歿remote_ip},MSG锛歿message}"); + Console.WriteLine($"銆怲CP淇℃伅鍗忚 {DateTime.Now.Millisecond}銆戯細IP锛歿remote_ip},MSG锛歿message}"); var mg = Encoding.ASCII.GetString(PlcHelper.Hex2Bin(message)); Console.WriteLine(mg); if (mg.StartsWith("DK") && mg.Trim().Length == "DK01000024".Length) { - if(TrayIps.TryGetValue(remote_ip,out string traycode)) + LogHelper.Info($"鎵爜鍣�>{remote_ip} -{mg}"); + if (TrayIps.TryGetValue(remote_ip, out string traycode)) { TrayIps[remote_ip] = traycode; - }else TrayIps.Add(remote_ip, traycode); + } + else TrayIps.Add(remote_ip, traycode); + Console.WriteLine("TOFF"); var mst = PlcHelper.Hex2Bin("544F4646"); TcpServer.TcpServerSend(remote_ip, mst); diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\347\225\214\351\235\242/View1.xaml" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\347\225\214\351\235\242/View1.xaml" index 394c930..a651eb6 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\347\225\214\351\235\242/View1.xaml" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\347\225\214\351\235\242/View1.xaml" @@ -1,5 +1,6 @@ <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="640" Height="480" x:Class="GZ.Projects.AuxAllWCS.View1" xmlns:local="clr-namespace:GZ.Projects.AuxAllWCS"> <Canvas> <Label Width="86" Height="25" Canvas.Left="31" Canvas.Top="172" /> - </Canvas> + <TextBlock Text="嗷嗷嗷"/> + </Canvas> </Window> \ No newline at end of file -- Gitblit v1.9.1