LinkState.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using GalaSoft.MvvmLight;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. namespace Muchinfo.MTPClient.Data
  7. {
  8. /// <summary>
  9. /// 链路状态
  10. /// </summary>
  11. public class LinkState : ViewModelBase
  12. {
  13. /// <summary>
  14. /// 链路实体
  15. /// </summary>
  16. public LinkerEntity LinkerEntity { get; set; }
  17. /// <summary>
  18. /// 服务名称
  19. /// </summary>
  20. public string Name { get; set; }
  21. /// <summary>
  22. /// ip地址
  23. /// </summary>
  24. public string Ip { get; set; }
  25. /// <summary>
  26. /// 端口
  27. /// </summary>
  28. public int Port { get; set; }
  29. private bool _isEnable = false;
  30. /// <summary>
  31. /// 是否可用
  32. /// </summary>
  33. public bool IsEnable
  34. {
  35. get
  36. {
  37. return _isEnable;
  38. }
  39. set
  40. {
  41. Set(() => IsEnable, ref _isEnable, value);
  42. }
  43. }
  44. /// <summary>
  45. ///
  46. /// </summary>
  47. public string IsEnableString
  48. {
  49. get
  50. {
  51. return IsEnable ? "√" : "×";
  52. }
  53. }
  54. }
  55. }