diff --git a/app.config b/app.config index c5a86f4..a117891 100644 --- a/app.config +++ b/app.config @@ -68,9 +68,20 @@ + + + + + + + + + - - + + + + diff --git a/deviceAnalysis.cs b/deviceAnalysis.cs index 7852ffe..d2dff1c 100644 --- a/deviceAnalysis.cs +++ b/deviceAnalysis.cs @@ -1713,7 +1713,7 @@ namespace FlyDockTool else dataOutPutShow("数据和图像提交失败:" + jsonStr, null); } - catch(Exception ex) { /*MessageBox.Show(ex.ToString()); */} + catch (Exception ex) { /*MessageBox.Show(ex.ToString()); */} } if (apiOptions.CurrentDevice == "SD1")//斯玛特SD1 { @@ -1982,14 +1982,250 @@ namespace FlyDockTool dataOutPutShow("数据提交失败:" + jsonStr, null); } + } + if (apiOptions.CurrentDevice == "U120")//尿常规U120 + { + string MachineCode = apiOptions.MachineCode; + string MachineID = apiOptions.MachineID; + List ermList = new List(); + string[] resulteArray = deviceDataStr.Split('\n'); + // File.WriteAllText("BT-200.TXT", deviceDataStr); + for (int i = 0; i < resulteArray.Length; i += 15) + { + //这里需要判断一下数据是否超过了 当前数据的长度 + ermList.Clear(); + if (i + 15 > resulteArray.Length) + break; + string[] spArray = resulteArray[2].Trim().Split(' '); + string sampleNo1 = spArray[2].Substring(0, 1).TrimStart('0'); + // string sampleNo1 = resulteArray[2].Trim().Split(' ')[1]; .Replace("-", "0").TrimStart('0') + //string testDate1 = jiexiDate(resulteArray[i + 1], resulteArray[i + 2]); + string testDate1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + examResultMode erm = new examResultMode(); + erm.machineCode = MachineCode; + erm.machineID = MachineID; + erm.sampleNo = sampleNo1; + erm.testDate = testDate1; + erm.chanelNo = "LEU";//项目代号 + erm.itemValue = resulteArray[i + 3].Substring(4, 15).Trim();//项目结果//项目结果 + erm.itemUnit = ""; + ermList.Add(erm); + + examResultMode erm1 = new examResultMode(); + erm1.machineCode = MachineCode; + erm1.machineID = MachineID; + erm1.sampleNo = sampleNo1; + erm1.testDate = testDate1; + erm1.chanelNo = "NIT";//项目代号 + erm1.itemValue = resulteArray[i + 4].Substring(4, 11).Trim();//项目结果 + erm1.itemUnit = ""; + ermList.Add(erm1); + + examResultMode erm2 = new examResultMode(); + erm2.machineCode = MachineCode; + erm2.machineID = MachineID; + erm2.sampleNo = sampleNo1; + erm2.testDate = testDate1; + erm2.chanelNo = "URO";//项目代号 + erm2.itemValue = resulteArray[i + 5].Substring(4, 13).Trim();//项目结果 + erm2.itemUnit = ""; + ermList.Add(erm2); + + examResultMode erm3 = new examResultMode(); + erm3.machineCode = MachineCode; + erm3.machineID = MachineID; + erm3.sampleNo = sampleNo1; + erm3.testDate = testDate1; + erm3.chanelNo = "PRO";//项目代号 + erm3.itemValue = resulteArray[i + 6].Substring(5, 15).Trim();//项目结果 + erm3.itemUnit = ""; + ermList.Add(erm3); + + examResultMode erm4 = new examResultMode(); + erm4.machineCode = MachineCode; + erm4.machineID = MachineID; + erm4.sampleNo = sampleNo1; + erm4.testDate = testDate1; + erm4.chanelNo = "pH";//项目代号 + erm4.itemValue = resulteArray[i + 7].Substring(4, 12).Trim();//项目结果 + erm4.itemUnit = ""; + ermList.Add(erm4); + + + examResultMode erm5 = new examResultMode(); + erm5.machineCode = MachineCode; + erm5.machineID = MachineID; + erm5.sampleNo = sampleNo1; + erm5.testDate = testDate1; + erm5.chanelNo = "BLO";//项目代号 + erm5.itemValue = resulteArray[i + 8].Substring(4, 15).Trim();//项目结果 + erm5.itemUnit = ""; + ermList.Add(erm5); + + + examResultMode erm6 = new examResultMode(); + erm6.machineCode = MachineCode; + erm6.machineID = MachineID; + erm6.sampleNo = sampleNo1; + erm6.testDate = testDate1; + erm6.chanelNo = "SG";//项目代号 + erm6.itemValue = resulteArray[i + 9].Substring(4, 13).Trim();//项目结果 + erm6.itemUnit = ""; + ermList.Add(erm6); + + examResultMode erm10 = new examResultMode(); + erm10.machineCode = MachineCode; + erm10.machineID = MachineID; + erm10.sampleNo = sampleNo1; + erm10.testDate = testDate1; + erm10.chanelNo = "KET";//项目代号 + erm10.itemValue = resulteArray[i + 10].Substring(4, 15).Trim();//项目结果 + erm10.itemUnit = ""; + ermList.Add(erm10); + + + examResultMode erm7 = new examResultMode(); + erm7.machineCode = MachineCode; + erm7.machineID = MachineID; + erm7.sampleNo = sampleNo1; + erm7.testDate = testDate1; + erm7.chanelNo = "BIL";//项目代号 + erm7.itemValue = resulteArray[i + 11].Substring(4, 13).Trim();//项目结果 + erm7.itemUnit = ""; + ermList.Add(erm7); + + examResultMode erm8 = new examResultMode(); + erm8.machineCode = MachineCode; + erm8.machineID = MachineID; + erm8.sampleNo = sampleNo1; + erm8.testDate = testDate1; + erm8.chanelNo = "GLU";//项目代号 + erm8.itemValue = resulteArray[i + 12].Substring(4, 14).Trim();//项目结果 + erm8.itemUnit = ""; + ermList.Add(erm8); + + examResultMode erm9 = new examResultMode(); + erm9.machineCode = MachineCode; + erm9.machineID = MachineID; + erm9.sampleNo = sampleNo1; + erm9.testDate = testDate1; + erm9.chanelNo = "ASC";//项目代号 + erm9.itemValue = resulteArray[i + 13].Substring(4, 12).Trim();//项目结果 + erm9.itemUnit = ""; + ermList.Add(erm9); + + + + //将结果提交到LIS系统 + baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList); + string jsonStr = JsonConvert.SerializeObject(ermList); + if (bmm1.code == 200) + dataOutPutShow("数据提交成功:" + jsonStr, null); + else + dataOutPutShow("数据提交失败:" + jsonStr, null); + } + + } + if (apiOptions.CurrentDevice == "BS-330E")//BS-330E 他是一次性发一条样本 但一个样本号有多个项目 挨个发其中的项目 生化 + { + string MachineCode = apiOptions.MachineCode; + string MachineID = apiOptions.MachineID; + List ermList = new List(); + string[] itemArray = new string[10] { "ALT", "AST", "T-Bil", "UA", "UREA", "CREA-S", "TC", "TG", "HDL-C", "LDL-C" }; + //string[] resulteArray = deviceDataStr.Split('\n'); + //deviceDataStr = deviceDataStr.Replace("\r", "").Replace("\n", ""); + string[] valArray = deviceDataStr.Split(''); + string sampleNo1 = string.Empty;//样本号 + string itemStr = string.Empty; + string itemValue = string.Empty; + for (int i = 0; i < itemArray.Length; i++) + { + for (int j = 0; j < valArray.Length; j++) + { + if (itemArray[i] == valArray[j].Substring(valArray[j].IndexOf("OBX|1|NM|")).Split('|')[4]) + { + sampleNo1 = valArray[j].Substring(valArray[j].IndexOf("OBR|1||") + "OBR|1||".Length, valArray[j].IndexOf("|Mindray^BS-330E|") - valArray[j].IndexOf("OBR|1||") - "OBR|1||".Length).Trim(); + itemStr = valArray[j].Substring(valArray[j].IndexOf("OBX|1|NM|")).Split('|')[4]; + itemValue = valArray[j].Substring(valArray[j].IndexOf("OBX|1|NM|")).Split('|')[5]; + string testDate1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + examResultMode erm1 = new examResultMode(); + erm1.machineCode = MachineCode; + erm1.machineID = MachineID; + erm1.sampleNo = sampleNo1; + erm1.testDate = testDate1; + erm1.chanelNo = itemStr;//项目代号 + erm1.itemValue = itemValue; + erm1.itemUnit = ""; + ermList.Add(erm1); + break; + } + } + } + + //将结果提交到LIS系统 + baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList); + string jsonStr = JsonConvert.SerializeObject(ermList); + + + if (bmm1.code == 200) + dataOutPutShow("数据和图像提交成功:" + jsonStr, null); + else + dataOutPutShow("数据和图像提交失败:" + jsonStr, null); + + } + if (apiOptions.CurrentDevice == "BC-5120")//BC-5120 + { + string MachineCode = apiOptions.MachineCode; + string MachineID = apiOptions.MachineID; + deviceDataStr = deviceDataStr.Replace("\r", "").Replace("\n", ""); + //string[] resulteArray = deviceDataStr.Split('\n'); + string sampleNo1 = string.Empty;//样本号 + + List ermList = new List(); + string[] itemArray = new string[] { "WBC", "BAS#", "BAS%", "NEU#", "NEU%", "EOS#", "EOS%", "LYM#", "LYM%", "MON#", "MON%", "RBC", "HGB", "MCV", "MCH", "MCHC", "RDW-CV", "RDW-SD", "HCT", "PLT", "MPV", "PDW", "PCT", "PLCC", "PLCR" }; + string[] itemArray_2 = new string[] { "PCT", "PLCC", "PLCR" }; + + for (int i = 0; i < itemArray.Length; i++) + { + string itemStr = string.Empty; + if (itemArray_2.Contains(itemArray[i])) + itemStr = itemArray[i] + "^99MRC||"; + else + itemStr = itemArray[i] + "^LN||"; + + 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; + erm1.machineID = MachineID; + erm1.sampleNo = sampleNo1; + erm1.testDate = testDate1; + erm1.chanelNo = itemArray[i];//项目代号 + //项目结果 + erm1.itemValue = jiexiVal(deviceDataStr.IndexOf(itemStr), itemStr, deviceDataStr).ToString(); + erm1.itemUnit = ""; + ermList.Add(erm1); + } + + string jsonStr = JsonConvert.SerializeObject(ermList); + + //将结果提交到LIS系统 + baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList); + if (bmm1.code == 200) + dataOutPutShow("数据提交成功:" + jsonStr, null); + else + dataOutPutShow("数据提交失败:" + jsonStr, null); + } if (apiOptions.CurrentDevice == "BS-460")//生化BS-460 { string MachineCode = apiOptions.MachineCode; string MachineID = apiOptions.MachineID; List ermList = new List(); - string[] itemArray = new string[18] { "Glu-G", "T-Bil-V", "D-Bil-V", "ALT", "AST", "ALP", "γ-GT", "TG", "LDL-C", "HDL-C","TC","CREA-S","UREA","ALB_II","TP_II","AST/ALT","IBIL-V" , "UA" }; - string[] itemArrayC = new string[18] { "葡萄糖", "总胆红素", "直接胆红素", "丙氨酸氨基转移酶", "天门冬氨酸氨基转移酶", "碱性磷酸酶", "γ-谷氨酰转移酶", "甘油三酯", "低密度脂蛋白胆固醇", "高密度脂蛋白胆固醇", "总胆固醇", "肌酐(肌氨酸氧化酶法)", "尿素", "白蛋白", "总蛋白(双缩脲法)", "AST/ALT", "IBIL-V", "尿酸" }; + string[] itemArray = new string[18] { "Glu-G", "T-Bil-V", "D-Bil-V", "ALT", "AST", "ALP", "γ-GT", "TG", "LDL-C", "HDL-C", "TC", "CREA-S", "UREA", "ALB_II", "TP_II", "AST/ALT", "IBIL-V", "UA" };// + string[] itemArrayC = new string[18] { "葡萄糖", "总胆红素", "直接胆红素", "丙氨酸氨基转移酶", "天门冬氨酸氨基转移酶", "碱性磷酸酶", "γ-谷氨酰转移酶", "甘油三酯", "低密度脂蛋白胆固醇", "高密度脂蛋白胆固醇", "总胆固醇", "肌酐(肌氨酸氧化酶法)", "尿素", "白蛋白", "总蛋白(双缩脲法)", "AST/ALT", "IBIL-V", "尿酸" };// deviceDataStr = deviceDataStr.Replace("\r", "").Replace("\n", ""); //string[] valArray = deviceDataStr.Split(','); string[] valArray = deviceDataStr.Split('|'); @@ -2014,24 +2250,56 @@ namespace FlyDockTool ermList.Add(erm1); } - if (apiOptions.CurrentDevice == "BC-5120")//BC-5120 + //将结果提交到LIS系统 + baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList); + string jsonStr = JsonConvert.SerializeObject(ermList); + if (bmm1.code == 200) + dataOutPutShow("数据提交成功:" + jsonStr, null); + else + dataOutPutShow("数据提交失败:" + jsonStr, null); + } + if (apiOptions.CurrentDevice == "BS-460-1")//生化BS-460 { string MachineCode = apiOptions.MachineCode; string MachineID = apiOptions.MachineID; + List ermList = new List(); + string[] itemArray = new string[14] { "Glu-G", "T-Bil-V", "D-Bil-V", "ALT", "AST", "TG", "LDL-C", "HDL-C", "TC", "CREA-S", "UREA", "ALB_II", "AST/ALT", "IBIL-V" };// + string[] itemArrayC = new string[14] { "葡萄糖(葡萄糖氧化酶法)", "总胆红素(钒酸盐氧化法)", "直接胆红素(钒酸盐氧化法)", "丙氨酸氨基转移酶", "天门冬氨酸氨基转移酶", "甘油三酯", "低密度脂蛋白胆固醇", "高密度脂蛋白胆固醇", "总胆固醇", "肌酐(肌氨酸氧化酶法)", "尿素", "白蛋白", "AST/ALT", "IBIL-V" };// deviceDataStr = deviceDataStr.Replace("\r", "").Replace("\n", ""); - //string[] resulteArray = deviceDataStr.Split('\n'); - string sampleNo1 = string.Empty;//样本号 + //string[] valArray = deviceDataStr.Split(','); + string[] valArray = deviceDataStr.Split('|'); + string sampleNo1 = valArray[54];//样本号 + for (int i = 0; i < itemArrayC.Length; i++) + { + string testDate1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + examResultMode erm1 = new examResultMode(); + erm1.machineCode = MachineCode; + erm1.machineID = MachineID; + erm1.sampleNo = sampleNo1; + erm1.testDate = testDate1; + erm1.chanelNo = itemArray[i];//项目代号 + // MessageBox.Show(deviceDataStr+"\r\n\r\n :"+ggg[5]); + string itemStr = itemArrayC[i] + "|"; + int index1 = deviceDataStr.IndexOf(itemStr); + string valueS = jiexiVal(index1, itemStr, deviceDataStr); + double roundedValue = Math.Round(double.Parse(valueS), 2); + erm1.itemValue = roundedValue.ToString();//项目结果 + erm1.itemUnit = ""; + ermList.Add(erm1); + + } //将结果提交到LIS系统 baseMsgModel bmm1 = apiOptions.CreateInstance().upLoadExamResult(ermList); string jsonStr = JsonConvert.SerializeObject(ermList); if (bmm1.code == 200) - dataOutPutShow("数据和图像提交成功:" + jsonStr, null); + dataOutPutShow("数据提交成功:" + jsonStr, null); else - dataOutPutShow("数据和图像提交失败:" + jsonStr, null); + dataOutPutShow("数据提交失败:" + jsonStr, null); } + return rerultJson; } @@ -2051,12 +2319,13 @@ namespace FlyDockTool string ItemValueStr = ""; try { - + string Str1 = deviceDataStr.Substring(deviceDataStr.IndexOf(itemStr) + itemStr.Length, 30); int firstIndex = Str1.IndexOf('|'); ItemValueStr = Str1.Substring(0, firstIndex); - - }catch (Exception ex) { MessageBox.Show(itemStr + "," + deviceDataStr); } + + } + catch (Exception ex) { MessageBox.Show(itemStr + "," + deviceDataStr); } return ItemValueStr; } @@ -2370,13 +2639,13 @@ namespace FlyDockTool // 设置IP地址和端口号 string tcp_ip = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[3]; string tcp_port = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[4]; - // IPAddress ipAddress = IPAddress.Parse(tcp_ip); - IPAddress ipAddress = IPAddress.Any; + // IPAddress ipAddress = IPAddress.Parse(tcp_ip); + IPAddress ipAddress = IPAddress.Any; // 创建一个监听Socket if (listener == null) { //listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); - listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream,ProtocolType.Tcp); + listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); listener.Bind(new IPEndPoint(IPAddress.Any, int.Parse(tcp_port))); listener.Listen(10000); } @@ -2501,7 +2770,44 @@ namespace FlyDockTool _tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率 } - + if (apiOptions.CurrentDevice == "U120")//尿常规U120 + { + SerialPortOption.CreateInstance().IniserialPortOption();//初始化串口 + SerialPortOption.CreateInstance().dataOutPutShow += new EventHandler(onReData); + SerialPortOption.CreateInstance().StartDataReadThread();//开启数据接收 + } + if (apiOptions.CurrentDevice == "BS-330E")//BS-330E 生化 + { + // 设置IP地址和端口号 + string tcp_ip = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[3]; + string tcp_port = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[4]; + IPAddress ipAddress = IPAddress.Parse(tcp_ip); + // IPAddress ipAddress = IPAddress.Any; + // 创建一个监听Socket + if (listener == null) + { + listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); + listener.Bind(new IPEndPoint(ipAddress, int.Parse(tcp_port))); + listener.Listen(10000); + } + _tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率 + } + if (apiOptions.CurrentDevice == "BC-5120")//BC-5120 + { + // 设置IP地址和端口号 + string tcp_ip = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[3]; + string tcp_port = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[4]; + IPAddress ipAddress = IPAddress.Parse(tcp_ip); + // IPAddress ipAddress = IPAddress.Any; + //// 创建一个监听Socket + if (listener == null) + { + listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); + listener.Bind(new IPEndPoint(ipAddress, int.Parse(tcp_port))); + listener.Listen(10000); + } + _tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率 + } if (apiOptions.CurrentDevice == "hhh5")//BC-5130 @@ -2545,7 +2851,23 @@ namespace FlyDockTool } _tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率 } - + if (apiOptions.CurrentDevice == "BS-460-1")//迈瑞生化BS-430 + { + // 设置IP地址和端口号 + string tcp_ip = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[3]; + string tcp_port = ConfigurationManager.AppSettings[apiOptions.CurrentDevice].Split(',')[4]; + // IPAddress ipAddress = IPAddress.Parse(tcp_ip); + IPAddress ipAddress = IPAddress.Any; + // 创建一个监听Socket + if (listener == null) + { + //listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); + listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + listener.Bind(new IPEndPoint(IPAddress.Any, int.Parse(tcp_port))); + listener.Listen(10000); + } + _tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率 + } } /// @@ -2663,6 +2985,22 @@ namespace FlyDockTool if (apiOptions.CurrentDevice == "MA-4210")//MA-4210 _tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时 + if (apiOptions.CurrentDevice == "U120")//尿常规U120 + { + _tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时 + } + if (apiOptions.CurrentDevice == "BS-330E")//BS-330E + { + if (tempData.Split('').Length >= 12 && tempData.Contains("LDL-C")) + { + deviceAnalysisOption(tempData); + tempData = string.Empty;//执行完以后 将临时积累数据清空 以便接收下一个样本数据 + } + } + if (apiOptions.CurrentDevice == "BC-5120")//BC-5120 + { + _tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时 + } if (apiOptions.CurrentDevice == "BS-460")//生化BS-460 { //File.WriteAllText("deviceDataLog.txt", deviceDataStr, Encoding.GetEncoding("GB18030")); @@ -2671,6 +3009,16 @@ namespace FlyDockTool deviceAnalysisOption(tempData); tempData = string.Empty;//执行完以后 将临时积累数据清空 以便接收下一个样本数据 } + // _tResult.Change(10000, 10000);// 数据处理:延迟5秒开始 5秒计时 + } + if (apiOptions.CurrentDevice == "BS-460-1")//生化BS-460 + { + //File.WriteAllText("deviceDataLog.txt", deviceDataStr, Encoding.GetEncoding("GB18030")); + //if (tempData.Contains("OBX|14|"))//OBX|22| 为结束符 说明字符串完整了 + //{ + deviceAnalysisOption(tempData); + tempData = string.Empty;//执行完以后 将临时积累数据清空 以便接收下一个样本数据 + // } // _tResult.Change(10000, 10000);// 数据处理:延迟5秒开始 5秒计时 } } @@ -2992,12 +3340,30 @@ namespace FlyDockTool { SerialPortOption.CreateInstance().StopDataReadThread();//开启数据接收 } - + if (apiOptions.CurrentDevice == "U120")//尿常规U120 + { + SerialPortOption.CreateInstance().StopDataReadThread();//停止数据接收 + } + if (apiOptions.CurrentDevice == "BS-330E")//BS-330E + { + _tcpResult.Change(-1, 10);//停止tcp数据接收 + clientSocket.Close(); + } + if (apiOptions.CurrentDevice == "BC-5120")//BC-5120 + { + _tcpResult.Change(-1, 10);//停止tcp数据接收 + clientSocket.Close(); + } if (apiOptions.CurrentDevice == "BS-460")//生化BS-460 { _tcpResult.Change(-1, 10);//停止tcp数据接收 clientSocket.Close(); } + if (apiOptions.CurrentDevice == "BS-460-1")//生化BS-460 + { + _tcpResult.Change(-1, 10);//停止tcp数据接收 + clientSocket.Close(); + } } ///// diff --git a/mainForm.cs b/mainForm.cs index e9119d7..58a2178 100644 --- a/mainForm.cs +++ b/mainForm.cs @@ -32,11 +32,12 @@ namespace FlyDockTool apiOptions.MachineCode = ConfigurationManager.AppSettings[CurrentDevice].Split(',')[1]; apiOptions.MachineID = ConfigurationManager.AppSettings[CurrentDevice].Split(',')[2]; lb_currentDeviceInfo.Text = CurrentDevice; + //////测试代码 测试完毕后注释调一下两行代码 + //string resultDataStr = File.ReadAllText(@"C:\Users\10044\Desktop\BS-460.txt", Encoding.GetEncoding("GB18030")); + //deviceAnalysis.CreateInstance().deviceAnalysisOption(resultDataStr); btn_start_or_stop_Click(null,null);//启动数据接收 - ////测试代码 测试完毕后注释调一下两行代码 - //string resultDataStr = File.ReadAllText(@"C:\Users\Administrator\Desktop\察哈尔右翼中旗\宏盘卫生院\血常规BC-5130\血常规BC-5130.txt", Encoding.GetEncoding("UTF-8")); - //deviceAnalysis.CreateInstance().deviceAnalysisOption(resultDataStr); + }