LaneIn - Merge isAutoOpenDoor && this.doorId == doorId

This commit is contained in:
DucDangAnh 2020-06-29 11:46:07 +07:00
parent 34fc28a0d8
commit f280376752

View File

@ -91,19 +91,16 @@ namespace AIParkingApplication
var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.ToString(AppConstant.DATETIME_FORMAT), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame); var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.ToString(AppConstant.DATETIME_FORMAT), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame);
if (saveLogResult.Status) if (saveLogResult.Status)
{ {
if (isAutoOpenDoor) if (isAutoOpenDoor && this.doorId == doorId)
{ {
if (this.doorId == doorId) var openDoorResult = c3Device.OpenDoor(doorId);
if (openDoorResult.HasError)
{ {
var openDoorResult = c3Device.OpenDoor(doorId); lblRecogizePlateStatus.Invoke(new Action(() =>
if (openDoorResult.HasError)
{ {
lblRecogizePlateStatus.Invoke(new Action(() => lblRecogizePlateStatus.BackColor = Color.Red;
{ lblRecogizePlateStatus.Text = "KHÔNG THỂ MỞ CỬA";
lblRecogizePlateStatus.BackColor = Color.Red; }));
lblRecogizePlateStatus.Text = "KHÔNG THỂ MỞ CỬA";
}));
}
} }
} }
} }