Ver Fonte

Merge branch 'OTSRelease3_0' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_0

gsp há 1 ano atrás
pai
commit
04dfd6aa0e

+ 15 - 0
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticleClassificationSelect.Designer.cs

@@ -32,6 +32,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             this.panel1 = new System.Windows.Forms.Panel();
             this.btn_ok = new System.Windows.Forms.Button();
             this.btn_cannel = new System.Windows.Forms.Button();
+            this.checkBox_selall = new System.Windows.Forms.CheckBox();
             this.SuspendLayout();
             // 
             // panel1
@@ -62,11 +63,23 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             this.btn_cannel.UseVisualStyleBackColor = true;
             this.btn_cannel.Click += new System.EventHandler(this.btn_cannel_Click);
             // 
+            // checkBox_selall
+            // 
+            this.checkBox_selall.AutoSize = true;
+            this.checkBox_selall.Location = new System.Drawing.Point(2, 518);
+            this.checkBox_selall.Name = "checkBox_selall";
+            this.checkBox_selall.Size = new System.Drawing.Size(48, 16);
+            this.checkBox_selall.TabIndex = 3;
+            this.checkBox_selall.Text = "全选";
+            this.checkBox_selall.UseVisualStyleBackColor = true;
+            this.checkBox_selall.CheckedChanged += new System.EventHandler(this.checkBox_selall_CheckedChanged);
+            // 
             // ParticleClassificationSelect
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(269, 539);
+            this.Controls.Add(this.checkBox_selall);
             this.Controls.Add(this.btn_cannel);
             this.Controls.Add(this.btn_ok);
             this.Controls.Add(this.panel1);
@@ -80,6 +93,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ParticleClassificationSelect_FormClosing);
             this.Load += new System.EventHandler(this.ParticleClassificationSelect_Load);
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
@@ -88,5 +102,6 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button btn_ok;
         private System.Windows.Forms.Button btn_cannel;
+        private System.Windows.Forms.CheckBox checkBox_selall;
     }
 }

+ 38 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticleClassificationSelect.cs

@@ -24,7 +24,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
         {
             InitializeComponent();
             Particledata = a_Particledata;
-            ParticleClassificationSelectedList = a_ParticleClassificationSelected.Split(',');
+            ParticleClassificationSelectedList = a_ParticleClassificationSelected.Split('$');
         }
 
         private void ParticleClassificationSelect_Load(object sender, EventArgs e)
@@ -81,7 +81,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
                         {
                             if (((CheckBox)control1).Checked)
                             {
-                                ParticleClassificationSelected += control1.Text+",";
+                                ParticleClassificationSelected += control1.Text+ "$";
                             }
                         }
                     }
@@ -106,5 +106,41 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
         {
             this.Close();
         }
+
+        private void checkBox_selall_CheckedChanged(object sender, EventArgs e)
+        {
+            if(checkBox_selall.Checked)
+            {
+                foreach (Control control in panel1.Controls)
+                {
+                    if (control.GetType() == typeof(FlowLayoutPanel))
+                    {
+                        foreach (Control control1 in control.Controls)
+                        {
+                            if (control1.GetType() == typeof(System.Windows.Forms.CheckBox))
+                            {
+                                ((CheckBox)control1).Checked = true;
+                            }
+                        }
+                    }
+                }
+            }
+            else
+            {
+                foreach (Control control in panel1.Controls)
+                {
+                    if (control.GetType() == typeof(FlowLayoutPanel))
+                    {
+                        foreach (Control control1 in control.Controls)
+                        {
+                            if (control1.GetType() == typeof(System.Windows.Forms.CheckBox))
+                            {
+                                ((CheckBox)control1).Checked = false;
+                            }
+                        }
+                    }
+                }
+            }
+        }
     }
 }

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -2828,7 +2828,7 @@ namespace OTSIncAReportGrids
                 if (particleClassificationSelect.ParticleClassificationSelected != "")
                 {
                     tbx_Type.Text = particleClassificationSelect.ParticleClassificationSelected;
-                    string[] tr = tbx_Type.Text.Split(',');
+                    string[] tr = tbx_Type.Text.Split('$');
                     condition += " and (";
                     for (int i = 0; i < tr.Length; i++)
                     {