Index: AAPClient/UI/DnaCodeScherm.pas =================================================================== diff -u -r178 -r181 --- AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 178) +++ AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 181) @@ -23,6 +23,7 @@ lblScanPallet: TLabel; lblToelevering: TLabel; imgInfo: TImage; + imgWegwerpPallet: TImage; procedure FormShow(Sender: TObject); procedure actPalletExecute(Sender: TObject); procedure actHomeExecute(Sender: TObject); @@ -35,6 +36,7 @@ procedure MeldDnaCodeAf(); procedure ZetToeleveringStatus(Status: DnaCodeStatus); procedure ToeleveringDataOphalen(); + procedure VerwerkMogelijkePopups(EersteDnaCode: DnaCode); public end; @@ -160,13 +162,7 @@ lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); imgInfo.Visible := true; - if Response.DnaCodes[0].IsGlsDirect then begin - ToonPopupScherm('GLS Direct', 'OK','',16,-1,-1,clBlue); - end; - if Response.DnaCodes[0].IsWegwerpPallet then begin - ToonPopupScherm('Wegwerppallet', 'OK','',15,-1,-1,clYellow); - imgGls.Visible := Response.DnaCodes[0].IsGlsDirect; - end; + VerwerkMogelijkePopups(Response.DnaCodes[0]); Self.ModalResult := mrDnaCode; end; 1005: begin //reeds gescand @@ -212,10 +208,7 @@ lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); imgInfo.Visible := true; - if Response.DnaCodes[0].IsGlsDirect then begin - ToonPopupScherm('GLS DIRECT', 'OK'); - imgGls.Visible := Response.DnaCodes[0].IsGlsDirect; - end; + VerwerkMogelijkePopups(Response.DnaCodes[0]); Self.ModalResult := mrDnaCode; end; finally @@ -226,6 +219,20 @@ end; end; +procedure TfmDnaCodeScherm.VerwerkMogelijkePopups(EersteDnaCode: DnaCode); +begin + if EersteDnaCode.IsGlsDirect and not imgGls.Visible then begin + ToonPopupScherm('GLS Direct', 'OK','',15,-1,-1,clBlue); + fImagesScherm.ilAlgemeen32.GetIcon(3, imgGls.Picture.Icon); + imgGls.Visible := EersteDnaCode.IsGlsDirect; + end; + if EersteDnaCode.IsWegwerpPallet and not imgWegwerpPallet.Visible then begin + ToonPopupScherm('Wegwerppallet', 'OK','',16,-1,-1,clYellow); + fImagesScherm.ilAlgemeen32.GetIcon(4, imgWegwerpPallet.Picture.Icon); + imgWegwerpPallet.Visible := EersteDnaCode.IsWegwerpPallet; + end; +end; + procedure TfmDnaCodeScherm.ZetToeleveringStatus(Status: DnaCodeStatus); var Service: DnaCodeServiceSoap;