Index: VerpakkingsDefinitie/UI/GevondenProductenScherm.pas =================================================================== diff -u -r566 -r567 --- VerpakkingsDefinitie/UI/GevondenProductenScherm.pas (.../GevondenProductenScherm.pas) (revision 566) +++ VerpakkingsDefinitie/UI/GevondenProductenScherm.pas (.../GevondenProductenScherm.pas) (revision 567) @@ -85,7 +85,6 @@ procedure TFormGevondenProducten.UpdateGui(Sender: TObject); var Product: TProductInformatie; - NieuwItem: TListItem; begin ListViewProducten.Items.Clear(); // Update with data from ApplicationContext Index: VerpakkingsDefinitie/UI/ProductDetailScherm.pas =================================================================== diff -u -r564 -r567 --- VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 564) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 567) @@ -6,12 +6,49 @@ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Subscherm, Main, ApplicationContext, - ObserverPattern; + ObserverPattern, Vcl.ComCtrls; type TFormProductDetail = class(TFormSubscherm) LabelOmschrijving1: TLabel; LabelOmschrijving2: TLabel; + Label1: TLabel; + LabelProductNaam: TLabel; + ListViewDozen: TListView; + GroupBox1: TGroupBox; + ButtonNieuw: TButton; + ButtonVerwijder: TButton; + ButtonMaakDozen: TButton; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + Label10: TLabel; + Label11: TLabel; + Label12: TLabel; + Label13: TLabel; + Label14: TLabel; + Label15: TLabel; + EditMeta: TEdit; + EditVolumeVan: TEdit; + ComboBoxDeelVan: TComboBox; + EditBreedte: TEdit; + EditDiepte: TEdit; + EditHoogte: TEdit; + EditMaxCombAantal: TEdit; + EditAantal: TEdit; + MemoParameters: TMemo; + ComboBoxPlaatsing: TComboBox; + ComboBoxPositie: TComboBox; + ComboBoxRichting: TComboBox; + ComboBoxOptiType: TComboBox; + ComboBoxBoxSelect: TComboBox; + ButtonMeta: TButton; + ButtonDeelVan: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private @@ -25,6 +62,7 @@ implementation +uses OptiServerService; {$R *.dfm} Constructor TFormProductDetail.Create(AOwner: TComponent; Navigator: INavigator; ApplicationContext: TApplicationContext; @@ -47,13 +85,51 @@ end; procedure TFormProductDetail.UpdateGui(Sender: TObject); +var + ProductDetailInformatie: OptiServerService.pxBoxData; + begin if ApplicationContext.ProductDetailContext.GeselecteerdProduct <> nil then begin // Update with data from ApplicationContext LabelOmschrijving1.Caption := ApplicationContext.ProductDetailContext.GeselecteerdProduct.Omschrijving1; LabelOmschrijving2.Caption := ApplicationContext.ProductDetailContext.GeselecteerdProduct.Omschrijving2; end; + if ApplicationContext.ProductDetailContext.ProductDetailInformatie <> nil then + begin + ProductDetailInformatie := ApplicationContext.ProductDetailContext.ProductDetailInformatie; + ListViewDozen.Clear(); + With ListViewDozen.Items.Add Do + begin + // List view (grid) + // Caption := IntToStr(Product.ProductNr); // Deze casting geeft geen access violation + Caption := IntToStr(ProductDetailInformatie.CutOrder); + SubItems.Add(ProductDetailInformatie.MetaCaption); + SubItems.Add(ProductDetailInformatie.Breedte + ' x ' + ProductDetailInformatie.Diepte + ' x ' + + ProductDetailInformatie.Hoogte); + SubItems.Add(ProductDetailInformatie.Aantal); + SubItems.Add(ProductDetailInformatie.MaxCombinAantal); + SubItems.Add(ProductDetailInformatie.DeelVanCaption); + // Linkerhelft + { TODO : Defaultwaarden uit DefaultData halen indien gewone waarden niet zijn ingevuld } + EditMeta.Text := ProductDetailInformatie.MetaCaption; + EditVolumeVan.Text := ProductDetailInformatie.VolumeVanCaption; + ComboBoxDeelVan.Items.Add(ProductDetailInformatie.DeelVanCaption); + EditBreedte.Text := ProductDetailInformatie.Breedte; + EditDiepte.Text := ProductDetailInformatie.Diepte; + EditHoogte.Text := ProductDetailInformatie.Hoogte; + EditMaxCombAantal.Text := ProductDetailInformatie.MaxCombinAantal; + EditAantal.Text := ProductDetailInformatie.Aantal; + // Rechterhelft + { TODO : Plaatsing: PPSPrioriteit } + { TODO : Dropdown met check boxes. Positie: Defaultwaarden en veld Positie } + { TODO : + Dropdown met check boxes. + Rotatie heeft default waarden van Richting + X; Y; Z; F; + Veld in XML is Rotatie met 1 waarde } + end; + end; end; end. Index: VerpakkingsDefinitie/UI/ProductDetailScherm.dfm =================================================================== diff -u -r564 -r567 --- VerpakkingsDefinitie/UI/ProductDetailScherm.dfm (.../ProductDetailScherm.dfm) (revision 564) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.dfm (.../ProductDetailScherm.dfm) (revision 567) @@ -2,8 +2,8 @@ Left = 0 Top = 0 Caption = 'FormProductDetail' - ClientHeight = 539 - ClientWidth = 864 + ClientHeight = 677 + ClientWidth = 808 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -13,6 +13,9 @@ OldCreateOrder = False OnCreate = FormCreate OnDestroy = FormDestroy + DesignSize = ( + 808 + 677) PixelsPerInch = 96 TextHeight = 13 object LabelOmschrijving1: TLabel @@ -29,4 +32,349 @@ Height = 13 Caption = 'LabelOmschrijving2' end + object Label1: TLabel + Left = 8 + Top = 64 + Width = 37 + Height = 13 + Caption = 'Product' + end + object LabelProductNaam: TLabel + Left = 51 + Top = 64 + Width = 106 + Height = 13 + Caption = 'LabelProductNaam' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + end + object Label2: TLabel + Left = 8 + Top = 280 + Width = 24 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Meta' + end + object Label3: TLabel + Left = 8 + Top = 312 + Width = 55 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Volume van' + end + object Label4: TLabel + Left = 8 + Top = 344 + Width = 42 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Deel van' + end + object Label5: TLabel + Left = 8 + Top = 376 + Width = 38 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Breedte' + end + object Label6: TLabel + Left = 8 + Top = 408 + Width = 31 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Diepte' + end + object Label7: TLabel + Left = 8 + Top = 438 + Width = 35 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Hoogte' + end + object Label8: TLabel + Left = 8 + Top = 488 + Width = 85 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Max comb. aantal' + end + object Label9: TLabel + Left = 8 + Top = 517 + Width = 31 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Aantal' + end + object Label10: TLabel + Left = 8 + Top = 544 + Width = 55 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Parameters' + end + object Label11: TLabel + Left = 400 + Top = 280 + Width = 43 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Plaatsing' + end + object Label12: TLabel + Left = 400 + Top = 312 + Width = 31 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Positie' + end + object Label13: TLabel + Left = 400 + Top = 344 + Width = 38 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'Richting' + end + object Label14: TLabel + Left = 400 + Top = 408 + Width = 44 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'OptiType' + end + object Label15: TLabel + Left = 400 + Top = 440 + Width = 47 + Height = 13 + Anchors = [akLeft, akBottom] + Caption = 'BoxSelect' + end + object GroupBox1: TGroupBox + Left = 8 + Top = 83 + Width = 792 + Height = 168 + Anchors = [akLeft, akTop, akRight, akBottom] + Caption = 'Dozen' + TabOrder = 0 + DesignSize = ( + 792 + 168) + object ListViewDozen: TListView + Left = 3 + Top = 16 + Width = 669 + Height = 149 + Anchors = [akLeft, akTop, akRight, akBottom] + Columns = < + item + AutoSize = True + Caption = 'Nr' + end + item + AutoSize = True + Caption = 'BoxSelect' + end + item + AutoSize = True + Caption = 'Dim' + end + item + AutoSize = True + Caption = 'Aantal' + end + item + AutoSize = True + Caption = 'Max.Comb.Aantal' + end + item + AutoSize = True + Caption = 'Deel van' + end> + TabOrder = 0 + ViewStyle = vsReport + ExplicitWidth = 718 + ExplicitHeight = 147 + end + object ButtonNieuw: TButton + Left = 688 + Top = 47 + Width = 101 + Height = 25 + Anchors = [akRight, akBottom] + Caption = 'Nieuw' + TabOrder = 1 + ExplicitLeft = 803 + ExplicitTop = 40 + end + object ButtonVerwijder: TButton + Left = 688 + Top = 86 + Width = 101 + Height = 25 + Anchors = [akRight, akBottom] + Caption = 'Verwijder' + TabOrder = 2 + ExplicitLeft = 803 + ExplicitTop = 79 + end + object ButtonMaakDozen: TButton + Left = 688 + Top = 140 + Width = 101 + Height = 25 + Anchors = [akRight, akBottom] + Caption = 'Maak dozen' + TabOrder = 3 + ExplicitLeft = 803 + ExplicitTop = 133 + end + end + object EditMeta: TEdit + Left = 112 + Top = 277 + Width = 154 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 1 + end + object EditVolumeVan: TEdit + Left = 112 + Top = 309 + Width = 154 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 2 + end + object ComboBoxDeelVan: TComboBox + Left = 112 + Top = 341 + Width = 200 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 3 + end + object EditBreedte: TEdit + Left = 112 + Top = 373 + Width = 200 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 4 + end + object EditDiepte: TEdit + Left = 112 + Top = 405 + Width = 200 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 5 + end + object EditHoogte: TEdit + Left = 112 + Top = 435 + Width = 200 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 6 + end + object EditMaxCombAantal: TEdit + Left = 112 + Top = 485 + Width = 200 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 7 + end + object EditAantal: TEdit + Left = 112 + Top = 514 + Width = 200 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 8 + end + object MemoParameters: TMemo + Left = 112 + Top = 541 + Width = 200 + Height = 124 + Anchors = [akLeft, akBottom] + Lines.Strings = ( + 'MemoParameters') + TabOrder = 9 + end + object ComboBoxPlaatsing: TComboBox + Left = 503 + Top = 277 + Width = 162 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 10 + end + object ComboBoxPositie: TComboBox + Left = 503 + Top = 309 + Width = 162 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 11 + end + object ComboBoxRichting: TComboBox + Left = 503 + Top = 341 + Width = 162 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 12 + end + object ComboBoxOptiType: TComboBox + Left = 503 + Top = 405 + Width = 162 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 13 + end + object ComboBoxBoxSelect: TComboBox + Left = 503 + Top = 437 + Width = 162 + Height = 21 + Anchors = [akLeft, akBottom] + TabOrder = 14 + end + object ButtonMeta: TButton + Left = 272 + Top = 277 + Width = 40 + Height = 21 + Anchors = [akLeft, akBottom] + Caption = '...' + TabOrder = 15 + end + object ButtonDeelVan: TButton + Left = 272 + Top = 309 + Width = 40 + Height = 21 + Anchors = [akLeft, akBottom] + Caption = '...' + TabOrder = 16 + end end