public async Task ShowCategoriesListAndMakeAction(List <string> userSelectesKeywordsNames, Func <IDictionary <int, string>, Action <List <string> > > methodToExecuteAfterCategoriesSelect)
        {
            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.ShowMultiSelectListString(ctx, "Wybierz kategorie", allKeywordsNames, userSelectesKeywordsNames, methodToExecuteAfterCategoriesSelect(allKeywords));
            }
            catch (Exception exc)
            {
                this.progressDialogHelper.CloseProgressDialog();
                AlertsService.ShowLongToast(ctx, "Wyst¹pi³ problem z pobraniem danych. Upewnij siê, ¿e masz dostêp do internetu");
            }
        }
示例#2
0
        public void ShowSizesListAndMakeAction(List <string> userSelectesKeywordsNames, Action <List <ClothSize> > methodToExecuteAfterCategoriesSelect)
        {
            string[] allSizesNames         = GetClothSizeNames();
            Action <List <string> > action = (listString) =>
            {
                var resultList = new List <ClothSize>();
                if (listString.Count != allSizesNames.Length)
                {
                    foreach (var enumValueName in listString)
                    {
                        resultList.Add(enumValueName.GetEnumValueByDisplayName <ClothSize>());
                    }
                }

                methodToExecuteAfterCategoriesSelect(resultList);
            };

            AlertsService.ShowMultiSelectListString(ctx, "Wybierz rozmiary", allSizesNames, userSelectesKeywordsNames, action);
        }