LaneIn, LaneOut - Remove hardcoded cameraId
This commit is contained in:
@@ -14,6 +14,7 @@ namespace AIParkingApplication
|
|||||||
private Camera plateCamera;
|
private Camera plateCamera;
|
||||||
private PlateProcessor plateProcessor;
|
private PlateProcessor plateProcessor;
|
||||||
private int doorId;
|
private int doorId;
|
||||||
|
private string cameraId;
|
||||||
private bool isSupportSquarePlate;
|
private bool isSupportSquarePlate;
|
||||||
private bool isSupportLongPlate;
|
private bool isSupportLongPlate;
|
||||||
private bool isAutoOpenDoor;
|
private bool isAutoOpenDoor;
|
||||||
@@ -22,6 +23,7 @@ namespace AIParkingApplication
|
|||||||
private ApiController apiController;
|
private ApiController apiController;
|
||||||
|
|
||||||
public LaneIn(int doorId,
|
public LaneIn(int doorId,
|
||||||
|
string cameraId,
|
||||||
string plateStream,
|
string plateStream,
|
||||||
string overviewStream,
|
string overviewStream,
|
||||||
IDoorControlAccess doorControlAccess,
|
IDoorControlAccess doorControlAccess,
|
||||||
@@ -34,6 +36,7 @@ namespace AIParkingApplication
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.doorId = doorId;
|
this.doorId = doorId;
|
||||||
|
this.cameraId = cameraId;
|
||||||
this.isSupportSquarePlate = isSupportSquarePlate;
|
this.isSupportSquarePlate = isSupportSquarePlate;
|
||||||
this.isSupportLongPlate = isSupportLongPlate;
|
this.isSupportLongPlate = isSupportLongPlate;
|
||||||
this.isAutoOpenDoor = isAutoOpenDoor;
|
this.isAutoOpenDoor = isAutoOpenDoor;
|
||||||
@@ -78,7 +81,7 @@ namespace AIParkingApplication
|
|||||||
|
|
||||||
var cardInformation = await apiController.GetCardInformation(cardNumber);
|
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());
|
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.CardType, DateTime.Now.GetTimeFormatted());
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace AIParkingApplication
|
|||||||
private Camera plateCamera;
|
private Camera plateCamera;
|
||||||
private PlateProcessor plateProcessor;
|
private PlateProcessor plateProcessor;
|
||||||
private int doorId;
|
private int doorId;
|
||||||
|
private string cameraId;
|
||||||
private bool isSupportSquarePlate;
|
private bool isSupportSquarePlate;
|
||||||
private bool isSupportLongPlate;
|
private bool isSupportLongPlate;
|
||||||
private bool isAutoOpenDoor;
|
private bool isAutoOpenDoor;
|
||||||
@@ -23,6 +24,7 @@ namespace AIParkingApplication
|
|||||||
private Printer printer;
|
private Printer printer;
|
||||||
|
|
||||||
public LaneOut(int doorId,
|
public LaneOut(int doorId,
|
||||||
|
string cameraId,
|
||||||
string plateStream,
|
string plateStream,
|
||||||
string overviewStream,
|
string overviewStream,
|
||||||
IDoorControlAccess doorControlAccess,
|
IDoorControlAccess doorControlAccess,
|
||||||
@@ -35,6 +37,7 @@ namespace AIParkingApplication
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.doorId = doorId;
|
this.doorId = doorId;
|
||||||
|
this.cameraId = cameraId;
|
||||||
this.isSupportSquarePlate = isSupportSquarePlate;
|
this.isSupportSquarePlate = isSupportSquarePlate;
|
||||||
this.isSupportLongPlate = isSupportLongPlate;
|
this.isSupportLongPlate = isSupportLongPlate;
|
||||||
this.isAutoOpenDoor = isAutoOpenDoor;
|
this.isAutoOpenDoor = isAutoOpenDoor;
|
||||||
@@ -87,7 +90,7 @@ namespace AIParkingApplication
|
|||||||
|
|
||||||
var cardInformation = await apiController.GetCardInformation(cardNumber);
|
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);
|
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.PlateString, cardInformation.CardType, cardInformation.TimeIn, DateTime.Now.GetTimeFormatted(), saveLogResult.Cost);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user