示例#1
0
 private void Preview_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (imageWorks != null)
     {
         imageWorks.img.Dispose();
         imageWorks = null;
     }
 }
示例#2
0
        private void CreatePreview()
        {
            imageWorks?.img?.Dispose();
            imageWorks = new ImageWorks((filesListBox.SelectedItem as ImageInformation));
            bool isOK = imageWorks.TryCreateImageWithCorrectOrientation();

            if (isOK)
            {
                pictureBox.Image = imageWorks?.ScaleImage(pictureBox.Width, pictureBox.Height, Color.White);
            }
            else
            {
                pictureBox.Image = null;
            }
        }
示例#3
0
 private void ShowImage()
 {
     imageWorks = new ImageWorks(imageInformation);
     imageWorks.TryCreateImageWithCorrectOrientation();
     pictureBox.Image = imageWorks?.ScaleImage(pictureBox.Width, pictureBox.Height, Color.White);
 }