框架优化

This commit is contained in:
hsc
2025-12-19 16:58:34 +08:00
parent 69aaa5c4e5
commit 4da28d08a8
46 changed files with 1178 additions and 793 deletions

View File

@@ -0,0 +1,40 @@
using LAEPS.PubEvent;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace LAEPS.ViewModels
{
public class LoginViewModel:BindableBase
{
#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; }
private IEventAggregator _eventAggregator;
public LoginViewModel(IContainerProvider containerProvider)
{
_eventAggregator = containerProvider.Resolve<IEventAggregator>();
LoginCommand = new AsyncDelegateCommand(OnLogin);
}
private async Task OnLogin()
{
_eventAggregator.GetEvent<LoginSuccessEvent>().Publish();
}
}
}