// Add Tag To Images private void AddTagToImages(string[] targetImages) { if (targetImages.Length > 0) { string unincludedImages = "The following images you attempted to tag are not included:"; foreach (string image in targetImages) { if (WallpaperData.ContainsImage(image)) { WallpaperData.GetImageData(image).AddTag(WallpaperData.TaggingInfo.GetTagParentCategory(activeTag), activeTag.Name); } else { unincludedImages += "\n" + image; } } if (unincludedImages.Contains("\n")) { MessageBox.Show(unincludedImages); } } else { MessageBox.Show("There are no images to tag"); } }
// Remove Tag From Images private void RemoveTagFromImages(string[] targetImages, Button tagButton) { if (MessageBox.Show("Remove tag from all selected images?", "Choose an option", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (targetImages.Length > 0) { string unincludedImages = "The following images you attempted to remove a tag from are not included:"; foreach (string image in targetImages) { if (WallpaperData.ContainsImage(image)) { WallpaperData.GetImageData(image).RemoveTag(activeTag); } else { unincludedImages += "\n" + image; } } if (unincludedImages.Contains("\n")) { MessageBox.Show(unincludedImages); } } else { MessageBox.Show("There are no images selected to remove this tag from"); } } }
// Add Tag To Image private void AddTagToImage(string targetImage) { if (WallpaperData.ContainsImage(targetImage)) { WallpaperData.GetImageData(targetImage).AddTag(WallpaperData.TaggingInfo.GetTagParentCategory(activeTag), activeTag.Name); } else { MessageBox.Show("The image you attempted to tag is not included"); } }
// Remove Tag From Image private void RemoveTagFromImage(string targetImage, Button tagButton) { if (MessageBox.Show("Remove tag from active image?", "Choose an option", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (WallpaperData.ContainsImage(targetImage)) { WallpaperData.GetImageData(targetImage).RemoveTag(activeTag); } else { MessageBox.Show("The image you attempted to remove a tag from is not included"); } } }