LaneIn, LaneOut - Remove hardcoded cameraId

This commit is contained in:
DucDangAnh 2020-07-08 15:38:39 +07:00
parent 47a386a3f7
commit 9cd22def78
2 changed files with 8 additions and 2 deletions

View File

@ -14,6 +14,7 @@ namespace AIParkingApplication
private Camera plateCamera;
private PlateProcessor plateProcessor;
private int doorId;
private string cameraId;
private bool isSupportSquarePlate;
private bool isSupportLongPlate;
private bool isAutoOpenDoor;
@ -22,6 +23,7 @@ namespace AIParkingApplication
private ApiController apiController;
public LaneIn(int doorId,
string cameraId,
string plateStream,
string overviewStream,
IDoorControlAccess doorControlAccess,
@ -34,6 +36,7 @@ namespace AIParkingApplication
{
InitializeComponent();
this.doorId = doorId;
this.cameraId = cameraId;
this.isSupportSquarePlate = isSupportSquarePlate;
this.isSupportLongPlate = isSupportLongPlate;
this.isAutoOpenDoor = isAutoOpenDoor;
@ -78,7 +81,7 @@ namespace AIParkingApplication
var cardInformation = await apiController.GetCardInformation(cardNumber);
var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame);
var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), cameraId, result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame);
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.CardType, DateTime.Now.GetTimeFormatted());

View File

@ -14,6 +14,7 @@ namespace AIParkingApplication
private Camera plateCamera;
private PlateProcessor plateProcessor;
private int doorId;
private string cameraId;
private bool isSupportSquarePlate;
private bool isSupportLongPlate;
private bool isAutoOpenDoor;
@ -23,6 +24,7 @@ namespace AIParkingApplication
private Printer printer;
public LaneOut(int doorId,
string cameraId,
string plateStream,
string overviewStream,
IDoorControlAccess doorControlAccess,
@ -35,6 +37,7 @@ namespace AIParkingApplication
{
InitializeComponent();
this.doorId = doorId;
this.cameraId = cameraId;
this.isSupportSquarePlate = isSupportSquarePlate;
this.isSupportLongPlate = isSupportLongPlate;
this.isAutoOpenDoor = isAutoOpenDoor;
@ -87,7 +90,7 @@ namespace AIParkingApplication
var cardInformation = await apiController.GetCardInformation(cardNumber);
var saveLogResult = await apiController.SaveLog(LaneDirection.Out, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame, cardInformation.LogID.ToString());
var saveLogResult = await apiController.SaveLog(LaneDirection.Out, cardInformation.CardRealID.ToString(), cameraId, result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame, cardInformation.LogID.ToString());
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.PlateString, cardInformation.CardType, cardInformation.TimeIn, DateTime.Now.GetTimeFormatted(), saveLogResult.Cost);