模块化
This commit is contained in:
51
LoginModule/ViewModels/RegisterViewModel.cs
Normal file
51
LoginModule/ViewModels/RegisterViewModel.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using UIShare.ViewModelBase;
|
||||
|
||||
namespace LoginModule.ViewModels
|
||||
{
|
||||
public class RegisterViewModel : NavigateViewModelBase
|
||||
{
|
||||
#region 属性
|
||||
private string _SecondPassword;
|
||||
public string SecondPassword
|
||||
{
|
||||
get => _SecondPassword;
|
||||
set => SetProperty(ref _SecondPassword, value);
|
||||
}
|
||||
private string _Password;
|
||||
public string Password
|
||||
{
|
||||
get => _Password;
|
||||
set => SetProperty(ref _Password, value);
|
||||
}
|
||||
private string _Account;
|
||||
public string Account
|
||||
{
|
||||
get => _Account;
|
||||
set => SetProperty(ref _Account, value);
|
||||
}
|
||||
#endregion
|
||||
public ICommand BackCommand { get; set; }
|
||||
public ICommand RegisterCommand { get; set; }
|
||||
public RegisterViewModel(IContainerProvider containerProvider) : base(containerProvider)
|
||||
{
|
||||
BackCommand = new DelegateCommand(OnBack);
|
||||
RegisterCommand = new AsyncDelegateCommand(OnRegister);
|
||||
}
|
||||
|
||||
private void OnBack()
|
||||
{
|
||||
_regionManager.RequestNavigate("LoginRegion", "LoginView");
|
||||
}
|
||||
|
||||
private async Task OnRegister()
|
||||
{
|
||||
_regionManager.RequestNavigate("LoginRegion", "LoginView");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user