Changeset 131 for trunk/Packages/VCard/UContactImage.pas
- Timestamp:
- Apr 9, 2022, 12:13:45 PM (3 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/VCard/UContactImage.pas
r130 r131 11 11 { TContactImage } 12 12 13 TContactImage = class 13 TContactImage = class(TComponent) 14 14 private 15 15 FOnChange: TNotifyEvent; … … 36 36 procedure LoadFromFile(FileName: string); 37 37 procedure SaveToFile(FileName: string); 38 procedure Assign(Source: T ContactImage);39 constructor Create ;38 procedure Assign(Source: TPersistent); override; 39 constructor Create(AOwner: TComponent); override; 40 40 destructor Destroy; override; 41 published 41 42 property Url: string read FUrl write SetUrl; 42 43 property Used: Boolean read FUsed write SetUsed; … … 44 45 end; 45 46 47 procedure Register; 48 46 49 47 50 implementation 48 51 52 procedure Register; 53 begin 54 RegisterComponents('VCard', [TVCard]); 55 end; 49 56 50 57 { TContactImage } … … 349 356 end; 350 357 351 procedure TContactImage.Assign(Source: TContactImage); 352 begin 353 Bitmap.Assign(Source.Bitmap); 354 Url := Source.Url; 355 Loaded := Source.Loaded; 356 Modified := Source.Modified; 357 Format := Source.Format; 358 FieldIndex := Source.FieldIndex; 359 Contact := Source.Contact; 360 Used := Source.Used; 361 end; 362 363 constructor TContactImage.Create; 364 begin 358 procedure TContactImage.Assign(Source: TPersistent); 359 var 360 SourceImage: TContactImage; 361 begin 362 inherited; 363 if Source is TContactImage then begin 364 SourceImage := Source as TContactImage; 365 Bitmap.Assign(SourceImage.Bitmap); 366 Url := SourceImage.Url; 367 Loaded := SourceImage.Loaded; 368 Modified := SourceImage.Modified; 369 Format := SourceImage.Format; 370 FieldIndex := SourceImage.FieldIndex; 371 Contact := SourceImage.Contact; 372 Used := SourceImage.Used; 373 end; 374 end; 375 376 constructor TContactImage.Create(AOwner: TComponent); 377 begin 378 inherited; 365 379 Bitmap := TBitmap.Create; 366 380 end; … … 372 386 end; 373 387 374 375 388 end. 376 389
Note:
See TracChangeset
for help on using the changeset viewer.