/// <summary> /// Load the the new GRAMPS data. /// </summary> /// <returns> /// True if the load is successful or False if not. /// </returns> public async Task <bool> TriggerLoadGRAMPSFileAsync(bool deleteOld) { FileInfoEx fileGrampsDataInput = await StoreFolder.FolderGetFileAsync(DataStore.AD.CurrentDataFolder, CommonConstants.StorageGRAMPSFileName).ConfigureAwait(false); if (fileGrampsDataInput != null) { if (deleteOld) { // TODO fix this //await localStoreFile.DataStorageInitialiseAsync(DataStore.AD.CurrentDataFolder).ConfigureAwait(false); } await localStoreFile.DecompressGZIP(fileGrampsDataInput).ConfigureAwait(false); // Save the current Index File modified date for later checking //StoreFileNames.SaveFileModifiedSinceLastSave(CommonConstants.SettingsGPRAMPSFileLastDateTimeModified, CommonConstants.StorageGRAMPSFileName); StoreFileNames.SaveFileModifiedSinceLastSave(CommonConstants.SettingsGPRAMPSFileLastDateTimeModified, fileGrampsDataInput); } await DataStore.CN.MajorStatusDelete().ConfigureAwait(false); await DataStore.CN.ChangeLoadingMessage(null).ConfigureAwait(false); return(false); }
/// <summary> /// Load the the new GRAMPS data. /// </summary> /// <returns> /// True if the load is successful or False if not. /// </returns> public async Task <bool> TriggerLoadGRAMPSFileAsync(bool deleteOld) { IFileInfoEx fileGrampsDataInput = new FileInfoEx(argFileName: Common.Constants.StorageGRAMPSFileName); if (fileGrampsDataInput != null) { if (deleteOld) { // TODO fix this //await localStoreFile.DataStorageInitialiseAsync(DataStore.Instance.AD.CurrentDataFolder).ConfigureAwait(false); } _StoreFile.DecompressGZIP(fileGrampsDataInput); // Save the current Index File modified date for later checking CommonLocalSettings.SaveLastWriteToSettings(fileGrampsDataInput, Common.Constants.SettingsGPRAMPSFileLastDateTimeModified); } return(false); }