LaneIn - Refactor C3Device_OnNewCardReceived
This commit is contained in:
parent
562cccc7d5
commit
19f9a4ed82
|
@ -57,10 +57,18 @@ namespace AIParkingApplication
|
|||
{
|
||||
ClearPlateAndOverviewImage();
|
||||
var cardInfoResult = await apiController.GetCardInformation(cardNumber);
|
||||
if (cardInfoResult.IsValid)
|
||||
if (!cardInfoResult.IsValid)
|
||||
{
|
||||
if (cardInfoResult.Direction == "in")
|
||||
lblStatusInfo.UpdateLabel("THẺ KHÔNG HỢP LỆ", Color.Purple);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cardInfoResult.Direction != "in")
|
||||
{
|
||||
lblStatusInfo.UpdateLabel("THẺ ĐÃ ĐƯỢC SỬ DỤNG", Color.Red);
|
||||
return;
|
||||
}
|
||||
|
||||
plateCamera.RequestCaptureOneFrame();
|
||||
overviewCamera.RequestCaptureOneFrame();
|
||||
await Task.Delay(200);
|
||||
|
@ -85,17 +93,7 @@ namespace AIParkingApplication
|
|||
}
|
||||
else
|
||||
{
|
||||
lblStatusInfo.UpdateLabel("KHÔNG THỂ KẾT NỐI ĐẾN MÁY CHỦ", Color.Red);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblStatusInfo.UpdateLabel("THẺ ĐÃ ĐƯỢC SỬ DỤNG", Color.Red);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblStatusInfo.UpdateLabel("THẺ KHÔNG HỢP LỆ", Color.Purple);
|
||||
lblStatusInfo.UpdateLabel("KHÔNG CÓ KẾT NỐI ĐẾN MÁY CHỦ", Color.Red);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user