private void HandleImageRenaming(bool allowTagBasedNaming, DirectoryInfo moveDirectory = null) { List <ImageType> filter = new List <ImageType>(); if (OptionsData.ThemeOptions.ExcludeRenamingStatic) { filter.Add(ImageType.Static); } if (OptionsData.ThemeOptions.ExcludeRenamingGif) { filter.Add(ImageType.GIF); } if (OptionsData.ThemeOptions.ExcludeRenamingVideo) { filter.Add(ImageType.Video); } switch (WallpaperManagerTools.ChooseSelectionType()) { case SelectionType.Active: if (InspectedImage != "") { if (WallpaperData.ContainsImage(InspectedImage)) { int imageIndex = selectedImages.IndexOf(InspectedImage); string[] newName = ImagePathing.RenameImage(InspectedImage, moveDirectory, allowTagBasedNaming); if (newName != null && newName.Length > 0) // this can occur if the given image is not able to be named { selectedImages[imageIndex] = newName[0]; // there will only be one entry in this array, the renamed image } } else { MessageBox.Show("Invalid image"); } } else { MessageBox.Show("There is no image selected"); } break; case SelectionType.All: if (MessageBox.Show("Are you sure you want to rename ALL " + selectedImages.Length + " selected images?", "Choose an option", MessageBoxButtons.YesNo) == DialogResult.Yes) { // Doing this will require a rebuild of the image selector to keep it in tact RebuildImageSelector(ImagePathing.RenameImages(selectedImages, moveDirectory, allowTagBasedNaming), false); } break; } }
private void buttonDeleteImage_Click(object sender, EventArgs e) { //! ADD A WARNING THAT LETS THE USER KNOW THAT THEY'LL BE REMOVING THE ACTUAL FILES (Which should get move to the recycling bin) //! ADD A WARNING THAT LETS THE USER KNOW THAT THEY'LL BE REMOVING THE ACTUAL FILES (Which should get move to the recycling bin) //! ADD A WARNING THAT LETS THE USER KNOW THAT THEY'LL BE REMOVING THE ACTUAL FILES (Which should get move to the recycling bin) if (selectedImages != null) { switch (WallpaperManagerTools.ChooseSelectionType()) { case SelectionType.Active: MessageBox.Show("Selected [This function is currently in development]"); break; case SelectionType.All: MessageBox.Show("All [This function is currently in development]"); break; } } else { MessageBox.Show("There are no images selected to delete"); } }