From 77d6a2ec31a4d7e9505f842c2f6dc26d5b2c934e Mon Sep 17 00:00:00 2001 From: SoulStar Date: Sat, 12 Oct 2024 14:32:33 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BF=AE=E5=A4=8D=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RFIDSocket/App.config | 12 +- RFIDSocket/Properties/app.manifest | 73 ++++++++++ RFIDSocket/RFIDLog.Designer.cs | 3 + RFIDSocket/RFIDLog.resx | 3 - RFIDSocket/RFIDSocket.Designer.cs | 215 ++++++++++++++++++----------- RFIDSocket/RFIDSocket.cs | 32 +++-- RFIDSocket/RFIDSocket.csproj | 49 +++++++ RFIDSocket/RFIDSocket.resx | 9 -- 8 files changed, 286 insertions(+), 110 deletions(-) create mode 100644 RFIDSocket/Properties/app.manifest diff --git a/RFIDSocket/App.config b/RFIDSocket/App.config index a84de04..afc50cd 100644 --- a/RFIDSocket/App.config +++ b/RFIDSocket/App.config @@ -1,11 +1,15 @@  - - - + + + - + + + + + \ No newline at end of file diff --git a/RFIDSocket/Properties/app.manifest b/RFIDSocket/Properties/app.manifest new file mode 100644 index 0000000..5431ba7 --- /dev/null +++ b/RFIDSocket/Properties/app.manifest @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/RFIDSocket/RFIDLog.Designer.cs b/RFIDSocket/RFIDLog.Designer.cs index 3d4b776..c9794f1 100644 --- a/RFIDSocket/RFIDLog.Designer.cs +++ b/RFIDSocket/RFIDLog.Designer.cs @@ -157,6 +157,9 @@ // // LogContent // + this.LogContent.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.LogContent.AutoGenerateColumns = false; this.LogContent.ColumnHeadersHeight = 20; this.LogContent.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { diff --git a/RFIDSocket/RFIDLog.resx b/RFIDSocket/RFIDLog.resx index 3e42c4d..ca21880 100644 --- a/RFIDSocket/RFIDLog.resx +++ b/RFIDSocket/RFIDLog.resx @@ -120,7 +120,4 @@ 17, 17 - - 17, 17 - \ No newline at end of file diff --git a/RFIDSocket/RFIDSocket.Designer.cs b/RFIDSocket/RFIDSocket.Designer.cs index 6375169..54315c5 100644 --- a/RFIDSocket/RFIDSocket.Designer.cs +++ b/RFIDSocket/RFIDSocket.Designer.cs @@ -48,24 +48,30 @@ this.PageRange = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.LogStart = new System.Windows.Forms.Button(); + this.ControlGrupbox = new System.Windows.Forms.GroupBox(); + this.MainReadGroupBox = new System.Windows.Forms.GroupBox(); + this.PageGroupBox = new System.Windows.Forms.GroupBox(); + this.deviceNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.readKindDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.contentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.logTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.rFIDContentBindingSource = new System.Windows.Forms.BindingSource(this.components); this.deviceNoDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.timeSpanDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.rFIDHeartbeatBindingSource = new System.Windows.Forms.BindingSource(this.components); this.deviceNoDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.rFIDStateBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.rFIDContentBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.deviceNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.readKindDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.contentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.logTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.CotentData)).BeginInit(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.StateData)).BeginInit(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.HeartbeatData)).BeginInit(); + this.ControlGrupbox.SuspendLayout(); + this.MainReadGroupBox.SuspendLayout(); + this.PageGroupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rFIDHeartbeatBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rFIDStateBindingSource)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).BeginInit(); this.SuspendLayout(); // // CotentData @@ -78,21 +84,21 @@ this.contentDataGridViewTextBoxColumn, this.logTimeDataGridViewTextBoxColumn}); this.CotentData.DataSource = this.rFIDContentBindingSource; - this.CotentData.Location = new System.Drawing.Point(9, 103); + this.CotentData.Dock = System.Windows.Forms.DockStyle.Fill; + this.CotentData.Location = new System.Drawing.Point(3, 17); this.CotentData.Margin = new System.Windows.Forms.Padding(2); this.CotentData.Name = "CotentData"; this.CotentData.RowHeadersVisible = false; this.CotentData.RowHeadersWidth = 51; this.CotentData.RowTemplate.Height = 17; - this.CotentData.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.CotentData.Size = new System.Drawing.Size(486, 870); + this.CotentData.Size = new System.Drawing.Size(491, 696); this.CotentData.TabIndex = 0; // // IPText // - this.IPText.Location = new System.Drawing.Point(116, 23); + this.IPText.Location = new System.Drawing.Point(117, 28); this.IPText.Margin = new System.Windows.Forms.Padding(2); - this.IPText.MaxLength = 6; + this.IPText.MaxLength = 20; this.IPText.Name = "IPText"; this.IPText.Size = new System.Drawing.Size(98, 21); this.IPText.TabIndex = 7; @@ -100,10 +106,10 @@ // // SetAddress // - this.SetAddress.Location = new System.Drawing.Point(267, 10); + this.SetAddress.Location = new System.Drawing.Point(268, 15); this.SetAddress.Margin = new System.Windows.Forms.Padding(2); this.SetAddress.Name = "SetAddress"; - this.SetAddress.Size = new System.Drawing.Size(120, 45); + this.SetAddress.Size = new System.Drawing.Size(105, 45); this.SetAddress.TabIndex = 6; this.SetAddress.Text = "确认服务端地址"; this.SetAddress.UseVisualStyleBackColor = true; @@ -112,7 +118,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(11, 27); + this.label1.Location = new System.Drawing.Point(12, 32); this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(101, 12); @@ -121,7 +127,7 @@ // // PortText // - this.PortText.Location = new System.Drawing.Point(218, 23); + this.PortText.Location = new System.Drawing.Point(219, 28); this.PortText.Margin = new System.Windows.Forms.Padding(2); this.PortText.MaxLength = 6; this.PortText.Name = "PortText"; @@ -131,7 +137,7 @@ // // MonitorOnOff // - this.MonitorOnOff.Location = new System.Drawing.Point(391, 11); + this.MonitorOnOff.Location = new System.Drawing.Point(5, 71); this.MonitorOnOff.Margin = new System.Windows.Forms.Padding(2); this.MonitorOnOff.Name = "MonitorOnOff"; this.MonitorOnOff.Size = new System.Drawing.Size(110, 45); @@ -143,7 +149,7 @@ // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(505, 27); + this.label4.Location = new System.Drawing.Point(119, 87); this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(65, 12); @@ -154,7 +160,7 @@ // this.MonitorState.AutoSize = true; this.MonitorState.BackColor = System.Drawing.Color.Transparent; - this.MonitorState.Location = new System.Drawing.Point(574, 27); + this.MonitorState.Location = new System.Drawing.Point(188, 87); this.MonitorState.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.MonitorState.Name = "MonitorState"; this.MonitorState.Size = new System.Drawing.Size(17, 12); @@ -168,12 +174,15 @@ // // groupBox2 // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.groupBox2.AutoSize = true; this.groupBox2.Controls.Add(this.StateData); - this.groupBox2.Location = new System.Drawing.Point(499, 59); + this.groupBox2.Location = new System.Drawing.Point(518, 138); this.groupBox2.Margin = new System.Windows.Forms.Padding(2); this.groupBox2.Name = "groupBox2"; this.groupBox2.Padding = new System.Windows.Forms.Padding(2); - this.groupBox2.Size = new System.Drawing.Size(186, 449); + this.groupBox2.Size = new System.Drawing.Size(185, 658); this.groupBox2.TabIndex = 11; this.groupBox2.TabStop = false; this.groupBox2.Text = "工作状态故障"; @@ -186,13 +195,14 @@ this.deviceNoDataGridViewTextBoxColumn1, this.LogTime}); this.StateData.DataSource = this.rFIDStateBindingSource; - this.StateData.Location = new System.Drawing.Point(4, 19); + this.StateData.Dock = System.Windows.Forms.DockStyle.Fill; + this.StateData.Location = new System.Drawing.Point(2, 16); this.StateData.Margin = new System.Windows.Forms.Padding(2); this.StateData.Name = "StateData"; this.StateData.RowHeadersVisible = false; this.StateData.RowHeadersWidth = 51; this.StateData.RowTemplate.Height = 20; - this.StateData.Size = new System.Drawing.Size(177, 425); + this.StateData.Size = new System.Drawing.Size(181, 640); this.StateData.TabIndex = 0; // // LogTime @@ -205,12 +215,14 @@ // // groupBox3 // + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); this.groupBox3.Controls.Add(this.HeartbeatData); - this.groupBox3.Location = new System.Drawing.Point(499, 512); + this.groupBox3.Location = new System.Drawing.Point(707, 138); this.groupBox3.Margin = new System.Windows.Forms.Padding(2); this.groupBox3.Name = "groupBox3"; this.groupBox3.Padding = new System.Windows.Forms.Padding(2); - this.groupBox3.Size = new System.Drawing.Size(186, 461); + this.groupBox3.Size = new System.Drawing.Size(186, 658); this.groupBox3.TabIndex = 12; this.groupBox3.TabStop = false; this.groupBox3.Text = "连接故障"; @@ -223,22 +235,23 @@ this.deviceNoDataGridViewTextBoxColumn2, this.timeSpanDataGridViewTextBoxColumn}); this.HeartbeatData.DataSource = this.rFIDHeartbeatBindingSource; - this.HeartbeatData.Location = new System.Drawing.Point(4, 19); + this.HeartbeatData.Dock = System.Windows.Forms.DockStyle.Fill; + this.HeartbeatData.Location = new System.Drawing.Point(2, 16); this.HeartbeatData.Margin = new System.Windows.Forms.Padding(2); this.HeartbeatData.Name = "HeartbeatData"; this.HeartbeatData.RowHeadersVisible = false; this.HeartbeatData.RowHeadersWidth = 51; this.HeartbeatData.RowTemplate.Height = 20; - this.HeartbeatData.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.HeartbeatData.Size = new System.Drawing.Size(177, 437); + this.HeartbeatData.Size = new System.Drawing.Size(182, 640); this.HeartbeatData.TabIndex = 0; // // PgUp // - this.PgUp.Location = new System.Drawing.Point(9, 59); + this.PgUp.Dock = System.Windows.Forms.DockStyle.Left; + this.PgUp.Location = new System.Drawing.Point(3, 17); this.PgUp.Margin = new System.Windows.Forms.Padding(2); this.PgUp.Name = "PgUp"; - this.PgUp.Size = new System.Drawing.Size(101, 40); + this.PgUp.Size = new System.Drawing.Size(101, 45); this.PgUp.TabIndex = 8; this.PgUp.Text = "上一页"; this.PgUp.UseVisualStyleBackColor = true; @@ -246,10 +259,11 @@ // // PgDn // - this.PgDn.Location = new System.Drawing.Point(394, 59); + this.PgDn.Dock = System.Windows.Forms.DockStyle.Right; + this.PgDn.Location = new System.Drawing.Point(393, 17); this.PgDn.Margin = new System.Windows.Forms.Padding(2); this.PgDn.Name = "PgDn"; - this.PgDn.Size = new System.Drawing.Size(101, 40); + this.PgDn.Size = new System.Drawing.Size(101, 45); this.PgDn.TabIndex = 13; this.PgDn.Text = "下一页"; this.PgDn.UseVisualStyleBackColor = true; @@ -260,7 +274,7 @@ this.PageRange.AutoSize = true; this.PageRange.BackColor = System.Drawing.Color.Transparent; this.PageRange.Font = new System.Drawing.Font("宋体", 12F); - this.PageRange.Location = new System.Drawing.Point(255, 69); + this.PageRange.Location = new System.Drawing.Point(259, 29); this.PageRange.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.PageRange.Name = "PageRange"; this.PageRange.Size = new System.Drawing.Size(55, 16); @@ -271,7 +285,7 @@ // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("宋体", 12F); - this.label3.Location = new System.Drawing.Point(186, 69); + this.label3.Location = new System.Drawing.Point(168, 29); this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(87, 16); @@ -280,7 +294,7 @@ // // LogStart // - this.LogStart.Location = new System.Drawing.Point(595, 11); + this.LogStart.Location = new System.Drawing.Point(285, 71); this.LogStart.Margin = new System.Windows.Forms.Padding(2); this.LogStart.Name = "LogStart"; this.LogStart.Size = new System.Drawing.Size(85, 45); @@ -289,41 +303,48 @@ this.LogStart.UseVisualStyleBackColor = true; this.LogStart.Click += new System.EventHandler(this.LogStart_Click); // - // deviceNoDataGridViewTextBoxColumn2 + // ControlGrupbox // - this.deviceNoDataGridViewTextBoxColumn2.DataPropertyName = "DeviceNo"; - this.deviceNoDataGridViewTextBoxColumn2.HeaderText = "编号"; - this.deviceNoDataGridViewTextBoxColumn2.MinimumWidth = 6; - this.deviceNoDataGridViewTextBoxColumn2.Name = "deviceNoDataGridViewTextBoxColumn2"; - this.deviceNoDataGridViewTextBoxColumn2.Width = 60; + this.ControlGrupbox.Controls.Add(this.LogStart); + this.ControlGrupbox.Controls.Add(this.MonitorOnOff); + this.ControlGrupbox.Controls.Add(this.label4); + this.ControlGrupbox.Controls.Add(this.MonitorState); + this.ControlGrupbox.Controls.Add(this.IPText); + this.ControlGrupbox.Controls.Add(this.PortText); + this.ControlGrupbox.Controls.Add(this.SetAddress); + this.ControlGrupbox.Controls.Add(this.label1); + this.ControlGrupbox.Location = new System.Drawing.Point(518, 12); + this.ControlGrupbox.Name = "ControlGrupbox"; + this.ControlGrupbox.Size = new System.Drawing.Size(375, 121); + this.ControlGrupbox.TabIndex = 17; + this.ControlGrupbox.TabStop = false; + this.ControlGrupbox.Text = "控制面板"; // - // timeSpanDataGridViewTextBoxColumn + // MainReadGroupBox // - this.timeSpanDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.timeSpanDataGridViewTextBoxColumn.DataPropertyName = "TimeSpan"; - this.timeSpanDataGridViewTextBoxColumn.HeaderText = "距上一次心跳时间"; - this.timeSpanDataGridViewTextBoxColumn.MinimumWidth = 6; - this.timeSpanDataGridViewTextBoxColumn.Name = "timeSpanDataGridViewTextBoxColumn"; + this.MainReadGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.MainReadGroupBox.AutoSize = true; + this.MainReadGroupBox.Controls.Add(this.CotentData); + this.MainReadGroupBox.Location = new System.Drawing.Point(12, 83); + this.MainReadGroupBox.Name = "MainReadGroupBox"; + this.MainReadGroupBox.Size = new System.Drawing.Size(497, 716); + this.MainReadGroupBox.TabIndex = 18; + this.MainReadGroupBox.TabStop = false; + this.MainReadGroupBox.Text = "数据监控"; // - // rFIDHeartbeatBindingSource + // PageGroupBox // - this.rFIDHeartbeatBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDHeartbeat); - // - // deviceNoDataGridViewTextBoxColumn1 - // - this.deviceNoDataGridViewTextBoxColumn1.DataPropertyName = "DeviceNo"; - this.deviceNoDataGridViewTextBoxColumn1.HeaderText = "编号"; - this.deviceNoDataGridViewTextBoxColumn1.MinimumWidth = 6; - this.deviceNoDataGridViewTextBoxColumn1.Name = "deviceNoDataGridViewTextBoxColumn1"; - this.deviceNoDataGridViewTextBoxColumn1.Width = 60; - // - // rFIDStateBindingSource - // - this.rFIDStateBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDState); - // - // rFIDContentBindingSource - // - this.rFIDContentBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDContent); + this.PageGroupBox.Controls.Add(this.label3); + this.PageGroupBox.Controls.Add(this.PgDn); + this.PageGroupBox.Controls.Add(this.PgUp); + this.PageGroupBox.Controls.Add(this.PageRange); + this.PageGroupBox.Location = new System.Drawing.Point(12, 12); + this.PageGroupBox.Name = "PageGroupBox"; + this.PageGroupBox.Size = new System.Drawing.Size(497, 65); + this.PageGroupBox.TabIndex = 0; + this.PageGroupBox.TabStop = false; + this.PageGroupBox.Text = "页码控制"; // // deviceNoDataGridViewTextBoxColumn // @@ -357,38 +378,69 @@ this.logTimeDataGridViewTextBoxColumn.Name = "logTimeDataGridViewTextBoxColumn"; this.logTimeDataGridViewTextBoxColumn.Width = 105; // + // rFIDContentBindingSource + // + this.rFIDContentBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDContent); + // + // deviceNoDataGridViewTextBoxColumn2 + // + this.deviceNoDataGridViewTextBoxColumn2.DataPropertyName = "DeviceNo"; + this.deviceNoDataGridViewTextBoxColumn2.HeaderText = "编号"; + this.deviceNoDataGridViewTextBoxColumn2.MinimumWidth = 6; + this.deviceNoDataGridViewTextBoxColumn2.Name = "deviceNoDataGridViewTextBoxColumn2"; + this.deviceNoDataGridViewTextBoxColumn2.Width = 60; + // + // timeSpanDataGridViewTextBoxColumn + // + this.timeSpanDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.timeSpanDataGridViewTextBoxColumn.DataPropertyName = "TimeSpan"; + this.timeSpanDataGridViewTextBoxColumn.HeaderText = "距上一次心跳时间"; + this.timeSpanDataGridViewTextBoxColumn.MinimumWidth = 6; + this.timeSpanDataGridViewTextBoxColumn.Name = "timeSpanDataGridViewTextBoxColumn"; + // + // rFIDHeartbeatBindingSource + // + this.rFIDHeartbeatBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDHeartbeat); + // + // deviceNoDataGridViewTextBoxColumn1 + // + this.deviceNoDataGridViewTextBoxColumn1.DataPropertyName = "DeviceNo"; + this.deviceNoDataGridViewTextBoxColumn1.HeaderText = "编号"; + this.deviceNoDataGridViewTextBoxColumn1.MinimumWidth = 6; + this.deviceNoDataGridViewTextBoxColumn1.Name = "deviceNoDataGridViewTextBoxColumn1"; + this.deviceNoDataGridViewTextBoxColumn1.Width = 60; + // + // rFIDStateBindingSource + // + this.rFIDStateBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDState); + // // RFIDSocket // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(695, 983); - this.Controls.Add(this.LogStart); - this.Controls.Add(this.PageRange); - this.Controls.Add(this.label3); - this.Controls.Add(this.IPText); - this.Controls.Add(this.PgDn); - this.Controls.Add(this.SetAddress); - this.Controls.Add(this.label1); - this.Controls.Add(this.PgUp); - this.Controls.Add(this.PortText); + this.ClientSize = new System.Drawing.Size(909, 811); + this.Controls.Add(this.PageGroupBox); + this.Controls.Add(this.MainReadGroupBox); + this.Controls.Add(this.ControlGrupbox); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.MonitorState); - this.Controls.Add(this.label4); - this.Controls.Add(this.MonitorOnOff); - this.Controls.Add(this.CotentData); this.Margin = new System.Windows.Forms.Padding(2); this.Name = "RFIDSocket"; - this.Text = " 小件监听"; + this.Text = "小件监控"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.RFIDSocket_FormClosing); ((System.ComponentModel.ISupportInitialize)(this.CotentData)).EndInit(); this.groupBox2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.StateData)).EndInit(); this.groupBox3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.HeartbeatData)).EndInit(); + this.ControlGrupbox.ResumeLayout(false); + this.ControlGrupbox.PerformLayout(); + this.MainReadGroupBox.ResumeLayout(false); + this.PageGroupBox.ResumeLayout(false); + this.PageGroupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rFIDHeartbeatBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rFIDStateBindingSource)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -425,6 +477,9 @@ private System.Windows.Forms.DataGridViewTextBoxColumn readKindDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn contentDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn logTimeDataGridViewTextBoxColumn; + private System.Windows.Forms.GroupBox ControlGrupbox; + private System.Windows.Forms.GroupBox MainReadGroupBox; + private System.Windows.Forms.GroupBox PageGroupBox; } } diff --git a/RFIDSocket/RFIDSocket.cs b/RFIDSocket/RFIDSocket.cs index 6f2ec5e..1a23553 100644 --- a/RFIDSocket/RFIDSocket.cs +++ b/RFIDSocket/RFIDSocket.cs @@ -3,6 +3,7 @@ using HighWayIot.TouchSocket; using System; using System.Collections.Generic; using System.ComponentModel; +using System.Configuration; using System.Data; using System.Drawing; using System.Linq; @@ -20,9 +21,10 @@ namespace RFIDSocket private static DataAnalysis RFIDData = DataAnalysis.Instance; + Configuration Config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); - string Port = "1234"; - string IP = "127.0.0.1"; + string Port = string.Empty; + string IP = string.Empty; int PageNo = 1; @@ -45,10 +47,11 @@ namespace RFIDSocket MonitorState.BackColor = Color.LightGreen; } + IPText.Text = ConfigurationManager.AppSettings["IpSetting"]; + PortText.Text = ConfigurationManager.AppSettings["PortSetting"]; + Port = PortText.Text; IP = IPText.Text; - - } private void MonitorOnOff_Click(object sender, EventArgs e) @@ -81,8 +84,12 @@ namespace RFIDSocket private void SetPort_Click(object sender, EventArgs e) { + Config.AppSettings.Settings["IpSetting"].Value = IPText.Text; + Config.AppSettings.Settings["PortSetting"].Value = PortText.Text; + Config.Save(); Port = PortText.Text; IP = IPText.Text; + MessageBox.Show("设置成功"); } private void TableTimer_Tick(object sender, EventArgs e) @@ -106,14 +113,7 @@ namespace RFIDSocket StateData.DataSource = null; HeartbeatData.DataSource = null; - switch (PageNo) - { - case 1: ContentPages(0); PageRange.Text = "0 - 50"; break; - case 2: ContentPages(50); PageRange.Text = "51 - 100"; break; - case 3: ContentPages(100); PageRange.Text = "101 - 150"; break; - case 4: ContentPages(150); PageRange.Text = "151 - 200"; break; - default: ContentPages(0); PageRange.Text = "0 - 50"; break; - } + ContentPages(); StateData.DataSource = RFIDData.AlarmState; HeartbeatData.DataSource = RFIDData.HeartbeatsState; @@ -136,9 +136,10 @@ namespace RFIDSocket } } - private void ContentPages(int skip) + private void ContentPages() { - CotentData.DataSource = RFIDData.rFIDContents.Skip(skip).Take(50).ToList(); + CotentData.DataSource = RFIDData.rFIDContents.Skip((PageNo - 1) * 50).Take(50).ToList(); + PageRange.Text = $"{((PageNo - 1) * 50) + 1} - {PageNo * 50}"; } private void PgUp_Click(object sender, EventArgs e) @@ -149,6 +150,7 @@ namespace RFIDSocket return; } PageNo--; + ContentPages(); } private void PgDn_Click(object sender, EventArgs e) @@ -159,6 +161,7 @@ namespace RFIDSocket return; } PageNo++; + ContentPages(); } private void LogStart_Click(object sender, EventArgs e) @@ -166,5 +169,6 @@ namespace RFIDSocket RFIDLog rFIDLog = new RFIDLog(); rFIDLog.Show(); } + } } diff --git a/RFIDSocket/RFIDSocket.csproj b/RFIDSocket/RFIDSocket.csproj index ff0c60d..389f55d 100644 --- a/RFIDSocket/RFIDSocket.csproj +++ b/RFIDSocket/RFIDSocket.csproj @@ -12,6 +12,23 @@ 512 true true + false + D:\Temp\publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + true + 5 + 1.0.0.%2a + false + true + true AnyCPU @@ -32,6 +49,24 @@ prompt 4 + + 5E2ED24B569BA2C926B52FC668C9951F6908C35B + + + RFIDSocket_TemporaryKey.pfx + + + true + + + true + + + LocalIntranet + + + Properties\app.manifest + ..\packages\BouncyCastle.Cryptography.2.3.1\lib\net461\BouncyCastle.Cryptography.dll @@ -140,6 +175,7 @@ RFIDSocket.cs + @@ -152,6 +188,7 @@ Settings.settings True + @@ -175,5 +212,17 @@ + + + False + Microsoft .NET Framework 4.8 %28x86 和 x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file diff --git a/RFIDSocket/RFIDSocket.resx b/RFIDSocket/RFIDSocket.resx index 452205c..743e470 100644 --- a/RFIDSocket/RFIDSocket.resx +++ b/RFIDSocket/RFIDSocket.resx @@ -129,16 +129,7 @@ 413, 17 - - True - 646, 17 - - 646, 17 - - - 413, 17 - \ No newline at end of file