123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- using PDF_Master.Helper;
- using PDF_Master.Model;
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Regions;
- using Prism.Services.Dialogs;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Threading;
- namespace PDF_Master.ViewModels.Dialog.ServiceDialog
- {
- public class RegisterOKRegionViewModel : BindableBase, IDialogAware
- {
- public IDialogService dialogs;
- #region 文案
- private string _Text_regisuccess = "";
- public string Text_regisuccess
- {
- get { return _Text_regisuccess; }
- set
- {
- SetProperty(ref _Text_regisuccess, value);
- }
- }
- private string _Text_getstart = "";
- public event Action<IDialogResult> RequestClose;
- public string Text_getstart
- {
- get { return _Text_getstart; }
- set
- {
- SetProperty(ref _Text_getstart, value);
- }
- }
- private void InitString()
- {
- }
- #endregion
- public DelegateCommand LinkstoreCommand { get; set; }
- public DelegateCommand OpenIAPCommand { get; set; }
- public string Title => throw new NotImplementedException();
- public RegisterOKRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
- {
- LinkstoreCommand = new DelegateCommand(Linkstore);
- OpenIAPCommand = new DelegateCommand(OpenIAP);
- dialogs = dialogService;
- InitString();
- }
- private void OpenIAP()
- {
- Close();
- dialogs.ShowDialog(DialogNames.IAPCompareDialog);
- }
- private void Linkstore()
- {
- Process.Start(new ProcessStartInfo("https://www.pdfreaderpro.com/windows/store/permanent"));
- }
- public void Close()
- {
- RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
- }
- public bool CanCloseDialog()
- {
- return true;
- }
- public void OnDialogClosed()
- {
-
- }
- public void OnDialogOpened(IDialogParameters parameters)
- {
-
- }
- }
- }
|