Exemplo n.º 1
0
        async void ExecuteLoadTrucksCommand()
        {
            try
            {
                Drivers.Clear();
                var drivers = await DriverStore.GetDriversAsync(true);

                Drivers.ReplaceRange(drivers);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                MessagingCenter.Send(new MessagingCenterAlert
                {
                    Title   = "Error",
                    Message = "Unable to load Trucks.",
                    Cancel  = "OK"
                }, "message");
            }
        }