refactor: 插件 UI 从 WinForms 迁移到 CycleGUI,并修复代码质量问题

将 StandardScene 各插件的配置/监控窗体从 WinForms 迁移到 CycleGUI(删除 .Designer.cs/.resx,重写为 PanelBuilder 立即模式 UI,新增 CycleUiHelper 统一对话框)。

同时修复代码审核中的问题:
- 后台文件写入加锁 + try/catch(ButtonBoxManager / DoorManager,对齐 LoopViewer.SaveTasks 模式)
- CoderFieldsMetadata.cs 启用 #nullable enable,消除 CS8632 警告
- DummyCar 移除已废弃的 rightClickAction()/SetPosition()
- CarRemoteHelper.OpenVehicleWebPage 的 Process.Start 加 try/catch
- 重命名名不副实的 Mstsc()(现为打开网页)
- 统一弃元命名为 _
- TrafficInterlockViewer 改用稳定 Id(GUID)做选择/编辑,替代行索引
- csproj 改用 $(CGUILibDir) 解析 CycleGUI,绝对路径收敛到 Directory.Build.props

构建:dotnet build StandardScene.sln → 0 错误,30 警告(均为历史遗留)。
注:static 单例状态重构(审核第 8 项)暂未处理,留待单独任务。
This commit is contained in:
zhaowei.huang
2026-06-26 15:00:53 +08:00
parent c8e540d272
commit a0dc1e6cd0
91 changed files with 3946 additions and 15419 deletions
@@ -1,608 +0,0 @@
namespace StandardScene.ExtendDevice.ButtonBox
{
partial class ButtonBoxManager
{
/// <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.buttonBoxListView = new System.Windows.Forms.ListView();
this.columnHeaderBoxIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderIp = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderPort = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBoxButtonBox = new System.Windows.Forms.GroupBox();
this.btnSaveButtonBox = new System.Windows.Forms.Button();
this.btnDeleteButtonBox = new System.Windows.Forms.Button();
this.btnAddButtonBox = new System.Windows.Forms.Button();
this.labelType = new System.Windows.Forms.Label();
this.comboBoxType = new System.Windows.Forms.ComboBox();
this.labelBoxIndex = new System.Windows.Forms.Label();
this.textBoxBoxIndex = new System.Windows.Forms.TextBox();
this.labelPort = new System.Windows.Forms.Label();
this.textBoxPort = new System.Windows.Forms.TextBox();
this.labelIp = new System.Windows.Forms.Label();
this.textBoxIp = new System.Windows.Forms.TextBox();
this.buttonListView = new System.Windows.Forms.ListView();
this.columnHeaderButtonIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderTriggerMission = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderTriggerMethod = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderTriggerMethodParams = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderTriggerState = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderTriggerDelay = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBoxButton = new System.Windows.Forms.GroupBox();
this.btnSaveButton = new System.Windows.Forms.Button();
this.btnDeleteButton = new System.Windows.Forms.Button();
this.btnAddButton = new System.Windows.Forms.Button();
this.labelTriggerMethodParams = new System.Windows.Forms.Label();
this.textBoxTriggerMethodParams = new System.Windows.Forms.TextBox();
this.labelTriggerMethod = new System.Windows.Forms.Label();
this.textBoxTriggerMethod = new System.Windows.Forms.TextBox();
this.labelTriggerMission = new System.Windows.Forms.Label();
this.textBoxTriggerMission = new System.Windows.Forms.TextBox();
this.labelButtonIndex = new System.Windows.Forms.Label();
this.textBoxButtonIndex = new System.Windows.Forms.TextBox();
this.labelTriggerState = new System.Windows.Forms.Label();
this.comboBoxTriggerState = new System.Windows.Forms.ComboBox();
this.labelTriggerDelay = new System.Windows.Forms.Label();
this.textBoxTriggerDelay = new System.Windows.Forms.TextBox();
this.labelTitle = new System.Windows.Forms.Label();
this.groupBoxButtonBox.SuspendLayout();
this.groupBoxButton.SuspendLayout();
this.SuspendLayout();
//
// buttonBoxListView
//
this.buttonBoxListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.buttonBoxListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.buttonBoxListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeaderBoxIndex,
this.columnHeaderIp,
this.columnHeaderPort,
this.columnHeaderType});
this.buttonBoxListView.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonBoxListView.FullRowSelect = true;
this.buttonBoxListView.GridLines = true;
this.buttonBoxListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.buttonBoxListView.HideSelection = false;
this.buttonBoxListView.Location = new System.Drawing.Point(15, 55);
this.buttonBoxListView.MultiSelect = false;
this.buttonBoxListView.Name = "buttonBoxListView";
this.buttonBoxListView.OwnerDraw = true;
this.buttonBoxListView.Size = new System.Drawing.Size(450, 290);
this.buttonBoxListView.TabIndex = 0;
this.buttonBoxListView.UseCompatibleStateImageBehavior = false;
this.buttonBoxListView.View = System.Windows.Forms.View.Details;
this.buttonBoxListView.SelectedIndexChanged += new System.EventHandler(this.buttonBoxListView_SelectedIndexChanged);
//
// columnHeaderBoxIndex
//
this.columnHeaderBoxIndex.Text = "编码";
this.columnHeaderBoxIndex.Width = 70;
//
// columnHeaderIp
//
this.columnHeaderIp.Text = "IP地址";
this.columnHeaderIp.Width = 130;
//
// columnHeaderPort
//
this.columnHeaderPort.Text = "端口";
this.columnHeaderPort.Width = 90;
//
// columnHeaderType
//
this.columnHeaderType.Text = "类型";
this.columnHeaderType.Width = 140;
//
// groupBoxButtonBox
//
this.groupBoxButtonBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.groupBoxButtonBox.Controls.Add(this.btnSaveButtonBox);
this.groupBoxButtonBox.Controls.Add(this.btnDeleteButtonBox);
this.groupBoxButtonBox.Controls.Add(this.btnAddButtonBox);
this.groupBoxButtonBox.Controls.Add(this.labelType);
this.groupBoxButtonBox.Controls.Add(this.comboBoxType);
this.groupBoxButtonBox.Controls.Add(this.labelBoxIndex);
this.groupBoxButtonBox.Controls.Add(this.textBoxBoxIndex);
this.groupBoxButtonBox.Controls.Add(this.labelPort);
this.groupBoxButtonBox.Controls.Add(this.textBoxPort);
this.groupBoxButtonBox.Controls.Add(this.labelIp);
this.groupBoxButtonBox.Controls.Add(this.textBoxIp);
this.groupBoxButtonBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBoxButtonBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
this.groupBoxButtonBox.Location = new System.Drawing.Point(15, 360);
this.groupBoxButtonBox.Name = "groupBoxButtonBox";
this.groupBoxButtonBox.Padding = new System.Windows.Forms.Padding(12, 10, 12, 12);
this.groupBoxButtonBox.Size = new System.Drawing.Size(450, 250);
this.groupBoxButtonBox.TabIndex = 1;
this.groupBoxButtonBox.TabStop = false;
this.groupBoxButtonBox.Text = "按钮盒信息";
//
// btnSaveButtonBox
//
this.btnSaveButtonBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204)))));
this.btnSaveButtonBox.FlatAppearance.BorderSize = 0;
this.btnSaveButtonBox.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(92)))), ((int)(((byte)(153)))));
this.btnSaveButtonBox.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(102)))), ((int)(((byte)(170)))));
this.btnSaveButtonBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveButtonBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveButtonBox.ForeColor = System.Drawing.Color.White;
this.btnSaveButtonBox.Location = new System.Drawing.Point(330, 200);
this.btnSaveButtonBox.Name = "btnSaveButtonBox";
this.btnSaveButtonBox.Size = new System.Drawing.Size(100, 38);
this.btnSaveButtonBox.TabIndex = 10;
this.btnSaveButtonBox.Text = "保存";
this.btnSaveButtonBox.UseVisualStyleBackColor = false;
this.btnSaveButtonBox.Click += new System.EventHandler(this.btnSaveButtonBox_Click);
//
// btnDeleteButtonBox
//
this.btnDeleteButtonBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69)))));
this.btnDeleteButtonBox.FlatAppearance.BorderSize = 0;
this.btnDeleteButtonBox.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(165)))), ((int)(((byte)(40)))), ((int)(((byte)(52)))));
this.btnDeleteButtonBox.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(187)))), ((int)(((byte)(45)))), ((int)(((byte)(59)))));
this.btnDeleteButtonBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDeleteButtonBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDeleteButtonBox.ForeColor = System.Drawing.Color.White;
this.btnDeleteButtonBox.Location = new System.Drawing.Point(220, 200);
this.btnDeleteButtonBox.Name = "btnDeleteButtonBox";
this.btnDeleteButtonBox.Size = new System.Drawing.Size(100, 38);
this.btnDeleteButtonBox.TabIndex = 9;
this.btnDeleteButtonBox.Text = "删除";
this.btnDeleteButtonBox.UseVisualStyleBackColor = false;
this.btnDeleteButtonBox.Click += new System.EventHandler(this.btnDeleteButtonBox_Click);
//
// btnAddButtonBox
//
this.btnAddButtonBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(167)))), ((int)(((byte)(69)))));
this.btnAddButtonBox.FlatAppearance.BorderSize = 0;
this.btnAddButtonBox.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(125)))), ((int)(((byte)(52)))));
this.btnAddButtonBox.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56)))));
this.btnAddButtonBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAddButtonBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddButtonBox.ForeColor = System.Drawing.Color.White;
this.btnAddButtonBox.Location = new System.Drawing.Point(110, 200);
this.btnAddButtonBox.Name = "btnAddButtonBox";
this.btnAddButtonBox.Size = new System.Drawing.Size(100, 38);
this.btnAddButtonBox.TabIndex = 8;
this.btnAddButtonBox.Text = "添加";
this.btnAddButtonBox.UseVisualStyleBackColor = false;
this.btnAddButtonBox.Click += new System.EventHandler(this.btnAddButtonBox_Click);
//
// labelType
//
this.labelType.AutoSize = true;
this.labelType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelType.Location = new System.Drawing.Point(28, 168);
this.labelType.Name = "labelType";
this.labelType.Size = new System.Drawing.Size(65, 24);
this.labelType.TabIndex = 7;
this.labelType.Text = "类型:";
//
// comboBoxType
//
this.comboBoxType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBoxType.FormattingEnabled = true;
this.comboBoxType.Location = new System.Drawing.Point(110, 165);
this.comboBoxType.Name = "comboBoxType";
this.comboBoxType.Size = new System.Drawing.Size(320, 32);
this.comboBoxType.TabIndex = 6;
//
// labelBoxIndex
//
this.labelBoxIndex.AutoSize = true;
this.labelBoxIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelBoxIndex.Location = new System.Drawing.Point(28, 48);
this.labelBoxIndex.Name = "labelBoxIndex";
this.labelBoxIndex.Size = new System.Drawing.Size(65, 24);
this.labelBoxIndex.TabIndex = 1;
this.labelBoxIndex.Text = "编码:";
//
// textBoxBoxIndex
//
this.textBoxBoxIndex.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxBoxIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxBoxIndex.Location = new System.Drawing.Point(110, 45);
this.textBoxBoxIndex.Name = "textBoxBoxIndex";
this.textBoxBoxIndex.Size = new System.Drawing.Size(320, 30);
this.textBoxBoxIndex.TabIndex = 0;
//
// labelIp
//
this.labelIp.AutoSize = true;
this.labelIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelIp.Location = new System.Drawing.Point(18, 88);
this.labelIp.Name = "labelIp";
this.labelIp.Size = new System.Drawing.Size(85, 24);
this.labelIp.TabIndex = 3;
this.labelIp.Text = "IP地址:";
//
// textBoxIp
//
this.textBoxIp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxIp.Location = new System.Drawing.Point(110, 85);
this.textBoxIp.Name = "textBoxIp";
this.textBoxIp.Size = new System.Drawing.Size(320, 30);
this.textBoxIp.TabIndex = 2;
this.textBoxIp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
//
// labelPort
//
this.labelPort.AutoSize = true;
this.labelPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelPort.Location = new System.Drawing.Point(28, 128);
this.labelPort.Name = "labelPort";
this.labelPort.Size = new System.Drawing.Size(65, 24);
this.labelPort.TabIndex = 5;
this.labelPort.Text = "端口:";
//
// textBoxPort
//
this.textBoxPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxPort.Location = new System.Drawing.Point(110, 125);
this.textBoxPort.Name = "textBoxPort";
this.textBoxPort.Size = new System.Drawing.Size(320, 30);
this.textBoxPort.TabIndex = 4;
//
// buttonListView
//
this.buttonListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.buttonListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.buttonListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeaderButtonIndex,
this.columnHeaderTriggerState,
this.columnHeaderTriggerDelay,
this.columnHeaderTriggerMission,
this.columnHeaderTriggerMethod,
this.columnHeaderTriggerMethodParams});
this.buttonListView.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonListView.FullRowSelect = true;
this.buttonListView.GridLines = true;
this.buttonListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.buttonListView.HideSelection = false;
this.buttonListView.Location = new System.Drawing.Point(483, 55);
this.buttonListView.MultiSelect = false;
this.buttonListView.Name = "buttonListView";
this.buttonListView.OwnerDraw = true;
this.buttonListView.Size = new System.Drawing.Size(700, 290);
this.buttonListView.TabIndex = 2;
this.buttonListView.UseCompatibleStateImageBehavior = false;
this.buttonListView.View = System.Windows.Forms.View.Details;
this.buttonListView.SelectedIndexChanged += new System.EventHandler(this.buttonListView_SelectedIndexChanged);
//
// columnHeaderButtonIndex
//
this.columnHeaderButtonIndex.Text = "编码";
this.columnHeaderButtonIndex.Width = 70;
//
// columnHeaderTriggerState
//
this.columnHeaderTriggerState.Text = "触发状态";
this.columnHeaderTriggerState.Width = 100;
//
// columnHeaderTriggerDelay
//
this.columnHeaderTriggerDelay.Text = "触发延迟";
this.columnHeaderTriggerDelay.Width = 90;
//
// columnHeaderTriggerMission
//
this.columnHeaderTriggerMission.Text = "触发任务";
this.columnHeaderTriggerMission.Width = 140;
//
// columnHeaderTriggerMethod
//
this.columnHeaderTriggerMethod.Text = "触发方法";
this.columnHeaderTriggerMethod.Width = 140;
//
// columnHeaderTriggerMethodParams
//
this.columnHeaderTriggerMethodParams.Text = "方法参数";
this.columnHeaderTriggerMethodParams.Width = 160;
//
// groupBoxButton
//
this.groupBoxButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.groupBoxButton.Controls.Add(this.btnSaveButton);
this.groupBoxButton.Controls.Add(this.btnDeleteButton);
this.groupBoxButton.Controls.Add(this.btnAddButton);
this.groupBoxButton.Controls.Add(this.labelTriggerMethodParams);
this.groupBoxButton.Controls.Add(this.textBoxTriggerMethodParams);
this.groupBoxButton.Controls.Add(this.labelTriggerMethod);
this.groupBoxButton.Controls.Add(this.textBoxTriggerMethod);
this.groupBoxButton.Controls.Add(this.labelTriggerMission);
this.groupBoxButton.Controls.Add(this.textBoxTriggerMission);
this.groupBoxButton.Controls.Add(this.labelButtonIndex);
this.groupBoxButton.Controls.Add(this.textBoxButtonIndex);
this.groupBoxButton.Controls.Add(this.labelTriggerState);
this.groupBoxButton.Controls.Add(this.comboBoxTriggerState);
this.groupBoxButton.Controls.Add(this.labelTriggerDelay);
this.groupBoxButton.Controls.Add(this.textBoxTriggerDelay);
this.groupBoxButton.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBoxButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
this.groupBoxButton.Location = new System.Drawing.Point(483, 360);
this.groupBoxButton.Name = "groupBoxButton";
this.groupBoxButton.Padding = new System.Windows.Forms.Padding(12, 10, 12, 12);
this.groupBoxButton.Size = new System.Drawing.Size(700, 250);
this.groupBoxButton.TabIndex = 3;
this.groupBoxButton.TabStop = false;
this.groupBoxButton.Text = "按钮信息";
//
// btnSaveButton
//
this.btnSaveButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204)))));
this.btnSaveButton.FlatAppearance.BorderSize = 0;
this.btnSaveButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(92)))), ((int)(((byte)(153)))));
this.btnSaveButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(102)))), ((int)(((byte)(170)))));
this.btnSaveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveButton.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveButton.ForeColor = System.Drawing.Color.White;
this.btnSaveButton.Location = new System.Drawing.Point(580, 180);
this.btnSaveButton.Name = "btnSaveButton";
this.btnSaveButton.Size = new System.Drawing.Size(100, 38);
this.btnSaveButton.TabIndex = 13;
this.btnSaveButton.Text = "保存";
this.btnSaveButton.UseVisualStyleBackColor = false;
this.btnSaveButton.Click += new System.EventHandler(this.btnSaveButton_Click);
//
// btnDeleteButton
//
this.btnDeleteButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69)))));
this.btnDeleteButton.FlatAppearance.BorderSize = 0;
this.btnDeleteButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(165)))), ((int)(((byte)(40)))), ((int)(((byte)(52)))));
this.btnDeleteButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(187)))), ((int)(((byte)(45)))), ((int)(((byte)(59)))));
this.btnDeleteButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDeleteButton.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDeleteButton.ForeColor = System.Drawing.Color.White;
this.btnDeleteButton.Location = new System.Drawing.Point(470, 180);
this.btnDeleteButton.Name = "btnDeleteButton";
this.btnDeleteButton.Size = new System.Drawing.Size(100, 38);
this.btnDeleteButton.TabIndex = 12;
this.btnDeleteButton.Text = "删除";
this.btnDeleteButton.UseVisualStyleBackColor = false;
this.btnDeleteButton.Click += new System.EventHandler(this.btnDeleteButton_Click);
//
// btnAddButton
//
this.btnAddButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(167)))), ((int)(((byte)(69)))));
this.btnAddButton.FlatAppearance.BorderSize = 0;
this.btnAddButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(125)))), ((int)(((byte)(52)))));
this.btnAddButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56)))));
this.btnAddButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAddButton.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddButton.ForeColor = System.Drawing.Color.White;
this.btnAddButton.Location = new System.Drawing.Point(360, 180);
this.btnAddButton.Name = "btnAddButton";
this.btnAddButton.Size = new System.Drawing.Size(100, 38);
this.btnAddButton.TabIndex = 11;
this.btnAddButton.Text = "添加";
this.btnAddButton.UseVisualStyleBackColor = false;
this.btnAddButton.Click += new System.EventHandler(this.btnAddButton_Click);
//
// labelTriggerMethodParams
//
this.labelTriggerMethodParams.AutoSize = true;
this.labelTriggerMethodParams.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTriggerMethodParams.Location = new System.Drawing.Point(370, 128);
this.labelTriggerMethodParams.Name = "labelTriggerMethodParams";
this.labelTriggerMethodParams.Size = new System.Drawing.Size(103, 24);
this.labelTriggerMethodParams.TabIndex = 11;
this.labelTriggerMethodParams.Text = "方法参数:";
//
// textBoxTriggerMethodParams
//
this.textBoxTriggerMethodParams.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxTriggerMethodParams.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxTriggerMethodParams.Location = new System.Drawing.Point(490, 125);
this.textBoxTriggerMethodParams.Name = "textBoxTriggerMethodParams";
this.textBoxTriggerMethodParams.Size = new System.Drawing.Size(190, 30);
this.textBoxTriggerMethodParams.TabIndex = 10;
//
// labelTriggerState
//
this.labelTriggerState.AutoSize = true;
this.labelTriggerState.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTriggerState.Location = new System.Drawing.Point(370, 48);
this.labelTriggerState.Name = "labelTriggerState";
this.labelTriggerState.Size = new System.Drawing.Size(103, 24);
this.labelTriggerState.TabIndex = 3;
this.labelTriggerState.Text = "触发状态:";
//
// comboBoxTriggerState
//
this.comboBoxTriggerState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxTriggerState.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBoxTriggerState.FormattingEnabled = true;
this.comboBoxTriggerState.Location = new System.Drawing.Point(490, 45);
this.comboBoxTriggerState.Name = "comboBoxTriggerState";
this.comboBoxTriggerState.Size = new System.Drawing.Size(190, 32);
this.comboBoxTriggerState.TabIndex = 2;
//
// labelTriggerDelay
//
this.labelTriggerDelay.AutoSize = true;
this.labelTriggerDelay.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTriggerDelay.Location = new System.Drawing.Point(28, 88);
this.labelTriggerDelay.Name = "labelTriggerDelay";
this.labelTriggerDelay.Size = new System.Drawing.Size(103, 24);
this.labelTriggerDelay.TabIndex = 5;
this.labelTriggerDelay.Text = "触发延迟:";
//
// textBoxTriggerDelay
//
this.textBoxTriggerDelay.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxTriggerDelay.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxTriggerDelay.Location = new System.Drawing.Point(150, 85);
this.textBoxTriggerDelay.Name = "textBoxTriggerDelay";
this.textBoxTriggerDelay.Size = new System.Drawing.Size(200, 30);
this.textBoxTriggerDelay.TabIndex = 4;
//
// labelTriggerMethod
//
this.labelTriggerMethod.AutoSize = true;
this.labelTriggerMethod.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTriggerMethod.Location = new System.Drawing.Point(28, 128);
this.labelTriggerMethod.Name = "labelTriggerMethod";
this.labelTriggerMethod.Size = new System.Drawing.Size(103, 24);
this.labelTriggerMethod.TabIndex = 9;
this.labelTriggerMethod.Text = "触发方法:";
//
// textBoxTriggerMethod
//
this.textBoxTriggerMethod.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxTriggerMethod.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxTriggerMethod.Location = new System.Drawing.Point(150, 125);
this.textBoxTriggerMethod.Name = "textBoxTriggerMethod";
this.textBoxTriggerMethod.Size = new System.Drawing.Size(200, 30);
this.textBoxTriggerMethod.TabIndex = 8;
//
// labelTriggerMission
//
this.labelTriggerMission.AutoSize = true;
this.labelTriggerMission.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTriggerMission.Location = new System.Drawing.Point(370, 88);
this.labelTriggerMission.Name = "labelTriggerMission";
this.labelTriggerMission.Size = new System.Drawing.Size(103, 24);
this.labelTriggerMission.TabIndex = 7;
this.labelTriggerMission.Text = "触发任务:";
//
// textBoxTriggerMission
//
this.textBoxTriggerMission.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxTriggerMission.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxTriggerMission.Location = new System.Drawing.Point(490, 85);
this.textBoxTriggerMission.Name = "textBoxTriggerMission";
this.textBoxTriggerMission.Size = new System.Drawing.Size(190, 30);
this.textBoxTriggerMission.TabIndex = 6;
//
// labelButtonIndex
//
this.labelButtonIndex.AutoSize = true;
this.labelButtonIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelButtonIndex.Location = new System.Drawing.Point(28, 48);
this.labelButtonIndex.Name = "labelButtonIndex";
this.labelButtonIndex.Size = new System.Drawing.Size(65, 24);
this.labelButtonIndex.TabIndex = 1;
this.labelButtonIndex.Text = "编码:";
//
// textBoxButtonIndex
//
this.textBoxButtonIndex.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxButtonIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxButtonIndex.Location = new System.Drawing.Point(150, 45);
this.textBoxButtonIndex.Name = "textBoxButtonIndex";
this.textBoxButtonIndex.Size = new System.Drawing.Size(200, 30);
this.textBoxButtonIndex.TabIndex = 0;
//
// labelTitle
//
this.labelTitle.AutoSize = true;
this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
this.labelTitle.Location = new System.Drawing.Point(15, 12);
this.labelTitle.Name = "labelTitle";
this.labelTitle.Size = new System.Drawing.Size(150, 42);
this.labelTitle.TabIndex = 4;
this.labelTitle.Text = "按钮盒管理";
//
// ButtonBoxManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(1200, 620);
this.Controls.Add(this.labelTitle);
this.Controls.Add(this.groupBoxButton);
this.Controls.Add(this.buttonListView);
this.Controls.Add(this.groupBoxButtonBox);
this.Controls.Add(this.buttonBoxListView);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MinimumSize = new System.Drawing.Size(1200, 620);
this.Name = "ButtonBoxManager";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "按钮盒管理";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ButtonBoxManager_FormClosing);
this.Load += new System.EventHandler(this.ButtonBoxManager_Load);
this.groupBoxButtonBox.ResumeLayout(false);
this.groupBoxButtonBox.PerformLayout();
this.groupBoxButton.ResumeLayout(false);
this.groupBoxButton.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListView buttonBoxListView;
private System.Windows.Forms.ColumnHeader columnHeaderBoxIndex;
private System.Windows.Forms.ColumnHeader columnHeaderIp;
private System.Windows.Forms.ColumnHeader columnHeaderPort;
private System.Windows.Forms.ColumnHeader columnHeaderType;
private System.Windows.Forms.GroupBox groupBoxButtonBox;
private System.Windows.Forms.TextBox textBoxIp;
private System.Windows.Forms.Label labelIp;
private System.Windows.Forms.Label labelPort;
private System.Windows.Forms.TextBox textBoxPort;
private System.Windows.Forms.Label labelBoxIndex;
private System.Windows.Forms.TextBox textBoxBoxIndex;
private System.Windows.Forms.Label labelType;
private System.Windows.Forms.ComboBox comboBoxType;
private System.Windows.Forms.Button btnAddButtonBox;
private System.Windows.Forms.Button btnDeleteButtonBox;
private System.Windows.Forms.Button btnSaveButtonBox;
private System.Windows.Forms.ListView buttonListView;
private System.Windows.Forms.ColumnHeader columnHeaderButtonIndex;
private System.Windows.Forms.ColumnHeader columnHeaderTriggerMission;
private System.Windows.Forms.ColumnHeader columnHeaderTriggerMethod;
private System.Windows.Forms.ColumnHeader columnHeaderTriggerMethodParams;
private System.Windows.Forms.GroupBox groupBoxButton;
private System.Windows.Forms.Label labelButtonIndex;
private System.Windows.Forms.TextBox textBoxButtonIndex;
private System.Windows.Forms.Label labelTriggerMission;
private System.Windows.Forms.TextBox textBoxTriggerMission;
private System.Windows.Forms.Label labelTriggerMethod;
private System.Windows.Forms.TextBox textBoxTriggerMethod;
private System.Windows.Forms.Label labelTriggerMethodParams;
private System.Windows.Forms.TextBox textBoxTriggerMethodParams;
private System.Windows.Forms.Label labelTriggerState;
private System.Windows.Forms.ComboBox comboBoxTriggerState;
private System.Windows.Forms.Label labelTriggerDelay;
private System.Windows.Forms.TextBox textBoxTriggerDelay;
private System.Windows.Forms.ColumnHeader columnHeaderTriggerState;
private System.Windows.Forms.ColumnHeader columnHeaderTriggerDelay;
private System.Windows.Forms.Button btnAddButton;
private System.Windows.Forms.Button btnDeleteButton;
private System.Windows.Forms.Button btnSaveButton;
private System.Windows.Forms.Label labelTitle;
}
}
File diff suppressed because it is too large Load Diff
@@ -1,120 +0,0 @@
<?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>
</root>
@@ -6,7 +6,6 @@ using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using LessokajiWeaverUtilities.MagicAttributes;
using LessokajiWeaverUtilities.Utilities;
using SimpleLite;
@@ -768,39 +767,8 @@ namespace StandardScene.ExtendDevice.ButtonBox
[I18N.DocumentTranslation(Name = "Open Manager", locale = "en")]
public static void OpenViewer()
{
try
{
var manager = ButtonBoxManager.Instance;
// 确保窗体没有被销毁
if (manager.IsDisposed)
{
// 如果窗体被销毁,单例会自动重新创建
manager = ButtonBoxManager.Instance;
}
if (manager.Visible)
{
// 如果界面已经可见,将其激活并置于最前
if (manager.WindowState == FormWindowState.Minimized)
{
manager.WindowState = FormWindowState.Normal;
}
manager.Activate();
manager.BringToFront();
}
else
{
// 如果界面不可见,显示它
manager.Show();
manager.Activate();
}
}
catch (Exception ex)
{
MessageBox.Show($"打开按钮盒管理界面失败: {ex.Message}", "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try { ButtonBoxManager.Open(); }
catch (Exception ex) { CycleUiHelper.Alert("错误", $"打开按钮盒管理界面失败: {ex.Message}"); }
}
}
}
@@ -1,521 +0,0 @@
namespace StandardScene.ExtendDevice.Door
{
partial class DoorManager
{
/// <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.doorControllerListView = new System.Windows.Forms.ListView();
this.columnHeaderControllerIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderIp = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderPort = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBoxController = new System.Windows.Forms.GroupBox();
this.btnSaveController = new System.Windows.Forms.Button();
this.btnDeleteController = new System.Windows.Forms.Button();
this.btnAddController = new System.Windows.Forms.Button();
this.labelType = new System.Windows.Forms.Label();
this.comboBoxType = new System.Windows.Forms.ComboBox();
this.labelControllerIndex = new System.Windows.Forms.Label();
this.textBoxControllerIndex = new System.Windows.Forms.TextBox();
this.labelPort = new System.Windows.Forms.Label();
this.textBoxPort = new System.Windows.Forms.TextBox();
this.labelIp = new System.Windows.Forms.Label();
this.textBoxIp = new System.Windows.Forms.TextBox();
this.doorListView = new System.Windows.Forms.ListView();
this.columnHeaderDoorIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderControlAddress = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderOpenStatusAddress = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBoxDoor = new System.Windows.Forms.GroupBox();
this.btnSaveDoor = new System.Windows.Forms.Button();
this.btnDeleteDoor = new System.Windows.Forms.Button();
this.btnAddDoor = new System.Windows.Forms.Button();
this.labelOpenStatusAddress = new System.Windows.Forms.Label();
this.textBoxOpenStatusAddress = new System.Windows.Forms.TextBox();
this.labelControlAddress = new System.Windows.Forms.Label();
this.textBoxControlAddress = new System.Windows.Forms.TextBox();
this.labelDoorIndex = new System.Windows.Forms.Label();
this.textBoxDoorIndex = new System.Windows.Forms.TextBox();
this.labelTitle = new System.Windows.Forms.Label();
this.groupBoxController.SuspendLayout();
this.groupBoxDoor.SuspendLayout();
this.SuspendLayout();
//
// doorControllerListView
//
this.doorControllerListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.doorControllerListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.doorControllerListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeaderControllerIndex,
this.columnHeaderIp,
this.columnHeaderPort,
this.columnHeaderType});
this.doorControllerListView.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.doorControllerListView.FullRowSelect = true;
this.doorControllerListView.GridLines = true;
this.doorControllerListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.doorControllerListView.HideSelection = false;
this.doorControllerListView.Location = new System.Drawing.Point(15, 55);
this.doorControllerListView.MultiSelect = false;
this.doorControllerListView.Name = "doorControllerListView";
this.doorControllerListView.OwnerDraw = true;
this.doorControllerListView.Size = new System.Drawing.Size(450, 290);
this.doorControllerListView.TabIndex = 0;
this.doorControllerListView.UseCompatibleStateImageBehavior = false;
this.doorControllerListView.View = System.Windows.Forms.View.Details;
this.doorControllerListView.SelectedIndexChanged += new System.EventHandler(this.doorControllerListView_SelectedIndexChanged);
//
// columnHeaderControllerIndex
//
this.columnHeaderControllerIndex.Text = "编码";
this.columnHeaderControllerIndex.Width = 70;
//
// columnHeaderIp
//
this.columnHeaderIp.Text = "IP地址";
this.columnHeaderIp.Width = 130;
//
// columnHeaderPort
//
this.columnHeaderPort.Text = "端口";
this.columnHeaderPort.Width = 90;
//
// columnHeaderType
//
this.columnHeaderType.Text = "类型";
this.columnHeaderType.Width = 140;
//
// groupBoxController
//
this.groupBoxController.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.groupBoxController.Controls.Add(this.btnSaveController);
this.groupBoxController.Controls.Add(this.btnDeleteController);
this.groupBoxController.Controls.Add(this.btnAddController);
this.groupBoxController.Controls.Add(this.labelType);
this.groupBoxController.Controls.Add(this.comboBoxType);
this.groupBoxController.Controls.Add(this.labelControllerIndex);
this.groupBoxController.Controls.Add(this.textBoxControllerIndex);
this.groupBoxController.Controls.Add(this.labelPort);
this.groupBoxController.Controls.Add(this.textBoxPort);
this.groupBoxController.Controls.Add(this.labelIp);
this.groupBoxController.Controls.Add(this.textBoxIp);
this.groupBoxController.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBoxController.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
this.groupBoxController.Location = new System.Drawing.Point(15, 360);
this.groupBoxController.Name = "groupBoxController";
this.groupBoxController.Padding = new System.Windows.Forms.Padding(12, 10, 12, 12);
this.groupBoxController.Size = new System.Drawing.Size(450, 250);
this.groupBoxController.TabIndex = 1;
this.groupBoxController.TabStop = false;
this.groupBoxController.Text = "门控制器信息";
//
// btnSaveController
//
this.btnSaveController.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204)))));
this.btnSaveController.FlatAppearance.BorderSize = 0;
this.btnSaveController.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(92)))), ((int)(((byte)(153)))));
this.btnSaveController.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(102)))), ((int)(((byte)(170)))));
this.btnSaveController.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveController.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveController.ForeColor = System.Drawing.Color.White;
this.btnSaveController.Location = new System.Drawing.Point(330, 200);
this.btnSaveController.Name = "btnSaveController";
this.btnSaveController.Size = new System.Drawing.Size(100, 38);
this.btnSaveController.TabIndex = 10;
this.btnSaveController.Text = "保存";
this.btnSaveController.UseVisualStyleBackColor = false;
this.btnSaveController.Click += new System.EventHandler(this.btnSaveController_Click);
//
// btnDeleteController
//
this.btnDeleteController.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69)))));
this.btnDeleteController.FlatAppearance.BorderSize = 0;
this.btnDeleteController.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(165)))), ((int)(((byte)(40)))), ((int)(((byte)(52)))));
this.btnDeleteController.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(187)))), ((int)(((byte)(45)))), ((int)(((byte)(59)))));
this.btnDeleteController.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDeleteController.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDeleteController.ForeColor = System.Drawing.Color.White;
this.btnDeleteController.Location = new System.Drawing.Point(220, 200);
this.btnDeleteController.Name = "btnDeleteController";
this.btnDeleteController.Size = new System.Drawing.Size(100, 38);
this.btnDeleteController.TabIndex = 9;
this.btnDeleteController.Text = "删除";
this.btnDeleteController.UseVisualStyleBackColor = false;
this.btnDeleteController.Click += new System.EventHandler(this.btnDeleteController_Click);
//
// btnAddController
//
this.btnAddController.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(167)))), ((int)(((byte)(69)))));
this.btnAddController.FlatAppearance.BorderSize = 0;
this.btnAddController.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(125)))), ((int)(((byte)(52)))));
this.btnAddController.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56)))));
this.btnAddController.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAddController.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddController.ForeColor = System.Drawing.Color.White;
this.btnAddController.Location = new System.Drawing.Point(110, 200);
this.btnAddController.Name = "btnAddController";
this.btnAddController.Size = new System.Drawing.Size(100, 38);
this.btnAddController.TabIndex = 8;
this.btnAddController.Text = "添加";
this.btnAddController.UseVisualStyleBackColor = false;
this.btnAddController.Click += new System.EventHandler(this.btnAddController_Click);
//
// labelType
//
this.labelType.AutoSize = true;
this.labelType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelType.Location = new System.Drawing.Point(28, 168);
this.labelType.Name = "labelType";
this.labelType.Size = new System.Drawing.Size(65, 24);
this.labelType.TabIndex = 7;
this.labelType.Text = "类型:";
//
// comboBoxType
//
this.comboBoxType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBoxType.FormattingEnabled = true;
this.comboBoxType.Location = new System.Drawing.Point(110, 165);
this.comboBoxType.Name = "comboBoxType";
this.comboBoxType.Size = new System.Drawing.Size(320, 32);
this.comboBoxType.TabIndex = 6;
//
// labelControllerIndex
//
this.labelControllerIndex.AutoSize = true;
this.labelControllerIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelControllerIndex.Location = new System.Drawing.Point(28, 48);
this.labelControllerIndex.Name = "labelControllerIndex";
this.labelControllerIndex.Size = new System.Drawing.Size(65, 24);
this.labelControllerIndex.TabIndex = 1;
this.labelControllerIndex.Text = "编码:";
//
// textBoxControllerIndex
//
this.textBoxControllerIndex.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxControllerIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxControllerIndex.Location = new System.Drawing.Point(110, 45);
this.textBoxControllerIndex.Name = "textBoxControllerIndex";
this.textBoxControllerIndex.Size = new System.Drawing.Size(320, 30);
this.textBoxControllerIndex.TabIndex = 0;
//
// labelIp
//
this.labelIp.AutoSize = true;
this.labelIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelIp.Location = new System.Drawing.Point(18, 88);
this.labelIp.Name = "labelIp";
this.labelIp.Size = new System.Drawing.Size(85, 24);
this.labelIp.TabIndex = 3;
this.labelIp.Text = "IP地址:";
//
// textBoxIp
//
this.textBoxIp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxIp.Location = new System.Drawing.Point(110, 85);
this.textBoxIp.Name = "textBoxIp";
this.textBoxIp.Size = new System.Drawing.Size(320, 30);
this.textBoxIp.TabIndex = 2;
this.textBoxIp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
//
// labelPort
//
this.labelPort.AutoSize = true;
this.labelPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelPort.Location = new System.Drawing.Point(28, 128);
this.labelPort.Name = "labelPort";
this.labelPort.Size = new System.Drawing.Size(65, 24);
this.labelPort.TabIndex = 5;
this.labelPort.Text = "端口:";
//
// textBoxPort
//
this.textBoxPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxPort.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxPort.Location = new System.Drawing.Point(110, 125);
this.textBoxPort.Name = "textBoxPort";
this.textBoxPort.Size = new System.Drawing.Size(320, 30);
this.textBoxPort.TabIndex = 4;
//
// doorListView
//
this.doorListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.doorListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.doorListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeaderDoorIndex,
this.columnHeaderControlAddress,
this.columnHeaderOpenStatusAddress});
this.doorListView.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.doorListView.FullRowSelect = true;
this.doorListView.GridLines = true;
this.doorListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.doorListView.HideSelection = false;
this.doorListView.Location = new System.Drawing.Point(483, 55);
this.doorListView.MultiSelect = false;
this.doorListView.Name = "doorListView";
this.doorListView.OwnerDraw = true;
this.doorListView.Size = new System.Drawing.Size(500, 290);
this.doorListView.TabIndex = 2;
this.doorListView.UseCompatibleStateImageBehavior = false;
this.doorListView.View = System.Windows.Forms.View.Details;
this.doorListView.SelectedIndexChanged += new System.EventHandler(this.doorListView_SelectedIndexChanged);
//
// columnHeaderDoorIndex
//
this.columnHeaderDoorIndex.Text = "编码";
this.columnHeaderDoorIndex.Width = 100;
//
// columnHeaderControlAddress
//
this.columnHeaderControlAddress.Text = "控制地址";
this.columnHeaderControlAddress.Width = 180;
//
// columnHeaderOpenStatusAddress
//
this.columnHeaderOpenStatusAddress.Text = "开到位地址";
this.columnHeaderOpenStatusAddress.Width = 180;
//
// groupBoxDoor
//
this.groupBoxDoor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBoxNoControl = new System.Windows.Forms.CheckBox();
this.groupBoxDoor.Controls.Add(this.checkBoxNoControl);
this.groupBoxDoor.Controls.Add(this.btnSaveDoor);
this.groupBoxDoor.Controls.Add(this.btnDeleteDoor);
this.groupBoxDoor.Controls.Add(this.btnAddDoor);
this.groupBoxDoor.Controls.Add(this.labelOpenStatusAddress);
this.groupBoxDoor.Controls.Add(this.textBoxOpenStatusAddress);
this.groupBoxDoor.Controls.Add(this.labelControlAddress);
this.groupBoxDoor.Controls.Add(this.textBoxControlAddress);
this.groupBoxDoor.Controls.Add(this.labelDoorIndex);
this.groupBoxDoor.Controls.Add(this.textBoxDoorIndex);
this.groupBoxDoor.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBoxDoor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
this.groupBoxDoor.Location = new System.Drawing.Point(483, 360);
this.groupBoxDoor.Name = "groupBoxDoor";
this.groupBoxDoor.Padding = new System.Windows.Forms.Padding(12, 10, 12, 12);
this.groupBoxDoor.Size = new System.Drawing.Size(500, 250);
this.groupBoxDoor.TabIndex = 3;
this.groupBoxDoor.TabStop = false;
this.groupBoxDoor.Text = "门信息";
//
// btnSaveDoor
//
this.btnSaveDoor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(122)))), ((int)(((byte)(204)))));
this.btnSaveDoor.FlatAppearance.BorderSize = 0;
this.btnSaveDoor.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(92)))), ((int)(((byte)(153)))));
this.btnSaveDoor.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(102)))), ((int)(((byte)(170)))));
this.btnSaveDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSaveDoor.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveDoor.ForeColor = System.Drawing.Color.White;
this.btnSaveDoor.Location = new System.Drawing.Point(380, 200);
this.btnSaveDoor.Name = "btnSaveDoor";
this.btnSaveDoor.Size = new System.Drawing.Size(100, 38);
this.btnSaveDoor.TabIndex = 7;
this.btnSaveDoor.Text = "保存";
this.btnSaveDoor.UseVisualStyleBackColor = false;
this.btnSaveDoor.Click += new System.EventHandler(this.btnSaveDoor_Click);
//
// btnDeleteDoor
//
this.btnDeleteDoor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69)))));
this.btnDeleteDoor.FlatAppearance.BorderSize = 0;
this.btnDeleteDoor.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(165)))), ((int)(((byte)(40)))), ((int)(((byte)(52)))));
this.btnDeleteDoor.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(187)))), ((int)(((byte)(45)))), ((int)(((byte)(59)))));
this.btnDeleteDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDeleteDoor.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDeleteDoor.ForeColor = System.Drawing.Color.White;
this.btnDeleteDoor.Location = new System.Drawing.Point(270, 200);
this.btnDeleteDoor.Name = "btnDeleteDoor";
this.btnDeleteDoor.Size = new System.Drawing.Size(100, 38);
this.btnDeleteDoor.TabIndex = 6;
this.btnDeleteDoor.Text = "删除";
this.btnDeleteDoor.UseVisualStyleBackColor = false;
this.btnDeleteDoor.Click += new System.EventHandler(this.btnDeleteDoor_Click);
//
// btnAddDoor
//
this.btnAddDoor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(167)))), ((int)(((byte)(69)))));
this.btnAddDoor.FlatAppearance.BorderSize = 0;
this.btnAddDoor.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(125)))), ((int)(((byte)(52)))));
this.btnAddDoor.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56)))));
this.btnAddDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAddDoor.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAddDoor.ForeColor = System.Drawing.Color.White;
this.btnAddDoor.Location = new System.Drawing.Point(160, 200);
this.btnAddDoor.Name = "btnAddDoor";
this.btnAddDoor.Size = new System.Drawing.Size(100, 38);
this.btnAddDoor.TabIndex = 5;
this.btnAddDoor.Text = "添加";
this.btnAddDoor.UseVisualStyleBackColor = false;
this.btnAddDoor.Click += new System.EventHandler(this.btnAddDoor_Click);
//
// labelOpenStatusAddress
//
this.labelOpenStatusAddress.AutoSize = true;
this.labelOpenStatusAddress.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelOpenStatusAddress.Location = new System.Drawing.Point(18, 128);
this.labelOpenStatusAddress.Name = "labelOpenStatusAddress";
this.labelOpenStatusAddress.Size = new System.Drawing.Size(103, 24);
this.labelOpenStatusAddress.TabIndex = 4;
this.labelOpenStatusAddress.Text = "开到位地址:";
//
// textBoxOpenStatusAddress
//
this.textBoxOpenStatusAddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxOpenStatusAddress.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxOpenStatusAddress.Location = new System.Drawing.Point(150, 125);
this.textBoxOpenStatusAddress.Name = "textBoxOpenStatusAddress";
this.textBoxOpenStatusAddress.Size = new System.Drawing.Size(330, 30);
this.textBoxOpenStatusAddress.TabIndex = 3;
//
// checkBoxNoControl
//
this.checkBoxNoControl.AutoSize = true;
this.checkBoxNoControl.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBoxNoControl.Location = new System.Drawing.Point(150, 165);
this.checkBoxNoControl.Name = "checkBoxNoControl";
this.checkBoxNoControl.Size = new System.Drawing.Size(162, 28);
this.checkBoxNoControl.TabIndex = 4;
this.checkBoxNoControl.Text = "禁止门控发送指令";
this.checkBoxNoControl.UseVisualStyleBackColor = true;
//
// labelControlAddress
//
this.labelControlAddress.AutoSize = true;
this.labelControlAddress.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelControlAddress.Location = new System.Drawing.Point(18, 88);
this.labelControlAddress.Name = "labelControlAddress";
this.labelControlAddress.Size = new System.Drawing.Size(103, 24);
this.labelControlAddress.TabIndex = 2;
this.labelControlAddress.Text = "控制地址:";
//
// textBoxControlAddress
//
this.textBoxControlAddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxControlAddress.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxControlAddress.Location = new System.Drawing.Point(150, 85);
this.textBoxControlAddress.Name = "textBoxControlAddress";
this.textBoxControlAddress.Size = new System.Drawing.Size(330, 30);
this.textBoxControlAddress.TabIndex = 1;
//
// labelDoorIndex
//
this.labelDoorIndex.AutoSize = true;
this.labelDoorIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelDoorIndex.Location = new System.Drawing.Point(28, 48);
this.labelDoorIndex.Name = "labelDoorIndex";
this.labelDoorIndex.Size = new System.Drawing.Size(65, 24);
this.labelDoorIndex.TabIndex = 0;
this.labelDoorIndex.Text = "编码:";
//
// textBoxDoorIndex
//
this.textBoxDoorIndex.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxDoorIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxDoorIndex.Location = new System.Drawing.Point(150, 45);
this.textBoxDoorIndex.Name = "textBoxDoorIndex";
this.textBoxDoorIndex.Size = new System.Drawing.Size(330, 30);
this.textBoxDoorIndex.TabIndex = 0;
//
// labelTitle
//
this.labelTitle.AutoSize = true;
this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
this.labelTitle.Location = new System.Drawing.Point(15, 12);
this.labelTitle.Name = "labelTitle";
this.labelTitle.Size = new System.Drawing.Size(150, 42);
this.labelTitle.TabIndex = 4;
this.labelTitle.Text = "门控制器管理";
//
// DoorManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(1000, 620);
this.Controls.Add(this.labelTitle);
this.Controls.Add(this.groupBoxDoor);
this.Controls.Add(this.doorListView);
this.Controls.Add(this.groupBoxController);
this.Controls.Add(this.doorControllerListView);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MinimumSize = new System.Drawing.Size(1000, 620);
this.Name = "DoorManager";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "门控制器管理";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DoorManager_FormClosing);
this.Load += new System.EventHandler(this.DoorManager_Load);
this.groupBoxController.ResumeLayout(false);
this.groupBoxController.PerformLayout();
this.groupBoxDoor.ResumeLayout(false);
this.groupBoxDoor.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListView doorControllerListView;
private System.Windows.Forms.ColumnHeader columnHeaderControllerIndex;
private System.Windows.Forms.ColumnHeader columnHeaderIp;
private System.Windows.Forms.ColumnHeader columnHeaderPort;
private System.Windows.Forms.ColumnHeader columnHeaderType;
private System.Windows.Forms.GroupBox groupBoxController;
private System.Windows.Forms.TextBox textBoxIp;
private System.Windows.Forms.Label labelIp;
private System.Windows.Forms.Label labelPort;
private System.Windows.Forms.TextBox textBoxPort;
private System.Windows.Forms.Label labelControllerIndex;
private System.Windows.Forms.TextBox textBoxControllerIndex;
private System.Windows.Forms.Label labelType;
private System.Windows.Forms.ComboBox comboBoxType;
private System.Windows.Forms.Button btnAddController;
private System.Windows.Forms.Button btnDeleteController;
private System.Windows.Forms.Button btnSaveController;
private System.Windows.Forms.ListView doorListView;
private System.Windows.Forms.ColumnHeader columnHeaderDoorIndex;
private System.Windows.Forms.ColumnHeader columnHeaderControlAddress;
private System.Windows.Forms.ColumnHeader columnHeaderOpenStatusAddress;
private System.Windows.Forms.GroupBox groupBoxDoor;
private System.Windows.Forms.Label labelDoorIndex;
private System.Windows.Forms.TextBox textBoxDoorIndex;
private System.Windows.Forms.Label labelControlAddress;
private System.Windows.Forms.TextBox textBoxControlAddress;
private System.Windows.Forms.Label labelOpenStatusAddress;
private System.Windows.Forms.TextBox textBoxOpenStatusAddress;
private System.Windows.Forms.Button btnAddDoor;
private System.Windows.Forms.Button btnDeleteDoor;
private System.Windows.Forms.Button btnSaveDoor;
private System.Windows.Forms.Label labelTitle;
private System.Windows.Forms.CheckBox checkBoxNoControl;
}
}
File diff suppressed because it is too large Load Diff
@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<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="timerRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -1013,29 +1013,11 @@ namespace StandardScene.ExtendDevice.Door
{
try
{
var monitor = DoorMonitor.Instance;
if (monitor.Visible)
{
if (monitor.WindowState == System.Windows.Forms.FormWindowState.Minimized)
{
monitor.WindowState = System.Windows.Forms.FormWindowState.Normal;
}
monitor.Activate();
monitor.BringToFront();
}
else
{
monitor.Show();
monitor.Activate();
}
monitor.EnsureRefreshActive();
DoorMonitor.Open();
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show($"打开门控监控界面失败: {ex.Message}", "错误",
System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
CycleUiHelper.Alert("错误", $"打开门控监控界面失败: {ex.Message}");
}
}
}
@@ -1,263 +0,0 @@
namespace StandardScene.ExtendDevice.Door
{
partial class DoorMonitor
{
/// <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.doorListView = new System.Windows.Forms.ListView();
this.columnHeaderControllerIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderDoorIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderState = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderTarget = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderSource = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderManualRemain = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderCarsInArea = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderControlAddress = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderOpenStatusAddress = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBoxControl = new System.Windows.Forms.GroupBox();
this.btnClose = new System.Windows.Forms.Button();
this.btnOpen = new System.Windows.Forms.Button();
this.btnClearCars = new System.Windows.Forms.Button();
this.labelDoorInfo = new System.Windows.Forms.Label();
this.labelTitle = new System.Windows.Forms.Label();
this.timerRefresh = new System.Windows.Forms.Timer();
this.groupBoxControl.SuspendLayout();
this.SuspendLayout();
//
// doorListView
//
this.doorListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.doorListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.doorListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeaderControllerIndex,
this.columnHeaderDoorIndex,
this.columnHeaderState,
this.columnHeaderTarget,
this.columnHeaderSource,
this.columnHeaderManualRemain,
this.columnHeaderCarsInArea,
this.columnHeaderControlAddress,
this.columnHeaderOpenStatusAddress});
this.doorListView.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.doorListView.FullRowSelect = true;
this.doorListView.GridLines = true;
this.doorListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.doorListView.HideSelection = false;
this.doorListView.Location = new System.Drawing.Point(15, 55);
this.doorListView.MultiSelect = false;
this.doorListView.Name = "doorListView";
this.doorListView.OwnerDraw = true;
this.doorListView.Size = new System.Drawing.Size(800, 400);
this.doorListView.TabIndex = 0;
this.doorListView.UseCompatibleStateImageBehavior = false;
this.doorListView.View = System.Windows.Forms.View.Details;
this.doorListView.SelectedIndexChanged += new System.EventHandler(this.doorListView_SelectedIndexChanged);
//
// columnHeaderControllerIndex
//
this.columnHeaderControllerIndex.Text = "控制器编码";
this.columnHeaderControllerIndex.Width = 120;
//
// columnHeaderDoorIndex
//
this.columnHeaderDoorIndex.Text = "门编码";
this.columnHeaderDoorIndex.Width = 100;
//
// columnHeaderState
//
this.columnHeaderState.Text = "状态";
this.columnHeaderState.Width = 100;
//
// columnHeaderTarget
//
this.columnHeaderTarget.Text = "控制目标";
this.columnHeaderTarget.Width = 100;
//
// columnHeaderSource
//
this.columnHeaderSource.Text = "控制来源";
this.columnHeaderSource.Width = 100;
//
// columnHeaderManualRemain
//
this.columnHeaderManualRemain.Text = "手动剩余(s)";
this.columnHeaderManualRemain.Width = 110;
//
// columnHeaderCarsInArea
//
this.columnHeaderCarsInArea.Text = "车辆占用";
this.columnHeaderCarsInArea.Width = 150;
//
// columnHeaderControlAddress
//
this.columnHeaderControlAddress.Text = "控制地址";
this.columnHeaderControlAddress.Width = 120;
//
// columnHeaderOpenStatusAddress
//
this.columnHeaderOpenStatusAddress.Text = "开到位地址";
this.columnHeaderOpenStatusAddress.Width = 120;
//
// groupBoxControl
//
this.groupBoxControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxControl.Controls.Add(this.btnClose);
this.groupBoxControl.Controls.Add(this.btnOpen);
this.groupBoxControl.Controls.Add(this.btnClearCars);
this.groupBoxControl.Controls.Add(this.labelDoorInfo);
this.groupBoxControl.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBoxControl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
this.groupBoxControl.Location = new System.Drawing.Point(15, 470);
this.groupBoxControl.Name = "groupBoxControl";
this.groupBoxControl.Padding = new System.Windows.Forms.Padding(12, 10, 12, 12);
this.groupBoxControl.Size = new System.Drawing.Size(800, 120);
this.groupBoxControl.TabIndex = 1;
this.groupBoxControl.TabStop = false;
this.groupBoxControl.Text = "手动控制";
//
// btnClose
//
this.btnClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(53)))), ((int)(((byte)(69)))));
this.btnClose.FlatAppearance.BorderSize = 0;
this.btnClose.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(165)))), ((int)(((byte)(40)))), ((int)(((byte)(52)))));
this.btnClose.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(187)))), ((int)(((byte)(45)))), ((int)(((byte)(59)))));
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.ForeColor = System.Drawing.Color.White;
this.btnClose.Location = new System.Drawing.Point(450, 50);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(120, 50);
this.btnClose.TabIndex = 2;
this.btnClose.Text = "关闭";
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnOpen
//
this.btnOpen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(167)))), ((int)(((byte)(69)))));
this.btnOpen.FlatAppearance.BorderSize = 0;
this.btnOpen.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(125)))), ((int)(((byte)(52)))));
this.btnOpen.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(136)))), ((int)(((byte)(56)))));
this.btnOpen.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpen.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpen.ForeColor = System.Drawing.Color.White;
this.btnOpen.Location = new System.Drawing.Point(300, 50);
this.btnOpen.Name = "btnOpen";
this.btnOpen.Size = new System.Drawing.Size(120, 50);
this.btnOpen.TabIndex = 1;
this.btnOpen.Text = "打开";
this.btnOpen.UseVisualStyleBackColor = false;
this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
//
// btnClearCars
//
this.btnClearCars.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(108)))), ((int)(((byte)(117)))), ((int)(((byte)(125)))));
this.btnClearCars.FlatAppearance.BorderSize = 0;
this.btnClearCars.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearCars.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearCars.ForeColor = System.Drawing.Color.White;
this.btnClearCars.Location = new System.Drawing.Point(600, 50);
this.btnClearCars.Name = "btnClearCars";
this.btnClearCars.Size = new System.Drawing.Size(140, 50);
this.btnClearCars.TabIndex = 3;
this.btnClearCars.Text = "清空占用";
this.btnClearCars.UseVisualStyleBackColor = false;
this.btnClearCars.Click += new System.EventHandler(this.btnClearCars_Click);
//
// labelDoorInfo
//
this.labelDoorInfo.AutoSize = true;
this.labelDoorInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelDoorInfo.Location = new System.Drawing.Point(20, 35);
this.labelDoorInfo.Name = "labelDoorInfo";
this.labelDoorInfo.Size = new System.Drawing.Size(200, 24);
this.labelDoorInfo.TabIndex = 0;
this.labelDoorInfo.Text = "请选择要控制的门";
//
// labelTitle
//
this.labelTitle.AutoSize = true;
this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labelTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
this.labelTitle.Location = new System.Drawing.Point(15, 12);
this.labelTitle.Name = "labelTitle";
this.labelTitle.Size = new System.Drawing.Size(150, 42);
this.labelTitle.TabIndex = 2;
this.labelTitle.Text = "门控监控";
//
// timerRefresh
//
this.timerRefresh.Interval = 1000;
this.timerRefresh.Tick += new System.EventHandler(this.timerRefresh_Tick);
//
// DoorMonitor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(830, 600);
this.Controls.Add(this.labelTitle);
this.Controls.Add(this.groupBoxControl);
this.Controls.Add(this.doorListView);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MinimumSize = new System.Drawing.Size(830, 600);
this.Name = "DoorMonitor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "门控监控";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DoorMonitor_FormClosing);
this.Load += new System.EventHandler(this.DoorMonitor_Load);
this.groupBoxControl.ResumeLayout(false);
this.groupBoxControl.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListView doorListView;
private System.Windows.Forms.ColumnHeader columnHeaderControllerIndex;
private System.Windows.Forms.ColumnHeader columnHeaderDoorIndex;
private System.Windows.Forms.ColumnHeader columnHeaderState;
private System.Windows.Forms.ColumnHeader columnHeaderTarget;
private System.Windows.Forms.ColumnHeader columnHeaderSource;
private System.Windows.Forms.ColumnHeader columnHeaderManualRemain;
private System.Windows.Forms.ColumnHeader columnHeaderCarsInArea;
private System.Windows.Forms.ColumnHeader columnHeaderControlAddress;
private System.Windows.Forms.ColumnHeader columnHeaderOpenStatusAddress;
private System.Windows.Forms.GroupBox groupBoxControl;
private System.Windows.Forms.Label labelDoorInfo;
private System.Windows.Forms.Button btnOpen;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnClearCars;
private System.Windows.Forms.Label labelTitle;
private System.Windows.Forms.Timer timerRefresh;
}
}
@@ -2,445 +2,241 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using CycleGUI;
using SimpleLite;
using StandardScene.Utils;
namespace StandardScene.ExtendDevice.Door
{
public partial class DoorMonitor : Form
/// <summary>
/// 门控监控界面(CycleGUI 版,替代原 WinForms <c>DoorMonitor</c> 窗体)。
/// <list type="bullet">
/// <item>单实例:再次打开则把已有面板置前。</item>
/// <item><c>pb.Table</c> 展示门列表,单击行选中以进行手动控制。</item>
/// <item>约每 500ms 重绘刷新门状态快照(替代 WinForms 定时器)。</item>
/// </list>
/// </summary>
public class DoorMonitor
{
private static DoorMonitor _instance = null;
private static readonly object _lock = new object();
private const string TableId = "door-monitor-list";
private int _doorHoverIndex = -1;
private (int ControllerIndex, int DoorIndex)? _selectedDoor = null;
private static readonly Color SelectedRowColor = Color.FromArgb(230, 240, 255);
private static readonly Color RowEvenColor = Color.FromArgb(250, 250, 252);
private static readonly Color RowOddColor = Color.White;
private static readonly Color RowHighlightColor = Color.FromArgb(230, 240, 255);
private static readonly Color TextRegularColor = Color.FromArgb(68, 68, 68);
private static readonly Color TextHighlightColor = Color.FromArgb(51, 51, 51);
private static readonly Color StateOpenColor = Color.FromArgb(40, 167, 69);
private static readonly Color StateClosedColor = Color.FromArgb(220, 53, 69);
private static Panel _panel;
private static (int ControllerIndex, int DoorIndex)? _selectedDoor;
/// <summary>
/// 获取单例实例
/// </summary>
public static DoorMonitor Instance
/// <summary>打开(或置前)门控监控面板。</summary>
public static void Open()
{
get
if (_panel != null)
{
if (_instance == null || _instance.IsDisposed)
try
{
lock (_lock)
{
if (_instance == null || _instance.IsDisposed)
{
_instance = new DoorMonitor();
}
}
_panel.BringToFront();
return;
}
return _instance;
}
}
/// <summary>
/// 私有构造函数,确保单例模式
/// </summary>
private DoorMonitor()
{
InitializeComponent();
}
/// <summary>
/// 确保刷新定时器处于激活状态,并立即刷新一次
/// </summary>
public void EnsureRefreshActive()
{
if (IsDisposed)
{
return;
}
if (!timerRefresh.Enabled)
{
timerRefresh.Start();
}
RefreshDoorList();
}
private void DoorMonitor_Load(object sender, EventArgs e)
{
SetupListViewStyles();
// 禁用系统的悬停/热跟踪高亮,避免鼠标移动时短暂出现默认遮罩
doorListView.HoverSelection = false;
doorListView.HotTracking = false;
EnsureRefreshActive();
}
/// <summary>
/// 设置ListView的视觉样式
/// </summary>
private void SetupListViewStyles()
{
doorListView.OwnerDraw = true;
doorListView.BackColor = Color.White;
doorListView.DrawItem += DoorListView_DrawItem;
doorListView.DrawSubItem += DoorListView_DrawSubItem;
doorListView.DrawColumnHeader += DoorListView_DrawColumnHeader;
doorListView.MouseMove += DoorListView_MouseMove;
doorListView.MouseLeave += DoorListView_MouseLeave;
// 启用双缓冲
typeof(Control)?.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic)?
.SetValue(doorListView, true, null);
}
private void DoorListView_MouseMove(object sender, MouseEventArgs e)
{
var hoveredItem = doorListView.GetItemAt(e.X, e.Y);
int newIndex = hoveredItem?.Index ?? -1;
if (_doorHoverIndex != newIndex)
{
_doorHoverIndex = newIndex;
doorListView.Invalidate();
}
}
private void DoorListView_MouseLeave(object sender, EventArgs e)
{
if (_doorHoverIndex != -1)
{
_doorHoverIndex = -1;
doorListView.Invalidate();
}
}
private void DoorListView_DrawItem(object sender, DrawListViewItemEventArgs e)
{
var isHighlighted = e.Item.Selected
|| e.ItemIndex == _doorHoverIndex
|| (doorListView.Focused && (e.State & ListViewItemStates.Focused) != 0);
var backColor = isHighlighted
? RowHighlightColor
: (e.ItemIndex % 2 == 0 ? RowEvenColor : RowOddColor);
using (var brush = new SolidBrush(backColor))
{
e.Graphics.FillRectangle(brush, e.Bounds);
}
var textColor = isHighlighted ? TextHighlightColor : TextRegularColor;
TextRenderer.DrawText(e.Graphics, e.Item.Text, e.Item.Font, e.Bounds,
textColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Left | TextFormatFlags.EndEllipsis);
e.DrawFocusRectangle();
}
private void DoorListView_DrawSubItem(object sender, DrawListViewSubItemEventArgs e)
{
var isHighlighted = e.Item.Selected
|| e.ItemIndex == _doorHoverIndex
|| (doorListView.Focused && (e.ItemState & ListViewItemStates.Focused) != 0);
var backColor = isHighlighted
? RowHighlightColor
: (e.ItemIndex % 2 == 0 ? RowEvenColor : RowOddColor);
using (var brush = new SolidBrush(backColor))
{
e.Graphics.FillRectangle(brush, e.Bounds);
}
Color textColor = TextRegularColor;
// 如果是状态列,根据状态设置颜色
if (e.ColumnIndex == 2) // 状态列
{
var stateText = e.SubItem.Text;
if (stateText == "打开")
catch
{
textColor = StateOpenColor;
}
else if (stateText == "关闭")
{
textColor = StateClosedColor;
}
}
// 如果是目标控制列,按目标状态着色
else if (e.ColumnIndex == 3) // 控制目标列
{
var targetText = e.SubItem.Text;
if (targetText == "开")
{
textColor = StateOpenColor;
}
else
{
textColor = StateClosedColor;
}
}
// 其他列使用默认颜色
else
{
textColor = isHighlighted ? TextHighlightColor : TextRegularColor;
}
TextRenderer.DrawText(e.Graphics, e.SubItem.Text, e.SubItem.Font, e.Bounds,
textColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Left | TextFormatFlags.EndEllipsis);
}
private void DoorListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
{
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(245, 247, 250)), e.Bounds);
e.Graphics.DrawLine(new Pen(Color.FromArgb(220, 220, 220)),
e.Bounds.Left, e.Bounds.Bottom - 1, e.Bounds.Right, e.Bounds.Bottom - 1);
TextRenderer.DrawText(e.Graphics, e.Header.Text,
new Font("微软雅黑", 10.5F, FontStyle.Bold),
e.Bounds, Color.FromArgb(68, 68, 68),
TextFormatFlags.VerticalCenter | TextFormatFlags.Left | TextFormatFlags.HorizontalCenter);
}
/// <summary>
/// 刷新门列表
/// </summary>
private void RefreshDoorList()
{
doorListView.Items.Clear();
// 保存当前选中的门
(int ControllerIndex, int DoorIndex)? previousSelected = _selectedDoor;
_selectedDoor = null;
labelDoorInfo.Text = "请选择要控制的门";
// 获取所有门控制器
var mission = SimpleProject.proj?.Missions?.OfType<DoorMission>().FirstOrDefault();
if (mission == null)
{
return;
}
var doorSnapshot = mission.GetDoorMonitorSnapshot();
if (doorSnapshot.Count == 0)
{
return;
}
ListViewItem selectedItem = null;
foreach (var door in doorSnapshot)
{
var stateText = door.State == DoorState.Open ? "打开" : door.State == DoorState.Closed ? "关闭" : "未知";
var targetText = door.Target ? "开" : "关";
var sourceText = door.Source == DoorMission.ControlSource.Manual ? "手动" : "自动";
var remainText = door.Source == DoorMission.ControlSource.Manual && door.ManualRemainingSeconds.HasValue
? Math.Ceiling(door.ManualRemainingSeconds.Value).ToString()
: "-";
var carsText = door.CarsInArea.Count > 0 ? string.Join(", ", door.CarsInArea) : "无";
var item = new ListViewItem(door.ControllerIndex.ToString());
item.SubItems.Add(door.DoorIndex.ToString());
item.SubItems.Add(stateText);
item.SubItems.Add(targetText);
item.SubItems.Add(sourceText);
item.SubItems.Add(remainText);
item.SubItems.Add(carsText);
item.SubItems.Add(door.ControlAddress.ToString());
item.SubItems.Add(door.OpenStatusAddress.ToString());
item.Tag = (door.ControllerIndex, door.DoorIndex);
item.UseItemStyleForSubItems = false;
doorListView.Items.Add(item);
// 如果之前选中的门存在,恢复选中状态
if (previousSelected.HasValue &&
previousSelected.Value.ControllerIndex == door.ControllerIndex &&
previousSelected.Value.DoorIndex == door.DoorIndex)
{
selectedItem = item;
_panel = null;
}
}
// 恢复选中状态
if (selectedItem != null)
{
selectedItem.Selected = true;
selectedItem.EnsureVisible();
doorListView_SelectedIndexChanged(doorListView, EventArgs.Empty);
}
}
var panel = GUI.DeclarePanel()
.ShowTitle("门控监控")
.SetDefaultDocking(Panel.Docking.None)
.InitSize(1200, 620)
.InitPos(false, 0, 0, 0.5f, 0.5f, 0.5f, 0.5f);
_panel = panel;
panel.IfTerminalQuit(() => _panel = null);
/// <summary>
/// 门列表选择改变
/// </summary>
private void doorListView_SelectedIndexChanged(object sender, EventArgs e)
{
if (doorListView.SelectedItems.Count > 0)
panel.Define(pb =>
{
var tag = doorListView.SelectedItems[0].Tag;
if (tag != null && tag is ValueTuple<int, int>)
{
var doorInfo = (ValueTuple<int, int>)tag;
_selectedDoor = doorInfo;
labelDoorInfo.Text = $"控制器编码: {doorInfo.Item1}, 门编码: {doorInfo.Item2}";
// 根据占用状态决定关闭按钮是否可用
var mission = SimpleProject.proj?.Missions?.OfType<DoorMission>().FirstOrDefault();
var carsInArea = mission?.GetCarsInArea(doorInfo.Item1, doorInfo.Item2) ?? Array.Empty<int>();
btnClose.Enabled = carsInArea.Count == 0;
}
else
if (pb.Closing())
{
panel.Exit();
_panel = null;
_selectedDoor = null;
labelDoorInfo.Text = "请选择要控制的门";
btnClose.Enabled = true;
return;
}
}
else
{
_selectedDoor = null;
labelDoorInfo.Text = "请选择要控制的门";
btnClose.Enabled = true;
}
var mission = GetMission();
var snapshot = mission?.GetDoorMonitorSnapshot() ?? Array.Empty<DoorMission.DoorMonitorSnapshotItem>();
pb.Label($"共 {snapshot.Count} 扇门");
pb.Label(GetDoorInfoText(snapshot));
pb.Table(TableId,
new[]
{
"控制器编码", "门编码", "状态", "控制目标", "控制来源",
"手动剩余(s)", "车辆占用", "控制地址", "开到位地址"
},
snapshot.Count, (row, i) =>
{
var door = snapshot[i];
if (IsRowSelected(door))
row.SetColor(SelectedRowColor);
LabelCell(row, door, door.ControllerIndex.ToString());
LabelCell(row, door, door.DoorIndex.ToString());
LabelCell(row, door, FormatState(door.State));
LabelCell(row, door, door.Target ? "开" : "关");
LabelCell(row, door, door.Source == DoorMission.ControlSource.Manual ? "手动" : "自动");
LabelCell(row, door, FormatManualRemain(door));
LabelCell(row, door, FormatCars(door));
LabelCell(row, door, door.ControlAddress.ToString());
LabelCell(row, door, door.OpenStatusAddress.ToString());
}, height: 18, enableSearch: true);
pb.Separator();
pb.Label("手动控制");
var canClose = CanCloseSelected(mission);
if (pb.Button("打开", distinct: "door-monitor-open"))
OpenSelectedDoor();
pb.SameLine(12);
if (pb.Button("关闭", distinct: "door-monitor-close", disabled: !canClose))
CloseSelectedDoor();
pb.SameLine(12);
if (pb.Button("清空占用", distinct: "door-monitor-clear-cars"))
ClearSelectedCars();
pb.Panel.Repaint(repaintTimeMs: 500);
});
}
/// <summary>
/// 打开门
/// </summary>
private void btnOpen_Click(object sender, EventArgs e)
private static void LabelCell(PanelBuilder.Row row, DoorMission.DoorMonitorSnapshotItem door, string text)
{
if (row.Label(text))
_selectedDoor = (door.ControllerIndex, door.DoorIndex);
}
private static DoorMission GetMission() =>
SimpleProject.proj?.Missions?.OfType<DoorMission>().FirstOrDefault();
private static bool IsRowSelected(DoorMission.DoorMonitorSnapshotItem door) =>
_selectedDoor.HasValue
&& _selectedDoor.Value.ControllerIndex == door.ControllerIndex
&& _selectedDoor.Value.DoorIndex == door.DoorIndex;
private static string GetDoorInfoText(IReadOnlyList<DoorMission.DoorMonitorSnapshotItem> snapshot)
{
if (!_selectedDoor.HasValue)
return "请选择要控制的门";
var door = snapshot.FirstOrDefault(d =>
d.ControllerIndex == _selectedDoor.Value.ControllerIndex
&& d.DoorIndex == _selectedDoor.Value.DoorIndex);
if (door == null)
return $"控制器编码: {_selectedDoor.Value.ControllerIndex}, 门编码: {_selectedDoor.Value.DoorIndex}";
return $"控制器编码: {door.ControllerIndex}, 门编码: {door.DoorIndex}";
}
private static bool CanCloseSelected(DoorMission mission)
{
if (!_selectedDoor.HasValue || mission == null)
return true;
var cars = mission.GetCarsInArea(_selectedDoor.Value.ControllerIndex, _selectedDoor.Value.DoorIndex);
return cars.Count == 0;
}
private static string FormatState(DoorState state) =>
state == DoorState.Open ? "打开" : state == DoorState.Closed ? "关闭" : "未知";
private static string FormatManualRemain(DoorMission.DoorMonitorSnapshotItem door) =>
door.Source == DoorMission.ControlSource.Manual && door.ManualRemainingSeconds.HasValue
? Math.Ceiling(door.ManualRemainingSeconds.Value).ToString()
: "-";
private static string FormatCars(DoorMission.DoorMonitorSnapshotItem door) =>
door.CarsInArea.Count > 0 ? string.Join(", ", door.CarsInArea) : "无";
private static void OpenSelectedDoor()
{
if (!_selectedDoor.HasValue)
{
MessageBox.Show("请先选择要控制的门", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
CycleUiHelper.Alert("提示", "请先选择要控制的门");
return;
}
try
{
var mission = SimpleProject.proj?.Missions?.OfType<DoorMission>().FirstOrDefault();
var mission = GetMission();
if (mission == null)
{
MessageBox.Show("未找到门控进程", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
CycleUiHelper.Alert("错误", "未找到门控进程");
return;
}
var (controllerIndex, doorIndex) = _selectedDoor.Value;
// 手动控制:默认保持10秒
mission.SetManualDoorControl(controllerIndex, doorIndex, true);
MessageBox.Show($"控制器 {controllerIndex} 门 {doorIndex} 已设置手动打开(10秒)", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
CycleUiHelper.Alert("提示", $"控制器 {controllerIndex} 门 {doorIndex} 已设置手动打开(10秒)");
}
catch (Exception ex)
{
MessageBox.Show($"设置门打开目标失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
CycleUiHelper.Alert("错误", $"设置门打开目标失败: {ex.Message}");
}
}
/// <summary>
/// 关闭门
/// </summary>
private void btnClose_Click(object sender, EventArgs e)
private static void CloseSelectedDoor()
{
if (!_selectedDoor.HasValue)
{
MessageBox.Show("请先选择要控制的门", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
CycleUiHelper.Alert("提示", "请先选择要控制的门");
return;
}
try
{
var mission = SimpleProject.proj?.Missions?.OfType<DoorMission>().FirstOrDefault();
var mission = GetMission();
if (mission == null)
{
MessageBox.Show("未找到门控进程", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
CycleUiHelper.Alert("错误", "未找到门控进程");
return;
}
var (controllerIndex, doorIndex) = _selectedDoor.Value;
// 车辆占用时禁止手动关闭
var success = mission.SetManualDoorControl(controllerIndex, doorIndex, false);
if (!success)
{
MessageBox.Show("门存在车辆占用,禁止手动关闭。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
CycleUiHelper.Alert("提示", "门存在车辆占用,禁止手动关闭。");
return;
}
MessageBox.Show($"控制器 {controllerIndex} 门 {doorIndex} 已设置手动关闭(10秒)", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
CycleUiHelper.Alert("提示", $"控制器 {controllerIndex} 门 {doorIndex} 已设置手动关闭(10秒)");
}
catch (Exception ex)
{
MessageBox.Show($"设置门关闭目标失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
CycleUiHelper.Alert("错误", $"设置门关闭目标失败: {ex.Message}");
}
}
/// <summary>
/// 清空车辆占用
/// </summary>
private void btnClearCars_Click(object sender, EventArgs e)
private static void ClearSelectedCars()
{
if (!_selectedDoor.HasValue)
{
MessageBox.Show("请先选择要清空占用的门", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
CycleUiHelper.Alert("提示", "请先选择要清空占用的门");
return;
}
try
{
var mission = SimpleProject.proj?.Missions?.OfType<DoorMission>().FirstOrDefault();
var mission = GetMission();
if (mission == null)
{
MessageBox.Show("未找到门控进程", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
CycleUiHelper.Alert("错误", "未找到门控进程");
return;
}
var (controllerIndex, doorIndex) = _selectedDoor.Value;
mission.ClearCarsInArea(controllerIndex, doorIndex);
MessageBox.Show($"控制器 {controllerIndex} 门 {doorIndex} 已清空占用", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
RefreshDoorList();
CycleUiHelper.Alert("提示", $"控制器 {controllerIndex} 门 {doorIndex} 已清空占用");
}
catch (Exception ex)
{
MessageBox.Show($"清空占用失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
/// <summary>
/// 定时刷新
/// </summary>
private void timerRefresh_Tick(object sender, EventArgs e)
{
RefreshDoorList();
}
/// <summary>
/// 窗体关闭事件
/// </summary>
private void DoorMonitor_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
timerRefresh.Stop();
e.Cancel = true;
this.Visible = false;
}
}
protected override void OnVisibleChanged(EventArgs e)
{
base.OnVisibleChanged(e);
if (Visible)
{
EnsureRefreshActive();
}
else
{
timerRefresh.Stop();
CycleUiHelper.Alert("错误", $"清空占用失败: {ex.Message}");
}
}
}
@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<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="timerRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>