瀏覽代碼

添加 Reclassify 后 拷贝标准库

cxs 1 年之前
父節點
當前提交
98a2e26d6a

+ 4 - 2
OTSCPP/OTSClassifyEngine/ExpressionParseEngine/ParticleSTDDB.cpp

@@ -61,6 +61,8 @@ namespace OTSClassifyEngine
 		return myDB->GetTableQuery(a_sOrderColumnName);
 	}
 
+	const int STDGroupsColCount = 4;
+	const int ColCountComplement = 1;
 	ParticleSTDPtr CParticleSTDDB::GetPartSTDLib(ParticleSTDPtr partStd,BOOL bForce/* = FALSE*/)
 	{
 		
@@ -74,8 +76,8 @@ namespace OTSClassifyEngine
 		auto query = myDB->GetCommandStringQuery(cmdstr);
 		ASSERT(query);
 		int cols = query->GetColCount();
-		int defineCols =(int) CParticleSTDTable::ColumnID::MAX -(int) CParticleSTDTable::ColumnID::MIN;
-		if (cols != defineCols+1+4)
+		int defineCols =(int) CParticleSTDTable::ColumnID::MAX -(int) CParticleSTDTable::ColumnID::MIN+STDGroupsColCount+ ColCountComplement;
+		if (cols != defineCols)
 		{
 			LogErrorTrace(__FILE__, __LINE__, _T("std db version is not match!"));
 			return NULL;

+ 13 - 0
OTSIncAMeasureApp/1-OTSMeasure/Measure/ParamData/COTSMsrPrjResultData.cs

@@ -1451,6 +1451,19 @@ namespace OTSModelSharp
 
                 pIncAFileMgr.UpdateParticleList(analysisparts);
 
+                if (stdFileName.ToLower() != "nostddb.db")
+                {
+                    try
+                    {
+                        string userdBpath = Application.StartupPath + "\\Config\\SysData\\" + stdFileName;
+                        File.Copy(userdBpath, strFilePath + "\\" + spl.GetName() + "\\" + stdFileName, true);
+                    }
+                    catch (Exception ex)
+                    {
+                        MessageBox.Show(stdFileName+" copy failed:" + ex.ToString());
+                        return false;
+                    }
+                }
             }
 
 

+ 0 - 1
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -1209,7 +1209,6 @@ namespace OTSMeasureApp
             {
                 m_ProjData.Save();
 
-
                 MessageBox.Show("reclassification success");
             }
             else