Example #1
0
        private void _miPdfOptionsAdvanced_Click(object sender, System.EventArgs e)
        {
            try
            {
                ViewerForm activeForm = ActiveViewerForm;
                PdfAdvancedOptionsDialog AdvancedOptionsDlg = new PdfAdvancedOptionsDialog();
                AdvancedOptionsDlg.AdvancedOptions = new PdfAdvancedOptions();

                AdvancedOptionsDlg.AdvancedOptions = activeForm.AdvancedOptions;

                if (AdvancedOptionsDlg.ShowDialog(this) == DialogResult.OK)
                {
                    activeForm.AdvancedOptions = AdvancedOptionsDlg.AdvancedOptions;
                }
            }
            catch (Exception ex)
            {
                Messager.ShowError(this, ex);
            }
        }
Example #2
0
        public void DeletePage()
        {
            ViewerForm activeForm = ActiveViewerForm;

            try
            {
                for (int i = 0; i < this.MdiChildren.Length; i++)
                {
                    if (((ViewerForm)this.MdiChildren[i]).StandardOptions.PageNumber > activeForm.StandardOptions.PageNumber)
                    {
                        ((ViewerForm)this.MdiChildren[i]).StandardOptions.PageNumber--;
                    }
                }
            }
            catch (Exception ex)
            {
                Messager.ShowError(this, ex);
            }
            finally
            {
                UpdateControls();
            }
        }
Example #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, false);
                     }
                     else
                     {
                         NewImage(info);
                     }
                 }
                 catch (Exception ex)
                 {
                     Messager.ShowFileOpenError(this, files[i], ex);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Messager.ShowError(this, ex);
     }
     finally
     {
         UpdateControls();
     }
 }