Esempio n. 1
0
 public static void ShowImage(string filepath)
 {
     if (!string.IsNullOrEmpty(filepath) && File.Exists(filepath))
     {
         using (Image img = ImageHelpers.LoadImage(filepath))
         using (ImageViewer viewer = new ImageViewer(img))
         {
             viewer.ShowDialog();
         }
     }
 }
Esempio n. 2
0
 public static void ShowImage(Image img)
 {
     if (img != null)
     {
         using (Image tempImage = (Image)img.Clone())
         using (ImageViewer viewer = new ImageViewer(tempImage))
         {
             viewer.ShowDialog();
         }
     }
 }