LaneIn - rename lblRecogizePlateStatus to lblStatusInfo

This commit is contained in:
DucDangAnh 2020-06-29 17:02:48 +07:00
parent e3d81bc413
commit 1eee458212
2 changed files with 29 additions and 29 deletions

View File

@ -40,7 +40,7 @@
this.grbCardInformation = new System.Windows.Forms.GroupBox();
this.lblCardTime = new System.Windows.Forms.Label();
this.lblPlateString = new System.Windows.Forms.Label();
this.lblRecogizePlateStatus = new System.Windows.Forms.Label();
this.lblStatusInfo = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateImage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlateVideo)).BeginInit();
this.grbPlateCamera.SuspendLayout();
@ -176,24 +176,24 @@
this.lblPlateString.TabIndex = 0;
this.lblPlateString.Text = "Biển số";
//
// lblRecogizePlateStatus
// lblStatusInfo
//
this.lblRecogizePlateStatus.BackColor = System.Drawing.Color.CornflowerBlue;
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.Size = new System.Drawing.Size(440, 40);
this.lblRecogizePlateStatus.TabIndex = 15;
this.lblRecogizePlateStatus.Text = "XIN CHÀO";
this.lblRecogizePlateStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblStatusInfo.BackColor = System.Drawing.Color.CornflowerBlue;
this.lblStatusInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblStatusInfo.ForeColor = System.Drawing.SystemColors.Control;
this.lblStatusInfo.Location = new System.Drawing.Point(1, 159);
this.lblStatusInfo.Margin = new System.Windows.Forms.Padding(0);
this.lblStatusInfo.Name = "lblStatusInfo";
this.lblStatusInfo.Size = new System.Drawing.Size(440, 40);
this.lblStatusInfo.TabIndex = 15;
this.lblStatusInfo.Text = "XIN CHÀO";
this.lblStatusInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// LaneIn
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblRecogizePlateStatus);
this.Controls.Add(this.lblStatusInfo);
this.Controls.Add(this.grbPlateCamera);
this.Controls.Add(this.grbOverviewCamera);
this.Controls.Add(this.lblLaneLabel);
@ -226,6 +226,6 @@
private System.Windows.Forms.GroupBox grbCardInformation;
private System.Windows.Forms.Label lblPlateString;
private System.Windows.Forms.Label lblCardTime;
private System.Windows.Forms.Label lblRecogizePlateStatus;
private System.Windows.Forms.Label lblStatusInfo;
}
}

View File

@ -98,28 +98,28 @@ namespace AIParkingApplication
}
else
{
lblRecogizePlateStatus.Invoke(new Action(() =>
lblStatusInfo.Invoke(new Action(() =>
{
lblRecogizePlateStatus.BackColor = Color.Red;
lblRecogizePlateStatus.Text = "KHÔNG THỂ KẾT NỐI ĐẾN MÁY CHỦ";
lblStatusInfo.BackColor = Color.Red;
lblStatusInfo.Text = "KHÔNG THỂ KẾT NỐI ĐẾN MÁY CHỦ";
}));
}
}
else
{
lblRecogizePlateStatus.Invoke(new Action(() =>
lblStatusInfo.Invoke(new Action(() =>
{
lblRecogizePlateStatus.BackColor = Color.Red;
lblRecogizePlateStatus.Text = "THẺ ĐÃ ĐƯỢC SỬ DỤNG";
lblStatusInfo.BackColor = Color.Red;
lblStatusInfo.Text = "THẺ ĐÃ ĐƯỢC SỬ DỤNG";
}));
}
}
else
{
lblRecogizePlateStatus.Invoke(new Action(() =>
lblStatusInfo.Invoke(new Action(() =>
{
lblRecogizePlateStatus.BackColor = Color.Purple;
lblRecogizePlateStatus.Text = "THẺ KHÔNG HỢP LỆ";
lblStatusInfo.BackColor = Color.Purple;
lblStatusInfo.Text = "THẺ KHÔNG HỢP LỆ";
}));
}
}
@ -161,10 +161,10 @@ namespace AIParkingApplication
{
if (c3Device.OpenDoor(doorId).HasError)
{
lblRecogizePlateStatus.Invoke(new Action(() =>
lblStatusInfo.Invoke(new Action(() =>
{
lblRecogizePlateStatus.BackColor = Color.Red;
lblRecogizePlateStatus.Text = "KHÔNG THỂ KẾT NỐI TỚI THIẾT BỊ MỞ CỬA";
lblStatusInfo.BackColor = Color.Red;
lblStatusInfo.Text = "KHÔNG THỂ KẾT NỐI TỚI THIẾT BỊ MỞ CỬA";
}));
}
}
@ -231,10 +231,10 @@ namespace AIParkingApplication
lblCardTime.Text = $"Thời gian: {cardTime}";
}));
lblRecogizePlateStatus.Invoke(new Action(() =>
lblStatusInfo.Invoke(new Action(() =>
{
lblRecogizePlateStatus.Text = string.IsNullOrEmpty(plateString) ? "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ" : $"MỜI XE {plateString} VÀO";
lblRecogizePlateStatus.BackColor = string.IsNullOrEmpty(plateString) ? System.Drawing.Color.Red : System.Drawing.Color.Green;
lblStatusInfo.Text = string.IsNullOrEmpty(plateString) ? "KHÔNG NHẬN DIỆN ĐƯỢC BIỂN SỐ" : $"MỜI XE {plateString} VÀO";
lblStatusInfo.BackColor = string.IsNullOrEmpty(plateString) ? System.Drawing.Color.Red : System.Drawing.Color.Green;
}));
}