浏览代码

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

zhangjiaxin 3 年之前
父节点
当前提交
a3ff2dcf11
共有 1 个文件被更改,包括 3 次插入1 次删除
  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.IO;
+using System.Windows.Forms;
 using System.Xml;
 
 namespace OTSDataType
@@ -90,7 +91,8 @@ namespace OTSDataType
         public bool LoadStringFromXml()
         {
             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");
                 return false;