[Mmclibrary-cvs] mmclibrary/MMCLib2/Core ImageList.cs,1.5,1.6
Brought to you by:
imjimmurphy,
kachalkov
From: Lesley v. Z. <ex...@us...> - 2005-01-19 22:30:50
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28021 Modified Files: ImageList.cs Log Message: Changed a lot of protected variables that where storage for properties to private Index: ImageList.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/ImageList.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ImageList.cs 7 Nov 2004 14:44:36 -0000 1.5 --- ImageList.cs 19 Jan 2005 22:30:40 -0000 1.6 *************** *** 44,56 **** /// hold transparent color /// </summary> ! private static Color _TransparentColor; /// <summary> ! /// get/set the Transparent Color of the new bitmap /// </summary> public static Color TransparentColor { ! get { return _TransparentColor; } ! set { _TransparentColor = value; } } --- 44,56 ---- /// hold transparent color /// </summary> ! private static Color _transparentColor; /// <summary> ! /// get or set the Transparent Color of the new bitmap /// </summary> public static Color TransparentColor { ! get { return _transparentColor; } ! set { _transparentColor = value; } } *************** *** 87,96 **** } ! // MAM: added image caching. Sometimes icons get corrupted and the ! // MMC slows down considerably without it. ! /// <summary> ! /// Image cache. ! /// </summary> ! protected Hashtable LoadedImages = new Hashtable(); /*CSF**************************************************************************************** --- 87,91 ---- } ! private Hashtable _loadedImages = new Hashtable(); /*CSF**************************************************************************************** *************** *** 182,190 **** //Checking if the color differ from default Transparent color //Otherwise set it ! if (_TransparentColor == Color.Transparent) return new Bitmap(s); else { Bitmap bmp = new Bitmap(s); ! bmp.MakeTransparent(_TransparentColor); return bmp; } --- 177,185 ---- //Checking if the color differ from default Transparent color //Otherwise set it ! if (_transparentColor == Color.Transparent) return new Bitmap(s); else { Bitmap bmp = new Bitmap(s); ! bmp.MakeTransparent(_transparentColor); return bmp; } *************** *** 405,409 **** /// <param name="image">Specifies the image to be appended. /// </param> ! public override int Add(object image) { return base.Add(new ImageEntry(image)); --- 400,404 ---- /// <param name="image">Specifies the image to be appended. /// </param> ! [Obsolete]public override int Add(object image) { return base.Add(new ImageEntry(image)); *************** *** 428,436 **** { // MAM: note: we don't flush the cache yet. ! if(this.LoadedImages.ContainsKey(name)) { ! return (int)this.LoadedImages[name]; } else { int retval = base.Add(new ImageEntry(FindImage(name))); ! this.LoadedImages.Add(name, retval); return retval; } --- 423,431 ---- { // MAM: note: we don't flush the cache yet. ! if(_loadedImages.ContainsKey(name)) { ! return (int)_loadedImages[name]; } else { int retval = base.Add(new ImageEntry(FindImage(name))); ! _loadedImages.Add(name, retval); return retval; } *************** *** 455,459 **** public virtual int Add(string name, Color transparentColor) { ! _TransparentColor = transparentColor; return base.Add(new ImageEntry(FindImage(name))); } --- 450,454 ---- public virtual int Add(string name, Color transparentColor) { ! _transparentColor = transparentColor; return base.Add(new ImageEntry(FindImage(name))); } |