123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- using ComPDFKit.PDFDocument;
- using ComPDFKit_Conversion.Converter;
- using ComPDFKit_Conversion.Options;
- using PDF_Master.Helper;
- using PDF_Master.Model;
- using PDF_Master.Model.Dialog.ConverterDialogs;
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Services.Dialogs;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Net.Mime;
- using System.Windows.Media;
- using static Dropbox.Api.Sharing.ListFileMembersIndividualResult;
- using static System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip;
- namespace PDF_Master.ViewModels.Dialog.ConverterDialogs
- {
- public class ConverterProgressBarDialogViewModel : BindableBase,IDialogAware
- {
- public string Title => "";
- public event Action<IDialogResult> RequestClose;
- #region 参数和属性
- private string _pageIndex = "0";
-
-
-
- public string PageIndex
- {
- get { return _pageIndex; }
- set
- {
- SetProperty(ref _pageIndex, value);
- }
- }
- private string _pageNumber = "0";
-
-
-
- public string PageNumber
- {
- get { return _pageNumber; }
- set
- {
- SetProperty(ref _pageNumber, value);
- }
- }
- #endregion
- public DelegateCommand CloseCompressCommand { get; set; }
- public ConverterProgressBarDialogViewModel()
- {
- CloseCompressCommand = new DelegateCommand(Close);
- }
- #region 逻辑函数
- private void SetProgress(int pageIndex)
- {
- PageIndex=pageIndex.ToString();
- }
- public void Close()
- {
- RequestClose?.Invoke(new DialogResult(ButtonResult.OK));
- }
- #endregion
- #region 构架行为
- public bool CanCloseDialog()
- {
- return true;
- }
- public void OnDialogClosed()
- {
-
- }
- public void OnDialogOpened(IDialogParameters parameters)
- {
- #region 转档
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #endregion
- RequestClose?.Invoke(new DialogResult(ButtonResult.OK));
- }
- #endregion
- }
- }
|