/// <summary> /// Loads the thumbnails etc on the UI thread due to limitations with BitMapImage in /// Background threads. /// </summary> /// <param name="notUsed"> /// The not used. /// </param> public async void LoadXMLUIItems(object notUsed) { _CommonLogging.RoutineEntry("LoadXMLUIItems"); _commonNotifications.DataLogEntryAdd("Organising data after load"); { { // Called in order of media linkages from Media outwards await OrganiseMediaRepository().ConfigureAwait(false); await OrganiseSourceRepository().ConfigureAwait(false); await OrganiseCitationRepository().ConfigureAwait(false); await OrganiseEventRepository().ConfigureAwait(false); await OrganiseFamilyRepository().ConfigureAwait(false); await OrganiseHeaderRepository().ConfigureAwait(false); await OrganiseNameMapRepository().ConfigureAwait(false); OrganiseNoteRepository(); await OrganisePlaceRepository().ConfigureAwait(false); await OrganiseRepositoryRepository().ConfigureAwait(false); await OrganiseTagRepository().ConfigureAwait(false); await OrganiseAddressRepository().ConfigureAwait(false); await OrganisePersonNameRepository().ConfigureAwait(false); // People last as they pretty much depend on everything else await OrganisePersonRepository().ConfigureAwait(false); // Apart from BookMarks await OrganiseBookMarkRepository().ConfigureAwait(false); // Final cleanup pending use of some sort of dependency graph on the whole thing await OrganiseMisc().ConfigureAwait(false); await _commonNotifications.DataLogHide(); } } _commonNotifications.DataLogEntryAdd(null); _commonNotifications.DataLogEntryAdd("Load XML UI Complete - Data ready for display"); // save the data in a serial format for next time App.Current.Services.GetService <IMessenger>().Send(new DataSaveSerialEvent(true)); // let everybody know we have finished loading data App.Current.Services.GetService <IMessenger>().Send(new DataLoadCompleteEvent(true)); _CommonLogging.RoutineExit(nameof(LoadXMLUIItems)); }
/// <summary> /// Serializes the repositories asynchronous. /// </summary> /// <param name="value"> /// The value. /// </param> public async void SerializeRepositoriesAsync(object value) { _commonNotifications.DataLogEntryAdd("Serialising Data"); await _StoreSerial.SerializeObject(DataStore.Instance.DS); CommonLocalSettings.DataSerialised = true; }