|
@@ -55,51 +55,355 @@ namespace PDF_Master.Helper
|
|
|
}
|
|
|
Console.WriteLine(responseData);
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (jobject["code"].ToObject<string>().ToLower() == "200")
|
|
|
{
|
|
|
- //Console.WriteLine(jobject["list"].ToObject<string>());
|
|
|
- JArray jarr = JArray.Parse(jobject["list"].ToString());
|
|
|
- foreach (var j in jarr)
|
|
|
+
|
|
|
+ // 从 JObject 获取 list 数组
|
|
|
+
|
|
|
+ JArray list = (JArray)jobject["list"];
|
|
|
+
|
|
|
+ JObject RecommondContentPDFPro = (JObject)JObject.Parse(list[0]["detail"].ToString())["recommondContent"][0]["RecommondContentPDFPro"];
|
|
|
+
|
|
|
+ JObject RecommondContentOther = (JObject)JObject.Parse(list[0]["detail"].ToString())["recommondContent"][0]["RecommondContentOther"];
|
|
|
+
|
|
|
+ JArray advertisement = (JArray)JObject.Parse(list[0]["detail"].ToString())["advertisement"];
|
|
|
+
|
|
|
+
|
|
|
+ #region RecommondContentPDFPro参数配置
|
|
|
+ Settings.Default.ADDate.RecommondContentPDFPro_nameen = RecommondContentPDFPro["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondContentPDFPro_namezh_CN = RecommondContentPDFPro["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondContentPDFPro_namezh_TW = RecommondContentPDFPro["name"]["zh_TW"].ToString();
|
|
|
+ //RecommondPDFPro
|
|
|
+ JArray RecommondPDFPro = (JArray)RecommondContentPDFPro["content"];
|
|
|
+ //recommondPDF - Mac
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macshow = RecommondPDFPro[0]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Mactype = RecommondPDFPro[0]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_MacsubscriptionType = RecommondPDFPro[0]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_MacstartTime = RecommondPDFPro[0]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_MacendTime = RecommondPDFPro[0]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macnameen = RecommondPDFPro[0]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macnamezh_CN = RecommondPDFPro[0]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macnamezh_TW = RecommondPDFPro[0]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Mactooltipen = RecommondPDFPro[0]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Mactooltipzh_CN = RecommondPDFPro[0]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Mactooltipzh_TW = RecommondPDFPro[0]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_MaclinkURLen = RecommondPDFPro[0]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_MaclinkURLzh_CN = RecommondPDFPro[0]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_MaclinkURLzh_TW = RecommondPDFPro[0]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macimagenormal = RecommondPDFPro[0]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macimagehover = RecommondPDFPro[0]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macimageen = RecommondPDFPro[0]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macimagezh_CN = RecommondPDFPro[0]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macimagezh_TW = RecommondPDFPro[0]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameMac = App.CachePath.ADFilePath + "\\" + "Mac" + ".png";
|
|
|
+ if (RecommondPDFPro[0]["version"].ToString() != Settings.Default.ADDate.RecommondPDFPro_Macversion|| File.Exists(FileNameMac) == false)
|
|
|
{
|
|
|
-
|
|
|
- Console.WriteLine(j["detail"].ToString());
|
|
|
- JObject jobject2 = (JObject)JsonConvert.DeserializeObject(j["detail"].ToString());
|
|
|
- Settings.Default.ADDate.ADhiddenSidebar = jobject2["productsidebar"]["hidden"].ToObject<string>();
|
|
|
- Settings.Default.ADDate.ADStartTime = jobject2["startTime"].ToObject<long>();
|
|
|
- Settings.Default.ADDate.ADEndTime = jobject2["endTime"].ToObject<long>();
|
|
|
- if (Settings.Default.ADDate.ADVersion != jobject2["version"].ToObject<string>())
|
|
|
- {
|
|
|
- //清除ADTemp文件夹及该目录中的所有子内容
|
|
|
- string ADPath = Path.Combine(App.CurrentPath, "ADTemp");
|
|
|
- DirectoryInfo Scantempfolder = new DirectoryInfo(ADPath);
|
|
|
- if (Scantempfolder.Exists)
|
|
|
- {
|
|
|
- Directory.Delete(ADPath, true);
|
|
|
- }
|
|
|
- IsUpdate = true;
|
|
|
-
|
|
|
- Settings.Default.ADDate.ADSidebar = jobject2["productsidebar"]["imageURL"]["en"].ToObject<string>();
|
|
|
- Settings.Default.ADDate.ADLinkSidebar = jobject2["productsidebar"]["linkURL"]["en"].ToObject<string>();
|
|
|
-
|
|
|
-
|
|
|
- Settings.Default.ADDate.ADVersion = jobject2["version"].ToObject<string>();
|
|
|
- Settings.Default.Save();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Macversion = RecommondPDFPro[0]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameMac) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameMac);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondPDFPro_Macimageen, FileNameMac);
|
|
|
}
|
|
|
- if(IsUpdate==true)
|
|
|
+
|
|
|
+ //recommondPDF - iPad
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadshow = RecommondPDFPro[1]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadtype = RecommondPDFPro[1]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadsubscriptionType = RecommondPDFPro[1]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadstartTime = RecommondPDFPro[1]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadendTime = RecommondPDFPro[1]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadnameen = RecommondPDFPro[1]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadnamezh_CN = RecommondPDFPro[1]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadnamezh_TW = RecommondPDFPro[1]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadtooltipen = RecommondPDFPro[1]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadtooltipzh_CN = RecommondPDFPro[1]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadtooltipzh_TW = RecommondPDFPro[1]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadlinkURLen = RecommondPDFPro[1]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadlinkURLzh_CN = RecommondPDFPro[1]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadlinkURLzh_TW = RecommondPDFPro[1]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadimagenormal = RecommondPDFPro[1]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadimagehover = RecommondPDFPro[1]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadimageen = RecommondPDFPro[1]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadimagezh_CN = RecommondPDFPro[1]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadimagezh_TW = RecommondPDFPro[1]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameiPad = App.CachePath.ADFilePath + "\\" + "iPad" + ".png";
|
|
|
+ if (RecommondPDFPro[1]["version"].ToString() != Settings.Default.ADDate.RecommondPDFPro_iPadversion|| File.Exists(FileNameiPad) == false)
|
|
|
{
|
|
|
- string path = App.CachePath.ADFilePath;
|
|
|
- string FileName = path + "\\" + 1 + ".png";
|
|
|
-
|
|
|
- WebClient client = new WebClient();
|
|
|
- client.DownloadFile(Settings.Default.ADDate.ADSidebar, FileName);
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_iPadversion = RecommondPDFPro[1]["version"].ToString();
|
|
|
+
|
|
|
+ if (File.Exists(FileNameiPad) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameiPad);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondPDFPro_iPadimageen, FileNameiPad);
|
|
|
}
|
|
|
-
|
|
|
+ //recommondPDF - Android
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidshow = RecommondPDFPro[2]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidtype = RecommondPDFPro[2]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_AndroidsubscriptionType = RecommondPDFPro[2]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_AndroidstartTime = RecommondPDFPro[2]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_AndroidendTime = RecommondPDFPro[2]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidnameen = RecommondPDFPro[2]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidnamezh_CN = RecommondPDFPro[2]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidnamezh_TW = RecommondPDFPro[2]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidtooltipen = RecommondPDFPro[2]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidtooltipzh_CN = RecommondPDFPro[2]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidtooltipzh_TW = RecommondPDFPro[2]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_AndroidlinkURLen = RecommondPDFPro[2]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_AndroidlinkURLzh_CN = RecommondPDFPro[2]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_AndroidlinkURLzh_TW = RecommondPDFPro[2]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidimagenormal = RecommondPDFPro[2]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidimagehover = RecommondPDFPro[2]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidimageen = RecommondPDFPro[2]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidimagezh_CN = RecommondPDFPro[2]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidimagezh_TW = RecommondPDFPro[2]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameAndroid = App.CachePath.ADFilePath + "\\" + "Android" + ".png";
|
|
|
+ if (RecommondPDFPro[2]["version"].ToString() != Settings.Default.ADDate.RecommondPDFPro_Androidversion|| File.Exists(FileNameAndroid) == false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondPDFPro_Androidversion = RecommondPDFPro[2]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameAndroid) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameAndroid);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondPDFPro_Androidimageen, FileNameAndroid);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region RecommondContentOther参数配置
|
|
|
+ Settings.Default.ADDate.RecommondContentOther_version = RecommondContentOther["version"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondContentOther_nameen = RecommondContentOther["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondContentOther_namezh_CN = RecommondContentOther["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondContentOther_namezh_TW = RecommondContentOther["name"]["zh_TW"].ToString();
|
|
|
+ //RecommondOther
|
|
|
+ JArray RecommondOther = (JArray)RecommondContentOther["content"];
|
|
|
+ //recommondPDF-ComPDFKit
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitshow = RecommondOther[0]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKittype = RecommondOther[0]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitsubscriptionType = RecommondOther[0]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitstartTime = RecommondOther[0]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitendTime = RecommondOther[0]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitnameen = RecommondOther[0]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitnamezh_CN = RecommondOther[0]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitnamezh_TW = RecommondOther[0]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKittooltipen = RecommondOther[0]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKittooltipzh_CN = RecommondOther[0]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKittooltipzh_TW = RecommondOther[0]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitlinkURLen = RecommondOther[0]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitlinkURLzh_CN = RecommondOther[0]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitlinkURLzh_TW = RecommondOther[0]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitimagenormal = RecommondOther[0]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitimagehover = RecommondOther[0]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitimageen = RecommondOther[0]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitimagezh_CN = RecommondOther[0]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitimagezh_TW = RecommondOther[0]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameComPDFKit = App.CachePath.ADFilePath + "\\" + "ComPDFKit" + ".png";
|
|
|
+ if (RecommondOther[0]["version"].ToString() != Settings.Default.ADDate.RecommondOther_ComPDFKitversion|| File.Exists(FileNameComPDFKit) ==false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComPDFKitversion = RecommondOther[0]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameComPDFKit) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameComPDFKit);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondOther_ComPDFKitimageen, FileNameComPDFKit);
|
|
|
+ }
|
|
|
+ //recommondPDF-ComVideoKit
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitshow = RecommondOther[1]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKittype = RecommondOther[1]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitsubscriptionType = RecommondOther[1]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitstartTime = RecommondOther[1]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitendTime = RecommondOther[1]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitnameen = RecommondOther[1]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitnamezh_CN = RecommondOther[1]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitnamezh_TW = RecommondOther[1]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKittooltipen = RecommondOther[1]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKittooltipzh_CN = RecommondOther[1]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKittooltipzh_TW = RecommondOther[1]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitlinkURLen = RecommondOther[1]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitlinkURLzh_CN = RecommondOther[1]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitlinkURLzh_TW = RecommondOther[1]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitimagenormal = RecommondOther[1]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitimagehover = RecommondOther[1]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitimageen = RecommondOther[1]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitimagezh_CN = RecommondOther[1]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitimagezh_TW = RecommondOther[1]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameComVideoKit = App.CachePath.ADFilePath + "\\" + "ComVideoKit" + ".png";
|
|
|
+ if (RecommondOther[1]["version"].ToString() != Settings.Default.ADDate.RecommondOther_ComVideoKitversion|| File.Exists(FileNameComVideoKit) == false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondOther_ComVideoKitversion = RecommondOther[1]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameComVideoKit) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameComVideoKit);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondOther_ComVideoKitimageen, FileNameComVideoKit);
|
|
|
+ }
|
|
|
+ //recommondPDF-SignFlow
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowshow = RecommondOther[2]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowtype = RecommondOther[2]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowsubscriptionType = RecommondOther[2]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowstartTime = RecommondOther[2]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowendTime = RecommondOther[2]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlownameen = RecommondOther[2]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlownamezh_CN = RecommondOther[2]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlownamezh_TW = RecommondOther[2]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowtooltipen = RecommondOther[2]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowtooltipzh_CN = RecommondOther[2]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowtooltipzh_TW = RecommondOther[2]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowlinkURLen = RecommondOther[2]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowlinkURLzh_CN = RecommondOther[2]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowlinkURLzh_TW = RecommondOther[2]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowimagenormal = RecommondOther[2]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowimagehover = RecommondOther[2]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowimageen = RecommondOther[2]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowimagezh_CN = RecommondOther[2]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowimagezh_TW = RecommondOther[2]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameSignFlow = App.CachePath.ADFilePath + "\\" + "SignFlow" + ".png";
|
|
|
+ if (RecommondOther[2]["version"].ToString() != Settings.Default.ADDate.RecommondOther_SignFlowversion|| File.Exists(FileNameSignFlow) == false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondOther_SignFlowversion = RecommondOther[2]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameSignFlow) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameSignFlow);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondOther_SignFlowimageen, FileNameSignFlow);
|
|
|
+ }
|
|
|
+ //recommondPDF-FilmageEditor
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorshow = RecommondOther[3]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditortype = RecommondOther[3]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorsubscriptionType = RecommondOther[3]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorstartTime = RecommondOther[3]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorendTime = RecommondOther[3]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditornameen = RecommondOther[3]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditornamezh_CN = RecommondOther[3]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditornamezh_TW = RecommondOther[3]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditortooltipen = RecommondOther[3]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditortooltipzh_CN = RecommondOther[3]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditortooltipzh_TW = RecommondOther[3]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorlinkURLen = RecommondOther[3]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorlinkURLzh_CN = RecommondOther[3]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorlinkURLzh_TW = RecommondOther[3]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorimagenormal = RecommondOther[3]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorimagehover = RecommondOther[3]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorimageen = RecommondOther[3]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorimagezh_CN = RecommondOther[3]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorimagezh_TW = RecommondOther[3]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameFilmageEditor = App.CachePath.ADFilePath + "\\" + "FilmageEditor" + ".png";
|
|
|
+ if (RecommondOther[3]["version"].ToString() != Settings.Default.ADDate.RecommondOther_FilmageEditorversion|| File.Exists(FileNameFilmageEditor) == false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageEditorversion = RecommondOther[3]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameFilmageEditor) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameFilmageEditor);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondOther_FilmageEditorimageen, FileNameFilmageEditor);
|
|
|
+ }
|
|
|
+ //recommondPDF-FilmageScreen
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenshow = RecommondOther[4]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreentype = RecommondOther[4]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreensubscriptionType = RecommondOther[4]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenstartTime = RecommondOther[4]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenendTime = RecommondOther[4]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreennameen = RecommondOther[4]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreennamezh_CN = RecommondOther[4]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreennamezh_TW = RecommondOther[4]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreentooltipen = RecommondOther[4]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreentooltipzh_CN = RecommondOther[4]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreentooltipzh_TW = RecommondOther[4]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenlinkURLen = RecommondOther[4]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenlinkURLzh_CN = RecommondOther[4]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenlinkURLzh_TW = RecommondOther[4]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenimagenormal = RecommondOther[4]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenimagehover = RecommondOther[4]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenimageen = RecommondOther[4]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenimagezh_CN = RecommondOther[4]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenimagezh_TW = RecommondOther[4]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameFilmageScreen = App.CachePath.ADFilePath + "\\" + "FilmageScreen" + ".png";
|
|
|
+ if (RecommondOther[4]["version"].ToString() != Settings.Default.ADDate.RecommondOther_FilmageScreenversion|| File.Exists(FileNameFilmageScreen) == false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondOther_FilmageScreenversion = RecommondOther[4]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameFilmageScreen) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameFilmageScreen);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondOther_FilmageScreenimageen, FileNameFilmageScreen);
|
|
|
+ }
|
|
|
+ //recommondPDF-FreePDFTemplates
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesshow = RecommondOther[5]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatestype = RecommondOther[5]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatessubscriptionType = RecommondOther[5]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesstartTime = RecommondOther[5]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesendTime = RecommondOther[5]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesnameen = RecommondOther[5]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesnamezh_CN = RecommondOther[5]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesnamezh_TW = RecommondOther[5]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatestooltipen = RecommondOther[5]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatestooltipzh_CN = RecommondOther[5]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatestooltipzh_TW = RecommondOther[5]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplateslinkURLen = RecommondOther[5]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplateslinkURLzh_CN = RecommondOther[5]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplateslinkURLzh_TW = RecommondOther[5]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesimagenormal = RecommondOther[5]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesimagehover = RecommondOther[5]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesimageen = RecommondOther[5]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesimagezh_CN = RecommondOther[5]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesimagezh_TW = RecommondOther[5]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameFreePDFTemplates = App.CachePath.ADFilePath + "\\" + "FreePDFTemplates" + ".png";
|
|
|
+ if (RecommondOther[5]["version"].ToString() != Settings.Default.ADDate.RecommondOther_FreePDFTemplatesversion|| File.Exists(FileNameFreePDFTemplates) == false)
|
|
|
+ {
|
|
|
+ Settings.Default.ADDate.RecommondOther_FreePDFTemplatesversion = RecommondOther[5]["version"].ToString();
|
|
|
+ if (File.Exists(FileNameFreePDFTemplates) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameFreePDFTemplates);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.RecommondOther_FreePDFTemplatesimageen, FileNameFreePDFTemplates);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region advertisement参数配置
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayshow = advertisement[0]["show"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaytype = advertisement[0]["type"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaysubscriptionType = advertisement[0]["subscriptionType"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaystartTime = advertisement[0]["startTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayendTime = advertisement[0]["endTime"].ToObject<long>();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayshowCloseBtn = advertisement[0]["showCloseBtn"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaynameen = advertisement[0]["name"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaynamezh_CN = advertisement[0]["name"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaynamezh_TW = advertisement[0]["name"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaytooltipen = advertisement[0]["tooltip"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaytooltipzh_CN = advertisement[0]["tooltip"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaytooltipzh_TW = advertisement[0]["tooltip"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaylinkURLen = advertisement[0]["linkURL"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaylinkURLzh_CN = advertisement[0]["linkURL"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridaylinkURLzh_TW = advertisement[0]["linkURL"]["zh_TW"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayimagenormal = advertisement[0]["image"]["normal_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayimagehover = advertisement[0]["image"]["hover_Light"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayimageen = advertisement[0]["image"]["en"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayimagezh_CN = advertisement[0]["image"]["zh_CN"].ToString();
|
|
|
+ Settings.Default.ADDate.advertisement_BlackFridayimagezh_TW = advertisement[0]["image"]["zh_TW"].ToString();
|
|
|
+ string FileNameBlackFriday = App.CachePath.ADFilePath + "\\" + "advertisement" + ".png";
|
|
|
+ if (advertisement[0]["version"].ToString() != Settings.Default.ADDate.advertisement_BlackFridayversion|| File.Exists(FileNameBlackFriday) == false)
|
|
|
+ {
|
|
|
+ if (File.Exists(FileNameBlackFriday) == true)
|
|
|
+ {
|
|
|
+ File.Delete(FileNameBlackFriday);
|
|
|
+ }
|
|
|
+ WebClient client = new WebClient();
|
|
|
+ client.DownloadFile(Settings.Default.ADDate.advertisement_BlackFridayimageen, FileNameBlackFriday);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ Settings.Default.Save();
|
|
|
}
|
|
|
- string str1 = System.Environment.CurrentDirectory;
|
|
|
+
|
|
|
return jobject["code"].ToObject<string>().ToLower();
|
|
|
}
|
|
|
|
|
@@ -113,9 +417,15 @@ namespace PDF_Master.Helper
|
|
|
{
|
|
|
return "404";
|
|
|
}
|
|
|
- else return "0000";
|
|
|
+ else
|
|
|
+ return "0000";
|
|
|
+
|
|
|
|
|
|
}
|
|
|
+ catch(Exception e)
|
|
|
+ {
|
|
|
+ return "0000";
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|