|
|
|
@ -0,0 +1,87 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace WpfApp1.translationKey
|
|
|
|
|
{
|
|
|
|
|
class translationPrivateOut : TranslateApiStr
|
|
|
|
|
{
|
|
|
|
|
private String name;
|
|
|
|
|
private String path = "../translationResource/";
|
|
|
|
|
private String txtPath = "../translationResource/ListPrivate.txt";
|
|
|
|
|
|
|
|
|
|
translationPrivateOut()
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
private String getTranslationPrivateApi(StreamReader sr)
|
|
|
|
|
{
|
|
|
|
|
String temp = sr.ReadLine();
|
|
|
|
|
|
|
|
|
|
if(temp != null)
|
|
|
|
|
{
|
|
|
|
|
return temp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return "ERROR";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getTranslationPrivateKey(StreamReader sr)
|
|
|
|
|
{
|
|
|
|
|
String temp = sr.ReadLine();
|
|
|
|
|
|
|
|
|
|
if (temp != null)
|
|
|
|
|
{
|
|
|
|
|
return temp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return "ERROR";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override List<String> OutputTranslationS(String id)
|
|
|
|
|
{
|
|
|
|
|
this.name = id;
|
|
|
|
|
this.path = this.path + this.name + ".txt";
|
|
|
|
|
|
|
|
|
|
StreamReader sr = new StreamReader(this.path);
|
|
|
|
|
|
|
|
|
|
var temp = new List<String> { };
|
|
|
|
|
temp.Add(this.getTranslationPrivateApi(sr));
|
|
|
|
|
temp.Add(this.getTranslationPrivateKey(sr));
|
|
|
|
|
|
|
|
|
|
sr.Close();
|
|
|
|
|
return temp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override List<String> OutputTranslationName()
|
|
|
|
|
{
|
|
|
|
|
List<String> temp = new List<String> { };
|
|
|
|
|
|
|
|
|
|
StreamReader sr = new StreamReader(this.txtPath);
|
|
|
|
|
String temp2 = sr.ReadLine();
|
|
|
|
|
if (temp2 == null)
|
|
|
|
|
{
|
|
|
|
|
temp.Add("ERROR");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
while (temp2 != null)
|
|
|
|
|
{
|
|
|
|
|
temp.Add(temp2);
|
|
|
|
|
temp2 = sr.ReadLine();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sr.Close();
|
|
|
|
|
return temp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|