Esempio n. 1
0
        /// <summary>
        /// An event handler for listening to completion of the different registration steps.
        /// </summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The default event args.</param>
        protected internal void RegistrationStep_Completed(object sender, EventArgs e)
        {
            RegistrationStep step = ((RegistrationStepViewModel)sender).Step;

            switch (step)
            {
            case RegistrationStep.Account:
                // User connected to an existing account (as opposed to creating a new one). Copy values from the legal identity.
                if (!(this.tagProfile.LegalIdentity is null))
                {
                    RegisterIdentityViewModel vm = (RegisterIdentityViewModel)this.RegistrationSteps[(int)RegistrationStep.RegisterIdentity];
                    vm.PopulateFromTagProfile();
                }
                SyncTagProfileStep();
                break;

            case RegistrationStep.RegisterIdentity:
                SyncTagProfileStep();
                break;

            case RegistrationStep.ValidateIdentity:
                SyncTagProfileStep();
                break;

            case RegistrationStep.Pin:
                this.navigationService.GoToAsync($"///{nameof(MainPage)}");
                break;

            default:     // RegistrationStep.Operator
                SyncTagProfileStep();
                break;
            }
        }
Esempio n. 2
0
        private void GoToPrev()
        {
            RegistrationStep currStep = (RegistrationStep)CurrentStep;

            switch (currStep)
            {
            case RegistrationStep.Account:
                this.RegistrationSteps[CurrentStep].ClearStepState();
                this.tagProfile.ClearAccount();
                break;

            case RegistrationStep.RegisterIdentity:
                this.RegistrationSteps[CurrentStep].ClearStepState();
                this.tagProfile.ClearLegalIdentity();
                break;

            case RegistrationStep.ValidateIdentity:
                RegisterIdentityViewModel vm = (RegisterIdentityViewModel)this.RegistrationSteps[(int)RegistrationStep.RegisterIdentity];
                vm.PopulateFromTagProfile();
                this.RegistrationSteps[CurrentStep].ClearStepState();
                this.tagProfile.ClearIsValidated();
                break;

            case RegistrationStep.Pin:
                this.RegistrationSteps[CurrentStep].ClearStepState();
                this.tagProfile.ClearPin();
                break;

            default:     // RegistrationStep.Operator
                this.tagProfile.ClearDomain();
                break;
            }

            SyncTagProfileStep();
        }
        private static void OnPropertyChanged(BindableObject b, object oldValue, object newValue)
        {
            RegisterIdentityViewModel viewModel = (RegisterIdentityViewModel)b;

            viewModel.RegisterCommand.ChangeCanExecute();
        }