Quellcode durchsuchen

号牌机、界面微调。待完善

yc_t vor 6 Jahren
Ursprung
Commit
507606a7f4

+ 1 - 1
PLCLinker/centralController/App.config

@@ -26,7 +26,7 @@
     <add key="plcParkingSpaceCount" value="200" />
     <add key="plcRefreshInterval" value="200"/>
     <!--显示屏信息-->
-    <add key="allInOneMachineIP" value="192.168.10.99"/>
+    <add key="allInOneMachineIP" value="192.168.10.90"/>
     <add key="allInOneMachinePort" value="8888"/>
     <!--中控webServer端口-->
     <add key="webPort" value="9000"/>

+ 27 - 119
PLCLinker/centralController/FormCentralController.Designer.cs

@@ -67,15 +67,10 @@
             this.dci_terminal = new DevComponents.DotNetBar.DockContainerItem();
             this.dockSite1 = new DevComponents.DotNetBar.DockSite();
             this.dockSite_notification = new DevComponents.DotNetBar.DockSite();
-            this.bar_basicInfo = new DevComponents.DotNetBar.Bar();
-            this.basicInfoPanel = new DevComponents.DotNetBar.PanelDockContainer();
-            this.tlp_basicInfo = new System.Windows.Forms.TableLayoutPanel();
-            this.tbx_sysInfo = new DevComponents.DotNetBar.Controls.TextBoxX();
-            this.progressBar1 = new System.Windows.Forms.ProgressBar();
-            this.dci_basicInfo = new DevComponents.DotNetBar.DockContainerItem();
             this.bar_notification = new DevComponents.DotNetBar.Bar();
             this.warningPanel = new DevComponents.DotNetBar.PanelDockContainer();
             this.tbx_notification = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.dci_warning = new DevComponents.DotNetBar.DockContainerItem();
             this.dockSite8 = new DevComponents.DotNetBar.DockSite();
             this.dockSite5 = new DevComponents.DotNetBar.DockSite();
@@ -137,10 +132,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.bar_side)).BeginInit();
             this.bar_side.SuspendLayout();
             this.dockSite_notification.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.bar_basicInfo)).BeginInit();
-            this.bar_basicInfo.SuspendLayout();
-            this.basicInfoPanel.SuspendLayout();
-            this.tlp_basicInfo.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bar_notification)).BeginInit();
             this.bar_notification.SuspendLayout();
             this.warningPanel.SuspendLayout();
@@ -217,10 +208,10 @@
             this.bar_mainWin.CanDockRight = false;
             this.bar_mainWin.CanDockTop = false;
             this.bar_mainWin.CanHide = true;
+            this.bar_mainWin.Controls.Add(this.testPanel);
             this.bar_mainWin.Controls.Add(this.NumMachineMonitorPanel);
             this.bar_mainWin.Controls.Add(this.paymentPanel);
             this.bar_mainWin.Controls.Add(this.ParkingSpaceMonitorPanel);
-            this.bar_mainWin.Controls.Add(this.testPanel);
             this.bar_mainWin.DockTabAlignment = DevComponents.DotNetBar.eTabStripAlignment.Top;
             this.bar_mainWin.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bar_mainWin.IsMaximized = false;
@@ -232,7 +223,7 @@
             this.bar_mainWin.LayoutType = DevComponents.DotNetBar.eLayoutType.DockContainer;
             this.bar_mainWin.Location = new System.Drawing.Point(0, 0);
             this.bar_mainWin.Name = "bar_mainWin";
-            this.bar_mainWin.SelectedDockTab = 0;
+            this.bar_mainWin.SelectedDockTab = 3;
             this.bar_mainWin.SingleLineColor = System.Drawing.SystemColors.ControlDarkDark;
             this.bar_mainWin.Size = new System.Drawing.Size(524, 345);
             this.bar_mainWin.Stretch = true;
@@ -398,6 +389,7 @@
             this.bar_bottom.AccessibleName = "DotNetBar Bar";
             this.bar_bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
             this.bar_bottom.AlwaysDisplayDockTab = true;
+            this.bar_bottom.AutoHide = true;
             this.bar_bottom.CanDockBottom = false;
             this.bar_bottom.CanDockDocument = true;
             this.bar_bottom.CanDockLeft = false;
@@ -603,107 +595,16 @@
             // 
             this.dockSite_notification.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
             this.dockSite_notification.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.dockSite_notification.Controls.Add(this.bar_basicInfo);
             this.dockSite_notification.Controls.Add(this.bar_notification);
             this.dockSite_notification.Dock = System.Windows.Forms.DockStyle.Right;
             this.dockSite_notification.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer(new DevComponents.DotNetBar.DocumentBaseContainer[] {
-            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_basicInfo, 320, 268))),
-            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_notification, 320, 299)))}, DevComponents.DotNetBar.eOrientation.Vertical);
+            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_notification, 320, 570)))}, DevComponents.DotNetBar.eOrientation.Vertical);
             this.dockSite_notification.Location = new System.Drawing.Point(871, 98);
             this.dockSite_notification.Name = "dockSite_notification";
             this.dockSite_notification.Size = new System.Drawing.Size(323, 570);
             this.dockSite_notification.TabIndex = 1;
             this.dockSite_notification.TabStop = false;
             // 
-            // bar_basicInfo
-            // 
-            this.bar_basicInfo.AccessibleDescription = "DotNetBar Bar (bar_basicInfo)";
-            this.bar_basicInfo.AccessibleName = "DotNetBar Bar";
-            this.bar_basicInfo.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
-            this.bar_basicInfo.AutoSyncBarCaption = true;
-            this.bar_basicInfo.CloseSingleTab = true;
-            this.bar_basicInfo.Controls.Add(this.basicInfoPanel);
-            this.bar_basicInfo.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bar_basicInfo.GrabHandleStyle = DevComponents.DotNetBar.eGrabHandleStyle.Caption;
-            this.bar_basicInfo.IsMaximized = false;
-            this.bar_basicInfo.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
-            this.dci_basicInfo});
-            this.bar_basicInfo.LayoutType = DevComponents.DotNetBar.eLayoutType.DockContainer;
-            this.bar_basicInfo.Location = new System.Drawing.Point(3, 0);
-            this.bar_basicInfo.Name = "bar_basicInfo";
-            this.bar_basicInfo.Size = new System.Drawing.Size(320, 268);
-            this.bar_basicInfo.Stretch = true;
-            this.bar_basicInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
-            this.bar_basicInfo.TabIndex = 0;
-            this.bar_basicInfo.TabStop = false;
-            this.bar_basicInfo.Text = "基本信息";
-            // 
-            // basicInfoPanel
-            // 
-            this.basicInfoPanel.Controls.Add(this.tlp_basicInfo);
-            this.basicInfoPanel.Controls.Add(this.progressBar1);
-            this.basicInfoPanel.DisabledBackColor = System.Drawing.Color.Empty;
-            this.basicInfoPanel.Location = new System.Drawing.Point(3, 23);
-            this.basicInfoPanel.Name = "basicInfoPanel";
-            this.basicInfoPanel.Size = new System.Drawing.Size(314, 242);
-            this.basicInfoPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
-            this.basicInfoPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
-            this.basicInfoPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
-            this.basicInfoPanel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
-            this.basicInfoPanel.Style.GradientAngle = 90;
-            this.basicInfoPanel.TabIndex = 21;
-            // 
-            // tlp_basicInfo
-            // 
-            this.tlp_basicInfo.ColumnCount = 1;
-            this.tlp_basicInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
-            this.tlp_basicInfo.Controls.Add(this.tbx_sysInfo, 0, 1);
-            this.tlp_basicInfo.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tlp_basicInfo.Location = new System.Drawing.Point(0, 0);
-            this.tlp_basicInfo.Name = "tlp_basicInfo";
-            this.tlp_basicInfo.RowCount = 2;
-            this.tlp_basicInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
-            this.tlp_basicInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F));
-            this.tlp_basicInfo.Size = new System.Drawing.Size(314, 215);
-            this.tlp_basicInfo.TabIndex = 7;
-            // 
-            // tbx_sysInfo
-            // 
-            this.tbx_sysInfo.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
-            // 
-            // 
-            // 
-            this.tbx_sysInfo.Border.Class = "TextBoxBorder";
-            this.tbx_sysInfo.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
-            this.tbx_sysInfo.DisabledBackColor = System.Drawing.Color.White;
-            this.tbx_sysInfo.ForeColor = System.Drawing.Color.Black;
-            this.tbx_sysInfo.Location = new System.Drawing.Point(3, 46);
-            this.tbx_sysInfo.Multiline = true;
-            this.tbx_sysInfo.Name = "tbx_sysInfo";
-            this.tbx_sysInfo.PreventEnterBeep = true;
-            this.tbx_sysInfo.ReadOnly = true;
-            this.tbx_sysInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.tbx_sysInfo.Size = new System.Drawing.Size(308, 166);
-            this.tbx_sysInfo.TabIndex = 1;
-            this.tbx_sysInfo.Text = "sample\r\nsample";
-            this.tbx_sysInfo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // progressBar1
-            // 
-            this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.progressBar1.Location = new System.Drawing.Point(0, 215);
-            this.progressBar1.Name = "progressBar1";
-            this.progressBar1.Size = new System.Drawing.Size(314, 27);
-            this.progressBar1.Step = 20;
-            this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
-            this.progressBar1.TabIndex = 0;
-            // 
-            // dci_basicInfo
-            // 
-            this.dci_basicInfo.Control = this.basicInfoPanel;
-            this.dci_basicInfo.Name = "dci_basicInfo";
-            this.dci_basicInfo.Text = "基本信息";
-            // 
             // bar_notification
             // 
             this.bar_notification.AccessibleDescription = "DotNetBar Bar (bar_notification)";
@@ -718,9 +619,9 @@
             this.bar_notification.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
             this.dci_warning});
             this.bar_notification.LayoutType = DevComponents.DotNetBar.eLayoutType.DockContainer;
-            this.bar_notification.Location = new System.Drawing.Point(3, 271);
+            this.bar_notification.Location = new System.Drawing.Point(3, 0);
             this.bar_notification.Name = "bar_notification";
-            this.bar_notification.Size = new System.Drawing.Size(320, 299);
+            this.bar_notification.Size = new System.Drawing.Size(320, 570);
             this.bar_notification.Stretch = true;
             this.bar_notification.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
             this.bar_notification.TabIndex = 1;
@@ -730,10 +631,11 @@
             // warningPanel
             // 
             this.warningPanel.Controls.Add(this.tbx_notification);
+            this.warningPanel.Controls.Add(this.progressBar1);
             this.warningPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.warningPanel.Location = new System.Drawing.Point(3, 23);
             this.warningPanel.Name = "warningPanel";
-            this.warningPanel.Size = new System.Drawing.Size(314, 273);
+            this.warningPanel.Size = new System.Drawing.Size(314, 544);
             this.warningPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.warningPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.warningPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -759,9 +661,19 @@
             this.tbx_notification.PreventEnterBeep = true;
             this.tbx_notification.ReadOnly = true;
             this.tbx_notification.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.tbx_notification.Size = new System.Drawing.Size(314, 273);
+            this.tbx_notification.Size = new System.Drawing.Size(314, 523);
             this.tbx_notification.TabIndex = 0;
             // 
+            // progressBar1
+            // 
+            this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.progressBar1.Location = new System.Drawing.Point(0, 523);
+            this.progressBar1.Name = "progressBar1";
+            this.progressBar1.Size = new System.Drawing.Size(314, 21);
+            this.progressBar1.Step = 20;
+            this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
+            this.progressBar1.TabIndex = 0;
+            // 
             // dci_warning
             // 
             this.dci_warning.Control = this.warningPanel;
@@ -1009,9 +921,9 @@
             this.bar_shortcut.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
             this.shortcut_login,
             this.shortcut_logout,
-            this.shortcut_close,
             this.shortcut_sysInfo,
-            this.shortcut_about});
+            this.shortcut_about,
+            this.shortcut_close});
             this.bar_shortcut.Location = new System.Drawing.Point(0, 25);
             this.bar_shortcut.MenuBar = true;
             this.bar_shortcut.Name = "bar_shortcut";
@@ -1051,6 +963,7 @@
             // 
             // shortcut_login
             // 
+            this.shortcut_login.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
             this.shortcut_login.Image = global::centralController.Properties.Resources.pc;
             this.shortcut_login.Name = "shortcut_login";
             this.shortcut_login.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.None;
@@ -1059,6 +972,7 @@
             // 
             // shortcut_logout
             // 
+            this.shortcut_logout.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
             this.shortcut_logout.Image = global::centralController.Properties.Resources.monitor;
             this.shortcut_logout.Name = "shortcut_logout";
             this.shortcut_logout.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.None;
@@ -1067,6 +981,7 @@
             // 
             // shortcut_close
             // 
+            this.shortcut_close.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
             this.shortcut_close.Image = global::centralController.Properties.Resources.close;
             this.shortcut_close.Name = "shortcut_close";
             this.shortcut_close.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.None;
@@ -1076,6 +991,7 @@
             // 
             // shortcut_sysInfo
             // 
+            this.shortcut_sysInfo.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
             this.shortcut_sysInfo.Image = global::centralController.Properties.Resources.sysExplain;
             this.shortcut_sysInfo.Name = "shortcut_sysInfo";
             this.shortcut_sysInfo.ShowSubItems = false;
@@ -1084,6 +1000,7 @@
             // 
             // shortcut_about
             // 
+            this.shortcut_about.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
             this.shortcut_about.Image = global::centralController.Properties.Resources.about;
             this.shortcut_about.Name = "shortcut_about";
             this.shortcut_about.ShowSubItems = false;
@@ -1239,10 +1156,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.bar_side)).EndInit();
             this.bar_side.ResumeLayout(false);
             this.dockSite_notification.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.bar_basicInfo)).EndInit();
-            this.bar_basicInfo.ResumeLayout(false);
-            this.basicInfoPanel.ResumeLayout(false);
-            this.tlp_basicInfo.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.bar_notification)).EndInit();
             this.bar_notification.ResumeLayout(false);
             this.warningPanel.ResumeLayout(false);
@@ -1280,13 +1193,10 @@
         private DevComponents.DotNetBar.DockContainerItem dci_PaymentRecords;
         private DevComponents.DotNetBar.PanelDockContainer terminalMonitorPanel;
         private DevComponents.DotNetBar.DockContainerItem dci_terminal;
-        private DevComponents.DotNetBar.PanelDockContainer basicInfoPanel;
         private DevComponents.DotNetBar.PanelDockContainer panelDockContainer7;
         private DevComponents.DotNetBar.DockContainerItem dockContainerItem1;
         private DevComponents.DotNetBar.PanelDockContainer panelDockContainer8;
-        private DevComponents.DotNetBar.Bar bar_basicInfo;
         private DevComponents.DotNetBar.PanelDockContainer panelDockContainer10;
-        private DevComponents.DotNetBar.DockContainerItem dci_basicInfo;
         private DevComponents.DotNetBar.ButtonItem btn_exit;
         private DevComponents.DotNetBar.PanelDockContainer warningPanel;
         private DevComponents.DotNetBar.DockContainerItem dci_warning;
@@ -1295,8 +1205,6 @@
         private DevComponents.DotNetBar.ButtonItem btn_exportRecords;
         private DevComponents.DotNetBar.Bar bar_bottom;
         private DevComponents.DotNetBar.Bar bar_notification;
-        private DevComponents.DotNetBar.Controls.TextBoxX tbx_sysInfo;
-        private System.Windows.Forms.TableLayoutPanel tlp_basicInfo;
         public DevComponents.DotNetBar.Controls.TextBoxX tbx_notification;
         private DevComponents.DotNetBar.LabelX lbx_freeSpace;
         private DevComponents.DotNetBar.ButtonItem btn_views;

+ 3 - 1
PLCLinker/centralController/FormCentralController.cs

@@ -82,9 +82,11 @@ namespace centralController
             if (IPAddress.TryParse(ip, out temp))
             {
                 string license = "";
+                int id = 0;
+                int.TryParse(textBox1.Text, out id);
                 Task.Factory.StartNew(() =>
                 {
-                    license = Monitor.Monitor.numMachineLinker.GetLicensePlate(1);
+                    license = Monitor.Monitor.numMachineLinker.GetLicensePlate(id);
                     if (textBox2.InvokeRequired)
                     {
                         textBox2.Invoke(new Action(() => { textBox2.Text = license; }));

+ 1 - 4
PLCLinker/centralController/FormCentralController.resx

@@ -148,10 +148,7 @@
     <value>True</value>
   </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>58</value>
-  </metadata>
-  <metadata name="bar_basicInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
+    <value>90</value>
   </metadata>
   <metadata name="bar_notification.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>

+ 13 - 8
PLCLinker/centralController/NumMachine/NumMachine.cs

@@ -249,14 +249,9 @@ namespace NumMachine
                 return;
             }
             int handle = 0;
-            //找到设备,加入list
-            NumberMachineNode node = new NumberMachineNode(ip, 0, "", "", 1);
-            nmMsg.data.Add(node);
+            
             handle = VzClientSDK.VzLPRClient_Open(ip, (ushort)80, "admin", "admin");
-            Task.Factory.StartNew(() =>
-            {
-                UpdateStatus(node);
-            });
+            
             if (handle == 0)
             {
                 return;
@@ -273,6 +268,7 @@ namespace NumMachine
             {
                 handleCallbackMap.Add(handle, null);
             }
+            int id = 0;
             //读到设备则添加id映射并初始化号牌计数器
             lock (ipIdMap)
             {
@@ -280,13 +276,20 @@ namespace NumMachine
                 {
                     try
                     {
-                        int id = Int32.Parse(ConfigurationManager.AppSettings.Get(ip));
+                        id = Int32.Parse(ConfigurationManager.AppSettings.Get(ip));
                         ipIdMap.Add(ip, id);
                         idCountMap.Add(id, FILTERINGNUMBER);
                     }
                     catch (Exception) { Console.WriteLine("读取号牌机编号映射失败,配置文件填写有误"); }
                 }
             }
+            //找到设备,加入list
+            NumberMachineNode node = new NumberMachineNode(ip, id, "", "", 1);
+            nmMsg.data.Add(node);
+            Task.Factory.StartNew(() =>
+            {
+                UpdateStatus(node);
+            });
             //链接句柄到新PictureBox
             VideoOutput(handle);
         }
@@ -621,6 +624,8 @@ namespace NumMachine
                         tlp.Controls.Add(lb_numMachine, 0, 0);
                         tlp.RowStyles.Add(new RowStyle(SizeType.Percent, 20.00f));
                         tlp.RowStyles.Add(new RowStyle(SizeType.Percent, 80.00f));
+                        
+                        //tlp.Click += delegate(object o, EventArgs e){ };
                         //Control.FromHandle(flowLayoutPanel1).Controls.Add(temp);
                         if (flp.InvokeRequired)
                         {

BIN
PLCLinker/centralController/bin/Release/centralController.exe


+ 1 - 1
PLCLinker/centralController/bin/Release/centralController.exe.config

@@ -26,7 +26,7 @@
     <add key="plcParkingSpaceCount" value="200" />
     <add key="plcRefreshInterval" value="200"/>
     <!--显示屏信息-->
-    <add key="allInOneMachineIP" value="192.168.10.99"/>
+    <add key="allInOneMachineIP" value="192.168.10.90"/>
     <add key="allInOneMachinePort" value="8888"/>
     <!--中控webServer端口-->
     <add key="webPort" value="9000"/>

BIN
PLCLinker/centralController/bin/Release/centralController.pdb


BIN
PLCLinker/centralController/obj/Release/centralController.csproj.GenerateResource.Cache


BIN
PLCLinker/centralController/obj/Release/centralController.exe


BIN
PLCLinker/centralController/obj/Release/centralController.pdb