AIParkingApplicationForm - Fix bug: ReadAccessControlDeviceIPConfiguration
This commit is contained in:
parent
5c13a5c5e0
commit
2c559d26b9
|
@ -62,28 +62,28 @@
|
||||||
// toolStripMenuItemSwitchLaneInIn
|
// toolStripMenuItemSwitchLaneInIn
|
||||||
//
|
//
|
||||||
this.toolStripMenuItemSwitchLaneInIn.Name = "toolStripMenuItemSwitchLaneInIn";
|
this.toolStripMenuItemSwitchLaneInIn.Name = "toolStripMenuItemSwitchLaneInIn";
|
||||||
this.toolStripMenuItemSwitchLaneInIn.Size = new System.Drawing.Size(180, 22);
|
this.toolStripMenuItemSwitchLaneInIn.Size = new System.Drawing.Size(123, 22);
|
||||||
this.toolStripMenuItemSwitchLaneInIn.Text = "Vào - Vào";
|
this.toolStripMenuItemSwitchLaneInIn.Text = "Vào - Vào";
|
||||||
this.toolStripMenuItemSwitchLaneInIn.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneInIn_Click);
|
this.toolStripMenuItemSwitchLaneInIn.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneInIn_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItemSwitchLaneInOut
|
// toolStripMenuItemSwitchLaneInOut
|
||||||
//
|
//
|
||||||
this.toolStripMenuItemSwitchLaneInOut.Name = "toolStripMenuItemSwitchLaneInOut";
|
this.toolStripMenuItemSwitchLaneInOut.Name = "toolStripMenuItemSwitchLaneInOut";
|
||||||
this.toolStripMenuItemSwitchLaneInOut.Size = new System.Drawing.Size(180, 22);
|
this.toolStripMenuItemSwitchLaneInOut.Size = new System.Drawing.Size(123, 22);
|
||||||
this.toolStripMenuItemSwitchLaneInOut.Text = "Vào - Ra";
|
this.toolStripMenuItemSwitchLaneInOut.Text = "Vào - Ra";
|
||||||
this.toolStripMenuItemSwitchLaneInOut.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneInOut_Click);
|
this.toolStripMenuItemSwitchLaneInOut.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneInOut_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItemSwitchLaneOutOut
|
// toolStripMenuItemSwitchLaneOutOut
|
||||||
//
|
//
|
||||||
this.toolStripMenuItemSwitchLaneOutOut.Name = "toolStripMenuItemSwitchLaneOutOut";
|
this.toolStripMenuItemSwitchLaneOutOut.Name = "toolStripMenuItemSwitchLaneOutOut";
|
||||||
this.toolStripMenuItemSwitchLaneOutOut.Size = new System.Drawing.Size(180, 22);
|
this.toolStripMenuItemSwitchLaneOutOut.Size = new System.Drawing.Size(123, 22);
|
||||||
this.toolStripMenuItemSwitchLaneOutOut.Text = "Ra - Ra";
|
this.toolStripMenuItemSwitchLaneOutOut.Text = "Ra - Ra";
|
||||||
this.toolStripMenuItemSwitchLaneOutOut.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneOutOut_Click);
|
this.toolStripMenuItemSwitchLaneOutOut.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneOutOut_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItemSwitchLaneOutIn
|
// toolStripMenuItemSwitchLaneOutIn
|
||||||
//
|
//
|
||||||
this.toolStripMenuItemSwitchLaneOutIn.Name = "toolStripMenuItemSwitchLaneOutIn";
|
this.toolStripMenuItemSwitchLaneOutIn.Name = "toolStripMenuItemSwitchLaneOutIn";
|
||||||
this.toolStripMenuItemSwitchLaneOutIn.Size = new System.Drawing.Size(180, 22);
|
this.toolStripMenuItemSwitchLaneOutIn.Size = new System.Drawing.Size(123, 22);
|
||||||
this.toolStripMenuItemSwitchLaneOutIn.Text = "Ra - Vào";
|
this.toolStripMenuItemSwitchLaneOutIn.Text = "Ra - Vào";
|
||||||
this.toolStripMenuItemSwitchLaneOutIn.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneOutIn_Click);
|
this.toolStripMenuItemSwitchLaneOutIn.Click += new System.EventHandler(this.toolStripMenuItemSwitchLaneOutIn_Click);
|
||||||
//
|
//
|
||||||
|
@ -100,6 +100,7 @@
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "AIParking - Phần mềm quản lý bãi đỗ xe";
|
this.Text = "AIParking - Phần mềm quản lý bãi đỗ xe";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AIParkingApplicationForm_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AIParkingApplicationForm_FormClosing);
|
||||||
|
this.Load += new System.EventHandler(this.AIParkingApplicationForm_Load);
|
||||||
this.menuStrip.ResumeLayout(false);
|
this.menuStrip.ResumeLayout(false);
|
||||||
this.menuStrip.PerformLayout();
|
this.menuStrip.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
|
@ -27,7 +27,13 @@ namespace AIParkingApplication
|
||||||
this.configOnWeb = configOnWeb;
|
this.configOnWeb = configOnWeb;
|
||||||
|
|
||||||
ReadAccessControlDeviceIPConfiguration();
|
ReadAccessControlDeviceIPConfiguration();
|
||||||
|
if (string.IsNullOrEmpty(doorAccessControlDeviceIP))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Kiểm tra lại cấu hình IP thiết bị mở cửa! (C3200)", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
c3Device = new C3DeviceController(doorAccessControlDeviceIP);
|
||||||
sidebar = new Sidebar(apiController)
|
sidebar = new Sidebar(apiController)
|
||||||
{
|
{
|
||||||
Location = new Point(0, 0)
|
Location = new Point(0, 0)
|
||||||
|
@ -51,7 +57,7 @@ namespace AIParkingApplication
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitAllLanes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitAllLanes()
|
private void InitAllLanes()
|
||||||
|
@ -200,10 +206,8 @@ namespace AIParkingApplication
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Kiểm tra lại cấu hình IP thiết bị mở cửa! (C3200)");
|
|
||||||
Console.WriteLine($"{DateTime.Now.GetTimeFormatted()}\tReadAccessControlDeviceIPConfiguration\t{ex.Message}");
|
Console.WriteLine($"{DateTime.Now.GetTimeFormatted()}\tReadAccessControlDeviceIPConfiguration\t{ex.Message}");
|
||||||
Application.Exit();
|
doorAccessControlDeviceIP = string.Empty;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,5 +215,10 @@ namespace AIParkingApplication
|
||||||
{
|
{
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AIParkingApplicationForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
InitAllLanes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user