| | |
| | | /// IO点的值 |
| | | /// </summary> |
| | | [Category("IO配置")] |
| | | [Description("IO数值")] |
| | | public virtual int Value { get; set; } |
| | | [Description("IO状态")] |
| | | [TypeConverter(typeof(EnumDescriptionConverter<IOValue>))] |
| | | public virtual IOValue Value { get; set; } |
| | | |
| | | /// <summary> |
| | | /// IO点是in还是out |
| | |
| | | |
| | | public virtual string GetDisplayText() |
| | | { |
| | | return $"{IOType.GetEnumDescription()}-{IONum}-{Value}"; |
| | | return $"{IOType.GetEnumDescription()}-{IONum}-{Value.GetEnumDescription()}"; |
| | | } |
| | | |
| | | public int GetHashCode(object obj) |
| | |
| | | |
| | | [Browsable(false)] |
| | | [JsonIgnore] |
| | | public override int Value { get; set; } |
| | | public override IOValue Value { get; set; } |
| | | |
| | | public override string GetDisplayText() |
| | | { |
| | |
| | | public IODefinition IOItem { get; set; } = new IODefinition(); |
| | | |
| | | [Category("IO操作配置")] |
| | | [Description("需要操作的IO的数值")] |
| | | public int CheckValue |
| | | [Description("需要操作的IO的状态")] |
| | | public IOValue CheckValue |
| | | { |
| | | get => IOItem.Value; |
| | | set => IOItem.Value = value; |
| | |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return IOItem.IODesc + "-" + CheckValue; |
| | | return IOItem.IODesc + "-" + CheckValue.GetEnumDescription(); |
| | | } |
| | | } |
| | | |