ソースを参照

deal with bugs

cxs 1 年間 前
コミット
3f7c4be934

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

@@ -228,13 +228,14 @@ namespace OTSIncAReportGrids
                 Particledata = new ParticleData(result.FilePath);
                 string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
                 userLibrary = new UserLibraryData(str_libraryName);
-                if (userLibrary != null)
+                if (userLibrary.GetSqlHelper() != null)
                 {
                     userLibraryData = userLibrary.GetSubAttributeFromDatabase();
                 }
                 else
                 {
                     userLibraryData = null;
+                    MessageBox.Show("未读取到用户标准库!");
                 }
                 //初始化底层操作类
                 m_OTSIncAReportGridsFun = new OTSReportGridsFun(m_ReportApp, this);

+ 2 - 1
OTSIncAReportApp/1-UI/frmReMeasure.cs

@@ -467,13 +467,14 @@ namespace OTSIncAReportApp
             string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)ReportFun.resultFile.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
             DataTable userLibraryData = new DataTable();
             UserLibraryData userLibrary = new UserLibraryData(str_libraryName);
-            if (userLibrary != null)
+            if (userLibrary.GetSqlHelper() != null)
             {
                 userLibraryData = userLibrary.GetSubAttributeFromDatabase();
             }
             else
             {
                 userLibraryData = null;
+                MessageBox.Show("未读取到用户标准库!");
             }
             if (userLibraryData != null)
             {

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

@@ -801,7 +801,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             else
             {
                 dbHelper = null;
-                log.Error("Failed to load user-defined library!");
+                log.Error("Failed to load user-defined library_"+ fullPath+"!");
             }
         }
         

+ 1 - 1
OTSPartA_STDEditor/ReferenceLibrary.cs

@@ -291,7 +291,7 @@ namespace OTSPartA_STDEditor
                 if (LoadClassifyToDictionary(fileSel.FileName, ref ReferenceDictionary))
                 {
                    AddDataToRefereceLiberary(ReferenceDictionary);
-                    this.Text += "  " + fileSel.FileName;
+                    this.Text = "  " + fileSel.FileName;
                    PropGrid.Refresh();
                 }
             }