Compare commits
2 Commits
e88cf0e160
...
0254727fa8
Author | SHA1 | Date | |
---|---|---|---|
0254727fa8 | |||
d417c0be0c |
@ -16,7 +16,7 @@ namespace FlyDockTool
|
||||
//测试11111 都是对的收到大大大
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new mainForm()); ;
|
||||
Application.Run(new mainForm()); ;//888888999
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1644,6 +1644,7 @@ namespace FlyDockTool
|
||||
|
||||
if (apiOptions.CurrentDevice == "BC-5130")//BC-5130
|
||||
{
|
||||
|
||||
string MachineCode = apiOptions.MachineCode;
|
||||
string MachineID = apiOptions.MachineID;
|
||||
List<examResultMode> ermList = new List<examResultMode>();
|
||||
@ -1658,8 +1659,9 @@ namespace FlyDockTool
|
||||
itemStr = itemArray[i] + "^99MRC||";
|
||||
else
|
||||
itemStr = itemArray[i] + "^LN||";
|
||||
string val1 = jiexiVal(deviceDataStr.IndexOf("PID|"), "PID|", deviceDataStr).ToString();
|
||||
sampleNo1 = val1;
|
||||
|
||||
string val1 = deviceDataStr.Substring(deviceDataStr.IndexOf("OBR"),30);
|
||||
sampleNo1 = val1.Split('|')[3];
|
||||
string testDate1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
examResultMode erm1 = new examResultMode();
|
||||
erm1.machineCode = MachineCode;
|
||||
@ -2466,8 +2468,14 @@ namespace FlyDockTool
|
||||
/// <param name="e"></param>
|
||||
void onReData(object o, EventArgs e)
|
||||
{
|
||||
tempData += o.ToString();//把串口数据积累起来
|
||||
dataOutPutShow(o, null);//把数据显示到屏幕上
|
||||
if (o.ToString().Length > 2)
|
||||
{
|
||||
tempData += o.ToString();//把串口数据积累起来
|
||||
//MessageBox.Show(o.ToString().Length.ToString());
|
||||
dataOutPutShow(o, null);//把数据显示到屏幕上
|
||||
}
|
||||
|
||||
|
||||
if (apiOptions.CurrentDevice == "HSYH-II")//华晟源尿常规型号:H-II
|
||||
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||
if (apiOptions.CurrentDevice == "BT-200")//盛世东唐BT-200尿常规
|
||||
@ -2498,6 +2506,8 @@ namespace FlyDockTool
|
||||
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||
if (apiOptions.CurrentDevice == "BS-430")//生化BS-430
|
||||
{
|
||||
//File.WriteAllText("deviceDataLog.txt", deviceDataStr, Encoding.GetEncoding("GB18030"));
|
||||
|
||||
deviceAnalysisOption(tempData);
|
||||
tempData = string.Empty;//执行完以后 将临时积累数据清空 以便接收下一个样本数据
|
||||
// _tResult.Change(10000, 10000);// 数据处理:延迟5秒开始 5秒计时
|
||||
@ -2532,7 +2542,14 @@ namespace FlyDockTool
|
||||
|
||||
if (apiOptions.CurrentDevice == "BC-5130")//BC-5130
|
||||
{
|
||||
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||
// _tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
||||
if (tempData.Contains("OBX|30|")|| tempData.Contains("OBX|29|"))//OBX|12|ST| 为结束符 说明字符串完整了
|
||||
{
|
||||
// MessageBox.Show(tempData);
|
||||
deviceAnalysisOption(tempData);
|
||||
tempData = string.Empty;//执行完以后 将临时积累数据清空 以便接收下一个样本数据
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -2590,8 +2607,12 @@ namespace FlyDockTool
|
||||
int recv = clientSocket.Receive(data);
|
||||
if (recv > 0)
|
||||
{
|
||||
byte[] data1=new byte[recv];
|
||||
for (int i = 0;i<recv;i++)
|
||||
data1[i] = data[i];
|
||||
|
||||
string encodingStr = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[5];
|
||||
string stringData = Encoding.GetEncoding(encodingStr).GetString(data);
|
||||
string stringData = Encoding.GetEncoding(encodingStr).GetString(data1);
|
||||
if (apiOptions.CurrentDevice == "SL300C")//Senlo生化SL300C 接收一条数据就需要应答一次
|
||||
{
|
||||
string[] msgArray = stringData.Split('\n');
|
||||
|
2
mainForm.Designer.cs
generated
2
mainForm.Designer.cs
generated
@ -188,7 +188,7 @@
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "mainForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "福乐云软硬件数据对接工具V1.1(2024121101)";
|
||||
this.Text = "福乐云软硬件数据对接工具V1.1(2024121214)";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.mainForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
|
@ -35,6 +35,8 @@ namespace FlyDockTool
|
||||
////测试代码 测试完毕后注释调一下两行代码
|
||||
//string resultDataStr = File.ReadAllText(@"C:\Users\Administrator\Desktop\察哈尔右翼中旗\黄羊城\尿常规MA-4210\尿常规MA-4210.txt", Encoding.GetEncoding("GB18030"));
|
||||
//deviceAnalysis.CreateInstance().deviceAnalysisOption(resultDataStr);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btn_start_or_stop_Click(object sender, EventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user