Index: AAPClient/UI/DnaCodeScherm.pas =================================================================== diff -u -r217 -r225 --- AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 217) +++ AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 225) @@ -13,24 +13,24 @@ lblScancode: TLabel; edtDnaCode: TEdit; lblHuidigePalletData: TLabel; - lblLaatstGescand: TLabel; lblLaatstGescandData: TLabel; lblAantalGescand: TLabel; lblTotaalAantal: TLabel; lblSlash: TLabel; imgDirecteLevering: TImage; - lblHuidigePallet: TLabel; lblScanPallet: TLabel; - lblToelevering: TLabel; - imgInfo: TImage; imgWegwerpPallet: TImage; + btnInfo: TButton; + imgToelevering: TImage; + imgPallet: TImage; + imgLaatstGescand: TImage; procedure FormShow(Sender: TObject); procedure actPalletExecute(Sender: TObject); procedure actHomeExecute(Sender: TObject); procedure actAfrondenExecute(Sender: TObject); procedure edtDnaCodeKeyPress(Sender: TObject; var Key: Char); procedure FormCreate(Sender: TObject); - procedure imgInfoClick(Sender: TObject); + procedure btnInfoClick(Sender: TObject); private fImagesScherm: TImagesScherm; procedure MeldDnaCodeAf(); @@ -40,6 +40,7 @@ function BepaalAantalLadesOpHuidigePallet: integer; function BepaalDirecteLevering: boolean; procedure PalletBijwerken(Status: DnaCodeStatus; IsDirecteLevering: boolean); + procedure ZetIcoontjesBovenaan; public end; @@ -120,6 +121,17 @@ end; end; +procedure TfmDnaCodeScherm.btnInfoClick(Sender: TObject); +begin + inherited; + if UiContext.Toelevering = '' then + Self.ModalResult := mrDnaCode + else begin + UiContext.InfoLogSchermToonGescand := true; + Self.ModalResult := mrInfoLog; + end; +end; + procedure TfmDnaCodeScherm.actAfrondenExecute(Sender: TObject); var fWaarschuwingModalResult: TModalResult; @@ -171,29 +183,21 @@ lblToeleveringData.Caption := UiContext.Toelevering; lblAantalGescand.Caption := ''; lblTotaalAantal.Caption := ''; - imgInfo.Visible := false; - fImagesScherm.ilAlgemeen64.GetIcon(1, imgInfo.Picture.Icon); + btnInfo.Visible := false; + fImagesScherm.ilAlgemeen64.GetIcon(8, imgToelevering.Picture.Icon); + fImagesScherm.ilAlgemeen64.GetIcon(9, imgPallet.Picture.Icon); + fImagesScherm.ilAlgemeen64.GetIcon(10, imgLaatstGescand.Picture.Icon); if not (UiContext.Toelevering = '') then ToeleveringDataOphalen() else begin imgDirecteLevering.Visible := false; imgWegwerpPallet.Visible := false; end; + ZetIcoontjesBovenaan; inherited; end; -procedure TfmDnaCodeScherm.imgInfoClick(Sender: TObject); -begin - inherited; - if UiContext.Toelevering = '' then - Self.ModalResult := mrDnaCode - else begin - UiContext.InfoLogSchermToonGescand := true; - Self.ModalResult := mrInfoLog; - end; -end; - procedure TfmDnaCodeScherm.MeldDnaCodeAf; var Response: DnaCodeAfmeldenResponse; @@ -209,10 +213,10 @@ case strtoint(List[0]) of 200: begin UiContext.Toelevering := Response.DnaCodes[0].Toelevering; - lblToeleveringData.Caption := UiContext.Toelevering; lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); - imgInfo.Visible := true; + btnInfo.Visible := true; + ZetIcoontjesBovenaan; VerwerkMogelijkePopups(Response.DnaCodes[0]); Self.ModalResult := mrDnaCode; end; @@ -258,10 +262,10 @@ ToonPopupScherm(Response.Header.Omschrijving, 'Probeer opnieuw') end else begin UiContext.Toelevering := Response.DnaCodes[0].Toelevering; - lblToeleveringData.Caption := UiContext.Toelevering; lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); - imgInfo.Visible := true; + btnInfo.Visible := true; + ZetIcoontjesBovenaan; VerwerkMogelijkePopups(Response.DnaCodes[0]); Self.ModalResult := mrDnaCode; end; @@ -291,6 +295,32 @@ end; end; +procedure TfmDnaCodeScherm.ZetIcoontjesBovenaan; +begin + if UiContext.Pallet = '' then begin + lblHuidigePalletData.Caption := ''; + imgPallet.Visible := false; + end else begin + lblHuidigePalletData.Caption := UiContext.Pallet; + imgPallet.Visible := true; + end; + if UiContext.Toelevering = '' then begin + lblToeleveringData.Caption := ''; + imgToelevering.Visible := false; + end else begin + lblToeleveringData.Caption := UiContext.Toelevering; + imgToelevering.Visible := true; + end; + if UiContext.LaatsteDnaCode = '' then begin + lblLaatstGescandData.Caption := ''; + imgLaatstGescand.Visible := false; + end else begin + lblLaatstGescandData.Caption := UiContext.LaatsteDnaCode; + imgLaatstGescand.Visible := true; + end; + +end; + procedure TfmDnaCodeScherm.ZetToeleveringStatus(Status: DnaCodeStatus); var Response: ToeleveringBijwerkenResponse; Index: AAPClient/UI/DnaCodeScherm.dfm =================================================================== diff -u -r200 -r225 --- AAPClient/UI/DnaCodeScherm.dfm (.../DnaCodeScherm.dfm) (revision 200) +++ AAPClient/UI/DnaCodeScherm.dfm (.../DnaCodeScherm.dfm) (revision 225) @@ -1,17 +1,20 @@ inherited fmDnaCodeScherm: TfmDnaCodeScherm ActiveControl = edtDnaCode Caption = 'fmDnaCodeScherm' + ExplicitWidth = 480 + ExplicitHeight = 640 PixelsPerInch = 96 TextHeight = 19 object lblToeleveringData: TLabel [0] - Left = 269 - Top = 344 - Width = 174 + Left = 8 + Top = 135 + Width = 147 Height = 39 + Alignment = taCenter AutoSize = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText - Font.Height = -32 + Font.Height = -27 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False @@ -24,47 +27,36 @@ Caption = 'Scan DNA code' end object lblHuidigePalletData: TLabel [2] - Left = 269 - Top = 392 - Width = 174 + Left = 162 + Top = 135 + Width = 147 Height = 39 + Alignment = taCenter AutoSize = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText - Font.Height = -32 + Font.Height = -27 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False end - object lblLaatstGescand: TLabel [3] - Left = 39 - Top = 441 - Width = 224 + object lblLaatstGescandData: TLabel [3] + Left = 315 + Top = 135 + Width = 147 Height = 39 - Caption = 'Laatst gescand:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -32 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - end - object lblLaatstGescandData: TLabel [4] - Left = 269 - Top = 441 - Width = 174 - Height = 39 + Alignment = taCenter AutoSize = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText - Font.Height = -32 + Font.Height = -27 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False end - object lblAantalGescand: TLabel [5] - Left = 152 - Top = 108 + object lblAantalGescand: TLabel [4] + Left = 153 + Top = 212 Width = 74 Height = 39 Alignment = taRightJustify @@ -76,9 +68,9 @@ Font.Style = [] ParentFont = False end - object lblTotaalAantal: TLabel [6] - Left = 250 - Top = 108 + object lblTotaalAantal: TLabel [5] + Left = 251 + Top = 212 Width = 78 Height = 39 AutoSize = False @@ -89,9 +81,9 @@ Font.Style = [] ParentFont = False end - object lblSlash: TLabel [7] - Left = 232 - Top = 108 + object lblSlash: TLabel [6] + Left = 233 + Top = 212 Width = 12 Height = 39 AutoSize = False @@ -103,30 +95,16 @@ Font.Style = [] ParentFont = False end - object imgDirecteLevering: TImage [8] - Left = 404 - Top = 99 + object imgDirecteLevering: TImage [7] + Left = 68 + Top = 219 Width = 32 Height = 32 Visible = False end - object lblHuidigePallet: TLabel [9] - Left = 39 - Top = 392 - Width = 210 - Height = 39 - AutoSize = False - Caption = 'Huidige pallet:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -32 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - end - object lblScanPallet: TLabel [10] - Left = 132 - Top = 192 + object lblScanPallet: TLabel [8] + Left = 133 + Top = 296 Width = 214 Height = 39 Caption = 'Scan Dna-code' @@ -137,39 +115,37 @@ Font.Style = [] ParentFont = False end - object lblToelevering: TLabel [11] - Left = 39 - Top = 344 - Width = 210 - Height = 39 - AutoSize = False - Caption = 'Toelevering:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -32 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False + object imgWegwerpPallet: TImage [9] + Left = 381 + Top = 219 + Width = 32 + Height = 32 + Visible = False end - object imgInfo: TImage [12] - Left = 334 - Top = 99 + object imgToelevering: TImage [10] + Left = 48 + Top = 65 Width = 64 Height = 64 - OnClick = imgInfoClick end - object imgWegwerpPallet: TImage [13] - Left = 404 - Top = 137 - Width = 32 - Height = 32 - Visible = False + object imgPallet: TImage [11] + Left = 201 + Top = 65 + Width = 64 + Height = 64 end - object edtDnaCode: TEdit [16] - Left = 67 - Top = 237 + object imgLaatstGescand: TImage [12] + Left = 355 + Top = 65 + Width = 64 + Height = 64 + end + object edtDnaCode: TEdit [15] + Left = 68 + Top = 341 Width = 345 Height = 47 + Alignment = taCenter AutoSize = False CharCase = ecUpperCase Font.Charset = DEFAULT_CHARSET @@ -181,9 +157,26 @@ TabOrder = 2 OnKeyPress = edtDnaCodeKeyPress end + object btnInfo: TButton [16] + Left = 68 + Top = 408 + Width = 345 + Height = 81 + Caption = 'Meer info' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -32 + Font.Name = 'Tahoma' + Font.Style = [] + ImageIndex = 1 + Images = ImagesScherm.ilAlgemeen64 + ParentFont = False + TabOrder = 3 + OnClick = btnInfoClick + end inherited alAlgemeen: TActionList Left = 16 - Top = 160 + Top = 208 inherited actHome: TAction OnExecute = actHomeExecute end