ConverterHelper.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using ComPDFKit_Conversion.Converter;
  7. using System.Diagnostics;
  8. using System.IO;
  9. using Microsoft.AppCenter.Crashes.Ingestion.Models;
  10. using static Dropbox.Api.Sharing.ListFileMembersIndividualResult;
  11. using ComPDFKit_Conversion.Options;
  12. using PDF_Master.CustomControl;
  13. using Exception = System.Exception;
  14. using ImageMagick;
  15. using System.IO.Compression;
  16. using System.Windows;
  17. using System.Net.Mime;
  18. using System.Windows.Controls;
  19. using PDF_Master.Properties;
  20. namespace PDF_Master.Helper
  21. {
  22. public static class ConverterHelper
  23. {
  24. public static CPDFConverterWord wordConverter = null;
  25. public static CPDFConverterExcel excelConverter = null;
  26. public static CPDFConverterPPT pptConverter = null;
  27. public static CPDFConverterTxt txtConverter = null;
  28. public static CPDFConverterCsv csvConverter = null;
  29. public static CPDFConverterImg imgConverter = null;
  30. public static CPDFConverterRTF rtfConverter = null;
  31. public static CPDFConverterHTML htmlConverter = null;
  32. public static async Task<bool> WordConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertWordOptions wordOptions = null, bool IsCustomFileName = true)
  33. {
  34. bool result = false;
  35. try
  36. {
  37. int[] pageArray = pageIndexLists.ToArray();
  38. wordConverter = new CPDFConverterWord(inputpath, pawssword);
  39. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  40. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  41. ConvertError error = ConvertError.ERR_UNKNOWN;
  42. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".docx");
  43. result = await Task.Run(() => wordConverter.Convert(outputFolder, ref outputFileName, wordOptions, pageArray, ref error, getProgress));
  44. if (result)
  45. {
  46. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  47. {
  48. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  49. }
  50. }
  51. }
  52. catch
  53. {
  54. }
  55. return result;
  56. }
  57. public static async Task<bool> PPTConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertPPTOptions pptOptions = null, bool IsCustomFileName = true)
  58. {
  59. bool result = false;
  60. try
  61. {
  62. int[] pageArray = pageIndexLists.ToArray();
  63. pptConverter = new CPDFConverterPPT(inputpath, pawssword);
  64. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  65. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  66. ConvertError error = ConvertError.ERR_UNKNOWN;
  67. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".ppt");
  68. result = await Task.Run(() => pptConverter.Convert(outputFolder, ref outputFileName, pptOptions, pageArray, ref error, getProgress));
  69. if (result)
  70. {
  71. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  72. {
  73. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  74. }
  75. }
  76. }
  77. catch
  78. {
  79. }
  80. return result;
  81. }
  82. public static async Task<bool> ExcelConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertExcelOptions ExcelOption, bool IsCustomFileName = true)
  83. {
  84. bool result = false;
  85. try
  86. {
  87. excelConverter = new CPDFConverterExcel(inputpath, pawssword);
  88. int[] pageArray = pageIndexLists.ToArray();
  89. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  90. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  91. ConvertError error = ConvertError.ERR_UNKNOWN;
  92. result = await Task.Run(() => excelConverter.Convert(outputFolder, ref outputFileName, ExcelOption, pageArray, ref error, getProgress));
  93. if (result)
  94. {
  95. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  96. {
  97. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  98. }
  99. else if (outputFileName == "NoTable")
  100. {
  101. AlertsMessage alertsMessage = new AlertsMessage();
  102. alertsMessage.ShowDialog("", " No Table", App.ServiceLoader.GetString("Text_ok"));
  103. }
  104. }
  105. }
  106. catch
  107. {
  108. }
  109. return result;
  110. }
  111. //public static async Task<bool> TableConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword)
  112. //{
  113. // bool result = false;
  114. // try
  115. // {
  116. // int[] pageArray = pageIndexLists.ToArray();
  117. // tableConverter = new CPDFConverterTable(inputpath, pawssword);
  118. // string outputFolder = outputpath;
  119. // string outputFileName = Path.GetFileNameWithoutExtension(inputpath);
  120. // ConvertError error = ConvertError.ERR_UNKNOWN;
  121. // string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".xlsx");
  122. // result = await Task.Run(() => tableConverter.Convert(outputFolder, ref outputFileName, pageArray, ref error, getProgress));
  123. // }
  124. // catch (Exception ex)
  125. // {
  126. // }
  127. // return result;
  128. //}
  129. public static async Task<bool> CSVConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertCsvOptions csvOptions = null, bool IsCustomFileName = true)
  130. {
  131. bool result = false;
  132. try
  133. {
  134. int[] pageArray = pageIndexLists.ToArray();
  135. csvConverter = new CPDFConverterCsv(inputpath, pawssword);
  136. string outputFolder = "";
  137. string outputFileName = "";
  138. if (IsCustomFileName)
  139. {
  140. outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  141. outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  142. }
  143. else
  144. {
  145. outputFolder = outputpath;
  146. outputFileName = Path.GetFileNameWithoutExtension(inputpath);
  147. }
  148. ConvertError error = ConvertError.ERR_UNKNOWN;
  149. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".csv");
  150. result = await Task.Run(() => csvConverter.Convert(outputFolder, ref outputFileName, csvOptions, pageArray, ref error, getProgress));
  151. if (result)
  152. {
  153. if (File.Exists(outputFileName))
  154. {
  155. if (IsCustomFileName)
  156. {
  157. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  158. {
  159. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  160. }
  161. }
  162. else
  163. {
  164. string FileName = CommonHelper.CreateFolder(outputFileName.Replace(".zip", ""));
  165. ZipFile.ExtractToDirectory(outputFileName, FileName);
  166. File.Delete(outputFileName);
  167. CommonHelper.ShowFileBrowser(FileName.Replace("/", "\\"));
  168. }
  169. }
  170. else
  171. {
  172. AlertsMessage alertsMessage = new AlertsMessage();
  173. alertsMessage.ShowDialog("", " No Table", App.ServiceLoader.GetString("Text_ok"));
  174. }
  175. }
  176. }
  177. catch
  178. {
  179. }
  180. return result;
  181. }
  182. public static async Task<bool> TxtConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertTxtOptions txtOptions = null, bool IsCustomFileName = true)
  183. {
  184. bool result = false;
  185. try
  186. {
  187. int[] pageArray = pageIndexLists.ToArray();
  188. txtConverter = new CPDFConverterTxt(inputpath, pawssword);
  189. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  190. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  191. ConvertError error = ConvertError.ERR_UNKNOWN;
  192. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".txt");
  193. result = await Task.Run(() => txtConverter.Convert(outputFolder, ref outputFileName, txtOptions, pageArray, ref error, getProgress));
  194. if (result)
  195. {
  196. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  197. {
  198. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  199. }
  200. }
  201. }
  202. catch
  203. {
  204. }
  205. return result;
  206. }
  207. public static void ImageMagickPDFToImage(string imageType, string filePath, string outputFolder, string outputFileName, ref string FileName, double density = 150)
  208. {
  209. FileName = CommonHelper.CreateFolder(outputFolder + "\\" + outputFileName);
  210. ZipFile.ExtractToDirectory(filePath, FileName);
  211. var files = Directory.GetFiles(FileName, "*.png");
  212. int i = 0;
  213. var images = new MagickImageCollection();
  214. foreach (var file in files)
  215. {
  216. //pdf整体转为gif,将.gifoff改为.gif
  217. Trace.WriteLine(file);
  218. if (imageType == ".gifoff")
  219. {
  220. images.Add(file);
  221. images[i].AnimationDelay = 100; // in this example delay is 1000ms/1sec
  222. images[i].Flip();
  223. }
  224. using (var image = new MagickImage(file))
  225. {
  226. if (imageType != ".gifoff")
  227. {
  228. //Save frame as jpg
  229. //image.Format = MagickFormat.Jp2;
  230. //水平垂直DPI
  231. image.Density = new Density(density);
  232. image.Write(file.Remove(file.LastIndexOf(".png"), 4) + imageType);
  233. }
  234. // 删除该文件
  235. System.IO.File.Delete(file);
  236. }
  237. }
  238. if (imageType == ".gifoff")
  239. {
  240. // Optionally reduce colors
  241. var settings = new QuantizeSettings();
  242. settings.Colors = 256;
  243. images.Quantize(settings);
  244. // Optionally optimize the images (images should have the same size).
  245. images.Optimize();
  246. // Save gif
  247. int fileIndex = 1;
  248. if (File.Exists(outputFolder + "\\" + outputFileName + ".gif"))
  249. {
  250. while (fileIndex >= 1)
  251. {
  252. if (!File.Exists(outputFolder + "\\" + outputFileName + "_" + fileIndex + ".gif"))
  253. {
  254. images.Write(outputFolder + "\\" + outputFileName + ".gif");
  255. fileIndex = -1;
  256. }
  257. fileIndex++;
  258. }
  259. }
  260. else { images.Write(outputFolder + "\\" + outputFileName + ".gif"); }
  261. }
  262. //else {
  263. // int fileIndex = 1;
  264. // if (File.Exists(outputFolder + "\\" + outputFileName + ".zip"))
  265. // {
  266. // while (fileIndex>=1) {
  267. // if (!File.Exists(outputFolder + "\\" + outputFileName + "_" + fileIndex + ".zip"))
  268. // {
  269. // ZipFile.CreateFromDirectory(outputFolder + "\\" + outputFileName, outputFolder + "\\" + outputFileName + "_" + fileIndex + ".zip");
  270. // fileIndex=-1;
  271. // }
  272. // fileIndex++;
  273. // }
  274. // }
  275. // else { ZipFile.CreateFromDirectory(outputFolder + "\\" + outputFileName, outputFolder + "\\" + outputFileName + ".zip"); }
  276. //}
  277. //DirectoryInfo di = new DirectoryInfo(outputFolder + "\\" + outputFileName);
  278. //di.Delete(true);
  279. }
  280. public static async Task<bool> ImgConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, string imageType = ".png", CPDFConvertImgOptions imgOptions = null)
  281. {
  282. string FileName = "";
  283. bool result = false;
  284. try
  285. {
  286. int[] pageArray = pageIndexLists.ToArray();
  287. imgConverter = new CPDFConverterImg(inputpath, pawssword);
  288. string outputFolder = outputpath;
  289. string outputFileName = Path.GetFileNameWithoutExtension(inputpath);
  290. ConvertError error = ConvertError.ERR_UNKNOWN;
  291. if (imageType == ".png" || imageType == ".jpg")
  292. {
  293. result = await Task.Run(() => imgConverter.Convert(outputFolder, ref outputFileName, imgOptions, pageArray, ref error, getProgress));
  294. FileName = CommonHelper.CreateFolder(outputFileName.Replace(".zip", ""));
  295. ZipFile.ExtractToDirectory(outputFileName, FileName);
  296. FileInfo file = new FileInfo(outputFileName);
  297. if (file.Exists) { file.Delete(); }
  298. }
  299. else
  300. { //创建缓存文件夹
  301. string folderPath = Path.Combine(App.CurrentPath, "ConverterImg");
  302. //有可能因为其他原因存在同名文件,导致创建文件夹失败,需要先删除同名文件
  303. //保险措施(猜测)
  304. if (File.Exists(folderPath))
  305. {
  306. File.Delete(folderPath);
  307. }
  308. DirectoryInfo tempfolder = new DirectoryInfo(folderPath);
  309. if (!tempfolder.Exists)
  310. {
  311. tempfolder.Create();
  312. }
  313. //预览图缓存
  314. string saveName = Guid.NewGuid().ToString();
  315. string savePath = Path.Combine(folderPath, saveName);
  316. result = await Task.Run(() => imgConverter.Convert(folderPath, ref saveName, imgOptions, pageArray, ref error, getProgress));
  317. ImageMagickPDFToImage(imageType, saveName, outputFolder, outputFileName, ref FileName, imgOptions.ImageDpi);
  318. DirectoryInfo di = new DirectoryInfo(folderPath);
  319. di.Delete(true);
  320. }
  321. if (result)
  322. {
  323. //Process.Start(FileName.Replace("/", "\\"));
  324. CommonHelper.ShowFileBrowser(FileName.Replace("/", "\\"));
  325. }
  326. }
  327. catch
  328. {
  329. }
  330. return result;
  331. }
  332. public static async Task<bool> RTFConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertRTFOptions rtfOptions = null, bool IsCustomFileName = true)
  333. {
  334. bool result = false;
  335. try
  336. {
  337. int[] pageArray = pageIndexLists.ToArray();
  338. rtfConverter = new CPDFConverterRTF(inputpath, pawssword);
  339. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  340. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  341. ConvertError error = ConvertError.ERR_UNKNOWN;
  342. result = await Task.Run(() => rtfConverter.Convert(outputFolder, ref outputFileName, rtfOptions, pageArray, ref error, getProgress));
  343. if (result)
  344. {
  345. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  346. {
  347. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  348. }
  349. }
  350. }
  351. catch
  352. {
  353. }
  354. return result;
  355. }
  356. public static async Task<bool> HTMLConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertHTMLOptions HtmlOption, bool IsCustomFileName = true)
  357. {
  358. bool result = false;
  359. try
  360. {
  361. htmlConverter = new CPDFConverterHTML(inputpath, pawssword);
  362. int[] pageArray = pageIndexLists.ToArray();
  363. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  364. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  365. ConvertError error = ConvertError.ERR_UNKNOWN;
  366. result = await Task.Run(() => htmlConverter.Convert(outputFolder, ref outputFileName, HtmlOption, pageArray, ref error, getProgress));
  367. if (result)
  368. {
  369. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  370. {
  371. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  372. }
  373. }
  374. }
  375. catch
  376. {
  377. }
  378. return result;
  379. }
  380. public static void Clear(string ConvertType)
  381. {
  382. switch (ConvertType)
  383. {
  384. case "Word":
  385. if (wordConverter != null)
  386. {
  387. wordConverter.Cancel();
  388. }
  389. break;
  390. case "Excel":
  391. if (excelConverter != null)
  392. {
  393. excelConverter.Cancel();
  394. }
  395. break;
  396. case "PPT":
  397. if (pptConverter != null)
  398. {
  399. pptConverter.Cancel();
  400. }
  401. break;
  402. case "Text":
  403. if (txtConverter != null)
  404. {
  405. txtConverter.Cancel();
  406. }
  407. break;
  408. case "CSV":
  409. if (csvConverter != null)
  410. {
  411. csvConverter.Cancel();
  412. }
  413. break;
  414. case "RTF":
  415. if (rtfConverter != null)
  416. {
  417. rtfConverter.Cancel();
  418. }
  419. break;
  420. case "HTML":
  421. if (htmlConverter != null)
  422. {
  423. htmlConverter.Cancel();
  424. }
  425. break;
  426. case "Img":
  427. if (imgConverter != null)
  428. {
  429. imgConverter?.Cancel();
  430. }
  431. break;
  432. default:
  433. break;
  434. }
  435. }
  436. private static void StartFile(string path)
  437. {
  438. //Process.Start(path);
  439. }
  440. public static string GetFileNameAddSuffix(string path, string filename, string suffix)
  441. {
  442. int i = 1;
  443. string outname = filename;
  444. while (File.Exists(path + @"\" + outname + suffix))
  445. {
  446. outname = filename + $"({i.ToString()})";
  447. i++;
  448. }
  449. return outname;
  450. }
  451. public static Microsoft.Office.Interop.Word.Application word;
  452. public static Microsoft.Office.Interop.Excel.Application excele;
  453. public static Microsoft.Office.Interop.PowerPoint.Application ppt;
  454. public static string ConvertOfficeToPDF(string sourcepath, Microsoft.Office.Interop.Word.WdPaperSize paperSize = Microsoft.Office.Interop.Word.WdPaperSize.wdPaperA4, double margin = 0)
  455. {
  456. string folderPath = Path.GetTempPath();
  457. if (File.Exists(folderPath))
  458. {
  459. File.Delete(folderPath);
  460. }
  461. DirectoryInfo tempfolder = new DirectoryInfo(folderPath);
  462. if (!tempfolder.Exists)
  463. {
  464. tempfolder.Create();
  465. }
  466. string targetPath = System.IO.Path.Combine(folderPath, Guid.NewGuid().ToString() + ".pdf");
  467. string ex = System.IO.Path.GetExtension(sourcepath).ToLower();
  468. switch (ex)
  469. {
  470. case ".doc":
  471. case ".docx":
  472. case "docm":
  473. case ".dot":
  474. case ".dotx":
  475. case ".dotm":
  476. case ".txt":
  477. case ".html":
  478. if (word == null)
  479. {
  480. word = new Microsoft.Office.Interop.Word.Application();
  481. }
  482. word.Visible = false;
  483. word.ShowWindowsInTaskbar = true;
  484. Microsoft.Office.Interop.Word.Document document = word.Documents.Open(sourcepath);
  485. var page = document.PageSetup;
  486. page.PaperSize = paperSize;
  487. if (margin > 0)
  488. {
  489. page.LeftMargin = page.TopMargin = page.RightMargin = page.BottomMargin = (float)margin;
  490. }
  491. document?.ExportAsFixedFormat(targetPath, Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF);
  492. document?.Close(false);
  493. if (word != null)
  494. {
  495. word.NormalTemplate.Saved = true;
  496. //word.Quit();
  497. }
  498. break;
  499. case ".xls":
  500. case ".xlsx":
  501. case ".xlsm":
  502. case ".xlsb":
  503. case ".xlam":
  504. case ".xltx":
  505. case ".xlt":
  506. if (excele == null)
  507. {
  508. excele = new Microsoft.Office.Interop.Excel.Application();
  509. }
  510. Microsoft.Office.Interop.Excel.Workbook workbook = null;
  511. excele.Visible = false;
  512. try
  513. {
  514. workbook = excele.Workbooks.Open(sourcepath);
  515. }
  516. catch
  517. {
  518. workbook = excele.Workbooks.Open(sourcepath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "t", false, false, 0, true, 1, Microsoft.Office.Interop.Excel.XlCorruptLoad.xlRepairFile);
  519. }
  520. workbook?.ExportAsFixedFormat(Microsoft.Office.Interop.Excel.XlFixedFormatType.xlTypePDF, targetPath);
  521. workbook?.Close();
  522. //excele?.Quit();
  523. break;
  524. case ".ppt":
  525. case ".pptx":
  526. case ".pptm":
  527. case ".pptsx":
  528. case ".pps":
  529. case ".pptsm":
  530. case ".pot":
  531. case ".potm":
  532. if (ppt == null)
  533. {
  534. ppt = new Microsoft.Office.Interop.PowerPoint.Application();
  535. }
  536. Microsoft.Office.Interop.PowerPoint.Presentation presentation = null;
  537. //ppt.Visible = Microsoft.Office.Core.MsoTriState.msoCTrue;
  538. //ppt.ShowStartupDialog = Microsoft.Office.Core.MsoTriState.msoFalse;
  539. //ppt.ShowWindowsInTaskbar = Microsoft.Office.Core.MsoTriState.msoFalse;
  540. presentation = ppt.Presentations.Open(sourcepath);
  541. presentation.ExportAsFixedFormat(targetPath, Microsoft.Office.Interop.PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF);
  542. presentation?.Close();
  543. //ppt?.Quit();
  544. break;
  545. }
  546. return targetPath;
  547. }
  548. /// <summary>
  549. /// 转档解锁跳转
  550. /// </summary>
  551. public static void convertUnlock()
  552. {
  553. Process.Start(new ProcessStartInfo(ServiceHelper.WebHost + "/windows/store/master?email=" + Settings.Default.UserDate.Email));
  554. }
  555. }
  556. }