LaneIn - Add Method: ClearPlateAndOverviewImage
This commit is contained in:
parent
0d5e76b2af
commit
5b90cee75b
|
@ -60,6 +60,7 @@ namespace AIParkingApplication
|
|||
|
||||
private async void C3Device_OnNewCardReceived(int doorId, string cardNumber)
|
||||
{
|
||||
ClearPlateAndOverviewImage();
|
||||
var cardInfoResult = await apiController.GetCardInformation(cardNumber);
|
||||
if (cardInfoResult.IsValid)
|
||||
{
|
||||
|
@ -141,6 +142,21 @@ namespace AIParkingApplication
|
|||
}));
|
||||
}
|
||||
|
||||
private void ClearPlateAndOverviewImage()
|
||||
{
|
||||
pictureBoxPlateImage.Invoke(new Action(() =>
|
||||
{
|
||||
pictureBoxPlateImage.Image?.Dispose();
|
||||
pictureBoxPlateImage.Image = null;
|
||||
}));
|
||||
|
||||
pictureBoxOverviewImage.Invoke(new Action(() =>
|
||||
{
|
||||
pictureBoxOverviewImage.Image?.Dispose();
|
||||
pictureBoxOverviewImage.Image = null;
|
||||
}));
|
||||
}
|
||||
|
||||
private void OpenDoor(int doorId)
|
||||
{
|
||||
if (c3Device.OpenDoor(doorId).HasError)
|
||||
|
|
Loading…
Reference in New Issue
Block a user