示例#1
0
        public DialogResult ShowPreviewForm(IWin32Window owner, GrapeCity.ActiveReports.SectionReport report)
        {
            var previewForm = new frmVOnePreviewForm(report);
            var ownerForm   = owner as Form;

            if (ownerForm != null)
            {
                previewForm.StartPosition = FormStartPosition.Manual;
                previewForm.SetBounds(ownerForm.Location.X, ownerForm.Location.Y, ownerForm.Width, ownerForm.Height);
            }
            return(previewForm.ShowDialog(owner));
        }
示例#2
0
 /// <summary>
 /// 印刷プレビューの表示
 /// </summary>
 /// <param name="owner"></param>
 /// <param name="report"></param>
 /// <param name="initialDirectory"></param>
 /// <param name="outputHandler"></param>
 /// <returns></returns>
 protected DialogResult ShowDialogPreview(
     IWin32Window owner,
     GrapeCity.ActiveReports.SectionReport report,
     string initialDirectory     = null,
     Action <Form> outputHandler = null)
 {
     using (var form = new frmVOnePreviewForm(report))
     {
         form.InitialExportPdfPath      = initialDirectory;
         form.OutputHandler             = outputHandler;
         form.ShowSaveFileDialogHandler = ShowSaveFileDialogForPdfExport;
         var ownerForm = owner as Form;
         form.StartPosition = FormStartPosition.Manual;
         form.SetBounds(ownerForm.Left, ownerForm.Top, ownerForm.Width, ownerForm.Height);
         return(form.ShowDialog(ParentForm));
     }
 }