TranslationResource Fix File

Signed-off-by: lilium-saber <WR364999428@hotmail.com>
GDN
lilium-saber 1 year ago
parent 317e385d06
commit fe5dbe1666

@ -7,15 +7,15 @@ using System.Threading.Tasks;
namespace WpfApp1.translationKey namespace WpfApp1.translationKey
{ {
abstract class TranslateApiStr interface TranslationApiStr
{ {
public abstract List<String> OutputTranslationS(String id); public abstract List<String> OutputTranslationS(String id);
public abstract List<String> OutputTranslationName(); public abstract List<String> OutputTranslationNameList();
} }
abstract class TranslationApiInt interface TranslationApiInt
{ {
public abstract List<String> OutputTranslationI(int id); public abstract List<String> OutputTranslationI(int id);
} }

@ -9,12 +9,12 @@ namespace WpfApp1.translationKey
{ {
class TranslationPrivateIn class TranslationPrivateIn
{ {
private String pathTemp = "../translationResource/"; private String pathTemp = "E:\\programingg\\vsprogam\\testRjgc\\translationResource";
private String txtPath = "../translationResource/ListPrivate.txt"; private String txtPath = "E:\\programingg\\vsprogam\\testRjgc\\translationResource\\ListPrivate.txt";
public void InputTranslationPrivate(String name, String id, String key) public void InputTranslationPrivate(String name, String id, String key)
{ {
pathTemp = pathTemp + name + ".txt"; pathTemp = pathTemp + "\\" + name + ".txt";
StreamWriter sw = new StreamWriter(pathTemp); StreamWriter sw = new StreamWriter(pathTemp);
StreamWriter sw2 = new StreamWriter(txtPath); StreamWriter sw2 = new StreamWriter(txtPath);

@ -7,14 +7,11 @@ using System.Threading.Tasks;
namespace WpfApp1.translationKey namespace WpfApp1.translationKey
{ {
class translationPrivateOut : TranslateApiStr class translationPrivateOut : TranslationApiStr
{ {
private String name; private String name;
private String path = "../translationResource/"; private String path = "E:\\programingg\\vsprogam\\testRjgc\\translationResource\\";
private String txtPath = "../translationResource/ListPrivate.txt"; private String txtPath = "E:\\programingg\\vsprogam\\testRjgc\\translationResource\\ListPrivate.txt";
translationPrivateOut()
{ }
private String getTranslationPrivateApi(StreamReader sr) private String getTranslationPrivateApi(StreamReader sr)
{ {
@ -46,7 +43,7 @@ namespace WpfApp1.translationKey
} }
public override List<String> OutputTranslationS(String id) public List<String> OutputTranslationS(String id)
{ {
this.name = id; this.name = id;
this.path = this.path + this.name + ".txt"; this.path = this.path + this.name + ".txt";
@ -61,7 +58,7 @@ namespace WpfApp1.translationKey
return temp; return temp;
} }
public override List<String> OutputTranslationName() public List<String> OutputTranslationNameList()
{ {
List<String> temp = new List<String> { }; List<String> temp = new List<String> { };

@ -9,7 +9,7 @@ namespace WpfApp1.translationKey
class translationPublic : TranslationApiInt class translationPublic : TranslationApiInt
{ {
public override List<String> OutputTranslationI(int id) public List<String> OutputTranslationI(int id)
{ {
var temp = new List<String> { }; var temp = new List<String> { };
switch (id) switch (id)

Loading…
Cancel
Save