diff --git a/src/translationKey/translationPrivateOut.cs b/src/translationKey/translationPrivateOut.cs index b27ff60..5ae0e6b 100644 --- a/src/translationKey/translationPrivateOut.cs +++ b/src/translationKey/translationPrivateOut.cs @@ -42,16 +42,28 @@ namespace WpfApp1.translationKey } + public string getpath(string id) + { + return path + "\\" + id + ".txt"; + } + + public string gettxt() + { + return txtPath; + } + public List OutputTranslationS(string id) { string temppath = path + "\\" + id + ".txt"; - var temp = new List { }; - if (!Directory.Exists(temppath)) + List temp = new List { }; + + if (Directory.Exists(temppath)) { temp.Add("ERROR"); return temp; } + StreamReader sr = new StreamReader(temppath); @@ -67,12 +79,13 @@ namespace WpfApp1.translationKey { List temp = new List { }; string temptxtpath = txtPath; - - if(!Directory.Exists(temptxtpath)) + + if(Directory.Exists(temptxtpath)) { temp.Add("ERROR"); return temp; } + StreamReader sr = new StreamReader(temptxtpath); string temp2 = sr.ReadLine(); diff --git a/src/translationKey/translationPublic.cs b/src/translationKey/translationPublic.cs index a965aea..7112139 100644 --- a/src/translationKey/translationPublic.cs +++ b/src/translationKey/translationPublic.cs @@ -22,8 +22,8 @@ namespace WpfApp1.translationKey } case 1://百度 { - temp.Add("");//APIAppid - temp.Add("");//APIKey + temp.Add("20230923001827495");//APIAppid + temp.Add("yjvMNY33Qc1TYSBjTQYQ");//APIKey break; } case 2://google