NewDataSourceWizard.cs 720 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Windows.Forms;
  5. using FastReport.Design;
  6. using FastReport.Forms;
  7. namespace FastReport.Wizards
  8. {
  9. /// <summary>
  10. /// Represents the "New Data Source" wizard.
  11. /// </summary>
  12. public class NewDataSourceWizard : WizardBase
  13. {
  14. /// <inheritdoc/>
  15. public override bool Run(Designer designer)
  16. {
  17. if (designer.Restrictions.DontCreateData)
  18. return false;
  19. using (DataWizardForm form = new DataWizardForm(designer.ActiveReport))
  20. {
  21. bool result = form.ShowDialog() == DialogResult.OK;
  22. if (result)
  23. designer.SetModified(this, "EditData");
  24. return result;
  25. }
  26. }
  27. }
  28. }