/// <summary> /// Освободить все используемые ресурсы. /// </summary> /// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } lock (this) { if (RazorGFX != null) { RazorGFX.Dispose(); } if (RazorBMP != null) { RazorBMP.Dispose(); } if (hDCGraphics != null) { hDCGraphics.Dispose(); } RP.Dispose(); } base.Dispose(disposing); }
protected override void OnResize(EventArgs e) { lock (RazorLock) { if (RazorGFX != null) { RazorGFX.Dispose(); } if (RazorBMP != null) { RazorBMP.Dispose(); } RazorBMP = new Bitmap(Width, Height, PixelFormat.Format32bppArgb); RazorGFX = Graphics.FromImage(RazorBMP); } base.OnResize(e); }
protected override void Dispose(bool disposing) { lock (RazorLock) { if (RazorGFX != null) { RazorGFX.Dispose(); } if (RazorBMP != null) { RazorBMP.Dispose(); } //hDCGraphics.ReleaseHdc(); if (hDCGraphics != null) { hDCGraphics.Dispose(); } //RP.Dispose(); } base.Dispose(disposing); }