Ver Fonte

报告颗粒列表添加xray计数,暂时屏蔽添加颗粒选项

cxs há 11 meses atrás
pai
commit
d032113c04

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

@@ -332,7 +332,7 @@ namespace OTSIncAReportGrids
                 particlesAll = new DataTable();
                 particlesAll = dtUelect.Copy();
                 btn_Sel.Enabled = false;
-                ToolStripMenuItem_Removeparticlesfromtheselectparticleslist.Visible = true;
+                ToolStripMenuItem_Removeparticlesfromtheselectparticleslist.Visible = false;
                 ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
             }
             else
@@ -428,6 +428,31 @@ namespace OTSIncAReportGrids
                 }
                 particlesAll.Rows[i]["Element"] = ConcatenatedString;
             }
+            DataTable XRayData = Particledata.GetXRayData();
+            particlesAll.Columns.Add("XRayDataCount");
+            for (int i = 0; i < particlesAll.Rows.Count; i++)
+            {
+                if (int.Parse(particlesAll.Rows[i]["particleId"].ToString()) > -1)
+                {
+                    string str = " XrayIndex= " + particlesAll.Rows[i]["particleId"].ToString() + " and fieldid = " + particlesAll.Rows[i]["fieldid"].ToString();
+                    DataRow[] drs = XRayData.Select(str);
+                    uint xraycount = 0;
+                    if (drs != null)
+                    {
+                        uint[] Analysis_xray = new uint[2000];
+                        for (int j = 0; j < 2000; j++)
+                        {
+                            Analysis_xray[j] = BitConverter.ToUInt32((byte[])drs[0][2], j * 4);
+                        }
+                        for (int j = 0; j < 2000; j++)
+                        {
+                            xraycount += Analysis_xray[j];
+                        }
+                        particlesAll.Rows[i]["XRayDataCount"] = xraycount;
+                    }
+
+                }
+            }
             return true;
         }
 
@@ -687,6 +712,10 @@ namespace OTSIncAReportGrids
                 {
                     keyValues.Add("ORIENTATION", table["str33"].ToString());
                 }
+                if (strs[i] == "XRayDataCount")
+                {
+                    keyValues.Add("XRayDataCount", "XRay计数");
+                }
                 if (startFun == OTS_SysType_ID.CleannessA)
                 {
                     if (strs[i] == "Hardness")
@@ -2542,6 +2571,18 @@ namespace OTSIncAReportGrids
                     ToolStripMenuItemDelete_Particle.Visible = false;
                 }
             }
+            if(m_ReportApp.im_Control_DrawDistrbutionImageAndBSE==null)
+            {
+                //ToolStripMenuItemDelete_Particle.Enabled = false;
+                ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
+                ToolStripMenuItem_Removeparticlesfromtheselectparticleslist.Visible = false;
+            }
+            else
+            {
+                //ToolStripMenuItemDelete_Particle.Enabled = true;
+                ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
+                ToolStripMenuItem_Removeparticlesfromtheselectparticleslist.Visible = false;
+            }
         }
         /// <summary>
         /// 去除拼接颗粒组成颗粒

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

@@ -54,11 +54,13 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             this.cb_INSCR = new System.Windows.Forms.CheckBox();
             this.btn_ybcsqx = new System.Windows.Forms.Button();
             this.btn_ybcsbc = new System.Windows.Forms.Button();
+            this.cB_XRayDataCount = new System.Windows.Forms.CheckBox();
             this.groupBox2.SuspendLayout();
             this.SuspendLayout();
             // 
             // groupBox2
             // 
+            this.groupBox2.Controls.Add(this.cB_XRayDataCount);
             this.groupBox2.Controls.Add(this.label_help);
             this.groupBox2.Controls.Add(this.label1);
             this.groupBox2.Controls.Add(this.cb_ParticleCoordinate);
@@ -156,7 +158,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             // cB_Density
             // 
             this.cB_Density.AutoSize = true;
-            this.cB_Density.Location = new System.Drawing.Point(370, 146);
+            this.cB_Density.Location = new System.Drawing.Point(370, 169);
             this.cB_Density.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.cB_Density.Name = "cB_Density";
             this.cB_Density.Size = new System.Drawing.Size(48, 16);
@@ -348,6 +350,17 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             this.btn_ybcsbc.UseVisualStyleBackColor = true;
             this.btn_ybcsbc.Click += new System.EventHandler(this.btn_ybcsbc_Click);
             // 
+            // cB_XRayDataCount
+            // 
+            this.cB_XRayDataCount.AutoSize = true;
+            this.cB_XRayDataCount.Location = new System.Drawing.Point(370, 146);
+            this.cB_XRayDataCount.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.cB_XRayDataCount.Name = "cB_XRayDataCount";
+            this.cB_XRayDataCount.Size = new System.Drawing.Size(72, 16);
+            this.cB_XRayDataCount.TabIndex = 131;
+            this.cB_XRayDataCount.Text = "XRay计数";
+            this.cB_XRayDataCount.UseVisualStyleBackColor = true;
+            // 
             // ParticlesGridDevidePageShowConfig
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -397,5 +410,6 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
         private System.Windows.Forms.Button btn_ybcsqx;
         private System.Windows.Forms.Button btn_ybcsbc;
         private System.Windows.Forms.Label label_help;
+        private System.Windows.Forms.CheckBox cB_XRayDataCount;
     }
 }

+ 9 - 0
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePageShowConfig.cs

@@ -226,6 +226,11 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
                 str_ret = str_ret + "Hardness" + ",";
             }
 
+            if (cB_XRayDataCount.Checked == true)
+            {
+                str_ret = str_ret + "XRayDataCount" + ",";
+            }
+
             if (str_ret.Length > 0)
             {
                 str_ret = str_ret.Substring(0, str_ret.Length - 1);
@@ -490,6 +495,10 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
                 cb_ParticleCoordinate.Checked = true;
             }
 
+            if (in_str.IndexOf("XRayDataCount") > -1)
+            {
+                cB_XRayDataCount.Checked = true;
+            }
 
             if (systype == OTSCommon.Model.OTS_SysType_ID.CleannessA)
             {

+ 8 - 0
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -623,6 +623,14 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             return DT;
         }
 
+        public DataTable GetXRayData()
+        {
+            string sqliteString = @"select * from xraydata";
+            DataTable DT = new DataTable();
+            DT = dbHelper.ExecuteQuery(sqliteString);
+            return DT;
+        }
+
         public DataTable GetElementChemistry()
         {
             string sqliteString = "select * from ElementChemistry";