private async void OnItemSelected(ICategoriesItemVM item) { var categoriesType = Mvx.Resolve <IProductConfigService>().Config.CategoriesType; if (categoriesType == Models.CategoriesType.Mixed && item.IsFolder) { Loading = true; var categories = await CategoriesVmService.LoadItemsFor(item.CategoryID); if (!categories.IsNullOrEmpty() && !categories.All(x => x != null && !x.IsFolder)) { NavigationVmService.NavigateToSSCategory(new CategoryBundle(item.CategoryID, item.Name, Base.Core.Models.Navigation.NavigationType.DoublePush)); Loading = false; return; } Loading = false; } if (item.IsFolder) { NavigationVmService.NavigateToCategory(new CategoryBundle(item.CategoryID, item.Name, Base.Core.Models.Navigation.NavigationType.DoublePush)); } else { NavigationVmService.NavigateToProducts(new ProductsBundle(item.CategoryID, item.Name, string.Empty, Base.Core.Models.Navigation.NavigationType.Push)); } }
protected virtual async void OnValidateCodeExecute() { Loading = true; if (await ResetSmsVmService.VerifyCode(VerifyCode, OnUnbindCTS)) { NavigationVmService.NavigateToNewPassword(new BaseBundle(NavigationType.Push)); } Loading = false; }
protected virtual void OnSelectionChangedExecute() { if (UserSignedIn) { NavigationVmService.NavigateToProfile(new BaseBundle(NavigationType.ClearAndPush)); } else { NavigationVmService.NavigateToAuthorization(new BaseBundle(NavigationType.PresentModal)); } }
protected virtual void OnAutocompleteStart(AutocompleteStartMessage message) { var autocompleteField = AddressFieldsItems.FirstOrDefault(x => x.Id.Equals(message.FieldId)); if (autocompleteField == null) { return; } var dependentFields = AddressFieldsItems.Where(x => autocompleteField.DependentFieldsIds?.Contains(x.Id) ?? false); var dependentFieldsValues = dependentFields?.ToDictionary(x => x.Id, x => x.Value); NavigationVmService.NavigateToOrderFieldAutocomplete(new OrderFieldAutocompleteBundle(autocompleteField, dependentFieldsValues)); }
protected virtual async void OnSignUpExecute() { Loading = true; var check = await SignUpService.SignUp(Items, OnUnbindCTS); if (check != null) { if (check.Successful) { NavigationVmService.NavigateToThanks(new BaseBundle(NavigationType.PresentModal)); } else { Items.ForEach(p => p.Invalid = check.InvalidFieldsIds?.Contains(p.RegistrationField.Id) ?? false); } } Loading = false; }
protected virtual async void OnForgotCmdExecute() { if (IsViewModelPropertiesValid()) { Loading = true; if (await ResetMainVmService.ForgotPassword(Identity, OnUnbindCTS)) { if (Config.IdentifyUserByEmail) { SuccessViewVisible = true; } else { var bundle = new ResetSmsBundle(Identity, Base.Core.Models.Navigation.NavigationType.Push); NavigationVmService.NavigateToResetSms(bundle); } } Loading = false; } }
protected virtual void OnRecoveryPassExecute() { NavigationVmService.NavigateToResetPassword(new BaseBundle(NavigationType.Push)); }
protected virtual void NavigateToRegistrationExecute() { NavigationVmService.NavigateToSignUp(new BaseBundle(NavigationType.Push)); }
protected virtual void NavigateToLoginExecute() { NavigationVmService.NavigateToSignIn(new BaseBundle(NavigationType.Push)); }
private void OnBannerItemSelected(IBannerItemVM item) { NavigationVmService.NavigateTo(item.Deeplink); }
protected virtual void OnMapExecute() { NavigationVmService.NavigateToMap(new Base.Core.Models.Bundle.BaseBundle(Base.Core.Models.Navigation.NavigationType.Push)); }
protected override void OnCatalogExecute() { NavigationVmService.NavigateToMain(new BaseBundle(NavigationType.ClearAndPush)); }