Example #1
0
        private void NewImage(ImageInformation info)
        {
            ViewerForm child = new ViewerForm();

            child.StandardOptions = new PdfStandardOptions();
            child.AdvancedOptions = new PdfAdvancedOptions();
            child.MdiParent       = this;
            _paintProperties      = RasterPaintProperties.Default;
            child.Initialize(info, _paintProperties, true);
            child.Show();
        }
Example #2
0
 public void LoadDropFiles(ViewerForm viewer, string[] files)
 {
     try
     {
         if (files != null)
         {
             for (int i = 0; i < files.Length; i++)
             {
                 try
                 {
                     RasterImage      image = _codecs.Load(files[i]);
                     ImageInformation info  = new ImageInformation(image, files[i]);
                     if (i == 0 && viewer != null)
                     {
                         viewer.Initialize(info, _paintProperties, false);
                     }
                     else
                     {
                         NewImage(info);
                     }
                 }
                 catch (Exception ex)
                 {
                     Messager.ShowFileOpenError(this, files[i], ex);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Messager.ShowError(this, ex);
     }
     finally
     {
         UpdateControls();
     }
 }