|
@@ -1,19 +1,29 @@
|
|
|
-using Prism.Mvvm;
|
|
|
+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;
|
|
|
|
|
|
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;
|
|
@@ -26,6 +36,42 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
|
|
|
|
|
|
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();
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|