2009-04-19 18:07:22 +00:00
#region = = = = = = = = = = = = = = = = = = Copyright ( c ) 2007 Pascal vd Heiden
/ *
* Copyright ( c ) 2007 Pascal vd Heiden , www . codeimp . com
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* /
#endregion
#region = = = = = = = = = = = = = = = = = = Namespaces
using System ;
using System.Drawing ;
2015-05-27 12:38:03 +00:00
using System.Drawing.Drawing2D ;
2009-04-19 18:07:22 +00:00
using System.Drawing.Imaging ;
using System.IO ;
using System.Runtime.InteropServices ;
2015-05-27 12:38:03 +00:00
using CodeImp.DoomBuilder.Geometry ;
using CodeImp.DoomBuilder.IO ;
using CodeImp.DoomBuilder.Rendering ;
2009-04-19 18:07:22 +00:00
using CodeImp.DoomBuilder.Windows ;
2015-05-27 12:38:03 +00:00
using SlimDX ;
using SlimDX.Direct3D9 ;
2009-04-19 18:07:22 +00:00
#endregion
namespace CodeImp.DoomBuilder.Data
{
public abstract unsafe class ImageData
{
#region = = = = = = = = = = = = = = = = = = Constants
#endregion
#region = = = = = = = = = = = = = = = = = = Variables
// Properties
2014-11-25 11:52:01 +00:00
protected string name ;
protected long longname ;
2009-04-19 18:07:22 +00:00
protected int width ;
protected int height ;
2010-01-02 20:22:05 +00:00
protected Vector2D scale ;
2010-05-08 13:14:48 +00:00
protected bool worldpanning ;
2014-11-25 11:52:01 +00:00
private bool usecolorcorrection ;
protected string fullname ; //mxd. name with path;
2014-12-03 09:06:05 +00:00
protected string shortname ; //mxd. Name in uppercase and clamped to DataManager.CLASIC_IMAGE_NAME_LENGTH
protected string virtualname ; //mxd. Path of this name is used in TextureBrowserForm
protected string displayname ; //mxd. Name to display in TextureBrowserForm
2013-03-26 12:31:07 +00:00
protected bool isFlat ; //mxd. if false, it's a texture
2015-09-27 21:09:14 +00:00
protected bool istranslucent ; //mxd
2014-11-25 11:52:01 +00:00
protected bool hasLongName ; //mxd. Texture name is longer than DataManager.CLASIC_IMAGE_NAME_LENGTH
2014-07-15 08:08:57 +00:00
protected bool hasPatchWithSameName ; //mxd
2015-09-16 12:10:43 +00:00
protected int level ; //mxd. Folder depth of this item
2015-10-02 14:47:34 +00:00
//mxd. Hashing
private static int hashcounter ;
private readonly int hashcode ;
2009-04-19 18:07:22 +00:00
// Loading
private volatile ImageLoadState previewstate ;
private volatile ImageLoadState imagestate ;
private volatile int previewindex ;
protected volatile bool loadfailed ;
2010-08-11 20:32:14 +00:00
private volatile bool allowunload ;
2009-04-19 18:07:22 +00:00
// References
private volatile bool usedinmap ;
private volatile int references ;
// GDI bitmap
protected Bitmap bitmap ;
// Direct3D texture
2014-02-21 14:42:12 +00:00
private int mipmaplevels ; // 0 = all mipmaps
2012-06-01 19:53:14 +00:00
protected bool dynamictexture ;
2009-04-19 18:07:22 +00:00
private Texture texture ;
// Disposing
2014-02-21 14:42:12 +00:00
protected bool isdisposed ;
2009-04-19 18:07:22 +00:00
#endregion
#region = = = = = = = = = = = = = = = = = = Properties
public string Name { get { return name ; } }
public long LongName { get { return longname ; } }
2014-12-03 09:06:05 +00:00
public string ShortName { get { return shortname ; } } //mxd
2014-11-25 11:52:01 +00:00
public string FullName { get { return fullname ; } } //mxd
public string VirtualName { get { return virtualname ; } } //mxd
public string DisplayName { get { return displayname ; } } //mxd
public bool IsFlat { get { return isFlat ; } } //mxd
2015-09-27 21:09:14 +00:00
public bool IsTranslucent { get { return istranslucent ; } } //mxd
2014-07-15 08:08:57 +00:00
public bool HasPatchWithSameName { get { return hasPatchWithSameName ; } } //mxd
2014-12-03 09:06:05 +00:00
internal bool HasLongName { get { return hasLongName ; } } //mxd
2009-04-19 18:07:22 +00:00
public bool UseColorCorrection { get { return usecolorcorrection ; } set { usecolorcorrection = value ; } }
public Texture Texture { get { lock ( this ) { return texture ; } } }
public bool IsPreviewLoaded { get { return ( previewstate = = ImageLoadState . Ready ) ; } }
public bool IsImageLoaded { get { return ( imagestate = = ImageLoadState . Ready ) ; } }
public bool LoadFailed { get { return loadfailed ; } }
public bool IsDisposed { get { return isdisposed ; } }
2010-08-11 20:32:14 +00:00
public bool AllowUnload { get { return allowunload ; } set { allowunload = value ; } }
2009-04-19 18:07:22 +00:00
public ImageLoadState ImageState { get { return imagestate ; } internal set { imagestate = value ; } }
public ImageLoadState PreviewState { get { return previewstate ; } internal set { previewstate = value ; } }
public bool IsReferenced { get { return ( references > 0 ) | | usedinmap ; } }
public bool UsedInMap { get { return usedinmap ; } }
public int MipMapLevels { get { return mipmaplevels ; } set { mipmaplevels = value ; } }
public int Width { get { return width ; } }
public int Height { get { return height ; } }
internal int PreviewIndex { get { return previewindex ; } set { previewindex = value ; } }
2015-10-16 08:32:42 +00:00
//mxd. Scaled texture size is integer in ZDoom.
public float ScaledWidth { get { return ( float ) Math . Round ( width * scale . x ) ; } }
public float ScaledHeight { get { return ( float ) Math . Round ( height * scale . y ) ; } }
2010-01-02 20:22:05 +00:00
public Vector2D Scale { get { return scale ; } }
2010-05-08 13:14:48 +00:00
public bool WorldPanning { get { return worldpanning ; } }
2015-09-16 12:10:43 +00:00
public int Level { get { return level ; } } //mxd
2009-04-19 18:07:22 +00:00
#endregion
#region = = = = = = = = = = = = = = = = = = Constructor / Disposer
// Constructor
2015-05-27 12:38:03 +00:00
protected ImageData ( )
2009-04-19 18:07:22 +00:00
{
// Defaults
usecolorcorrection = true ;
2010-08-11 20:32:14 +00:00
allowunload = true ;
2015-10-02 14:47:34 +00:00
//mxd. Hashing
hashcode = hashcounter + + ;
2009-04-19 18:07:22 +00:00
}
// Destructor
~ ImageData ( )
{
this . Dispose ( ) ;
}
// Disposer
public virtual void Dispose ( )
{
// Not already disposed?
if ( ! isdisposed )
{
lock ( this )
{
// Clean up
if ( bitmap ! = null ) bitmap . Dispose ( ) ;
if ( texture ! = null ) texture . Dispose ( ) ;
bitmap = null ;
texture = null ;
// Done
usedinmap = false ;
imagestate = ImageLoadState . None ;
previewstate = ImageLoadState . None ;
isdisposed = true ;
}
}
}
#endregion
#region = = = = = = = = = = = = = = = = = = Management
// This sets the status of the texture usage in the map
internal void SetUsedInMap ( bool used )
{
if ( used ! = usedinmap )
{
usedinmap = used ;
General . Map . Data . ProcessImage ( this ) ;
}
}
// This adds a reference
public void AddReference ( )
{
references + + ;
if ( references = = 1 ) General . Map . Data . ProcessImage ( this ) ;
}
// This removes a reference
public void RemoveReference ( )
{
references - - ;
if ( references < 0 ) General . Fail ( "FAIL! (references < 0) Somewhere this image is dereferenced more than it was referenced." ) ;
if ( references = = 0 ) General . Map . Data . ProcessImage ( this ) ;
}
// This sets the name
2014-11-25 11:52:01 +00:00
protected virtual void SetName ( string name )
2009-04-19 18:07:22 +00:00
{
this . name = name ;
2014-11-25 11:52:01 +00:00
this . fullname = name ; //mxd
2014-12-03 09:06:05 +00:00
this . shortname = name ; //mxd
2014-11-25 11:52:01 +00:00
this . virtualname = name ; //mxd
this . displayname = name ; //mxd
this . longname = Lump . MakeLongName ( name ) ; //mxd
2009-04-19 18:07:22 +00:00
}
// This unloads the image
public virtual void UnloadImage ( )
{
lock ( this )
{
if ( bitmap ! = null ) bitmap . Dispose ( ) ;
bitmap = null ;
imagestate = ImageLoadState . None ;
}
}
// This returns the bitmap image
public Bitmap GetBitmap ( )
{
lock ( this )
{
// Image loaded successfully?
if ( ! loadfailed & & ( imagestate = = ImageLoadState . Ready ) & & ( bitmap ! = null ) )
return bitmap ;
2014-11-25 11:52:01 +00:00
2009-04-19 18:07:22 +00:00
// Image loading failed?
2014-11-25 11:52:01 +00:00
return ( loadfailed ? Properties . Resources . Failed : Properties . Resources . Hourglass ) ;
2009-04-19 18:07:22 +00:00
}
}
// This loads the image
Model rendering (all modes): UDMF scale, pitch and roll are now displayed.
Thing Edit Form, UDMF: added controls for setting pitch, roll, scale, render style, fill color, alpha, health and score.
Visual mode, UDMF: UDMF scale is now applied when rendering sprites.
Added Thing Statistics form (Edit -> View Thing Types...), which shows all loaded thing types with some additional info.
Visual mode: sprites with negative ScaleX and positive ScaleY were not rendered properly.
Classic modes: display was not updated after loading a sprite.
Current testing engine change was not saved on closing the program when no other game configuration settings were changed.
2014-04-30 10:01:22 +00:00
public virtual void LoadImage ( )
2009-04-19 18:07:22 +00:00
{
// Do the loading
LocalLoadImage ( ) ;
2010-01-02 20:22:05 +00:00
// Notify the main thread about the change so that sectors can update their buffers
IntPtr strptr = Marshal . StringToCoTaskMemAuto ( this . name ) ;
General . SendMessage ( General . MainWindow . Handle , ( int ) MainForm . ThreadMessages . ImageDataLoaded , strptr . ToInt32 ( ) , 0 ) ;
2009-04-19 18:07:22 +00:00
}
// This requests loading the image
protected virtual void LocalLoadImage ( )
{
lock ( this )
{
// Bitmap loaded successfully?
if ( bitmap ! = null )
{
// Bitmap has incorrect format?
if ( bitmap . PixelFormat ! = PixelFormat . Format32bppArgb )
{
2012-06-01 19:53:14 +00:00
if ( dynamictexture )
throw new Exception ( "Dynamic images must be in 32 bits ARGB format." ) ;
2009-04-19 18:07:22 +00:00
//General.ErrorLogger.Add(ErrorType.Warning, "Image '" + name + "' does not have A8R8G8B8 pixel format. Conversion was needed.");
Bitmap oldbitmap = bitmap ;
try
{
// Convert to desired pixel format
bitmap = new Bitmap ( oldbitmap . Size . Width , oldbitmap . Size . Height , PixelFormat . Format32bppArgb ) ;
Graphics g = Graphics . FromImage ( bitmap ) ;
g . PageUnit = GraphicsUnit . Pixel ;
g . CompositingQuality = CompositingQuality . HighQuality ;
g . InterpolationMode = InterpolationMode . NearestNeighbor ;
g . SmoothingMode = SmoothingMode . None ;
g . PixelOffsetMode = PixelOffsetMode . None ;
g . Clear ( Color . Transparent ) ;
g . DrawImage ( oldbitmap , 0 , 0 , oldbitmap . Size . Width , oldbitmap . Size . Height ) ;
g . Dispose ( ) ;
oldbitmap . Dispose ( ) ;
}
catch ( Exception e )
{
bitmap = oldbitmap ;
2009-05-10 16:02:08 +00:00
General . ErrorLogger . Add ( ErrorType . Warning , "Cannot lock image '" + name + "' for pixel format conversion. The image may not be displayed correctly.\n" + e . GetType ( ) . Name + ": " + e . Message ) ;
2009-04-19 18:07:22 +00:00
}
}
// This applies brightness correction on the image
if ( usecolorcorrection )
{
2014-11-25 11:52:01 +00:00
BitmapData bmpdata = null ;
2009-04-19 18:07:22 +00:00
try
{
// Try locking the bitmap
bmpdata = bitmap . LockBits ( new Rectangle ( 0 , 0 , bitmap . Size . Width , bitmap . Size . Height ) , ImageLockMode . ReadWrite , PixelFormat . Format32bppArgb ) ;
}
catch ( Exception e )
{
2009-05-10 16:02:08 +00:00
General . ErrorLogger . Add ( ErrorType . Warning , "Cannot lock image '" + name + "' for color correction. The image may not be displayed correctly.\n" + e . GetType ( ) . Name + ": " + e . Message ) ;
2009-04-19 18:07:22 +00:00
}
// Bitmap locked?
if ( bmpdata ! = null )
{
// Apply color correction
PixelColor * pixels = ( PixelColor * ) ( bmpdata . Scan0 . ToPointer ( ) ) ;
2015-09-27 21:09:14 +00:00
General . Colors . ApplyColorCorrection ( pixels , bmpdata . Width * bmpdata . Height ) ;
2009-04-19 18:07:22 +00:00
bitmap . UnlockBits ( bmpdata ) ;
}
}
}
else
{
// Loading failed
// We still mark the image as ready so that it will
// not try loading again until Reload Resources is used
loadfailed = true ;
bitmap = new Bitmap ( Properties . Resources . Failed ) ;
}
if ( bitmap ! = null )
{
width = bitmap . Size . Width ;
height = bitmap . Size . Height ;
2012-06-01 19:53:14 +00:00
if ( dynamictexture )
{
if ( ( width ! = General . NextPowerOf2 ( width ) ) | | ( height ! = General . NextPowerOf2 ( height ) ) )
throw new Exception ( "Dynamic images must have a size in powers of 2." ) ;
}
2009-04-19 18:07:22 +00:00
// Do we still have to set a scale?
2010-01-02 20:22:05 +00:00
if ( ( scale . x = = 0.0f ) & & ( scale . y = = 0.0f ) )
2009-04-19 18:07:22 +00:00
{
if ( ( General . Map ! = null ) & & ( General . Map . Config ! = null ) )
{
2010-01-02 20:22:05 +00:00
scale . x = General . Map . Config . DefaultTextureScale ;
scale . y = General . Map . Config . DefaultTextureScale ;
2009-04-19 18:07:22 +00:00
}
else
{
2010-01-02 20:22:05 +00:00
scale . x = 1.0f ;
scale . y = 1.0f ;
2009-04-19 18:07:22 +00:00
}
}
2015-04-14 11:33:57 +00:00
//mxd. Calculate average color?
if ( General . Map ! = null & & General . Map . Data ! = null & & General . Map . Data . GlowingFlats ! = null & &
General . Map . Data . GlowingFlats . ContainsKey ( longname ) & &
General . Map . Data . GlowingFlats [ longname ] . CalculateTextureColor )
{
BitmapData bmpdata = null ;
2015-09-27 21:09:14 +00:00
try { bmpdata = bitmap . LockBits ( new Rectangle ( 0 , 0 , bitmap . Size . Width , bitmap . Size . Height ) , ImageLockMode . ReadWrite , PixelFormat . Format32bppArgb ) ; }
catch ( Exception e ) { General . ErrorLogger . Add ( ErrorType . Error , "Cannot lock image '" + this . fullname + "' for glow color calculation. " + e . GetType ( ) . Name + ": " + e . Message ) ; }
2015-04-14 11:33:57 +00:00
if ( bmpdata ! = null )
{
PixelColor * pixels = ( PixelColor * ) ( bmpdata . Scan0 . ToPointer ( ) ) ;
int numpixels = bmpdata . Width * bmpdata . Height ;
uint r = 0 ;
uint g = 0 ;
uint b = 0 ;
for ( PixelColor * cp = pixels + numpixels - 1 ; cp > = pixels ; cp - - )
{
r + = cp - > r ;
g + = cp - > g ;
b + = cp - > b ;
2015-09-27 21:09:14 +00:00
// Also check alpha
if ( cp - > a > 0 & & cp - > a < 255 ) istranslucent = true ;
2015-04-14 11:33:57 +00:00
}
// Update glow data
int br = ( int ) ( r / numpixels ) ;
int bg = ( int ) ( g / numpixels ) ;
int bb = ( int ) ( b / numpixels ) ;
int max = Math . Max ( br , Math . Max ( bg , bb ) ) ;
// Black can't glow...
if ( max = = 0 )
{
General . Map . Data . GlowingFlats . Remove ( longname ) ;
}
else
{
// That's how it's done in GZDoom (and I may be totally wrong about this)
br = Math . Min ( 255 , br * 153 / max ) ;
bg = Math . Min ( 255 , bg * 153 / max ) ;
bb = Math . Min ( 255 , bb * 153 / max ) ;
General . Map . Data . GlowingFlats [ longname ] . Color = new PixelColor ( 255 , ( byte ) br , ( byte ) bg , ( byte ) bb ) ;
General . Map . Data . GlowingFlats [ longname ] . CalculateTextureColor = false ;
2015-10-02 14:47:34 +00:00
if ( ! General . Map . Data . GlowingFlats [ longname ] . Fullbright )
General . Map . Data . GlowingFlats [ longname ] . Brightness = ( br + bg + bb ) / 3 ;
2015-04-14 11:33:57 +00:00
}
2015-09-27 21:09:14 +00:00
// Release the data
bitmap . UnlockBits ( bmpdata ) ;
}
}
//mxd. Check if the texture is translucent
else
{
BitmapData bmpdata = null ;
try { bmpdata = bitmap . LockBits ( new Rectangle ( 0 , 0 , bitmap . Size . Width , bitmap . Size . Height ) , ImageLockMode . ReadWrite , PixelFormat . Format32bppArgb ) ; }
catch ( Exception e ) { General . ErrorLogger . Add ( ErrorType . Error , "Cannot lock image '" + this . fullname + "' for translucency check. " + e . GetType ( ) . Name + ": " + e . Message ) ; }
if ( bmpdata ! = null )
{
PixelColor * pixels = ( PixelColor * ) ( bmpdata . Scan0 . ToPointer ( ) ) ;
int numpixels = bmpdata . Width * bmpdata . Height ;
for ( PixelColor * cp = pixels + numpixels - 1 ; cp > = pixels ; cp - - )
{
// Check alpha
if ( cp - > a > 0 & & cp - > a < 255 )
{
istranslucent = true ;
break ;
}
}
2015-04-14 11:33:57 +00:00
// Release the data
bitmap . UnlockBits ( bmpdata ) ;
}
}
2009-04-19 18:07:22 +00:00
}
// Image is ready
imagestate = ImageLoadState . Ready ;
}
}
// This creates the Direct3D texture
2009-08-02 21:34:16 +00:00
public virtual void CreateTexture ( )
2009-04-19 18:07:22 +00:00
{
lock ( this )
{
// Only do this when texture is not created yet
if ( ( ( texture = = null ) | | ( texture . Disposed ) ) & & this . IsImageLoaded & & ! loadfailed )
{
Image img = bitmap ;
if ( loadfailed ) img = Properties . Resources . Failed ;
// Write to memory stream and read from memory
2014-11-25 11:52:01 +00:00
MemoryStream memstream = new MemoryStream ( ( img . Size . Width * img . Size . Height * 4 ) + 4096 ) ;
2009-04-19 18:07:22 +00:00
img . Save ( memstream , ImageFormat . Bmp ) ;
memstream . Seek ( 0 , SeekOrigin . Begin ) ;
2012-06-01 19:53:14 +00:00
if ( dynamictexture )
{
texture = Texture . FromStream ( General . Map . Graphics . Device , memstream , ( int ) memstream . Length ,
img . Size . Width , img . Size . Height , mipmaplevels , Usage . Dynamic , Format . A8R8G8B8 ,
Pool . Default , General . Map . Graphics . PostFilter , General . Map . Graphics . MipGenerateFilter , 0 ) ;
}
else
{
texture = Texture . FromStream ( General . Map . Graphics . Device , memstream , ( int ) memstream . Length ,
img . Size . Width , img . Size . Height , mipmaplevels , Usage . None , Format . Unknown ,
Pool . Managed , General . Map . Graphics . PostFilter , General . Map . Graphics . MipGenerateFilter , 0 ) ;
}
2009-04-19 18:07:22 +00:00
memstream . Dispose ( ) ;
2012-06-01 19:53:14 +00:00
if ( dynamictexture )
{
if ( ( width ! = texture . GetLevelDescription ( 0 ) . Width ) | | ( height ! = texture . GetLevelDescription ( 0 ) . Height ) )
throw new Exception ( "Could not create a texture with the same size as the image." ) ;
}
}
}
}
// This updates a dynamic texture
public void UpdateTexture ( )
{
if ( ! dynamictexture )
throw new Exception ( "The image must be a dynamic image to support direct updating." ) ;
lock ( this )
{
if ( ( texture ! = null ) & & ! texture . Disposed )
{
// Lock the bitmap and texture
BitmapData bmpdata = bitmap . LockBits ( new Rectangle ( 0 , 0 , bitmap . Size . Width , bitmap . Size . Height ) , ImageLockMode . ReadOnly , PixelFormat . Format32bppArgb ) ;
DataRectangle texdata = texture . LockRectangle ( 0 , LockFlags . Discard ) ;
// Copy data
int * bp = ( int * ) bmpdata . Scan0 . ToPointer ( ) ;
int * tp = ( int * ) texdata . Data . DataPointer . ToPointer ( ) ;
for ( int y = 0 ; y < bmpdata . Height ; y + + )
{
for ( int x = 0 ; x < bmpdata . Width ; x + + )
{
* tp = * bp ;
bp + + ;
tp + + ;
}
// Skip extra data in texture
int extrapitch = ( texdata . Pitch > > 2 ) - bmpdata . Width ;
tp + = extrapitch ;
}
// Unlock
texture . UnlockRectangle ( 0 ) ;
bitmap . UnlockBits ( bmpdata ) ;
2009-04-19 18:07:22 +00:00
}
}
}
// This destroys the Direct3D texture
2009-08-02 21:34:16 +00:00
public void ReleaseTexture ( )
2009-04-19 18:07:22 +00:00
{
lock ( this )
{
// Trash it
if ( texture ! = null ) texture . Dispose ( ) ;
texture = null ;
}
}
// This draws a preview
public virtual void DrawPreview ( Graphics target , Point targetpos )
{
lock ( this )
{
// Preview ready?
if ( ! loadfailed & & ( previewstate = = ImageLoadState . Ready ) )
{
// Draw preview
General . Map . Data . Previews . DrawPreview ( previewindex , target , targetpos ) ;
}
// Loading failed?
else if ( loadfailed )
{
// Draw error bitmap
targetpos = new Point ( targetpos . X + ( ( General . Map . Data . Previews . MaxImageWidth - Properties . Resources . Hourglass . Width ) > > 1 ) ,
targetpos . Y + ( ( General . Map . Data . Previews . MaxImageHeight - Properties . Resources . Hourglass . Height ) > > 1 ) ) ;
target . DrawImageUnscaled ( Properties . Resources . Failed , targetpos ) ;
}
else
{
// Draw loading bitmap
targetpos = new Point ( targetpos . X + ( ( General . Map . Data . Previews . MaxImageWidth - Properties . Resources . Hourglass . Width ) > > 1 ) ,
targetpos . Y + ( ( General . Map . Data . Previews . MaxImageHeight - Properties . Resources . Hourglass . Height ) > > 1 ) ) ;
target . DrawImageUnscaled ( Properties . Resources . Hourglass , targetpos ) ;
}
}
}
// This returns a preview image
public virtual Image GetPreview ( )
{
lock ( this )
{
// Preview ready?
if ( previewstate = = ImageLoadState . Ready )
{
// Make a copy
return General . Map . Data . Previews . GetPreviewCopy ( previewindex ) ;
}
2015-01-20 12:20:35 +00:00
2009-04-19 18:07:22 +00:00
// Loading failed?
2015-01-20 12:20:35 +00:00
if ( loadfailed )
2009-04-19 18:07:22 +00:00
{
// Return error bitmap
return Properties . Resources . Failed ;
}
2015-01-20 12:20:35 +00:00
// Return loading bitmap
return Properties . Resources . Hourglass ;
2009-04-19 18:07:22 +00:00
}
}
2015-10-02 14:47:34 +00:00
//mxd. This greatly speeds up Dictionary lookups
public override int GetHashCode ( )
{
return hashcode ;
}
2009-04-19 18:07:22 +00:00
#endregion
}
}