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

            child.MdiParent = this;
            child.Initialize(info, _paintProperties, _animateRegions, true, _useDpi, _animationMode);
            child.Show();
        }
Beispiel #2
0
        private void _menuItemAnimationCreate_Click(object sender, EventArgs e)
        {
            CreateAnimationDialog createAnimationDialog = new CreateAnimationDialog();

            createAnimationDialog.Owner = this;
            if (createAnimationDialog.ShowDialog() == DialogResult.OK)
            {
                createAnimationDialog.Image.AnimationGlobalLoop = 1000;
                createAnimationDialog.Image.AnimationDelay      = 500;
                ImageInformation info  = new ImageInformation(createAnimationDialog.Image);
                ViewerForm       child = new ViewerForm();
                child.MdiParent = this;
                child.Initialize(info, _paintProperties, _animateRegions, true, _useDpi, _animationMode);
                child.Show();
            }
        }
Beispiel #3
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, _animateRegions, false, _useDpi, _animationMode);
                     }
                     else
                     {
                         NewImage(info);
                     }
                 }
                 catch (Exception ex)
                 {
                     Messager.ShowFileOpenError(this, files[i], ex);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Messager.ShowError(this, ex);
     }
     finally
     {
         UpdateControls();
     }
 }