Beispiel #1
0
        /// <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));
            }
        }
Beispiel #2
0
        /// <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;
        }
Beispiel #3
0
 public ImageEventArgs(ObjectCodeFile image)
 {
     this.Image = image;
 }