Prechádzať zdrojové kódy

Merge branch 'OTSRelease3_2' of http://36.129.169.60:30080/gogsadmin/OTS into

gsp 1 mesiac pred
rodič
commit
4375f89ae1

+ 4 - 3
Bin/x64/Debug/Resources/XMLData/AppResource_EN.xml

@@ -158,7 +158,7 @@
    <Name>frmReportApp</Name>
     <Controls>
       <Control name="dpbNew" text="New" />
-	  
+	  <Control name="rbOpenprj" text="Openprj"/>
 	  <Control name="rbClose" text="Close"/>
       <Control name="dpbOpen" text="Open" />
       <Control name="dpbSave" text="Save" />
@@ -186,7 +186,7 @@
 	  <Control name="rbOther" text="Other" />	
 	  <Control name="rbRecap" text="Reclassification" />
 	  <Control name="rbMenu" text="Menu" />
-	  <Control name="rbOpen" text="Open" />
+	  <Control name="rbopen" text="Openrst" />
 	  <Control name="rbStaff" text="Staff" />
 	  <Control name="ribbonPanel2" text="Graphic" />
 	  <Control name="rbFrame" text="FrameBorder" />
@@ -1136,7 +1136,7 @@ field of view(%)" />
 	  <Control name="rbSemFunction" text="SemControl" />
 	  <Control name="rbAddSample" text="Add" />
 	  <Control name="rbDeleteSample" text="Delete" />
-	  <Control name="ribInvers" text="InversSelect" />
+	  <Control name="ribreset" text="InversSelect" />
 	  <Control name="rbMeasureCircle" text="Circle" />
 	  <Control name="rbMeasureRectangle" text="Rectangle" />
 	  <Control name="ribCircle" text="Circle" />
@@ -1171,6 +1171,7 @@ field of view(%)" />
 	  <Control name="rbDisconnectHardware" text="DisConnectSem" />
 	  <Control name="rbAutoBeamOff" text="AutoBeamOff" />
 	  <Control name="rbinterrupt" text="Interrupt" />
+	  <Control name="rb_reclassify" text="Reclassify" />
 	  <Control name="language" text="EN" />
 	  <Control name="message1" text="No OTSIncA valid pass!" />
 	  <Control name="message2" text="Is the current file modified or saved?" />

+ 1 - 1
OTSCPP/OTSControl/Bruker/OTSSEMBruker.cpp

@@ -399,7 +399,7 @@ namespace OTSController {
 		// turn HT off if a_bHTValue is FALSE
 		if (!a_bHTValue)
 		{
-			if (!m_pBrukerImplPtr->SwitchSEMOff(TRUE, FALSE, FALSE))
+			if (!m_pBrukerImplPtr->SwitchSEMOff(a_bHTValue, FALSE, FALSE))
 			{
 				// failed to call SwitchSEMOff method
 				LogErrorTrace(__FILE__, __LINE__, _T("COTSSEMBruker::SetHTOnOff : failed to call SwitchSEMOff method."));

+ 1 - 1
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -192,7 +192,7 @@ namespace OTSMeasureApp
             ImgZoomRectangle.Y = originalImgRectangle.Y;
 
             pictureBox2.Visible = false;
-            Point rulerLocation = new Point(GetZoomedImageRect(picBox).Left-10, GetZoomedImageRect(picBox).Height - (int)(control_Ruler.Height * 2));
+            Point rulerLocation = new Point(GetZoomedImageRect(picBox).Left-10, GetZoomedImageRect(picBox).Height - (int)(control_Ruler.Height -3));
             control_Ruler.Location = rulerLocation;
             //标尺初始化
             RulerInit();

+ 17 - 17
OTSIncAMeasureApp/OTSIncAMeasureAppForm.Designer.cs

@@ -89,7 +89,7 @@
             this.rbCheckParam = new System.Windows.Forms.RibbonButton();
             this.rbPReport = new System.Windows.Forms.RibbonPanel();
             this.rbReport = new System.Windows.Forms.RibbonButton();
-            this.ribbonButton2 = new System.Windows.Forms.RibbonButton();
+            this.rb_Reclassify = new System.Windows.Forms.RibbonButton();
             this.rbTabView = new System.Windows.Forms.RibbonTab();
             this.ribView = new System.Windows.Forms.RibbonPanel();
             this.rbRuler = new System.Windows.Forms.RibbonButton();
@@ -746,7 +746,7 @@
             // 
             this.rbPReport.ButtonMoreVisible = false;
             this.rbPReport.Items.Add(this.rbReport);
-            this.rbPReport.Items.Add(this.ribbonButton2);
+            this.rbPReport.Items.Add(this.rb_Reclassify);
             this.rbPReport.Tag = "rbPReport";
             this.rbPReport.Text = "测量结果";
             // 
@@ -765,20 +765,20 @@
             this.rbReport.ToolTipTitle = null;
             this.rbReport.Click += new System.EventHandler(this.rbReport_Click);
             // 
-            // ribbonButton2
-            // 
-            this.ribbonButton2.AltKey = null;
-            this.ribbonButton2.DropDownArrowDirection = System.Windows.Forms.RibbonArrowDirection.Down;
-            this.ribbonButton2.DropDownArrowSize = new System.Drawing.Size(5, 3);
-            this.ribbonButton2.Image = global::OTSMeasureApp.Properties.Resources.Reset32;
-            this.ribbonButton2.SmallImage = ((System.Drawing.Image)(resources.GetObject("ribbonButton2.SmallImage")));
-            this.ribbonButton2.Style = System.Windows.Forms.RibbonButtonStyle.Normal;
-            this.ribbonButton2.Tag = null;
-            this.ribbonButton2.Text = "重新分类";
-            this.ribbonButton2.ToolTip = null;
-            this.ribbonButton2.ToolTipImage = null;
-            this.ribbonButton2.ToolTipTitle = null;
-            this.ribbonButton2.Click += new System.EventHandler(this.ribbonButton2_Click);
+            // rb_Reclassify
+            // 
+            this.rb_Reclassify.AltKey = null;
+            this.rb_Reclassify.DropDownArrowDirection = System.Windows.Forms.RibbonArrowDirection.Down;
+            this.rb_Reclassify.DropDownArrowSize = new System.Drawing.Size(5, 3);
+            this.rb_Reclassify.Image = global::OTSMeasureApp.Properties.Resources.Reset32;
+            this.rb_Reclassify.SmallImage = ((System.Drawing.Image)(resources.GetObject("rb_Reclassify.SmallImage")));
+            this.rb_Reclassify.Style = System.Windows.Forms.RibbonButtonStyle.Normal;
+            this.rb_Reclassify.Text = "重新分类";
+            this.rb_Reclassify.Tag = "rb_reclassify";
+            this.rb_Reclassify.ToolTip = null;
+            this.rb_Reclassify.ToolTipImage = null;
+            this.rb_Reclassify.ToolTipTitle = null;
+            this.rb_Reclassify.Click += new System.EventHandler(this.ribbonButton2_Click);
             // 
             // rbTabView
             // 
@@ -1112,7 +1112,7 @@
         public System.Windows.Forms.RibbonButton rbinterrupt;
         public System.Windows.Forms.RibbonButton rbAutoBeamOff;
         public System.Windows.Forms.RibbonButton rbSysMgrApp;
-        private System.Windows.Forms.RibbonButton ribbonButton2;
+        private System.Windows.Forms.RibbonButton rb_Reclassify;
         private System.Windows.Forms.RibbonButton ribbonButton4;
         private System.Windows.Forms.RibbonSeparator ribbonSeparator3;
         private System.Windows.Forms.RibbonSeparator ribbonSeparator4;

+ 7 - 6
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/EDSController.cs

@@ -69,13 +69,13 @@ namespace OTSModelSharp.ServiceCenter
         {
          var eleChemistry =  partWithXrayInfo.GetXray().GetElementQuantifyData();
             Dictionary<string, List<double>> eleInfoDic = new Dictionary<string, List<double>>();
-            bool hasRepeatEle = false;
+            //process the repeat ele problem
             foreach (var ele in eleChemistry)
             {
                 if (eleInfoDic.ContainsKey(ele.GetName()))//contain repeat data;
                 {
                     eleInfoDic[ele.GetName()].Add(ele.GetPercentage());
-                    hasRepeatEle = true;
+                    //hasRepeatEle = true;
                 }
                 else
                 {
@@ -86,9 +86,9 @@ namespace OTSModelSharp.ServiceCenter
 
 
             }
-            if (hasRepeatEle)
-            {
+           //normalization
                 Dictionary<string, double> resultInfo = new Dictionary<string, double>();
+                double sumvalue = 0;
                 foreach (var eleInfo in eleInfoDic)
                 {
                     double newPercentData=0;
@@ -97,17 +97,18 @@ namespace OTSModelSharp.ServiceCenter
                         newPercentData += p;
                     }
                     newPercentData = newPercentData / eleInfo.Value.Count;
+                    sumvalue += newPercentData;
                     resultInfo.Add(eleInfo.Key, newPercentData);              
                 }
                 foreach (var e in eleChemistry)
                 {
-                    e.SetPercentage(resultInfo[e.GetName()]);
+                    e.SetPercentage(resultInfo[e.GetName()]/sumvalue);
                 
                 }
                 partWithXrayInfo.GetXray().SetElementQuantifyData(eleChemistry);
 
 
-            }
+            
 
 
         }

+ 17 - 29
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -1566,53 +1566,40 @@ namespace OTSIncAReportGraph.Controls
         /// </summary>
         public void FullGraphMatch()
         {
-
             //全图匹配,首先要判断出来是按宽度来计算缩放,还是按高度来计算缩放
             double thiswidth = this.Width;
             double thisheight = this.Height;
-            double imagewidth = m_backRect.Width;
-            double imageheight = m_backRect.Height;
 
-            //如果宽已相等rect在thisheight范围内,是宽度匹配已经达到目的,或是高已相等rect在thiswidth范围内,是高度匹配已经达到目的
-            if ((thiswidth == imagewidth && thisheight > imagewidth) || (thisheight == imageheight && thiswidth > imagewidth))
-            {
-                //已经达到目的不操作,返回
-                return;
-            }
 
-            //判断当前是否宽度匹配未达到全图匹配效果
-            if (thiswidth == imagewidth && thisheight < imageheight)
-            {
-                //说明目前已经达到了宽度匹配,但是未能显示完全整图需要高度匹配
-                HeightMatch();
-                m_f_zoom_mix = m_zoom_record;
-                return;
-
-            }
 
-            //判断当前是否高度匹配未达到全图匹配效果
-            if (thisheight == imageheight && thiswidth < imagewidth)
+            double imagewidth = imageDisHelper.m_originalBackRect.Width;
+            double imageheight = imageDisHelper.m_originalBackRect.Height;
+            double zoom_FullGraph = 0;
+            if ((thiswidth == imagewidth && thisheight > imagewidth) || (thisheight == imageheight && thiswidth > imagewidth))
             {
-                //说明目前已经达到了高度匹配,但是未能显示完全的整图需要宽度匹配
-                WidthMatch();
-                m_f_zoom_mix = m_zoom_record;
                 return;
             }
-
             ls_d_cz_width = Math.Abs(thiswidth / imagewidth);
             ls_d_cz_height = Math.Abs(thisheight / imageheight);
 
-            //应该是看谁差的倍数大就按谁的进行调整,而不只能看高宽的差值
+
+
+
+            
+            
+            
             if ((1 - ls_d_cz_width) > (1 - ls_d_cz_height))
             {
-                //宽差大,就调用WidthMate
-                WidthMatch();
+                zoom_FullGraph= ls_d_cz_width;
             }
             else
             {
-                //高差大,则调用HightMate
-                HeightMatch();
+                zoom_FullGraph = ls_d_cz_height;
             }
+            ImageZoom((float)zoom_FullGraph, new PointF(0, 0));
+
+            int ls_x = (int)(this.Width - m_backRect.Width) / 2;
+            MoveImageToPoint(new PointF(ls_x, 0));
             m_f_zoom_mix = m_zoom_record;
         }
 
@@ -1884,6 +1871,7 @@ namespace OTSIncAReportGraph.Controls
 
 
 
+
         private void ExportoriginalspliceToolStripMenuItem_Click(object sender, EventArgs e)
         {
 

+ 67 - 4
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionSortImage.cs

@@ -659,7 +659,7 @@ namespace OTSIncAReportGraph.Controls
                                 item.DraggingMove(e.Location);
                                 item.IsSelect = false;
                                 item.IsDragging = false;
-                                item.DraggingPoint = Point.Empty;
+                                //item.DraggingPoint = Point.Empty;
                                 PointF ct = item.GetCenterPoint();
                                 if (ct.X < -100 || ct.X > this.Width + 100 || ct.Y < -100 || ct.Y > this.Height + 100)
                                 {
@@ -1290,9 +1290,10 @@ namespace OTSIncAReportGraph.Controls
             {
                 ls_spd.SortDParticle();
             }
-
-           
-
+            if(m_list_sortparticledistribution.Count>0)
+            {
+             m_beforedrag_pointf = m_list_sortparticledistribution[0].RectF.Location;
+            }
         }
        
 
@@ -1614,5 +1615,67 @@ namespace OTSIncAReportGraph.Controls
                 p.WaitForExit();
             }
         }
+
+
+        /// <summary>
+        /// 对分布图进行全图匹配操作
+        /// </summary>
+        public void FullGraphMatch()
+        {
+            //全图匹配,首先要判断出来是按宽度来计算缩放,还是按高度来计算缩放
+            double thiswidth = this.Width;
+            double thisheight = this.Height;
+            if(m_list_sortparticledistribution.Count==0)
+            {
+                return;
+            }
+            RectangleF rectangle = m_list_sortparticledistribution[0].RectF;
+            double imagewidth = rectangle.Width;
+            double zoom_FullGraph = 0;
+            if (thiswidth == imagewidth)
+            {
+                return;
+            }
+
+            zoom_FullGraph = Math.Abs(thiswidth / imagewidth);
+            ImageZoom((float)1, new PointF(0, 0));
+            PointF point11 = new PointF(ClientRectangle.X + ClientRectangle.Width * 1f / 50, ClientRectangle.Y);
+            MoveImageToPoint(point11);
+            m_f_zoom_mix = m_zoom_record;
+        }
+
+
+
+
+
+
+
+
+
+
+        private void MoveImageToPoint(PointF in_pointf)
+        {
+            if (m_list_sortparticledistribution.Count == 0)
+            {
+                return;
+            }
+            RectangleF rectangle = m_list_sortparticledistribution[0].RectF;
+            float Py = rectangle.Location.Y;
+            foreach (SortParticleDistribution ls_sortparticledistribution in m_list_sortparticledistribution)
+            {
+                ls_sortparticledistribution.RectF = new RectangleF(in_pointf.X,
+                         ls_sortparticledistribution.RectF.Location.Y + in_pointf.Y- Py, ls_sortparticledistribution.RectF.Width, ls_sortparticledistribution.RectF.Height);
+            }
+            m_beforedrag_pointf = in_pointf;
+            foreach (SortParticleDistribution ls_sortparticledistribution in m_list_sortparticledistribution)
+            {
+                foreach (DisplayParticle item in ls_sortparticledistribution.List_DParticle)
+                {
+                    item.DraggingPoint= rectangle.Location;
+                    item.DraggingMove(in_pointf);
+                }
+            }
+            Invalidate();
+        }
     }
 }

+ 84 - 33
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ListOfSimilarParticles.cs

@@ -16,6 +16,7 @@ using System.Linq;
 using System.Reflection;
 using System.Threading;
 using System.Windows.Forms;
+using static OTSDataType.otsdataconst;
 using Color = System.Drawing.Color;
 
 namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
@@ -34,8 +35,10 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
         private bool m_mythread_state = false;
         //底层操作类
         OTSReportGridsFun m_OTSIncAReportGridsFun = null;
+        frmReportApp m_ReportApp;
 
-        public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid, List<string> RenameInfo)
+
+		public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid, List<string> RenameInfo,frmReportApp ReportApp)
         {
             InitializeComponent();
             _particlesGridDevidePage = particlesGridDevidePage;
@@ -43,8 +46,8 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
             table = particlesGridDevidePage.table;
             _classifyid = classifyid;
             _RenameInfo = RenameInfo;
-
-            m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
+            m_ReportApp = ReportApp;
+			m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
 
 
             //设置窗体的双缓冲,以保证大数据时拖动不卡
@@ -609,46 +612,94 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
 			DataTable dt_STDGroups = new DataTable();
 			DataTable dt_ClassifySTD = new DataTable();
 			DataTable dt_IncAData = new DataTable();
-			SqLiteHelper sh_STDGroups = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
-			dt_STDGroups = sh_STDGroups.ExecuteQuery("select * from STDGroups");
 
-			SqLiteHelper sh_ClassifySTD = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
-			dt_ClassifySTD = sh_ClassifySTD.ExecuteQuery("select * from ClassifySTD");
 
-			dt_ClassifySTD.Columns.Add("GroupName");
-			dt_ClassifySTD.Columns.Add("GroupColor");
 
+			var systype = m_ReportApp.m_RptConfigFile.Systype;
+            if (systype == OTS_SysType_ID.IncA)
+            {
+                dt_ClassifySTD.Columns.Add("STDId");
+                dt_ClassifySTD.Columns.Add("StrName");
+                dt_ClassifySTD.Columns.Add("Color");
+                dt_ClassifySTD.Columns.Add("KeyElementList");
+                dt_ClassifySTD.Columns.Add("SubElementList");
+                dt_ClassifySTD.Columns.Add("UsingImgPropertyList");
+                dt_ClassifySTD.Columns.Add("UsingOtherPropertyList");
+                dt_ClassifySTD.Columns.Add("Expression");
+                dt_ClassifySTD.Columns.Add("Hardness");
+                dt_ClassifySTD.Columns.Add("Density");
+                dt_ClassifySTD.Columns.Add("Electrical_conductivity");
+                dt_ClassifySTD.Columns.Add("BSE");
+                dt_ClassifySTD.Columns.Add("Formula");
+                dt_ClassifySTD.Columns.Add("Element");
+                dt_ClassifySTD.Columns.Add("IfElementAnalysis");
+                dt_ClassifySTD.Columns.Add("ListNum");
+                dt_ClassifySTD.Columns.Add("GroupId");
+                dt_ClassifySTD.Columns.Add("GroupName");
+                dt_ClassifySTD.Columns.Add("GroupColor");
+
+                DataTable da = _particlesGridDevidePage.Particledata.GetParticleListForParticlSizeID("area", "");
+                for (int i = 0; i < da.Rows.Count; i++)
+                {
+                    if (Convert.ToInt64(da.Rows[i]["TypeId"]) > 9)
+                    {
+                        DataRow newRow = dt_ClassifySTD.NewRow();
+                        newRow["STDId"] = da.Rows[i]["TypeId"];
+                        newRow["StrName"] = da.Rows[i]["TypeName"];
+                        newRow["Color"] = da.Rows[i]["TypeColor"];
+                        newRow["GroupId"] = da.Rows[i]["GroupId"];
+                        newRow["GroupName"] = da.Rows[i]["GroupName"];
+                        newRow["GroupColor"] = da.Rows[i]["GroupColor"];
+                        dt_ClassifySTD.Rows.Add(newRow);
+                    }
+                }
+            }
+            else
+            {
+				SqLiteHelper sh_STDGroups = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
+				dt_STDGroups = sh_STDGroups.ExecuteQuery("select * from STDGroups");
 
-			for (int i = 0; i < dt_ClassifySTD.Rows.Count; i++)
-			{
-				for (int a = 0; a < dt_STDGroups.Rows.Count; a++)
+				SqLiteHelper sh_ClassifySTD = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
+				dt_ClassifySTD = sh_ClassifySTD.ExecuteQuery("select * from ClassifySTD");
+
+				dt_ClassifySTD.Columns.Add("GroupName");
+				dt_ClassifySTD.Columns.Add("GroupColor");
+
+
+				for (int i = 0; i < dt_ClassifySTD.Rows.Count; i++)
 				{
-					if (dt_ClassifySTD.Rows[i]["GroupId"].ToString() == dt_STDGroups.Rows[a]["id"].ToString())
+					for (int a = 0; a < dt_STDGroups.Rows.Count; a++)
 					{
-						dt_ClassifySTD.Rows[i]["GroupName"] = dt_STDGroups.Rows[a]["name"].ToString();
-						dt_ClassifySTD.Rows[i]["GroupColor"] = dt_STDGroups.Rows[a]["color"].ToString();
-						continue;
+						if (dt_ClassifySTD.Rows[i]["GroupId"].ToString() == dt_STDGroups.Rows[a]["id"].ToString())
+						{
+							dt_ClassifySTD.Rows[i]["GroupName"] = dt_STDGroups.Rows[a]["name"].ToString();
+							dt_ClassifySTD.Rows[i]["GroupColor"] = dt_STDGroups.Rows[a]["color"].ToString();
+							continue;
+						}
 					}
 				}
-			}
 
-			SqLiteHelper sh_Inclusion = new SqLiteHelper("data source='" + a_address + "\\FIELD_FILES\\Inclusion.db" + "'");
-			dt_IncAData = sh_Inclusion.ExecuteQuery("select * from IncAData");
-			for (int i = 0; i < dt_IncAData.Rows.Count; i++)
-			{
-				if (Convert.ToInt64(dt_IncAData.Rows[i]["TypeId"]) > 50000)
+				SqLiteHelper sh_Inclusion = new SqLiteHelper("data source='" + a_address + "\\FIELD_FILES\\Inclusion.db" + "'");
+				dt_IncAData = sh_Inclusion.ExecuteQuery("select * from IncAData");
+				for (int i = 0; i < dt_IncAData.Rows.Count; i++)
 				{
-					DataRow newRow = dt_ClassifySTD.NewRow();
-					newRow["STDId"] = dt_IncAData.Rows[i]["TypeId"];
-					newRow["StrName"] = dt_IncAData.Rows[i]["TypeName"];
-					newRow["Color"] = dt_IncAData.Rows[i]["TypeColor"];
-					newRow["GroupId"] = dt_IncAData.Rows[i]["GroupId"];
-					newRow["GroupName"] = dt_IncAData.Rows[i]["GroupName"];
-					newRow["GroupColor"] = dt_IncAData.Rows[i]["GroupColor"];
-					dt_ClassifySTD.Rows.Add(newRow);
+					if (Convert.ToInt64(dt_IncAData.Rows[i]["TypeId"]) > 50000)
+					{
+						DataRow newRow = dt_ClassifySTD.NewRow();
+						newRow["STDId"] = dt_IncAData.Rows[i]["TypeId"];
+						newRow["StrName"] = dt_IncAData.Rows[i]["TypeName"];
+						newRow["Color"] = dt_IncAData.Rows[i]["TypeColor"];
+						newRow["GroupId"] = dt_IncAData.Rows[i]["GroupId"];
+						newRow["GroupName"] = dt_IncAData.Rows[i]["GroupName"];
+						newRow["GroupColor"] = dt_IncAData.Rows[i]["GroupColor"];
+						dt_ClassifySTD.Rows.Add(newRow);
+					}
 				}
 			}
 
+
+      
+
 			return dt_ClassifySTD;
 		}
 
@@ -901,15 +952,15 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
                 }
             }
         }
-        public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid)
+        public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid, frmReportApp ReportApp)
         {
             InitializeComponent();
             _particlesGridDevidePage = particlesGridDevidePage;
             SelXrayclr.SetXrayData(SelXray);
             table = particlesGridDevidePage.table;
             _classifyid = classifyid;
-
-            m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
+			m_ReportApp = ReportApp;
+			m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
 
 
             //设置窗体的双缓冲,以保证大数据时拖动不卡

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

@@ -1622,45 +1622,93 @@ namespace OTSIncAReportGrids
             DataTable dt_STDGroups = new DataTable();
 			DataTable dt_ClassifySTD = new DataTable();
 			DataTable dt_IncAData = new DataTable();
-			SqLiteHelper sh_STDGroups = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
-			dt_STDGroups = sh_STDGroups.ExecuteQuery("select * from STDGroups");
 
-            SqLiteHelper sh_ClassifySTD = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
-			dt_ClassifySTD = sh_ClassifySTD.ExecuteQuery("select * from ClassifySTD");
-
-            dt_ClassifySTD.Columns.Add("GroupName");
-            dt_ClassifySTD.Columns.Add("GroupColor");
-
-
-			for (int i = 0; i < dt_ClassifySTD.Rows.Count; i++)
-            {
-                for (int a = 0; a < dt_STDGroups.Rows.Count; a++)
-                {
-                    if (dt_ClassifySTD.Rows[i]["GroupId"].ToString() == dt_STDGroups.Rows[a]["id"].ToString())
+			
+			var systype = m_ReportApp.m_RptConfigFile.Systype;
+            if (systype == OTS_SysType_ID.IncA)
+            {
+				dt_ClassifySTD.Columns.Add("STDId");
+				dt_ClassifySTD.Columns.Add("StrName");
+				dt_ClassifySTD.Columns.Add("Color");
+				dt_ClassifySTD.Columns.Add("KeyElementList");
+				dt_ClassifySTD.Columns.Add("SubElementList");
+				dt_ClassifySTD.Columns.Add("UsingImgPropertyList");
+				dt_ClassifySTD.Columns.Add("UsingOtherPropertyList");
+				dt_ClassifySTD.Columns.Add("Expression");
+				dt_ClassifySTD.Columns.Add("Hardness");
+				dt_ClassifySTD.Columns.Add("Density");
+				dt_ClassifySTD.Columns.Add("Electrical_conductivity");
+				dt_ClassifySTD.Columns.Add("BSE");
+				dt_ClassifySTD.Columns.Add("Formula");
+				dt_ClassifySTD.Columns.Add("Element");
+				dt_ClassifySTD.Columns.Add("IfElementAnalysis");
+				dt_ClassifySTD.Columns.Add("ListNum");
+				dt_ClassifySTD.Columns.Add("GroupId");
+				dt_ClassifySTD.Columns.Add("GroupName");
+				dt_ClassifySTD.Columns.Add("GroupColor");
+
+				DataTable da = Particledata.GetParticleListForParticlSizeID("area", "");
+                for (int i = 0; i < da.Rows.Count; i++)
+                {
+                    if (Convert.ToInt64(da.Rows[i]["TypeId"]) > 9)
                     {
-                        dt_ClassifySTD.Rows[i]["GroupName"] = dt_STDGroups.Rows[a]["name"].ToString();
-						dt_ClassifySTD.Rows[i]["GroupColor"] = dt_STDGroups.Rows[a]["color"].ToString();
-						continue;
-					}
+                        DataRow newRow = dt_ClassifySTD.NewRow();
+                        newRow["STDId"] = da.Rows[i]["TypeId"];
+                        newRow["StrName"] = da.Rows[i]["TypeName"];
+                        newRow["Color"] = da.Rows[i]["TypeColor"];
+                        newRow["GroupId"] = da.Rows[i]["GroupId"];
+                        newRow["GroupName"] = da.Rows[i]["GroupName"];
+                        newRow["GroupColor"] = da.Rows[i]["GroupColor"];
+                        dt_ClassifySTD.Rows.Add(newRow);
+                    }
                 }
             }
-
-			SqLiteHelper sh_Inclusion = new SqLiteHelper("data source='" + a_address + "\\FIELD_FILES\\Inclusion.db" + "'");
-			dt_IncAData = sh_Inclusion.ExecuteQuery("select * from IncAData");
-            for (int i = 0; i < dt_IncAData.Rows.Count; i++)
+            else
             {
-                if (Convert.ToInt64(dt_IncAData.Rows[i]["TypeId"]) > 50000)
-                {
-					DataRow newRow = dt_ClassifySTD.NewRow();
-                    newRow["STDId"] = dt_IncAData.Rows[i]["TypeId"];
-					newRow["StrName"] = dt_IncAData.Rows[i]["TypeName"];
-					newRow["Color"] = dt_IncAData.Rows[i]["TypeColor"];
-                    newRow["GroupId"] = dt_IncAData.Rows[i]["GroupId"];
-                    newRow["GroupName"] = dt_IncAData.Rows[i]["GroupName"];
-					newRow["GroupColor"] = dt_IncAData.Rows[i]["GroupColor"];
-					dt_ClassifySTD.Rows.Add(newRow);
+				
+					SqLiteHelper sh_STDGroups = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
+					dt_STDGroups = sh_STDGroups.ExecuteQuery("select * from STDGroups");
+
+					SqLiteHelper sh_ClassifySTD = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
+					dt_ClassifySTD = sh_ClassifySTD.ExecuteQuery("select * from ClassifySTD");
+
+					dt_ClassifySTD.Columns.Add("GroupName");
+					dt_ClassifySTD.Columns.Add("GroupColor");
+
+
+					for (int i = 0; i < dt_ClassifySTD.Rows.Count; i++)
+					{
+						for (int a = 0; a < dt_STDGroups.Rows.Count; a++)
+						{
+							if (dt_ClassifySTD.Rows[i]["GroupId"].ToString() == dt_STDGroups.Rows[a]["id"].ToString())
+							{
+								dt_ClassifySTD.Rows[i]["GroupName"] = dt_STDGroups.Rows[a]["name"].ToString();
+								dt_ClassifySTD.Rows[i]["GroupColor"] = dt_STDGroups.Rows[a]["color"].ToString();
+								continue;
+							}
+						}
+					}
+			
+
+
+				SqLiteHelper sh_Inclusion = new SqLiteHelper("data source='" + a_address + "\\FIELD_FILES\\Inclusion.db" + "'");
+				dt_IncAData = sh_Inclusion.ExecuteQuery("select * from IncAData");
+				for (int i = 0; i < dt_IncAData.Rows.Count; i++)
+				{
+					if (Convert.ToInt64(dt_IncAData.Rows[i]["TypeId"]) > 50000)
+					{
+						DataRow newRow = dt_ClassifySTD.NewRow();
+						newRow["STDId"] = dt_IncAData.Rows[i]["TypeId"];
+						newRow["StrName"] = dt_IncAData.Rows[i]["TypeName"];
+						newRow["Color"] = dt_IncAData.Rows[i]["TypeColor"];
+						newRow["GroupId"] = dt_IncAData.Rows[i]["GroupId"];
+						newRow["GroupName"] = dt_IncAData.Rows[i]["GroupName"];
+						newRow["GroupColor"] = dt_IncAData.Rows[i]["GroupColor"];
+						dt_ClassifySTD.Rows.Add(newRow);
+					}
 				}
-            }
+			}
+        
 
 			return dt_ClassifySTD;
         }
@@ -1731,7 +1779,7 @@ namespace OTSIncAReportGrids
                             ReportFun.GetXrayByParticleTagIDAndFieldID_ForDrawDistrbutionImageAndBSE(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray, out i_xray_id, out list_celementchemistryclr);
                         }
                     }
-                    ListOfSimilarParticles Form_listOfSimilarParticles = new ListOfSimilarParticles(this, Search_xray, classifyid,strings);
+                    ListOfSimilarParticles Form_listOfSimilarParticles = new ListOfSimilarParticles(this, Search_xray, classifyid,strings, m_ReportApp);
                     DialogResult result3=Form_listOfSimilarParticles.ShowDialog();
                     if(result3== DialogResult.OK)
                     {
@@ -2588,7 +2636,7 @@ namespace OTSIncAReportGrids
                     ReportFun.GetXrayByParticleTagIDAndFieldID_ForDrawDistrbutionImageAndBSE(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray, out i_xray_id, out list_celementchemistryclr);
                 }
             }
-            ListOfSimilarParticles Form_listOfSimilarParticles = new ListOfSimilarParticles(this, Search_xray, classifyid);
+            ListOfSimilarParticles Form_listOfSimilarParticles = new ListOfSimilarParticles(this, Search_xray, classifyid, m_ReportApp);
             DialogResult result3 = Form_listOfSimilarParticles.ShowDialog();
             if (result3 == DialogResult.OK)
             {

+ 2 - 0
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -503,6 +503,8 @@ namespace OTSIncAReportApp
                         if (im_Control_DrawDistrbutionSortImage != null)
                         {
                             //排列图
+                            im_Control_DrawDistrbutionSortImage.FullGraphMatch();
+                            im_Control_DrawDistrbutionSortImage.Invalidate();
                         }
                     }
                     break;

+ 1 - 1
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -160,7 +160,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
 			string sqlp = @"select TypeId,TypeName,TypeColor,count(1) as con,avg(" + con
 				+ ") as av,max(" + con
-				+ ") as max ,GroupName ,GroupId";
+				+ ") as max ,GroupName ,GroupId,GroupColor";
 			sqlp = sqlp + " from IncAData where typeid !=-1 and typeid !=4";
 			if (fieldAndPartic != "")
 			{

+ 1 - 0
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -1672,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>