1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Regions;
- using Prism.Services.Dialogs;
- using System;
- namespace PDF_Office.ViewModels.Dialog.ServiceDialog
- {
- public class IAPCompareDialogViewModel : BindableBase,IDialogAware
- {
-
-
- public string Title => "";
- public event Action<IDialogResult> RequestClose;
- private string _IAPRegionName;
- public string IAPRegionName
- {
- get { return _IAPRegionName; }
- set { _IAPRegionName = value; }
- }
- public bool CanCloseDialog()
- {
- return true;
- }
- public void OnDialogClosed()
- {
-
- }
- public void OnDialogOpened(IDialogParameters parameters)
- {
-
- }
- public DelegateCommand GoLoginCommand { get; set; }
- public DelegateCommand GoRegisterCommand { get; set; }
- IAPCompareDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
- {
-
- IAPRegionName = Guid.NewGuid().ToString();
- GoLoginCommand = new DelegateCommand(GoLogin);
- GoRegisterCommand = new DelegateCommand(GoRegisterd);
- }
- private void GoRegisterd()
- {
- RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
- App.mainWindowViewModel.OpenLogin();
- }
- private void GoLogin()
- {
- RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
- App.mainWindowViewModel.OpenRegister();
- }
-
- }
- }
|