1using System.Collections.ObjectModel;
2using System.ComponentModel;
3using CommunityToolkit.Mvvm.ComponentModel;
4using CommunityToolkit.Mvvm.Input;
22 await base.OnInitialize();
24 LocalizationManager.Current.PropertyChanged += this.LocalizationManagerEventHandler;
25 ServiceRef.TagProfile.StepChanged += this.TagProfile_StepChanged;
31 LocalizationManager.Current.PropertyChanged -= this.LocalizationManagerEventHandler;
32 ServiceRef.TagProfile.StepChanged -= this.TagProfile_StepChanged;
34 await base.OnDispose();
45 BaseRegistrationViewModel ViewModel = (BaseRegistrationViewModel)Item.BindingContext;
46 this.registrationSteps[ViewModel.Step] =
this.AddChildViewModel(ViewModel);
52 this.CurrentStep = Step;
53 return this.registrationSteps[Step].DoAssignProperties();
60 [NotifyPropertyChangedFor(nameof(CanGoToPrev))]
61 [NotifyCanExecuteChangedFor(nameof(GoToPrevCommand))]
67 private readonly SortedDictionary<RegistrationStep, BaseRegistrationViewModel> registrationSteps = [];
75 public void LocalizationManagerEventHandler(
object? sender, PropertyChangedEventArgs e)
80 private void TagProfile_StepChanged(
object? Sender, EventArgs e)
82 this.GoToPrevCommand.NotifyCanExecuteChanged();
85 public bool CanGoToPrev
116 [RelayCommand(CanExecute = nameof(CanGoToPrev))]
117 private async Task GoToPrev()
121 await this.registrationSteps[this.CurrentStep].DoClearProperties();
124 switch (this.CurrentStep)
143 throw new NotImplementedException();
156 private static async Task ChangeLanguage()
The Application class, representing an instance of the Neuro-Access app.
static LanguageInfo SelectedLanguage
Selected language.
static readonly LanguageInfo[] SupportedLanguages
Supported languages.
Base class that references services in the app.
static IUiService UiService
Service serializing and managing UI-related tasks.
static ITagProfile TagProfile
TAG Profile service.
A base class for all view models, inheriting from the BindableObject. NOTE: using this class requir...
static void GoToRegistrationStep(RegistrationStep NewStep)
Set a new registration step
A base class view for all registration steps views.
override async Task OnDispose()
Method called when the view is disposed, and will not be used more. Use this method to unregister eve...
void SetPagesContainer(List< BaseRegistrationView > Items)
Adds sub-views
override async Task OnInitialize()
Method called when view is initialized for the first time. Use this method to implement registration ...
RegistrationStep Step
This profile's current registration step.
string? Account
The account name for this profile
RegistrationStep
The different steps of a TAG Profile registration journey.