Sfoglia il codice sorgente

测量程序保存和另存时,选择取消操作,LOG中爆红的问题

zhangjiaxin 4 anni fa
parent
commit
1488257032

+ 3 - 2
OTSIncAMeasureApp/0-OTSModel/Measure/GetParamData/COTSMsrPrjResultData.cs

@@ -437,8 +437,7 @@ namespace OTSModelSharp
             // Save or Save As, if strPathName is not empty, it is exist in the computer, this is a save action
             String strPathName = GetPathName();
 
-            // is this a new file?
-            strPathName.Trim();
+            
             if (strPathName.CompareTo(UNTITLED_FILE_NAME) == 0)
             {
                 // this is a new file 
@@ -446,6 +445,8 @@ namespace OTSModelSharp
                 // return save as result
                 return SaveAs();
             }
+            // is this a new file?
+            strPathName.Trim();
             //保存测量项目文件 .prj
             XmlDocument doc = new XmlDocument();
             doc.Load(strPathName);

+ 2 - 2
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -873,7 +873,7 @@ namespace OTSMeasureApp
             bool iRev = m_ProjData.SaveAs();
             if (!iRev)
             {
-                log.Error("(OTSIncAMeasureAppForm.ribbonOrbMenuItemSaveAs_Click)  m_DataMgrFun.SaveAsFile()  Failed !");
+                //log.Trace("(OTSIncAMeasureAppForm.ribbonOrbMenuItemSaveAs_Click)  m_DataMgrFun.SaveAsFile()  Failed !");
                 return;
             }
         }
@@ -883,7 +883,7 @@ namespace OTSMeasureApp
             bool iRev = m_ProjData.Save();
             if (!iRev)
             {
-                log.Error("(OTSIncAMeasureAppForm.rbSaveFile_Click)  m_DataMgrFun.SaveFile()  Failed !");
+                //log.Trace("(OTSIncAMeasureAppForm.rbSaveFile_Click)  m_DataMgrFun.SaveFile()  Failed !");
                 return;
             }
         }