SerialPortWithTag.cs 869 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.IO.Ports;
  10. namespace UAS_LabelMachine.CustomControl
  11. {
  12. public partial class SerialPortWithTag : SerialPort
  13. {
  14. private string tag;
  15. int sleepTime;
  16. public SerialPortWithTag()
  17. {
  18. InitializeComponent();
  19. }
  20. public string Tag
  21. {
  22. get
  23. {
  24. return tag;
  25. }
  26. set
  27. {
  28. tag = value;
  29. }
  30. }
  31. public int SleepTime
  32. {
  33. get
  34. {
  35. return sleepTime;
  36. }
  37. set
  38. {
  39. sleepTime = value;
  40. }
  41. }
  42. }
  43. }