|
@@ -83,7 +83,6 @@ namespace PDF_Master
|
|
|
/// </summary>
|
|
|
public partial class App : PrismApplication
|
|
|
{
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 产品名称
|
|
|
/// </summary>
|
|
@@ -142,7 +141,7 @@ namespace PDF_Master
|
|
|
/// <summary>
|
|
|
/// 激活窗体的原因
|
|
|
/// </summary>
|
|
|
- public static string WebOpencase = "";
|
|
|
+ public static string WebOpencase = "";
|
|
|
|
|
|
public static bool IsBookMode = false;
|
|
|
|
|
@@ -159,7 +158,6 @@ namespace PDF_Master
|
|
|
/// </summary>
|
|
|
public static bool IsLogin = false;
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 记录开始拖拽的窗口句柄,用于判断是否为跨窗口拖拽
|
|
|
/// </summary>
|
|
@@ -169,6 +167,7 @@ namespace PDF_Master
|
|
|
/// 双击打开文件通知ID
|
|
|
/// </summary>
|
|
|
public static uint MsgId;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 将应用前置通知ID
|
|
|
/// </summary>
|
|
@@ -283,14 +282,14 @@ namespace PDF_Master
|
|
|
if (Settings.Default.PresetFontList == null)
|
|
|
Settings.Default.PresetFontList = new PDFSettings.PresetFontList();
|
|
|
}
|
|
|
- catch {
|
|
|
-
|
|
|
+ catch
|
|
|
+ {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
protected override void OnStartup(StartupEventArgs e)
|
|
|
{
|
|
|
- MsgId = Win32Helper.RegisterWindowMessage("msgNotify_PDFMaster");
|
|
|
+ MsgId = Win32Helper.RegisterWindowMessage("msgNotify_PDFMaster");
|
|
|
WakeId = Win32Helper.RegisterWindowMessage("msgWake_PDFMaster");
|
|
|
WakeId = Win32Helper.RegisterWindowMessage("webopenexpired_PDFMaster");
|
|
|
Process[] pros = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
|
|
@@ -299,11 +298,11 @@ namespace PDF_Master
|
|
|
{
|
|
|
if (e != null && e.Args != null && e.Args.Length > 0)
|
|
|
{
|
|
|
- if (Webgoapp(e.Args)==true)
|
|
|
+ if (Webgoapp(e.Args) == true)
|
|
|
{
|
|
|
- if(WebOpencase=="expired")
|
|
|
+ if (WebOpencase == "expired")
|
|
|
{
|
|
|
- Win32Helper.PostMessage((IntPtr)0xffff,WebopenexpiredId, IntPtr.Zero, IntPtr.Zero);
|
|
|
+ Win32Helper.PostMessage((IntPtr)0xffff, WebopenexpiredId, IntPtr.Zero, IntPtr.Zero);
|
|
|
IntPtr waitPtr = Win32Helper.CreateEvent(IntPtr.Zero, true, false, "Global\\shareWaitNotify" + Guid.NewGuid());
|
|
|
Win32Helper.WaitForSingleObject(waitPtr, 5000);
|
|
|
Win32Helper.CloseHandle(waitPtr);
|
|
@@ -315,8 +314,6 @@ namespace PDF_Master
|
|
|
Win32Helper.WaitForSingleObject(waitPtr, 5000);
|
|
|
Win32Helper.CloseHandle(waitPtr);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -354,12 +351,10 @@ namespace PDF_Master
|
|
|
}
|
|
|
catch
|
|
|
{
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -373,8 +368,6 @@ namespace PDF_Master
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if (!LicenseVerify())
|
|
|
{
|
|
|
#if !DEBUG
|
|
@@ -392,7 +385,7 @@ namespace PDF_Master
|
|
|
InitSettings();
|
|
|
|
|
|
#if DEBUG
|
|
|
- IsLogin =false;
|
|
|
+ IsLogin = false;
|
|
|
#endif
|
|
|
|
|
|
CachePath = CacheFilePath.Instance;
|
|
@@ -432,13 +425,13 @@ namespace PDF_Master
|
|
|
{
|
|
|
GuidPDFPath = Path.Combine(CachePath.GuidPDFPath, "Quick Start Guide.pdf");
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
catch
|
|
|
{
|
|
|
}
|
|
|
|
|
|
#region 设置软件语系
|
|
|
+
|
|
|
List<string> lang = new List<string>() { "zh-CN", "zh-TW", "en-US" };
|
|
|
CultureInfo cultureInfo = new CultureInfo("en-US");
|
|
|
//if (lang.Contains(Settings.Default.AppProperties.culture))
|
|
@@ -454,7 +447,7 @@ namespace PDF_Master
|
|
|
}
|
|
|
catch { }
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion 设置软件语系
|
|
|
|
|
|
//启动循环检查更新线程
|
|
|
CheckUpdate();
|
|
@@ -473,6 +466,7 @@ namespace PDF_Master
|
|
|
|
|
|
base.OnStartup(e);
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 解析是否带参数启动
|
|
|
/// </summary>
|
|
@@ -545,6 +539,7 @@ namespace PDF_Master
|
|
|
Crashes.TrackError(e.Exception);
|
|
|
#endif
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 创建启动窗口
|
|
|
/// </summary>
|
|
@@ -758,7 +753,6 @@ namespace PDF_Master
|
|
|
containerRegistry.RegisterDialog<SubscriptionOKDialog>(DialogNames.SubscriptionOKDialog);
|
|
|
containerRegistry.RegisterDialog<LoginoffDialog>(DialogNames.LoginoffDialog);
|
|
|
|
|
|
-
|
|
|
//新手引导弹窗
|
|
|
containerRegistry.RegisterDialog<NoviceGuidDialog>(DialogNames.GuidDialog);
|
|
|
containerRegistry.RegisterDialog<IAPCompareDialog>(DialogNames.IAPCompareDialog);
|
|
@@ -773,7 +767,8 @@ namespace PDF_Master
|
|
|
|
|
|
//OCR下载弹窗
|
|
|
containerRegistry.RegisterDialog<OCRDownloadProgress>(DialogNames.OCRDownloadProgress);
|
|
|
-
|
|
|
+
|
|
|
+ containerRegistry.RegisterDialog<ChangeEmailDialog>(DialogNames.ChangeEmailDialog);
|
|
|
|
|
|
#endregion 注册弹窗
|
|
|
}
|
|
@@ -826,7 +821,6 @@ namespace PDF_Master
|
|
|
Trace.WriteLine("CPDFSDK License Code." + verifyResult + "\n");
|
|
|
if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
|
|
|
return false;
|
|
|
-
|
|
|
}
|
|
|
catch { Trace.WriteLine("CPDFSDK License Code Error \n"); }
|
|
|
|
|
@@ -848,10 +842,10 @@ namespace PDF_Master
|
|
|
return false;
|
|
|
}
|
|
|
CPDFConverter.Init(resPath);*/
|
|
|
-
|
|
|
+
|
|
|
string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
|
|
|
CPDFConverter.Init(resPath);
|
|
|
-
|
|
|
+
|
|
|
LicenseError licenseerror = CPDFConverter.LicenseVerify(ConverterDevKey, ConverterDevSecret);
|
|
|
//初始化ocr库
|
|
|
CPDFConverter.InitOCRLibrary(Path.Combine(resPath, "x64"));
|
|
@@ -909,9 +903,11 @@ namespace PDF_Master
|
|
|
case "zh-CN":
|
|
|
lang = "zh_Hans";
|
|
|
break;
|
|
|
+
|
|
|
case "zh-TW":
|
|
|
lang = "zh_Hant";
|
|
|
break;
|
|
|
+
|
|
|
default:
|
|
|
lang = "en_Us";
|
|
|
break;
|
|
@@ -953,7 +949,6 @@ namespace PDF_Master
|
|
|
}
|
|
|
catch
|
|
|
{
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|