31 lines
714 B
C#
31 lines
714 B
C#
using System.Diagnostics;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
namespace autosos_maui.ViewModels;
|
|
|
|
public partial class LoginViewModel : ObservableObject
|
|
{
|
|
private string _userName = "";
|
|
private string _password = "";
|
|
|
|
public string UserName
|
|
{
|
|
get => _userName;
|
|
set => SetProperty(ref _userName, value);
|
|
}
|
|
|
|
public string Password
|
|
{
|
|
get => _password;
|
|
set => SetProperty(ref _password, value);
|
|
}
|
|
|
|
[RelayCommand]
|
|
public void Login()
|
|
{
|
|
Debug.WriteLine("login");
|
|
Debug.WriteLine("username:{0},password:{1}", UserName, Password);
|
|
Shell.Current.GoToAsync("HomeView");
|
|
}
|
|
} |