123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- using PDF_Master.Helper;
- using Prism.Commands;
- 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;
- using System.Windows;
- using System.Windows.Threading;
- namespace PDF_Master.ViewModels.Dialog.ServiceDialog
- {
- public class UserOutOKRegionViewModel : BindableBase, INavigationAware
- {
-
- private UserDialogViewModel UserDialogViewModel;
- public IDialogService dialogs;
- #region 文案
-
- private string _Text_useroutok = "";
- public string Text_useroutok
- {
- get { return _Text_useroutok; }
- set
- {
- SetProperty(ref _Text_useroutok, value);
- }
- }
- private string _Text_useroutoktext = "";
- public string Text_useroutoktext
- {
- get { return _Text_useroutoktext; }
- set
- {
- SetProperty(ref _Text_useroutoktext, value);
- }
- }
- private string _Text_ok = "";
- public string Text_ok
- {
- get { return _Text_ok; }
- set
- {
- SetProperty(ref _Text_ok, value);
- }
- }
- private void InitString()
- {
- Text_useroutok = App.ServiceLoader.GetString("Text_useroutok");
- Text_useroutoktext = App.ServiceLoader.GetString("Text_useroutoktext");
- Text_ok = App.ServiceLoader.GetString("Text_ok");
- }
- #endregion
- public bool IsNavigationTarget(NavigationContext navigationContext)
- {
- return true;
- }
- public void OnNavigatedFrom(NavigationContext navigationContext)
- {
- }
- public void OnNavigatedTo(NavigationContext navigationContext)
- {
- navigationContext.Parameters.TryGetValue<UserDialogViewModel>("UserDialogViewModel", out UserDialogViewModel);
- }
- public DelegateCommand UserGetokCommand { get; set; }
- public UserOutOKRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
- {
- dialogs = dialogService;
- UserGetokCommand = new DelegateCommand(UserGetok);
- InitString();
- }
- private void UserGetok()
- {
- UserDialogViewModel.Close();
- }
- }
- }
|