Changeset 149 for trunk/Forms/FormContacts.pas
- Timestamp:
- Jun 5, 2023, 8:45:38 PM (18 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormContacts.pas
r148 r149 1 unit UFormContacts;1 unit FormContacts; 2 2 3 3 interface … … 100 100 end; 101 101 102 var103 FormContacts: TFormContacts;104 105 102 106 103 implementation … … 109 106 110 107 uses 111 UFormContact, UCore, UVCardFile, UFormColumns;108 FormContact, Core, VCardFile, FormColumns; 112 109 113 110 resourcestring … … 386 383 procedure TFormContacts.FormShow(Sender: TObject); 387 384 begin 388 Core. Translator.TranslateComponentRecursive(Self);389 Core. ThemeManager1.UseTheme(Self);390 Core. PersistentForm1.Load(Self);385 Core.Core.Translator.TranslateComponentRecursive(Self); 386 Core.Core.ThemeManager1.UseTheme(Self); 387 Core.Core.PersistentForm1.Load(Self); 391 388 LoadFromRegistry(Context); 392 389 ReloadList; … … 408 405 FormContact.OnGetPrevious := GetPreviousContact; 409 406 FormContact.OnGetNext := GetNextContact; 410 Contact.Properties.AddNew('VERSION', Core. DefaultVcardVersion);407 Contact.Properties.AddNew('VERSION', Core.Core.DefaultVcardVersion); 411 408 if FormContact.ShowModal = mrOK then begin 412 409 Contacts.Add(Contact); 413 Core. DataFile.Modified := True;410 Core.Core.DataFile.Modified := True; 414 411 ReloadList; 415 412 UpdateInterface; … … 442 439 Contacts.Add(Contact); 443 440 Contact := nil; 444 Core. DataFile.Modified := True;441 Core.Core.DataFile.Modified := True; 445 442 ReloadList; 446 443 UpdateInterface; … … 548 545 TempFile.Free; 549 546 end; 550 OpenDialog1.InitialDir := ExtractFileDir(Core. LastContactFileName);551 OpenDialog1.FileName := ExtractFileName(Core. LastContactFileName);547 OpenDialog1.InitialDir := ExtractFileDir(Core.Core.LastContactFileName); 548 OpenDialog1.FileName := ExtractFileName(Core.Core.LastContactFileName); 552 549 if OpenDialog1.Execute then begin 553 550 TContact(ListView1.Selected.Data).LoadFromFile(OpenDialog1.FileName); 554 Core. LastContactFileName := OpenDialog1.FileName;551 Core.Core.LastContactFileName := OpenDialog1.FileName; 555 552 ReloadList; 556 553 end; … … 574 571 if FormContact.ShowModal = mrOK then begin 575 572 if not TContact(ListView1.Selected.Data).CompareTo(Contact) then 576 Core. DataFile.Modified := True;573 Core.Core.DataFile.Modified := True; 577 574 TContact(ListView1.Selected.Data).Assign(Contact); 578 575 ReloadList; … … 602 599 PasteContacts.VCard.Contacts); 603 600 end else Contacts.AddContacts(PasteContacts.VCard.Contacts); 604 Core. DataFile.Modified := True;601 Core.Core.DataFile.Modified := True; 605 602 ReloadList; 606 603 UpdateInterface; … … 623 620 Contacts.Delete(Contacts.IndexOf(ListView1.Items[I].Data)); 624 621 end; 625 Core. DataFile.Modified := True;622 Core.Core.DataFile.Modified := True; 626 623 ReloadList; 627 624 UpdateInterface; … … 641 638 TempFile.Free; 642 639 end; 643 SaveDialog1.InitialDir := ExtractFileDir(Core. LastContactFileName);640 SaveDialog1.InitialDir := ExtractFileDir(Core.Core.LastContactFileName); 644 641 SaveDialog1.FileName := TContact(ListView1.Selected.Data).FullNameToFileName + 645 642 VCardFileExt; 646 643 if SaveDialog1.Execute then begin 647 644 TContact(ListView1.Selected.Data).SaveToFile(SaveDialog1.FileName); 648 Core. LastContactFileName := SaveDialog1.FileName;645 Core.Core.LastContactFileName := SaveDialog1.FileName; 649 646 end; 650 647 end; … … 674 671 begin 675 672 SaveToRegistry(Context); 676 Core. PersistentForm1.Save(Self);673 Core.Core.PersistentForm1.Save(Self); 677 674 end; 678 675
Note:
See TracChangeset
for help on using the changeset viewer.