AuthorizationViewModel.cs 890 B

12345678910111213141516171819202122232425262728
  1. using AvaloniaApplicationTestNew.Models;
  2. using ReactiveUI;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace AvaloniaApplicationTestNew.ViewModels
  9. {
  10. public class AuthorizationViewModel : ViewModelBase
  11. {
  12. string login = "";
  13. string password = "";
  14. string message = "";
  15. char? passwordChar = '*';
  16. public string Login { get => login; set => login = value; }
  17. public string Password { get => password; set => password = value; }
  18. public string Message { get => message; set => this.RaiseAndSetIfChanged(ref message, value); }
  19. public char? PasswordChar { get => passwordChar; set => this.RaiseAndSetIfChanged(ref passwordChar, value); }
  20. public void Error()
  21. {
  22. password = "";
  23. login = "";
  24. }
  25. }
  26. }