|
|
@@ -86,14 +86,20 @@ namespace HKCardOUT.ViewModels |
|
|
|
HandyControl.Controls.Growl.InfoGlobal(ex.Message); |
|
|
|
} |
|
|
|
}), "循环状态监测线程", false); |
|
|
|
// 初始化 串口 |
|
|
|
UHF_RS485_Helper.GetInstance().Open(new SerialParam |
|
|
|
try |
|
|
|
{ |
|
|
|
PortName = DataBus.COM, |
|
|
|
BaudRate = 57600, |
|
|
|
DataBits = 8 |
|
|
|
}); |
|
|
|
|
|
|
|
// 初始化 串口 |
|
|
|
UHF_RS485_Helper.GetInstance().Open(new SerialParam |
|
|
|
{ |
|
|
|
PortName = DataBus.COM, |
|
|
|
BaudRate = 57600, |
|
|
|
DataBits = 8 |
|
|
|
}); |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
|
{ |
|
|
|
HandyControl.Controls.Growl.WarningGlobal("未接入相应设备"); |
|
|
|
} |
|
|
|
if (!UHF_RS485_Helper.GetInstance().GetSerialPortState()) |
|
|
|
HandyControl.Controls.Growl.InfoGlobal("串口打开失败"); |
|
|
|
//读取读卡器 |
|
|
|