private void NewImage(ImageInformation info) { ViewerForm child = new ViewerForm(); child.MdiParent = this; child.Initialize(info, _paintProperties, true); child.Show(); child.Viewer.Dock = DockStyle.Fill; }
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(); } }