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.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; namespace PDF_Master.ViewModels.Dialog.ServiceDialog { public class NOInternetRegionViewModel : BindableBase, INavigationAware { private LoginDialogViewModel LoginDialogViewModel; public IDialogService dialogs; public bool IsNavigationTarget(NavigationContext navigationContext) { return true; } public void OnNavigatedFrom(NavigationContext navigationContext) { } public void OnNavigatedTo(NavigationContext navigationContext) { navigationContext.Parameters.TryGetValue("LoginDialogViewModel", out LoginDialogViewModel); } public DelegateCommand RetryCommand { get; set; } NOInternetRegionViewModel(IRegionManager regionManager, IDialogService dialogService) { dialogs = dialogService; RetryCommand = new DelegateCommand(Retry); } private void Retry() { LoginDialogViewModel.RegionMan("LoginRegion"); } } }