Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r560 -r561 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 560) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 561) @@ -67,16 +67,35 @@ property InternalErrorMessage: string read FInternalErrorMessage write FInternalErrorMessage; end; + TProductDetailContext = class(TSubject) + private + FSessionKey: string; + FGeselecteerdProduct: TProductInformatie; + + FIsOK: Boolean; + FErrorMessage: string; + FInternalErrorMessage: string; + public + procedure NotifyChanged(); + property GeselecteerdProduct: TProductInformatie read FGeselecteerdProduct write FGeselecteerdProduct; + + property IsOK: Boolean read FIsOK write FIsOK; + property ErrorMessage: string read FErrorMessage write FErrorMessage; + property InternalErrorMessage: string read FInternalErrorMessage write FInternalErrorMessage; + end; + // APPLICATION CONTEXT // Application context bevat alle sub-contexts TApplicationContext = class private FUserContext: TUserContext; FProductsContext: TProductsContext; + FProductDetailContext: TProductDetailContext; public constructor Create(); property UserContext: TUserContext read FUserContext write FUserContext; property ProductsContext: TProductsContext read FProductsContext write FProductsContext; + property ProductDetailContext: TProductDetailContext read FProductDetailContext write FProductDetailContext; end; implementation @@ -97,10 +116,16 @@ self.Change(); end; +procedure TProductDetailContext.NotifyChanged(); +begin + self.Change(); +end; + constructor TApplicationContext.Create(); begin FUserContext := TUserContext.Create(); FProductsContext := TProductsContext.Create(); + FProductDetailContext := TProductDetailContext.Create(); end; end.