async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Items.Clear(); var coinList = await CoinDataStore.GetCoinMarketDataAsync(true); if (coinList != null) { foreach (var c in coinList) { var i = new Item() { Text = c.name, Description = c.Description }; Items.Add(i); } } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Items.Clear(); var coinList = await CoinDataStore.GetItemsAsync(true); if (coinList != null) { var orderedList = coinList.OrderBy(x => x.SortOrder).ToList(); for (int i = 0; i < 100; i++) //foreach (var c in coinList) { Items.Add(orderedList[i]); //Items.Add(c); } } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public async Task LoadItems() { if (IsBusy) { return; } IsBusy = true; IsNotBusy = false; try { var coinDetailResult = await CoinDataStore.GetCoinDetailsAsync(ItemId); if (coinDetailResult.Response == "Success") { CoinDetails = coinDetailResult; } else { // inform about no result with msg/box } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; IsNotBusy = true; } }