MYOBCompanyFileCredentials.cs 822 B

12345678910111213141516171819202122232425262728293031323334
  1. using InABox.Core;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace InABox.Poster.MYOB;
  8. public class MYOBCompanyFileCredentials : BaseObject
  9. {
  10. [EditorSequence(1)]
  11. [TextBoxEditor]
  12. public string UserID { get; set; } = "";
  13. [EditorSequence(2)]
  14. [PasswordEditor(ViewButtonVisible = true)]
  15. public string Password { get; set; } = "";
  16. [EditorSequence(3)]
  17. [CheckBoxEditor]
  18. public bool NoCredentials { get; set; } = false;
  19. protected override void DoPropertyChanged(string name, object? before, object? after)
  20. {
  21. base.DoPropertyChanged(name, before, after);
  22. if(name == nameof(NoCredentials) && NoCredentials)
  23. {
  24. UserID = "";
  25. Password = "";
  26. }
  27. }
  28. }