ProcedureOutput.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Newtonsoft.Json;
  2. using Prism.Mvvm;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using TeamAAS_VP.Enums;
  9. namespace TeamAAS_VP.Models
  10. {
  11. [JsonObject(MemberSerialization.OptOut)]
  12. public class ProcedureOutput : BindableBase
  13. {
  14. public string Name { get; set; }
  15. public Type ValueType { get; set; }
  16. private bool _IsPointTran;
  17. public bool IsPointTran
  18. {
  19. get { return _IsPointTran; }
  20. set { SetProperty(ref _IsPointTran,value); }
  21. }
  22. [JsonIgnore]
  23. public bool IsAllowTran
  24. {
  25. get
  26. {
  27. if (ValueType== typeof(System.String) && (Name.Contains("Point") || Name.Contains("point")))
  28. {
  29. return true;
  30. }
  31. return false;
  32. }
  33. }
  34. }
  35. [JsonObject(MemberSerialization.OptOut)]
  36. public class ProcedureOutputOpcAdr : BindableBase
  37. {
  38. private string name="opc";
  39. public string Name
  40. {
  41. get => name; set { SetProperty(ref name, value); }
  42. }
  43. }
  44. }