public void DeletePhotos()
 {
     photoService.DeletePhotos(SelectedPhotos);
     SelectedPhotos.Clear();
     IsDeleteDialogVisible = false;
     ReloadData();
 }
 public void MovePhotos(Guid destination)
 {
     directoryService.MovePhotos(SelectedPhotos, destination);
     SelectedPhotos.Clear();
     IsMoveDialogVisible = false;
     DirStructure        = null;
     ReloadData();
 }
 public void SelectAll()
 {
     if (SelectAllChecked)
     {
         SelectedPhotos = photoService.GetAllPhotosIds(CurrentFolder.Id);
     }
     else
     {
         SelectedPhotos.Clear();
     }
 }
Beispiel #4
0
        public async void DeleteSelectedPhotos()
        {
            var result = await Utils.ShowContentDialog("Delete",
                                                       "Are you sure you want to delete all selected photo(s)?", "Yes", "No");

            if (result == CustomContentDialogResult.Primary)
            {
                if (ViewType == ViewType.GridView)
                {
                    SelectedPhotos.ForEach(photo => DeletePhoto(photo));
                }
                else if (ViewType == ViewType.FlipView)
                {
                    DeletePhoto(SelectedPhoto);
                }
            }
        }
Beispiel #5
0
        public async void MoveSelectedPhotos()
        {
            var movePhotosDialog =
                new MovePhotosContentDialog(AlbumsVMManager.Albums.Where(a => a != this));

            ContentDialogResult result = await movePhotosDialog.ShowAsync();

            if (result == ContentDialogResult.Primary)
            {
                var targetAlbum = movePhotosDialog.SelectedAlbum;

                if (ViewType == ViewType.GridView)
                {
                    SelectedPhotos.ForEach(async photo => await MovePhoto(photo, targetAlbum));
                }
                else if (ViewType == ViewType.FlipView)
                {
                    await MovePhoto(SelectedPhoto, targetAlbum);
                }
            }
        }