/// <summary> /// Get sekce /// </summary> /// <returns></returns> public async Task GetSections() { if (IsBusy) { return; } IsBusy = true; try { Sekces.Clear(); var items = await sekcesService.GetItemsAsync(true); foreach (var item in items) { Sekces.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public void Sekce() { sekcesService = new SekcesService(); var result = Task.Run(async() => await sekcesService.GetItemsAsync()).Result; foreach (var item in result) { Sekces.Add(item); } AddSfTabItems(); }