Ejemplo n.º 1
0
        public void deleteImage(string imagePath)
        {
            string            message = "Do you want to delete this image?";
            string            caption = "Confirmation of deletion";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;

            DialogResult result = MessageBox.Show(message, caption, buttons);

            if (result == DialogResult.Yes)
            {
                MoveDeleteImage moveDeleteImage = new MoveDeleteImage();
                moveDeleteImage.DeleteImage(imagePath);
            }
        }
Ejemplo n.º 2
0
        private void AutoMoveOrDelete()
        {
            MoveDeleteImage moveDeleteImage = new MoveDeleteImage();

            if (imageParameters.DeleteRequire)
            {
                imageParameters.MainForm.RemoveRightImage();
                imageParameters.MainForm.RightInfoImage.Bitmap = null;

                moveDeleteImage.DeleteImage(imageParameters.MainForm.RightInfoImage.Path);
                imageParameters.MainForm.RightInfoImage.DeletedOrMove = true;
            }
            else
            {
                imageParameters.MainForm.RemoveRightImage();
                imageParameters.MainForm.RightInfoImage.Bitmap = null;

                moveDeleteImage.MoveImage(imageParameters.MainForm.RightInfoImage.Path, imageParameters.FolderPath, imageParameters.MainForm.RightInfoImage.Name);
                imageParameters.MainForm.RightInfoImage.DeletedOrMove = true;
            }
        }