Sfoglia il codice sorgente

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

CXS 3 anni fa
parent
commit
8ca5087ee0

+ 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" />

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

@@ -822,11 +822,13 @@
 	  <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="颗粒面积比" />
+	  
     </Controls>
  </Form>
  <Form>

+ 1 - 1
OTSIncAMeasureApp/2-OTSMeasureParamManage/COTSMeasureParam.cs

@@ -165,7 +165,7 @@ namespace OTSMeasureApp
         {
             SpecialRanges = new CSpecialGrayRangeParam();
            
-            if (!SpecialRanges.LoadParam());
+            if (!SpecialRanges.LoadParam())
             {
                 return false;
             }

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

@@ -378,6 +378,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)
@@ -406,6 +416,24 @@ 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

@@ -118,8 +118,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
@@ -129,7 +130,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 };

+ 0 - 1
OTSIncAReportApp/1-UI/OTSRibbon/OTSRibbonFun.cs

@@ -41,7 +41,6 @@ namespace OTSIncAReportApp.OTSRibbon
             m_ReportApp.rbFrame.Enabled = bRibState;            //帧图边框,ribbon中
             m_ReportApp.rbStaff.Enabled = bRibState;            //标尺,ribbon中
             m_ReportApp.rbRenew.Enabled = bRibState;            //恢复,ribbon中
-            m_ReportApp.rbParticleSegmentation.Enabled = bRibState;            //颗粒分割,ribbon中
         }
 
         /// <summary>

+ 1 - 26
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -1155,31 +1155,6 @@ namespace OTSIncAReportApp
                 MessageBox.Show("Backup failed");
             }
         }
-        private void rbParticleSegmentation_Click(object sender, EventArgs e)
-        {
-            int tabIndex = (int)(m_conditionChoose.tabIndex);
-
-            switch (tabIndex)
-            {
-                case (int)DisplayPicutureType.AnalyzeImg:
-
-                    int imgDisType = m_conditionChoose.m_SourceGridData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.IMAGE_DISPLAY_TYPE);
-                    if (imgDisType == 0)
-                    {
-                        if (im_Control_DrawDistrbutionImageAndBSE != null)
-                        {
-                            //分布图
-                            im_Control_DrawDistrbutionImageAndBSE.Particle_Segmentation();
-                        }
-                    }
-                    break;
-                case (int)DisplayPicutureType.AnalyzeDataTable:
-                    break;
-                case (int)DisplayPicutureType.AnalyzeDataChart:
-                    break;
-                default:
-                    break;
-            }
-        }    }
+    }
 }
 

+ 1 - 1
OTSIncAReportApp/2-CommonFunction/CommonClass/Language.cs

@@ -43,7 +43,7 @@ namespace OTSIncAReportApp.SysMgrTools
         //读取默认语言 
         public static string ReadDefaultLanguage()
         {
-            string xmlName = System.Windows.Forms.Application.StartupPath + @"/Resources/XMLData/LanguageDefine.xml";
+            string xmlName = System.Windows.Forms.Application.StartupPath + @"\Resources\XMLData\LanguageDefine.xml";
             XmlReader reader = XmlReader.Create(xmlName);
             XmlDocument doc = new XmlDocument();
             doc.Load(reader);