/// <summary> /// Includes the given ObjectCodeFile in the list of /// current session images. /// </summary> /// <param name="file">The image to include.</param> public void IncludeImage(ObjectCodeFile image) { if (this.IsFrozen) throw new ObjectFrozenException(); this.loadedImages.Add(image); if (this.ImageLoaded != null) { this.ImageLoaded(this, new ImageEventArgs(image)); } }
/// <summary> /// Removes the given ObjectCodeFile from the list of /// current session images. /// </summary> /// <param name="file">The image to remove.</param> /// <returns>True if removed, false if the item was not present.</returns> public bool RemoveImage(ObjectCodeFile image) { if (this.IsFrozen) throw new ObjectFrozenException(); bool res = this.loadedImages.Remove(image); if (this.ImageRemoved != null) { this.ImageRemoved(this, new ImageEventArgs(image)); } return res; }
public ImageEventArgs(ObjectCodeFile image) { this.Image = image; }