コード例 #1
0
        public async Task <bool> RefreshAsync()
        {
            bool isOk = true;

            Items        = null;
            ItemsCount   = 0;
            SelectedItem = null;

            try
            {
                PartyViewModel.ShowProgressRing();
                Items = await GetItemsAsync();
            }
            catch (Exception ex)
            {
                Items = new List <PartyModel>();
                StatusError($"Error loading Partys: {ex.Message}");
                LogException("Partys", "Refresh", ex);
                isOk = false;
            }
            finally {
                PartyViewModel.HideProgressRing();
            }

            ItemsCount = Items.Count;
            if (!IsMultipleSelection)
            {
                //  SelectedItem = Items.FirstOrDefault(); // Note : Avoid Auto selection
            }
            NotifyPropertyChanged(nameof(Title));

            return(isOk);
        }
コード例 #2
0
 public PartyListViewModel(IPartyService partyService, ICommonServices commonServices, PartyViewModel partyViewModel) : base(commonServices)
 {
     PartyService   = partyService;
     PartyViewModel = partyViewModel;
 }
コード例 #3
0
 public async void OnSelectedRow(PartyModel model)
 {
     await PartyViewModel.PopulateDetails(model);
 }