|
@@ -10,6 +10,8 @@ using Microsoft.Office.Interop.Word;
|
|
|
using PDF_Master.Helper;
|
|
|
using PDF_Master.CustomControl;
|
|
|
using System.Net.Mime;
|
|
|
+using System.Threading;
|
|
|
+using System.Windows.Threading;
|
|
|
|
|
|
namespace PDF_Master.Model.Dialog.ConverterDialogs
|
|
|
{
|
|
@@ -26,7 +28,7 @@ namespace PDF_Master.Model.Dialog.ConverterDialogs
|
|
|
public ImgType ImageType = ImgType.PNG;
|
|
|
public uint ImageDpi = 150;
|
|
|
public bool IsMergeCsv = false;
|
|
|
- public LayoutOptions LayoutOpts= LayoutOptions.RetainPageLayout;
|
|
|
+ public LayoutOptions LayoutOpts = LayoutOptions.RetainPageLayout;
|
|
|
}
|
|
|
|
|
|
public class ConverterDialogsModel
|
|
@@ -79,12 +81,29 @@ namespace PDF_Master.Model.Dialog.ConverterDialogs
|
|
|
/// </summary>
|
|
|
public ConvertOptions Options = new ConvertOptions();
|
|
|
|
|
|
+ private void TaskMethod()
|
|
|
+ {
|
|
|
+ new Thread(() =>
|
|
|
+ {
|
|
|
+ for (int i = 1; App.mainWindowViewModel.IsProcessVisible != System.Windows.Visibility.Collapsed; i++)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Thread.Sleep(500+i*500);
|
|
|
+ if (i < App.mainWindowViewModel.MaxValue)
|
|
|
+ App.mainWindowViewModel.Value = i;
|
|
|
+ }
|
|
|
+ catch { }
|
|
|
+ }
|
|
|
+ }).Start();
|
|
|
+ }
|
|
|
+
|
|
|
private void ConverterClear()
|
|
|
{
|
|
|
ConverterHelper.Clear(ConvertType);
|
|
|
App.mainWindowViewModel.ProcessCloseBtnVisible = System.Windows.Visibility.Collapsed;
|
|
|
App.mainWindowViewModel.ProgressTitle = "Canceling";
|
|
|
- App.mainWindowViewModel.Value = App.mainWindowViewModel.MaxValue / 3;
|
|
|
+ TaskMethod();
|
|
|
//App.mainWindowViewModel.ProgressTitle = "";
|
|
|
//App.mainWindowViewModel.IsProcessVisible = System.Windows.Visibility.Collapsed;
|
|
|
}
|