TextObjectBase.DesignExt.cs 925 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using FastReport.Format;
  2. using System.Windows.Forms;
  3. namespace FastReport
  4. {
  5. partial class TextObjectBase
  6. {
  7. #region Private Methods
  8. private bool ShouldSerializeBrackets()
  9. {
  10. return Brackets != "[,]";
  11. }
  12. private bool ShouldSerializePadding()
  13. {
  14. return Padding != new Padding(2, 0, 2, 0);
  15. }
  16. private bool ShouldSerializeFormat()
  17. {
  18. return (formats.Count == 1 && !(formats[0] is GeneralFormat)) || formats.Count > 1;
  19. }
  20. #endregion
  21. #region Public Methods
  22. /// <inheritdoc/>
  23. public override void AssignFormat(ReportComponentBase source)
  24. {
  25. base.AssignFormat(source);
  26. TextObjectBase src = source as TextObjectBase;
  27. if (src == null)
  28. return;
  29. Formats.Assign(src.Formats);
  30. }
  31. #endregion
  32. }
  33. }