From fe5dbe1666c8189f75ecf0092064245789f07841 Mon Sep 17 00:00:00 2001 From: lilium-saber Date: Tue, 26 Sep 2023 08:18:25 +0800 Subject: [PATCH] TranslationResource Fix File Signed-off-by: lilium-saber --- src/translationKey/translationApi.cs | 6 +++--- src/translationKey/translationPrivateIn.cs | 6 +++--- src/translationKey/translationPrivateOut.cs | 13 +++++-------- src/translationKey/translationPublic.cs | 2 +- src/新建文本文档.txt | 2 -- 5 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 src/新建文本文档.txt diff --git a/src/translationKey/translationApi.cs b/src/translationKey/translationApi.cs index a543272..d3f2764 100644 --- a/src/translationKey/translationApi.cs +++ b/src/translationKey/translationApi.cs @@ -7,15 +7,15 @@ using System.Threading.Tasks; namespace WpfApp1.translationKey { - abstract class TranslateApiStr + interface TranslationApiStr { public abstract List OutputTranslationS(String id); - public abstract List OutputTranslationName(); + public abstract List OutputTranslationNameList(); } - abstract class TranslationApiInt + interface TranslationApiInt { public abstract List OutputTranslationI(int id); } diff --git a/src/translationKey/translationPrivateIn.cs b/src/translationKey/translationPrivateIn.cs index 8d6120e..e85b5d5 100644 --- a/src/translationKey/translationPrivateIn.cs +++ b/src/translationKey/translationPrivateIn.cs @@ -9,12 +9,12 @@ namespace WpfApp1.translationKey { class TranslationPrivateIn { - private String pathTemp = "../translationResource/"; - private String txtPath = "../translationResource/ListPrivate.txt"; + private String pathTemp = "E:\\programingg\\vsprogam\\testRjgc\\translationResource"; + private String txtPath = "E:\\programingg\\vsprogam\\testRjgc\\translationResource\\ListPrivate.txt"; public void InputTranslationPrivate(String name, String id, String key) { - pathTemp = pathTemp + name + ".txt"; + pathTemp = pathTemp + "\\" + name + ".txt"; StreamWriter sw = new StreamWriter(pathTemp); StreamWriter sw2 = new StreamWriter(txtPath); diff --git a/src/translationKey/translationPrivateOut.cs b/src/translationKey/translationPrivateOut.cs index af0b39e..56e529c 100644 --- a/src/translationKey/translationPrivateOut.cs +++ b/src/translationKey/translationPrivateOut.cs @@ -7,14 +7,11 @@ using System.Threading.Tasks; namespace WpfApp1.translationKey { - class translationPrivateOut : TranslateApiStr + class translationPrivateOut : TranslationApiStr { private String name; - private String path = "../translationResource/"; - private String txtPath = "../translationResource/ListPrivate.txt"; - - translationPrivateOut() - { } + private String path = "E:\\programingg\\vsprogam\\testRjgc\\translationResource\\"; + private String txtPath = "E:\\programingg\\vsprogam\\testRjgc\\translationResource\\ListPrivate.txt"; private String getTranslationPrivateApi(StreamReader sr) { @@ -46,7 +43,7 @@ namespace WpfApp1.translationKey } - public override List OutputTranslationS(String id) + public List OutputTranslationS(String id) { this.name = id; this.path = this.path + this.name + ".txt"; @@ -61,7 +58,7 @@ namespace WpfApp1.translationKey return temp; } - public override List OutputTranslationName() + public List OutputTranslationNameList() { List temp = new List { }; diff --git a/src/translationKey/translationPublic.cs b/src/translationKey/translationPublic.cs index 9fe786c..86d1dc3 100644 --- a/src/translationKey/translationPublic.cs +++ b/src/translationKey/translationPublic.cs @@ -9,7 +9,7 @@ namespace WpfApp1.translationKey class translationPublic : TranslationApiInt { - public override List OutputTranslationI(int id) + public List OutputTranslationI(int id) { var temp = new List { }; switch (id) diff --git a/src/新建文本文档.txt b/src/新建文本文档.txt deleted file mode 100644 index af3952f..0000000 --- a/src/新建文本文档.txt +++ /dev/null @@ -1,2 +0,0 @@ -1 -23 \ No newline at end of file