IOItem.cs 582 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Windows;
  2. namespace OpenSEMI.ClientBase.IO
  3. {
  4. public class IOItem : DependencyObject
  5. {
  6. public int Index
  7. {
  8. get;
  9. set;
  10. }
  11. public string Name
  12. {
  13. get;
  14. set;
  15. }
  16. public string Address
  17. {
  18. get;
  19. set;
  20. }
  21. public string Key
  22. {
  23. get;
  24. set;
  25. }
  26. }
  27. public class IOItem<T> : IOItem
  28. {
  29. public static DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(T), typeof(IOItem<T>));
  30. public T Value
  31. {
  32. get
  33. {
  34. return (T)GetValue(ValueProperty);
  35. }
  36. set
  37. {
  38. SetValue(ValueProperty, value);
  39. }
  40. }
  41. }
  42. }