Ejemplo n.º 1
0
        private async Task refreshListing(IDrive panelModel)
        {
            //try
            //{
            panelModel.FileCollection.Clear();

            var listing = await panelModel.GetListingAsync();      //it will still block current thead which is UI thread

            var sortedListing = from i in listing
                                orderby i.IsDirectory descending, i.Title ascending
            select i;

            foreach (var item in sortedListing)
            {
                panelModel.FileCollection.Add(item);
            }
            //}
            //catch (Exception e)
            //{
            //    await ShowAlert(e);
            //}
        }
Ejemplo n.º 2
0
        private async Task refreshListing(IDrive panelModel)
        {
            //try
            //{ 
                panelModel.FileCollection.Clear();

                var listing = await panelModel.GetListingAsync();  //it will still block current thead which is UI thread
                var sortedListing = from i in listing
                                    orderby i.IsDirectory descending, i.Title ascending
                                    select i;

                foreach (var item in sortedListing)
                    panelModel.FileCollection.Add(item);
            //}
            //catch (Exception e)
            //{
            //    await ShowAlert(e);
            //}
        }