Compare commits
3 Commits
86949443bb
...
a0199cc0f8
Author | SHA1 | Date | |
---|---|---|---|
a0199cc0f8 | |||
f641690f38 | |||
96d01f00f5 |
|
@ -78,6 +78,7 @@
|
|||
<Compile Include="AppConstant.cs" />
|
||||
<Compile Include="C3DeviceController.cs" />
|
||||
<Compile Include="Camera.cs" />
|
||||
<Compile Include="ILane.cs" />
|
||||
<Compile Include="LaneIn.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
|
8
AIParkingApplication/ILane.cs
Normal file
8
AIParkingApplication/ILane.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace AIParkingApplication
|
||||
{
|
||||
public interface ILane
|
||||
{
|
||||
void Start();
|
||||
void Stop();
|
||||
}
|
||||
}
|
17
AIParkingApplication/LaneIn.Designer.cs
generated
17
AIParkingApplication/LaneIn.Designer.cs
generated
|
@ -77,7 +77,7 @@
|
|||
this.grbPlateCamera.Location = new System.Drawing.Point(1, 208);
|
||||
this.grbPlateCamera.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.grbPlateCamera.Name = "grbPlateCamera";
|
||||
this.grbPlateCamera.Size = new System.Drawing.Size(441, 237);
|
||||
this.grbPlateCamera.Size = new System.Drawing.Size(440, 238);
|
||||
this.grbPlateCamera.TabIndex = 12;
|
||||
this.grbPlateCamera.TabStop = false;
|
||||
this.grbPlateCamera.Text = "Camera biển số";
|
||||
|
@ -108,22 +108,20 @@
|
|||
this.grbOverviewCamera.Location = new System.Drawing.Point(1, 454);
|
||||
this.grbOverviewCamera.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.grbOverviewCamera.Name = "grbOverviewCamera";
|
||||
this.grbOverviewCamera.Size = new System.Drawing.Size(441, 238);
|
||||
this.grbOverviewCamera.Size = new System.Drawing.Size(440, 238);
|
||||
this.grbOverviewCamera.TabIndex = 11;
|
||||
this.grbOverviewCamera.TabStop = false;
|
||||
this.grbOverviewCamera.Text = "Camera toàn cảnh";
|
||||
//
|
||||
// lblLaneLabel
|
||||
//
|
||||
this.lblLaneLabel.AutoSize = true;
|
||||
this.lblLaneLabel.BackColor = System.Drawing.Color.Red;
|
||||
this.lblLaneLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblLaneLabel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.lblLaneLabel.Location = new System.Drawing.Point(1, 1);
|
||||
this.lblLaneLabel.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.lblLaneLabel.Name = "lblLaneLabel";
|
||||
this.lblLaneLabel.Padding = new System.Windows.Forms.Padding(138, 5, 137, 5);
|
||||
this.lblLaneLabel.Size = new System.Drawing.Size(441, 49);
|
||||
this.lblLaneLabel.Size = new System.Drawing.Size(440, 50);
|
||||
this.lblLaneLabel.TabIndex = 10;
|
||||
this.lblLaneLabel.Text = "LÀN VÀO";
|
||||
this.lblLaneLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
|
@ -157,7 +155,7 @@
|
|||
this.grbCardInformation.Location = new System.Drawing.Point(1, 55);
|
||||
this.grbCardInformation.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.grbCardInformation.Name = "grbCardInformation";
|
||||
this.grbCardInformation.Size = new System.Drawing.Size(441, 104);
|
||||
this.grbCardInformation.Size = new System.Drawing.Size(440, 104);
|
||||
this.grbCardInformation.TabIndex = 13;
|
||||
this.grbCardInformation.TabStop = false;
|
||||
this.grbCardInformation.Text = "Thông tin thẻ";
|
||||
|
@ -192,15 +190,13 @@
|
|||
//
|
||||
// lblRecogizePlateStatus
|
||||
//
|
||||
this.lblRecogizePlateStatus.AutoSize = true;
|
||||
this.lblRecogizePlateStatus.BackColor = System.Drawing.Color.Green;
|
||||
this.lblRecogizePlateStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblRecogizePlateStatus.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.lblRecogizePlateStatus.Location = new System.Drawing.Point(1, 159);
|
||||
this.lblRecogizePlateStatus.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.lblRecogizePlateStatus.Name = "lblRecogizePlateStatus";
|
||||
this.lblRecogizePlateStatus.Padding = new System.Windows.Forms.Padding(12, 6, 12, 6);
|
||||
this.lblRecogizePlateStatus.Size = new System.Drawing.Size(441, 41);
|
||||
this.lblRecogizePlateStatus.Size = new System.Drawing.Size(440, 40);
|
||||
this.lblRecogizePlateStatus.TabIndex = 15;
|
||||
this.lblRecogizePlateStatus.Text = "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ";
|
||||
this.lblRecogizePlateStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
|
@ -216,7 +212,7 @@
|
|||
this.Controls.Add(this.grbCardInformation);
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Name = "LaneIn";
|
||||
this.Size = new System.Drawing.Size(443, 692);
|
||||
this.Size = new System.Drawing.Size(442, 692);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImage)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).EndInit();
|
||||
this.grbPlateCamera.ResumeLayout(false);
|
||||
|
@ -226,7 +222,6 @@
|
|||
this.grbCardInformation.ResumeLayout(false);
|
||||
this.grbCardInformation.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ using System.Windows.Forms;
|
|||
|
||||
namespace AIParkingApplication
|
||||
{
|
||||
public partial class LaneIn : UserControl
|
||||
public partial class LaneIn : UserControl, ILane
|
||||
{
|
||||
private Camera overviewCamera;
|
||||
private Camera plateCamera;
|
||||
|
@ -88,6 +88,8 @@ namespace AIParkingApplication
|
|||
pictureBoxPlateImage.Image?.Dispose();
|
||||
pictureBoxPlateImage.Image = finalPlateResult.PlateImage;
|
||||
}));
|
||||
|
||||
ShowCardInfoOnUI("224", finalPlateResult.PlateString, "Thẻ tháng", DateTime.Now.ToString(AppConstant.DATETIME_FORMAT));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -108,6 +110,34 @@ namespace AIParkingApplication
|
|||
overviewCamera.Start();
|
||||
}
|
||||
|
||||
private void ShowCardInfoOnUI(string cardNumber, string plateString, string cardType, string cardTime)
|
||||
{
|
||||
lblCardNumber.Invoke(new Action(() =>
|
||||
{
|
||||
lblCardNumber.Text = $"Số thẻ: {cardNumber}";
|
||||
}));
|
||||
|
||||
lblPlateString.Invoke(new Action(() =>
|
||||
{
|
||||
lblPlateString.Text = $"Biển số: {plateString}";
|
||||
}));
|
||||
|
||||
lblCardType.Invoke(new Action(() =>
|
||||
{
|
||||
lblCardType.Text = $"Loại thẻ: {cardType}";
|
||||
}));
|
||||
|
||||
lblCardTime.Invoke(new Action(() =>
|
||||
{
|
||||
lblCardTime.Text = $"Thời gian: {cardTime}";
|
||||
}));
|
||||
|
||||
lblRecogizePlateStatus.Invoke(new Action(() =>
|
||||
{
|
||||
lblRecogizePlateStatus.Text = string.IsNullOrEmpty(plateString) ? "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ" : $"MỜI XE {plateString} VÀO";
|
||||
}));
|
||||
}
|
||||
|
||||
private void OverviewCameraOnVideoFrameReceived(Mat videoFrame)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -156,15 +156,6 @@
|
|||
<metadata name="lblPlateString.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="button1.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>
|
||||
<metadata name="lblPlateString.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="lblRecogizePlateStatus.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