C# Class Bloom.Edit.PageEditingModel

Show file Open project: BloomBooks/BloomDesktop Class Usage Examples

Public Methods

Method Description
ChangePicture ( string bookFolderPath, ElementProxy imgOrDivWithBackgroundImage, SIL.Windows.Forms.ImageToolbox.PalasoImage imageInfo, IProgress progress ) : void

UpdateMetadataAttributesOnImage ( ElementProxy imgOrDivWithBackgroundImage, SIL.Windows.Forms.ImageToolbox.PalasoImage imageInfo ) : void

Private Methods

Method Description
IsSameFilePath ( string bookFolderPath, UrlPathString src, SIL.Windows.Forms.ImageToolbox.PalasoImage imageInfo ) : bool

Check whether the new image file is the same as the one we already have chosen. (or at least the same pathname in the filesystem)

See https://silbloom.myjetbrains.com/youtrack/issue/BL-2776. If the user goes out of his way to choose the exact same picture file from the original location again, a copy will still be created with a slightly revised name. Cropping a picture also results in a new copy of the file with the revised name. We still need a tool to remove unused picture files from a book's folder. (ie, BL-2351)

Method Details

ChangePicture() public method

public ChangePicture ( string bookFolderPath, ElementProxy imgOrDivWithBackgroundImage, SIL.Windows.Forms.ImageToolbox.PalasoImage imageInfo, IProgress progress ) : void
bookFolderPath string
imgOrDivWithBackgroundImage ElementProxy Can be an XmlElement (during testing)
imageInfo SIL.Windows.Forms.ImageToolbox.PalasoImage
progress IProgress
return void

UpdateMetadataAttributesOnImage() public static method

public static UpdateMetadataAttributesOnImage ( ElementProxy imgOrDivWithBackgroundImage, SIL.Windows.Forms.ImageToolbox.PalasoImage imageInfo ) : void
imgOrDivWithBackgroundImage ElementProxy
imageInfo SIL.Windows.Forms.ImageToolbox.PalasoImage
return void