AssemblyInitializer.DesignExt.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using FastReport.Data;
  2. using FastReport.Dialog;
  3. using FastReport.Utils;
  4. using FastReport.Wizards;
  5. using System;
  6. namespace FastReport
  7. {
  8. /// <summary>
  9. /// The FastReport.dll assembly initializer.
  10. /// </summary>
  11. public sealed class AssemblyInitializerDesignExt : AssemblyInitializerBase
  12. {
  13. #region Public Constructors
  14. /// <summary>
  15. /// Registers all standard objects, wizards, export filters.
  16. /// </summary>
  17. public AssemblyInitializerDesignExt()
  18. {
  19. RegisterObjects();
  20. RegisterMethods();
  21. }
  22. #endregion Public Constructors
  23. #region Private Methods
  24. private void RegisterObjects()
  25. {
  26. // data connections
  27. #if !COMMUNITY
  28. #if !MONO || WPF
  29. RegisteredObjects.InternalAddConnection(typeof(MsAccessDataConnection));
  30. RegisteredObjects.InternalAddConnection(typeof(OleDbDataConnection));
  31. RegisteredObjects.InternalAddConnection(typeof(OdbcDataConnection));
  32. #endif
  33. #endif
  34. RegisteredObjects.InternalAddConnection(typeof(MsSqlDataConnection));
  35. // extended dialog controls
  36. #if !COMMUNITY
  37. RegisteredObjects.AddCategory("DialogPage,Others", 74, "Objects,OtherDialogControls");
  38. RegisteredObjects.InternalAdd(typeof(MaskedTextBoxControl), "DialogPage,Others", 147, 13);
  39. RegisteredObjects.InternalAdd(typeof(NumericUpDownControl), "DialogPage,Others", 146, 14);
  40. RegisteredObjects.InternalAdd(typeof(PanelControl), "DialogPage,Others", 144, 15);
  41. RegisteredObjects.InternalAdd(typeof(GridControl), "DialogPage,Others", 122, 16);
  42. RegisteredObjects.InternalAdd(typeof(DataSelectorControl), "DialogPage,Others", 128, 17);
  43. RegisteredObjects.InternalAdd(typeof(ListViewControl), "DialogPage,Others", 203, 18);
  44. #if !AVALONIA
  45. RegisteredObjects.InternalAdd(typeof(RichTextBoxControl), "DialogPage,Others", 205, 19);
  46. #endif
  47. RegisteredObjects.InternalAdd(typeof(TreeViewControl), "DialogPage,Others", 204, 20);
  48. #endif
  49. // wizards
  50. RegisteredObjects.AddWizard(typeof(BlankReportWizard), 134, "Wizards,BlankReport", ItemWizardEnum.Report);
  51. RegisteredObjects.AddWizard(typeof(InheritedReportWizard), 134, "Wizards,InheritedReport", ItemWizardEnum.Report);
  52. RegisteredObjects.AddWizard(typeof(StandardReportWizard), 133, "Wizards,StandardReport", ItemWizardEnum.Report);
  53. RegisteredObjects.AddWizard(typeof(LabelWizard), 133, "Wizards,Label", ItemWizardEnum.Report);
  54. RegisteredObjects.AddWizard(typeof(NewPageWizard), 135, "Wizards,NewPage", ItemWizardEnum.ReportItem);
  55. #if !COMMUNITY
  56. RegisteredObjects.AddWizard(typeof(NewDialogWizard), 136, "Wizards,NewDialog", ItemWizardEnum.ReportItem);
  57. #endif
  58. RegisteredObjects.AddWizard(typeof(NewDataSourceWizard), 137, "Wizards,NewDataSource", ItemWizardEnum.ReportItem);
  59. RegisteredObjects.AddWizard(typeof(FastM1nesweeperWizard), 250, "Wizards,FastM1nesweeper", ItemWizardEnum.Game);
  60. }
  61. private void RegisterMethods()
  62. {
  63. // Does nothing
  64. }
  65. #endregion Private Methods
  66. }
  67. }