using PDF_Master.EventAggregators; using Prism.Commands; using Prism.Events; using Prism.Mvvm; using Prism.Regions; using Prism.Services.Dialogs; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PDF_Master.ViewModels.TipContent { public class SetPasswordSuccessfullyTipViewModel:BindableBase,INavigationAware { public string unicode = null; public IEventAggregator eventAggregator; public DelegateCommand CloseTipCommand { get; set; } public SetPasswordSuccessfullyTipViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; unicode = App.mainWindowViewModel.SelectedItem.Unicode; CloseTipCommand = new DelegateCommand(CloseTip); } public void CloseTip() { this.eventAggregator.GetEvent().Publish(new ShowTipEventArgs() { enumTipKind = EnumTipKind.StatusNone, Unicode = unicode }); } public bool IsNavigationTarget(NavigationContext navigationContext) { return true; } public void OnNavigatedFrom(NavigationContext navigationContext) { } public void OnNavigatedTo(NavigationContext navigationContext) { } } }