Signed-off-by: lilium-saber <WR364999428@hotmail.com>
GDN
lilium-saber 1 year ago
parent 5c7f6f2c60
commit 99f5d11070

@ -17,7 +17,7 @@ namespace WpfApp2.translationKey
public void InPutPrivate(string name, List<string> list) public void InPutPrivate(string name, List<string> list)
{ {
if (Directory.Exists(pathTemp)) if (!Directory.Exists(pathTemp))
{ {
Directory.CreateDirectory(pathTemp); Directory.CreateDirectory(pathTemp);
} }
@ -36,7 +36,7 @@ namespace WpfApp2.translationKey
public void InputBaiduPrivate(string name, string id, string key)//该函数仅百度支持 public void InputBaiduPrivate(string name, string id, string key)//该函数仅百度支持
{ {
if(Directory.Exists(pathTemp)) if(!Directory.Exists(pathTemp))
{ {
Directory.CreateDirectory(pathTemp); Directory.CreateDirectory(pathTemp);
} }

@ -70,11 +70,10 @@ namespace WpfApp2.translationKey
if (Directory.Exists(temppath))//若不存在 if (Directory.Exists(temppath))//若不存在
{ {
temp.Add("尚未输入!!!"); temp.Add(temppath);
return temp; return temp;
} }
StreamReader sr = new StreamReader(temppath); StreamReader sr = new StreamReader(temppath);
string temp2 = sr.ReadLine(); string temp2 = sr.ReadLine();
while(temp2 != null && temp2 != "") while(temp2 != null && temp2 != "")
@ -106,7 +105,7 @@ namespace WpfApp2.translationKey
} }
else else
{ {
while (temp2 != null && temp2 != "") while (temp2 != null)
{ {
temp.Add(temp2); temp.Add(temp2);
temp2 = sr.ReadLine(); temp2 = sr.ReadLine();

Binary file not shown.
Loading…
Cancel
Save