1. 单位装饰器支持INT转换
2. 升级配置项
This commit is contained in:
@@ -4,6 +4,7 @@ interface
|
||||
function EmusToPoints(value): real;
|
||||
function HalfPointToPoints(value): real;
|
||||
function PercentToNumber(value): real;
|
||||
function ToInt(value): integer;
|
||||
|
||||
implementation
|
||||
|
||||
@@ -37,5 +38,11 @@ uses TSUnitConverter;
|
||||
return TSUnitConverter.PercentToNumber(new_value);
|
||||
end;
|
||||
|
||||
function ToInt(value): integer;
|
||||
begin
|
||||
if ifNil(value) then return 0;
|
||||
return tryStrtoInt(value, r) ? r : 0;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user