|
|
@@ -773,16 +773,25 @@ namespace YSAI.Beckhoff
|
|
|
VerifyAttribute? verifyAttribute = typeof(BeckhoffData.Basics).GetProperty(lib.Name).GetCustomAttribute<VerifyAttribute>();
|
|
|
//单位特性
|
|
|
UnitAttribute? unitAttribute = typeof(BeckhoffData.Basics).GetProperty(lib.Name).GetCustomAttribute<UnitAttribute>();
|
|
|
+ //描述上加单位
|
|
|
+ string Describe = lib.Describe;
|
|
|
+ if (unitAttribute != null && !string.IsNullOrWhiteSpace(unitAttribute.Unit))
|
|
|
+ {
|
|
|
+ Describe += $"({unitAttribute.Unit})";
|
|
|
+ }
|
|
|
|
|
|
ParamStructure.subset.propertie propertie = new ParamStructure.subset.propertie
|
|
|
{
|
|
|
PropertyName = lib.Name,
|
|
|
- Description = lib.Describe,
|
|
|
- Show = displayAttribute?.Show,
|
|
|
- Use = displayAttribute?.Use,
|
|
|
- DataCate = displayAttribute?.DataCate,
|
|
|
+ Description = Describe,
|
|
|
+ Show = displayAttribute?.Show ?? false,
|
|
|
+ Use = displayAttribute?.Use ?? false,
|
|
|
+ MustFillIn = displayAttribute?.MustFillIn ?? false,
|
|
|
+ DataCate = displayAttribute?.DataCate ?? null,
|
|
|
+
|
|
|
Regex = verifyAttribute?.Regex ?? null,
|
|
|
FailTips = verifyAttribute?.FailTips ?? null,
|
|
|
+
|
|
|
Default = Default
|
|
|
};
|
|
|
|