| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | components = new System.ComponentModel.Container(); |
| | | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CommunicatorS7Form)); |
| | | label3 = new Label(); |
| | | tableLayoutPanel1 = new TableLayoutPanel(); |
| | | groupBox1 = new GroupBox(); |
| | | dgvSignals = new DataGridView(); |
| | | contextMenuSignal = new ContextMenuStrip(components); |
| | | menuReadSignal = new ToolStripMenuItem(); |
| | | menuWriteSignal = new ToolStripMenuItem(); |
| | | grpReceive = new GroupBox(); |
| | | txtReceiveMsg = new TextBox(); |
| | | txtSendMsg = new TextBox(); |
| | | grpSetting = new GroupBox(); |
| | | txtAddress = new TextBox(); |
| | | btnConfig = new Button(); |
| | | btnReadAll = new Button(); |
| | | btnWriteAll = new Button(); |
| | | lblStatus = new Sunny.UI.UILabel(); |
| | | cmbType = new ComboBox(); |
| | | txtIP = new TextBox(); |
| | | txtPort = new TextBox(); |
| | | lblPort = new Label(); |
| | | cmbIP = new ComboBox(); |
| | | lblType = new Label(); |
| | | lblAddress = new Label(); |
| | | lblIP = new Label(); |
| | | cmbDataType = new ComboBox(); |
| | | lblDataType = new Label(); |
| | | tableLayoutPanel2 = new TableLayoutPanel(); |
| | | btnRuleSend = new Button(); |
| | | btnSend = new Button(); |
| | | themeForm_Communicator = new ReaLTaiizor.Forms.ThemeForm(); |
| | | controlBox1 = new ReaLTaiizor.Controls.ControlBox(); |
| | | panel_CommunicatorForm = new Panel(); |
| | | tableLayoutPanel1.SuspendLayout(); |
| | | groupBox1.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)dgvSignals).BeginInit(); |
| | | contextMenuSignal.SuspendLayout(); |
| | | grpReceive.SuspendLayout(); |
| | | grpSetting.SuspendLayout(); |
| | | tableLayoutPanel2.SuspendLayout(); |
| | | themeForm_Communicator.SuspendLayout(); |
| | | panel_CommunicatorForm.SuspendLayout(); |
| | | SuspendLayout(); |
| | | // |
| | | // label3 |
| | | // |
| | | label3.AutoSize = true; |
| | | label3.Dock = DockStyle.Fill; |
| | | label3.ForeColor = Color.CornflowerBlue; |
| | | label3.Location = new Point(3, 100); |
| | | label3.Name = "label3"; |
| | | label3.Size = new Size(655, 20); |
| | | label3.TabIndex = 18; |
| | | label3.Text = "发送信息"; |
| | | label3.TextAlign = ContentAlignment.BottomLeft; |
| | | // |
| | | // tableLayoutPanel1 |
| | | // |
| | | tableLayoutPanel1.ColumnCount = 1; |
| | | tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Controls.Add(grpReceive, 0, 4); |
| | | tableLayoutPanel1.Controls.Add(txtSendMsg, 0, 2); |
| | | tableLayoutPanel1.Controls.Add(groupBox1, 0, 1); |
| | | tableLayoutPanel1.Controls.Add(grpReceive, 0, 2); |
| | | tableLayoutPanel1.Controls.Add(grpSetting, 0, 0); |
| | | tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 3); |
| | | tableLayoutPanel1.Controls.Add(label3, 0, 1); |
| | | tableLayoutPanel1.Dock = DockStyle.Fill; |
| | | tableLayoutPanel1.Location = new Point(0, 0); |
| | | tableLayoutPanel1.Name = "tableLayoutPanel1"; |
| | | tableLayoutPanel1.RowCount = 5; |
| | | tableLayoutPanel1.RowCount = 3; |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 100F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F)); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel1.Size = new Size(661, 322); |
| | | tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); |
| | | tableLayoutPanel1.Size = new Size(786, 424); |
| | | tableLayoutPanel1.TabIndex = 26; |
| | | // |
| | | // groupBox1 |
| | | // |
| | | groupBox1.Controls.Add(dgvSignals); |
| | | groupBox1.Dock = DockStyle.Fill; |
| | | groupBox1.ForeColor = Color.CornflowerBlue; |
| | | groupBox1.Location = new Point(3, 103); |
| | | groupBox1.Name = "groupBox1"; |
| | | groupBox1.Size = new Size(780, 156); |
| | | groupBox1.TabIndex = 31; |
| | | groupBox1.TabStop = false; |
| | | groupBox1.Text = "通讯地址"; |
| | | // |
| | | // dgvSignals |
| | | // |
| | | dgvSignals.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; |
| | | dgvSignals.ContextMenuStrip = contextMenuSignal; |
| | | dgvSignals.Dock = DockStyle.Fill; |
| | | dgvSignals.Location = new Point(3, 17); |
| | | dgvSignals.Name = "dgvSignals"; |
| | | dgvSignals.Size = new Size(774, 136); |
| | | dgvSignals.TabIndex = 0; |
| | | // |
| | | // contextMenuSignal |
| | | // |
| | | contextMenuSignal.Items.AddRange(new ToolStripItem[] { menuReadSignal, menuWriteSignal }); |
| | | contextMenuSignal.Name = "contextMenuSignal"; |
| | | contextMenuSignal.Size = new Size(137, 48); |
| | | // |
| | | // menuReadSignal |
| | | // |
| | | menuReadSignal.Name = "menuReadSignal"; |
| | | menuReadSignal.Size = new Size(136, 22); |
| | | menuReadSignal.Text = "读取此信号"; |
| | | menuReadSignal.Click += menuReadSignal_Click; |
| | | // |
| | | // menuWriteSignal |
| | | // |
| | | menuWriteSignal.Name = "menuWriteSignal"; |
| | | menuWriteSignal.Size = new Size(136, 22); |
| | | menuWriteSignal.Text = "写入此信号"; |
| | | menuWriteSignal.Click += menuWriteSignal_Click; |
| | | // |
| | | // grpReceive |
| | | // |
| | | grpReceive.Controls.Add(txtReceiveMsg); |
| | | grpReceive.Dock = DockStyle.Fill; |
| | | grpReceive.ForeColor = Color.CornflowerBlue; |
| | | grpReceive.Location = new Point(3, 193); |
| | | grpReceive.Location = new Point(3, 265); |
| | | grpReceive.Name = "grpReceive"; |
| | | grpReceive.Size = new Size(655, 126); |
| | | grpReceive.Size = new Size(780, 156); |
| | | grpReceive.TabIndex = 30; |
| | | grpReceive.TabStop = false; |
| | | grpReceive.Text = "通讯记录"; |
| | |
| | | txtReceiveMsg.Name = "txtReceiveMsg"; |
| | | txtReceiveMsg.ReadOnly = true; |
| | | txtReceiveMsg.ScrollBars = ScrollBars.Both; |
| | | txtReceiveMsg.Size = new Size(649, 106); |
| | | txtReceiveMsg.Size = new Size(774, 136); |
| | | txtReceiveMsg.TabIndex = 0; |
| | | // |
| | | // txtSendMsg |
| | | // |
| | | txtSendMsg.Dock = DockStyle.Fill; |
| | | txtSendMsg.Location = new Point(3, 123); |
| | | txtSendMsg.Name = "txtSendMsg"; |
| | | txtSendMsg.Size = new Size(655, 21); |
| | | txtSendMsg.TabIndex = 29; |
| | | // |
| | | // grpSetting |
| | | // |
| | | grpSetting.BackColor = Color.FromArgb(32, 41, 50); |
| | | grpSetting.Controls.Add(txtAddress); |
| | | grpSetting.Controls.Add(btnConfig); |
| | | grpSetting.Controls.Add(btnReadAll); |
| | | grpSetting.Controls.Add(btnWriteAll); |
| | | grpSetting.Controls.Add(lblStatus); |
| | | grpSetting.Controls.Add(cmbType); |
| | | grpSetting.Controls.Add(txtIP); |
| | | grpSetting.Controls.Add(txtPort); |
| | | grpSetting.Controls.Add(lblPort); |
| | | grpSetting.Controls.Add(cmbIP); |
| | | grpSetting.Controls.Add(lblType); |
| | | grpSetting.Controls.Add(lblAddress); |
| | | grpSetting.Controls.Add(lblIP); |
| | | grpSetting.Controls.Add(cmbDataType); |
| | | grpSetting.Controls.Add(lblDataType); |
| | | grpSetting.Dock = DockStyle.Fill; |
| | | grpSetting.ForeColor = Color.CornflowerBlue; |
| | | grpSetting.Location = new Point(3, 3); |
| | | grpSetting.MinimumSize = new Size(261, 61); |
| | | grpSetting.Name = "grpSetting"; |
| | | grpSetting.Size = new Size(655, 94); |
| | | grpSetting.Size = new Size(780, 94); |
| | | grpSetting.TabIndex = 28; |
| | | grpSetting.TabStop = false; |
| | | grpSetting.Text = "通讯配置"; |
| | | // |
| | | // txtAddress |
| | | // btnConfig |
| | | // |
| | | txtAddress.Location = new Point(271, 60); |
| | | txtAddress.Name = "txtAddress"; |
| | | txtAddress.Size = new Size(100, 21); |
| | | txtAddress.TabIndex = 9; |
| | | txtAddress.TextChanged += txtAddress_TextChanged; |
| | | btnConfig.Location = new Point(423, 52); |
| | | btnConfig.Name = "btnConfig"; |
| | | btnConfig.Size = new Size(87, 33); |
| | | btnConfig.TabIndex = 10; |
| | | btnConfig.Text = "地址配置"; |
| | | btnConfig.UseVisualStyleBackColor = true; |
| | | btnConfig.Click += btnConfig_Click; |
| | | // |
| | | // btnReadAll |
| | | // |
| | | btnReadAll.Location = new Point(318, 52); |
| | | btnReadAll.Name = "btnReadAll"; |
| | | btnReadAll.Size = new Size(87, 33); |
| | | btnReadAll.TabIndex = 10; |
| | | btnReadAll.Text = "批量读取"; |
| | | btnReadAll.UseVisualStyleBackColor = true; |
| | | btnReadAll.Click += btnReadAll_Click; |
| | | // |
| | | // btnWriteAll |
| | | // |
| | | btnWriteAll.Location = new Point(208, 52); |
| | | btnWriteAll.Name = "btnWriteAll"; |
| | | btnWriteAll.Size = new Size(87, 33); |
| | | btnWriteAll.TabIndex = 10; |
| | | btnWriteAll.Text = "批量写入"; |
| | | btnWriteAll.UseVisualStyleBackColor = true; |
| | | btnWriteAll.Click += btnWriteAll_Click; |
| | | // |
| | | // lblStatus |
| | | // |
| | | lblStatus.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); |
| | | lblStatus.ForeColor = Color.White; |
| | | lblStatus.Location = new Point(388, 24); |
| | | lblStatus.Name = "lblStatus"; |
| | | lblStatus.Size = new Size(100, 23); |
| | | lblStatus.TabIndex = 9; |
| | | lblStatus.Text = "未连接"; |
| | | lblStatus.TextAlign = ContentAlignment.MiddleLeft; |
| | | // |
| | | // cmbType |
| | | // |
| | |
| | | // |
| | | txtIP.Location = new Point(79, 22); |
| | | txtIP.Name = "txtIP"; |
| | | txtIP.ReadOnly = true; |
| | | txtIP.Size = new Size(100, 21); |
| | | txtIP.TabIndex = 7; |
| | | // |
| | |
| | | // |
| | | txtPort.Location = new Point(79, 60); |
| | | txtPort.Name = "txtPort"; |
| | | txtPort.ReadOnly = true; |
| | | txtPort.Size = new Size(100, 21); |
| | | txtPort.TabIndex = 6; |
| | | // |
| | |
| | | lblType.TabIndex = 0; |
| | | lblType.Text = "型号"; |
| | | // |
| | | // lblAddress |
| | | // |
| | | lblAddress.AutoSize = true; |
| | | lblAddress.Location = new Point(205, 63); |
| | | lblAddress.Name = "lblAddress"; |
| | | lblAddress.Size = new Size(55, 15); |
| | | lblAddress.TabIndex = 0; |
| | | lblAddress.Text = "变量地址"; |
| | | // |
| | | // lblIP |
| | | // |
| | | lblIP.AutoSize = true; |
| | |
| | | lblIP.Size = new Size(31, 15); |
| | | lblIP.TabIndex = 0; |
| | | lblIP.Text = "地址"; |
| | | // |
| | | // cmbDataType |
| | | // |
| | | cmbDataType.DropDownStyle = ComboBoxStyle.DropDownList; |
| | | cmbDataType.FormattingEnabled = true; |
| | | cmbDataType.Location = new Point(435, 60); |
| | | cmbDataType.Name = "cmbDataType"; |
| | | cmbDataType.Size = new Size(100, 23); |
| | | cmbDataType.TabIndex = 11; |
| | | cmbDataType.SelectedIndexChanged += cmbDataType_SelectedIndexChanged; |
| | | // |
| | | // lblDataType |
| | | // |
| | | lblDataType.AutoSize = true; |
| | | lblDataType.Location = new Point(385, 63); |
| | | lblDataType.Name = "lblDataType"; |
| | | lblDataType.Size = new Size(31, 15); |
| | | lblDataType.TabIndex = 10; |
| | | lblDataType.Text = "类型"; |
| | | // |
| | | // tableLayoutPanel2 |
| | | // |
| | | tableLayoutPanel2.ColumnCount = 3; |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 80F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 80F)); |
| | | tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Controls.Add(btnRuleSend, 1, 0); |
| | | tableLayoutPanel2.Controls.Add(btnSend, 0, 0); |
| | | tableLayoutPanel2.Dock = DockStyle.Fill; |
| | | tableLayoutPanel2.Location = new Point(3, 153); |
| | | tableLayoutPanel2.Name = "tableLayoutPanel2"; |
| | | tableLayoutPanel2.RowCount = 1; |
| | | tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); |
| | | tableLayoutPanel2.Size = new Size(655, 34); |
| | | tableLayoutPanel2.TabIndex = 27; |
| | | // |
| | | // btnRuleSend |
| | | // |
| | | btnRuleSend.Dock = DockStyle.Fill; |
| | | btnRuleSend.ForeColor = Color.CornflowerBlue; |
| | | btnRuleSend.Location = new Point(83, 3); |
| | | btnRuleSend.Name = "btnRuleSend"; |
| | | btnRuleSend.Size = new Size(74, 28); |
| | | btnRuleSend.TabIndex = 14; |
| | | btnRuleSend.Text = "校验发送"; |
| | | btnRuleSend.UseVisualStyleBackColor = true; |
| | | btnRuleSend.Click += btnRuleSend_Click; |
| | | // |
| | | // btnSend |
| | | // |
| | | btnSend.Dock = DockStyle.Fill; |
| | | btnSend.ForeColor = Color.CornflowerBlue; |
| | | btnSend.Location = new Point(3, 3); |
| | | btnSend.Name = "btnSend"; |
| | | btnSend.Size = new Size(74, 28); |
| | | btnSend.TabIndex = 12; |
| | | btnSend.Text = "发送"; |
| | | btnSend.UseVisualStyleBackColor = true; |
| | | btnSend.Click += btnSend_Click; |
| | | // |
| | | // themeForm_Communicator |
| | | // |
| | |
| | | themeForm_Communicator.Padding = new Padding(10, 70, 10, 9); |
| | | themeForm_Communicator.RoundCorners = true; |
| | | themeForm_Communicator.Sizable = true; |
| | | themeForm_Communicator.Size = new Size(681, 401); |
| | | themeForm_Communicator.Size = new Size(806, 503); |
| | | themeForm_Communicator.SmartBounds = true; |
| | | themeForm_Communicator.StartPosition = FormStartPosition.WindowsDefaultLocation; |
| | | themeForm_Communicator.TabIndex = 27; |
| | | themeForm_Communicator.Text = "通讯设置"; |
| | | themeForm_Communicator.Text = "S7通讯设置"; |
| | | // |
| | | // controlBox1 |
| | | // |
| | |
| | | controlBox1.EnableMaximizeButton = true; |
| | | controlBox1.EnableMinimizeButton = true; |
| | | controlBox1.ForeColor = Color.FromArgb(155, 155, 155); |
| | | controlBox1.Location = new Point(581, 18); |
| | | controlBox1.Location = new Point(706, 18); |
| | | controlBox1.MaximizeHoverColor = Color.FromArgb(74, 74, 74); |
| | | controlBox1.MinimizeHoverColor = Color.FromArgb(63, 63, 65); |
| | | controlBox1.Name = "controlBox1"; |
| | |
| | | panel_CommunicatorForm.Dock = DockStyle.Fill; |
| | | panel_CommunicatorForm.Location = new Point(10, 70); |
| | | panel_CommunicatorForm.Name = "panel_CommunicatorForm"; |
| | | panel_CommunicatorForm.Size = new Size(661, 322); |
| | | panel_CommunicatorForm.Size = new Size(786, 424); |
| | | panel_CommunicatorForm.TabIndex = 27; |
| | | // |
| | | // CommunicatorS7Form |
| | | // |
| | | AutoScaleDimensions = new SizeF(96F, 96F); |
| | | AutoScaleMode = AutoScaleMode.Dpi; |
| | | ClientSize = new Size(681, 401); |
| | | ClientSize = new Size(806, 503); |
| | | Controls.Add(themeForm_Communicator); |
| | | FormBorderStyle = FormBorderStyle.None; |
| | | MinimumSize = new Size(261, 61); |
| | | Name = "CommunicatorS7Form"; |
| | | Text = "通讯设置"; |
| | | base.Name = "CommunicatorS7Form"; |
| | | Text = "S7通讯设置"; |
| | | TransparencyKey = Color.Fuchsia; |
| | | FormClosing += CommunicatorForm_FormClosing; |
| | | tableLayoutPanel1.ResumeLayout(false); |
| | | tableLayoutPanel1.PerformLayout(); |
| | | groupBox1.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)dgvSignals).EndInit(); |
| | | contextMenuSignal.ResumeLayout(false); |
| | | grpReceive.ResumeLayout(false); |
| | | grpReceive.PerformLayout(); |
| | | grpSetting.ResumeLayout(false); |
| | | grpSetting.PerformLayout(); |
| | | tableLayoutPanel2.ResumeLayout(false); |
| | | themeForm_Communicator.ResumeLayout(false); |
| | | panel_CommunicatorForm.ResumeLayout(false); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | | #endregion |
| | | private Label label3; |
| | | private TableLayoutPanel tableLayoutPanel1; |
| | | private TableLayoutPanel tableLayoutPanel2; |
| | | private GroupBox grpSetting; |
| | | private TextBox txtIP; |
| | | private TextBox txtPort; |
| | | private Label lblPort; |
| | | private ComboBox cmbIP; |
| | | private Label lblIP; |
| | | private TextBox txtSendMsg; |
| | | private GroupBox grpReceive; |
| | | private TextBox txtReceiveMsg; |
| | | private Button btnSend; |
| | | private Button btnRuleSend; |
| | | private ReaLTaiizor.Forms.ThemeForm themeForm_Communicator; |
| | | private ReaLTaiizor.Controls.ControlBox controlBox1; |
| | | private Panel panel_CommunicatorForm; |
| | | private Label lblType; |
| | | private ComboBox cmbType; |
| | | private Label lblAddress; |
| | | private TextBox txtAddress; |
| | | private Label lblDataType; |
| | | private ComboBox cmbDataType; |
| | | private GroupBox groupBox1; |
| | | private DataGridView dgvSignals; |
| | | private Button btnConfig; |
| | | private Button btnReadAll; |
| | | private Button btnWriteAll; |
| | | private Sunny.UI.UILabel lblStatus; |
| | | private ContextMenuStrip contextMenuSignal; |
| | | private ToolStripMenuItem menuReadSignal; |
| | | private ToolStripMenuItem menuWriteSignal; |
| | | } |
| | | } |