فهرست منبع

modify:调整列表等页面大小

runming56 1 سال پیش
والد
کامیت
abbc0fe66b

BIN
.vs/lqnet/FileContentIndex/042586dd-ce66-40b6-a698-5031597cc726.vsidx


.vs/lqnet/FileContentIndex/efef368e-ed70-4e90-8b9d-e32974b55a1d.vsidx → .vs/lqnet/FileContentIndex/4efa1d86-932b-4c27-abfa-7ebba356bcc9.vsidx


BIN
.vs/lqnet/FileContentIndex/76afbc4f-5024-496f-a856-1215a5284c38.vsidx


BIN
.vs/lqnet/v17/.suo


+ 1 - 1
lqnet/Api/MyConstants.cs

@@ -33,7 +33,7 @@ namespace lqnet.Api
     }
     public class VariablesGlobal
     {
-        public static string IP_PORT = "http://10.60.102.252:8190/";
+        public static string IP_PORT = "http://192.168.1.4:8190/";
         public static string USER_TOKEN = "";
     }
 }

+ 4 - 0
lqnet/Entities/DeviceInfo.cs

@@ -35,5 +35,9 @@ namespace lqnet.Entities
         /// 设备参数
         /// </summary>
         public string equitParameter { set;get;}
+        /// <summary>
+        /// 生产厂家
+        /// </summary>
+        public string prodeFactory { set; get; }
     }
 }

+ 104 - 85
lqnet/Forms/DevicePopupForm.cs

@@ -34,12 +34,6 @@ namespace lqnet.Forms
         private System.Windows.Forms.TextBox deviceNoTb;
         private System.Windows.Forms.Button searchBtn;
         private DataGridView dataGridView1;
-        private DataGridViewTextBoxColumn indexDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn equitChildTypeDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn propertyCodeDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn equitNameDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn manageEquitCodeDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn equitParameterDataGridViewTextBoxColumn;
         private System.Windows.Forms.Button resetBtn;
         private System.Windows.Forms.TextBox deviceNameTb;
         private Label deviceNameLabel;
@@ -47,6 +41,13 @@ namespace lqnet.Forms
         private Label prodtFactoryLabel;
         private System.Windows.Forms.TextBox manageCodeTb;
         private Label mangeCodeLabel;
+        private DataGridViewTextBoxColumn indexDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn propertyCodeDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn equitNameDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn equitChildTypeDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn manageEquitCodeDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn prodeFactory;
+        private DataGridViewTextBoxColumn equitParameterDataGridViewTextBoxColumn;
         private BindingSource deviceListBindingSource;
 
         public DevicePopupForm()
@@ -57,14 +58,7 @@ namespace lqnet.Forms
         {
             this.components = new System.ComponentModel.Container();
             this.dataGridView1 = new System.Windows.Forms.DataGridView();
-            this.indexDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.propertyCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.equitNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.equitChildTypeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.manageEquitCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.equitParameterDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.deviceListBindingSource = new System.Windows.Forms.BindingSource(this.components);
-            this.pageHelper2 = new lqnet.Utils.PageHelper2();
             this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
             this.okBtn = new System.Windows.Forms.Button();
             this.cancelBtn = new System.Windows.Forms.Button();
@@ -78,6 +72,14 @@ namespace lqnet.Forms
             this.prodtFactoryLabel = new System.Windows.Forms.Label();
             this.manageCodeTb = new System.Windows.Forms.TextBox();
             this.mangeCodeLabel = new System.Windows.Forms.Label();
+            this.pageHelper2 = new lqnet.Utils.PageHelper2();
+            this.indexDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.propertyCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.equitNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.equitChildTypeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.manageEquitCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.prodeFactory = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.equitParameterDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.deviceListBindingSource)).BeginInit();
             this.SuspendLayout();
@@ -92,6 +94,7 @@ namespace lqnet.Forms
             this.equitNameDataGridViewTextBoxColumn,
             this.equitChildTypeDataGridViewTextBoxColumn,
             this.manageEquitCodeDataGridViewTextBoxColumn,
+            this.prodeFactory,
             this.equitParameterDataGridViewTextBoxColumn});
             this.dataGridView1.DataSource = this.deviceListBindingSource;
             this.dataGridView1.Location = new System.Drawing.Point(13, 121);
@@ -99,74 +102,13 @@ namespace lqnet.Forms
             this.dataGridView1.RowHeadersWidth = 62;
             this.dataGridView1.RowTemplate.Height = 30;
             this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.dataGridView1.Size = new System.Drawing.Size(936, 278);
+            this.dataGridView1.Size = new System.Drawing.Size(894, 278);
             this.dataGridView1.TabIndex = 0;
             // 
-            // indexDataGridViewTextBoxColumn
-            // 
-            this.indexDataGridViewTextBoxColumn.DataPropertyName = "Index";
-            this.indexDataGridViewTextBoxColumn.HeaderText = "序号";
-            this.indexDataGridViewTextBoxColumn.MinimumWidth = 8;
-            this.indexDataGridViewTextBoxColumn.Name = "indexDataGridViewTextBoxColumn";
-            this.indexDataGridViewTextBoxColumn.Width = 150;
-            // 
-            // propertyCodeDataGridViewTextBoxColumn
-            // 
-            this.propertyCodeDataGridViewTextBoxColumn.DataPropertyName = "propertyCode";
-            this.propertyCodeDataGridViewTextBoxColumn.HeaderText = "资产编号";
-            this.propertyCodeDataGridViewTextBoxColumn.MinimumWidth = 8;
-            this.propertyCodeDataGridViewTextBoxColumn.Name = "propertyCodeDataGridViewTextBoxColumn";
-            this.propertyCodeDataGridViewTextBoxColumn.Width = 150;
-            // 
-            // equitNameDataGridViewTextBoxColumn
-            // 
-            this.equitNameDataGridViewTextBoxColumn.DataPropertyName = "equitName";
-            this.equitNameDataGridViewTextBoxColumn.HeaderText = "设备名称";
-            this.equitNameDataGridViewTextBoxColumn.MinimumWidth = 8;
-            this.equitNameDataGridViewTextBoxColumn.Name = "equitNameDataGridViewTextBoxColumn";
-            this.equitNameDataGridViewTextBoxColumn.Width = 150;
-            // 
-            // equitChildTypeDataGridViewTextBoxColumn
-            // 
-            this.equitChildTypeDataGridViewTextBoxColumn.DataPropertyName = "equitChildType";
-            this.equitChildTypeDataGridViewTextBoxColumn.HeaderText = "设备类型";
-            this.equitChildTypeDataGridViewTextBoxColumn.MinimumWidth = 8;
-            this.equitChildTypeDataGridViewTextBoxColumn.Name = "equitChildTypeDataGridViewTextBoxColumn";
-            this.equitChildTypeDataGridViewTextBoxColumn.Width = 150;
-            // 
-            // manageEquitCodeDataGridViewTextBoxColumn
-            // 
-            this.manageEquitCodeDataGridViewTextBoxColumn.DataPropertyName = "manageEquitCode";
-            this.manageEquitCodeDataGridViewTextBoxColumn.HeaderText = "管理编号";
-            this.manageEquitCodeDataGridViewTextBoxColumn.MinimumWidth = 8;
-            this.manageEquitCodeDataGridViewTextBoxColumn.Name = "manageEquitCodeDataGridViewTextBoxColumn";
-            this.manageEquitCodeDataGridViewTextBoxColumn.Width = 150;
-            // 
-            // equitParameterDataGridViewTextBoxColumn
-            // 
-            this.equitParameterDataGridViewTextBoxColumn.DataPropertyName = "equitParameter";
-            this.equitParameterDataGridViewTextBoxColumn.HeaderText = "设备参数";
-            this.equitParameterDataGridViewTextBoxColumn.MinimumWidth = 8;
-            this.equitParameterDataGridViewTextBoxColumn.Name = "equitParameterDataGridViewTextBoxColumn";
-            this.equitParameterDataGridViewTextBoxColumn.Width = 150;
-            // 
             // deviceListBindingSource
             // 
             this.deviceListBindingSource.DataSource = typeof(lqnet.Entities.DeviceInfo);
             // 
-            // pageHelper2
-            // 
-            this.pageHelper2.AllPage = 1;
-            this.pageHelper2.Location = new System.Drawing.Point(-46, 414);
-            this.pageHelper2.Margin = new System.Windows.Forms.Padding(2);
-            this.pageHelper2.Name = "pageHelper2";
-            this.pageHelper2.NowPage = 1;
-            this.pageHelper2.PageSize = 5;
-            this.pageHelper2.Size = new System.Drawing.Size(995, 56);
-            this.pageHelper2.TabIndex = 21;
-            this.pageHelper2.Total = 0;
-            this.pageHelper2.Load += new System.EventHandler(this.PageHelper2_Load);
-            // 
             // okBtn
             // 
             this.okBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(59)))), ((int)(((byte)(124)))), ((int)(((byte)(255)))));
@@ -175,7 +117,7 @@ namespace lqnet.Forms
             this.okBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
             this.okBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.okBtn.ForeColor = System.Drawing.Color.White;
-            this.okBtn.Location = new System.Drawing.Point(630, 481);
+            this.okBtn.Location = new System.Drawing.Point(604, 476);
             this.okBtn.Name = "okBtn";
             this.okBtn.Size = new System.Drawing.Size(131, 46);
             this.okBtn.TabIndex = 22;
@@ -191,7 +133,7 @@ namespace lqnet.Forms
             this.cancelBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
             this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.cancelBtn.ForeColor = System.Drawing.Color.White;
-            this.cancelBtn.Location = new System.Drawing.Point(797, 481);
+            this.cancelBtn.Location = new System.Drawing.Point(771, 476);
             this.cancelBtn.Name = "cancelBtn";
             this.cancelBtn.Size = new System.Drawing.Size(125, 46);
             this.cancelBtn.TabIndex = 23;
@@ -224,7 +166,7 @@ namespace lqnet.Forms
             this.searchBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
             this.searchBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.searchBtn.ForeColor = System.Drawing.Color.White;
-            this.searchBtn.Location = new System.Drawing.Point(781, 67);
+            this.searchBtn.Location = new System.Drawing.Point(782, 67);
             this.searchBtn.Name = "searchBtn";
             this.searchBtn.Size = new System.Drawing.Size(112, 39);
             this.searchBtn.TabIndex = 26;
@@ -239,7 +181,7 @@ namespace lqnet.Forms
             this.resetBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
             this.resetBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.resetBtn.ForeColor = System.Drawing.Color.Blue;
-            this.resetBtn.Location = new System.Drawing.Point(649, 67);
+            this.resetBtn.Location = new System.Drawing.Point(650, 67);
             this.resetBtn.Name = "resetBtn";
             this.resetBtn.Size = new System.Drawing.Size(112, 39);
             this.resetBtn.TabIndex = 27;
@@ -298,12 +240,76 @@ namespace lqnet.Forms
             this.mangeCodeLabel.TabIndex = 30;
             this.mangeCodeLabel.Text = "管理编号";
             // 
+            // pageHelper2
+            // 
+            this.pageHelper2.AllPage = 1;
+            this.pageHelper2.Location = new System.Drawing.Point(274, 404);
+            this.pageHelper2.Margin = new System.Windows.Forms.Padding(2);
+            this.pageHelper2.Name = "pageHelper2";
+            this.pageHelper2.NowPage = 1;
+            this.pageHelper2.PageSize = 5;
+            this.pageHelper2.Size = new System.Drawing.Size(999, 66);
+            this.pageHelper2.TabIndex = 21;
+            this.pageHelper2.Total = 0;
+            this.pageHelper2.Load += new System.EventHandler(this.PageHelper2_Load);
+            // 
+            // indexDataGridViewTextBoxColumn
+            // 
+            this.indexDataGridViewTextBoxColumn.DataPropertyName = "Index";
+            this.indexDataGridViewTextBoxColumn.HeaderText = "序号";
+            this.indexDataGridViewTextBoxColumn.MinimumWidth = 8;
+            this.indexDataGridViewTextBoxColumn.Name = "indexDataGridViewTextBoxColumn";
+            this.indexDataGridViewTextBoxColumn.Width = 80;
+            // 
+            // propertyCodeDataGridViewTextBoxColumn
+            // 
+            this.propertyCodeDataGridViewTextBoxColumn.DataPropertyName = "propertyCode";
+            this.propertyCodeDataGridViewTextBoxColumn.HeaderText = "资产编号";
+            this.propertyCodeDataGridViewTextBoxColumn.MinimumWidth = 8;
+            this.propertyCodeDataGridViewTextBoxColumn.Name = "propertyCodeDataGridViewTextBoxColumn";
+            this.propertyCodeDataGridViewTextBoxColumn.Width = 130;
+            // 
+            // equitNameDataGridViewTextBoxColumn
+            // 
+            this.equitNameDataGridViewTextBoxColumn.DataPropertyName = "equitName";
+            this.equitNameDataGridViewTextBoxColumn.HeaderText = "设备名称";
+            this.equitNameDataGridViewTextBoxColumn.MinimumWidth = 8;
+            this.equitNameDataGridViewTextBoxColumn.Name = "equitNameDataGridViewTextBoxColumn";
+            this.equitNameDataGridViewTextBoxColumn.Width = 150;
+            // 
+            // equitChildTypeDataGridViewTextBoxColumn
+            // 
+            this.equitChildTypeDataGridViewTextBoxColumn.DataPropertyName = "equitChildType";
+            this.equitChildTypeDataGridViewTextBoxColumn.HeaderText = "设备类型";
+            this.equitChildTypeDataGridViewTextBoxColumn.MinimumWidth = 8;
+            this.equitChildTypeDataGridViewTextBoxColumn.Name = "equitChildTypeDataGridViewTextBoxColumn";
+            // 
+            // manageEquitCodeDataGridViewTextBoxColumn
+            // 
+            this.manageEquitCodeDataGridViewTextBoxColumn.DataPropertyName = "manageEquitCode";
+            this.manageEquitCodeDataGridViewTextBoxColumn.HeaderText = "管理编号";
+            this.manageEquitCodeDataGridViewTextBoxColumn.MinimumWidth = 8;
+            this.manageEquitCodeDataGridViewTextBoxColumn.Name = "manageEquitCodeDataGridViewTextBoxColumn";
+            // 
+            // prodeFactory
+            // 
+            this.prodeFactory.HeaderText = "生产厂家";
+            this.prodeFactory.MinimumWidth = 8;
+            this.prodeFactory.Name = "prodeFactory";
+            this.prodeFactory.Width = 120;
+            // 
+            // equitParameterDataGridViewTextBoxColumn
+            // 
+            this.equitParameterDataGridViewTextBoxColumn.DataPropertyName = "prodeFactory";
+            this.equitParameterDataGridViewTextBoxColumn.HeaderText = "设备参数";
+            this.equitParameterDataGridViewTextBoxColumn.MinimumWidth = 8;
+            this.equitParameterDataGridViewTextBoxColumn.Name = "equitParameterDataGridViewTextBoxColumn";
+            this.equitParameterDataGridViewTextBoxColumn.Width = 150;
+            // 
             // DevicePopupForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
-            this.AutoScroll = true;
-            this.ClientSize = new System.Drawing.Size(961, 536);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+            this.ClientSize = new System.Drawing.Size(908, 534);
             this.Controls.Add(this.prodtFactoryTb);
             this.Controls.Add(this.prodtFactoryLabel);
             this.Controls.Add(this.manageCodeTb);
@@ -449,8 +455,17 @@ namespace lqnet.Forms
             {
                 dto.prodeFactory = prodtFactory;
             }
-
-            R rs = CallApi.queryDeviceList(dto);
+            R rs = null;
+            try
+            {
+                rs = CallApi.queryDeviceList(dto);
+            }catch
+            {
+                MessageBox.Show("任务列表查询错误,请检查网络.", "提示", MessageBoxButtons.OK);
+                this.pageHelper2.NumberSelectInit();
+                return;
+            }
+            
             if (rs.Code == MyConstants.CODE_SUCCESS_200)
             {
                 DevicePage page = null;
@@ -512,6 +527,10 @@ namespace lqnet.Forms
         private void resetBtn_Click(object sender, EventArgs e)
         {
             this.deviceNoTb.Text = string.Empty;
+            this.deviceNameTb.Text = string.Empty;
+            this.manageCodeTb.Text = string.Empty;
+            this.prodtFactoryTb.Text = string.Empty;
+            searchDevice();
         }
     }
 }

+ 9 - 0
lqnet/Forms/DevicePopupForm.resx

@@ -117,12 +117,21 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="prodeFactory.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="deviceListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <metadata name="deviceListBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
   <metadata name="pageSetupDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>294, 17</value>
   </metadata>
+  <metadata name="prodeFactory.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 21 - 11
lqnet/Forms/LoginForm.cs

@@ -151,14 +151,17 @@ namespace lqnet
             if (string.IsNullOrEmpty(u))
             {
                 MessageBox.Show("用户名需要填写!", "提示", MessageBoxButtons.OK);
+                return;
             }
             else if (string.IsNullOrEmpty(p))
             {
                 MessageBox.Show("密码需要填写!", "提示", MessageBoxButtons.OK);
+                return;
             }
             else if (deviceInfo == null)
             {
                 MessageBox.Show("请选择设备信息!", "提示", MessageBoxButtons.OK);
+                return;
             }
             else
             {
@@ -262,21 +265,28 @@ namespace lqnet
         private void chooseDeviceBtn_Click(object sender, EventArgs e)
         {
             DevicePopupForm devicePopup = new DevicePopupForm();
-            DialogResult result = devicePopup.ShowDialog();
-            // 根据对话框返回的结果,获取选择的数据
-            if (result == DialogResult.OK)
+            try
             {
-                DeviceInfo selectedData = devicePopup.GetSelectedData();
-                if(selectedData != null)
+                DialogResult result = devicePopup.ShowDialog();
+                // 根据对话框返回的结果,获取选择的数据
+                if (result == DialogResult.OK)
                 {
-                    this.deviceListCombox.Items.Clear();
-                    this.deviceListCombox.Items.Add(selectedData);
-                    this.deviceListCombox.DisplayMember = "equitName";
-                    this.deviceListCombox.ValueMember = "propertyCode";
-                    this.deviceListCombox.SelectedIndex = 0;
+                    DeviceInfo selectedData = devicePopup.GetSelectedData();
+                    if (selectedData != null)
+                    {
+                        this.deviceListCombox.Items.Clear();
+                        this.deviceListCombox.Items.Add(selectedData);
+                        this.deviceListCombox.DisplayMember = "equitName";
+                        this.deviceListCombox.ValueMember = "propertyCode";
+                        this.deviceListCombox.SelectedIndex = 0;
+                    }
+                    // MessageBox.Show("选择的数据是:" + selectedData);
                 }
-               // MessageBox.Show("选择的数据是:" + selectedData);
+            } catch (Exception)
+            {
+                devicePopup.Close();
             }
+           
         }
     }
 }

+ 58 - 65
lqnet/Forms/MainForm.Designer.cs

@@ -51,9 +51,9 @@ namespace lqnet.Forms
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
             this.prodtDesig_sel = new System.Windows.Forms.TextBox();
             this.dataGridView1 = new System.Windows.Forms.DataGridView();
             this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -74,7 +74,6 @@ namespace lqnet.Forms
             this.startIdxLabel = new System.Windows.Forms.Label();
             this.startIdxTextbox = new System.Windows.Forms.TextBox();
             this.mergeCountLabel = new System.Windows.Forms.Label();
-            this.mergeCountTextbox = new System.Windows.Forms.NumericUpDown();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.dataGridView2 = new System.Windows.Forms.DataGridView();
             this.indexDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -88,6 +87,7 @@ namespace lqnet.Forms
             this.groupBox2 = new System.Windows.Forms.GroupBox();
             this.pageHelper2 = new lqnet.Utils.PageHelper2();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.mergeCountTextbox = new System.Windows.Forms.TextBox();
             this.panel1 = new System.Windows.Forms.Panel();
             this.linkLabel1 = new System.Windows.Forms.LinkLabel();
             this.label3 = new System.Windows.Forms.Label();
@@ -95,7 +95,6 @@ namespace lqnet.Forms
             this.panel2 = new System.Windows.Forms.Panel();
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.taskListBindingSource)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.mergeCountTextbox)).BeginInit();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.reportColListBindingSource)).BeginInit();
@@ -120,8 +119,8 @@ namespace lqnet.Forms
             this.dataGridView1.AutoGenerateColumns = false;
             this.dataGridView1.BackgroundColor = System.Drawing.Color.SkyBlue;
             this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F);
-            this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F);
+            this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Index,
@@ -134,14 +133,14 @@ namespace lqnet.Forms
             this.groupProceIdDataGridViewTextBoxColumn,
             this.groupProceCodeDataGridViewTextBoxColumn});
             this.dataGridView1.DataSource = this.taskListBindingSource;
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 14F);
-            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 14F);
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2;
             this.dataGridView1.Location = new System.Drawing.Point(8, 81);
             this.dataGridView1.MultiSelect = false;
             this.dataGridView1.Name = "dataGridView1";
@@ -150,7 +149,7 @@ namespace lqnet.Forms
             this.dataGridView1.RowHeadersWidth = 82;
             this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.dataGridView1.ShowCellToolTips = false;
-            this.dataGridView1.Size = new System.Drawing.Size(1198, 396);
+            this.dataGridView1.Size = new System.Drawing.Size(1292, 396);
             this.dataGridView1.TabIndex = 2;
             this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView1_CellClick);
             // 
@@ -180,7 +179,7 @@ namespace lqnet.Forms
             this.prodtDesigDataGridViewTextBoxColumn.MinimumWidth = 10;
             this.prodtDesigDataGridViewTextBoxColumn.Name = "prodtDesigDataGridViewTextBoxColumn";
             this.prodtDesigDataGridViewTextBoxColumn.ReadOnly = true;
-            this.prodtDesigDataGridViewTextBoxColumn.Width = 290;
+            this.prodtDesigDataGridViewTextBoxColumn.Width = 180;
             // 
             // numDataGridViewTextBoxColumn
             // 
@@ -189,7 +188,7 @@ namespace lqnet.Forms
             this.numDataGridViewTextBoxColumn.MinimumWidth = 10;
             this.numDataGridViewTextBoxColumn.Name = "numDataGridViewTextBoxColumn";
             this.numDataGridViewTextBoxColumn.ReadOnly = true;
-            this.numDataGridViewTextBoxColumn.Width = 110;
+            this.numDataGridViewTextBoxColumn.Width = 130;
             // 
             // groupOrderCodeDataGridViewTextBoxColumn
             // 
@@ -198,7 +197,7 @@ namespace lqnet.Forms
             this.groupOrderCodeDataGridViewTextBoxColumn.MinimumWidth = 10;
             this.groupOrderCodeDataGridViewTextBoxColumn.Name = "groupOrderCodeDataGridViewTextBoxColumn";
             this.groupOrderCodeDataGridViewTextBoxColumn.ReadOnly = true;
-            this.groupOrderCodeDataGridViewTextBoxColumn.Width = 290;
+            this.groupOrderCodeDataGridViewTextBoxColumn.Width = 220;
             // 
             // proceNameDataGridViewTextBoxColumn
             // 
@@ -207,7 +206,7 @@ namespace lqnet.Forms
             this.proceNameDataGridViewTextBoxColumn.MinimumWidth = 10;
             this.proceNameDataGridViewTextBoxColumn.Name = "proceNameDataGridViewTextBoxColumn";
             this.proceNameDataGridViewTextBoxColumn.ReadOnly = true;
-            this.proceNameDataGridViewTextBoxColumn.Width = 290;
+            this.proceNameDataGridViewTextBoxColumn.Width = 220;
             // 
             // prodtBatchDataGridViewTextBoxColumn
             // 
@@ -216,7 +215,7 @@ namespace lqnet.Forms
             this.prodtBatchDataGridViewTextBoxColumn.MinimumWidth = 10;
             this.prodtBatchDataGridViewTextBoxColumn.Name = "prodtBatchDataGridViewTextBoxColumn";
             this.prodtBatchDataGridViewTextBoxColumn.ReadOnly = true;
-            this.prodtBatchDataGridViewTextBoxColumn.Width = 290;
+            this.prodtBatchDataGridViewTextBoxColumn.Width = 180;
             // 
             // groupProceIdDataGridViewTextBoxColumn
             // 
@@ -347,30 +346,12 @@ namespace lqnet.Forms
             this.mergeCountLabel.TabIndex = 30;
             this.mergeCountLabel.Text = "产品合并行数";
             // 
-            // mergeCountTextbox
-            // 
-            this.mergeCountTextbox.Location = new System.Drawing.Point(765, 72);
-            this.mergeCountTextbox.Minimum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.mergeCountTextbox.Name = "mergeCountTextbox";
-            this.mergeCountTextbox.Size = new System.Drawing.Size(180, 28);
-            this.mergeCountTextbox.TabIndex = 32;
-            this.mergeCountTextbox.UseWaitCursor = true;
-            this.mergeCountTextbox.Value = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            // 
             // groupBox1
             // 
             this.groupBox1.Controls.Add(this.dataGridView2);
             this.groupBox1.Location = new System.Drawing.Point(286, 119);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(926, 420);
+            this.groupBox1.Size = new System.Drawing.Size(1020, 420);
             this.groupBox1.TabIndex = 33;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "报告索引信息";
@@ -381,8 +362,8 @@ namespace lqnet.Forms
             this.dataGridView2.AutoGenerateColumns = false;
             this.dataGridView2.BackgroundColor = System.Drawing.Color.SkyBlue;
             this.dataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
-            this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 14F);
+            this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
             this.dataGridView2.ColumnHeadersHeight = 30;
             this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.indexDataGridViewTextBoxColumn,
@@ -399,7 +380,7 @@ namespace lqnet.Forms
             this.dataGridView2.RowTemplate.Height = 50;
             this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.dataGridView2.ShowCellToolTips = false;
-            this.dataGridView2.Size = new System.Drawing.Size(913, 391);
+            this.dataGridView2.Size = new System.Drawing.Size(1010, 400);
             this.dataGridView2.TabIndex = 34;
             // 
             // indexDataGridViewTextBoxColumn
@@ -408,6 +389,7 @@ namespace lqnet.Forms
             this.indexDataGridViewTextBoxColumn.HeaderText = "序号";
             this.indexDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.indexDataGridViewTextBoxColumn.Name = "indexDataGridViewTextBoxColumn";
+            this.indexDataGridViewTextBoxColumn.ReadOnly = true;
             this.indexDataGridViewTextBoxColumn.Width = 150;
             // 
             // importColLabelDataGridViewTextBoxColumn
@@ -416,7 +398,8 @@ namespace lqnet.Forms
             this.importColLabelDataGridViewTextBoxColumn.HeaderText = "导入报告列标签";
             this.importColLabelDataGridViewTextBoxColumn.MinimumWidth = 8;
             this.importColLabelDataGridViewTextBoxColumn.Name = "importColLabelDataGridViewTextBoxColumn";
-            this.importColLabelDataGridViewTextBoxColumn.Width = 300;
+            this.importColLabelDataGridViewTextBoxColumn.ReadOnly = true;
+            this.importColLabelDataGridViewTextBoxColumn.Width = 250;
             // 
             // lineColLabelDataGridViewTextBoxColumn
             // 
@@ -486,7 +469,7 @@ namespace lqnet.Forms
             this.groupBox2.Controls.Add(this.slectBt);
             this.groupBox2.Location = new System.Drawing.Point(3, 0);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(1206, 538);
+            this.groupBox2.Size = new System.Drawing.Size(1306, 538);
             this.groupBox2.TabIndex = 0;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "选择调度单";
@@ -495,7 +478,7 @@ namespace lqnet.Forms
             // 
             this.pageHelper2.AllPage = 1;
             this.pageHelper2.AutoScroll = true;
-            this.pageHelper2.Location = new System.Drawing.Point(379, 484);
+            this.pageHelper2.Location = new System.Drawing.Point(464, 484);
             this.pageHelper2.Margin = new System.Windows.Forms.Padding(2);
             this.pageHelper2.Name = "pageHelper2";
             this.pageHelper2.NowPage = 1;
@@ -507,13 +490,13 @@ namespace lqnet.Forms
             // 
             // groupBox3
             // 
+            this.groupBox3.Controls.Add(this.mergeCountTextbox);
             this.groupBox3.Controls.Add(this.groupBox1);
             this.groupBox3.Controls.Add(this.CheckItemComboBox);
             this.groupBox3.Controls.Add(this.currentFilePath);
             this.groupBox3.Controls.Add(this.choosedFileLabel);
             this.groupBox3.Controls.Add(this.parseReportBtn);
             this.groupBox3.Controls.Add(this.selectFileBt);
-            this.groupBox3.Controls.Add(this.mergeCountTextbox);
             this.groupBox3.Controls.Add(this.startIdxLabel);
             this.groupBox3.Controls.Add(this.uploadTrueBt);
             this.groupBox3.Controls.Add(this.startIdxTextbox);
@@ -521,11 +504,20 @@ namespace lqnet.Forms
             this.groupBox3.Controls.Add(this.checkLabel);
             this.groupBox3.Location = new System.Drawing.Point(3, 545);
             this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(1215, 548);
+            this.groupBox3.Size = new System.Drawing.Size(1309, 548);
             this.groupBox3.TabIndex = 39;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "数据配置";
             // 
+            // mergeCountTextbox
+            // 
+            this.mergeCountTextbox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.mergeCountTextbox.Location = new System.Drawing.Point(752, 70);
+            this.mergeCountTextbox.Name = "mergeCountTextbox";
+            this.mergeCountTextbox.Size = new System.Drawing.Size(165, 21);
+            this.mergeCountTextbox.TabIndex = 37;
+            this.mergeCountTextbox.Text = "1";
+            // 
             // panel1
             // 
             this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(188)))), ((int)(((byte)(188)))), ((int)(((byte)(188)))));
@@ -535,13 +527,13 @@ namespace lqnet.Forms
             this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.panel1.Location = new System.Drawing.Point(0, 1093);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1218, 59);
+            this.panel1.Size = new System.Drawing.Size(1312, 59);
             this.panel1.TabIndex = 40;
             // 
             // linkLabel1
             // 
             this.linkLabel1.AutoSize = true;
-            this.linkLabel1.Location = new System.Drawing.Point(997, 20);
+            this.linkLabel1.Location = new System.Drawing.Point(1094, 21);
             this.linkLabel1.Name = "linkLabel1";
             this.linkLabel1.Size = new System.Drawing.Size(80, 18);
             this.linkLabel1.TabIndex = 2;
@@ -554,7 +546,7 @@ namespace lqnet.Forms
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F);
             this.label3.ForeColor = System.Drawing.Color.White;
-            this.label3.Location = new System.Drawing.Point(522, 15);
+            this.label3.Location = new System.Drawing.Point(585, 15);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(133, 27);
             this.label3.TabIndex = 1;
@@ -580,7 +572,7 @@ namespace lqnet.Forms
             this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel2.Location = new System.Drawing.Point(0, 0);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1238, 744);
+            this.panel2.Size = new System.Drawing.Size(1338, 894);
             this.panel2.TabIndex = 41;
             // 
             // MainForm
@@ -588,10 +580,12 @@ namespace lqnet.Forms
             this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.AutoScroll = true;
-            this.ClientSize = new System.Drawing.Size(1238, 744);
+            this.ClientSize = new System.Drawing.Size(1338, 894);
             this.Controls.Add(this.panel2);
             this.Icon = global::lqnet.Properties.Resources.favicon;
-            this.MaximumSize = new System.Drawing.Size(1360, 1500);
+            this.MaximizeBox = false;
+            this.MaximumSize = new System.Drawing.Size(1360, 950);
+            this.MinimizeBox = false;
             this.Name = "MainForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "TDM测试台数据传输终端";
@@ -600,7 +594,6 @@ namespace lqnet.Forms
             this.Paint += new System.Windows.Forms.PaintEventHandler(this.Boder_Paint);
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.taskListBindingSource)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.mergeCountTextbox)).EndInit();
             this.groupBox1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.reportColListBindingSource)).EndInit();
@@ -628,20 +621,10 @@ namespace lqnet.Forms
         private Label startIdxLabel;
         private TextBox startIdxTextbox;
         private Label mergeCountLabel;
-        private NumericUpDown mergeCountTextbox;
         private GroupBox groupBox1;
         private DataGridView dataGridView2;
         private Button parseReportBtn;
         private BindingSource reportColListBindingSource;
-        private DataGridViewTextBoxColumn Index;
-        private DataGridViewTextBoxColumn idDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn prodtDesigDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn numDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn groupOrderCodeDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn proceNameDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn prodtBatchDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn groupProceIdDataGridViewTextBoxColumn;
-        private DataGridViewTextBoxColumn groupProceCodeDataGridViewTextBoxColumn;
         private Label label1;
         private Label currentFilePath;
         private Label choosedFileLabel;
@@ -652,6 +635,16 @@ namespace lqnet.Forms
         private Label label3;
         private Label label2;
         private Panel panel2;
+        private DataGridViewTextBoxColumn Index;
+        private DataGridViewTextBoxColumn idDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn prodtDesigDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn numDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn groupOrderCodeDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn proceNameDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn prodtBatchDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn groupProceIdDataGridViewTextBoxColumn;
+        private DataGridViewTextBoxColumn groupProceCodeDataGridViewTextBoxColumn;
+        private TextBox mergeCountTextbox;
         private DataGridViewTextBoxColumn indexDataGridViewTextBoxColumn;
         private DataGridViewTextBoxColumn importColLabelDataGridViewTextBoxColumn;
         private DataGridViewComboBoxColumn lineColLabelDataGridViewTextBoxColumn;

+ 89 - 24
lqnet/Forms/MainForm.cs

@@ -78,6 +78,19 @@ namespace lqnet.Forms
             this.GetAllInitInfo(this.Controls[0]);
         }
 
+        protected override void OnResize(EventArgs e)
+        {
+            base.OnResize(e);
+            this.Invalidate();
+            reInitComponent();
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            base.OnPaint(e);
+            e.Graphics.Clear(this.BackColor);
+        }
+
         /// <summary>
         /// 主界面
         /// </summary>
@@ -93,7 +106,8 @@ namespace lqnet.Forms
             this.dataGridView2.DataError += delegate (object o, DataGridViewDataErrorEventArgs ex) { };
             this.dataGridView2.CellValueChanged += new DataGridViewCellEventHandler(DataGridView2_CellValueChanged);
             this.startIdxTextbox.TextChanged += new EventHandler(StartIdxText_Changed);
-            this.mergeCountTextbox.ValueChanged += new EventHandler(MergeCountTextbox_Changed);
+            this.mergeCountTextbox.KeyPress += NumberTextBox_KeyPress;
+            this.mergeCountTextbox.TextChanged += new EventHandler(MergeCountTextbox_Changed);
             //居中
             int x = (System.Windows.Forms.SystemInformation.WorkingArea.Width - this.Size.Width) / 2;
             int y = (System.Windows.Forms.SystemInformation.WorkingArea.Height - this.Size.Height) / 2;
@@ -121,6 +135,15 @@ namespace lqnet.Forms
 
         }
 
+        private void NumberTextBox_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            // 只允许输入数字和控制字符(如退格键)
+            if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
+            {
+                e.Handled = true;
+            }
+        }
+
         private void StartIdxText_Changed(object sender, EventArgs e)
         {
             TextBox textBox = (TextBox)sender;
@@ -134,8 +157,18 @@ namespace lqnet.Forms
 
         private void MergeCountTextbox_Changed(object sender, EventArgs e)
         {
-            NumericUpDown textBox = (NumericUpDown)sender;
-            decimal newValue = textBox.Value; // 获取当前的值
+            TextBox textBox = (TextBox)sender;
+            if(string.IsNullOrEmpty(textBox.Text)
+                || string.IsNullOrWhiteSpace(textBox.Text))
+            {
+                textBox.Text = "1";
+            }
+            int newValue = int.Parse(textBox.Text); // 获取当前的值
+            if (newValue <= 0)
+            {
+                textBox.Text = "1";
+                newValue = 1;
+            }
             if (oldmergeCountTextboxValue>0 && newValue!=oldmergeCountTextboxValue)
             {
                 dataGridView2IsChange = true;
@@ -158,7 +191,15 @@ namespace lqnet.Forms
             string cofigPath = Path.Combine(filePath, _device.propertyCode + ".json");
             if (!File.Exists(cofigPath))
             {
-                readConfigFromRemote();
+                try
+                {
+                    readConfigFromRemote();
+                }
+                catch
+                {
+                    //未读到远程配置信息不做任何处理
+                    _configContexts = null;
+                }
             }
             else
             {
@@ -172,6 +213,7 @@ namespace lqnet.Forms
                     catch
                     {
                         //配置文件读取失败
+                        _configContexts = null;
                     }
                 }
             }
@@ -198,7 +240,9 @@ namespace lqnet.Forms
                 }
             } else
             {
-                MessageBox.Show("读取远程配置失败", "提示", MessageBoxButtons.OK);
+                _configContexts = null;
+                // MessageBox.Show("读取远程配置失败", "提示", MessageBoxButtons.OK);
+                //未读取到配置,不做任何处理
             }
         }
         /// <summary>
@@ -378,11 +422,11 @@ namespace lqnet.Forms
         /// <param name="e"></param>
         private void SlectBt_Click(object sender, EventArgs e)
         {
-            if (string.IsNullOrEmpty(this.prodtDesig_sel.Text))
-            {
-                MessageBox.Show("搜索时,产品代号必填", "提示", MessageBoxButtons.OK);
-                return;
-            }
+            //if (string.IsNullOrEmpty(this.prodtDesig_sel.Text))
+            //{
+            //    MessageBox.Show("搜索时,产品代号必填", "提示", MessageBoxButtons.OK);
+            //    return;
+            //}
             this.pageHelper2.NumberSelectInit();
             SelectTaskList();
         }
@@ -533,7 +577,7 @@ namespace lqnet.Forms
             return !MyConstants.NON_NULL_CHECK_CODE.Equals(item.CheckCode)
                 && !string.IsNullOrEmpty(this.currentFilePath.Text)
                 && !string.IsNullOrEmpty(this.startIdxTextbox.Text)
-                && this.mergeCountTextbox.Value > 0;
+                && int.Parse(this.mergeCountTextbox.Text) > 0;
         }
         /// <summary>
         /// 上传数据文件
@@ -576,7 +620,7 @@ namespace lqnet.Forms
                     devicceNo = this._device.propertyCode,
                     deviceName = this._device.equitName,
                     ProdtCodePosition = this.startIdxTextbox.Text.Trim(),
-                    MergeCount = int.Parse(this.mergeCountTextbox.Value.ToString())
+                    MergeCount = int.Parse(this.mergeCountTextbox.Text)
                 });
                 if (r.Code == MyConstants.CODE_SUCCESS_200)
                 {
@@ -661,17 +705,25 @@ namespace lqnet.Forms
 
             if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
-                this.Invoke((EventHandler)(delegate
+                try
                 {
-                    this.currentFilePath.Text = dialog.FileName;
-                    if (dataGridView2IsChange)
+                    this.Invoke((EventHandler)(delegate
                     {
-                        if (DialogResult.Yes == MessageBox.Show("检测到开始坐标或合并行数发生变动,是否重新加载配置进行手动配置处理?", "提示", MessageBoxButtons.YesNo))
+                        this.currentFilePath.Text = dialog.FileName;
+                        if (dataGridView2IsChange)
                         {
-                            loadReportColView();
+                            if (DialogResult.Yes == MessageBox.Show("检测到开始坐标或合并行数发生变动,是否重新加载配置进行手动配置处理?", "提示", MessageBoxButtons.YesNo))
+                            {
+                                loadReportColView();
+                            }
                         }
-                    }
-                }));
+                    }));
+                }
+                catch
+                {
+
+                }
+                
             }
             this.OnlyOneSelect = false;
         }
@@ -701,7 +753,7 @@ namespace lqnet.Forms
             DeviceConfigContext context = getCurDeviceConfigContext();
             if(context != null)
             {
-                this.mergeCountTextbox.Value = context.mergeCount;
+                this.mergeCountTextbox.Text = context.mergeCount.ToString();
                 this.startIdxTextbox.Text = context.startRow;
                 loadReportColView(false);
             }
@@ -739,7 +791,7 @@ namespace lqnet.Forms
             //this.currentCheckItem.Text = null;
             this.currentFilePath.Text = string.Empty;
             this.startIdxTextbox.Text = string.Empty;
-            this.mergeCountTextbox.Value = 1;
+            this.mergeCountTextbox.Text = "1";
             this.indexList = null;
             this.dataGridView2IsChange = false;
             this.oldStartIndxTextboxValue = string.Empty;
@@ -777,7 +829,7 @@ namespace lqnet.Forms
                 MessageBox.Show("请输入报告内容开始行列的标签,如A1,B1等", "提示", MessageBoxButtons.OK);
                 return;
             }
-            if (this.mergeCountTextbox.Value <= 0)
+            if (int.Parse(this.mergeCountTextbox.Text) <= 0)
             {
                 MessageBox.Show("请输入报告内容产品列的跨行数值", "提示", MessageBoxButtons.OK);
                 return;
@@ -791,6 +843,11 @@ namespace lqnet.Forms
                 GroupOrderId = this.dataGridView1.CurrentRow.Cells[1].Value.ToString(),
                 ProceCode = item.CheckCode
             });
+            this.lineColLabelDataGridViewTextBoxColumn.Items.Add(new ItemIndx()
+            {
+                cellEn = "",
+                baseIndiName = "无效列",
+            });
             if (r.Code == MyConstants.CODE_SUCCESS_200)
             {
                 indexList = JsonConvert.DeserializeObject<List<ItemIndx>>(r.Data.ToString());
@@ -818,7 +875,7 @@ namespace lqnet.Forms
             } else
             {
                 //通过文件方式解析excel
-                colList = ExcelHelper.readRport(this.currentFilePath.Text, this.startIdxTextbox.Text, int.Parse(this.mergeCountTextbox.Value.ToString()));
+                colList = ExcelHelper.readRport(this.currentFilePath.Text, this.startIdxTextbox.Text, int.Parse(this.mergeCountTextbox.Text));
             }
             if (null == colList || colList.Count == 0)
             {
@@ -846,6 +903,10 @@ namespace lqnet.Forms
                     if(col != null)
                     {
                         ReportCol rCol = col as ReportCol;
+                        if (string.IsNullOrEmpty(rCol.cellEn) || string.IsNullOrWhiteSpace(rCol.cellEn))
+                        {
+                            continue;
+                        }
                         itemNums += rCol.importColLabel + "-" + rCol.cellEn + ",";
                     }
                 }
@@ -897,11 +958,15 @@ namespace lqnet.Forms
                         _configContexts.Remove(context);
                     }
                     context.startRow = this.startIdxTextbox.Text;
-                    context.mergeCount = int.Parse(this.mergeCountTextbox.Value.ToString());
+                    context.mergeCount = int.Parse(this.mergeCountTextbox.Text);
                     Dictionary<string, CheckItemConfig> dict = new Dictionary<string, CheckItemConfig>();
                     foreach (var col in this.reportColListBindingSource.List)
                     {
                         ReportCol rCol = col as ReportCol;
+                        if (rCol ==null)
+                        {
+                            continue;
+                        }
                         dict[rCol.importColLabel] = new CheckItemConfig()
                         {
                             label = rCol.cellEn

+ 2 - 2
lqnet/Properties/AssemblyInfo.cs

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
 // 方法是按如下所示使用“*”: :
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.0.6")]
+[assembly: AssemblyFileVersion("1.0.0.6")]

+ 2 - 1
lqnet/Utils/ExcelHelper.cs

@@ -11,6 +11,7 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Security.Cryptography.X509Certificates;
 using System.Text;
 using System.Threading.Tasks;
 
@@ -50,7 +51,7 @@ namespace lqnet.Utils
                     sheet = workbook.GetSheetAt(0);
                 }
                 var index = prodtStartIndx.IndexOfAny("0123456789".ToCharArray());
-                int prodStartRow = int.Parse(prodtStartIndx.Substring(index));
+                int prodStartRow = int.Parse(prodtStartIndx.Split(',')[0].Substring(index));
                 int startRow = prodStartRow - 1;
                 int endRow = prodStartRow + (rowSpan>1? rowSpan-1: 0);
 

+ 1 - 1
lqnet/Utils/PageHelper2.Designer.cs

@@ -163,7 +163,7 @@ namespace lqnet.Utils
             this.btLastPage.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
             this.btLastPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btLastPage.ForeColor = System.Drawing.Color.White;
-            this.btLastPage.Location = new System.Drawing.Point(733, -2);
+            this.btLastPage.Location = new System.Drawing.Point(737, -2);
             this.btLastPage.Margin = new System.Windows.Forms.Padding(2);
             this.btLastPage.Name = "btLastPage";
             this.btLastPage.Size = new System.Drawing.Size(70, 46);

BIN
lqnet/bin/Debug/app.publish/lqnet.exe


+ 1 - 0
lqnet/bin/Debug/configs/100012.json

@@ -0,0 +1 @@
+[{"checkCode":"JYX0000211901","checkName":"外形尺寸","startRow":"A5,E5","mergeCount":1,"itemConfigs":{"B5":{"label":"B5","indxName":"25"},"C5":{"label":"C5","indxName":"8"},"D5":{"label":"D5","indxName":"12"},"E5":{"label":"","indxName":null},"F5":{"label":"F5","indxName":"105"},"G5":{"label":"G5","indxName":"0.03A"},"H5":{"label":"H5","indxName":"⊥0.03A"},"I5":{"label":"I5","indxName":"引出线"}}}]

+ 1 - 1
lqnet/bin/Debug/lqnet.application

@@ -14,7 +14,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
-        <dsig:DigestValue>cQLkJ0vFIo8Wwq8JmeXMwY2jrJZUXjv0ePW4UO4TWuI=</dsig:DigestValue>
+        <dsig:DigestValue>57wBHPtFRMdctmJdHnzNkW6wnVKm2pewj9pwti9Lef4=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
lqnet/bin/Debug/lqnet.exe


+ 4 - 4
lqnet/bin/Debug/lqnet.exe.manifest

@@ -4,7 +4,7 @@
   <description asmv2:iconFile="icon.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
   <application />
   <entryPoint>
-    <assemblyIdentity name="lqnet" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
+    <assemblyIdentity name="lqnet" version="1.0.0.6" language="neutral" processorArchitecture="x86" />
     <commandLine file="lqnet.exe" parameters="" />
   </entryPoint>
   <trustInfo>
@@ -78,14 +78,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="687616">
-      <assemblyIdentity name="lqnet" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="688128">
+      <assemblyIdentity name="lqnet" version="1.0.0.6" language="neutral" processorArchitecture="x86" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
-        <dsig:DigestValue>079zSHMWqz5mx/nevxfm1n3rtU10NIFRAc8EdOPuu5s=</dsig:DigestValue>
+        <dsig:DigestValue>gCgk+mslVwTTVt/QWsdOJ7OxHd2ixgOobtydj+6AtPg=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
lqnet/bin/Debug/lqnet.pdb


BIN
lqnet/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
lqnet/obj/Debug/Lqnet.csproj.GenerateResource.cache


+ 1 - 1
lqnet/obj/Debug/lqnet.application

@@ -14,7 +14,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
-        <dsig:DigestValue>cQLkJ0vFIo8Wwq8JmeXMwY2jrJZUXjv0ePW4UO4TWuI=</dsig:DigestValue>
+        <dsig:DigestValue>57wBHPtFRMdctmJdHnzNkW6wnVKm2pewj9pwti9Lef4=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
lqnet/obj/Debug/lqnet.exe


+ 4 - 4
lqnet/obj/Debug/lqnet.exe.manifest

@@ -4,7 +4,7 @@
   <description asmv2:iconFile="icon.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
   <application />
   <entryPoint>
-    <assemblyIdentity name="lqnet" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
+    <assemblyIdentity name="lqnet" version="1.0.0.6" language="neutral" processorArchitecture="x86" />
     <commandLine file="lqnet.exe" parameters="" />
   </entryPoint>
   <trustInfo>
@@ -78,14 +78,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="687616">
-      <assemblyIdentity name="lqnet" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="lqnet.exe" size="688128">
+      <assemblyIdentity name="lqnet" version="1.0.0.6" language="neutral" processorArchitecture="x86" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
-        <dsig:DigestValue>079zSHMWqz5mx/nevxfm1n3rtU10NIFRAc8EdOPuu5s=</dsig:DigestValue>
+        <dsig:DigestValue>gCgk+mslVwTTVt/QWsdOJ7OxHd2ixgOobtydj+6AtPg=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
lqnet/obj/Debug/lqnet.pdb