SoundParam.cs 977 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using ComPDFKit.PDFAnnotation;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace ComPDFKit.Tool.SettingParam
  9. {
  10. public class SoundParam : AnnotParam
  11. {
  12. public SoundParam ()
  13. {
  14. CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_SOUND;
  15. }
  16. public string SoundFilePath { get; set; } = string.Empty;
  17. public MemoryStream ImageStream { get; set; }
  18. public override bool CopyTo(AnnotParam transfer)
  19. {
  20. SoundParam soundTransfer = transfer as SoundParam;
  21. if (soundTransfer == null)
  22. {
  23. return false;
  24. }
  25. if (!base.CopyTo(soundTransfer))
  26. {
  27. return false;
  28. }
  29. soundTransfer.SoundFilePath = SoundFilePath;
  30. soundTransfer.ImageStream = ImageStream;
  31. return true;
  32. }
  33. }
  34. }