LaneOut - add lblCardTimeOut
This commit is contained in:
parent
cd4fd83d4c
commit
9e34d572b7
32
AIParkingApplication/LaneOut.Designer.cs
generated
32
AIParkingApplication/LaneOut.Designer.cs
generated
|
@ -34,6 +34,7 @@
|
|||
this.grbCardInformation = new System.Windows.Forms.GroupBox();
|
||||
this.lblCardType = new System.Windows.Forms.Label();
|
||||
this.lblCardTime = new System.Windows.Forms.Label();
|
||||
this.lblMoneyAmount = new System.Windows.Forms.Label();
|
||||
this.lblPlateString = new System.Windows.Forms.Label();
|
||||
this.lblCardNumber = new System.Windows.Forms.Label();
|
||||
this.pictureBoxPlateImage = new System.Windows.Forms.PictureBox();
|
||||
|
@ -44,7 +45,7 @@
|
|||
this.grbOverviewCamera = new System.Windows.Forms.GroupBox();
|
||||
this.lblLaneLabel = new System.Windows.Forms.Label();
|
||||
this.lblStatusInfo = new System.Windows.Forms.Label();
|
||||
this.lblMoneyAmount = new System.Windows.Forms.Label();
|
||||
this.lblCardTimeOut = new System.Windows.Forms.Label();
|
||||
this.grbPlateRefernce.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxOverviewImageIn)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImageIn)).BeginInit();
|
||||
|
@ -92,6 +93,7 @@
|
|||
// grbCardInformation
|
||||
//
|
||||
this.grbCardInformation.Controls.Add(this.lblCardType);
|
||||
this.grbCardInformation.Controls.Add(this.lblCardTimeOut);
|
||||
this.grbCardInformation.Controls.Add(this.lblCardTime);
|
||||
this.grbCardInformation.Controls.Add(this.lblMoneyAmount);
|
||||
this.grbCardInformation.Controls.Add(this.lblPlateString);
|
||||
|
@ -119,9 +121,18 @@
|
|||
this.lblCardTime.AutoSize = true;
|
||||
this.lblCardTime.Location = new System.Drawing.Point(223, 64);
|
||||
this.lblCardTime.Name = "lblCardTime";
|
||||
this.lblCardTime.Size = new System.Drawing.Size(68, 18);
|
||||
this.lblCardTime.Size = new System.Drawing.Size(96, 18);
|
||||
this.lblCardTime.TabIndex = 0;
|
||||
this.lblCardTime.Text = "Thời gian";
|
||||
this.lblCardTime.Text = "Thời gian vào";
|
||||
//
|
||||
// lblMoneyAmount
|
||||
//
|
||||
this.lblMoneyAmount.AutoSize = true;
|
||||
this.lblMoneyAmount.Location = new System.Drawing.Point(462, 31);
|
||||
this.lblMoneyAmount.Name = "lblMoneyAmount";
|
||||
this.lblMoneyAmount.Size = new System.Drawing.Size(54, 18);
|
||||
this.lblMoneyAmount.TabIndex = 0;
|
||||
this.lblMoneyAmount.Text = "Số tiền";
|
||||
//
|
||||
// lblPlateString
|
||||
//
|
||||
|
@ -229,14 +240,14 @@
|
|||
this.lblStatusInfo.Text = "XIN CHÀO";
|
||||
this.lblStatusInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblMoneyAmount
|
||||
// lblCardTimeOut
|
||||
//
|
||||
this.lblMoneyAmount.AutoSize = true;
|
||||
this.lblMoneyAmount.Location = new System.Drawing.Point(462, 31);
|
||||
this.lblMoneyAmount.Name = "lblMoneyAmount";
|
||||
this.lblMoneyAmount.Size = new System.Drawing.Size(54, 18);
|
||||
this.lblMoneyAmount.TabIndex = 0;
|
||||
this.lblMoneyAmount.Text = "Số tiền";
|
||||
this.lblCardTimeOut.AutoSize = true;
|
||||
this.lblCardTimeOut.Location = new System.Drawing.Point(462, 64);
|
||||
this.lblCardTimeOut.Name = "lblCardTimeOut";
|
||||
this.lblCardTimeOut.Size = new System.Drawing.Size(85, 18);
|
||||
this.lblCardTimeOut.TabIndex = 0;
|
||||
this.lblCardTimeOut.Text = "Thời gian ra";
|
||||
//
|
||||
// LaneOut
|
||||
//
|
||||
|
@ -283,5 +294,6 @@
|
|||
private System.Windows.Forms.Label lblLaneLabel;
|
||||
private System.Windows.Forms.Label lblStatusInfo;
|
||||
private System.Windows.Forms.Label lblMoneyAmount;
|
||||
private System.Windows.Forms.Label lblCardTimeOut;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,11 +92,10 @@ namespace AIParkingApplication
|
|||
pictureBoxOverviewImage.UpdateImage(overviewVideoFrame.ToBitmap());
|
||||
|
||||
var cardInformation = await apiController.GetCardInformation(cardNumber);
|
||||
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.CardType, DateTime.Now.GetTimeFormatted());
|
||||
|
||||
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());
|
||||
int.TryParse(saveLogResult.Cost, out int moneyAmount);
|
||||
lblMoneyAmount.Text = $"Số tiền: {string.Format("{0:n0}", moneyAmount)} vnđ";
|
||||
|
||||
ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.CardType, cardInformation.TimeIn, DateTime.Now.GetTimeFormatted(), saveLogResult.Cost);
|
||||
|
||||
if (saveLogResult.Status)
|
||||
{
|
||||
|
@ -181,12 +180,17 @@ namespace AIParkingApplication
|
|||
overviewCamera.Start();
|
||||
}
|
||||
|
||||
private void ShowCardInfoOnUI(string cardNumber, string plateString, string cardType, string cardTime)
|
||||
private void ShowCardInfoOnUI(string cardNumber, string plateString, string cardType, string cardTimeIn, string cardTimeOut, string money)
|
||||
{
|
||||
lblCardNumber.UpdateLabel($"Số thẻ: {cardNumber}");
|
||||
lblPlateString.UpdateLabel($"Biển số: {plateString}");
|
||||
lblCardType.UpdateLabel($"Loại thẻ: {cardType}");
|
||||
lblCardTime.UpdateLabel($"Thời gian: {cardTime}");
|
||||
lblCardTime.UpdateLabel($"Thời gian vào: {cardTimeIn}");
|
||||
lblCardTimeOut.UpdateLabel($"Thời gian ra: {cardTimeOut}");
|
||||
|
||||
int.TryParse(money, out int moneyAmount);
|
||||
lblMoneyAmount.UpdateLabel($"Số tiền: {string.Format("{0:n0}", moneyAmount)} vnđ");
|
||||
|
||||
lblStatusInfo.UpdateLabel(string.IsNullOrEmpty(plateString) ? "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ" : $"MỜI XE {plateString} QUA", string.IsNullOrEmpty(plateString) ? Color.Red : Color.Green);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,6 +132,9 @@
|
|||
<metadata name="lblCardType.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="lblCardTimeOut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="lblCardTime.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
|
Loading…
Reference in New Issue
Block a user