Browse Source

Merge branch 'Release2.3' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into Release2.3

zhangjiaxin 3 years ago
parent
commit
a3ff2dcf11
1 changed files with 3 additions and 1 deletions
  1. 3 1
      OTSIncAMeasureApp/0-OTSModel/OTSDataType/XmlResourceData.cs

+ 3 - 1
OTSIncAMeasureApp/0-OTSModel/OTSDataType/XmlResourceData.cs

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.IO;
 using System.IO;
+using System.Windows.Forms;
 using System.Xml;
 using System.Xml;
 
 
 namespace OTSDataType
 namespace OTSDataType
@@ -90,7 +91,8 @@ namespace OTSDataType
         public bool LoadStringFromXml()
         public bool LoadStringFromXml()
         {
         {
             XmlDocument xml = new XmlDocument();
             XmlDocument xml = new XmlDocument();
-            if (!Directory.Exists(".\\Resources\\XMLData\\LanguageDefine.xml"))
+            string path= Application.StartupPath + @"\Resources\XMLData\LanguageDefine.xml";
+            if (!File.Exists(path))
             {
             {
                 NLog.LogManager.GetCurrentClassLogger().Error("There's no \\Resources\\XMLData\\LanguageDefine.xml");
                 NLog.LogManager.GetCurrentClassLogger().Error("There's no \\Resources\\XMLData\\LanguageDefine.xml");
                 return false;
                 return false;