Changeset 131 for trunk


Ignore:
Timestamp:
Apr 9, 2022, 12:13:45 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Contact image unit moved into VCard package.
Location:
trunk
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.pas

    r129 r131  
    814814  FContact := nil;
    815815  FormProperties := TFormProperties.Create(nil);
    816   FPhoto := TContactImage.Create;
     816  FPhoto := TContactImage.Create(nil);
    817817  FPhoto.FieldIndex := cfPhoto;
    818818  FPhoto.OnChange := PhotoChange;
  • trunk/Forms/UFormImage.pas

    r127 r131  
    6060  Core.ThemeManager1.UseTheme(Self);
    6161
    62   Image := TContactImage.Create;
     62  Image := TContactImage.Create(nil);
    6363  Image.OnChange := ImageChange;
    6464end;
  • trunk/Packages/VCard/UContactImage.pas

    r130 r131  
    1111  { TContactImage }
    1212
    13   TContactImage = class
     13  TContactImage = class(TComponent)
    1414  private
    1515    FOnChange: TNotifyEvent;
     
    3636    procedure LoadFromFile(FileName: string);
    3737    procedure SaveToFile(FileName: string);
    38     procedure Assign(Source: TContactImage);
    39     constructor Create;
     38    procedure Assign(Source: TPersistent); override;
     39    constructor Create(AOwner: TComponent); override;
    4040    destructor Destroy; override;
     41  published
    4142    property Url: string read FUrl write SetUrl;
    4243    property Used: Boolean read FUsed write SetUsed;
     
    4445  end;
    4546
     47procedure Register;
     48
    4649
    4750implementation
    4851
     52procedure Register;
     53begin
     54  RegisterComponents('VCard', [TVCard]);
     55end;
    4956
    5057{ TContactImage }
     
    349356end;
    350357
    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
     358procedure TContactImage.Assign(Source: TPersistent);
     359var
     360  SourceImage: TContactImage;
     361begin
     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;
     374end;
     375
     376constructor TContactImage.Create(AOwner: TComponent);
     377begin
     378  inherited;
    365379  Bitmap := TBitmap.Create;
    366380end;
     
    372386end;
    373387
    374 
    375388end.
    376389
  • trunk/Packages/VCard/UVCard.pas

    r130 r131  
    360360procedure Register;
    361361begin
    362   RegisterComponents('Common', [TVCard]);
     362  RegisterComponents('VCard', [TVCard]);
    363363end;
    364364
  • trunk/Packages/VCard/VCard.lpk

    r130 r131  
    88      <Version Value="11"/>
    99      <SearchPaths>
    10         <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)-$(BuildMode)/"/>
     10        <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1111      </SearchPaths>
    1212      <Parsing>
     
    4747        <UnitName Value="UQuotedPrintable"/>
    4848      </Item>
     49      <Item>
     50        <Filename Value="UContactImage.pas"/>
     51        <HasRegisterProc Value="True"/>
     52        <UnitName Value="UContactImage"/>
     53      </Item>
    4954    </Files>
    5055    <i18n>
  • trunk/vCardStudio.lpi

    r130 r131  
    7575      </Item2>
    7676      <SharedMatrixOptions Count="2">
    77         <Item1 ID="186308868222" Targets="Common,SynEditEx" Modes="Debug" Value="-g -gl -gh -CirotR -O1"/>
    78         <Item2 ID="035947176865" Targets="Common,SynEditEx" Modes="Release" Value="-CX -XX -O3"/>
     77        <Item1 ID="186308868222" Targets="Common,SynEditEx,VCard" Modes="Debug" Value="-g -gl -gh -CirotR -O1"/>
     78        <Item2 ID="035947176865" Targets="Common,SynEditEx,VCard" Modes="Release" Value="-CX -XX -O3"/>
    7979      </SharedMatrixOptions>
    8080    </BuildModes>
     
    123123      </Item7>
    124124    </RequiredPackages>
    125     <Units Count="25">
     125    <Units Count="24">
    126126      <Unit0>
    127127        <Filename Value="vCardStudio.lpr"/>
     
    235235      </Unit16>
    236236      <Unit17>
    237         <Filename Value="UContactImage.pas"/>
    238         <IsPartOfProject Value="True"/>
     237        <Filename Value="Forms\UFormNameDetails.pas"/>
     238        <IsPartOfProject Value="True"/>
     239        <ComponentName Value="FormNameDetails"/>
     240        <HasResources Value="True"/>
     241        <ResourceBaseClass Value="Form"/>
    239242      </Unit17>
    240243      <Unit18>
    241         <Filename Value="Forms\UFormNameDetails.pas"/>
    242         <IsPartOfProject Value="True"/>
    243         <ComponentName Value="FormNameDetails"/>
     244        <Filename Value="Forms\UFormSource.pas"/>
     245        <IsPartOfProject Value="True"/>
     246        <ComponentName Value="FormSource"/>
    244247        <HasResources Value="True"/>
    245248        <ResourceBaseClass Value="Form"/>
    246249      </Unit18>
    247250      <Unit19>
    248         <Filename Value="Forms\UFormSource.pas"/>
    249         <IsPartOfProject Value="True"/>
    250         <ComponentName Value="FormSource"/>
    251         <HasResources Value="True"/>
    252         <ResourceBaseClass Value="Form"/>
     251        <Filename Value="UVCardHighlighter.pas"/>
     252        <IsPartOfProject Value="True"/>
    253253      </Unit19>
    254254      <Unit20>
    255         <Filename Value="UVCardHighlighter.pas"/>
    256         <IsPartOfProject Value="True"/>
     255        <Filename Value="Forms\UFormCompare.pas"/>
     256        <IsPartOfProject Value="True"/>
     257        <ComponentName Value="FormCompare"/>
     258        <HasResources Value="True"/>
     259        <ResourceBaseClass Value="Form"/>
    257260      </Unit20>
    258261      <Unit21>
    259         <Filename Value="Forms\UFormCompare.pas"/>
    260         <IsPartOfProject Value="True"/>
    261         <ComponentName Value="FormCompare"/>
    262         <HasResources Value="True"/>
    263         <ResourceBaseClass Value="Form"/>
     262        <Filename Value="Diff.pas"/>
     263        <IsPartOfProject Value="True"/>
    264264      </Unit21>
    265265      <Unit22>
    266         <Filename Value="Diff.pas"/>
     266        <Filename Value="UTestCases.pas"/>
    267267        <IsPartOfProject Value="True"/>
    268268      </Unit22>
    269269      <Unit23>
    270         <Filename Value="UTestCases.pas"/>
     270        <Filename Value="UVCardFile.pas"/>
    271271        <IsPartOfProject Value="True"/>
    272272      </Unit23>
    273       <Unit24>
    274         <Filename Value="UVCardFile.pas"/>
    275         <IsPartOfProject Value="True"/>
    276       </Unit24>
    277273    </Units>
    278274  </ProjectOptions>
Note: See TracChangeset for help on using the changeset viewer.