private void ArtExplorerWindow_ResizeEnd(object sender, EventArgs e) { if (currentImage != null) { Graphics gfx = UI_ImagePreview.CreateGraphics(); gfx.Clear(UI_ImagePreview.BackColor); gfx.DrawImage(currentImage, 0, 0); } }
private void ClearImagePreview() { Graphics gfx = UI_ImagePreview.CreateGraphics(); gfx.Clear(UI_ImagePreview.BackColor); currentImage = null; currentImageName = null; UI_ExportButton.Hide(); }
private void displayImage(string file) { currentImage = null; UI_PreviewStatus.Hide(); using (var blp = new BlpFile(File.OpenRead(file))) currentImage = blp.GetBitmap(0); Graphics gfx = UI_ImagePreview.CreateGraphics(); gfx.Clear(UI_ImagePreview.BackColor); gfx.DrawImage(currentImage, 0, 0); UI_ExportButton.Show(); currentImageName = file; }