Пример #1
0
        public async Task ReplaceSelectedSightFileAsync(SightFile replacement)
        {
            // Delete in the database
            await _dataModelService.DeleteSightFileAsync(SelectedSightFile);

            // And save the replacement
            await _dataModelService.SaveSightFileAsync(replacement);


            // Replace the current version with the updated one
            int position = CurrentSightFiles.IndexOf(SelectedSightFile);

            CurrentSightFiles.Insert(position, replacement);
            CurrentSightFiles.RemoveAt(position + 1);
            SightImage = replacement.ImageUri;
        }
Пример #2
0
 public async Task SaveSightFileAsync(SightFile sightFile)
 {
     CurrentSight.SightFiles.Add(sightFile);
     CurrentSightFiles.Add(sightFile);
     await _dataModelService.SaveSightFileAsync(sightFile);
 }