浏览代码

Merge branch 'OTSRelease3_2' into GSP

gsp 5 月之前
父节点
当前提交
6734eb1e66

二进制
Bin/x64/Debug/Config/SysData/Cleanness_ND - 副本.db


+ 10 - 1
OTSIncAReportApp/1-UI/Control_DEVCharts/DEVChart_ParticlesComposition.cs

@@ -273,7 +273,16 @@ namespace OTSIncAReportApp.Control_ECharts
 
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<" + max;
+             if (col == "Area")
+            {
+                return col + ">=" + ((Convert.ToDouble(min) / 2) * (Convert.ToDouble(min) / 2) * Math.PI).ToString() + " and " + col + "<" + ((Convert.ToDouble(max) / 2) * (Convert.ToDouble(max) / 2) * Math.PI).ToString();
+
+			}
+            else
+            {
+				return col + ">=" + min + " and " + col + "<" + max;
+			}
+           
         }
         #endregion
 

+ 9 - 1
OTSIncAReportApp/1-UI/Control_DEVCharts/DEVChart_Trianglediagram.cs

@@ -598,7 +598,15 @@ namespace OTSIncAReportApp.Control_ECharts
         }
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<=" + max;
+             if (col == "Area")
+            {
+                return col + ">=" + ((Convert.ToDouble(min) / 2) * (Convert.ToDouble(min) / 2) * Math.PI).ToString() + " and " + col + "<=" + ((Convert.ToDouble(max) / 2) * (Convert.ToDouble(max) / 2) * Math.PI).ToString();
+
+			}
+            else
+            {
+				return col + ">=" + min + " and " + col + "<=" + max; ;
+			}
         }
         private string getStrRet(List<string> template, string element)
         {

+ 10 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesSizeGrid.cs

@@ -40,8 +40,16 @@ namespace OTSIncAReportGrids
 
         private string getWhere(string max, string min, string col, string partic)
         {
-            return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
-        }
+			if (col == "Area")
+			{
+				return col + ">=" + ((Convert.ToDouble(min)/2) * (Convert.ToDouble(min)/2) * Math.PI).ToString() + " and " + col + "<" + ((Convert.ToDouble(max)/2) * (Convert.ToDouble(max)/2) * Math.PI).ToString() + " and TypeId=" + partic;
+
+			}
+			else
+			{
+				return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
+			}
+		}
 
         /// <summary>
         /// 绑定datagridview数据

+ 11 - 5
OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

@@ -273,18 +273,24 @@ namespace OTSIncAReportGrids
             TimeSpan timeSpan = end - star;
             double Magnification = resfile.GetMeasurementMagnification();
             int filedCount = fielddata.GetFiledCount();
-
-            double wide = resfile.GetImageWidth();
+			double scanFieldSize = resfile.GetScanFieldSizeX();
+			double wide = resfile.GetImageWidth();
             double high = resfile.GetImageHeight();
             double pixelSize = resfile.GetPixelSize();
             //double filedsArea = Math.Round(high * wide * pixelSize * pixelSize * filedCount, 2);
             double particleArea = fielddata.GetparticleArea();
             double filedsArea = resfile.GetTotalArea();
 
-            //double ratio = particleArea / filedsArea;
+			if (filedsArea == -1)
+			{
+				filedsArea = scanFieldSize * (scanFieldSize * high / wide) * filedCount;
+                filedsArea = filedsArea / 1000000;
+			}
 
-            //报告参数文件
-            string xmlpath = Application.StartupPath + RptConfigFile.m_ReportMgrParamFile;
+			//double ratio = particleArea / filedsArea;
+
+			//报告参数文件
+			string xmlpath = Application.StartupPath + RptConfigFile.m_ReportMgrParamFile;
             DataSet ds = XMLoperate.GetXmlData(xmlpath, "XMLData");
             DataTable dt1 = ds.Tables["Member"];
             string sizestr = "1000";

+ 11 - 2
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/BasicData.cs

@@ -181,7 +181,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                         string d2;
                         if (a == colid.Count - 1)
                         {
-                            d2 = "999";
+                            d2 = "9999999999999";
                         }
                         else
                         {
@@ -624,7 +624,16 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         #region 内部函数
         private string getWhere(string max, string min, string col, string partic)
         {
-            return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
+            if (col == "Area")
+            {
+                return col + ">=" + ((Convert.ToDouble(min) / 2) * (Convert.ToDouble(min) / 2) * Math.PI).ToString() + " and " + col + "<" + ((Convert.ToDouble(max) / 2) * (Convert.ToDouble(max) / 2) * Math.PI).ToString() + " and TypeId=" + partic;
+
+			}
+            else
+            {
+				return col + ">=" + min + " and " + col + "<" + max + " and TypeId=" + partic;
+			}
+                
         }
         private DataTable InvalidRemoval(DataTable dt)
         {

+ 34 - 4
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/ElementalAnalysis.cs

@@ -132,10 +132,25 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 row["Class"] = a_ElementalSubstance[i].Rows[0]["Class"].ToString();
                 double dlArea = CalculationTableColumn(a_ElementalSubstance[i], "Area");
                 row["Area"] = Math.Round(dlArea,2);
+				double ELEtotal = 0;
+				for (int a = 4; a < data[0].Columns.Count; a++)
+				{
+					ELEtotal= ELEtotal+ CalculationTableColumn(a_ElementalSubstance[i], data[0].Columns[a].ColumnName);
+				}
+
                 for (int a = 4; a < data[0].Columns.Count; a++)
                 {
-					double dlData= CalculationTableColumn(a_ElementalSubstance[i], data[0].Columns[a].ColumnName);
-                    row[data[0].Columns[a].ColumnName] = Math.Round(dlData, 2); 
+					double dlData = CalculationTableColumn(a_ElementalSubstance[i], data[0].Columns[a].ColumnName);
+					//               row[data[0].Columns[a].ColumnName] = Math.Round(dlData, 2);
+					if (dlData == 0.0)
+					{
+						row[data[0].Columns[a].ColumnName] = 0;
+					}
+					else
+					{
+						double ColVal = Convert.ToDouble(dlData / ELEtotal * 100);
+						row[data[0].Columns[a].ColumnName] = Math.Round(ColVal, 2);
+					}
 				}
                 dt_ElementalSubstance.Rows.Add(row);
 
@@ -145,10 +160,25 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dr["Area"] = Math.Round(Convert.ToDouble(data[i].Rows[a]["Area"]), 2);
                     dr["TypeId"] = data[i].Rows[a]["TypeId"].ToString();
 					dr["Name"]= data[i].Rows[a]["TypeName"].ToString();
-                    for (int j = 4; j < data[0].Columns.Count; j++)
+					double datotal = 0;
+					for (int j = 4; j < data[0].Columns.Count; j++)
+					{
+						datotal= datotal+ Convert.ToDouble(data[i].Rows[a][data[0].Columns[j].ColumnName]);
+					}
+
+					for (int j = 4; j < data[0].Columns.Count; j++)
                     {
                         double dlData = Convert.ToDouble(data[i].Rows[a][data[0].Columns[j].ColumnName]);
-                        dr[data[0].Columns[j].ColumnName] = Math.Round(dlData, 2);
+						if (dlData == 0)
+						{
+							dr[data[0].Columns[j].ColumnName] = 0;
+						}
+						else
+						{
+							double ColVal = Convert.ToDouble(dlData / datotal * 100);
+							dr[data[0].Columns[j].ColumnName] = Math.Round(ColVal, 2);
+						}
+							//dr[data[0].Columns[j].ColumnName] = Math.Round(dlData, 2);
 
 					}
                     dt_ElementalSubstance.Rows.Add(dr);

+ 10 - 22
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/ParticleList.cs

@@ -91,30 +91,13 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 #endregion
                 #region 安装选择的类型大小排序
                 DataTable table = datas[i].Copy();
-                //if (!table.Columns.Contains("Area"))
-                //            {
-                //                table.Columns.Add("Area");
-                //	DataColumn newColumn = new DataColumn("Area", typeof(double));
-                //	table.Columns.Add(1, newColumn);
-                //	for (int a = 0; a < table.Rows.Count; a++)
-                //                {
-                //                    table.Rows[a]["Area"] = Convert.ToDouble(table.Rows[a]["ar"]);
-                //	}
-                //	table.Columns.Remove("ar");
-                //}
-
-
+      
 
                 DataView dvs = table.DefaultView;
 
-                //if (m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() == "Area")
-                //{
-                //    dvs.Sort =  "ar DESC";
-                //}
-                //else
-                //{
-					dvs.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
-				//}
+
+                dvs.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
+				
 
 
                     DataTable p1Data_b = dvs.ToTable();
@@ -168,7 +151,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
 				#endregion
 
 
-				DataTable p1Data = fielddata.AddElementColumn(p1Data_b);
+				DataTable p1Data = fielddata.AddElementColumn(p1Data_b, m_mbszclass);
 
 
 				#region 插入颗粒部份
@@ -609,6 +592,11 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 return Math.Round(Convert.ToDouble(dt.Rows[it][str]), 2).ToString();
             }
             else
+            if (str == "ECD")
+            {
+				return Math.Round(Convert.ToDouble(dt.Rows[it][str]), 2).ToString();
+			}
+            else
             {
                 return dt.Rows[it][str].ToString();
             }

+ 11 - 2
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/TernaryDiagram.cs

@@ -8,6 +8,7 @@ using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
+using System.IO.Ports;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -367,8 +368,16 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
         }
         private string getWhere(string max, string min, string col)
         {
-            return col + ">=" + min + " and " + col + "<=" + max;
-        }
+			if (col == "Area")
+			{
+				return col + ">=" + (Convert.ToDouble(min) * Convert.ToDouble(min) * Math.PI).ToString() + " and " + col + "<=" + (Convert.ToDouble(max) * Convert.ToDouble(max) * Math.PI).ToString();
+
+			}
+			else
+			{
+				return col + ">=" + min + " and " + col + "<=" + max ;
+			}
+		}
         private string getStrRet(List<string> template, string element)
         {
             List<string> name = new List<string>()

+ 0 - 50
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_GetEChartImage.Designer.cs

@@ -1,50 +0,0 @@
-namespace OTSIncAReportApp.OTSTemplateDesigner
-{
-    partial class OTSReport_GetEChartImage
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.SuspendLayout();
-            // 
-            // OTSReport_GetEChartImage
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(152, 54);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.MaximizeBox = false;
-            this.MinimizeBox = false;
-            this.Name = "OTSReport_GetEChartImage";
-            this.Text = "OTSReport_GetEChartImage";
-            this.Load += new System.EventHandler(this.OTSReport_GetEChartImage_Load);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-    }
-}

+ 0 - 43
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_GetEChartImage.cs

@@ -1,43 +0,0 @@
-//using OTSINTERFACE;
-using System;
-using System.Windows.Forms;
-
-namespace OTSIncAReportApp.OTSTemplateDesigner
-{
-    public partial class OTSReport_GetEChartImage : Form
-    {
-        /// <summary>
-        /// 返回图片数据
-        /// </summary>
-        public string PicStr { set; get; }
-
-        public OTSReport_GetEChartImage()
-        {
-            InitializeComponent();
-        }
-
-        public OTSReport_GetEChartImage(frmReportApp in_frmreportapp)
-        {
-            InitializeComponent();
-        }
-
-        //不可见窗体
-        private void OTSReport_GetEChartImage_Load(object sender, EventArgs e)
-        {
-            this.Opacity = 0;
-        }
-
-
-        public void get_ParticalesCompositionChart(string pic)
-        {
-            
-            PicStr = pic;
-           
-            //得到图片数据后,关闭该窗体
-            this.Close();
-
-            return;
-        }
-
-    }
-}

+ 0 - 120
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_GetEChartImage.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 114
OTSIncAReportApp/1-UI/OTSReportExport/RuleSelector.Designer.cs

@@ -1,114 +0,0 @@
-namespace OTSIncAReportApp._1_UI.OTSReportExport
-{
-	partial class RuleSelector
-	{
-		/// <summary>
-		/// Required designer variable.
-		/// </summary>
-		private System.ComponentModel.IContainer components = null;
-
-		/// <summary>
-		/// Clean up any resources being used.
-		/// </summary>
-		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-		protected override void Dispose(bool disposing)
-		{
-			if (disposing && (components != null))
-			{
-				components.Dispose();
-			}
-			base.Dispose(disposing);
-		}
-
-		#region Windows Form Designer generated code
-
-		/// <summary>
-		/// Required method for Designer support - do not modify
-		/// the contents of this method with the code editor.
-		/// </summary>
-		private void InitializeComponent()
-		{
-			this.panel1 = new System.Windows.Forms.Panel();
-			this.button2 = new System.Windows.Forms.Button();
-			this.button1 = new System.Windows.Forms.Button();
-			this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
-			this.checkBox1 = new System.Windows.Forms.CheckBox();
-			this.panel1.SuspendLayout();
-			this.SuspendLayout();
-			// 
-			// panel1
-			// 
-			this.panel1.Controls.Add(this.checkBox1);
-			this.panel1.Controls.Add(this.button2);
-			this.panel1.Controls.Add(this.button1);
-			this.panel1.Controls.Add(this.checkedListBox1);
-			this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
-			this.panel1.Location = new System.Drawing.Point(0, 0);
-			this.panel1.Name = "panel1";
-			this.panel1.Size = new System.Drawing.Size(233, 345);
-			this.panel1.TabIndex = 0;
-			// 
-			// button2
-			// 
-			this.button2.Location = new System.Drawing.Point(149, 317);
-			this.button2.Name = "button2";
-			this.button2.Size = new System.Drawing.Size(81, 22);
-			this.button2.TabIndex = 4;
-			this.button2.Text = "取消";
-			this.button2.UseVisualStyleBackColor = true;
-			this.button2.Click += new System.EventHandler(this.button2_Click);
-			// 
-			// button1
-			// 
-			this.button1.Location = new System.Drawing.Point(62, 317);
-			this.button1.Name = "button1";
-			this.button1.Size = new System.Drawing.Size(81, 22);
-			this.button1.TabIndex = 3;
-			this.button1.Text = "确定";
-			this.button1.UseVisualStyleBackColor = true;
-			this.button1.Click += new System.EventHandler(this.button1_Click);
-			// 
-			// checkedListBox1
-			// 
-			this.checkedListBox1.FormattingEnabled = true;
-			this.checkedListBox1.Location = new System.Drawing.Point(3, 3);
-			this.checkedListBox1.Name = "checkedListBox1";
-			this.checkedListBox1.Size = new System.Drawing.Size(227, 308);
-			this.checkedListBox1.TabIndex = 2;
-			// 
-			// checkBox1
-			// 
-			this.checkBox1.AutoSize = true;
-			this.checkBox1.Location = new System.Drawing.Point(3, 321);
-			this.checkBox1.Name = "checkBox1";
-			this.checkBox1.Size = new System.Drawing.Size(48, 16);
-			this.checkBox1.TabIndex = 5;
-			this.checkBox1.Text = "全选";
-			this.checkBox1.UseVisualStyleBackColor = true;
-			this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
-			// 
-			// RuleSelector
-			// 
-			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-			this.ClientSize = new System.Drawing.Size(233, 345);
-			this.Controls.Add(this.panel1);
-			this.Name = "RuleSelector";
-			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-			this.Text = "规则选择";
-			this.Load += new System.EventHandler(this.RuleSelector_Load);
-			this.panel1.ResumeLayout(false);
-			this.panel1.PerformLayout();
-			this.ResumeLayout(false);
-
-		}
-
-		#endregion
-
-		private System.Windows.Forms.Panel panel1;
-		private System.Windows.Forms.CheckedListBox checkedListBox1;
-		private System.Windows.Forms.Button button1;
-		private System.Windows.Forms.Button button2;
-		private System.Windows.Forms.CheckBox checkBox1;
-	}
-}

+ 0 - 76
OTSIncAReportApp/1-UI/OTSReportExport/RuleSelector.cs

@@ -1,76 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace OTSIncAReportApp._1_UI.OTSReportExport
-{
-    public partial class RuleSelector: Form
-    {
-		public DataTable RuleTable;
-
-		public RuleSelector(DataTable a_RuleTable)
-        {
-            InitializeComponent();
-			RuleTable = a_RuleTable.Copy();
-		}
-
-		private void RuleSelector_Load(object sender, EventArgs e)
-		{
-            checkedListBox1.Items.Clear();
-			for (int i = 0; i < RuleTable.Rows.Count; i++)
-			{
-				checkedListBox1.Items.Add(RuleTable.Rows[i]["StrName"]);
-			}
-
-			for (int i = 0; i < RuleTable.Rows.Count; i++)
-			{
-				if (RuleTable.Rows[i]["display"].ToString() == "0")
-				{
-					checkedListBox1.SetItemChecked(i, false);
-				}
-				else
-				{
-					checkedListBox1.SetItemChecked(i, true);
-				}
-			}
-
-		}
-
-		private void button2_Click(object sender, EventArgs e)
-		{
-			this.Close();
-		}
-
-		private void button1_Click(object sender, EventArgs e)
-		{
-			for (int i=0; i < RuleTable.Rows.Count; i++)
-			{
-				if (!checkedListBox1.GetItemChecked(i))
-				{
-					RuleTable.Rows[i]["display"] = "0";
-				}
-				else
-				{
-					RuleTable.Rows[i]["display"] = "1";
-				}
-			}
-			this.Close();
-		}
-
-		private void checkBox1_CheckedChanged(object sender, EventArgs e)
-		{
-			CheckBox checkBox = sender as CheckBox;
-			// 根据CheckBox的状态设置CheckedListBox的所有项
-			for (int i = 0; i < checkedListBox1.Items.Count; i++)
-			{
-				checkedListBox1.SetItemChecked(i, checkBox.Checked);
-			}
-		}
-	}
-}

+ 0 - 120
OTSIncAReportApp/1-UI/OTSReportExport/RuleSelector.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 2 - 2
OTSIncAReportApp/2-CommonFunction/OTSRstMgrFunction/ResultDataMgr.cs

@@ -344,12 +344,12 @@ namespace OTSIncAReportApp.OTSRstMgrFunction
         }
         public List<string> getTableData_INCA()
         {
-            List<string> strlist = new List<string>() { "Area", "DMAX", "AveGray" };
+            List<string> strlist = new List<string>() { "Area", "DMAX", "AveGray","ECD" };
             return strlist;
         }
         public List<string> getTableData_CleannessA()
         {
-            List<string> strlist = new List<string>() { "Area", "DMAX", "Hardness", "AveGray" };
+            List<string> strlist = new List<string>() { "Area", "DMAX", "Hardness", "AveGray","ECD" };
             return strlist;
         }
 

+ 20 - 6
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -11,6 +11,7 @@ using System.IO;
 using System.Linq;
 using static DevExpress.XtraEditors.Mask.Design.MaskSettingsForm.DesignInfo.MaskManagerInfo;
 using static OTSDataType.otsdataconst;
+using static OTSIncAReportApp.OTSReport_Export;
 
 namespace OTSIncAReportApp.DataOperation.DataAccess
 {
@@ -224,11 +225,12 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
             }
             DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
-            //for (int i = 0; i < DT.Rows.Count; i++)
-            //{
-            //    DT.Rows[i]["Area"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
-            //}
+            DT.Columns.Add("ECD",typeof(double));
 
+            for (int i = 0; i < DT.Rows.Count; i++)
+            {
+                DT.Rows[i]["ECD"] = Math.Sqrt((double)DT.Rows[i]["Area"] / Math.PI) * 2;
+            }
 
             return DT;
         }
@@ -597,7 +599,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             return particlesAll;
         }
 
-        public DataTable AddElementColumn(DataTable particlesAll)
+        public DataTable AddElementColumn(DataTable particlesAll, c_TemplateClass m_mbszclass)
         {
             if (!particlesAll.Columns.Contains("Element"))
             {
@@ -614,7 +616,19 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
                 string ConcatenatedString = "";
                 for (int j = 0; j < drs.Length; j++)
                 {
-                    ConcatenatedString += drs[j]["name"] + "-" + ChangeDataToD(drs[j]["Percentage"].ToString()) + ';';
+                    //判断是否在处理元素表中
+                    bool bl = false;
+                    for (int a = 0; a < m_mbszclass.M_KLLBXX.list_str_kllb_qcys.Count; a++)
+                    {
+                        if (drs[j]["name"].ToString() == m_mbszclass.M_KLLBXX.list_str_kllb_qcys[a].ToString())
+                        {
+                            bl = true;
+						}
+                    }
+                    if (!bl)
+                    {
+						ConcatenatedString += drs[j]["name"] + "-" + ChangeDataToD(drs[j]["Percentage"].ToString()) + ';';
+					}
                 }
                 particlesAll.Rows[i]["Element"] = ConcatenatedString;
             }

+ 1 - 18
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -622,12 +622,6 @@
     <Compile Include="1-UI\OTSReportExport\RuleGroupSelector.Designer.cs">
       <DependentUpon>RuleGroupSelector.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSReportExport\RuleSelector.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="1-UI\OTSReportExport\RuleSelector.Designer.cs">
-      <DependentUpon>RuleSelector.cs</DependentUpon>
-    </Compile>
     <Compile Include="1-UI\OTSReportExport\XtraReport_yb6156.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -926,12 +920,6 @@
     <Compile Include="1-UI\OTSReportExport\OTSReport_Export.Designer.cs">
       <DependentUpon>OTSReport_Export.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSReportExport\OTSReport_GetEChartImage.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="1-UI\OTSReportExport\OTSReport_GetEChartImage.Designer.cs">
-      <DependentUpon>OTSReport_GetEChartImage.cs</DependentUpon>
-    </Compile>
     <Compile Include="1-UI\OTSRibbon\OTSRibbonFun.cs" />
     <Compile Include="1-UI\OTSDisplaySourceGridData\OTSSampleReportInfo\OTSSampleReportInfo.cs" />
     <Compile Include="1-UI\OTSReportExport\INCA\OTSReport_Template_INCA.cs">
@@ -1039,9 +1027,6 @@
     <EmbeddedResource Include="1-UI\OTSReportExport\RuleGroupSelector.resx">
       <DependentUpon>RuleGroupSelector.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="1-UI\OTSReportExport\RuleSelector.resx">
-      <DependentUpon>RuleSelector.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="1-UI\OTSReportExport\XtraReport_yb6156.resx">
       <DependentUpon>XtraReport_yb6156.cs</DependentUpon>
     </EmbeddedResource>
@@ -1124,9 +1109,6 @@
     <EmbeddedResource Include="1-UI\OTSReportExport\OTSReport_Export.resx">
       <DependentUpon>OTSReport_Export.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="1-UI\OTSReportExport\OTSReport_GetEChartImage.resx">
-      <DependentUpon>OTSReport_GetEChartImage.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="1-UI\OTSReportExport\Cleanness\OTSReport_Template_CleannessA.resx">
       <DependentUpon>OTSReport_Template_CleannessA.cs</DependentUpon>
     </EmbeddedResource>
@@ -1690,6 +1672,7 @@
     <EmbeddedResource Include="Help.resx">
       <DependentUpon>Help.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>PublicResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>

+ 5 - 0
OTSPartA_STDEditor/UI/STDRuleslist.cs

@@ -595,6 +595,11 @@ namespace OTSPartA_STDEditor
                     e.CancelEdit=true;
                     return;
                 }
+                if (e.Label == "Default")
+                {
+                    e.CancelEdit = true;
+                    return;
+                }
                 if (e.Label != null && e.Label != "")
                 {
                     if (m_MainForm._sTDEditor.GroupIdDictionaryFromName.ContainsKey(e.Label))