Exemplo n.º 1
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                var items = await DataStore.GetItemsAsync(true);

                foreach (var item in items)
                {
                    ApartmentsJson.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemplo n.º 2
0
 public void RemoveApartment()
 {
     if (ApartmentsJson.Count <= 2)
     {
         LoadItemsCommand.Execute(null);
     }
     ApartmentsJson.RemoveAt(0);
     m_Apartment.DeserializeApart(ApartmentsJson[0]);
 }