Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r571 -r579 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 571) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 579) @@ -9,8 +9,8 @@ uses ObserverPattern, - System.Generics.Collections, - OptiServerService, SysUtils; + System.Generics.Collections, SysUtils, + OptiServerService, UI_Data; // SUB CONTEXTS: klassen die overeenkomen met bepaalde sub-context (bv. alles gerelateerd met authenticatie). @@ -33,6 +33,22 @@ property InternalErrorMessage: string read FInternalErrorMessage write FInternalErrorMessage; end; + // - UI instellingen + TUiInstellingenContext = class(TSubject) + private + FInstellingen: UI_Data.IXMLOptiBoxType; + + FIsOK: Boolean; + FErrorMessage: string; + FInternalErrorMessage: string; + public + procedure NotifyChanged(); + property Instellingen: UI_Data.IXMLOptiBoxType read FInstellingen write FInstellingen; + property IsOK: Boolean read FIsOK write FIsOK; + property ErrorMessage: string read FErrorMessage write FErrorMessage; + property InternalErrorMessage: string read FInternalErrorMessage write FInternalErrorMessage; + end; + // - Product Selection TProductInformatie = class private @@ -102,11 +118,13 @@ TApplicationContext = class private FUserContext: TUserContext; + FUiInstellingenContext: TUiInstellingenContext; FProductsContext: TProductsContext; FProductDetailContext: TProductDetailContext; public constructor Create(); property UserContext: TUserContext read FUserContext write FUserContext; + property UiInstellingenContext: TUiInstellingenContext read FUiInstellingenContext write FUiInstellingenContext; property ProductsContext: TProductsContext read FProductsContext write FProductsContext; property ProductDetailContext: TProductDetailContext read FProductDetailContext write FProductDetailContext; end; @@ -119,6 +137,12 @@ self.Change(); end; +// UiInstellingen +procedure TUiInstellingenContext.NotifyChanged(); +begin + self.Change(); +end; + // PRODUCT constructor TProductsContext.Create(); begin @@ -199,6 +223,7 @@ constructor TApplicationContext.Create(); begin FUserContext := TUserContext.Create(); + FUiInstellingenContext := TUiInstellingenContext.Create(); FProductsContext := TProductsContext.Create(); FProductDetailContext := TProductDetailContext.Create(); end;