Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
f92275f2d9
3 files changed
+36
-16
No files matched your search
@@ -106,9 +106,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
|
||||
private readonly TcpClient[] MachiensTcpClient = new TcpClient[999];
|
||||
public int Machinesdata_Count;
|
||||
public async void TcpClientNEW()
|
||||
public void TcpClientNEW()
|
||||
{
|
||||
bool Machine_ = false;
|
||||
// bool Machine_ ;
|
||||
DataRow[] machinesdata = Machines.Select("PORT>0 AND IP<>''", "id asc");//获取连接有效的组
|
||||
Machinesdata_Count = machinesdata.Count();
|
||||
|
||||
@@ -116,14 +116,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
{
|
||||
MachiensTcpClient[i] = new TcpClient();
|
||||
DataRow dt = machinesdata[i];
|
||||
|
||||
Machine_ = await AsyncTcpClient.TcpClient(MachiensTcpClient[i] //建立tcp连接
|
||||
, Selet_Machines(MainWindowViewModel.Machines, "IP", Convert.ToInt16(dt["ID"])).ToString()
|
||||
, Selet_Machines(MainWindowViewModel.Machines, "PORT", Convert.ToInt16(dt["ID"])).ToString());
|
||||
|
||||
if (!Machine_) Updata_Machines(Machines , Convert.ToInt16(dt["ID"]), "State" ,"309" );
|
||||
}
|
||||
}
|
||||
Updata_Machines(Machines, Convert.ToInt16(dt["ID"]), "State", "800");
|
||||
_ = AsyncTcpClient.TcpClient(MachiensTcpClient[i] //建立tcp连接
|
||||
, Selet_Machines(Machines, "IP", Convert.ToInt16(dt["ID"])).ToString()
|
||||
, Selet_Machines(Machines, "PORT", Convert.ToInt16(dt["ID"])).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static string SYS_WorkNumder; //工单号
|
||||
public static int SYS_AT1; //附缸1-3
|
||||
|
||||
Reference in new issue
Block a user