NoInternetRegionViewModel.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using PDF_Master.Helper;
  2. using PDF_Master.Model;
  3. using Prism.Commands;
  4. using Prism.Mvvm;
  5. using Prism.Regions;
  6. using Prism.Services.Dialogs;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Diagnostics;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Text.RegularExpressions;
  13. using System.Threading.Tasks;
  14. using System.Windows;
  15. using System.Windows.Controls;
  16. namespace PDF_Master.ViewModels.Dialog.ServiceDialog
  17. {
  18. public class NOInternetRegionViewModel : BindableBase, INavigationAware
  19. {
  20. private LoginDialogViewModel LoginDialogViewModel;
  21. public IDialogService dialogs;
  22. public bool IsNavigationTarget(NavigationContext navigationContext)
  23. {
  24. return true;
  25. }
  26. public void OnNavigatedFrom(NavigationContext navigationContext)
  27. {
  28. }
  29. public void OnNavigatedTo(NavigationContext navigationContext)
  30. {
  31. navigationContext.Parameters.TryGetValue<LoginDialogViewModel>("LoginDialogViewModel", out LoginDialogViewModel);
  32. }
  33. public DelegateCommand RetryCommand { get; set; }
  34. NOInternetRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
  35. {
  36. dialogs = dialogService;
  37. RetryCommand = new DelegateCommand(Retry);
  38. }
  39. private void Retry()
  40. {
  41. LoginDialogViewModel.RegionMan("LoginRegion");
  42. }
  43. }
  44. }