|
@@ -62,6 +62,7 @@ type
|
|
|
procedure SetCheckStatus(const Value: TCheckStatus);
|
|
|
procedure SetCheckerMemo(const Value: string);
|
|
|
procedure SetCheckeTime(const Value: string);
|
|
|
+ procedure RightAlign(ALabel: TLabel);
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
@@ -107,11 +108,8 @@ begin
|
|
|
lblOrderCheckerName.Visible := not bAdd;
|
|
|
lblOrderCheckerRole.Visible := not bAdd;
|
|
|
lblOrderCheckerCompany.Visible := not bAdd;
|
|
|
- lblOrderStatus.Visible := not bAdd;
|
|
|
-
|
|
|
shpImage.Visible := not bAdd;
|
|
|
lblOrderCheckerMemo.Visible := not bAdd;
|
|
|
-
|
|
|
bOwner := AType = cftOwner;
|
|
|
lblLast.Visible := bOwner;
|
|
|
lblOrderCheckerNum.Visible := not bOwner;
|
|
@@ -119,9 +117,13 @@ begin
|
|
|
CheckerFrameType := AType;
|
|
|
CheckStatus := ACheckStatus;
|
|
|
|
|
|
+ lblOrderStatus.Visible := not bAdd;
|
|
|
if lblOrderStatus.Visible then
|
|
|
- lblOrderStatus.Left := btnDelete.Left + btnDelete.Width - lblOrderStatus.Width;
|
|
|
+ RightAlign(lblOrderStatus);
|
|
|
+
|
|
|
lblOrderCheckerTime.Visible := (not bAdd) and (CheckStatus in [csFinished, csNotPass]);
|
|
|
+ if lblOrderCheckerTime.Visible then
|
|
|
+ RightAlign(lblOrderCheckerTime);
|
|
|
|
|
|
case AType of
|
|
|
cftChecker, cftOwner:
|
|
@@ -184,7 +186,7 @@ var vColor: TColor;
|
|
|
begin
|
|
|
FCheckStatus := Value;
|
|
|
lblOrderStatus.Caption := CheckStatusNames[Value];
|
|
|
-
|
|
|
+ RightAlign(lblOrderStatus);
|
|
|
vColor := CheckStatusColors[Value];
|
|
|
lblOrderCheckerNum.Font.Color := vColor;
|
|
|
lblOrderStatus.Font.Color := vColor;
|
|
@@ -290,7 +292,13 @@ begin
|
|
|
FCheckeTime := Value;
|
|
|
|
|
|
lblOrderCheckerTime.Caption := Value;
|
|
|
- lblOrderCheckerTime.Left := btnDelete.Left + btnDelete.Width - lblOrderCheckerTime.Width;
|
|
|
+ lblOrderCheckerTime.Visible := (CheckStatus in [csFinished, csNotPass]);
|
|
|
+ RightAlign(lblOrderCheckerTime);
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TOrderCheckerFrame.RightAlign(ALabel: TLabel);
|
|
|
+begin
|
|
|
+ ALabel.Left := btnDelete.Left + btnDelete.Width - ALabel.Width;
|
|
|
end;
|
|
|
|
|
|
end.
|