Industrial: Add demo for TAnalogSensor

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8776 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-03-27 15:07:12 +00:00
parent ebfa3083bc
commit 782c3c766b
5 changed files with 557 additions and 1 deletions

View File

@ -201,7 +201,7 @@ begin
// Modif J.P 05/2013 Caption replace Hint
FlblShowText.Hint := AValue;
inherited Caption := '';
FlblShowText.Caption := FlblShowText.Hint + FloatToStr(FValue);
FlblShowText.Caption := FlblShowText.Hint + FloatToStr(FValue);
Invalidate;
end;
@ -211,6 +211,7 @@ begin
begin
FShowText := AValue;
FlblShowText.Visible := FShowText;
Invalidate;
end;
end;
@ -268,8 +269,11 @@ begin
if (AValue <> FValueRed) then
begin
if (AValue < FValueMin) or (AValue > FValueMax) then
exit;
{
if not (csLoading in ComponentState) then
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueMin), Round(FValueMax)]);
}
FValueRed := AValue;
Invalidate;
end;
@ -280,8 +284,11 @@ begin
if (AValue <> FValueYellow) then
begin
if (AValue < FValueRed) or (AValue > FValueMax) then
exit;
{
if not (csLoading in ComponentState) then
raise EInvalidOperation.CreateFmt('SOutOfRange', [Round(FValueRed), Round(FValueMax)]);
}
FValueYellow := AValue;
Invalidate;
end;