Example #1
0
        private void ClearImagePreview()
        {
            Graphics gfx = UI_ImagePreview.CreateGraphics();

            gfx.Clear(UI_ImagePreview.BackColor);
            currentImage     = null;
            currentImageName = null;
            UI_ExportButton.Hide();
        }
Example #2
0
        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;
        }
Example #3
0
        private void OnFileExtractComplete(object sender, EventArgs rawArgs)
        {
            FileExtractCompleteArgs args = (FileExtractCompleteArgs)rawArgs;

            if (args.RunnerID == runnerID)
            {
                currentImageName = null;

                UI_ExportButton.Hide();

                if (args.Success)
                {
                    displayImage(Path.Combine(Constants.TEMP_DIRECTORY, args.File.FullName));
                }
                else
                {
                    UI_PreviewStatus.Text = "Error loading image!";
                    UI_PreviewStatus.Show();
                }

                extractRunner = null;
            }
        }