ConverterImgDialogViewModel.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. using ComPDFKit_Conversion.Converter;
  2. using ComPDFKit_Conversion.Options;
  3. using ComPDFKitViewer.PdfViewer;
  4. using PDF_Master.CustomControl;
  5. using PDF_Master.Helper;
  6. using PDF_Master.Model;
  7. using PDF_Master.Model.Dialog.ConverterDialogs;
  8. using PDF_Master.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
  9. using PDF_Master.Properties;
  10. using Prism.Commands;
  11. using Prism.Mvvm;
  12. using Prism.Services.Dialogs;
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Diagnostics;
  16. using System.IO;
  17. using System.Linq;
  18. using System.Net.NetworkInformation;
  19. using System.Windows;
  20. using System.Windows.Forms;
  21. using DialogResult = Prism.Services.Dialogs.DialogResult;
  22. namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
  23. {
  24. public class ConverterImgDialogViewModel : BindableBase, IDialogAware
  25. {
  26. #region 文案
  27. private string T_title;
  28. public string T_Title
  29. {
  30. get { return T_title; }
  31. set
  32. {
  33. SetProperty(ref T_title, value);
  34. }
  35. }
  36. private string T_yes;
  37. public string T_YES
  38. {
  39. get { return T_yes; }
  40. set
  41. {
  42. SetProperty(ref T_yes, value);
  43. }
  44. }
  45. private string T_no;
  46. public string T_No
  47. {
  48. get { return T_no; }
  49. set
  50. {
  51. SetProperty(ref T_no, value);
  52. }
  53. }
  54. private string T_pageRange;
  55. public string T_PageRange
  56. {
  57. get { return T_pageRange; }
  58. set
  59. {
  60. SetProperty(ref T_pageRange, value);
  61. }
  62. }
  63. private string T_format;
  64. public string T_Format
  65. {
  66. get { return T_format; }
  67. set
  68. {
  69. SetProperty(ref T_format, value);
  70. }
  71. }
  72. private string _TextUpgrade;
  73. public string TextUpgrade
  74. {
  75. get { return _TextUpgrade; }
  76. set { _TextUpgrade = value; }
  77. }
  78. private void IntString()
  79. {
  80. TextUpgrade = App.ServiceLoader.GetString("TextUpgrade");
  81. T_Title = App.MainPageLoader.GetString("Convert_PDFToImageTitle");
  82. T_YES = App.MainPageLoader.GetString("Convert_Yes");
  83. T_No = App.MainPageLoader.GetString("Convert_No");
  84. T_PageRange = App.MainPageLoader.GetString("Convert_PDFPageRange");
  85. T_Format = App.MainPageLoader.GetString("Convert_PDFToImageFormat");
  86. }
  87. #endregion
  88. public string Title => "";
  89. public event Action<IDialogResult> RequestClose;
  90. #region 参数和属性
  91. public ConverterImgDialogModel ConverterImgModel = new ConverterImgDialogModel();
  92. public CPDFViewer currentViewer;
  93. public string CurrentPageIndex = "1";
  94. public bool IsCurrentPageIndex = true;
  95. public IDialogService dialogs;
  96. public string PageRangeText { set; get; } = "0";
  97. public string PageRangeSelectIndex { set; get; } = "0";
  98. private int maxPageRange = 0;
  99. public int MaxPageRange
  100. {
  101. get { return maxPageRange; }
  102. set
  103. {
  104. SetProperty(ref maxPageRange, value);
  105. }
  106. }
  107. public List<string> ImageTypeFamily { set; get; } = new List<string>();
  108. private int imageTypeSelectedIndex = 0;
  109. /// <summary>
  110. /// 图像类型的下拉框索引值
  111. /// 如果只需要根据选中项的索引判断,则可以不用再采取command绑定命令的形式,而是可以通过一个int类型属性绑定的形式,然后在set方法里进行处理
  112. /// </summary>
  113. public int ImageTypeSelectedIndex
  114. {
  115. get { return imageTypeSelectedIndex; }
  116. set
  117. {
  118. SetProperty(ref imageTypeSelectedIndex, value);
  119. UpdateImageType(ImageTypeSelectedIndex);
  120. }
  121. }
  122. private int imageDPISelectedIndex;
  123. /// <summary>
  124. /// 图像类型的下拉框索引值
  125. /// 如果只需要根据选中项的索引判断,则可以不用再采取command绑定命令的形式,而是可以通过一个int类型属性绑定的形式,然后在set方法里进行处理
  126. /// </summary>
  127. public int ImageDPISelectedIndex
  128. {
  129. get { return imageDPISelectedIndex; }
  130. set
  131. {
  132. SetProperty(ref imageDPISelectedIndex, value);
  133. UpdateImageDPI(ImageDPISelectedIndex);
  134. }
  135. }
  136. private Visibility limitationsConvertVisible = Visibility.Hidden;
  137. public Visibility LimitationsConvertVisible
  138. {
  139. get { return limitationsConvertVisible; }
  140. set
  141. {
  142. SetProperty(ref limitationsConvertVisible, value);
  143. }
  144. }
  145. private void SetImageTypeOrigin()
  146. {
  147. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageJPEG"));
  148. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageJPG"));
  149. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImagePNG"));
  150. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageGIF"));
  151. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageTIFF"));
  152. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageTGA"));
  153. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageBMP"));
  154. this.ImageTypeFamily.Add(App.MainPageLoader.GetString("Convert_PDFToImageJPEG-2000"));
  155. }
  156. public List<string> ImageDPIFamily { set; get; } = new List<string>();
  157. private void SetImageDPIOrigin()
  158. {
  159. this.ImageDPIFamily.Add("50 dpi");
  160. this.ImageDPIFamily.Add("72 dpi");
  161. this.ImageDPIFamily.Add("96 dpi");
  162. this.ImageDPIFamily.Add("150 dpi");
  163. this.ImageDPIFamily.Add("300 dpi");
  164. this.ImageDPIFamily.Add("600 dpi");
  165. }
  166. private Dictionary<string, string> CheckPageSelect = new Dictionary<string, string>();
  167. private void InitCheckPageSelect()
  168. {
  169. CheckPageSelect.Clear();
  170. if (!IsCurrentPageIndex)
  171. {
  172. CheckPageSelect.Add("0", "0");
  173. CheckPageSelect.Add("1", "1");
  174. CheckPageSelect.Add("2", "2");
  175. CheckPageSelect.Add("3", "3");
  176. CheckPageSelect.Add("4", "4");
  177. }
  178. else
  179. {
  180. CheckPageSelect.Add("0", "0");
  181. CheckPageSelect.Add("1", "-2");
  182. CheckPageSelect.Add("2", "1");
  183. CheckPageSelect.Add("3", "2");
  184. CheckPageSelect.Add("4", "3");
  185. }
  186. }
  187. #endregion
  188. #region 委托声明
  189. public DelegateCommand CancelCommand { get; set; }
  190. public DelegateCommand ConverterCommnad { get; set; }
  191. public DelegateCommand<object> CmbPageSelectionChanged { get; set; }
  192. public DelegateCommand<object> CmbPageTextChanged { get; set; }
  193. public DelegateCommand SetCustomPageRangeCommand { get; set; }
  194. public DelegateCommand<object> PreviewCancelDownCommand { get; set; }
  195. public DelegateCommand BatchConverterCommand { get; set; }
  196. public DelegateCommand UnlockMouseDownCommand { get; set; }
  197. #endregion
  198. public ConverterImgDialogViewModel(IDialogService dialogService)
  199. {
  200. IntString();
  201. CancelCommand = new DelegateCommand(cancel);
  202. ConverterCommnad = new DelegateCommand(converter);
  203. CmbPageSelectionChanged = new DelegateCommand<object>(CmbPageSelectionChangedEvent);
  204. CmbPageTextChanged = new DelegateCommand<object>(CmbPageTextChangedEvent);
  205. SetCustomPageRangeCommand = new DelegateCommand(SetCustomPageRange);
  206. PreviewCancelDownCommand = new DelegateCommand<object>(PreviewCancelDown);
  207. BatchConverterCommand = new DelegateCommand(BatchConverter);
  208. UnlockMouseDownCommand = new DelegateCommand(UnlockMouseDown);
  209. SetImageTypeOrigin();
  210. SetImageDPIOrigin();
  211. dialogs = dialogService;
  212. }
  213. #region 逻辑函数
  214. public void SetCustomPageRange()
  215. {
  216. if (PageRangeSelectIndex == CheckPageSelect["4"])
  217. {
  218. List<int> PageIndexLists = new List<int>();
  219. if (!CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, currentViewer.Document.PageCount, new char[] { ',' }, new char[] { '-' }))
  220. { //TODO
  221. //AlertsMessage alertsMessage = new AlertsMessage();
  222. //alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  223. //if (alertsMessage.result == ContentResult.Ok)
  224. //{
  225. // return;
  226. //}
  227. //else
  228. //{
  229. // //this.eventAggregator.GetEvent<DeleteWatermarkEvent>().Publish(new EnumDeleteUnicode
  230. // //{
  231. // // Unicode = Unicode,
  232. // // Status = EnumDelete.StatusCreate
  233. // //});
  234. // return;
  235. //}
  236. }
  237. }
  238. }
  239. /// <summary>
  240. /// 根据下拉框选项,选择不同的图片类型
  241. /// </summary>
  242. /// <param name="index"></param>
  243. private void UpdateImageType(int index)
  244. {
  245. this.ConverterImgModel.Options.ImageType = ImgType.PNG;
  246. switch (index)
  247. {
  248. case 0:
  249. this.ConverterImgModel.imageType = ".jpeg";
  250. break;
  251. case 7:
  252. this.ConverterImgModel.imageType = ".jp2";
  253. break;
  254. case 3:
  255. this.ConverterImgModel.imageType = ".gif";
  256. break;
  257. case 4:
  258. this.ConverterImgModel.imageType = ".tiff";
  259. break;
  260. case 5:
  261. this.ConverterImgModel.imageType = ".tga";
  262. break;
  263. case 6:
  264. this.ConverterImgModel.imageType = ".bmp";
  265. break;
  266. case 2:
  267. this.ConverterImgModel.imageType = ".png";
  268. break;
  269. case 1:
  270. this.ConverterImgModel.imageType = ".jpg";
  271. this.ConverterImgModel.Options.ImageType = ImgType.JPEG;
  272. break;
  273. default:
  274. break;
  275. }
  276. }
  277. private void UpdateImageDPI(int index)
  278. {
  279. switch (index)
  280. {
  281. case 0:
  282. this.ConverterImgModel.Options.ImageDpi = 50;
  283. Trace.WriteLine("50");
  284. break;
  285. case 1:
  286. this.ConverterImgModel.Options.ImageDpi = 72;
  287. Trace.WriteLine("72");
  288. break;
  289. case 2:
  290. this.ConverterImgModel.Options.ImageDpi = 96;
  291. Trace.WriteLine("96");
  292. break;
  293. case 3:
  294. this.ConverterImgModel.Options.ImageDpi = 150;
  295. Trace.WriteLine("150");
  296. break;
  297. case 4:
  298. this.ConverterImgModel.Options.ImageDpi = 300;
  299. Trace.WriteLine("300");
  300. break;
  301. case 5:
  302. this.ConverterImgModel.Options.ImageDpi = 600;
  303. Trace.WriteLine("600");
  304. break;
  305. default:
  306. break;
  307. }
  308. // this.ConverterImgModel.Options.ImageDpi = 150;
  309. }
  310. private void cancel()
  311. {
  312. RequestClose.Invoke(new DialogResult(ButtonResult.Cancel));
  313. }
  314. private void PreviewCancelDown(object e)
  315. {
  316. var PageRangeComboBox = e as WritableComboBox;
  317. if (PageRangeComboBox != null)
  318. {
  319. PageRangeComboBox.IsloseFocus = false;
  320. }
  321. }
  322. private void converter()
  323. {
  324. if (PageRangeSelectIndex == CheckPageSelect["4"])
  325. {
  326. List<int> PageIndexLists = new List<int>();
  327. if (!CommonHelper.GetPagesInRange(ref PageIndexLists, PageRangeText, currentViewer.Document.PageCount, new char[] { ',' }, new char[] { '-' }))
  328. { //TODO
  329. AlertsMessage alertsMessage = new AlertsMessage();
  330. alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  331. if (alertsMessage.result == ContentResult.Ok)
  332. {
  333. return;
  334. }
  335. else
  336. {
  337. //this.eventAggregator.GetEvent<DeleteWatermarkEvent>().Publish(new EnumDeleteUnicode
  338. //{
  339. // Unicode = Unicode,
  340. // Status = EnumDelete.StatusCreate
  341. //});
  342. return;
  343. }
  344. }
  345. }
  346. FolderBrowserDialog dlg = new FolderBrowserDialog();
  347. if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  348. {
  349. ConverterImgModel.OutputPath = dlg.SelectedPath.Trim();
  350. }
  351. else
  352. {
  353. return;
  354. }
  355. HomePageEditHelper.GetPagerange(PageRangeSelectIndex, currentViewer, ref ConverterImgModel.PageRange, PageRangeText, !IsCurrentPageIndex, CurrentPageIndex);
  356. if (ConverterImgModel.PageRange == "")
  357. {
  358. Trace.WriteLine("输入不对");
  359. AlertsMessage alertsMessage = new AlertsMessage();
  360. alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  361. return;
  362. }
  363. char[] enumerationSeparator = new char[] { ',' };
  364. char[] rangeSeparator = new char[] { '-' };
  365. if (!CommonHelper.GetPagesInRange(ref ConverterImgModel.PageIndexLists, ConverterImgModel.PageRange, currentViewer.Document.PageCount, enumerationSeparator, rangeSeparator))
  366. { //TODO
  367. Trace.WriteLine("输入不对");
  368. AlertsMessage alertsMessage = new AlertsMessage();
  369. alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  370. return;
  371. }
  372. ConverterImgModel.imgOptions = ConverterImgModel.ImgOptions();
  373. // DialogParameters value = new DialogParameters();
  374. //value.Add(ParameterNames.ConverterType, "Img");
  375. //value.Add(ParameterNames.ConverterTypeModel, ConverterImgModel);
  376. var dialogresult = new DialogResult(ButtonResult.OK);
  377. dialogresult.Parameters.Add(ParameterNames.ConverterType, "Img");
  378. dialogresult.Parameters.Add(ParameterNames.ConverterTypeModel, ConverterImgModel);
  379. RequestClose.Invoke(dialogresult);
  380. //RequestClose?.Invoke(new DialogResult(ButtonResult.OK));
  381. //dialogs.ShowDialog(DialogNames.ConverterProgressBarDialog, value, e =>
  382. //{
  383. //});
  384. }
  385. private void CmbPageSelectionChangedEvent(object e)
  386. {
  387. ///这里采用的是将预览UI控件传递过来的方式,为下下策
  388. ///正确的方式应该是 通过声明一些属性,再通过绑定来更新预览控件对应值的形式
  389. ///但是目前发现自定义控件的依赖属性绑定有些问题,因此先用此方法,将业务逻辑代码先调整到VM里
  390. var ConverterPreview = e as PageTurningPreview;
  391. if (ConverterPreview != null)
  392. {
  393. string PageRangeSelectIndex = this.PageRangeSelectIndex;
  394. var currentViewer = this.currentViewer;
  395. string PageRange = "";
  396. var PageRangeText = this.PageRangeText;
  397. if (PageRangeSelectIndex == CheckPageSelect["0"] || PageRangeSelectIndex == CheckPageSelect["2"] || PageRangeSelectIndex == CheckPageSelect["3"] || PageRangeSelectIndex == CheckPageSelect["4"])
  398. {
  399. if (PageRangeSelectIndex == CheckPageSelect["4"]) { HomePageEditHelper.GetPagerange("0", currentViewer, ref PageRange, PageRangeText, !IsCurrentPageIndex); } else { HomePageEditHelper.GetPagerange(PageRangeSelectIndex, currentViewer, ref PageRange, PageRangeText, !IsCurrentPageIndex); }
  400. char[] enumerationSeparator = new char[] { ',' };
  401. char[] rangeSeparator = new char[] { '-' };
  402. if (!CommonHelper.GetPagesInRange(ref ConverterPreview.PageIndexLists, PageRange, currentViewer.Document.PageCount, enumerationSeparator, rangeSeparator))
  403. { //TODO
  404. ConverterPreview.PageIndexLists.Add(0);
  405. Trace.WriteLine("输入不对");
  406. AlertsMessage alertsMessage = new AlertsMessage();
  407. alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  408. return;
  409. }
  410. }
  411. if (PageRangeSelectIndex == CheckPageSelect["1"])
  412. {
  413. char[] enumerationSeparator = new char[] { ',' };
  414. char[] rangeSeparator = new char[] { '-' };
  415. if (!CommonHelper.GetPagesInRange(ref ConverterPreview.PageIndexLists, (currentViewer.CurrentIndex + 1).ToString()
  416. , currentViewer.Document.PageCount, enumerationSeparator, rangeSeparator))
  417. { //TODO
  418. Trace.WriteLine("输入不对");
  419. AlertsMessage alertsMessage = new AlertsMessage();
  420. alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  421. return;
  422. }
  423. this.CurrentPageIndex = (ConverterPreview.PageIndexLists.Last<int>() + 1).ToString();
  424. }
  425. // ConverterPreview.PageIndex.Text = (ConverterPreview.PageIndexLists.Last<int>() + 1).ToString();
  426. ConverterPreview.PageIndex.Text = ConverterPreview.PageIndexLists.Count.ToString();
  427. ConverterPreview.CurrentIndex = 0;
  428. }
  429. }
  430. private void CmbPageTextChangedEvent(object e)
  431. {
  432. var ConverterPreview = e as PageTurningPreview;
  433. if (ConverterPreview != null)
  434. {
  435. if (ConverterPreview != null)
  436. {
  437. string PageRangeSelectIndex = this.PageRangeSelectIndex;
  438. var currentViewer = this.currentViewer;
  439. string PageRange = "";
  440. var PageRangeText = this.PageRangeText;
  441. HomePageEditHelper.GetPagerange(PageRangeSelectIndex, currentViewer, ref PageRange, PageRangeText, !IsCurrentPageIndex);
  442. char[] enumerationSeparator = new char[] { ',' };
  443. char[] rangeSeparator = new char[] { '-' };
  444. if (!CommonHelper.GetPagesInRange(ref ConverterPreview.PageIndexLists, PageRange, currentViewer.Document.PageCount, enumerationSeparator, rangeSeparator))
  445. { //TODO
  446. HomePageEditHelper.GetPagerange("0", currentViewer, ref PageRange, PageRangeText, !IsCurrentPageIndex);
  447. if (!CommonHelper.GetPagesInRange(ref ConverterPreview.PageIndexLists, PageRange, currentViewer.Document.PageCount, enumerationSeparator, rangeSeparator))
  448. { //TODO
  449. ConverterPreview.PageIndexLists.Add(0);
  450. Trace.WriteLine("输入不对");
  451. AlertsMessage alertsMessage = new AlertsMessage();
  452. alertsMessage.ShowDialog("", App.MainPageLoader.GetString("PageRangeWarning"), App.ServiceLoader.GetString("Text_ok"));
  453. return;
  454. }
  455. ConverterPreview.PageIndex.Text = ConverterPreview.PageIndexLists.Count.ToString();
  456. ConverterPreview.CurrentIndex = 0;
  457. return;
  458. }
  459. else
  460. {
  461. // ConverterPreview.PageIndex.Text = (ConverterPreview.PageIndexLists.Last<int>() + 1).ToString();
  462. ConverterPreview.PageIndex.Text = ConverterPreview.PageIndexLists.Count.ToString();
  463. ConverterPreview.CurrentIndex = 0;
  464. }
  465. }
  466. }
  467. }
  468. private void BatchConverter()
  469. {
  470. DialogParameters convertpdftoword = new DialogParameters();
  471. convertpdftoword.Add(ParameterNames.BatchProcessing_Name, "0");
  472. convertpdftoword.Add("ConverterTypeIndex", 7);
  473. HomePageBatchProcessingDialogModel.FilePaths = new List<string> { currentViewer.Document.FilePath.ToString() };
  474. HomePageBatchProcessingDialogModel.BatchProcessingIndex = 1;
  475. convertpdftoword.Add(ParameterNames.FilePath, new string[] { currentViewer.Document.FilePath.ToString() });
  476. dialogs.ShowDialog(DialogNames.HomePageBatchProcessingDialog, convertpdftoword, e => { });
  477. }
  478. private void UnlockMouseDown()
  479. {
  480. ConverterHelper.convertUnlock();
  481. }
  482. #endregion
  483. #region 构架行为
  484. public bool CanCloseDialog()
  485. {
  486. return true;
  487. }
  488. public void OnDialogClosed()
  489. {
  490. }
  491. public void OnDialogOpened(IDialogParameters parameters)
  492. {
  493. CPDFViewer pdfViewer = null;
  494. parameters.TryGetValue<CPDFViewer>(ParameterNames.PDFViewer, out pdfViewer);
  495. parameters.TryGetValue<bool>("PageRangeComboBoxCurrentPage", out IsCurrentPageIndex);
  496. if (pdfViewer != null)
  497. {
  498. InitCheckPageSelect();
  499. currentViewer = pdfViewer;
  500. MaxPageRange = currentViewer.Document.PageCount;
  501. if (currentViewer.Tag != null) { ConverterImgModel.Pawssword = currentViewer.Tag.ToString(); }
  502. ConverterImgModel.InputPath = pdfViewer.Document.FilePath;
  503. ImageTypeSelectedIndex = 0;
  504. ImageDPISelectedIndex =3 ;
  505. FileInfo fileinfo = new FileInfo(ConverterImgModel.InputPath);
  506. ConverterImgModel.OutputPath = fileinfo.DirectoryName;
  507. if (Settings.Default.UserDate.subscribestatus != 1)
  508. {
  509. LimitationsConvertVisible = Visibility.Visible;
  510. }
  511. }
  512. }
  513. #endregion
  514. }
  515. }