添加项目文件。

This commit is contained in:
czj
2026-06-05 10:57:09 +08:00
parent f29671b374
commit d960cb5912
166 changed files with 15996 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using UIShare.PubEvent;
using UIShare.ViewModelBase;
namespace LoginModule.ViewModels
{
public class LoginViewModel: NavigateViewModelBase
{
#region
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 LoginCommand { get; set; }
public ICommand RegisterCommand { get; set; }
private IEventAggregator _eventAggregator;
public LoginViewModel(IContainerProvider containerProvider) : base(containerProvider)
{
_eventAggregator = containerProvider.Resolve<IEventAggregator>();
LoginCommand = new AsyncDelegateCommand(OnLogin);
RegisterCommand = new AsyncDelegateCommand(OnRegister);
}
private async Task OnRegister()
{
_regionManager.RequestNavigate("LoginRegion", "RegisterView");
}
private async Task OnLogin()
{
_eventAggregator.GetEvent<LoginSuccessEvent>().Publish();
}
}
}

View 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");
}
}
}