This is a migrated thread and some comments may be shown as answers.

SofiaCarRental example and BusyIndicator

1 Answer 28 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Art Kedzierski
Top achievements
Rank 2
Art Kedzierski asked on 02 Jul 2013, 04:22 PM
I'm building a scheduling app that is structured along the lines of your SofiaCarRental example using MVVM and a WCF connection to a SQL database. I'm trying to figure out where I would insert code to trigger a busy indicator for the various repository data operations. For example, when Car and look-up repositories are initially loaded and when appointments for a selected Car are loaded and updated.

I seen a few discussions about BackgroundWorker, but the example is so modularized I'm not sure where I would (or even could) attach an appropriate process.

1 Answer, 1 is accepted

Sort by
0
Art Kedzierski
Top achievements
Rank 2
answered on 02 Jul 2013, 05:34 PM
I figured it out. I wasn't holding my mouth the right way, apparently. Here's an example:

using (EquipmentRepository equipmentRepository = RepositoryFactory.Instance.CreateEquipmentRepository())
{
    this.EquipmentIsBusy = true;
    equipmentRepository.GetEquipment((entitiesOfEquipment) =>
    {
        this.Equipment = new ObservableCollection<Web.Resource>(entitiesOfEquipment.OrderBy(o => o.Name));
        this.EquipmentIsBusy = false;
    });
}
Tags
BusyIndicator
Asked by
Art Kedzierski
Top achievements
Rank 2
Answers by
Art Kedzierski
Top achievements
Rank 2
Share this question
or