|
@@ -67,7 +67,7 @@ namespace PDF_Master.Helper
|
|
|
|
|
|
#region AI服务器对接接口
|
|
|
/// <summary>
|
|
|
- /// 获取文件Key用来发送给服务端获取翻译文件
|
|
|
+ /// 获取
|
|
|
/// </summary>
|
|
|
/// <param name="content"></param>
|
|
|
/// <param name="filename"></param>
|
|
@@ -217,7 +217,8 @@ namespace PDF_Master.Helper
|
|
|
string Code = "300";
|
|
|
intProcess(isprocess, "Translating", System.Windows.Visibility.Visible);
|
|
|
//判断word文档大小
|
|
|
- if (!GetDocumentPagesWord(content)) {
|
|
|
+ if (!GetDocumentPagesWord(content))
|
|
|
+ {
|
|
|
clossProcess();
|
|
|
return "05011";
|
|
|
}
|
|
@@ -612,7 +613,7 @@ namespace PDF_Master.Helper
|
|
|
try
|
|
|
{
|
|
|
FileInfo fileInfo = new FileInfo(filepath);
|
|
|
- if (fileInfo.Extension.ToLower()!=".pdf")
|
|
|
+ if (fileInfo.Extension.ToLower() != ".pdf")
|
|
|
{
|
|
|
Microsoft.Office.Interop.Word.Application myWordApp = new Microsoft.Office.Interop.Word.Application();
|
|
|
object Nothing = System.Reflection.Missing.Value;
|
|
@@ -791,7 +792,7 @@ namespace PDF_Master.Helper
|
|
|
|
|
|
public static string GetBaiduTranslationCode(string code)
|
|
|
{
|
|
|
-
|
|
|
+ if (code == "300" || code == "401") { return App.HomePageLoader.GetString("ChatGTPNetworkError"); }
|
|
|
if (!String.IsNullOrEmpty(App.HomePageLoader.GetString("BaiduTranslation" + code)))
|
|
|
{
|
|
|
return App.HomePageLoader.GetString("BaiduTranslation" + code);
|
|
@@ -801,6 +802,7 @@ namespace PDF_Master.Helper
|
|
|
|
|
|
public static string GetChatGPTCode(string code)
|
|
|
{
|
|
|
+ if (code == "300" || code == "401") { return App.HomePageLoader.GetString("ChatGTPNetworkError"); }
|
|
|
if (!String.IsNullOrEmpty(App.HomePageLoader.GetString("ChatGTP" + code)))
|
|
|
{
|
|
|
return App.HomePageLoader.GetString("ChatGTP" + code);
|