LaneIn - Refactor C3Device_OnNewCardReceived
This commit is contained in:
parent
562cccc7d5
commit
19f9a4ed82
|
@ -57,10 +57,18 @@ namespace AIParkingApplication
|
||||||
{
|
{
|
||||||
ClearPlateAndOverviewImage();
|
ClearPlateAndOverviewImage();
|
||||||
var cardInfoResult = await apiController.GetCardInformation(cardNumber);
|
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();
|
plateCamera.RequestCaptureOneFrame();
|
||||||
overviewCamera.RequestCaptureOneFrame();
|
overviewCamera.RequestCaptureOneFrame();
|
||||||
await Task.Delay(200);
|
await Task.Delay(200);
|
||||||
|
@ -85,17 +93,7 @@ namespace AIParkingApplication
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lblStatusInfo.UpdateLabel("KHÔNG THỂ KẾT NỐI ĐẾN MÁY CHỦ", Color.Red);
|
lblStatusInfo.UpdateLabel("KHÔNG CÓ 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user