SelectedObjectCollection.cs 829 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using FastReport.Utils;
  5. namespace FastReport
  6. {
  7. /// <summary>
  8. /// Holds the list of selected objects of <see cref="Base"/> type. Used by the
  9. /// <see cref="FastReport.Design.Designer.SelectedObjects"/>.
  10. /// </summary>
  11. public class SelectedObjectCollection : ObjectCollection
  12. {
  13. /// <summary>
  14. /// Gets a value indicating that report page is selected.
  15. /// </summary>
  16. public bool IsPageSelected
  17. {
  18. get { return Count == 1 && this[0] is PageBase; }
  19. }
  20. /// <summary>
  21. /// Gets a value indicating that report is selected.
  22. /// </summary>
  23. public bool IsReportSelected
  24. {
  25. get { return Count == 1 && this[0] is Report; }
  26. }
  27. }
  28. }