ReportEngine.Dialogs.cs 738 B

12345678910111213141516171819202122232425262728293031
  1. using FastReport.Dialog;
  2. using System.Windows.Forms;
  3. namespace FastReport.Engine
  4. {
  5. public partial class ReportEngine
  6. {
  7. #region Private Methods
  8. private bool RunDialog(DialogPage page)
  9. {
  10. return page.ShowDialog() == DialogResult.OK;
  11. }
  12. private bool RunDialogs()
  13. {
  14. foreach (PageBase page in Report.Pages)
  15. {
  16. if (page is DialogPage)
  17. {
  18. DialogPage dialogPage = page as DialogPage;
  19. if (dialogPage.Visible && !RunDialog(dialogPage))
  20. return false;
  21. }
  22. }
  23. return true;
  24. }
  25. #endregion Private Methods
  26. }
  27. }