예제 #1
0
        private void UpdatePreview()
        {
            var memory = new MemoryStream();

            memory.Write(this._Resource.Data, 0, this._Resource.Data.Length);
            memory.Position = 0;

            var dds = new DDSFile();

            dds.Deserialize(memory);

            var image = dds.Image(true, true, true, this._ToggleAlphaButton.Checked);

            if (this._ZoomButton.Checked == true)
            {
                this._PreviewPictureBox.Dock     = DockStyle.Fill;
                this._PreviewPictureBox.Image    = image;
                this._PreviewPictureBox.SizeMode = PictureBoxSizeMode.Zoom;
            }
            else
            {
                this._PreviewPictureBox.Dock     = DockStyle.None;
                this._PreviewPictureBox.Image    = image;
                this._PreviewPictureBox.Width    = image.Width;
                this._PreviewPictureBox.Height   = image.Height;
                this._PreviewPictureBox.SizeMode = PictureBoxSizeMode.Normal;
            }
        }
예제 #2
0
        private void UpdatePreview()
        {
            MemoryStream memory = new MemoryStream();

            memory.Write(this.Resource.Data, 0, this.Resource.Data.Length);
            memory.Position = 0L;
            Gibbed.Squish.DDSFile expr_32 = new Gibbed.Squish.DDSFile();
            expr_32.Deserialize(memory);
            var image = expr_32.Image(true, true, true, this.toggleAlphaButton.Checked);

            if (this.toolStripButton1.Checked)
            {
                this.previewPictureBox.Dock     = DockStyle.Fill;
                this.previewPictureBox.Image    = image;
                this.previewPictureBox.SizeMode = PictureBoxSizeMode.Zoom;
                return;
            }
            this.previewPictureBox.Dock     = DockStyle.None;
            this.previewPictureBox.Image    = image;
            this.previewPictureBox.Width    = image.Width;
            this.previewPictureBox.Height   = image.Height;
            this.previewPictureBox.SizeMode = PictureBoxSizeMode.Normal;
        }