diff --git a/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs b/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs index 2853725..924f136 100644 --- a/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs +++ b/src/AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction.cs @@ -3,12 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using WpfApp1.WinOcr; -using WpfApp1.ScnToJson; -using WpfApp1.translationKey; -using WpfApp1.transToNet; +using WpfApp2.ScnToJson; +using WpfApp2.translationKey; +using WpfApp2.transToNet; -namespace testRjgc +namespace WpfApp2 { internal class AllClassAndInterfaceWellBeManipulatedInThisFileAndCallThroughFunction { @@ -18,9 +17,10 @@ namespace testRjgc TranslationApiStr trstr = new translationPrivateOut(); TranslationApiInt trint = new translationPublic(); TranslationScnToJson scnjson = new TranslationScnToJson(); - Sofia sof = new OcrSofia(); Messiah jsonnet = new jsonNet(); + TempResource temp = new TempResource(); + public void InputPrivateBaidu(string name, string id, string key) { trin.InputBaiduPrivate(name, id, key); @@ -59,11 +59,6 @@ namespace testRjgc scnjson.StopTrans(spa, dps); } - public string WindowsOcrToGetString(string name) - { - return sof.WindowsOcrToGetStringAndTranslate(name); - } - public string NetBaiDu(string input) { return jsonnet.RequestJsonBaiDu(input); @@ -79,7 +74,6 @@ namespace testRjgc return jsonnet.RequestJsonLanguageChangeBaiDu(input, srcl, dstl); } - public string NetXunFei(string input) { return jsonnet.RequestJsonXunFei(input); @@ -95,7 +89,58 @@ namespace testRjgc return jsonnet.RequestJsonPrivateXunFei(input, srcl, dstl, xid, xsecret, xkey); } - + public void SetId(string id) + { + temp.TempIdSet(id); + } + + public void SetKey(string key) + { + temp.TempKeySet(key); + } + + public void SetSecret(string secret) + { + temp.TempSecretSet(secret); + } + + public void SetSrc(string src) + { + temp.TempSrcSet(src); + } + + public void SetDst(string dst) + { + temp.TempDstSet(dst); + } + + public string GetId() + { + return temp.TempIdGet(); + } + + public string GetKey() + { + return temp.TempKeyGet(); + } + + public string GetSecret() + { + return temp.TempSecretGet(); + } + + public string GetSrc() + { + return temp.TempSrcGet(); + } + + public string GetDst() + { + return temp.TempDstGet(); + } + + + //再转为语音,在多几个接口 } } diff --git a/src/WinOcr/OcrSofia.cs b/src/WinOcr(弃用)/OcrSofia.cs similarity index 100% rename from src/WinOcr/OcrSofia.cs rename to src/WinOcr(弃用)/OcrSofia.cs diff --git a/src/WinOcr/Sofia.cs b/src/WinOcr(弃用)/Sofia.cs similarity index 100% rename from src/WinOcr/Sofia.cs rename to src/WinOcr(弃用)/Sofia.cs diff --git a/src/WindowsSEL/TransSourceInWindow.xaml b/src/WindowsSEL/TransSourceInWindow.xaml new file mode 100644 index 0000000..3fa6b8e --- /dev/null +++ b/src/WindowsSEL/TransSourceInWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/src/WindowsSEL/TransSourceInWindow.xaml.cs b/src/WindowsSEL/TransSourceInWindow.xaml.cs new file mode 100644 index 0000000..c116ea9 --- /dev/null +++ b/src/WindowsSEL/TransSourceInWindow.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace WpfApp2.view +{ + /// + /// TransSourceInWindow.xaml 的交互逻辑 + /// + public partial class TransSourceInWindow : Window + { + public TransSourceInWindow() + { + InitializeComponent(); + } + + + } +} diff --git a/src/WindowsSEL/TranslationSourceSelect.xaml b/src/WindowsSEL/TranslationSourceSelect.xaml new file mode 100644 index 0000000..0f6a0fc --- /dev/null +++ b/src/WindowsSEL/TranslationSourceSelect.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/src/WindowsSEL/TranslationSourceSelect.xaml.cs b/src/WindowsSEL/TranslationSourceSelect.xaml.cs new file mode 100644 index 0000000..f5e6da0 --- /dev/null +++ b/src/WindowsSEL/TranslationSourceSelect.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using WpfApp2; + +namespace WpfApp2.view +{ + /// + /// TranslationSourceSelect.xaml 的交互逻辑 + /// + public partial class TranslationSourceSelect : Window + { + + public TranslationSourceSelect() + { + InitializeComponent(); + } + + } +} diff --git a/src/translationKey/TempResource.cs b/src/translationKey/TempResource.cs new file mode 100644 index 0000000..e2fb142 --- /dev/null +++ b/src/translationKey/TempResource.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WpfApp2 +{ + class TempResource + { + private string id = "20230923001827495";//all + private string key = "yjvMNY33Qc1TYSBjTQYQ";//百度、讯飞 + private string secret = "M2Q4YzkzZTIwZjNkMGE2ZjkwZWMxNzZk";//讯飞 + private string srcLan = "jp"; + private string dstLan = "zh"; + + public void TempIdSet(string id) + { + this.id = id; + } + + public void TempKeySet(string key) + { + this.key = key; + } + + public void TempSecretSet(string secret) + { + this.secret = secret; + } + + public void TempSrcSet(string src) + { + this.srcLan = src; + } + + public void TempDstSet(string dst) + { + this.dstLan = dst; + } + + public string TempIdGet() + { + return id; + } + + public string TempKeyGet() + { + return key; + } + + public string TempSecretGet() + { + return secret; + } + + public string TempSrcGet() + { + return srcLan; + } + + public string TempDstGet() + { + return dstLan; + } + } +} diff --git a/src/translationKey/translationApi.cs b/src/translationKey/translationApi.cs index a95cfe9..1b83156 100644 --- a/src/translationKey/translationApi.cs +++ b/src/translationKey/translationApi.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace WpfApp1.translationKey +namespace WpfApp2.translationKey { interface TranslationApiStr//Mohammed diff --git a/src/translationKey/translationPrivateIn.cs b/src/translationKey/translationPrivateIn.cs index b50a068..33ff2b1 100644 --- a/src/translationKey/translationPrivateIn.cs +++ b/src/translationKey/translationPrivateIn.cs @@ -1,4 +1,4 @@ -using Stripe; + using System; using System.Collections.Generic; using System.IO; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace WpfApp1.translationKey +namespace WpfApp2.translationKey { class TranslationPrivateIn { diff --git a/src/translationKey/translationPrivateOut.cs b/src/translationKey/translationPrivateOut.cs index 1900399..cfd0a61 100644 --- a/src/translationKey/translationPrivateOut.cs +++ b/src/translationKey/translationPrivateOut.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace WpfApp1.translationKey +namespace WpfApp2.translationKey { class translationPrivateOut : TranslationApiStr { diff --git a/src/translationKey/translationPublic.cs b/src/translationKey/translationPublic.cs index 64122fd..3afc215 100644 --- a/src/translationKey/translationPublic.cs +++ b/src/translationKey/translationPublic.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace WpfApp1.translationKey +namespace WpfApp2.translationKey { class translationPublic : TranslationApiInt {