This commit is contained in:
sc committed 2024-11-26 23:48:55 +08:00
commit dacc9ccfe2
2 files changed
+12 -1

No files matched your search

+3 -1
View File
@@ -240,7 +240,7 @@ namespace DyeingComputer.UserClass
{
if (SYSKEY == MainWindowViewModel.SYSKEY)
{
client.SendAsync("SC851" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_d.ToJsonString());//数字开关信息
client.SendAsync("SC851" + "[" + MainWindowViewModel.S01 + "]" + JsonConvert.SerializeObject(MainWindowViewModel.dt_d));//数字开关信息
}
else { client.SendAsync("SC999"); }
}//数字开关表
@@ -265,6 +265,8 @@ namespace DyeingComputer.UserClass
};
await service.SetupAsync(new TouchSocketConfig()//载入配置
.SetMaxBufferSize(1024 * 1024)
.SetMinBufferSize(1024 * 64)
.SetListenIPHosts(new IPHost[] { new IPHost("tcp://127.0.0.1:7789"), new IPHost(7790) })//同时监听两个地址
.ConfigureContainer(a =>//容器的配置顺序应该在最前面
{
+9
View File
@@ -1569,6 +1569,15 @@ namespace DyeingComputer.ViewModel
dt_a = SQLiteHelpers.ExecuteDataSet("select * from IOName where type='AI' OR type='AO' order by ID", null).Tables[0];
dt_m = SQLiteHelpers.ExecuteDataSet("select * from IOName where type='M' order by ID", null).Tables[0];
SQLiteHelpers.Close();
dt_d.Columns.Remove("AIO");
dt_d.Columns.Remove("Value");
// dt_d.Columns.Remove("type");
dt_a.Columns.Remove("DIO");
dt_a.Columns.Remove("Value");
// dt_a.Columns.Remove("type");
dt_m.Columns.Remove("AIO");
dt_m.Columns.Remove("DIO");
// dt_m.Columns.Remove("type");
//创建dt_d主建
DataColumn[] dt_dcols =new DataColumn[] { dt_d.Columns["ID"] };
dt_d.PrimaryKey = dt_dcols;