Ver Fonte

添加计费策略显示与修改窗体,调整提示信息显示

yc_t há 6 anos atrás
pai
commit
d5d95c66d7
23 ficheiros alterados com 1314 adições e 280 exclusões
  1. BIN
      PLCLinker/.vs/PLCLinker/v15/.suo
  2. 0 0
      PLCLinker/.vs/PLCLinker/v15/Server/sqlite3/db.lock
  3. BIN
      PLCLinker/.vs/PLCLinker/v15/Server/sqlite3/storage.ide
  4. 0 0
      PLCLinker/CentralController.sln
  5. 15 1
      PLCLinker/PLCConnector/Form1.cs
  6. 1 0
      PLCLinker/PLCConnector/PLCConnector.csproj
  7. 68 59
      PLCLinker/centralController/FormCentralController.Designer.cs
  8. 17 5
      PLCLinker/centralController/FormCentralController.cs
  9. 9 15
      PLCLinker/centralController/FormCentralController.resx
  10. 708 0
      PLCLinker/centralController/Form_paymentScheme.Designer.cs
  11. 148 0
      PLCLinker/centralController/Form_paymentScheme.cs
  12. 123 0
      PLCLinker/centralController/Form_paymentScheme.resx
  13. 85 82
      PLCLinker/centralController/Monitor/Monitor.cs
  14. 4 4
      PLCLinker/centralController/Monitor/SystemInitializer.cs
  15. 125 113
      PLCLinker/centralController/Terminal/Terminal.cs
  16. BIN
      PLCLinker/centralController/bin/Release/centralController.exe
  17. BIN
      PLCLinker/centralController/bin/Release/centralController.pdb
  18. 9 0
      PLCLinker/centralController/centralController.csproj
  19. 1 1
      PLCLinker/centralController/obj/Release/centralController.csproj.CoreCompileInputs.cache
  20. 1 0
      PLCLinker/centralController/obj/Release/centralController.csproj.FileListAbsolute.txt
  21. BIN
      PLCLinker/centralController/obj/Release/centralController.csproj.GenerateResource.Cache
  22. BIN
      PLCLinker/centralController/obj/Release/centralController.exe
  23. BIN
      PLCLinker/centralController/obj/Release/centralController.pdb

BIN
PLCLinker/.vs/PLCLinker/v15/.suo


+ 0 - 0
PLCLinker/.vs/PLCLinker/v15/Server/sqlite3/db.lock


BIN
PLCLinker/.vs/PLCLinker/v15/Server/sqlite3/storage.ide


PLCLinker/PLCLinker.sln → PLCLinker/CentralController.sln


+ 15 - 1
PLCLinker/PLCConnector/Form1.cs

@@ -3,6 +3,7 @@ using S7.Net;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Configuration;
 using System.Data;
 using System.Drawing;
 using System.Linq;
@@ -18,7 +19,20 @@ namespace PLCConnector
         public Form1()
         {
             InitializeComponent();
-            pl = new PLCLinker(CpuType.S71500, "192.168.0.141", 0, 1, 18, 41, 20, 6, 200);
+            string ip = "";
+            short rack = 0;
+            short slot = 0;
+            string[] blockIds = new string[3];
+            try
+            {
+                ip = ConfigurationManager.AppSettings.Get("plcIpAddress");
+                rack = Int16.Parse(ConfigurationManager.AppSettings.Get("plcRack"));
+                slot = Int16.Parse(ConfigurationManager.AppSettings.Get("plcSlot"));
+                blockIds = (ConfigurationManager.AppSettings.Get("plcDatablockId")).Split(',');
+                pl = new PLCLinker(CpuType.S71500, ip, rack, slot, int.Parse(blockIds[0]), int.Parse(blockIds[1]), int.Parse(blockIds[2]), 6, 200);
+            }
+            catch (Exception e) { MessageBox.Show("配置文件异常"); }
+            
         }
 
         public static void parkingSpaceDBTest(AbstractPLCLinker pl, Random rnd)

+ 1 - 0
PLCLinker/PLCConnector/PLCConnector.csproj

@@ -41,6 +41,7 @@
       <HintPath>PLC\S7.Net.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />

+ 68 - 59
PLCLinker/centralController/FormCentralController.Designer.cs

@@ -29,14 +29,14 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components);
             this.dockSite4 = new DevComponents.DotNetBar.DockSite();
             this.dockSite9 = new DevComponents.DotNetBar.DockSite();
             this.bar_mainWin = new DevComponents.DotNetBar.Bar();
-            this.ParkingSpaceMonitorPanel = new DevComponents.DotNetBar.PanelDockContainer();
             this.NumMachineMonitorPanel = new DevComponents.DotNetBar.PanelDockContainer();
             this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
+            this.ParkingSpaceMonitorPanel = new DevComponents.DotNetBar.PanelDockContainer();
             this.paymentPanel = new DevComponents.DotNetBar.PanelDockContainer();
             this.testPanel = new DevComponents.DotNetBar.PanelDockContainer();
             this.button1 = new System.Windows.Forms.Button();
@@ -81,7 +81,7 @@
             this.dockSite5 = new DevComponents.DotNetBar.DockSite();
             this.dockSite6 = new DevComponents.DotNetBar.DockSite();
             this.dockSite7 = new DevComponents.DotNetBar.DockSite();
-            this.bar1 = new DevComponents.DotNetBar.Bar();
+            this.bar_Menu = new DevComponents.DotNetBar.Bar();
             this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
             this.btn_login = new DevComponents.DotNetBar.ButtonItem();
             this.btn_logout = new DevComponents.DotNetBar.ButtonItem();
@@ -107,6 +107,7 @@
             this.panelDockContainer7 = new DevComponents.DotNetBar.PanelDockContainer();
             this.dockContainerItem1 = new DevComponents.DotNetBar.DockContainerItem();
             this.panelDockContainer8 = new DevComponents.DotNetBar.PanelDockContainer();
+            this.btn_setScheme = new DevComponents.DotNetBar.ButtonItem();
             this.dockSite9.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bar_mainWin)).BeginInit();
             this.bar_mainWin.SuspendLayout();
@@ -129,7 +130,7 @@
             this.bar_notification.SuspendLayout();
             this.warningPanel.SuspendLayout();
             this.dockSite7.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bar_Menu)).BeginInit();
             this.SuspendLayout();
             // 
             // dotNetBarManager1
@@ -223,19 +224,6 @@
             this.bar_mainWin.TabNavigation = true;
             this.bar_mainWin.TabStop = false;
             // 
-            // ParkingSpaceMonitorPanel
-            // 
-            this.ParkingSpaceMonitorPanel.DisabledBackColor = System.Drawing.Color.Empty;
-            this.ParkingSpaceMonitorPanel.Location = new System.Drawing.Point(3, 28);
-            this.ParkingSpaceMonitorPanel.Name = "ParkingSpaceMonitorPanel";
-            this.ParkingSpaceMonitorPanel.Size = new System.Drawing.Size(659, 377);
-            this.ParkingSpaceMonitorPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
-            this.ParkingSpaceMonitorPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
-            this.ParkingSpaceMonitorPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
-            this.ParkingSpaceMonitorPanel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
-            this.ParkingSpaceMonitorPanel.Style.GradientAngle = 90;
-            this.ParkingSpaceMonitorPanel.TabIndex = 9;
-            // 
             // NumMachineMonitorPanel
             // 
             this.NumMachineMonitorPanel.Controls.Add(this.flowLayoutPanel1);
@@ -260,6 +248,19 @@
             this.flowLayoutPanel1.TabIndex = 1;
             this.flowLayoutPanel1.Resize += new System.EventHandler(this.flowLayoutPanel1_Resize);
             // 
+            // ParkingSpaceMonitorPanel
+            // 
+            this.ParkingSpaceMonitorPanel.DisabledBackColor = System.Drawing.Color.Empty;
+            this.ParkingSpaceMonitorPanel.Location = new System.Drawing.Point(3, 28);
+            this.ParkingSpaceMonitorPanel.Name = "ParkingSpaceMonitorPanel";
+            this.ParkingSpaceMonitorPanel.Size = new System.Drawing.Size(659, 377);
+            this.ParkingSpaceMonitorPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
+            this.ParkingSpaceMonitorPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
+            this.ParkingSpaceMonitorPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
+            this.ParkingSpaceMonitorPanel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
+            this.ParkingSpaceMonitorPanel.Style.GradientAngle = 90;
+            this.ParkingSpaceMonitorPanel.TabIndex = 9;
+            // 
             // paymentPanel
             // 
             this.paymentPanel.DisabledBackColor = System.Drawing.Color.Empty;
@@ -429,14 +430,14 @@
             this.realGetTime,
             this.receiptNum,
             this.parkingPrice});
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle1;
             this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
             this.dataGridViewX1.Location = new System.Drawing.Point(0, 0);
@@ -587,8 +588,8 @@
             this.dockSite2.Controls.Add(this.bar_notification);
             this.dockSite2.Dock = System.Windows.Forms.DockStyle.Right;
             this.dockSite2.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer(new DevComponents.DotNetBar.DocumentBaseContainer[] {
-            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_basicInfo, 320, 315))),
-            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_notification, 320, 325)))}, DevComponents.DotNetBar.eOrientation.Vertical);
+            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_basicInfo, 320, 309))),
+            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_notification, 320, 331)))}, DevComponents.DotNetBar.eOrientation.Vertical);
             this.dockSite2.Location = new System.Drawing.Point(871, 25);
             this.dockSite2.Name = "dockSite2";
             this.dockSite2.Size = new System.Drawing.Size(323, 643);
@@ -611,7 +612,7 @@
             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, 315);
+            this.bar_basicInfo.Size = new System.Drawing.Size(320, 309);
             this.bar_basicInfo.Stretch = true;
             this.bar_basicInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
             this.bar_basicInfo.TabIndex = 0;
@@ -625,7 +626,7 @@
             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, 289);
+            this.basicInfoPanel.Size = new System.Drawing.Size(314, 283);
             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;
@@ -645,7 +646,7 @@
             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, 262);
+            this.tlp_basicInfo.Size = new System.Drawing.Size(314, 256);
             this.tlp_basicInfo.TabIndex = 7;
             // 
             // tbx_sysInfo
@@ -657,13 +658,13 @@
             this.tbx_sysInfo.Border.Class = "TextBoxBorder";
             this.tbx_sysInfo.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
             this.tbx_sysInfo.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tbx_sysInfo.Location = new System.Drawing.Point(3, 55);
+            this.tbx_sysInfo.Location = new System.Drawing.Point(3, 54);
             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, 204);
+            this.tbx_sysInfo.Size = new System.Drawing.Size(308, 199);
             this.tbx_sysInfo.TabIndex = 1;
             this.tbx_sysInfo.Text = "sample\r\nsample";
             this.tbx_sysInfo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
@@ -681,7 +682,7 @@
             this.lbx_freeSpace.ForeColor = System.Drawing.SystemColors.ActiveCaption;
             this.lbx_freeSpace.Location = new System.Drawing.Point(3, 3);
             this.lbx_freeSpace.Name = "lbx_freeSpace";
-            this.lbx_freeSpace.Size = new System.Drawing.Size(308, 46);
+            this.lbx_freeSpace.Size = new System.Drawing.Size(308, 45);
             this.lbx_freeSpace.TabIndex = 2;
             this.lbx_freeSpace.Text = "currentFreeSpace";
             this.lbx_freeSpace.TextAlignment = System.Drawing.StringAlignment.Center;
@@ -689,7 +690,7 @@
             // progressBar1
             // 
             this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.progressBar1.Location = new System.Drawing.Point(0, 262);
+            this.progressBar1.Location = new System.Drawing.Point(0, 256);
             this.progressBar1.Name = "progressBar1";
             this.progressBar1.Size = new System.Drawing.Size(314, 27);
             this.progressBar1.Step = 20;
@@ -716,9 +717,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, 318);
+            this.bar_notification.Location = new System.Drawing.Point(3, 312);
             this.bar_notification.Name = "bar_notification";
-            this.bar_notification.Size = new System.Drawing.Size(320, 325);
+            this.bar_notification.Size = new System.Drawing.Size(320, 331);
             this.bar_notification.Stretch = true;
             this.bar_notification.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
             this.bar_notification.TabIndex = 1;
@@ -731,7 +732,7 @@
             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, 299);
+            this.warningPanel.Size = new System.Drawing.Size(314, 305);
             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;
@@ -755,7 +756,7 @@
             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, 299);
+            this.tbx_notification.Size = new System.Drawing.Size(314, 305);
             this.tbx_notification.TabIndex = 0;
             // 
             // dci_warning
@@ -797,7 +798,7 @@
             // dockSite7
             // 
             this.dockSite7.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
-            this.dockSite7.Controls.Add(this.bar1);
+            this.dockSite7.Controls.Add(this.bar_Menu);
             this.dockSite7.Dock = System.Windows.Forms.DockStyle.Top;
             this.dockSite7.Location = new System.Drawing.Point(0, 0);
             this.dockSite7.Name = "dockSite7";
@@ -805,28 +806,28 @@
             this.dockSite7.TabIndex = 6;
             this.dockSite7.TabStop = false;
             // 
-            // bar1
+            // bar_Menu
             // 
-            this.bar1.AccessibleDescription = "DotNetBar Bar (bar1)";
-            this.bar1.AccessibleName = "DotNetBar Bar";
-            this.bar1.AccessibleRole = System.Windows.Forms.AccessibleRole.MenuBar;
-            this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Top;
-            this.bar1.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.bar1.IsMaximized = false;
-            this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
+            this.bar_Menu.AccessibleDescription = "DotNetBar Bar (bar_Menu)";
+            this.bar_Menu.AccessibleName = "DotNetBar Bar";
+            this.bar_Menu.AccessibleRole = System.Windows.Forms.AccessibleRole.MenuBar;
+            this.bar_Menu.DockSide = DevComponents.DotNetBar.eDockSide.Top;
+            this.bar_Menu.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.bar_Menu.IsMaximized = false;
+            this.bar_Menu.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
             this.buttonItem1,
             this.btn_files,
             this.btn_views,
             this.btn_devices});
-            this.bar1.Location = new System.Drawing.Point(0, 0);
-            this.bar1.MenuBar = true;
-            this.bar1.Name = "bar1";
-            this.bar1.Size = new System.Drawing.Size(1194, 24);
-            this.bar1.Stretch = true;
-            this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
-            this.bar1.TabIndex = 0;
-            this.bar1.TabStop = false;
-            this.bar1.Text = "bar1";
+            this.bar_Menu.Location = new System.Drawing.Point(0, 0);
+            this.bar_Menu.MenuBar = true;
+            this.bar_Menu.Name = "bar_Menu";
+            this.bar_Menu.Size = new System.Drawing.Size(1194, 24);
+            this.bar_Menu.Stretch = true;
+            this.bar_Menu.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
+            this.bar_Menu.TabIndex = 0;
+            this.bar_Menu.TabStop = false;
+            this.bar_Menu.Text = "bar1";
             // 
             // buttonItem1
             // 
@@ -859,7 +860,8 @@
             this.btn_files.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
             this.btn_openFile,
             this.btn_refreshRecords,
-            this.btn_exportRecords});
+            this.btn_exportRecords,
+            this.btn_setScheme});
             this.btn_files.Text = "文件";
             // 
             // btn_openFile
@@ -1046,6 +1048,12 @@
             this.panelDockContainer8.Style.GradientAngle = 90;
             this.panelDockContainer8.TabIndex = 37;
             // 
+            // btn_setScheme
+            // 
+            this.btn_setScheme.Name = "btn_setScheme";
+            this.btn_setScheme.Text = "收费策略";
+            this.btn_setScheme.Click += new System.EventHandler(this.btn_setScheme_Click);
+            // 
             // centralController
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1090,7 +1098,7 @@
             this.bar_notification.ResumeLayout(false);
             this.warningPanel.ResumeLayout(false);
             this.dockSite7.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bar_Menu)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -1105,7 +1113,7 @@
         private DevComponents.DotNetBar.DockSite dockSite5;
         private DevComponents.DotNetBar.DockSite dockSite6;
         private DevComponents.DotNetBar.DockSite dockSite7;
-        private DevComponents.DotNetBar.Bar bar1;
+        private DevComponents.DotNetBar.Bar bar_Menu;
         private DevComponents.DotNetBar.ButtonItem buttonItem1;
         private DevComponents.DotNetBar.DockSite dockSite8;
         private DevComponents.DotNetBar.DockSite dockSite9;
@@ -1174,6 +1182,7 @@
         private DevComponents.DotNetBar.ButtonItem btn_payment;
         private DevComponents.DotNetBar.ButtonItem btn_terminals;
         private DevComponents.DotNetBar.ButtonItem btn_records;
+        private DevComponents.DotNetBar.ButtonItem btn_setScheme;
     }
 }
 

+ 17 - 5
PLCLinker/centralController/FormCentralController.cs

@@ -7,6 +7,7 @@ using System.Runtime.InteropServices;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using Terminal;
 using Excel = Microsoft.Office.Interop.Excel;
 
 namespace centralController
@@ -35,7 +36,8 @@ namespace centralController
                         temp = Monitor.Monitor.initializeState;
                         progressBar1.Invoke(new Action(() => { progressBar1.Value = temp * 20; }));
                     }
-                    if (temp == 5) {
+                    if (temp == 5)
+                    {
                         dataGridViewX1.Invoke(new Action(() => { RefreshRecords(null, null); }));
                         break;
                     }
@@ -144,6 +146,16 @@ namespace centralController
             Export(dataGridViewX1, Directory.GetCurrentDirectory() + "\\");
             Console.WriteLine(Directory.GetCurrentDirectory() + "\\");
         }
+        /// <summary>
+        /// 显示与设置收费策略
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btn_setScheme_Click(object sender, EventArgs e)
+        {
+            Form_paymentScheme form_PaymentScheme = new Form_paymentScheme();
+            form_PaymentScheme.ShowDialog();
+        }
         #endregion
 
         #region 视图
@@ -154,7 +166,7 @@ namespace centralController
         /// <param name="e"></param>
         private void btn_parkingSpace_Click(object sender, EventArgs e)
         {
-            if(bar_mainWin.Visible == false) { bar_mainWin.Visible = true; }
+            if (bar_mainWin.Visible == false) { bar_mainWin.Visible = true; }
             if (dci_ParkingSpace.Visible == false) { dci_ParkingSpace.Visible = true; }
         }
         /// <summary>
@@ -231,8 +243,8 @@ namespace centralController
         /// <param name="e"></param>
         private void UpdateText(object sender, EventArgs e)
         {
-            tbx_notification.Text = "";
-            tbx_notification.AppendText(Monitor.Monitor.GetNotification());
+            tbx_notification.Text = Monitor.Monitor.GetNotification();
+            tbx_notification.ScrollToCaret();
         }
         /// <summary>
         /// 定时更新时间与空闲车位显示
@@ -349,7 +361,7 @@ namespace centralController
             string sysInfo = Monitor.Monitor.GetSysInfo();
             tbx_sysInfo.Text = sysInfo;
         }
-       
+
         /// <summary>
         /// 动态调整号牌机界面
         /// </summary>

+ 9 - 15
PLCLinker/centralController/FormCentralController.resx

@@ -123,21 +123,6 @@
   <metadata name="bar_mainWin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="bar_side.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <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>
-  </metadata>
-  <metadata name="bar_notification.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bar_mainWin.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="parkingRecordsID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -165,4 +150,13 @@
   <metadata name="bar_side.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <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>
+  </metadata>
+  <metadata name="bar_notification.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 708 - 0
PLCLinker/centralController/Form_paymentScheme.Designer.cs

@@ -0,0 +1,708 @@
+namespace centralController
+{
+    partial class Form_paymentScheme
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.gp_paymentScheme = new DevComponents.DotNetBar.Controls.GroupPanel();
+            this.tbx_peakCharge = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_endChargeTime = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_startChargeTime = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_overnightCharge = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_eachCharge = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_upperBound = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_intervalCharge = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_firstCharge = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_firstChargeTime = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_freeTime = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.labelX10 = new DevComponents.DotNetBar.LabelX();
+            this.labelX9 = new DevComponents.DotNetBar.LabelX();
+            this.labelX8 = new DevComponents.DotNetBar.LabelX();
+            this.labelX7 = new DevComponents.DotNetBar.LabelX();
+            this.labelX6 = new DevComponents.DotNetBar.LabelX();
+            this.labelX5 = new DevComponents.DotNetBar.LabelX();
+            this.labelX4 = new DevComponents.DotNetBar.LabelX();
+            this.labelX3 = new DevComponents.DotNetBar.LabelX();
+            this.labelX2 = new DevComponents.DotNetBar.LabelX();
+            this.labelX1 = new DevComponents.DotNetBar.LabelX();
+            this.gp_VIPScheme = new DevComponents.DotNetBar.Controls.GroupPanel();
+            this.tbx_bookCharge = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_yearCard = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_halfYearCard = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_seasonCard = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.tbx_monthCard = new DevComponents.DotNetBar.Controls.TextBoxX();
+            this.labelX15 = new DevComponents.DotNetBar.LabelX();
+            this.labelX14 = new DevComponents.DotNetBar.LabelX();
+            this.labelX13 = new DevComponents.DotNetBar.LabelX();
+            this.labelX12 = new DevComponents.DotNetBar.LabelX();
+            this.labelX11 = new DevComponents.DotNetBar.LabelX();
+            this.btnx_enableModify = new DevComponents.DotNetBar.ButtonX();
+            this.btnx_confirmModification = new DevComponents.DotNetBar.ButtonX();
+            this.btnx_cancelModify = new DevComponents.DotNetBar.ButtonX();
+            this.gp_paymentScheme.SuspendLayout();
+            this.gp_VIPScheme.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // gp_paymentScheme
+            // 
+            this.gp_paymentScheme.BackColor = System.Drawing.Color.White;
+            this.gp_paymentScheme.CanvasColor = System.Drawing.SystemColors.Control;
+            this.gp_paymentScheme.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+            this.gp_paymentScheme.Controls.Add(this.tbx_peakCharge);
+            this.gp_paymentScheme.Controls.Add(this.tbx_endChargeTime);
+            this.gp_paymentScheme.Controls.Add(this.tbx_startChargeTime);
+            this.gp_paymentScheme.Controls.Add(this.tbx_overnightCharge);
+            this.gp_paymentScheme.Controls.Add(this.tbx_eachCharge);
+            this.gp_paymentScheme.Controls.Add(this.tbx_upperBound);
+            this.gp_paymentScheme.Controls.Add(this.tbx_intervalCharge);
+            this.gp_paymentScheme.Controls.Add(this.tbx_firstCharge);
+            this.gp_paymentScheme.Controls.Add(this.tbx_firstChargeTime);
+            this.gp_paymentScheme.Controls.Add(this.tbx_freeTime);
+            this.gp_paymentScheme.Controls.Add(this.labelX10);
+            this.gp_paymentScheme.Controls.Add(this.labelX9);
+            this.gp_paymentScheme.Controls.Add(this.labelX8);
+            this.gp_paymentScheme.Controls.Add(this.labelX7);
+            this.gp_paymentScheme.Controls.Add(this.labelX6);
+            this.gp_paymentScheme.Controls.Add(this.labelX5);
+            this.gp_paymentScheme.Controls.Add(this.labelX4);
+            this.gp_paymentScheme.Controls.Add(this.labelX3);
+            this.gp_paymentScheme.Controls.Add(this.labelX2);
+            this.gp_paymentScheme.Controls.Add(this.labelX1);
+            this.gp_paymentScheme.DisabledBackColor = System.Drawing.Color.Empty;
+            this.gp_paymentScheme.Location = new System.Drawing.Point(13, 12);
+            this.gp_paymentScheme.Name = "gp_paymentScheme";
+            this.gp_paymentScheme.Size = new System.Drawing.Size(277, 308);
+            // 
+            // 
+            // 
+            this.gp_paymentScheme.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+            this.gp_paymentScheme.Style.BackColorGradientAngle = 90;
+            this.gp_paymentScheme.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+            this.gp_paymentScheme.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_paymentScheme.Style.BorderBottomWidth = 1;
+            this.gp_paymentScheme.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+            this.gp_paymentScheme.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_paymentScheme.Style.BorderLeftWidth = 1;
+            this.gp_paymentScheme.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_paymentScheme.Style.BorderRightWidth = 1;
+            this.gp_paymentScheme.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_paymentScheme.Style.BorderTopWidth = 1;
+            this.gp_paymentScheme.Style.CornerDiameter = 4;
+            this.gp_paymentScheme.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+            this.gp_paymentScheme.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+            this.gp_paymentScheme.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+            this.gp_paymentScheme.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+            // 
+            // 
+            // 
+            this.gp_paymentScheme.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            // 
+            // 
+            // 
+            this.gp_paymentScheme.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.gp_paymentScheme.TabIndex = 4;
+            this.gp_paymentScheme.Text = "普通收费策略";
+            // 
+            // tbx_peakCharge
+            // 
+            this.tbx_peakCharge.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_peakCharge.Border.Class = "TextBoxBorder";
+            this.tbx_peakCharge.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_peakCharge.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_peakCharge.ForeColor = System.Drawing.Color.Black;
+            this.tbx_peakCharge.Location = new System.Drawing.Point(144, 256);
+            this.tbx_peakCharge.Name = "tbx_peakCharge";
+            this.tbx_peakCharge.PreventEnterBeep = true;
+            this.tbx_peakCharge.ReadOnly = true;
+            this.tbx_peakCharge.Size = new System.Drawing.Size(100, 21);
+            this.tbx_peakCharge.TabIndex = 19;
+            // 
+            // tbx_endChargeTime
+            // 
+            this.tbx_endChargeTime.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_endChargeTime.Border.Class = "TextBoxBorder";
+            this.tbx_endChargeTime.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_endChargeTime.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_endChargeTime.ForeColor = System.Drawing.Color.Black;
+            this.tbx_endChargeTime.Location = new System.Drawing.Point(144, 228);
+            this.tbx_endChargeTime.Name = "tbx_endChargeTime";
+            this.tbx_endChargeTime.PreventEnterBeep = true;
+            this.tbx_endChargeTime.ReadOnly = true;
+            this.tbx_endChargeTime.Size = new System.Drawing.Size(100, 21);
+            this.tbx_endChargeTime.TabIndex = 18;
+            // 
+            // tbx_startChargeTime
+            // 
+            this.tbx_startChargeTime.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_startChargeTime.Border.Class = "TextBoxBorder";
+            this.tbx_startChargeTime.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_startChargeTime.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_startChargeTime.ForeColor = System.Drawing.Color.Black;
+            this.tbx_startChargeTime.Location = new System.Drawing.Point(144, 200);
+            this.tbx_startChargeTime.Name = "tbx_startChargeTime";
+            this.tbx_startChargeTime.PreventEnterBeep = true;
+            this.tbx_startChargeTime.ReadOnly = true;
+            this.tbx_startChargeTime.Size = new System.Drawing.Size(100, 21);
+            this.tbx_startChargeTime.TabIndex = 17;
+            // 
+            // tbx_overnightCharge
+            // 
+            this.tbx_overnightCharge.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_overnightCharge.Border.Class = "TextBoxBorder";
+            this.tbx_overnightCharge.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_overnightCharge.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_overnightCharge.ForeColor = System.Drawing.Color.Black;
+            this.tbx_overnightCharge.Location = new System.Drawing.Point(144, 172);
+            this.tbx_overnightCharge.Name = "tbx_overnightCharge";
+            this.tbx_overnightCharge.PreventEnterBeep = true;
+            this.tbx_overnightCharge.ReadOnly = true;
+            this.tbx_overnightCharge.Size = new System.Drawing.Size(100, 21);
+            this.tbx_overnightCharge.TabIndex = 16;
+            // 
+            // tbx_eachCharge
+            // 
+            this.tbx_eachCharge.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_eachCharge.Border.Class = "TextBoxBorder";
+            this.tbx_eachCharge.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_eachCharge.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_eachCharge.ForeColor = System.Drawing.Color.Black;
+            this.tbx_eachCharge.Location = new System.Drawing.Point(144, 144);
+            this.tbx_eachCharge.Name = "tbx_eachCharge";
+            this.tbx_eachCharge.PreventEnterBeep = true;
+            this.tbx_eachCharge.ReadOnly = true;
+            this.tbx_eachCharge.Size = new System.Drawing.Size(100, 21);
+            this.tbx_eachCharge.TabIndex = 15;
+            // 
+            // tbx_upperBound
+            // 
+            this.tbx_upperBound.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_upperBound.Border.Class = "TextBoxBorder";
+            this.tbx_upperBound.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_upperBound.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_upperBound.ForeColor = System.Drawing.Color.Black;
+            this.tbx_upperBound.Location = new System.Drawing.Point(144, 115);
+            this.tbx_upperBound.Name = "tbx_upperBound";
+            this.tbx_upperBound.PreventEnterBeep = true;
+            this.tbx_upperBound.ReadOnly = true;
+            this.tbx_upperBound.Size = new System.Drawing.Size(100, 21);
+            this.tbx_upperBound.TabIndex = 14;
+            // 
+            // tbx_intervalCharge
+            // 
+            this.tbx_intervalCharge.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_intervalCharge.Border.Class = "TextBoxBorder";
+            this.tbx_intervalCharge.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_intervalCharge.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_intervalCharge.ForeColor = System.Drawing.Color.Black;
+            this.tbx_intervalCharge.Location = new System.Drawing.Point(144, 88);
+            this.tbx_intervalCharge.Name = "tbx_intervalCharge";
+            this.tbx_intervalCharge.PreventEnterBeep = true;
+            this.tbx_intervalCharge.ReadOnly = true;
+            this.tbx_intervalCharge.Size = new System.Drawing.Size(100, 21);
+            this.tbx_intervalCharge.TabIndex = 13;
+            // 
+            // tbx_firstCharge
+            // 
+            this.tbx_firstCharge.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_firstCharge.Border.Class = "TextBoxBorder";
+            this.tbx_firstCharge.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_firstCharge.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_firstCharge.ForeColor = System.Drawing.Color.Black;
+            this.tbx_firstCharge.Location = new System.Drawing.Point(144, 60);
+            this.tbx_firstCharge.Name = "tbx_firstCharge";
+            this.tbx_firstCharge.PreventEnterBeep = true;
+            this.tbx_firstCharge.ReadOnly = true;
+            this.tbx_firstCharge.Size = new System.Drawing.Size(100, 21);
+            this.tbx_firstCharge.TabIndex = 12;
+            // 
+            // tbx_firstChargeTime
+            // 
+            this.tbx_firstChargeTime.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_firstChargeTime.Border.Class = "TextBoxBorder";
+            this.tbx_firstChargeTime.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_firstChargeTime.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_firstChargeTime.ForeColor = System.Drawing.Color.Black;
+            this.tbx_firstChargeTime.Location = new System.Drawing.Point(144, 32);
+            this.tbx_firstChargeTime.Name = "tbx_firstChargeTime";
+            this.tbx_firstChargeTime.PreventEnterBeep = true;
+            this.tbx_firstChargeTime.ReadOnly = true;
+            this.tbx_firstChargeTime.Size = new System.Drawing.Size(100, 21);
+            this.tbx_firstChargeTime.TabIndex = 11;
+            // 
+            // tbx_freeTime
+            // 
+            this.tbx_freeTime.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_freeTime.Border.Class = "TextBoxBorder";
+            this.tbx_freeTime.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_freeTime.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_freeTime.ForeColor = System.Drawing.Color.Black;
+            this.tbx_freeTime.Location = new System.Drawing.Point(144, 4);
+            this.tbx_freeTime.Name = "tbx_freeTime";
+            this.tbx_freeTime.PreventEnterBeep = true;
+            this.tbx_freeTime.ReadOnly = true;
+            this.tbx_freeTime.Size = new System.Drawing.Size(100, 21);
+            this.tbx_freeTime.TabIndex = 10;
+            // 
+            // labelX10
+            // 
+            // 
+            // 
+            // 
+            this.labelX10.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX10.Location = new System.Drawing.Point(4, 256);
+            this.labelX10.Name = "labelX10";
+            this.labelX10.Size = new System.Drawing.Size(122, 22);
+            this.labelX10.TabIndex = 9;
+            this.labelX10.Text = "高峰时段费用(元)";
+            // 
+            // labelX9
+            // 
+            // 
+            // 
+            // 
+            this.labelX9.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX9.Location = new System.Drawing.Point(4, 228);
+            this.labelX9.Name = "labelX9";
+            this.labelX9.Size = new System.Drawing.Size(122, 22);
+            this.labelX9.TabIndex = 8;
+            this.labelX9.Text = "高峰时段结束时间";
+            // 
+            // labelX8
+            // 
+            // 
+            // 
+            // 
+            this.labelX8.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX8.Location = new System.Drawing.Point(4, 200);
+            this.labelX8.Name = "labelX8";
+            this.labelX8.Size = new System.Drawing.Size(122, 22);
+            this.labelX8.TabIndex = 7;
+            this.labelX8.Text = "高峰时段起始时间";
+            // 
+            // labelX7
+            // 
+            // 
+            // 
+            // 
+            this.labelX7.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX7.Location = new System.Drawing.Point(4, 172);
+            this.labelX7.Name = "labelX7";
+            this.labelX7.Size = new System.Drawing.Size(122, 22);
+            this.labelX7.TabIndex = 6;
+            this.labelX7.Text = "隔夜加收费用(元)";
+            // 
+            // labelX6
+            // 
+            // 
+            // 
+            // 
+            this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX6.Location = new System.Drawing.Point(4, 144);
+            this.labelX6.Name = "labelX6";
+            this.labelX6.Size = new System.Drawing.Size(122, 22);
+            this.labelX6.TabIndex = 5;
+            this.labelX6.Text = "每日费率(元)";
+            // 
+            // labelX5
+            // 
+            // 
+            // 
+            // 
+            this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX5.Location = new System.Drawing.Point(4, 116);
+            this.labelX5.Name = "labelX5";
+            this.labelX5.Size = new System.Drawing.Size(122, 22);
+            this.labelX5.TabIndex = 4;
+            this.labelX5.Text = "当天封顶价格(元/天)";
+            // 
+            // labelX4
+            // 
+            // 
+            // 
+            // 
+            this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX4.Location = new System.Drawing.Point(4, 88);
+            this.labelX4.Name = "labelX4";
+            this.labelX4.Size = new System.Drawing.Size(122, 22);
+            this.labelX4.TabIndex = 3;
+            this.labelX4.Text = "每小时费率(元)";
+            // 
+            // labelX3
+            // 
+            // 
+            // 
+            // 
+            this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX3.Location = new System.Drawing.Point(4, 60);
+            this.labelX3.Name = "labelX3";
+            this.labelX3.Size = new System.Drawing.Size(122, 22);
+            this.labelX3.TabIndex = 2;
+            this.labelX3.Text = "首次计费费用(元)";
+            // 
+            // labelX2
+            // 
+            // 
+            // 
+            // 
+            this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX2.Location = new System.Drawing.Point(4, 32);
+            this.labelX2.Name = "labelX2";
+            this.labelX2.Size = new System.Drawing.Size(122, 22);
+            this.labelX2.TabIndex = 1;
+            this.labelX2.Text = "首次计费时长(小时)";
+            // 
+            // labelX1
+            // 
+            // 
+            // 
+            // 
+            this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX1.Location = new System.Drawing.Point(4, 4);
+            this.labelX1.Name = "labelX1";
+            this.labelX1.Size = new System.Drawing.Size(122, 22);
+            this.labelX1.TabIndex = 0;
+            this.labelX1.Text = "免费时长(小时)";
+            // 
+            // gp_VIPScheme
+            // 
+            this.gp_VIPScheme.BackColor = System.Drawing.Color.White;
+            this.gp_VIPScheme.CanvasColor = System.Drawing.SystemColors.Control;
+            this.gp_VIPScheme.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
+            this.gp_VIPScheme.Controls.Add(this.tbx_bookCharge);
+            this.gp_VIPScheme.Controls.Add(this.tbx_yearCard);
+            this.gp_VIPScheme.Controls.Add(this.tbx_halfYearCard);
+            this.gp_VIPScheme.Controls.Add(this.tbx_seasonCard);
+            this.gp_VIPScheme.Controls.Add(this.tbx_monthCard);
+            this.gp_VIPScheme.Controls.Add(this.labelX15);
+            this.gp_VIPScheme.Controls.Add(this.labelX14);
+            this.gp_VIPScheme.Controls.Add(this.labelX13);
+            this.gp_VIPScheme.Controls.Add(this.labelX12);
+            this.gp_VIPScheme.Controls.Add(this.labelX11);
+            this.gp_VIPScheme.DisabledBackColor = System.Drawing.Color.Empty;
+            this.gp_VIPScheme.Location = new System.Drawing.Point(307, 12);
+            this.gp_VIPScheme.Name = "gp_VIPScheme";
+            this.gp_VIPScheme.Size = new System.Drawing.Size(256, 242);
+            // 
+            // 
+            // 
+            this.gp_VIPScheme.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+            this.gp_VIPScheme.Style.BackColorGradientAngle = 90;
+            this.gp_VIPScheme.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+            this.gp_VIPScheme.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_VIPScheme.Style.BorderBottomWidth = 1;
+            this.gp_VIPScheme.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
+            this.gp_VIPScheme.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_VIPScheme.Style.BorderLeftWidth = 1;
+            this.gp_VIPScheme.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_VIPScheme.Style.BorderRightWidth = 1;
+            this.gp_VIPScheme.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+            this.gp_VIPScheme.Style.BorderTopWidth = 1;
+            this.gp_VIPScheme.Style.CornerDiameter = 4;
+            this.gp_VIPScheme.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
+            this.gp_VIPScheme.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
+            this.gp_VIPScheme.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
+            this.gp_VIPScheme.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
+            // 
+            // 
+            // 
+            this.gp_VIPScheme.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            // 
+            // 
+            // 
+            this.gp_VIPScheme.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.gp_VIPScheme.TabIndex = 5;
+            this.gp_VIPScheme.Text = "VIP办卡策略";
+            // 
+            // tbx_bookCharge
+            // 
+            this.tbx_bookCharge.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_bookCharge.Border.Class = "TextBoxBorder";
+            this.tbx_bookCharge.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_bookCharge.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_bookCharge.ForeColor = System.Drawing.Color.Black;
+            this.tbx_bookCharge.Location = new System.Drawing.Point(143, 116);
+            this.tbx_bookCharge.Name = "tbx_bookCharge";
+            this.tbx_bookCharge.PreventEnterBeep = true;
+            this.tbx_bookCharge.ReadOnly = true;
+            this.tbx_bookCharge.Size = new System.Drawing.Size(100, 21);
+            this.tbx_bookCharge.TabIndex = 24;
+            // 
+            // tbx_yearCard
+            // 
+            this.tbx_yearCard.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_yearCard.Border.Class = "TextBoxBorder";
+            this.tbx_yearCard.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_yearCard.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_yearCard.ForeColor = System.Drawing.Color.Black;
+            this.tbx_yearCard.Location = new System.Drawing.Point(143, 87);
+            this.tbx_yearCard.Name = "tbx_yearCard";
+            this.tbx_yearCard.PreventEnterBeep = true;
+            this.tbx_yearCard.ReadOnly = true;
+            this.tbx_yearCard.Size = new System.Drawing.Size(100, 21);
+            this.tbx_yearCard.TabIndex = 23;
+            // 
+            // tbx_halfYearCard
+            // 
+            this.tbx_halfYearCard.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_halfYearCard.Border.Class = "TextBoxBorder";
+            this.tbx_halfYearCard.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_halfYearCard.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_halfYearCard.ForeColor = System.Drawing.Color.Black;
+            this.tbx_halfYearCard.Location = new System.Drawing.Point(143, 60);
+            this.tbx_halfYearCard.Name = "tbx_halfYearCard";
+            this.tbx_halfYearCard.PreventEnterBeep = true;
+            this.tbx_halfYearCard.ReadOnly = true;
+            this.tbx_halfYearCard.Size = new System.Drawing.Size(100, 21);
+            this.tbx_halfYearCard.TabIndex = 22;
+            // 
+            // tbx_seasonCard
+            // 
+            this.tbx_seasonCard.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_seasonCard.Border.Class = "TextBoxBorder";
+            this.tbx_seasonCard.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_seasonCard.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_seasonCard.ForeColor = System.Drawing.Color.Black;
+            this.tbx_seasonCard.Location = new System.Drawing.Point(143, 30);
+            this.tbx_seasonCard.Name = "tbx_seasonCard";
+            this.tbx_seasonCard.PreventEnterBeep = true;
+            this.tbx_seasonCard.ReadOnly = true;
+            this.tbx_seasonCard.Size = new System.Drawing.Size(100, 21);
+            this.tbx_seasonCard.TabIndex = 21;
+            // 
+            // tbx_monthCard
+            // 
+            this.tbx_monthCard.BackColor = System.Drawing.Color.White;
+            // 
+            // 
+            // 
+            this.tbx_monthCard.Border.Class = "TextBoxBorder";
+            this.tbx_monthCard.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.tbx_monthCard.DisabledBackColor = System.Drawing.Color.White;
+            this.tbx_monthCard.ForeColor = System.Drawing.Color.Black;
+            this.tbx_monthCard.Location = new System.Drawing.Point(143, 3);
+            this.tbx_monthCard.Name = "tbx_monthCard";
+            this.tbx_monthCard.PreventEnterBeep = true;
+            this.tbx_monthCard.ReadOnly = true;
+            this.tbx_monthCard.Size = new System.Drawing.Size(100, 21);
+            this.tbx_monthCard.TabIndex = 20;
+            // 
+            // labelX15
+            // 
+            // 
+            // 
+            // 
+            this.labelX15.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX15.Location = new System.Drawing.Point(3, 116);
+            this.labelX15.Name = "labelX15";
+            this.labelX15.Size = new System.Drawing.Size(122, 22);
+            this.labelX15.TabIndex = 14;
+            this.labelX15.Text = "预约费率(元/小时)";
+            // 
+            // labelX14
+            // 
+            // 
+            // 
+            // 
+            this.labelX14.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX14.Location = new System.Drawing.Point(3, 88);
+            this.labelX14.Name = "labelX14";
+            this.labelX14.Size = new System.Drawing.Size(122, 22);
+            this.labelX14.TabIndex = 13;
+            this.labelX14.Text = "年卡费用(元)";
+            // 
+            // labelX13
+            // 
+            // 
+            // 
+            // 
+            this.labelX13.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX13.Location = new System.Drawing.Point(3, 60);
+            this.labelX13.Name = "labelX13";
+            this.labelX13.Size = new System.Drawing.Size(122, 22);
+            this.labelX13.TabIndex = 12;
+            this.labelX13.Text = "半年卡费用(元)";
+            // 
+            // labelX12
+            // 
+            // 
+            // 
+            // 
+            this.labelX12.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX12.Location = new System.Drawing.Point(3, 32);
+            this.labelX12.Name = "labelX12";
+            this.labelX12.Size = new System.Drawing.Size(122, 22);
+            this.labelX12.TabIndex = 11;
+            this.labelX12.Text = "季卡费用(元)";
+            // 
+            // labelX11
+            // 
+            // 
+            // 
+            // 
+            this.labelX11.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+            this.labelX11.Location = new System.Drawing.Point(3, 4);
+            this.labelX11.Name = "labelX11";
+            this.labelX11.Size = new System.Drawing.Size(122, 22);
+            this.labelX11.TabIndex = 10;
+            this.labelX11.Text = "月卡费用(元)";
+            // 
+            // btnx_enableModify
+            // 
+            this.btnx_enableModify.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+            this.btnx_enableModify.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+            this.btnx_enableModify.Location = new System.Drawing.Point(307, 286);
+            this.btnx_enableModify.Name = "btnx_enableModify";
+            this.btnx_enableModify.Size = new System.Drawing.Size(75, 23);
+            this.btnx_enableModify.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+            this.btnx_enableModify.TabIndex = 6;
+            this.btnx_enableModify.Text = "启动修改";
+            this.btnx_enableModify.Click += new System.EventHandler(this.btnx_enableModify_Click);
+            // 
+            // btnx_confirmModification
+            // 
+            this.btnx_confirmModification.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+            this.btnx_confirmModification.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+            this.btnx_confirmModification.Location = new System.Drawing.Point(397, 286);
+            this.btnx_confirmModification.Name = "btnx_confirmModification";
+            this.btnx_confirmModification.Size = new System.Drawing.Size(75, 23);
+            this.btnx_confirmModification.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+            this.btnx_confirmModification.TabIndex = 7;
+            this.btnx_confirmModification.Text = "确认修改";
+            this.btnx_confirmModification.Click += new System.EventHandler(this.btnx_confirmModification_Click);
+            // 
+            // btnx_cancelModify
+            // 
+            this.btnx_cancelModify.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+            this.btnx_cancelModify.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+            this.btnx_cancelModify.Location = new System.Drawing.Point(488, 286);
+            this.btnx_cancelModify.Name = "btnx_cancelModify";
+            this.btnx_cancelModify.Size = new System.Drawing.Size(75, 23);
+            this.btnx_cancelModify.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+            this.btnx_cancelModify.TabIndex = 8;
+            this.btnx_cancelModify.Text = "取消修改";
+            this.btnx_cancelModify.Click += new System.EventHandler(this.btnx_cancelModify_Click);
+            // 
+            // Form_paymentScheme
+            // 
+            this.BackColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.ClientSize = new System.Drawing.Size(575, 327);
+            this.Controls.Add(this.btnx_cancelModify);
+            this.Controls.Add(this.btnx_confirmModification);
+            this.Controls.Add(this.btnx_enableModify);
+            this.Controls.Add(this.gp_VIPScheme);
+            this.Controls.Add(this.gp_paymentScheme);
+            this.DoubleBuffered = true;
+            this.Name = "Form_paymentScheme";
+            this.Text = "收费策略";
+            this.Load += new System.EventHandler(this.Form_paymentScheme_Load);
+            this.gp_paymentScheme.ResumeLayout(false);
+            this.gp_VIPScheme.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private DevComponents.DotNetBar.Controls.GroupPanel gp_paymentScheme;
+        private DevComponents.DotNetBar.LabelX labelX10;
+        private DevComponents.DotNetBar.LabelX labelX9;
+        private DevComponents.DotNetBar.LabelX labelX8;
+        private DevComponents.DotNetBar.LabelX labelX7;
+        private DevComponents.DotNetBar.LabelX labelX6;
+        private DevComponents.DotNetBar.LabelX labelX5;
+        private DevComponents.DotNetBar.LabelX labelX4;
+        private DevComponents.DotNetBar.LabelX labelX3;
+        private DevComponents.DotNetBar.LabelX labelX2;
+        private DevComponents.DotNetBar.LabelX labelX1;
+        private DevComponents.DotNetBar.Controls.GroupPanel gp_VIPScheme;
+        private DevComponents.DotNetBar.LabelX labelX15;
+        private DevComponents.DotNetBar.LabelX labelX14;
+        private DevComponents.DotNetBar.LabelX labelX13;
+        private DevComponents.DotNetBar.LabelX labelX12;
+        private DevComponents.DotNetBar.LabelX labelX11;
+        private DevComponents.DotNetBar.ButtonX btnx_enableModify;
+        private DevComponents.DotNetBar.ButtonX btnx_confirmModification;
+        private DevComponents.DotNetBar.ButtonX btnx_cancelModify;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_peakCharge;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_endChargeTime;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_startChargeTime;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_overnightCharge;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_eachCharge;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_upperBound;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_intervalCharge;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_firstCharge;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_firstChargeTime;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_freeTime;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_bookCharge;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_yearCard;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_halfYearCard;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_seasonCard;
+        private DevComponents.DotNetBar.Controls.TextBoxX tbx_monthCard;
+    }
+}

+ 148 - 0
PLCLinker/centralController/Form_paymentScheme.cs

@@ -0,0 +1,148 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using DevComponents.DotNetBar.Controls;
+using Terminal;
+
+namespace centralController
+{
+    public partial class Form_paymentScheme : DevComponents.DotNetBar.OfficeForm
+    {
+        public Form_paymentScheme()
+        {
+            InitializeComponent();
+        }
+
+        private void Form_paymentScheme_Load(object sender, EventArgs e)
+        {
+            if (PaymentScheme.ins == null)
+            {
+                PaymentScheme.ins = PaymentScheme.GetCurrentPaymentScheme(1);
+                MessageBox.Show("无法获得收费策略,请稍后重试", "警告");
+                Close();
+            }
+            else
+            {
+                displayScheme();
+            }
+        }
+        /// <summary>
+        /// 显示计费策略
+        /// </summary>
+        private void displayScheme()
+        {
+            tbx_freeTime.Text = PaymentScheme.ins.freeTime.ToString();
+            tbx_firstChargeTime.Text = PaymentScheme.ins.firstChargeTime.ToString();
+            tbx_firstCharge.Text = PaymentScheme.ins.firstCharge.ToString();
+            tbx_intervalCharge.Text = PaymentScheme.ins.intervalCharge.ToString();
+            tbx_upperBound.Text = PaymentScheme.ins.upperBound.ToString();
+            tbx_eachCharge.Text = PaymentScheme.ins.eachCharge.ToString();
+            tbx_overnightCharge.Text = PaymentScheme.ins.overnightCharge.ToString();
+            tbx_startChargeTime.Text = PaymentScheme.ins.startChargeTime;
+            tbx_endChargeTime.Text = PaymentScheme.ins.endChargeTime;
+            tbx_peakCharge.Text = PaymentScheme.ins.chargeStandard.ToString();
+            tbx_monthCard.Text = PaymentScheme.ins.monthCardCharge.ToString();
+            tbx_seasonCard.Text = PaymentScheme.ins.seasonCardCharge.ToString();
+            tbx_halfYearCard.Text = PaymentScheme.ins.halfYearCardCharge.ToString();
+            tbx_yearCard.Text = PaymentScheme.ins.yearCardCharge.ToString();
+            tbx_bookCharge.Text = PaymentScheme.ins.bookCharge.ToString();
+        }
+        /// <summary>
+        /// 设置textboxX只读属性
+        /// </summary>
+        /// <param name="isReadOnly"></param>
+        private void SetReadOnly(bool isReadOnly)
+        {
+            try
+            {
+                Control.ControlCollection gp_paymentCC = gp_paymentScheme.Controls;
+                for (int i = 0; i < gp_paymentCC.Count; i++)
+                {
+                    if (gp_paymentCC[i].GetType().Equals(typeof(TextBoxX)))
+                    {
+                        ((TextBoxX)gp_paymentCC[i]).ReadOnly = isReadOnly;
+                    }
+                }
+            }
+            catch (Exception ex) { Console.WriteLine("启动修改按钮异常,panel1"); }
+            try
+            {
+                Control.ControlCollection gp_vipCC = gp_VIPScheme.Controls;
+                for (int i = 0; i < gp_vipCC.Count; i++)
+                {
+                    if (gp_vipCC[i].GetType().Equals(typeof(TextBoxX)))
+                    {
+                        ((TextBoxX)gp_vipCC[i]).ReadOnly = isReadOnly;
+                    }
+                }
+            }
+            catch (Exception ex) { Console.WriteLine("启动修改按钮异常,panel2"); }
+        }
+        /// <summary>
+        /// 允许修改计费策略参数
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnx_enableModify_Click(object sender, EventArgs e)
+        {
+            SetReadOnly(false);
+        }
+        /// <summary>
+        /// 将修改结果写入数据库
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnx_confirmModification_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                PaymentScheme ps = new PaymentScheme()
+                {
+                    freeTime = int.Parse(tbx_freeTime.Text),
+                    firstChargeTime = int.Parse(tbx_firstChargeTime.Text),
+                    firstCharge = int.Parse(tbx_firstCharge.Text),
+                    intervalCharge = int.Parse(tbx_intervalCharge.Text),
+                    upperBound = int.Parse(tbx_upperBound.Text),
+                    eachCharge = int.Parse(tbx_eachCharge.Text),
+                    overnightCharge = int.Parse(tbx_overnightCharge.Text),
+                    startChargeTime = tbx_startChargeTime.Text,
+                    endChargeTime = tbx_endChargeTime.Text,
+                    chargeStandard = int.Parse(tbx_peakCharge.Text),
+                    monthCardCharge = int.Parse(tbx_monthCard.Text),
+                    seasonCardCharge = int.Parse(tbx_seasonCard.Text),
+                    halfYearCardCharge = int.Parse(tbx_halfYearCard.Text),
+                    yearCardCharge = int.Parse(tbx_yearCard.Text),
+                    bookCharge = int.Parse(tbx_bookCharge.Text),
+                };
+                bool result = PaymentScheme.SetPaymentScheme(ps);
+                if (result)
+                {
+                    PaymentScheme.ins = PaymentScheme.GetCurrentPaymentScheme(1);
+                    displayScheme();
+                    SetReadOnly(true);
+                    MessageBox.Show("成功更新收费策略","提示");
+                }
+                else
+                {
+                    MessageBox.Show("收费策略修改失败,请检查后重试", "提示");
+                }
+            }
+            catch (Exception ex){ MessageBox.Show("收费策略修改失败,请检查后重试", "提示"); }
+        }
+        /// <summary>
+        /// 取消修改,显示原参数并将参数设为只读
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnx_cancelModify_Click(object sender, EventArgs e)
+        {
+            displayScheme();
+            SetReadOnly(true);
+        }
+    }
+}

+ 123 - 0
PLCLinker/centralController/Form_paymentScheme.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>

+ 85 - 82
PLCLinker/centralController/Monitor/Monitor.cs

@@ -1,4 +1,4 @@
-using BroadcastModule;
+锘縰sing BroadcastModule;
 using db;
 using Monitor;
 using MySql.Data.MySqlClient;
@@ -22,19 +22,19 @@ namespace Monitor
     public class Monitor : IMonitor
     {
         /// <summary>
-        /// 监控模块单例
+        /// 鐩戞帶妯″潡鍗曚緥
         /// </summary>
         public static Monitor ins { get; set; }
         /// <summary>
-        /// 中控系统总状态
+        /// 涓�帶绯荤粺鎬荤姸鎬�
         /// </summary>
         public static bool globalStatus = false;
         /// <summary>
-        /// 初始化步骤
+        /// 鍒濆�鍖栨�楠�
         /// </summary>
         public static int initializeState = 0;
         /// <summary>
-        /// PLC对象句柄
+        /// PLC瀵硅薄鍙ユ焺
         /// </summary>
         public static AbstractPLCLinker PLC = null;
         public static string plcIPAddr { get; set; }
@@ -47,43 +47,43 @@ namespace Monitor
         public static MainBlockStru mainBlockInfo { get; set; }
         public static List<ParkingSpaceStru> parkingSpaceInfo { get; set; }
         /// <summary>
-        /// 远程数据库操作句柄
+        /// 杩滅▼鏁版嵁搴撴搷浣滃彞鏌�
         /// </summary>
         public static DBOperation remoteDBOper;
         /// <summary>
-        /// 本地数据库操作句柄
+        /// 鏈�湴鏁版嵁搴撴搷浣滃彞鏌�
         /// </summary>
         public static DBOperation localDBOper;
         /// <summary>
-        /// 显示板操作对象句柄
+        /// 鏄剧ず鏉挎搷浣滃�璞″彞鏌�
         /// </summary>
         public static BroadcastBoard allInOneMachine;
         public static string allInOneMachineIP { get; set; }
         public static int allInOneMachinePort { get; set; }
         /// <summary>
-        /// 号牌机操作句柄
+        /// 鍙风墝鏈烘搷浣滃彞鏌�
         /// </summary>
         public static INumMachineLinker numMachineLinker;
         public static IntPtr flpHandle;
         /// <summary>
-        /// 本地web操作句柄
+        /// 鏈�湴web鎿嶄綔鍙ユ焺
         /// </summary>
         public static IWebServer webServer;
         public static int webPort { get; set; }
         /// <summary>
-        /// 系统初始化器句柄
+        /// 绯荤粺鍒濆�鍖栧櫒鍙ユ焺
         /// </summary>
         internal static SystemInitializer sysInitializer;
         /// <summary>
-        /// 系统关闭状态
+        /// 绯荤粺鍏抽棴鐘舵€�
         /// </summary>
         bool isClosing;
         /// <summary>
-        /// 车库ID
+        /// 杞﹀簱ID
         /// </summary>
         public static int garageID;
         /// <summary>
-        /// 将显示在界面的提示字符串
+        /// 灏嗘樉绀哄湪鐣岄潰鐨勬彁绀哄瓧绗︿覆
         /// </summary>
         private static Queue<string> notificationQueue = new Queue<string>();
         private const int MAXLINES = 10;
@@ -95,15 +95,15 @@ namespace Monitor
                 if (PLC != null && PLC.isConnected)
                 {
                     List<object> received = PLC.ReadFromPLC(PLCDataType.terminal, 0);
-                    //首先获取所有终端信息
+                    //棣栧厛鑾峰彇鎵€鏈夌粓绔�俊鎭�
                     try
                     {
-                        //终端总数相同
+                        //缁堢�鎬绘暟鐩稿悓
                         if (Terminal.Terminal.terminalInfo.Count == plcTerminalCount)
                         {
                             for (int i = 0; i < plcTerminalCount; i++)
                             {
-                                //一旦发现差异立刻更新
+                                //涓€鏃﹀彂鐜板樊寮傜珛鍒绘洿鏂�
                                 if (!Terminal.Terminal.terminalInfo[i].Equals(received[i]))
                                 {
                                     Terminal.Terminal.terminalInfo[i] = (TerminalStru)received[i];
@@ -112,7 +112,7 @@ namespace Monitor
                         }
                         else
                         {
-                            //初始化终端信息列表
+                            //鍒濆�鍖栫粓绔�俊鎭�垪琛�
                             Terminal.Terminal.terminalInfo.Clear();
                             for (int i = 0; i < plcTerminalCount; i++)
                             {
@@ -121,8 +121,8 @@ namespace Monitor
                             }
                         }
                     }
-                    catch (Exception e) { Console.WriteLine("PLC监控终端数据," + e.Message); }
-                    //接下来获取中控监控信息
+                    catch (Exception e) { Console.WriteLine("PLC鐩戞帶缁堢�鏁版嵁," + e.Message); }
+                    //鎺ヤ笅鏉ヨ幏鍙栦腑鎺х洃鎺т俊鎭�
                     try
                     {
                         received = PLC.ReadFromPLC(PLCDataType.central, 0);
@@ -131,18 +131,18 @@ namespace Monitor
                             mainBlockInfo = (MainBlockStru)received[0];
                         }
                     }
-                    catch (Exception e) { Console.WriteLine("PLC监控中控数据," + e.Message); }
-                    //最后获得所有车位信息
+                    catch (Exception e) { Console.WriteLine("PLC鐩戞帶涓�帶鏁版嵁," + e.Message); }
+                    //鏈€鍚庤幏寰楁墍鏈夎溅浣嶄俊鎭�
                     try
                     {
                         received = PLC.ReadFromPLC(PLCDataType.parkingSpace, 0);
                         //Console.WriteLine(parkingSpaceInfo.Count+","+ plcParkingSpaceCount);
-                        //车位总数相同
+                        //杞︿綅鎬绘暟鐩稿悓
                         if (parkingSpaceInfo.Count == plcParkingSpaceCount)
                         {
                             for (int i = 0; i < plcParkingSpaceCount; i++)
                             {
-                                //一旦发现差异立刻更新
+                                //涓€鏃﹀彂鐜板樊寮傜珛鍒绘洿鏂�
                                 if (!parkingSpaceInfo[i].Equals(received[i]))
                                 {
                                     parkingSpaceInfo[i] = (ParkingSpaceStru)received[i];
@@ -158,14 +158,14 @@ namespace Monitor
                             }
                         }
                     }
-                    catch (Exception e) { Console.WriteLine("PLC监控车位数据," + e.Message); }
+                    catch (Exception e) { Console.WriteLine("PLC鐩戞帶杞︿綅鏁版嵁," + e.Message); }
                 }
                 Thread.Sleep(500);
             }
         }
 
         /// <summary>
-        /// CPU
+        /// CPU鍚�
         /// </summary>
         /// <returns></returns>
         private static string getCPUName()
@@ -187,7 +187,7 @@ namespace Monitor
         }
 
         /// <summary>
-        /// 操作系统版本
+        /// 鎿嶄綔绯荤粺鐗堟湰
         /// </summary>
         private static string getOsVersion()
         {
@@ -211,7 +211,7 @@ namespace Monitor
         }
 
         /// <summary>
-        /// 显卡名
+        /// 鏄惧崱鍚�
         /// </summary>
         private static string getGPUName()
         {
@@ -235,13 +235,13 @@ namespace Monitor
         }
 
         /// <summary>
-        /// 获取系统内存大小
+        /// 鑾峰彇绯荤粺鍐呭瓨澶у皬
         /// </summary>
         private static string getMenSize()
         {
-            ManagementObjectSearcher searcher = new ManagementObjectSearcher();   //用于查询一些如系统信息的管理对象 
-            searcher.Query = new SelectQuery("Win32_PhysicalMemory", "", new string[] { "Capacity" });//设置查询条件 
-            ManagementObjectCollection collection = searcher.Get();   //获取内存容量 
+            ManagementObjectSearcher searcher = new ManagementObjectSearcher();   //鐢ㄤ簬鏌ヨ�涓€浜涘�绯荤粺淇℃伅鐨勭�鐞嗗�璞� 
+            searcher.Query = new SelectQuery("Win32_PhysicalMemory", "", new string[] { "Capacity" });//璁剧疆鏌ヨ�鏉′欢 
+            ManagementObjectCollection collection = searcher.Get();   //鑾峰彇鍐呭瓨瀹归噺 
             ManagementObjectCollection.ManagementObjectEnumerator em = collection.GetEnumerator();
 
             long capacity = 0;
@@ -266,7 +266,7 @@ namespace Monitor
 
 
 
-        //************************************ 公有方法 **********************************
+        //************************************ 鍏�湁鏂规硶 **********************************
         public Monitor(IntPtr flpHandle)
         {
             Monitor.flpHandle = flpHandle;
@@ -294,7 +294,7 @@ namespace Monitor
 
         }
         /// <summary>
-        /// 获取提示信息
+        /// 鑾峰彇鎻愮ず淇℃伅
         /// </summary>
         /// <returns></returns>
         public static string GetNotification()
@@ -311,7 +311,7 @@ namespace Monitor
             return notificationStr.ToString();
         }
         /// <summary>
-        /// 添加提示信息
+        /// 娣诲姞鎻愮ず淇℃伅
         /// </summary>
         /// <param name="notification"></param>
         public static void AddNotification(string notification)
@@ -329,7 +329,7 @@ namespace Monitor
             }
         }
         /// <summary>
-        /// 清除提示信息
+        /// 娓呴櫎鎻愮ず淇℃伅
         /// </summary>
         public static void ClearNotification()
         {
@@ -339,7 +339,7 @@ namespace Monitor
             }
         }
         /// <summary>
-        /// 返回系统信息字符串
+        /// 杩斿洖绯荤粺淇℃伅瀛楃�涓�
         /// </summary>
         /// <returns></returns>
         public static string GetSysInfo()
@@ -350,19 +350,19 @@ namespace Monitor
             {
                 string endl = "\r\n";
                 info += endl + lng.autoPackSys + " " + lng.centralPort + endl + endl;
-                info += lng.version + "" + SysConst.version() + endl + endl;
+                info += lng.version + "锛�" + SysConst.version() + endl + endl;
 
-                info += lng.hostNmae + "" + Dns.GetHostName() + endl + endl;
-                info += lng.os + "" + getOsVersion() + endl + endl;
-                info += lng.cpu + "" + getCPUName() + endl + endl;
-                info += lng.mem + "" + getMenSize() + endl + endl;
-                info += lng.gpu + "" + getGPUName() + endl + endl;
+                info += lng.hostNmae + "锛�" + Dns.GetHostName() + endl + endl;
+                info += lng.os + "锛�" + getOsVersion() + endl + endl;
+                info += lng.cpu + "锛�" + getCPUName() + endl + endl;
+                info += lng.mem + "锛�" + getMenSize() + endl + endl;
+                info += lng.gpu + "锛�" + getGPUName() + endl + endl;
             }
             catch (Exception) { }
             return info;
         }
         /// <summary>
-        /// 返回停车记录信息
+        /// 杩斿洖鍋滆溅璁板綍淇℃伅
         /// </summary>
         /// <returns></returns>
         public static List<object[]> GetParkingRecords()
@@ -373,54 +373,57 @@ namespace Monitor
             List<object[]> result = new List<object[]>();
             string getParkingRecordsSql = "select parkingRecordsID,userID,numberPlate,parkingSpaceID,realParkTime,realGetTime,receiptNum,parkingPrice " +
                 "from parkingrecords where realParkTime like '" + now.ToString("yyyy-MM-dd") + "%' or realParkTime like '" + yesterday.ToString("yyyy-MM-dd") + "%' or realParkTime like '" + twoDaysAgo.ToString("yyyy-MM-dd") + "%';";
-            lock (localDBOper)
+            if (localDBOper != null)
             {
-                MySqlDataReader reader = localDBOper.Query(getParkingRecordsSql);
-                try
+                lock (localDBOper)
                 {
-                    //MySqlDataAdapter adapter = localDBOper.Display(getParkingRecordsSql);
-                    //DataSet ds = new DataSet();
-                    //adapter.Fill(ds);
-                    //DataTable dt = ds.Tables[0];
-                    //for (int i = 0; i < dt.Rows.Count; i++)
-                    //{
-                    //    object[] objArray = new object[10];
-                    //    for (int j = 0; j < dt.Columns.Count; j++)
-                    //    {
-                    //        objArray[j] = dt.Rows[i][j];
-                    //    }
-                    //    result.Add(objArray);
-                    //}
-                    //adapter.Dispose();
+                    MySqlDataReader reader = localDBOper.Query(getParkingRecordsSql);
+                    try
+                    {
+                        //MySqlDataAdapter adapter = localDBOper.Display(getParkingRecordsSql);
+                        //DataSet ds = new DataSet();
+                        //adapter.Fill(ds);
+                        //DataTable dt = ds.Tables[0];
+                        //for (int i = 0; i < dt.Rows.Count; i++)
+                        //{
+                        //    object[] objArray = new object[10];
+                        //    for (int j = 0; j < dt.Columns.Count; j++)
+                        //    {
+                        //        objArray[j] = dt.Rows[i][j];
+                        //    }
+                        //    result.Add(objArray);
+                        //}
+                        //adapter.Dispose();
 
 
-                    while (reader != null && reader.Read())
-                    {
-                        if (reader.HasRows)
+                        while (reader != null && reader.Read())
                         {
-                            object[] temp = new object[reader.FieldCount];
-                            reader.GetValues(temp);
-                            result.Add(temp);
+                            if (reader.HasRows)
+                            {
+                                object[] temp = new object[reader.FieldCount];
+                                reader.GetValues(temp);
+                                result.Add(temp);
+                            }
                         }
                     }
-                }
-                catch (Exception e) { Console.WriteLine(e.Message); }
-                try
-                {
-                    if (reader != null)
+                    catch (Exception e) { Console.WriteLine(e.Message); }
+                    try
                     {
-                        reader.Close();
-                        reader.Dispose();
+                        if (reader != null)
+                        {
+                            reader.Close();
+                            reader.Dispose();
+                        }
                     }
+                    catch (Exception e) { Console.WriteLine(e.Message); }
                 }
-                catch (Exception e) { Console.WriteLine(e.Message); }
             }
 
             result.Reverse();
             return result;
         }
         /// <summary>
-        /// 返回预约记录信息
+        /// 杩斿洖棰勭害璁板綍淇℃伅
         /// </summary>
         /// <returns></returns>
         public static List<object[]> GetOrderRecords()
@@ -428,7 +431,7 @@ namespace Monitor
             return null;
         }
         /// <summary>
-        /// 返回空闲正常车位数
+        /// 杩斿洖绌洪棽姝e父杞︿綅鏁�
         /// </summary>
         /// <returns></returns>
         public static int GetFreeSpaceCount()
@@ -447,7 +450,7 @@ namespace Monitor
             return freeSpaceCount;
         }
         /// <summary>
-        /// 返回可预约车位数
+        /// 杩斿洖鍙��绾﹁溅浣嶆暟
         /// </summary>
         /// <returns></returns>
         public static int GetBookableSpaceCount()
@@ -478,13 +481,13 @@ namespace Monitor
             return bookableSpaceCount;
         }
         /// <summary>
-        /// 系统初始化,启动plc监控
+        /// 绯荤粺鍒濆�鍖栵紝鍚�姩plc鐩戞帶
         /// </summary>
         public void Start()
         {
             if (flpHandle != IntPtr.Zero)
             {
-                //初始化系统
+                //鍒濆�鍖栫郴缁�
                 if (sysInitializer == null)
                 {
                     sysInitializer = new SystemInitializer();
@@ -494,7 +497,7 @@ namespace Monitor
                     sysInitializer.Init(flpHandle);
                 });
 
-                //更新PLC数据
+                //鏇存柊PLC鏁版嵁
                 Task.Factory.StartNew(() =>
                 {
                     PLCUpdate();
@@ -502,7 +505,7 @@ namespace Monitor
             }
         }
         /// <summary>
-        /// 系统停止
+        /// 绯荤粺鍋滄�
         /// </summary>
         public void Stop()
         {

+ 4 - 4
PLCLinker/centralController/Monitor/SystemInitializer.cs

@@ -62,10 +62,10 @@ namespace Monitor
             catch (Exception e) { Console.WriteLine("初始化," + e.Message); return; }
 
             Monitor.AddNotification("初始化PLC连接...");
-            initStatus = initStatus && PLCInit(retryCount);
-            //PLC初始化结束,进入状态2
-            if (!initStatus) { return; }
-            else { Monitor.initializeState = 2; }
+            //initStatus = initStatus && PLCInit(retryCount);
+            ////PLC初始化结束,进入状态2
+            //if (!initStatus) { return; }
+            //else { Monitor.initializeState = 2; }
 
             //初始化数据库对象
             Monitor.AddNotification("初始化数据库...");

Diff do ficheiro suprimidas por serem muito extensas
+ 125 - 113
PLCLinker/centralController/Terminal/Terminal.cs


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


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


+ 9 - 0
PLCLinker/centralController/centralController.csproj

@@ -91,6 +91,12 @@
   <ItemGroup>
     <Compile Include="entity\AbstractMessage.cs" />
     <Compile Include="entity\Jsonhelper.cs" />
+    <Compile Include="Form_paymentScheme.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form_paymentScheme.Designer.cs">
+      <DependentUpon>Form_paymentScheme.cs</DependentUpon>
+    </Compile>
     <Compile Include="language\Language.cs" />
     <Compile Include="LOG\log.cs" />
     <Compile Include="LOG\LogManager.cs" />
@@ -122,6 +128,9 @@
     <Compile Include="WebServer\IWebServer.cs" />
     <Compile Include="WebServer\LazySingleton.cs" />
     <Compile Include="WebServer\MultiSocketThread.cs" />
+    <EmbeddedResource Include="Form_paymentScheme.resx">
+      <DependentUpon>Form_paymentScheme.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FormCentralController.resx">
       <DependentUpon>FormCentralController.cs</DependentUpon>
       <SubType>Designer</SubType>

+ 1 - 1
PLCLinker/centralController/obj/Release/centralController.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-ec57ee3b8371b9008a7e95d2f89d9f907d88a07e
+9fe48c294a8181f28841f7dc443bba75d30deab0

+ 1 - 0
PLCLinker/centralController/obj/Release/centralController.csproj.FileListAbsolute.txt

@@ -21,3 +21,4 @@ E:\superScene\智能停车项目\智能停车项目v2.0\PLCLinker\centralControl
 E:\superScene\智能停车项目\智能停车项目v2.0\PLCLinker\centralController\bin\Release\db.dll
 E:\superScene\智能停车项目\智能停车项目v2.0\PLCLinker\centralController\bin\Release\PLCS7.xml
 E:\superScene\智能停车项目\智能停车项目v2.0\PLCLinker\centralController\obj\Release\centralController.csprojResolveAssemblyReference.cache
+E:\superScene\智能停车项目\智能停车项目v2.0\PLCLinker\centralController\obj\Release\centralController.Form_paymentScheme.resources

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


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


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