SubscriptionDialogViewModel.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using Prism.Commands;
  2. using Prism.Mvvm;
  3. using Prism.Regions;
  4. using Prism.Services.Dialogs;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Diagnostics;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace PDF_Master.ViewModels.Dialog.ServiceDialog
  12. {
  13. public class SubscriptionDialogViewModel : BindableBase, IDialogAware
  14. {
  15. public string Title => "";
  16. public event Action<IDialogResult> RequestClose;
  17. #region 文案
  18. #endregion
  19. private string _uristore = "https://www.pdfreaderpro.com/windows/store/permanent";
  20. public string Uristore
  21. {
  22. get { return _uristore; }
  23. set
  24. {
  25. SetProperty(ref _uristore, value);
  26. }
  27. }
  28. public DelegateCommand LinkstoreCommand { get; set; }
  29. private void InitString()
  30. {
  31. }
  32. public SubscriptionDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
  33. {
  34. LinkstoreCommand = new DelegateCommand(Linkstore);
  35. InitString();
  36. }
  37. private void Linkstore()
  38. {
  39. Process.Start(new ProcessStartInfo(Uristore));
  40. }
  41. public bool CanCloseDialog()
  42. {
  43. return true;
  44. }
  45. public void OnDialogClosed()
  46. {
  47. }
  48. public void OnDialogOpened(IDialogParameters parameters)
  49. {
  50. }
  51. }
  52. }