Exemple #1
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);
                }
            }
        }
Exemple #2
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);
                }
            }
        }