Commit 9b368764 几米阳光

二维码用##区分

1 个父辈 7b6ce92d
...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary
public static int DoorStatus = 2; public static int DoorStatus = 2;
private static int LastHeight = 0; private static int LastHeight = 0;
private static int LastWidth = 0; private static int LastWidth = 0;
private static List<string> LastCodeList = new List<string>();
private static string LastCode = ""; private static string LastCode = "";
private static string LastPosId = ""; private static string LastPosId = "";
public static int AxisChangeValue = ConfigAppSettings.GetIntValue(Setting_Init.AxisChangeValue); public static int AxisChangeValue = ConfigAppSettings.GetIntValue(Setting_Init.AxisChangeValue);
...@@ -103,6 +104,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,6 +104,7 @@ namespace OnlineStore.DeviceLibrary
private static void ClearInStoreInfo() private static void ClearInStoreInfo()
{ {
LastCode = ""; LastCode = "";
LastCodeList = new List<string>();
LastPosId = ""; LastPosId = "";
LastHeight = 0; LastHeight = 0;
LastWidth = 0; LastWidth = 0;
...@@ -562,6 +564,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -562,6 +564,7 @@ namespace OnlineStore.DeviceLibrary
private static void IsNeedScanCode() private static void IsNeedScanCode()
{ {
LastCode = ""; LastCode = "";
LastCodeList = new List<string>();
LastHeight = 0; LastHeight = 0;
LastWidth = 0; LastWidth = 0;
LastPosId = ""; LastPosId = "";
......
...@@ -250,7 +250,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -250,7 +250,7 @@ namespace OnlineStore.DeviceLibrary
#region Halcon扫码枪代码 #region Halcon扫码枪代码
public bool IsTestCamera = false; public bool IsTestCamera = false;
private static char spiltStr = '#'; private static string spiltStr = "##";
public static void GetCameraCode() public static void GetCameraCode()
{ {
Task.Factory.StartNew(delegate () Task.Factory.StartNew(delegate ()
...@@ -273,6 +273,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -273,6 +273,8 @@ namespace OnlineStore.DeviceLibrary
message = message + spiltStr + str; message = message + spiltStr + str;
} }
} }
LastCodeList = hasList;
LastCode = message; LastCode = message;
if (LastCode.Equals("")&&StoreManager.Store.IsDebug) if (LastCode.Equals("")&&StoreManager.Store.IsDebug)
{ {
...@@ -308,23 +310,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -308,23 +310,21 @@ namespace OnlineStore.DeviceLibrary
private static string ProcessMsg() private static string ProcessMsg()
{ {
string msg = ""; string msg = "";
string[] codeArray = LastCode.Split(spiltStr); //string[] codeArray = LastCode.Split(new string[] { spiltStr});
foreach (string code in codeArray) if (LastCodeList.Count > 0)
{ {
if (!code.Equals("")) foreach (string code in LastCodeList)
{ {
//msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr + spiltStr; if (!code.Equals(""))
//演示机不需要发尺寸 {
//if (StoreManager.Config.Default_TrayWidth.Equals(0)) msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr;
//{ }
// msg = msg + code + spiltStr + spiltStr;
//}
//else
//{
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr + spiltStr;
//}
} }
} }
else if (!LastCode.Equals(""))
{
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + LastCode + spiltStr;
}
return msg; return msg;
} }
//=1+0x0-13x24=201810220856;025;5N02018101;121;700012865;92498;1800;## //=1+0x0-13x24=201810220856;025;5N02018101;121;700012865;92498;1800;##
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!