浏览代码

reclassify button add sample check function

CXS 3 年之前
父节点
当前提交
77e4695529

+ 4 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/ParamData/COTSMsrPrjResultData.cs

@@ -1425,7 +1425,10 @@ namespace OTSModelSharp
         public bool Reclassify()
         {
             string strFilePath = FileHelper.GetFolderName(m_strPathName);
-
+            if(strFilePath==null)
+            {
+                return false;
+            }
 
             foreach (var spl in m_listSamples)
             {

+ 4 - 1
OTSIncAMeasureApp/ServiceCenter/FileHelper.cs

@@ -11,7 +11,10 @@ namespace OTSModelSharp.ServiceInterface
     {
         public static string GetFolderName(string a_strPathName)
         {
-
+            if (a_strPathName == "Untitled")
+            {
+                return null;
+            }
             string folderName = a_strPathName.Substring(0, a_strPathName.LastIndexOf("\\"));
             //DirectoryInfo d = new DirectoryInfo(a_strPathName);
             //return d.FullName;