PWA Fundvelo der Caritas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AppState.cs 581B

123456789101112131415161718192021222324
  1. using System;
  2. namespace cwebplusApp.Shared {
  3. public class AppState {
  4. private bool _loggedIn;
  5. public event Action OnChange;
  6. public bool LoggedIn {
  7. get { return _loggedIn; }
  8. set {
  9. if (_loggedIn != value) {
  10. _loggedIn = value;
  11. NotifyStateChanged();
  12. }
  13. }
  14. }
  15. public void NotifyChanged() {
  16. NotifyStateChanged();
  17. }
  18. private void NotifyStateChanged() => OnChange?.Invoke();
  19. }
  20. }