通讯逻辑修改

This commit is contained in:
sc committed 2025-08-28 01:36:51 +08:00
commit e4e7853624
3 files changed
+10 -8

No files matched your search

+2 -7
View File
@@ -10,6 +10,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
using System.Diagnostics;
using System.Linq;
using System.Net;
@@ -53,6 +54,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
drEmployee["State"] = "801";
drEmployee.EndEdit();
drEmployee.AcceptChanges();
LogGing.LogGingDATA("[IP='" + client.IP + "' AND port='" + client.Port + "']=Link_OK");
}
catch (Exception ex)
@@ -386,13 +388,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
.SetRemoteIPHost(ip + ":" + port)
.ConfigurePlugins(a =>
{
a.UseCheckClear()
.SetCheckClearType(CheckClearType.All)
.SetTick(TimeSpan.FromSeconds(5))
.SetOnClose((c, t) =>
{
c.TryShutdown();
});
// a.UseTcpReconnection();//触发型重连
})
.ConfigureContainer(a =>
+6
View File
@@ -376,6 +376,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
dat_821.Add("P4", P4);
dat_821.Add("P5", P5);
DataRow row = MainWindowViewModel.dt_TP.Select("Step='" + ID + "'").First();
row.BeginEdit();
row["RUN"] = 2;
row.EndEdit();
row.AcceptChanges();
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
+2 -1
View File
@@ -329,7 +329,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
stringQueue.Enqueue(new QueueString
{
ID = i,
DAT = "SC800:SCCM[" + MachiensTcpClient[i].IP + ";" + MachiensTcpClient[i].Port + "]"
DAT = "SC800:SCCM[" + Selet_Machines(Machines, "IP", "ID='" + i + "'") + ";" +
Selet_Machines(Machines, "Prot", "ID='" + i + "'") + "]"
});//信息插入队列
}