public async void DeleteMeme()
        {
            try
            {
                await _databaseService.DeleteMeme(ImageCollection[ImageIndex]);

                ImageCollection.RemoveAt(ImageIndex);
            }
            catch { _toastMessage.ShowToast(picNotFoundMessage); }
        }
Exemplo n.º 2
0
        private void miImageDelete_Click(object sender, EventArgs e)
        {
            for (int i = tViewer.Items.Count - 1; i >= 0; i--)
            {
                if (tViewer.Items[i].Selected)
                {
                    tViewer.Items.RemoveAt(i);
                    ScannedImages.RemoveAt(i);
                }
            }

            RefreshView();
        }
        public bool DeleteRecordFromRepo(string fileName)
        {
            if (fileName == null)
            {
                throw new Exception("Filename cannot be null");
            }

            int index = 0;

            while (index < ImageCollection.Count)
            {
                if (ImageCollection[index].FileName == fileName)
                {
                    ImageCollection.RemoveAt(index);
                    break;
                }
                index++;
            }
            return(EditSuccess);
        }