--- dao/DelphiScanner/Main.pas 2016/06/27 12:18:07 3055 +++ dao/DelphiScanner/Main.pas 2016/07/28 20:03:18 3076 @@ -26,7 +26,8 @@ LabelPrint, Configuration, Vcl.Imaging.pngimage, - Generics.Collections + Generics.Collections, + TimingHelper ; @@ -107,6 +108,7 @@ chkForstorTilDirekte: TCheckBox; chkEmballageRepareret: TCheckBox; KommentarST: TLabel; + chkUdenforSpecifikation: TCheckBox; @@ -558,7 +560,7 @@ // Sætter lige en default panel størrelse MainForm.ClientWidth := 1000; - MainForm.ClientHeight := 750; + MainForm.ClientHeight := 820; Config := TConfiguration.Create(); Config.ReadFromInifile( TIniFile.Create(ChangeFileExt(Application.ExeName,'.ini')) ); //ToDo: clean up duplicate ini ref @@ -841,34 +843,7 @@ if SpecialVersionSted = 'DBK' then begin - //FarveNormal := 'A9F5A9'; // her kan vi evt. overrule ini fil Sted := SpecialVersionSted; - // her skal vi også disable de knapper DBK ikke kan bruge - PanelValg2.Enabled := false; - PanelValg2.Font.Color := clInactiveCaption; - PanelValg3.Enabled := false; - PanelValg3.Font.Color := clInactiveCaption; - PanelValg5.Enabled := false; - PanelValg5.Font.Color := clInactiveCaption; - PanelValg6.Enabled := false; - PanelValg6.Font.Color := clInactiveCaption; - - - // her skal vi også disable de menupunkter DBK ikke kan bruge - menuNatxpressReturDAO1.Enabled := false; - menuNatxpressReturfraKunde1.Enabled := false; - - menuPakkeshop1.Enabled := false; - menuPakkeshopRetur1.Enabled := false; - - if SpecialVersionScanningtype = 'A' then - begin - Scanningtype := '1'; - end - else - begin - Scanningtype := SpecialVersionScanningtype; - end; end; if (SpecialVersionSted = '01') @@ -1840,6 +1815,7 @@ for i := ListBox2.items.count-1 downto 0 do if pos(StregKode,ListBox2.items[i]) <> 0 then begin + wrkAntalSenere := 0;//initial Value // Ajourføring af tæller for manglende pakker (scanninger) wrkAntal := StaticTextManglendePakker.Caption; @@ -2233,11 +2209,11 @@ begin if (Leveringssted <> BladhusStedKode[BladhusSted]) and (BladhusStedKode[BladhusSted] <> 'DBK') then begin - Kommentar := Kommentar + ' Pakke burde være hos DAO Distribution'; + Kommentar := Kommentar + 'Pakke burde være hos ' + Leveringssted; PrintNyLabel := False; end; end - else if (menuDaoDirekte1.Checked) and (Leveringssted <> Sted) then + else if (menuDaoDirekte1.Checked) and (Leveringssted <> Sted) And (Leveringssted <> '') then begin if (Leveringssted = 'E') and (Sted = 'DBK') then begin @@ -2245,7 +2221,7 @@ end else begin - Kommentar := Kommentar + ' Pakke burde være hos DAO Distribution'; + Kommentar := Kommentar + 'Pakke burde være hos ' + Leveringssted; PrintNyLabel := False; end; end; @@ -4203,11 +4179,12 @@ I: Integer; stregkode, modtagernavn, modtageradresse, kommentar : string; pakketype, tjekkodestatus : String; - pakketypeix, antalLiniefelter, antalFelterFundet, linienr : Integer; + antalLiniefelter, antalFelterFundet, linienr : Integer; //pakketyper : TStrings; pakketyper : TDictionary; tmpAntal : Integer; + time, timeSamlet : TTimingHelper; antlin : Integer; @@ -4267,6 +4244,9 @@ end; // 20150310: slut + time := TTimingHelper.create(); //DEBUG + timeSamlet := TTimingHelper.create(); //DEBUG + try //raise EIdConnClosedGracefully.Create('test'); // KUN TIL TEST // URLStr := string(Utf8Encode(URLStr)); @@ -4289,8 +4269,16 @@ end; end; try + time.stop('HTTP Load'); //DEBUG + XMLDocument1.LoadFromXML(WebSvar); + time.stop('XML Load'); //DEBUG + + + + + antlin := 0; antlinIdag := 0; @@ -4333,6 +4321,7 @@ SetLength(stregkoderMedTjekkodeArray, 0); // reset fra tidligere brug SetLength(stregkoderMedTjekkodeArray, antlin); // sæt antal elementer i array + time.stop('Antal Linier');//DEBUG Application.Processmessages; //Ugly Hack to improve User Experience when switching modes @@ -4418,6 +4407,9 @@ end; + time.stop('Fyld Listbox2');//DEBUG + + Application.Processmessages; //Ugly Hack to improve User Experience when switching modes @@ -4537,6 +4529,10 @@ end; end; + time.stop('Done');//DEBUG + timeSamlet.stop('SamletTid');//DEBUG + + end; procedure TMainForm.IndlesScanningLogFil();