async Task ExecuteLoadPlayersCommand() { if (IsBusy) { return; } IsBusy = true; try { Players.Clear(); var players = await PlayerDataStore.GetItemsAsync(true); foreach (var player in players) { Players.Add(player); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
async Task ExecuteLoadItemsCommand(int spotId) { if (IsBusy) { return; } IsBusy = true; try { Items.Clear(); var items = await PlayerDataStore.GetItemsAsync(spotId); foreach (var item in items) { Items.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }