TimeFormat.cs 885 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using FastReport.Utils;
  5. namespace FastReport.Format
  6. {
  7. /// <summary>
  8. /// Defines how time values are formatted and displayed.
  9. /// </summary>
  10. public class TimeFormat : CustomFormat
  11. {
  12. #region Public Methods
  13. /// <inheritdoc/>
  14. public override FormatBase Clone()
  15. {
  16. TimeFormat result = new TimeFormat();
  17. result.Format = Format;
  18. return result;
  19. }
  20. internal override string GetSampleValue()
  21. {
  22. return FormatValue(new DateTime(2007, 11, 30, 13, 30, 0));
  23. }
  24. #endregion
  25. /// <summary>
  26. /// Initializes a new instance of the <b>TimeFormat</b> class with default settings.
  27. /// </summary>
  28. public TimeFormat()
  29. {
  30. Format = "t";
  31. }
  32. }
  33. }