From 960e8cf76d62f121a51bb311f0dfbca293c05f15 Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Thu, 9 Jul 2020 14:37:31 +0700 Subject: [PATCH] AIParkingApplicationForm - using namepsace for shorten usage. --- .../AIParkingApplicationForm.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/AIParkingApplication/AIParkingApplicationForm.cs b/AIParkingApplication/AIParkingApplicationForm.cs index 04d440e..69e69a4 100644 --- a/AIParkingApplication/AIParkingApplicationForm.cs +++ b/AIParkingApplication/AIParkingApplicationForm.cs @@ -1,4 +1,5 @@ using System; +using System.Drawing; using System.Windows.Forms; namespace AIParkingApplication @@ -23,7 +24,7 @@ namespace AIParkingApplication this.configOnWeb = configOnWeb; sidebar = new Sidebar(apiController); - sidebar.Location = new System.Drawing.Point(0, 0); + sidebar.Location = new Point(0, 0); Controls.Add(sidebar); c3Device = new C3DeviceController("192.168.1.200"); @@ -39,7 +40,7 @@ namespace AIParkingApplication } statusBar = new StatusBar("192.168.1.122", "192.168.1.200", TimeSpan.FromSeconds(1)); - statusBar.Location = new System.Drawing.Point(0, sidebar.Location.Y + sidebar.Height + 20); + statusBar.Location = new Point(0, sidebar.Location.Y + sidebar.Height + 25); statusBar.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; Controls.Add(statusBar); @@ -72,12 +73,12 @@ namespace AIParkingApplication private void UpdateLaneInOut() { laneIn12.DoorId = 1; - laneIn12.Location = new System.Drawing.Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); + laneIn12.Location = new Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); laneIn12.Show(); laneIn12.Start(); laneOut34.DoorId = 2; - laneOut34.Location = new System.Drawing.Point(laneIn12.Location.X + laneIn12.Width + 20, menuStrip.Height); + laneOut34.Location = new Point(laneIn12.Location.X + laneIn12.Width + 20, menuStrip.Height); laneOut34.Show(); laneOut34.Start(); } @@ -85,12 +86,12 @@ namespace AIParkingApplication private void UpdateLaneInIn() { laneIn12.DoorId = 1; - laneIn12.Location = new System.Drawing.Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); + laneIn12.Location = new Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); laneIn12.Show(); laneIn12.Start(); laneIn56.DoorId = 2; - laneIn56.Location = new System.Drawing.Point(laneIn12.Location.X + laneIn12.Width + 20, menuStrip.Height); + laneIn56.Location = new Point(laneIn12.Location.X + laneIn12.Width + 20, menuStrip.Height); laneIn56.Show(); laneIn56.Start(); } @@ -98,12 +99,12 @@ namespace AIParkingApplication private void UpdateLaneOutIn() { laneOut78.DoorId = 1; - laneOut78.Location = new System.Drawing.Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); + laneOut78.Location = new Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); laneOut78.Show(); laneOut78.Start(); laneIn56.DoorId = 2; - laneIn56.Location = new System.Drawing.Point(laneOut78.Location.X + laneOut78.Width + 20, menuStrip.Height); + laneIn56.Location = new Point(laneOut78.Location.X + laneOut78.Width + 20, menuStrip.Height); laneIn56.Show(); laneIn56.Start(); } @@ -111,12 +112,12 @@ namespace AIParkingApplication private void UpdateLaneOutOut() { laneOut78.DoorId = 1; - laneOut78.Location = new System.Drawing.Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); + laneOut78.Location = new Point(sidebar.Location.X + sidebar.Width + 20, menuStrip.Height); laneOut78.Show(); laneOut78.Start(); laneOut34.DoorId = 2; - laneOut34.Location = new System.Drawing.Point(laneOut78.Location.X + laneOut78.Width + 20, menuStrip.Height); + laneOut34.Location = new Point(laneOut78.Location.X + laneOut78.Width + 20, menuStrip.Height); laneOut34.Show(); laneOut34.Start(); }