public async Task ShowCategoriesSingleSelectAndMakeAction(Action <int, string> actionOnSelect, string selectedItemName = null)
        {
            try
            {
                this.progressDialogHelper.ShowProgressDialog("Trwa pobieranie danych");
                var allKeywords = await this.categoryService.GetCategories();

                var allKeywordsNames = allKeywords.Select(k => k.Value).ToArray();
                this.progressDialogHelper.CloseProgressDialog();
                AlertsService.ShowSingleSelectListString(ctx, allKeywordsNames, s => actionOnSelect(allKeywords.First(v => v.Value == s).Key, s), selectedItemName, "Wybierz kategoriê");
            }
            catch (Exception exc)
            {
                AlertsService.ShowLongToast(ctx, "Wyst¹pi³ problem z pobraniem danych. Upewnij siê, ¿e masz dostêp do internetu: " + exc);
                this.progressDialogHelper.CloseProgressDialog();
            }
        }
Пример #2
0
        public void ShowSizeSingleSelectAndMakeAction(Action <ClothSize> actionOnSelect, string selectedItemName = null)
        {
            var allSizesNames = GetClothSizeNames();

            AlertsService.ShowSingleSelectListString(ctx, allSizesNames, (s) => actionOnSelect(s.GetEnumValueByDisplayName <ClothSize>()), selectedItemName, "Wybierz rozmiar");
        }