using System.Drawing; namespace NTERA.EmuEra.Game.EraEmu.Content { internal sealed class BaseImage : AContentFile { public BaseImage(string name, string path) : base(name, path) { } public Bitmap Bitmap; public void Load(bool useGDI) { if (Loaded) return; try { Bitmap = new Bitmap(Filepath); //if (useGDI) //{ // hBitmap = Bitmap.GetHbitmap(); // g = Graphics.FromImage(Bitmap); // GDIhDC = g.GetHdc(); // hDefaultImg = GDI.SelectObject(GDIhDC, hBitmap); //} Loaded = true; Enabled = true; } catch { return; } } public override void Dispose() { if (Bitmap == null) return; Bitmap.Dispose(); Bitmap = null; } ~BaseImage() { Dispose(); } } }