소스 검색

Merge branch 'OTSRelease3_0' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_0

gsp 1 년 전
부모
커밋
52e35e01a9

+ 3 - 1
OTSCPP/OTSClassifyEngine/InclutionClassifyEngine.cpp

@@ -132,7 +132,9 @@ namespace OTSClassifyEngine
 	bool InclutionClassifyEngine::ZeroElementProcess(COTSParticlePtr particle)
 	{
 		auto chems = particle->GetXrayInfo()->GetElementQuantifyData();
-		m_Engine->NominateElChemsList(chems, chems);
+		CElementChemistriesList chemsOut;
+		m_Engine->NominateElChemsList(chems, chemsOut);
+		particle->GetXrayInfo()->SetElementQuantifyData(chemsOut);
 		return true;
 	}
 

+ 1 - 12
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSXRayParam.cs

@@ -46,7 +46,6 @@ namespace OTSDataType
 
         private bool m_nUsingXray;
         private bool m_UseFilter;
-        bool m_ZeroElementProcess;
 
         private int m_XrayLimit;
         //private double m_xrayStep;
@@ -86,7 +85,6 @@ namespace OTSDataType
 
             m_nUsingXray = a_oSource.m_nUsingXray;
             m_UseFilter = a_oSource.m_UseFilter;
-            m_ZeroElementProcess = a_oSource.m_ZeroElementProcess;
             m_XrayLimit = a_oSource.m_XrayLimit;
             //m_xrayStep = a_oSource.m_xrayStep;
         }
@@ -109,8 +107,7 @@ namespace OTSDataType
                 //m_nFastXrayTime == a_oSource.m_nFastXrayTime &&
            
                 m_nUsingXray == a_oSource.m_nUsingXray &&
-                m_UseFilter == a_oSource.m_UseFilter&&
-                m_ZeroElementProcess == a_oSource.m_ZeroElementProcess;
+                m_UseFilter == a_oSource.m_UseFilter;
         }
 
 
@@ -163,12 +160,6 @@ namespace OTSDataType
             m_UseFilter = a_UseFilter;
         }
 
-        public bool GetZeroelementprocess() { return m_ZeroElementProcess; }
-        public void SetZeroelementprocess(bool a_Zeroelementprocess)
-        {
-            m_ZeroElementProcess = a_Zeroelementprocess;
-        }
-
         public override void Serialize(bool isStoring, XmlDocument classDoc, XmlNode rootNode)
         {
             xString xnScanMode = new xString();
@@ -229,7 +220,6 @@ namespace OTSDataType
                 xnUseFilter.AssignValue(m_UseFilter);
 
                 xXrayLimit.AssignValue(m_XrayLimit);
-                xZeroElementProcess.AssignValue(m_ZeroElementProcess);
                 //xXrayStep.AssignValue(m_xrayStep);
 
                 slo.Serialize(true, classDoc, rootNode);
@@ -253,7 +243,6 @@ namespace OTSDataType
                 m_UseFilter = xnUseFilter.value();
 
                 m_XrayLimit = xXrayLimit.value();
-                m_ZeroElementProcess = xZeroElementProcess.value();
                 //m_xrayStep = xXrayStep.value();
             }
         }

+ 30 - 35
OTSIncAMeasureApp/1-OTSMeasure/Measure/DBDataTransition/ElementChemistryDB.cs

@@ -76,49 +76,46 @@ namespace OTSModelSharp.DTLBase
             return true;
         }
 
-
-        public bool SaveElementChemistriesList(List<CPosXrayClr> a_xrayPointList)
+        public bool SaveElementChemistriesList_Batch(List<CPosXrayClr> a_xrayPointList)
         {
-
-            var tableInfoPtr = GetTableInfo();
-
-            var datastorePtr = GetDatastore();
-
-            String sInsertFormat = tableInfoPtr.GetInsertCommandFormatString();
-            String sSQLCommand = "";
-
+            List<KeyValuePair<string, SQLiteParameter[]>> list = new List<KeyValuePair<string, SQLiteParameter[]>>();
             foreach (var xrayPointInfo in a_xrayPointList)
             {
                 List<CElementChemistryClr> listElemnentChemistries = xrayPointInfo.GetElementQuantifyData();
-
                 int nSize = (int)listElemnentChemistries.Count;
                 int nElementIndex = 0;
                 foreach (var pElementChemistry in listElemnentChemistries)
                 {
-                    sSQLCommand = String.Format(sInsertFormat,
-                    xrayPointInfo.GetIndex(),
-                    xrayPointInfo.GetScanFieldId(),
-                    nElementIndex,
-                    nSize,
-                    pElementChemistry.GetName(),
-                    pElementChemistry.GetPercentage());
-                    //var helper = new SQLiteHelper(datastorePtr);         
-                    if (datastorePtr.RunCommand(sSQLCommand) != true)
-                    {
-
-
-
-                        return false;
-                    }
-
-                    nElementIndex++;
+                    //INSERT INTO ElementChemistry(XRayId, FieldId, ElementId, ElementNum, Name, Percentage) VALUES({ 0:G},{ 1:G},{ 2:G},{ 3:G},"{4:G}",{ 5:G})
+                    string sSQLCommand = "INSERT INTO ElementChemistry(XRayId, FieldId, ElementId, ElementNum, Name, Percentage) VALUES(@XRayId,@FieldId,@ElementId,@ElementNum,@Name,@Percentage)";
+                    var paras = new SQLiteParameter[6];
+                    paras[0] = new SQLiteParameter("XRayId");
+                    paras[0].Value = xrayPointInfo.GetIndex();
+                    paras[1] = new SQLiteParameter("FieldId");
+                    paras[1].Value = xrayPointInfo.GetScanFieldId();
+                    paras[2] = new SQLiteParameter("ElementId");
+                    paras[2].Value = nElementIndex;
+                    paras[3] = new SQLiteParameter("ElementNum");
+                    paras[3].Value = nSize;
+                    paras[4] = new SQLiteParameter("Name");
+                    paras[4].Value = pElementChemistry.GetName();
+                    paras[5] = new SQLiteParameter("Percentage");
+                    paras[5].Value = pElementChemistry.GetPercentage();
+                    list.Add(new KeyValuePair<string, SQLiteParameter[]>(sSQLCommand, paras));
                 }
-
             }
-
-            return true;
+            var datastorePtr = GetDatastore();
+            try
+            {
+                datastorePtr.ExecuteNonQueryBatch(ref list);
+                return true;
+            }
+            catch (Exception e)
+            {
+                NLog.LogManager.GetCurrentClassLogger().Error(e.Message);
+                return false;
+            }
         }
-
         public bool SaveElementChemistriesList(CPosXrayClr a_pxrayPoint)
         {
 
@@ -184,12 +181,10 @@ namespace OTSModelSharp.DTLBase
                 paras[4].Value = pElementChemistry.GetName();
                 paras[5].Value = pElementChemistry.GetPercentage();
 
-
-
                 nElementIndex++;
                 cmds.Add(new KeyValuePair<string, SQLiteParameter[]>(sInsertFormat.Key, paras));
             }
-
+            
             return cmds;
         }
 

+ 1 - 3
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.cs

@@ -664,7 +664,6 @@ namespace OTSMeasureApp
 
             IDC_FILTER.Checked = m_cotsxrayprm.GetUseFilter();
 
-            IDC_Zeroelementprocess.Checked = m_cotsxrayprm.GetZeroelementprocess();
         }
 
         /// <summary>
@@ -849,7 +848,6 @@ namespace OTSMeasureApp
 
             m_cotsxrayprm.SetUseFilter(IDC_FILTER.Checked);
 
-            m_cotsxrayprm.SetZeroelementprocess(IDC_Zeroelementprocess.Checked);
 
 
             //m_cotsxrayprm.SetShowScanMode(IDC_XRAY_MODE_SWITCH.Checked);
@@ -999,7 +997,7 @@ namespace OTSMeasureApp
             {
                 if (IDC_COMBO_STDSelect.Text != "NoSTDDB")
                 {
-                    Process p = System.Diagnostics.Process.Start(".\\OTSPartA_STDEditor.exe", Application.StartupPath + "\\Config\\SysData\\" + IDC_COMBO_STDSelect.Text+".db");
+                    Process p = System.Diagnostics.Process.Start(".\\OTSPartA_STDEditor.exe", "\""+ Application.StartupPath + "\\Config\\SysData\\" + IDC_COMBO_STDSelect.Text+".db"+ "\"");
                     p.WaitForExit();
                 }
                 else

+ 11 - 47
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.designer.cs

@@ -105,9 +105,6 @@
             this.label23 = new System.Windows.Forms.Label();
             this.label20 = new System.Windows.Forms.Label();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
-            this.IDC_Zeroelementprocess = new System.Windows.Forms.CheckBox();
-            this.label91 = new System.Windows.Forms.Label();
-            this.label8 = new System.Windows.Forms.Label();
             this.IDC_FILTER = new System.Windows.Forms.CheckBox();
             this.IDC_EDIT_XrayLimit = new System.Windows.Forms.TextBox();
             this.label52 = new System.Windows.Forms.Label();
@@ -996,9 +993,6 @@
             // 
             // groupBox6
             // 
-            this.groupBox6.Controls.Add(this.IDC_Zeroelementprocess);
-            this.groupBox6.Controls.Add(this.label91);
-            this.groupBox6.Controls.Add(this.label8);
             this.groupBox6.Controls.Add(this.IDC_FILTER);
             this.groupBox6.Controls.Add(this.IDC_EDIT_XrayLimit);
             this.groupBox6.Controls.Add(this.label52);
@@ -1027,37 +1021,10 @@
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "X-ray参数";
             // 
-            // IDC_Zeroelementprocess
-            // 
-            this.IDC_Zeroelementprocess.AutoSize = true;
-            this.IDC_Zeroelementprocess.Location = new System.Drawing.Point(275, 158);
-            this.IDC_Zeroelementprocess.Margin = new System.Windows.Forms.Padding(2);
-            this.IDC_Zeroelementprocess.Name = "IDC_Zeroelementprocess";
-            this.IDC_Zeroelementprocess.Size = new System.Drawing.Size(15, 14);
-            this.IDC_Zeroelementprocess.TabIndex = 838;
-            this.IDC_Zeroelementprocess.UseVisualStyleBackColor = true;
-            // 
-            // label91
-            // 
-            this.label91.AutoSize = true;
-            this.label91.Location = new System.Drawing.Point(7, 158);
-            this.label91.Name = "label91";
-            this.label91.Size = new System.Drawing.Size(89, 12);
-            this.label91.TabIndex = 837;
-            this.label91.Text = "是否元素归一化";
-            // 
-            // label8
-            // 
-            this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(7, 158);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(0, 12);
-            this.label8.TabIndex = 836;
-            // 
             // IDC_FILTER
             // 
             this.IDC_FILTER.AutoSize = true;
-            this.IDC_FILTER.Location = new System.Drawing.Point(276, 189);
+            this.IDC_FILTER.Location = new System.Drawing.Point(278, 186);
             this.IDC_FILTER.Margin = new System.Windows.Forms.Padding(2);
             this.IDC_FILTER.Name = "IDC_FILTER";
             this.IDC_FILTER.Size = new System.Drawing.Size(15, 14);
@@ -1066,7 +1033,7 @@
             // 
             // IDC_EDIT_XrayLimit
             // 
-            this.IDC_EDIT_XrayLimit.Location = new System.Drawing.Point(138, 125);
+            this.IDC_EDIT_XrayLimit.Location = new System.Drawing.Point(141, 149);
             this.IDC_EDIT_XrayLimit.Margin = new System.Windows.Forms.Padding(2);
             this.IDC_EDIT_XrayLimit.MaxLength = 10;
             this.IDC_EDIT_XrayLimit.Name = "IDC_EDIT_XrayLimit";
@@ -1076,7 +1043,7 @@
             // label52
             // 
             this.label52.AutoSize = true;
-            this.label52.Location = new System.Drawing.Point(7, 188);
+            this.label52.Location = new System.Drawing.Point(9, 185);
             this.label52.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label52.Name = "label52";
             this.label52.Size = new System.Drawing.Size(77, 12);
@@ -1086,7 +1053,7 @@
             // label47
             // 
             this.label47.AutoSize = true;
-            this.label47.Location = new System.Drawing.Point(6, 128);
+            this.label47.Location = new System.Drawing.Point(9, 152);
             this.label47.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label47.Name = "label47";
             this.label47.Size = new System.Drawing.Size(53, 12);
@@ -1178,7 +1145,7 @@
             // 
             // IDC_TEXTBOX_ANALYXRAYSPEED_TIME
             // 
-            this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Location = new System.Drawing.Point(141, 71);
+            this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Location = new System.Drawing.Point(141, 81);
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.MaxLength = 10;
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Name = "IDC_TEXTBOX_ANALYXRAYSPEED_TIME";
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Size = new System.Drawing.Size(117, 21);
@@ -1198,7 +1165,7 @@
             // label32
             // 
             this.label32.AutoSize = true;
-            this.label32.Location = new System.Drawing.Point(6, 74);
+            this.label32.Location = new System.Drawing.Point(6, 84);
             this.label32.Name = "label32";
             this.label32.Size = new System.Drawing.Size(83, 12);
             this.label32.TabIndex = 770;
@@ -1207,7 +1174,7 @@
             // label39
             // 
             this.label39.AutoSize = true;
-            this.label39.Location = new System.Drawing.Point(273, 74);
+            this.label39.Location = new System.Drawing.Point(273, 84);
             this.label39.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label39.Name = "label39";
             this.label39.Size = new System.Drawing.Size(17, 12);
@@ -1218,7 +1185,7 @@
             // 
             this.IDC_COMBO_XRAYSCANMODE.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.IDC_COMBO_XRAYSCANMODE.FormattingEnabled = true;
-            this.IDC_COMBO_XRAYSCANMODE.Location = new System.Drawing.Point(142, 40);
+            this.IDC_COMBO_XRAYSCANMODE.Location = new System.Drawing.Point(142, 50);
             this.IDC_COMBO_XRAYSCANMODE.Margin = new System.Windows.Forms.Padding(2);
             this.IDC_COMBO_XRAYSCANMODE.Name = "IDC_COMBO_XRAYSCANMODE";
             this.IDC_COMBO_XRAYSCANMODE.Size = new System.Drawing.Size(150, 20);
@@ -1227,7 +1194,7 @@
             // 
             // IDC_EDIT_ANALYXRAYAIMVALUE
             // 
-            this.IDC_EDIT_ANALYXRAYAIMVALUE.Location = new System.Drawing.Point(139, 101);
+            this.IDC_EDIT_ANALYXRAYAIMVALUE.Location = new System.Drawing.Point(139, 112);
             this.IDC_EDIT_ANALYXRAYAIMVALUE.Margin = new System.Windows.Forms.Padding(2);
             this.IDC_EDIT_ANALYXRAYAIMVALUE.MaxLength = 10;
             this.IDC_EDIT_ANALYXRAYAIMVALUE.Name = "IDC_EDIT_ANALYXRAYAIMVALUE";
@@ -1238,7 +1205,7 @@
             // label33
             // 
             this.label33.AutoSize = true;
-            this.label33.Location = new System.Drawing.Point(9, 104);
+            this.label33.Location = new System.Drawing.Point(9, 115);
             this.label33.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label33.Name = "label33";
             this.label33.Size = new System.Drawing.Size(119, 12);
@@ -1248,7 +1215,7 @@
             // label31
             // 
             this.label31.AutoSize = true;
-            this.label31.Location = new System.Drawing.Point(7, 42);
+            this.label31.Location = new System.Drawing.Point(7, 52);
             this.label31.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label31.Name = "label31";
             this.label31.Size = new System.Drawing.Size(83, 12);
@@ -1476,8 +1443,5 @@
         public System.Windows.Forms.TextBox IDC_EDIT_Overlap;
         private System.Windows.Forms.Label label52;
         public System.Windows.Forms.CheckBox IDC_FILTER;
-        public System.Windows.Forms.CheckBox IDC_Zeroelementprocess;
-        private System.Windows.Forms.Label label91;
-        private System.Windows.Forms.Label label8;
     }
 }

+ 1 - 1
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -1158,7 +1158,7 @@ namespace OTSMeasureApp
             {
                 try
                 {
-                    System.Diagnostics.Process p = System.Diagnostics.Process.Start(".\\OTSPartA_STDEditor.exe", openFileDialog.FileName);
+                    System.Diagnostics.Process p = System.Diagnostics.Process.Start(".\\OTSPartA_STDEditor.exe", "\""+openFileDialog.FileName+ "\"");
                     p.WaitForExit();
                 }
                 catch (Exception ex)

+ 10 - 9
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.designer.cs

@@ -32,6 +32,7 @@
             this.CMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
             this.ToolStripMenuItem_selected = new System.Windows.Forms.ToolStripMenuItem();
             this.ToolStripMenuItem_movesempoint = new System.Windows.Forms.ToolStripMenuItem();
+            this.ToolStripMenuItem_ParticleSplicing = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStripMenuItem_copyimage = new System.Windows.Forms.ToolStripMenuItem();
             this.ExportoriginalspliceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.ToolStripMenuItemDelete_Particle = new System.Windows.Forms.ToolStripMenuItem();
@@ -47,7 +48,6 @@
             this.aSTMToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.显示所有帧ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.清除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.ToolStripMenuItem_ParticleSplicing = new System.Windows.Forms.ToolStripMenuItem();
             this.CMenuStrip.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -65,7 +65,7 @@
             this.ImportSTDDb,
             this.显示国标信息ToolStripMenuItem});
             this.CMenuStrip.Name = "contextMenuStrip1";
-            this.CMenuStrip.Size = new System.Drawing.Size(211, 224);
+            this.CMenuStrip.Size = new System.Drawing.Size(211, 202);
             // 
             // ToolStripMenuItem_selected
             // 
@@ -81,6 +81,13 @@
             this.ToolStripMenuItem_movesempoint.Text = "移动SEM至颗粒所在位置";
             this.ToolStripMenuItem_movesempoint.Click += new System.EventHandler(this.ToolStripMenuItem_movesempoint_Click);
             // 
+            // ToolStripMenuItem_ParticleSplicing
+            // 
+            this.ToolStripMenuItem_ParticleSplicing.Name = "ToolStripMenuItem_ParticleSplicing";
+            this.ToolStripMenuItem_ParticleSplicing.Size = new System.Drawing.Size(210, 22);
+            this.ToolStripMenuItem_ParticleSplicing.Text = "导出颗粒拼接图";
+            this.ToolStripMenuItem_ParticleSplicing.Click += new System.EventHandler(this.ToolStripMenuItem_ParticleSplicing_Click);
+            // 
             // toolStripMenuItem_copyimage
             // 
             this.toolStripMenuItem_copyimage.Name = "toolStripMenuItem_copyimage";
@@ -114,6 +121,7 @@
             this.ImportSTDDb.Name = "ImportSTDDb";
             this.ImportSTDDb.Size = new System.Drawing.Size(210, 22);
             this.ImportSTDDb.Text = "导入标准库";
+            this.ImportSTDDb.Visible = false;
             this.ImportSTDDb.Click += new System.EventHandler(this.ImportSTDDb_Click);
             // 
             // 显示国标信息ToolStripMenuItem
@@ -201,13 +209,6 @@
             this.清除ToolStripMenuItem.Text = "清除";
             this.清除ToolStripMenuItem.Click += new System.EventHandler(this.清除ToolStripMenuItem_Click);
             // 
-            // ToolStripMenuItem_ParticleSplicing
-            // 
-            this.ToolStripMenuItem_ParticleSplicing.Name = "ToolStripMenuItem_ParticleSplicing";
-            this.ToolStripMenuItem_ParticleSplicing.Size = new System.Drawing.Size(210, 22);
-            this.ToolStripMenuItem_ParticleSplicing.Text = "导出颗粒拼接图";
-            this.ToolStripMenuItem_ParticleSplicing.Click += new System.EventHandler(this.ToolStripMenuItem_ParticleSplicing_Click);
-            // 
             // Control_DrawDistrbutionImageAndBSE
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

+ 11 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -167,7 +167,7 @@ namespace OTSIncAReportGrids
             ReportFun = new OTSImageDisHelp(resultFile);
 
             string sou = m_condition.m_CurrentConditions[OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE].itemDisplayVal.ToString();
-            if (sou.Contains("+"))
+            if (!sou.Contains("+"))
             {
                 result = m_ReportApp.m_rstDataMgr.ResultFilesList[0];
             }
@@ -855,7 +855,16 @@ namespace OTSIncAReportGrids
                             }
                             else
                             {
-                                dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = particles.Rows[i][enl.Current.Key];
+                                double val = 0;
+                                if(double.TryParse(Convert.ToString(particles.Rows[i][enl.Current.Key]),out val))
+                                {
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = val;
+                                }
+                                else
+                                {
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = particles.Rows[i][enl.Current.Key];
+                                }
+                                
                             }
                         }
                         if (enl.Current.Key == "TypeName")

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

@@ -557,8 +557,8 @@ namespace OTSIncAReportApp
                         {
                             if (m_fileName != m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.ShowSourceName)
                             {
-                                //如果已经不是原先的数据源,则需要重新加载,设定为空,后面重新加载
-                                m_ReportApp.im_Control_DrawDistrbutionImageAndBSE = null;
+                                m_ReportApp.im_Control_DrawDistrbutionImageAndBSE = null;                                //如果已经不是原先的数据源,则需要重新加载,设定为空,后面重新加载
+
                             }
                         }
 
@@ -579,10 +579,6 @@ namespace OTSIncAReportApp
                             m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.DrawDistrbutionImageAndBSE_ByQuery(m_conditionData);
                             m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.SetSelectParticle(m_ReportApp.GetSelectedParticles());
 
-                            
-
-                          
-
                         }
                         else if (m_ReportApp.im_Control_DrawDistrbutionImageAndBSE == null)
                         {

+ 11 - 11
OTSIncAReportApp/1-UI/frmMeasureRstMgr.cs

@@ -152,7 +152,7 @@ namespace OTSIncAReportApp
                     treeView1.SelectedNode = e.Node;    //当前被选中
 
                     treeView1.Refresh();
-
+                     
                 }
             }
         }
@@ -256,11 +256,13 @@ namespace OTSIncAReportApp
                 checkednode = "";
             }
 
-
-            //插入多数据源选项
-            m_ReportApp.MoreSource = checkednode;
-            m_ConditionChoose.SetDefaultConditionValue();
-            m_ConditionChoose.DisCurrentPicProperty();//刷新
+            if (treeView1.Nodes.Count>1&&e.Button == MouseButtons.Left)//判断按下鼠标右键
+            {
+                //插入多数据源选项
+                m_ReportApp.MoreSource = checkednode;
+                m_ConditionChoose.SetDefaultConditionValue();
+                m_ConditionChoose.DisCurrentPicProperty();//刷新
+            }
 
 
             if (e.Button == MouseButtons.Right)//判断按下鼠标右键
@@ -670,7 +672,7 @@ namespace OTSIncAReportApp
 
             CIncAFileMgr pDBFileMgr = new CIncAFileMgr(dbfile);
             var mergedpartdb = pDBFileMgr.GetMergedParticleDB();
-
+            mergedpartdb.RemoveAllRows();
 
             foreach (COTSParticleClr part in mergedParts)
             {
@@ -683,7 +685,7 @@ namespace OTSIncAReportApp
             {
                 ches.Add(part.GetXray());
             }
-            xraydb.SaveElementChemistriesList(ches);
+            xraydb.SaveElementChemistriesList_Batch(ches);
             return true;
         }
 
@@ -756,11 +758,9 @@ namespace OTSIncAReportApp
 
         List<COTSParticleClr> ZeroElementProcess(OTSCLRINTERFACE.COTSClassifyEngineClr ClassifyEngineClr, List<COTSParticleClr> allParticles)
         {
-            //List<COTSParticleClr> ParticleClrs = new List<COTSParticleClr>();
             foreach (COTSParticleClr particleClr in allParticles)
             {
                 ClassifyEngineClr.ZeroElementProcess(particleClr);
-                //ParticleClrs.Add(particleClr);
             }
             return allParticles;
         }
@@ -812,7 +812,7 @@ namespace OTSIncAReportApp
             xraydb.RemoveAllRows();
             try
             {
-                xraydb.SaveElementChemistriesList(ches);
+                xraydb.SaveElementChemistriesList_Batch(ches);
             }
             catch(Exception ex)
             {

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

@@ -1242,7 +1242,7 @@ namespace OTSIncAReportApp
         {
             try
             {
-                System.Diagnostics.Process p = System.Diagnostics.Process.Start(".\\OTSInclusionsTraceability.exe", m_rstDataMgr.CurResultFile.FilePath);
+                System.Diagnostics.Process p = System.Diagnostics.Process.Start(".\\OTSInclusionsTraceability.exe", "\""+ m_rstDataMgr.CurResultFile.FilePath+ "\"");
                 p.WaitForExit();
             }
             catch (Exception ex)