//todo: если поставить фокус в строку поиска и ввести запрос //для товара который не отображен на экране //то выделение переместится к этому товару но прокрутка не будет произведена public IResult EnterCatalogName() { if (CurrentCatalogName.Value == null || Catalogs.Value.Count == 0) { return(null); } if (!ParentModel.ViewOffersByCatalog) { if (!CurrentCatalogName.Value.HaveOffers) { return(new ShowPopupResult(() => ParentModel.ShowOrderHistory())); } Shell.Navigate(new CatalogOfferViewModel(CurrentCatalogName.Value)); return(null); } if (Catalogs.Value.Count == 1) { CurrentCatalog = Catalogs.Value.First(); return(EnterCatalog()); } return(new FocusResult("Catalogs")); }
public IResult EnterItem() { if (CurrentItem.Value == null) { return(null); } if (!CurrentItem.Value.HaveOffers) { return(new ShowPopupResult(() => ParentModel.ShowOrderHistory())); } Shell.Navigate(new CatalogOfferViewModel(CurrentItem.Value.CatalogId)); return(null); }
public IResult EnterCatalog() { if (CurrentCatalog == null) { return(null); } if (ParentModel.Mode == CatalogViewMode.Basic) { if (!CurrentCatalog.HaveOffers) { return(new ShowPopupResult(() => ParentModel.ShowOrderHistory())); } Shell.Navigate(new CatalogOfferViewModel(CurrentCatalog)); } else if (ParentModel.Mode == CatalogViewMode.CatalogSelector) { ParentModel.CatalogSelector(CurrentCatalog); } return(null); }