Signed-off-by: lilium-saber <WR364999428@hotmail.com>
GDN
lilium-saber 2 years ago
parent 20abb91db7
commit ab2e06535a

@ -42,16 +42,28 @@ namespace WpfApp1.translationKey
} }
public string getpath(string id)
{
return path + "\\" + id + ".txt";
}
public string gettxt()
{
return txtPath;
}
public List<string> OutputTranslationS(string id) public List<string> OutputTranslationS(string id)
{ {
string temppath = path + "\\" + id + ".txt"; string temppath = path + "\\" + id + ".txt";
var temp = new List<string> { }; List<string> temp = new List<string> { };
if (!Directory.Exists(temppath))
if (Directory.Exists(temppath))
{ {
temp.Add("ERROR"); temp.Add("ERROR");
return temp; return temp;
} }
StreamReader sr = new StreamReader(temppath); StreamReader sr = new StreamReader(temppath);
@ -67,12 +79,13 @@ namespace WpfApp1.translationKey
{ {
List<string> temp = new List<string> { }; List<string> temp = new List<string> { };
string temptxtpath = txtPath; string temptxtpath = txtPath;
if(!Directory.Exists(temptxtpath)) if(Directory.Exists(temptxtpath))
{ {
temp.Add("ERROR"); temp.Add("ERROR");
return temp; return temp;
} }
StreamReader sr = new StreamReader(temptxtpath); StreamReader sr = new StreamReader(temptxtpath);
string temp2 = sr.ReadLine(); string temp2 = sr.ReadLine();

@ -22,8 +22,8 @@ namespace WpfApp1.translationKey
} }
case 1://百度 case 1://百度
{ {
temp.Add("");//APIAppid temp.Add("20230923001827495");//APIAppid
temp.Add("");//APIKey temp.Add("yjvMNY33Qc1TYSBjTQYQ");//APIKey
break; break;
} }
case 2://google case 2://google

Loading…
Cancel
Save