| | |
| | | return false; |
| | | } |
| | | |
| | | public string GetDisplayText() |
| | | public virtual string GetDisplayText() |
| | | { |
| | | return $"{IOType.GetEnumDescription()}-{IONum}-{Value}"; |
| | | } |
| | |
| | | public class IODefinition : IOItem |
| | | { |
| | | [Category("IO配置")] |
| | | [Description("IO预定义")] |
| | | [TypeConverter(typeof(EnumDescriptionConverter<IOPrestatement>))] |
| | | public IOPrestatement IOPreStatement { get; set; } = IOPrestatement.Customized; |
| | | |
| | | [Category("IO配置")] |
| | | [Description("IO用途描述")] |
| | | public string IODesc { get; set; } |
| | | |
| | |
| | | [JsonIgnore] |
| | | public override int Value { get; set; } |
| | | |
| | | public new string GetDisplayText() |
| | | public override string GetDisplayText() |
| | | { |
| | | return $"{IODesc} {IOType.GetEnumDescription()} {IONum}"; |
| | | return $"{(IOPreStatement == IOPrestatement.Customized ? IODesc : IOPreStatement.GetEnumDescription())} {IOType.GetEnumDescription()} {IONum}"; |
| | | } |
| | | } |
| | | |