Browse Source

添加已分析颗粒和其它颗粒列表

CXS 3 years ago
parent
commit
6caee115ed

+ 2 - 1
Bin/x64/Debug/Resources/XMLData/AppResource_EN.xml

@@ -826,8 +826,9 @@
 	  <Control name="AmericanStandard" text="American Standard"/>
 	  <Control name="GermanStandard" text="German standard"/>
 	  <Control name="CommonClassification" text="Common classification"/>
-	  <Control name="AllParticles" text="AllParticles" />
+	  <Control name="ParticlesAnalyzed" text="ParticlesAnalyzed" />
 	  <Control name="SelectParticles" text="SelectParticles" />
+	  <Control name="otherParticles" text="otherParticles" />
 	  <Control name="DataSourceType" text="DataSourceType" />
 	  <Control name="InclusionAreaRatio" text="ParticleAreaRatio" />
 	  <Control name="IncaArea scale" text="ParticleAreaRatio" />

+ 2 - 1
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -822,8 +822,9 @@
 	  <Control name="AmericanStandard" text="美标" />
 	  <Control name="GermanStandard" text="德标" />
 	  <Control name="CommonClassification" text="颗粒成分分类" />
-	  <Control name="AllParticles" text="全部颗粒" />
+	  <Control name="ParticlesAnalyzed" text="已分析颗粒" />
 	  <Control name="SelectParticles" text="选择颗粒" />
+	  <Control name="otherParticles" text="其它颗粒" />
 	  <Control name="DataSourceType" text="数据源类型" />
 	  <Control name="InclusionAreaRatio" text="颗粒面积比" />
 	  <Control name="IncaAreascale" text="颗粒面积比" />

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

@@ -375,6 +375,16 @@ namespace OTSIncAReportGrids
                         particlesAll.Rows[i]["Electrical_conductivity"] = "";
                     }
                 }
+                if (sel == 0)
+                {
+                    string str = "TypeId <> -1 and TypeId <> 9";
+                    particlesAll = SreeenDataTable(particlesAll, str);
+                }
+                if (sel == 2)
+                {
+                    string str = "TypeId = " + "-1 or TypeId =" + "9";
+                    particlesAll = SreeenDataTable(particlesAll, str);
+                }
                 btn_Sel.Enabled = true;
             }
             if(particlesAll==null)
@@ -402,7 +412,23 @@ namespace OTSIncAReportGrids
             }
             return true;
         }
-
+        /// <summary>
+        /// DataRow转换为DataTable
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <param name="strWhere">筛选的条件</param>
+        /// <returns></returns>
+        public DataTable SreeenDataTable(DataTable dt, string strWhere)
+        {
+            if (dt.Rows.Count <= 0) return dt;        //当数据为空时返回
+            DataTable dtNew = dt.Clone();         //复制数据源的表结构
+            DataRow[] dr = dt.Select(strWhere);  //strWhere条件筛选出需要的数据!
+            for (int i = 0; i < dr.Length; i++)
+            {
+                dtNew.Rows.Add(dr[i].ItemArray);  // 将DataRow添加到DataTable中
+            }
+            return dtNew;
+        }
         /// <summary>
         /// 传入单颗颗粒的particle类对象,返回从field中抠取出的bitmap对象,抠取单颗颗粒
         /// </summary>

+ 3 - 2
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/frmReportConditionChoose.cs

@@ -117,8 +117,9 @@ namespace OTSIncAReportApp
             string americanStandard = resTable["americanstandard"].ToString();//美标
             string germanStandard = resTable["germanstandard"].ToString();//德标
             string commonClassification = resTable["commonclassification"].ToString();//常用夹杂物分类
-            string allParticles = resTable["allparticles"].ToString();//全部颗粒
+            string allParticles = resTable["particlesanalyzed"].ToString();//已分析颗粒
             string selectParticles = resTable["selectparticles"].ToString();//选择颗粒
+            string otherParticles = resTable["otherparticles"].ToString(); ;//其它颗粒
             string dataSourceType = resTable["datasourcetype"].ToString();//数据源类型
             string InclusionAreaRatio = resTable["inclusionarearatio"].ToString();//夹杂物面积比
             #endregion
@@ -128,7 +129,7 @@ namespace OTSIncAReportApp
             List<string> list_source_str = m_rstDataMgr.GetSampleListName();
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE, resultData, OTS_ITEM_TYPES.COMBO, false, "Select Measurement Result", list_source_str[m_rstDataMgr.GetWorkingResult()], list_source_str, m_rstDataMgr.GetWorkingResult());
             //数据源类型,全部 or selected
-            List<string> list_sourcetype = new List<string>() { allParticles, selectParticles };
+            List<string> list_sourcetype = new List<string>() { allParticles, selectParticles, otherParticles };
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE, dataSourceType, OTS_ITEM_TYPES.COMBO, false, "data source type", list_sourcetype[(int)DATASOURCE_TYPE.ALL], list_sourcetype, DATASOURCE_TYPE.ALL);
             //测量图类别 分布图 or 排列图
             List<string> list1 = new List<string>() { distributionMap, arrangementDiagram };