Signed-off-by: lilium-saber <WR364999428@hotmail.com>
GDN
lilium-saber 1 year ago
parent 4a21ac34b9
commit 0a338f743c

@ -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();
}
//再转为语音,在多几个接口
}
}

@ -0,0 +1,12 @@
<Window x:Class="WpfApp2.view.TransSourceInWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp2.view"
mc:Ignorable="d"
Title="TransSourceInWindow" Height="300" Width="400">
<Grid>
</Grid>
</Window>

@ -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
{
/// <summary>
/// TransSourceInWindow.xaml 的交互逻辑
/// </summary>
public partial class TransSourceInWindow : Window
{
public TransSourceInWindow()
{
InitializeComponent();
}
}
}

@ -0,0 +1,12 @@
<Window x:Class="WpfApp2.view.TranslationSourceSelect"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp2.view"
mc:Ignorable="d"
Title="TranslationSourceSelect" Height="300" Width="400">
<Grid Margin="0,0,400,91">
</Grid>
</Window>

@ -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
{
/// <summary>
/// TranslationSourceSelect.xaml 的交互逻辑
/// </summary>
public partial class TranslationSourceSelect : Window
{
public TranslationSourceSelect()
{
InitializeComponent();
}
}
}

@ -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;
}
}
}

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WpfApp1.translationKey
namespace WpfApp2.translationKey
{
interface TranslationApiStr//Mohammed

@ -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
{

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WpfApp1.translationKey
namespace WpfApp2.translationKey
{
class translationPrivateOut : TranslationApiStr
{

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WpfApp1.translationKey
namespace WpfApp2.translationKey
{
class translationPublic : TranslationApiInt
{

Loading…
Cancel
Save