diff --git a/components/tvplanit/examples/datastores/flex/access/tools/camain.pas b/components/tvplanit/examples/datastores/flex/access/tools/camain.pas index 6175955a5..8a675242d 100644 --- a/components/tvplanit/examples/datastores/flex/access/tools/camain.pas +++ b/components/tvplanit/examples/datastores/flex/access/tools/camain.pas @@ -173,8 +173,9 @@ begin 'LastName VARCHAR(50) , '+ 'Birthdate DATE, '+ 'Anniversary DATE, '+ - 'Title VARCHAR(50) ,'+ - 'Company VARCHAR(50) ,'+ + 'Title VARCHAR(50), '+ + 'Company VARCHAR(50), '+ + 'Department VARCHAR(50), '+ 'Job_Position VARCHAR(30), '+ 'AddressType1 INTEGER, '+ 'Address1 VARCHAR(100), '+ @@ -210,7 +211,6 @@ begin 'WebsiteType1 INTEGER, '+ 'WebsiteType2 INTEGER, '+ 'Category INTEGER, '+ - 'PathToPhoto VARCHAR(255), '+ 'Custom1 VARCHAR(100), '+ 'Custom2 VARCHAR(100),'+ 'Custom3 VARCHAR(100), '+ diff --git a/components/tvplanit/examples/datastores/flex/access/unit1.lfm b/components/tvplanit/examples/datastores/flex/access/unit1.lfm index 2b6dc99cd..20692b735 100644 --- a/components/tvplanit/examples/datastores/flex/access/unit1.lfm +++ b/components/tvplanit/examples/datastores/flex/access/unit1.lfm @@ -886,16 +886,30 @@ object Form1: TForm1 ' FirstName = :FirstName,' ' LastName = :LastName,' ' Title = :Title,' - ' Company = :Company,' - ' Job_Position = :Job_Position,' - ' EMail = :EMail,' - ' Address = :Address,' - ' City = :City,' - ' State = :State,' - ' Zip = :Zip,' - ' Country = :Country,' - ' Notes = :Notes,' ' Category = :Category,' + ' BirthDate = :Birthdate,' + ' Company = :Company,' + ' Department = :Department,' + ' Job_Position = :Job_Position,' + ' AddressType1 = :AddressType1,' + ' Address1 = :Address1,' + ' City1 = :City1,' + ' State1 = :State1,' + ' Zip1 = :Zip1,' + ' Country1 = :Country1,' + ' AddressType2 = :AddressType2,' + ' Address2 = :Address2,' + ' City2 = :City2,' + ' State2 = :State2,' + ' Zip2 = :Zip2,' + ' Country2 = :Country2,' + ' Notes = :Notes,' + ' EMail1 = :EMail1,' + ' EMail2 = :EMail2,' + ' EMail3 = :EMail3,' + ' EMailType1 = :EMailType1,' + ' EMailType2 = :EMailType2,' + ' EMailType3 = :EMailType3,' ' Phone1 = :Phone1,' ' Phone2 = :Phone2,' ' Phone3 = :Phone3,' @@ -906,6 +920,10 @@ object Form1: TForm1 ' PhoneType3 = :PhoneType3,' ' PhoneType4 = :PhoneType4,' ' PhoneType5 = :PhoneType5,' + ' Website1 = :Website1,' + ' Website2 = :Website2,' + ' WebsiteType1 = :WebsiteType1,' + ' WebsiteType2 = :WebsiteType2,' ' Custom1 = :Custom1,' ' Custom2 = :Custom2,' ' Custom3 = :Custom3,' diff --git a/components/tvplanit/examples/datastores/flex/sqlite3/unit1.pas b/components/tvplanit/examples/datastores/flex/sqlite3/unit1.pas index d08311568..af079af7f 100644 --- a/components/tvplanit/examples/datastores/flex/sqlite3/unit1.pas +++ b/components/tvplanit/examples/datastores/flex/sqlite3/unit1.pas @@ -153,6 +153,7 @@ begin '"Anniversary" DATETIME, '+ '"Title" VARCHAR(50), '+ '"Company" VARCHAR(50), '+ + '"Department" VARCHAR(50), '+ '"Job_Position" VARCHAR(30), '+ '"AddressType1" INTEGER, '+ '"Address1" VARCHAR(100), '+ @@ -167,7 +168,6 @@ begin '"Zip2" VARCHAR(10), '+ '"Country2" VARCHAR(25), '+ '"Notes" VARCHAR(1024), '+ - '"PathToPhoto" VARCHAR(255), '+ '"Category" INTEGER, '+ '"Phone1" VARCHAR(25), '+ '"Phone2" VARCHAR(25), '+ diff --git a/components/tvplanit/languages/vpsr.de.po b/components/tvplanit/languages/vpsr.de.po index 7e251d1f9..e6b49f850 100644 --- a/components/tvplanit/languages/vpsr.de.po +++ b/components/tvplanit/languages/vpsr.de.po @@ -31,6 +31,10 @@ msgstr "1 Woche" msgid "No resources have been defined. Would you like to add one now?" msgstr "Es sind noch keine Ressourcen definiert. Möchten Sie jetzt eine hinzufügen?" +#: vpsr.rsaddresses +msgid "Addresses" +msgstr "Adressen" + #: vpsr.rsaddresslbl msgid "Address:" msgstr "Adresse:" @@ -120,7 +124,6 @@ msgid "Brush" msgstr "Füllung" #: vpsr.rsbusinesswebsitelabel -#, fuzzy msgctxt "vpsr.rsbusinesswebsitelabel" msgid "Business" msgstr "Geschäftlich" @@ -317,6 +320,10 @@ msgctxt "vpsr.rsdeletebtn" msgid "Delete" msgstr "Löschen" +#: vpsr.rsdepartmentlbl +msgid "Department:" +msgstr "Abteilung:" + #: vpsr.rsdescriptionlbl msgctxt "vpsr.rsdescriptionlbl" msgid "Description:" @@ -345,7 +352,7 @@ msgid "Print preview" msgstr "Druckvorschau" #: vpsr.rsdlgreseditcaption -msgid "Resource Edit" +msgid "Resource edit" msgstr "Ressource bearbeiten" #: vpsr.rsdlgreseditdescription @@ -358,7 +365,7 @@ msgid "Task" msgstr "Aufgabe" #: vpsr.rsduedate -msgid "Due Date:" +msgid "Due date:" msgstr "Fälligkeitsdatum:" #: vpsr.rsduplicateresource @@ -471,14 +478,16 @@ msgstr "Von Ihrem Zeitplan?" msgid "Height" msgstr "Höhe" +#: vpsr.rshomeaddress +msgid "Home address" +msgstr "Zuhause" + #: vpsr.rshomeaddresslabel -#, fuzzy msgctxt "vpsr.rshomeaddresslabel" msgid "Home" msgstr "Zuhause" #: vpsr.rshomeemaillabel -#, fuzzy msgctxt "vpsr.rshomeemaillabel" msgid "Home" msgstr "Zuhause" @@ -737,7 +746,6 @@ msgid "&Open Item" msgstr "Eintrag ö&ffnen" #: vpsr.rsotheremaillabel -#, fuzzy msgctxt "vpsr.rsotheremaillabel" msgid "Other" msgstr "Andere" @@ -775,11 +783,14 @@ msgid "This operation cannot be undone!" msgstr "Diese Operation kann nicht rückgängig gemacht werden!" #: vpsr.rspersonalwebsitelabel -#, fuzzy msgctxt "vpsr.rspersonalwebsitelabel" msgid "Personal" msgstr "Persönlich" +#: vpsr.rsphonefax +msgid "Phone/fax" +msgstr "Telefon/Fax" + #: vpsr.rsphonetypelabel1 msgid "Assistant" msgstr "Assistent" @@ -1180,6 +1191,10 @@ msgstr "Sichtbar" msgid "Visual" msgstr "Aussehen" +#: vpsr.rswebsites +msgid "Websites" +msgstr "Internet-Seiten" + #: vpsr.rswednesday msgid "Wednesday" msgstr "Mittwoch" @@ -1208,14 +1223,16 @@ msgstr "Breite" msgid "Width:" msgstr "Breite:" +#: vpsr.rsworkaddress +msgid "Work address" +msgstr "Arbeit" + #: vpsr.rsworkaddresslabel -#, fuzzy msgctxt "vpsr.rsworkaddresslabel" msgid "Work" msgstr "Arbeit" #: vpsr.rsworkemaillabel -#, fuzzy msgctxt "vpsr.rsworkemaillabel" msgid "Work" msgstr "Arbeit" @@ -1544,4 +1561,3 @@ msgstr "Unbekannte Achsen-Spezifikation: %s" #: vpsr.sxmldecnotatbeg msgid "The XML declaration must appear before the first element" msgstr "Die XML-Deklaration muss vor dem ersten Element erscheinen." - diff --git a/components/tvplanit/languages/vpsr.fr.po b/components/tvplanit/languages/vpsr.fr.po index 78a2954e8..50dff8f87 100644 --- a/components/tvplanit/languages/vpsr.fr.po +++ b/components/tvplanit/languages/vpsr.fr.po @@ -37,6 +37,10 @@ msgstr "1 semaine" msgid "No resources have been defined. Would you like to add one now?" msgstr "Aucune ressource à été defini. Voulez-vous ajouter une maintenant?" +#: vpsr.rsaddresses +msgid "Addresses" +msgstr "" + #: vpsr.rsaddresslbl msgid "Address:" msgstr "Adresse:" @@ -323,6 +327,10 @@ msgctxt "vpsr.rsdeletebtn" msgid "Delete" msgstr "Supprimer" +#: vpsr.rsdepartmentlbl +msgid "Department:" +msgstr "" + #: vpsr.rsdescriptionlbl msgctxt "vpsr.rsdescriptionlbl" msgid "Description:" @@ -351,7 +359,9 @@ msgid "Print preview" msgstr "Aperçu avant impression" #: vpsr.rsdlgreseditcaption -msgid "Resource Edit" +#, fuzzy +#| msgid "Resource Edit" +msgid "Resource edit" msgstr "Modifier la resource" #: vpsr.rsdlgreseditdescription @@ -364,7 +374,9 @@ msgid "Task" msgstr "Tache" #: vpsr.rsduedate -msgid "Due Date:" +#, fuzzy +#| msgid "Due Date:" +msgid "Due date:" msgstr "Date d'échéance:" #: vpsr.rsduplicateresource @@ -477,6 +489,10 @@ msgstr "de votre agenda?" msgid "Height" msgstr "" +#: vpsr.rshomeaddress +msgid "Home address" +msgstr "" + #: vpsr.rshomeaddresslabel #, fuzzy msgctxt "vpsr.rshomeaddresslabel" @@ -786,6 +802,10 @@ msgctxt "vpsr.rspersonalwebsitelabel" msgid "Personal" msgstr "Personnel" +#: vpsr.rsphonefax +msgid "Phone/fax" +msgstr "" + #: vpsr.rsphonetypelabel1 msgid "Assistant" msgstr "Assistante" @@ -1186,6 +1206,10 @@ msgstr "" msgid "Visual" msgstr "" +#: vpsr.rswebsites +msgid "Websites" +msgstr "" + #: vpsr.rswednesday msgid "Wednesday" msgstr "Mercredi" @@ -1214,6 +1238,10 @@ msgstr "" msgid "Width:" msgstr "" +#: vpsr.rsworkaddress +msgid "Work address" +msgstr "" + #: vpsr.rsworkaddresslabel #, fuzzy msgctxt "vpsr.rsworkaddresslabel" diff --git a/components/tvplanit/languages/vpsr.nl.po b/components/tvplanit/languages/vpsr.nl.po index 3d8989cf1..40f19641e 100644 --- a/components/tvplanit/languages/vpsr.nl.po +++ b/components/tvplanit/languages/vpsr.nl.po @@ -31,6 +31,10 @@ msgstr "1 week" msgid "No resources have been defined. Would you like to add one now?" msgstr "Er is nog geen hulpmiddel gedefinieerd. Wilt u er nu een toevoegen?" +#: vpsr.rsaddresses +msgid "Addresses" +msgstr "" + #: vpsr.rsaddresslbl msgid "Address:" msgstr "Adres:" @@ -317,6 +321,10 @@ msgctxt "vpsr.rsdeletebtn" msgid "Delete" msgstr "Wissen" +#: vpsr.rsdepartmentlbl +msgid "Department:" +msgstr "" + #: vpsr.rsdescriptionlbl msgctxt "vpsr.rsdescriptionlbl" msgid "Description:" @@ -345,7 +353,9 @@ msgid "Print preview" msgstr "Afdruk voorbeeld" #: vpsr.rsdlgreseditcaption -msgid "Resource Edit" +#, fuzzy +#| msgid "Resource Edit" +msgid "Resource edit" msgstr "Middel bewerken" #: vpsr.rsdlgreseditdescription @@ -358,7 +368,9 @@ msgid "Task" msgstr "Taak" #: vpsr.rsduedate -msgid "Due Date:" +#, fuzzy +#| msgid "Due Date:" +msgid "Due date:" msgstr "Vervaldatum:" #: vpsr.rsduplicateresource @@ -471,6 +483,10 @@ msgstr "van uw tijdschema?" msgid "Height" msgstr "" +#: vpsr.rshomeaddress +msgid "Home address" +msgstr "" + #: vpsr.rshomeaddresslabel #, fuzzy msgctxt "vpsr.rshomeaddresslabel" @@ -780,6 +796,10 @@ msgctxt "vpsr.rspersonalwebsitelabel" msgid "Personal" msgstr "Persoonlijk" +#: vpsr.rsphonefax +msgid "Phone/fax" +msgstr "" + #: vpsr.rsphonetypelabel1 msgid "Assistant" msgstr "Assistent" @@ -1180,6 +1200,10 @@ msgstr "" msgid "Visual" msgstr "" +#: vpsr.rswebsites +msgid "Websites" +msgstr "" + #: vpsr.rswednesday msgid "Wednesday" msgstr "Woensdag" @@ -1208,6 +1232,10 @@ msgstr "" msgid "Width:" msgstr "" +#: vpsr.rsworkaddress +msgid "Work address" +msgstr "" + #: vpsr.rsworkaddresslabel #, fuzzy msgctxt "vpsr.rsworkaddresslabel" diff --git a/components/tvplanit/languages/vpsr.po b/components/tvplanit/languages/vpsr.po index ffdb389af..958a697c1 100644 --- a/components/tvplanit/languages/vpsr.po +++ b/components/tvplanit/languages/vpsr.po @@ -21,6 +21,10 @@ msgstr "" msgid "No resources have been defined. Would you like to add one now?" msgstr "" +#: vpsr.rsaddresses +msgid "Addresses" +msgstr "" + #: vpsr.rsaddresslbl msgid "Address:" msgstr "" @@ -306,6 +310,10 @@ msgctxt "vpsr.rsdeletebtn" msgid "Delete" msgstr "" +#: vpsr.rsdepartmentlbl +msgid "Department:" +msgstr "" + #: vpsr.rsdescriptionlbl msgctxt "vpsr.rsdescriptionlbl" msgid "Description:" @@ -334,7 +342,7 @@ msgid "Print preview" msgstr "" #: vpsr.rsdlgreseditcaption -msgid "Resource Edit" +msgid "Resource edit" msgstr "" #: vpsr.rsdlgreseditdescription @@ -347,7 +355,7 @@ msgid "Task" msgstr "" #: vpsr.rsduedate -msgid "Due Date:" +msgid "Due date:" msgstr "" #: vpsr.rsduplicateresource @@ -460,6 +468,10 @@ msgstr "" msgid "Height" msgstr "" +#: vpsr.rshomeaddress +msgid "Home address" +msgstr "" + #: vpsr.rshomeaddresslabel msgctxt "vpsr.rshomeaddresslabel" msgid "Home" @@ -765,6 +777,10 @@ msgctxt "vpsr.rspersonalwebsitelabel" msgid "Personal" msgstr "" +#: vpsr.rsphonefax +msgid "Phone/fax" +msgstr "" + #: vpsr.rsphonetypelabel1 msgid "Assistant" msgstr "" @@ -1165,6 +1181,10 @@ msgstr "" msgid "Visual" msgstr "" +#: vpsr.rswebsites +msgid "Websites" +msgstr "" + #: vpsr.rswednesday msgid "Wednesday" msgstr "" @@ -1193,6 +1213,10 @@ msgstr "" msgid "Width:" msgstr "" +#: vpsr.rsworkaddress +msgid "Work address" +msgstr "" + #: vpsr.rsworkaddresslabel msgctxt "vpsr.rsworkaddresslabel" msgid "Work" diff --git a/components/tvplanit/languages/vpsr.ru.po b/components/tvplanit/languages/vpsr.ru.po index 7ea2bd0ba..1471f9f32 100644 --- a/components/tvplanit/languages/vpsr.ru.po +++ b/components/tvplanit/languages/vpsr.ru.po @@ -31,6 +31,10 @@ msgstr "1 неделя" msgid "No resources have been defined. Would you like to add one now?" msgstr "Не определены ресурсы. Вы хотите добавить ресурс сейчас?" +#: vpsr.rsaddresses +msgid "Addresses" +msgstr "" + #: vpsr.rsaddresslbl msgid "Address:" msgstr "Адрес:" @@ -317,6 +321,10 @@ msgctxt "vpsr.rsdeletebtn" msgid "Delete" msgstr "Удалить" +#: vpsr.rsdepartmentlbl +msgid "Department:" +msgstr "" + #: vpsr.rsdescriptionlbl msgctxt "vpsr.rsdescriptionlbl" msgid "Description:" @@ -345,7 +353,9 @@ msgid "Print preview" msgstr "Предварительный просмотр печати" #: vpsr.rsdlgreseditcaption -msgid "Resource Edit" +#, fuzzy +#| msgid "Resource Edit" +msgid "Resource edit" msgstr "Редактор ресурсов" #: vpsr.rsdlgreseditdescription @@ -358,7 +368,9 @@ msgid "Task" msgstr "Задача" #: vpsr.rsduedate -msgid "Due Date:" +#, fuzzy +#| msgid "Due Date:" +msgid "Due date:" msgstr "Срок:" #: vpsr.rsduplicateresource @@ -471,6 +483,10 @@ msgstr "из вашего расписания?" msgid "Height" msgstr "Высота" +#: vpsr.rshomeaddress +msgid "Home address" +msgstr "" + #: vpsr.rshomeaddresslabel #, fuzzy msgctxt "vpsr.rshomeaddresslabel" @@ -780,6 +796,10 @@ msgctxt "vpsr.rspersonalwebsitelabel" msgid "Personal" msgstr "Персонал" +#: vpsr.rsphonefax +msgid "Phone/fax" +msgstr "" + #: vpsr.rsphonetypelabel1 msgid "Assistant" msgstr "Ассистент" @@ -1180,6 +1200,10 @@ msgstr "" msgid "Visual" msgstr "" +#: vpsr.rswebsites +msgid "Websites" +msgstr "" + #: vpsr.rswednesday msgid "Wednesday" msgstr "Среда" @@ -1208,6 +1232,10 @@ msgstr "" msgid "Width:" msgstr "" +#: vpsr.rsworkaddress +msgid "Work address" +msgstr "" + #: vpsr.rsworkaddresslabel #, fuzzy msgctxt "vpsr.rsworkaddresslabel" diff --git a/components/tvplanit/source/addons/zeos/vpzeosds.pas b/components/tvplanit/source/addons/zeos/vpzeosds.pas index 75237f218..86bf06dbc 100644 --- a/components/tvplanit/source/addons/zeos/vpzeosds.pas +++ b/components/tvplanit/source/addons/zeos/vpzeosds.pas @@ -94,10 +94,10 @@ begin 'LastName VARCHAR(50), '+ 'Title VARCHAR(20) ,'+ 'Category INTEGER, '+ - 'PathToPhoto VARCHAR(255), '+ 'Birthdate DATE, '+ 'Anniversary DATE, '+ - 'Company VARCHAR(50) ,'+ + 'Company VARCHAR(50), '+ + 'Department VARCHAR(50), '+ 'Job_Position VARCHAR(30), '+ 'AddressType1 INTEGER, '+ 'Address1 VARCHAR(100), '+ diff --git a/components/tvplanit/source/vpcontacteditdlg.lfm b/components/tvplanit/source/vpcontacteditdlg.lfm index c21ede7f9..e9d4d2477 100644 --- a/components/tvplanit/source/vpcontacteditdlg.lfm +++ b/components/tvplanit/source/vpcontacteditdlg.lfm @@ -1,485 +1,1252 @@ object ContactEditForm: TContactEditForm - Left = 311 - Height = 382 - Top = 245 - Width = 433 + Left = 679 + Height = 629 + Top = 224 + Width = 575 HorzScrollBar.Page = 432 VertScrollBar.Page = 320 - ActiveControl = tsContacts + ActiveControl = PageControl Caption = 'ContactEdit' - ClientHeight = 382 - ClientWidth = 433 + ClientHeight = 629 + ClientWidth = 575 OnCreate = FormCreate OnKeyDown = FormKeyDown OnShow = FormShow Position = poScreenCenter LCLVersion = '1.7' - object tsContacts: TPageControl + object PageControl: TPageControl Left = 0 - Height = 341 + Height = 592 Top = 0 - Width = 433 - ActivePage = tabContact + Width = 575 + ActivePage = tabAddresses Align = alClient TabIndex = 1 TabOrder = 0 - OnChange = tsContactsChange - object tabMain: TTabSheet - Caption = 'RSMasterData' - ClientHeight = 313 - ClientWidth = 425 - object LastNameLbl: TLabel + OnChange = PageControlChange + object tabBaseData: TTabSheet + Caption = 'tabBaseData' + ClientHeight = 560 + ClientWidth = 472 + ImageIndex = 0 + object lblLastName: TLabel Left = 9 Height = 15 Top = 6 Width = 54 Alignment = taRightJustify + BorderSpacing.Left = 8 Caption = 'Last name' - FocusControl = LastNameEdit + FocusControl = edLastName ParentColor = False end - object AddrLbl: TLabel - Left = 8 - Height = 15 - Top = 81 - Width = 42 - Alignment = taRightJustify - Caption = 'Address' - FocusControl = AddressEdit - ParentColor = False - end - object CityLbl: TLabel - Left = 8 - Height = 15 - Top = 104 - Width = 21 - Alignment = taRightJustify - Caption = 'City' - FocusControl = CityEdit - ParentColor = False - end - object StateLbl: TLabel - Left = 8 - Height = 15 - Top = 129 - Width = 26 - Alignment = taRightJustify - Caption = 'State' - FocusControl = cboxState - ParentColor = False - end - object ZipLbl: TLabel - Left = 8 - Height = 15 - Top = 153 - Width = 48 - Alignment = taRightJustify - Caption = 'Zip Code' - FocusControl = ZipCodeEdit - ParentColor = False - end - object CountryLbl: TLabel - Left = 8 - Height = 15 - Top = 177 - Width = 43 - Alignment = taRightJustify - Caption = 'Country' - FocusControl = cboxCountry - ParentColor = False - end - object PositionLbl: TLabel - Left = 8 - Height = 15 - Top = 226 - Width = 43 - Alignment = taRightJustify - Caption = 'Position' - FocusControl = PositionEdit - ParentColor = False - end - object TitleLbl: TLabel - Left = 8 - Height = 15 - Top = 58 - Width = 23 - Alignment = taRightJustify - Caption = 'Title' - FocusControl = TitleEdit - ParentColor = False - end - object CompanyLbl: TLabel - Left = 8 - Height = 15 - Top = 202 - Width = 52 - Alignment = taRightJustify - Caption = 'Company' - FocusControl = CompanyEdit - ParentColor = False - end - object CategoryLbl: TLabel - Left = 8 - Height = 15 - Top = 253 - Width = 48 - Alignment = taRightJustify - Caption = 'Category' - FocusControl = cboxCategory - ParentColor = False - end - object LastNameEdit: TEdit + object edLastName: TEdit Left = 136 Height = 23 Top = 6 - Width = 247 + Width = 232 + BorderSpacing.Right = 8 MaxLength = 100 OnChange = ItemChanged TabOrder = 0 end - object AddressEdit: TEdit - Left = 136 - Height = 23 - Top = 79 - Width = 247 - MaxLength = 100 - OnChange = ItemChanged - TabOrder = 3 - end - object CityEdit: TEdit - Left = 136 - Height = 23 - Top = 103 - Width = 247 - MaxLength = 50 - OnChange = ItemChanged - TabOrder = 4 - end - object StateEdit: TEdit - Left = 168 - Height = 23 - Top = 127 - Width = 247 - MaxLength = 25 - OnChange = ItemChanged - TabOrder = 6 - end - object ZipCodeEdit: TEdit - Left = 136 - Height = 23 - Top = 151 - Width = 153 - MaxLength = 10 - OnChange = ItemChanged - TabOrder = 7 - end - object PositionEdit: TEdit - Left = 136 - Height = 23 - Top = 224 - Width = 152 - MaxLength = 50 - OnChange = ItemChanged - TabOrder = 11 - end - object TitleEdit: TEdit - Left = 136 - Height = 23 - Top = 56 - Width = 153 - MaxLength = 50 - OnChange = ItemChanged - TabOrder = 2 - end - object CompanyEdit: TEdit - Left = 136 - Height = 23 - Top = 200 - Width = 247 - MaxLength = 50 - OnChange = ItemChanged - TabOrder = 10 - end - object cboxCategory: TComboBox - Left = 136 - Height = 23 - Top = 251 - Width = 153 - ItemHeight = 15 - MaxLength = 65535 - TabOrder = 12 - end - object cboxState: TComboBox - Left = 136 - Height = 23 - Top = 127 - Width = 247 - ItemHeight = 15 - MaxLength = 65535 - TabOrder = 5 - Visible = False - end - object edtCountry: TEdit - Left = 152 - Height = 23 - Top = 175 - Width = 249 - TabOrder = 9 - end - object cboxCountry: TComboBox - Left = 136 - Height = 23 - Top = 175 - Width = 247 - ItemHeight = 15 - MaxLength = 65535 - OnChange = cboxCountryChange - TabOrder = 8 - end - object FirstNameEdit: TEdit - Left = 136 - Height = 23 - Top = 29 - Width = 247 - MaxLength = 100 - OnChange = ItemChanged - TabOrder = 1 - end - object FirstNameLbl: TLabel + object lblFirstName: TLabel Left = 8 Height = 15 Top = 31 Width = 55 Alignment = taRightJustify + BorderSpacing.Left = 8 Caption = 'First name' - FocusControl = FirstNameEdit + FocusControl = edFirstName ParentColor = False end - object BirthdateEdit: TDateEdit + object edFirstName: TEdit Left = 136 Height = 23 - Top = 280 + Top = 29 + Width = 232 + BorderSpacing.Right = 8 + MaxLength = 100 + OnChange = ItemChanged + TabOrder = 1 + end + object lblTitle: TLabel + Left = 8 + Height = 15 + Top = 58 + Width = 23 + Alignment = taRightJustify + BorderSpacing.Left = 8 + Caption = 'Title' + FocusControl = edTitle + ParentColor = False + end + object edTitle: TEdit + Left = 136 + Height = 23 + Top = 56 + Width = 153 + MaxLength = 50 + OnChange = ItemChanged + TabOrder = 2 + end + object lblCategory: TLabel + Left = 8 + Height = 15 + Top = 90 + Width = 48 + Alignment = taRightJustify + BorderSpacing.Left = 8 + Caption = 'Category' + FocusControl = cbCategory + ParentColor = False + end + object cbCategory: TComboBox + Left = 136 + Height = 23 + Top = 88 + Width = 153 + ItemHeight = 15 + MaxLength = 65535 + TabOrder = 3 + end + object lblBirthdate: TLabel + Left = 16 + Height = 15 + Top = 124 + Width = 51 + Alignment = taRightJustify + BorderSpacing.Left = 8 + Caption = 'Birth date' + FocusControl = edBirthdate + ParentColor = False + end + object edBirthdate: TDateEdit + Left = 136 + Height = 23 + Top = 120 Width = 153 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] DateOrder = doNone ButtonWidth = 23 + BorderSpacing.Bottom = 8 NumGlyphs = 1 MaxLength = 0 - TabOrder = 13 - Text = 'BirthdateEdit' + ParentFont = False + TabOrder = 4 + Text = 'edBirthdate' end - object BirthdateLbl: TLabel + end + object tabAddresses: TTabSheet + Caption = 'tabAddresses' + ClientHeight = 564 + ClientWidth = 567 + ImageIndex = 1 + object gbWorkAddress: TGroupBox Left = 8 - Height = 15 - Top = 284 - Width = 51 - Alignment = taRightJustify - Caption = 'Birth date' - FocusControl = BirthdateEdit - ParentColor = False + Height = 311 + Top = 8 + Width = 551 + Align = alTop + AutoSize = True + BorderSpacing.Left = 8 + BorderSpacing.Top = 8 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + Caption = 'gbWorkAddress' + ClientHeight = 291 + ClientWidth = 547 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + object edCompany: TEdit + AnchorSideTop.Control = gbWorkAddress + AnchorSideRight.Control = gbWorkAddress + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 0 + Width = 338 + Anchors = [akTop, akRight] + AutoSize = False + BorderSpacing.Right = 8 + MaxLength = 50 + OnChange = ItemChanged + ParentFont = False + TabOrder = 0 + end + object lblCompany: TLabel + AnchorSideTop.Control = edCompany + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 128 + Height = 15 + Top = 4 + Width = 65 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCompany' + FocusControl = edCompany + ParentColor = False + ParentFont = False + end + object lblDepartment: TLabel + AnchorSideTop.Control = edDepartment + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 117 + Height = 15 + Top = 31 + Width = 76 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblDepartment' + FocusControl = edDepartment + ParentColor = False + ParentFont = False + end + object edDepartment: TEdit + AnchorSideLeft.Control = edCompany + AnchorSideTop.Control = edCompany + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edCompany + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 27 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + MaxLength = 50 + OnChange = ItemChanged + ParentFont = False + TabOrder = 1 + end + object lblPosition: TLabel + AnchorSideTop.Control = edPosition + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 137 + Height = 15 + Top = 58 + Width = 56 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblPosition' + FocusControl = edPosition + ParentColor = False + ParentFont = False + end + object edPosition: TEdit + AnchorSideLeft.Control = edDepartment + AnchorSideTop.Control = edDepartment + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edDepartment + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 54 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Bottom = 17 + MaxLength = 50 + OnChange = ItemChanged + ParentFont = False + TabOrder = 2 + end + object lblAddressW: TLabel + AnchorSideTop.Control = edAddressW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 138 + Height = 15 + Top = 98 + Width = 55 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblAddress' + FocusControl = edAddressW + ParentColor = False + ParentFont = False + end + object edAddressW: TEdit + AnchorSideLeft.Control = edPosition + AnchorSideTop.Control = edPosition + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edPosition + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 94 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + MaxLength = 100 + OnChange = ItemChanged + ParentFont = False + TabOrder = 3 + end + object lblCityW: TLabel + AnchorSideTop.Control = edCityW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 159 + Height = 15 + Top = 125 + Width = 34 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCity' + FocusControl = edCityW + ParentColor = False + ParentFont = False + end + object edCityW: TEdit + AnchorSideLeft.Control = edAddressW + AnchorSideTop.Control = edAddressW + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edAddressW + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 121 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + MaxLength = 50 + OnChange = ItemChanged + ParentFont = False + TabOrder = 4 + end + object lblStateW: TLabel + AnchorSideTop.Control = edStateW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 154 + Height = 15 + Top = 152 + Width = 39 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblState' + FocusControl = edStateW + ParentColor = False + ParentFont = False + end + object edStateW: TEdit + AnchorSideLeft.Control = edCityW + AnchorSideTop.Control = edCityW + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edCityW + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 148 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 5 + end + object lblStateComboW: TLabel + AnchorSideTop.Control = cbStateW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 118 + Height = 15 + Top = 179 + Width = 79 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 4 + Caption = 'lblStateCombo' + FocusControl = cbStateW + ParentColor = False + ParentFont = False + Visible = False + end + object cbStateW: TComboBox + AnchorSideLeft.Control = edStateW + AnchorSideTop.Control = edStateW + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edStateW + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 175 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 6 + Visible = False + end + object lblZipCodeW: TLabel + AnchorSideTop.Control = edZipCodeW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 135 + Height = 15 + Top = 206 + Width = 58 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblZipCode' + FocusControl = edZipCodeW + ParentColor = False + ParentFont = False + end + object edZipCodeW: TEdit + AnchorSideLeft.Control = cbStateW + AnchorSideTop.Control = cbStateW + AnchorSideTop.Side = asrBottom + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 202 + Width = 120 + BorderSpacing.Top = 4 + BorderSpacing.Right = 8 + MaxLength = 10 + OnChange = ItemChanged + ParentFont = False + TabOrder = 7 + end + object lblCountryComboW: TLabel + AnchorSideTop.Control = cbCountryW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 97 + Height = 15 + Top = 233 + Width = 96 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCountryCombo' + FocusControl = cbCountryW + ParentColor = False + ParentFont = False + Visible = False + end + object cbCountryW: TComboBox + AnchorSideLeft.Control = edZipCodeW + AnchorSideTop.Control = edZipCodeW + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = gbWorkAddress + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 229 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + ItemHeight = 15 + MaxLength = 65535 + OnChange = cbCountryChange + ParentFont = False + TabOrder = 8 + Visible = False + end + object lblCountryW: TLabel + AnchorSideTop.Control = edCountryW + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCompany + Left = 137 + Height = 15 + Top = 264 + Width = 56 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCountry' + FocusControl = edCountryW + ParentColor = False + ParentFont = False + end + object edCountryW: TEdit + AnchorSideLeft.Control = cbCountryW + AnchorSideTop.Control = cbCountryW + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = gbWorkAddress + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 260 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + ParentFont = False + TabOrder = 9 + end + end + object gbHomeAddress: TGroupBox + Left = 8 + Height = 217 + Top = 335 + Width = 551 + Align = alTop + AutoSize = True + BorderSpacing.Left = 8 + BorderSpacing.Top = 16 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + Caption = 'gbHomeAddress' + ClientHeight = 197 + ClientWidth = 547 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 1 + object lblAddressH: TLabel + AnchorSideTop.Control = edAddressH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edAddressH + Left = 138 + Height = 15 + Top = 4 + Width = 55 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblAddress' + FocusControl = edAddressH + ParentColor = False + ParentFont = False + end + object edAddressH: TEdit + AnchorSideTop.Control = gbHomeAddress + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 0 + Width = 338 + Anchors = [akTop, akRight] + MaxLength = 100 + OnChange = ItemChanged + ParentFont = False + TabOrder = 0 + end + object lblCityH: TLabel + AnchorSideTop.Control = edCityH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCityH + Left = 159 + Height = 15 + Top = 31 + Width = 34 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCity' + FocusControl = edCityH + ParentColor = False + ParentFont = False + end + object edCityH: TEdit + AnchorSideLeft.Control = edAddressH + AnchorSideTop.Control = edAddressH + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edAddressH + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 27 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + MaxLength = 50 + OnChange = ItemChanged + ParentFont = False + TabOrder = 1 + end + object lblStateH: TLabel + AnchorSideTop.Control = edStateH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edStateH + Left = 154 + Height = 15 + Top = 58 + Width = 39 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblState' + FocusControl = edStateH + ParentColor = False + ParentFont = False + end + object edStateH: TEdit + AnchorSideLeft.Control = edCityH + AnchorSideTop.Control = edCityH + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edCityH + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 54 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 2 + end + object lblStateComboH: TLabel + AnchorSideTop.Control = cbStateH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = cbStateH + Left = 118 + Height = 15 + Top = 85 + Width = 79 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 4 + Caption = 'lblStateCombo' + FocusControl = cbStateH + ParentColor = False + ParentFont = False + Visible = False + end + object cbStateH: TComboBox + AnchorSideLeft.Control = edStateH + AnchorSideTop.Control = edStateH + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = edStateH + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 81 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 3 + Visible = False + end + object lblZipCodeH: TLabel + AnchorSideTop.Control = edZipCodeH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edZipCodeH + Left = 135 + Height = 15 + Top = 112 + Width = 58 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblZipCode' + FocusControl = edZipCodeH + ParentColor = False + ParentFont = False + end + object edZipCodeH: TEdit + AnchorSideLeft.Control = cbStateH + AnchorSideTop.Control = cbStateH + AnchorSideTop.Side = asrBottom + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 108 + Width = 120 + BorderSpacing.Top = 4 + BorderSpacing.Right = 8 + MaxLength = 10 + OnChange = ItemChanged + ParentFont = False + TabOrder = 4 + end + object lblCountryComboH: TLabel + AnchorSideTop.Control = cbCountryH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = cbCountryH + Left = 97 + Height = 15 + Top = 139 + Width = 96 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCountryCombo' + FocusControl = cbCountryH + ParentColor = False + ParentFont = False + Visible = False + end + object cbCountryH: TComboBox + AnchorSideLeft.Control = edZipCodeH + AnchorSideTop.Control = edZipCodeH + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = gbHomeAddress + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 135 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + ItemHeight = 15 + MaxLength = 65535 + OnChange = cbCountryChange + ParentFont = False + TabOrder = 5 + Visible = False + end + object lblCountryH: TLabel + AnchorSideTop.Control = edCountryH + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edCountryH + Left = 137 + Height = 15 + Top = 170 + Width = 56 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Right = 8 + Caption = 'lblCountry' + FocusControl = edCountryH + ParentColor = False + ParentFont = False + end + object edCountryH: TEdit + AnchorSideLeft.Control = cbCountryH + AnchorSideTop.Control = cbCountryH + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = gbHomeAddress + AnchorSideRight.Side = asrBottom + Left = 201 + Height = 23 + Top = 166 + Width = 338 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 4 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + ParentFont = False + TabOrder = 6 + end end end object tabContact: TTabSheet - Caption = 'RSContact' - ClientHeight = 313 - ClientWidth = 425 + Caption = 'tabContact' + ClientHeight = 564 + ClientWidth = 567 ImageIndex = 1 - object EMailLbl: TLabel - Left = 84 - Height = 15 - Top = 133 - Width = 45 - Caption = 'EMailLbl' - FocusControl = EMailEdit - ParentColor = False - end - object cboxPhoneLbl1: TComboBox + object gbPhone: TGroupBox + AnchorSideTop.Control = tabContact Left = 8 - Height = 23 + Height = 159 Top = 8 - Width = 121 - ItemHeight = 15 - MaxLength = 65535 + Width = 384 + BorderSpacing.Left = 8 + BorderSpacing.Top = 8 + BorderSpacing.Right = 8 + Caption = 'Phone / fax' + ClientHeight = 139 + ClientWidth = 380 + Font.Style = [fsBold] + ParentFont = False TabOrder = 0 + object cbPhone1: TComboBox + AnchorSideLeft.Control = gbPhone + Left = 8 + Height = 23 + Top = 0 + Width = 88 + BorderSpacing.Left = 8 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 0 + end + object cbPhone2: TComboBox + AnchorSideLeft.Control = gbPhone + AnchorSideTop.Control = cbPhone1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbPhone1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 27 + Width = 88 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 2 + end + object cbPhone3: TComboBox + AnchorSideLeft.Control = gbPhone + AnchorSideTop.Control = cbPhone2 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbPhone1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 54 + Width = 88 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 4 + end + object cbPhone4: TComboBox + AnchorSideLeft.Control = gbPhone + AnchorSideTop.Control = cbPhone3 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbPhone1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 81 + Width = 88 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 6 + end + object edPhone4: TEdit + AnchorSideLeft.Control = cbPhone4 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbPhone4 + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edPhone3 + AnchorSideRight.Side = asrBottom + Left = 100 + Height = 23 + Top = 81 + Width = 260 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 4 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 7 + end + object edPhone3: TEdit + AnchorSideLeft.Control = cbPhone3 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbPhone3 + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edPhone2 + AnchorSideRight.Side = asrBottom + Left = 100 + Height = 23 + Top = 54 + Width = 260 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 4 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 5 + end + object edPhone2: TEdit + AnchorSideLeft.Control = cbPhone2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbPhone2 + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edPhone1 + AnchorSideRight.Side = asrBottom + Left = 100 + Height = 23 + Top = 27 + Width = 260 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 4 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 3 + end + object edPhone1: TEdit + AnchorSideLeft.Control = cbPhone1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbPhone1 + AnchorSideTop.Side = asrCenter + Left = 100 + Height = 23 + Top = 0 + Width = 260 + BorderSpacing.Left = 4 + BorderSpacing.Right = 8 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 1 + end + object cbPhone5: TComboBox + AnchorSideLeft.Control = gbPhone + AnchorSideTop.Control = cbPhone4 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbPhone1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 108 + Width = 88 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 8 + end + object edPhone5: TEdit + AnchorSideLeft.Control = cbPhone5 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbPhone5 + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = edPhone4 + AnchorSideRight.Side = asrBottom + Left = 100 + Height = 23 + Top = 108 + Width = 260 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 4 + BorderSpacing.Bottom = 8 + MaxLength = 25 + OnChange = ItemChanged + ParentFont = False + TabOrder = 9 + end end - object cboxPhoneLbl2: TComboBox + object gbEMail: TGroupBox + AnchorSideTop.Control = gbPhone + AnchorSideTop.Side = asrBottom Left = 8 - Height = 23 - Top = 32 - Width = 121 - ItemHeight = 15 - MaxLength = 65535 - TabOrder = 2 - end - object cboxPhoneLbl3: TComboBox - Left = 8 - Height = 23 - Top = 56 - Width = 121 - ItemHeight = 15 - MaxLength = 65535 - TabOrder = 4 - end - object cboxPhoneLbl4: TComboBox - Left = 8 - Height = 23 - Top = 80 - Width = 121 - ItemHeight = 15 - MaxLength = 65535 - TabOrder = 6 - end - object Phone4Edit: TEdit - Left = 136 - Height = 23 - Top = 80 - Width = 281 - MaxLength = 25 - OnChange = ItemChanged - TabOrder = 7 - end - object Phone3Edit: TEdit - Left = 136 - Height = 23 - Top = 56 - Width = 281 - MaxLength = 25 - OnChange = ItemChanged - TabOrder = 5 - end - object Phone2Edit: TEdit - Left = 136 - Height = 23 - Top = 32 - Width = 281 - MaxLength = 25 - OnChange = ItemChanged - TabOrder = 3 - end - object Phone1Edit: TEdit - Left = 136 - Height = 23 - Top = 8 - Width = 281 - MaxLength = 25 - OnChange = ItemChanged + Height = 109 + Top = 183 + Width = 421 + AutoSize = True + BorderSpacing.Top = 16 + BorderSpacing.Right = 8 + Caption = 'E-Mail' + ClientHeight = 89 + ClientWidth = 417 + Font.Style = [fsBold] + ParentFont = False TabOrder = 1 + object edEMail1: TEdit + AnchorSideLeft.Control = cbEMail1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbEMail1 + AnchorSideTop.Side = asrCenter + Left = 128 + Height = 23 + Top = 4 + Width = 281 + BorderSpacing.Left = 4 + BorderSpacing.Right = 8 + ParentFont = False + TabOrder = 1 + end + object edEMail2: TEdit + AnchorSideLeft.Control = cbEMail2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbEMail2 + AnchorSideTop.Side = asrCenter + Left = 128 + Height = 23 + Top = 31 + Width = 281 + BorderSpacing.Left = 4 + ParentFont = False + TabOrder = 3 + end + object edEMail3: TEdit + AnchorSideLeft.Control = cbEMail3 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbEMail3 + AnchorSideTop.Side = asrCenter + Left = 128 + Height = 23 + Top = 58 + Width = 281 + BorderSpacing.Left = 4 + BorderSpacing.Bottom = 8 + ParentFont = False + TabOrder = 5 + end + object cbEMail1: TComboBox + AnchorSideLeft.Control = gbEMail + Left = 8 + Height = 23 + Top = 4 + Width = 116 + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 0 + end + object cbEMail2: TComboBox + AnchorSideLeft.Control = gbEMail + AnchorSideTop.Control = cbEMail1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbEMail1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 31 + Width = 116 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 2 + end + object cbEMail3: TComboBox + AnchorSideLeft.Control = gbEMail + AnchorSideTop.Control = cbEMail2 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbEMail1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 58 + Width = 116 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 4 + end end - object cboxPhoneLbl5: TComboBox + object gbWebsites: TGroupBox + AnchorSideTop.Control = gbEMail + AnchorSideTop.Side = asrBottom Left = 8 - Height = 23 - Top = 104 - Width = 121 - ItemHeight = 15 - MaxLength = 65535 - TabOrder = 8 - end - object Phone5Edit: TEdit - Left = 136 - Height = 23 - Top = 104 - Width = 281 - MaxLength = 25 - OnChange = ItemChanged - TabOrder = 9 - end - object EMailEdit: TEdit - Left = 136 - Height = 23 - Top = 128 - Width = 281 - TabOrder = 10 + Height = 82 + Top = 308 + Width = 454 + BorderSpacing.Top = 16 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + Caption = 'Websites' + ClientHeight = 62 + ClientWidth = 450 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 2 + object edWebsite1: TEdit + AnchorSideLeft.Control = cbWebsite1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbWebsite1 + AnchorSideTop.Side = asrCenter + Left = 157 + Height = 23 + Top = 0 + Width = 281 + BorderSpacing.Left = 4 + BorderSpacing.Right = 8 + ParentFont = False + TabOrder = 2 + end + object edWebsite2: TEdit + AnchorSideLeft.Control = cbWebsite2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cbWebsite2 + AnchorSideTop.Side = asrCenter + Left = 157 + Height = 23 + Top = 27 + Width = 281 + BorderSpacing.Left = 4 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + ParentFont = False + TabOrder = 3 + end + object cbWebsite1: TComboBox + AnchorSideLeft.Control = gbWebsites + AnchorSideTop.Control = gbWebsites + Left = 8 + Height = 23 + Top = 0 + Width = 145 + BorderSpacing.Left = 8 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 0 + end + object cbWebsite2: TComboBox + AnchorSideLeft.Control = gbWebsites + AnchorSideTop.Control = cbWebsite1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cbWebsite1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 23 + Top = 27 + Width = 145 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 4 + BorderSpacing.Bottom = 8 + ItemHeight = 15 + MaxLength = 65535 + ParentFont = False + TabOrder = 1 + end end end object tabCustom: TTabSheet - Caption = 'RSCustom' - ClientHeight = 286 - ClientWidth = 425 - ImageIndex = 2 - object CustomLbl1: TLabel + Caption = 'tabCustom' + ClientHeight = 538 + ClientWidth = 518 + ImageIndex = 3 + object lblCustom1: TLabel Left = 8 Height = 15 Top = 12 - Width = 64 - Caption = 'CustomLbl1' - FocusControl = Custom1Edit + Width = 61 + BorderSpacing.Left = 8 + Caption = 'lblCustom1' + FocusControl = edCustom1 ParentColor = False end - object CustomLbl2: TLabel + object lblCustom2: TLabel Left = 8 Height = 15 Top = 36 - Width = 64 - Caption = 'CustomLbl2' - FocusControl = Custom2Edit + Width = 61 + BorderSpacing.Left = 8 + Caption = 'lblCustom2' + FocusControl = edCustom2 ParentColor = False end - object CustomLbl3: TLabel + object lblCustom3: TLabel Left = 8 Height = 15 Top = 60 - Width = 64 - Caption = 'CustomLbl3' - FocusControl = Custom3Edit + Width = 61 + BorderSpacing.Left = 8 + Caption = 'lblCustom3' + FocusControl = edCustom3 ParentColor = False end - object CustomLbl4: TLabel + object lblCustom4: TLabel Left = 8 Height = 15 Top = 84 - Width = 64 - Caption = 'CustomLbl4' - FocusControl = Custom4Edit + Width = 61 + BorderSpacing.Left = 8 + Caption = 'lblCustom4' + FocusControl = edCustom4 ParentColor = False end - object Custom1Edit: TEdit + object edCustom1: TEdit Left = 80 Height = 23 Top = 8 Width = 337 + BorderSpacing.Right = 8 MaxLength = 100 OnChange = ItemChanged TabOrder = 0 end - object Custom2Edit: TEdit + object edCustom2: TEdit Left = 80 Height = 23 Top = 32 Width = 337 + BorderSpacing.Right = 8 MaxLength = 100 OnChange = ItemChanged TabOrder = 1 end - object Custom3Edit: TEdit + object edCustom3: TEdit Left = 80 Height = 23 Top = 56 Width = 337 + BorderSpacing.Right = 8 MaxLength = 100 OnChange = ItemChanged TabOrder = 2 end - object Custom4Edit: TEdit + object edCustom4: TEdit Left = 80 Height = 23 Top = 80 Width = 337 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 MaxLength = 100 OnChange = ItemChanged TabOrder = 3 end end object tabNotes: TTabSheet - Caption = 'RSNotes' - ClientHeight = 251 - ClientWidth = 425 - ImageIndex = 3 - object NoteEdit: TMemo - Left = 8 - Height = 237 - Top = 8 - Width = 409 - Anchors = [akTop, akLeft, akRight, akBottom] + Caption = 'tabNotes' + ClientHeight = 264 + ClientWidth = 472 + ImageIndex = 4 + object memoNotes: TMemo + Left = 4 + Height = 300 + Top = 4 + Width = 600 + Align = alClient + BorderSpacing.Around = 4 + Constraints.MinHeight = 300 + Constraints.MinWidth = 600 MaxLength = 1024 ScrollBars = ssVertical TabOrder = 0 @@ -488,31 +1255,34 @@ object ContactEditForm: TContactEditForm end object pnlBottom: TPanel Left = 0 - Height = 41 - Top = 341 - Width = 433 + Height = 37 + Top = 592 + Width = 575 Align = alBottom BevelOuter = bvNone - ClientHeight = 41 - ClientWidth = 433 + ClientHeight = 37 + ClientWidth = 575 TabOrder = 1 object OKBtn: TButton - Left = 272 + AnchorSideTop.Control = pnlBottom + AnchorSideTop.Side = asrCenter + Left = 415 Height = 25 - Top = 9 - Width = 75 - Anchors = [akRight, akBottom] + Top = 6 + Width = 74 + Anchors = [akTop, akRight] Caption = 'OK' Default = True OnClick = OKBtnClick TabOrder = 0 end object CancelBtn: TButton - Left = 351 + AnchorSideTop.Side = asrCenter + Left = 493 Height = 25 - Top = 9 + Top = 6 Width = 75 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] Cancel = True Caption = 'Cancel' OnClick = CancelBtnClick diff --git a/components/tvplanit/source/vpcontacteditdlg.pas b/components/tvplanit/source/vpcontacteditdlg.pas index 38e80b9c1..7aa32a8de 100644 --- a/components/tvplanit/source/vpcontacteditdlg.pas +++ b/components/tvplanit/source/vpcontacteditdlg.pas @@ -50,81 +50,115 @@ type { TContactEditForm } TContactEditForm = class(TForm) - BirthdateEdit: TDateEdit; - BirthdateLbl: TLabel; - FirstNameEdit: TEdit; - FirstNameLbl: TLabel; - tsContacts: TPageControl; - tabMain: TTabSheet; - LastNameLbl: TLabel; - AddrLbl: TLabel; - CityLbl: TLabel; - StateLbl: TLabel; - ZipLbl: TLabel; - CountryLbl: TLabel; - PositionLbl: TLabel; - TitleLbl: TLabel; - CompanyLbl: TLabel; - LastNameEdit: TEdit; - AddressEdit: TEdit; - CityEdit: TEdit; - StateEdit: TEdit; - ZipCodeEdit: TEdit; - PositionEdit: TEdit; - TitleEdit: TEdit; - CompanyEdit: TEdit; - cboxCategory: TComboBox; - cboxCountry: TComboBox; - cboxState: TComboBox; - edtCountry: TEdit; + cbCountryH: TComboBox; + cbStateW: TComboBox; + cbStateH: TComboBox; + cbWebsite2: TComboBox; + cbEMail1: TComboBox; + cbEMail2: TComboBox; + cbEMail3: TComboBox; + cbWebsite1: TComboBox; + edAddressH: TEdit; + edCityH: TEdit; + edCompany: TEdit; + edCountryH: TEdit; + edDepartment: TEdit; + edStateH: TEdit; + edZipCodeH: TEdit; + gbWorkAddress: TGroupBox; + gbHomeAddress: TGroupBox; + lblAddressH: TLabel; + lblCityH: TLabel; + lblCompany: TLabel; + lblCountryComboH: TLabel; + lblCountryW: TLabel; + lblCountryH: TLabel; + lblDepartment: TLabel; + edBirthdate: TDateEdit; + edEMail2: TEdit; + edEMail3: TEdit; + edWebsite1: TEdit; + edWebsite2: TEdit; + gbPhone: TGroupBox; + gbEMail: TGroupBox; + gbWebsites: TGroupBox; + lblBirthdate: TLabel; + lblCategory: TLabel; + cbCategory: TComboBox; + edFirstName: TEdit; + lblFirstName: TLabel; + edLastName: TEdit; + lblLastName: TLabel; + lblStateComboW: TLabel; + lblStateComboH: TLabel; + lblStateH: TLabel; + lblZipCodeH: TLabel; + tabBaseData: TTabSheet; + edTitle: TEdit; + lblTitle: TLabel; + PageControl: TPageControl; + tabAddresses: TTabSheet; + lblAddressW: TLabel; + lblCityW: TLabel; + lblStateW: TLabel; + lblZipCodeW: TLabel; + lblCountryComboW: TLabel; + lblPosition: TLabel; + edAddressW: TEdit; + edCityW: TEdit; + edStateW: TEdit; + edZipCodeW: TEdit; + edPosition: TEdit; + cbCountryW: TComboBox; + edCountryW: TEdit; tabContact: TTabSheet; tabCustom: TTabSheet; pnlBottom: TPanel; OKBtn: TButton; CancelBtn: TButton; tabNotes: TTabSheet; - NoteEdit: TMemo; - CustomLbl1: TLabel; - CustomLbl2: TLabel; - CustomLbl3: TLabel; - CustomLbl4: TLabel; - Custom1Edit: TEdit; - Custom2Edit: TEdit; - Custom3Edit: TEdit; - Custom4Edit: TEdit; - cboxPhoneLbl1: TComboBox; - cboxPhoneLbl2: TComboBox; - cboxPhoneLbl3: TComboBox; - cboxPhoneLbl4: TComboBox; - Phone4Edit: TEdit; - Phone3Edit: TEdit; - Phone2Edit: TEdit; - Phone1Edit: TEdit; - cboxPhoneLbl5: TComboBox; - Phone5Edit: TEdit; - EMailLbl: TLabel; - EMailEdit: TEdit; - CategoryLbl: TLabel; - procedure cboxCountryChange(Sender: TObject); + memoNotes: TMemo; + lblCustom1: TLabel; + lblCustom2: TLabel; + lblCustom3: TLabel; + lblCustom4: TLabel; + edCustom1: TEdit; + edCustom2: TEdit; + edCustom3: TEdit; + edCustom4: TEdit; + cbPhone1: TComboBox; + cbPhone2: TComboBox; + cbPhone3: TComboBox; + cbPhone4: TComboBox; + edPhone4: TEdit; + edPhone3: TEdit; + edPhone2: TEdit; + edPhone1: TEdit; + cbPhone5: TComboBox; + edPhone5: TEdit; + edEMail1: TEdit; + procedure cbCountryChange(Sender: TObject); procedure CancelBtnClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormShow(Sender: TObject); - procedure OKBtnClick(Sender: TObject); procedure ItemChanged(Sender: TObject); - procedure tsContactsChange(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + procedure PageControlChange(Sender: TObject); private - procedure SetCaptions; - procedure DisplayCurrentCountry; + FBtnHeight: Integer; + FEditHeight: Integer; + procedure DisplayCurrentCountry(AddressType: TVpAddressType); procedure ResizeControls; + procedure SetCaptions; public Resource: TVpResource; Contact: TVpContact; ReturnCode: TVpEditorReturnCode; ControlLink: TVpControlLink; - procedure PopulateSelf; - procedure DePopulateSelf; procedure ArrangeControls; + procedure DePopulateSelf; + procedure PopulateSelf; end; TVpContactEditDialog = class(TVpBaseDialog) @@ -133,8 +167,8 @@ type ceContact: TVpContact; ceResource: TVpResource; public - function Execute(Contact: TVpContact): Boolean; reintroduce; function AddNewContact: Boolean; + function Execute(Contact: TVpContact): Boolean; reintroduce; published {properties} property ControlLink; @@ -171,39 +205,60 @@ procedure TContactEditForm.FormCreate(Sender: TObject); begin ReturnCode := rtAbandon; SetCaptions; + FBtnHeight := ScaleY(OKBtn.Height, DesignTimeDPI); + FEditHeight := ScaleY(edCompany.Height, DesigntimeDPI); end; procedure TContactEditForm.SetCaptions; begin - tabMain.Caption := RSMasterData; + tabBaseData.Caption := RSMasterData; + tabAddresses.Caption := RSAddresses; tabContact.Caption := RSDlgContactEdit; tabCustom.Caption := RSCustom; tabNotes.Caption := RSNotes; + gbWorkAddress.Caption := RSWorkAddress; + gbHomeAddress.Caption := RSHomeAddress; + gbPhone.Caption := RSPhoneFax; + gbEMail.Caption := RSEmail; + gbWebsites.Caption := RSWebsites; + OkBtn.Caption := RSOKBtn; CancelBtn.Caption := RSCancelBtn; - LastNameLbl.Caption := RSLastNameLbl; - FirstNameLbl.Caption := RSFirstNameLbl; - TitleLbl.Caption := RSTitleLbl; - AddrLbl.Caption := RSAddressLbl; - CityLbl.Caption := RSCityLbl; - StateLbl.Caption := RSStateLbl; - ZipLbl.Caption := RSZipCodeLbl; - CountryLbl.Caption := RSCountryLbl; - CompanyLbl.Caption := RSCompanyLbl; - PositionLbl.Caption := RSPositionLbl; - CategoryLbl.Caption := RSCategoryLbl; - BirthdateLbl.Caption := RSBirthDateLbl; - EmailLbl.Caption := RSEmail; - CustomLbl1.Caption := RSCustom1; - CustomLbl2.Caption := RSCustom2; - CustomLbl3.Caption := RSCustom3; - CustomLbl4.Caption := RSCustom4; + lblLastName.Caption := RSLastNameLbl; + lblFirstName.Caption := RSFirstNameLbl; + lblTitle.Caption := RSTitleLbl; + lblCategory.Caption := RSCategoryLbl; + lblBirthdate.Caption := RSBirthDateLbl; + + lblCompany.Caption := RSCompanyLbl; + lblDepartment.Caption := RSDepartmentLbl; + lblPosition.Caption := RSPositionLbl; + + lblAddressW.Caption := RSAddressLbl; + lblAddressH.Caption := RSAddressLbl; + lblCityW.Caption := RSCityLbl; + lblCityH.Caption := RSCityLbl; + lblStateW.Caption := RSStateLbl; + lblStateH.Caption := RSStateLbl; + lblStateComboW.Caption := RSStateLbl; + lblStateComboH.Caption := RSStateLBL; + lblZipCodeW.Caption := RSZipCodeLbl; + lblZipCodeH.Caption := RSZipCodeLbl; + lblCountryComboW.Caption := RSCountryLbl; + lblCountryComboH.Caption := RSCountryLbl; + lblCountryW.Caption := RSCountryLbl; + lblCountryH.Caption := RSCountryLbl; + + lblCustom1.Caption := RSCustom1; + lblCustom2.Caption := RSCustom2; + lblCustom3.Caption := RSCustom3; + lblCustom4.Caption := RSCustom4; end; procedure TContactEditForm.OKBtnClick(Sender: TObject); begin - if LastNameEdit.Text = '' then begin + if (edLastName.Text = '') and (edFirstName.Text = '') then begin raise EVpContactEditError.Create(RSNameIsRequired); exit; end; @@ -219,150 +274,231 @@ end; procedure TContactEditForm.DePopulateSelf; begin -// ParseName(Contact, LastNameEdit.Text); - Contact.LastName := LastNameEdit.Text; - Contact.FirstName := FirstNameEdit.Text; - Contact.Address := AddressEdit.Text; - Contact.City := CityEdit.Text; - if cboxState.Visible then - Contact.State := cboxState.Text - else - Contact.State := StateEdit.Text; - Contact.Zip := ZipCodeEdit.Text; - Contact.Job_Position := PositionEdit.Text; - Contact.Title := TitleEdit.Text; - Contact.EMail := EMailEdit.Text; - Contact.Company := CompanyEdit.Text; - Contact.Birthdate := BirthdateEdit.Date; - Contact.Phone1 := Phone1Edit.Text; - Contact.Phone2 := Phone2Edit.Text; - Contact.Phone3 := Phone3Edit.Text; - Contact.Phone4 := Phone4Edit.Text; - Contact.Phone5 := Phone5Edit.Text; - if cboxCountry.Visible then - Contact.Country := cboxCountry.Text - else - Contact.Country := edtCountry.Text; - Contact.Notes := NoteEdit.Text; - Contact.Category := cboxCategory.ItemIndex; - Contact.Custom1 := Custom1Edit.Text; - Contact.Custom2 := Custom2Edit.Text; - Contact.Custom3 := Custom3Edit.Text; - Contact.Custom4 := Custom4Edit.Text; + Contact.LastName := edLastName.Text; + Contact.FirstName := edFirstName.Text; + Contact.Title := edTitle.Text; + Contact.Category := cbCategory.ItemIndex; + Contact.Birthdate := edBirthdate.Date; - Contact.PhoneType1 := cboxPhoneLbl1.ItemIndex; - Contact.PhoneType2 := cboxPhoneLbl2.ItemIndex; - Contact.PhoneType3 := cboxPhoneLbl3.ItemIndex; - Contact.PhoneType4 := cboxPhoneLbl4.ItemIndex; - Contact.PhoneType5 := cboxPhoneLbl5.ItemIndex; + Contact.Company := edCompany.Text; + Contact.Department := edDepartment.Text; + Contact.Job_Position := edPosition.Text; - Contact.Category := cboxCategory.ItemIndex; + Contact.AddressType1 := ord(atWork); + Contact.Address1 := edAddressW.Text; + Contact.City1 := edCityW.Text; + if cbStateW.Visible then + Contact.State1 := cbStateW.Text + else + Contact.State1 := edStateW.Text; + Contact.Zip1 := edZipCodeW.Text; + if cbCountryW.Visible then + Contact.Country1 := cbCountryW.Text + else + Contact.Country1 := edCountryW.Text; + + Contact.AddressType2 := ord(atHome); + Contact.Address2 := edAddressH.Text; + Contact.City2 := edCityH.Text; + if cbStateH.Visible then + Contact.State2 := cbStateH.Text + else + Contact.State2 := edStateH.Text; + Contact.Zip2 := edZipCodeH.Text; + if cbCountryH.Visible then + Contact.Country2 := cbCountryH.Text + else + Contact.Country2 := edCountryH.Text; + + Contact.Phone1 := edPhone1.Text; + Contact.Phone2 := edPhone2.Text; + Contact.Phone3 := edPhone3.Text; + Contact.Phone4 := edPhone4.Text; + Contact.Phone5 := edPhone5.Text; + Contact.PhoneType1 := cbPhone1.ItemIndex; + Contact.PhoneType2 := cbPhone2.ItemIndex; + Contact.PhoneType3 := cbPhone3.ItemIndex; + Contact.PhoneType4 := cbPhone4.ItemIndex; + Contact.PhoneType5 := cbPhone5.ItemIndex; + + Contact.EMail1 := edEMail1.Text; + Contact.EMail2 := edEMail2.Text; + contact.EMail3 := edEMail3.Text; + Contact.EMailType1 := cbEMail1.ItemIndex; + Contact.EMailType2 := cbEMail2.ItemIndex; + Contact.EMailType3 := cbEMail3.ItemIndex; + + Contact.Website1 := edWebsite1.Text; + Contact.Website2 := edWebsite2.Text; + Contact.WebsiteType1 := cbWebsite1.ItemIndex; + Contact.WebsiteType2 := cbWebsite2.ItemIndex; + + Contact.Custom1 := edCustom1.Text; + Contact.Custom2 := edCustom2.Text; + Contact.Custom3 := edCustom3.Text; + Contact.Custom4 := edCustom4.Text; + + Contact.Notes := memoNotes.Text; end; procedure TContactEditForm.PopulateSelf; var CurCountry: Integer; pt: TVpPhoneType; + mt: TVpEMailType; + wt: TVpWebsiteType; ct: TVpCategoryType; - begin - LastNameEdit.Text := Contact.LastName; - FirstNameEdit.Text := Contact.FirstName; //AssembleName(Contact); - AddressEdit.Text := Contact.Address; - CityEdit.Text := Contact.City; - ZipCodeEdit.Text := Contact.Zip; - PositionEdit.Text := Contact.Job_Position; - TitleEdit.Text := Contact.Title; - EMailEdit.Text := Contact.EMail; - CompanyEdit.Text := Contact.Company; - Phone1Edit.Text := Contact.Phone1; - Phone2Edit.Text := Contact.Phone2; - Phone3Edit.Text := Contact.Phone3; - Phone4Edit.Text := Contact.Phone4; - Phone5Edit.Text := Contact.Phone5; - NoteEdit.Text := Contact.Notes; - cboxCategory.ItemIndex := Contact.Category; - Custom1Edit.Text := Contact.Custom1; - Custom2Edit.Text := Contact.Custom2; - Custom3Edit.Text := Contact.Custom3; - Custom4Edit.Text := Contact.Custom4; - cboxCountry.Text := Contact.Country; - edtCountry.Text := Contact.Country; - if (Contact.Country = '') and (Assigned (ControlLink)) then begin + edLastName.Text := Contact.LastName; + edFirstName.Text := Contact.FirstName; + edTitle.Text := Contact.Title; + if contact.Birthdate = 0.0 then + edBirthdate.Clear else + edBirthdate.Date := Contact.Birthdate; + + cbCategory.Items.Clear; + for ct := Low (TVpCategoryType) to High (TVpCategoryType) do + cbCategory.Items.Add(CategoryLabel(ct)); + cbCategory.ItemIndex := Contact.Category; + + if Contact.Birthdate = 0.0 then + edBirthdate.Clear else + edBirthdate.Date := Contact.Birthdate; + + edCompany.Text := Contact.Company; + edDepartment.Text := Contact.Department; + edPosition.Text := Contact.Job_Position; + + edAddressW.Text := Contact.Address1; + edCityW.Text := Contact.City1; + edZipCodeW.Text := Contact.Zip1; + cbCountryW.Text := Contact.Country1; + edCountryW.Text := Contact.Country1; + if (Contact.Country1 = '') and Assigned(ControlLink) then begin if ControlLink.DefaultCountry <> '' then begin - cboxCountry.Text := ControlLink.DefaultCountry; - edtCountry.Text := ControlLink.DefaultCountry; + cbCountryW.Text := ControlLink.DefaultCountry; + edCountryW.Text := ControlLink.DefaultCountry; end else begin CurCountry := ControlLink.Localization.GetCurrentCountry; if CurCountry >= 0 then begin - cboxCountry.Text := ControlLink.Localization.Countries.Items[CurCountry].Name; - edtCountry.Text := ControlLink.Localization.Countries.Items[CurCountry].Name; + cbCountryW.Text := ControlLink.Localization.Countries.Items[CurCountry].Name; + edCountryW.Text := ControlLink.Localization.Countries.Items[CurCountry].Name; end; end; end; - StateEdit.Text := Contact.State; - cboxState.Text := Contact.State; - if Contact.Birthdate = 0.0 then - BirthdateEdit.Clear else - BirthdateEdit.Date := Contact.Birthdate; + edStateW.Text := Contact.State1; + cbStateW.Text := Contact.State1; - for pt := Low (TVpPhoneType) to High (TVpPhoneType) do begin - cboxPhoneLbl1.Items.Add(PhoneLabel(pt)); - cboxPhoneLbl2.Items.Add(PhoneLabel(pt)); - cboxPhoneLbl3.Items.Add(PhoneLabel(pt)); - cboxPhoneLbl4.Items.Add(PhoneLabel(pt)); - cboxPhoneLbl5.Items.Add(PhoneLabel(pt)); + edAddressH.Text := Contact.Address2; + edCityH.Text := Contact.City2; + edZipCodeH.Text := Contact.Zip2; + cbCountryH.Text := Contact.Country2; + edCountryH.Text := Contact.Country2; + if (Contact.Country2 = '') and Assigned(ControlLink) then begin + if ControlLink.DefaultCountry <> '' then begin + cbCountryH.Text := ControlLink.DefaultCountry; + edCountryH.Text := ControlLink.DefaultCountry; + end else begin + CurCountry := ControlLink.Localization.GetCurrentCountry; + if CurCountry >= 0 then begin + cbCountryH.Text := ControlLink.Localization.Countries.Items[CurCountry].Name; + edCountryH.Text := ControlLink.Localization.Countries.Items[CurCountry].Name; + end; + end; end; - cboxPhoneLbl1.ItemIndex := Contact.PhoneType1; - cboxPhoneLbl2.ItemIndex := Contact.PhoneType2; - cboxPhoneLbl3.ItemIndex := Contact.PhoneType3; - cboxPhoneLbl4.ItemIndex := Contact.PhoneType4; - cboxPhoneLbl5.ItemIndex := Contact.PhoneType5; + edStateH.Text := Contact.State2; + cbStateH.Text := Contact.State2; - for ct := Low (TVpCategoryType) to High (TVpCategoryType) do - cboxCategory.Items.Add(CategoryLabel(ct)); - cboxCategory.ItemIndex := Contact.Category; + memoNotes.Text := Contact.Notes; - DisplayCurrentCountry; + edCustom1.Text := Contact.Custom1; + edCustom2.Text := Contact.Custom2; + edCustom3.Text := Contact.Custom3; + edCustom4.Text := Contact.Custom4; + + edPhone1.Text := Contact.Phone1; + edPhone2.Text := Contact.Phone2; + edPhone3.Text := Contact.Phone3; + edPhone4.Text := Contact.Phone4; + edPhone5.Text := Contact.Phone5; + cbPhone1.Items.Clear; + cbPhone2.Items.Clear; + cbPhone3.Items.Clear; + cbPhone4.Items.Clear; + cbPhone5.Items.Clear; + for pt := Low (TVpPhoneType) to High (TVpPhoneType) do begin + cbPhone1.Items.Add(PhoneLabel(pt)); + cbPhone2.Items.Add(PhoneLabel(pt)); + cbPhone3.Items.Add(PhoneLabel(pt)); + cbPhone4.Items.Add(PhoneLabel(pt)); + cbPhone5.Items.Add(PhoneLabel(pt)); + end; + cbPhone1.ItemIndex := Contact.PhoneType1; + cbPhone2.ItemIndex := Contact.PhoneType2; + cbPhone3.ItemIndex := Contact.PhoneType3; + cbPhone4.ItemIndex := Contact.PhoneType4; + cbPhone5.ItemIndex := Contact.PhoneType5; + + edEMail1.Text := Contact.EMail1; + edEMail2.Text := Contact.EMail2; + edEMail3.Text := Contact.EMail3; + cbEMail1.Items.Clear; + cbEMail2.Items.Clear; + cbEMail3.Items.Clear; + for mt := Low(TVpEMailType) to High(TVpEMailType) do begin + cbEMail1.Items.Add(EMailLabel(mt)); + cbEMail2.Items.Add(EMailLabel(mt)); + cbEMail3.Items.Add(EMailLabel(mt)); + end; + cbEMail1.ItemIndex := Contact.EMailType1; + cbEMail2.ItemIndex := Contact.EMailType2; + cbEMail3.ItemIndex := Contact.EMailType3; + + edWebsite1.Text := Contact.Website1; + edWebsite2.Text := Contact.Website2; + cbWebsite1.Items.Clear; + cbWebsite2.Items.Clear; + for wt := Low(TVpWebsiteType) to High(TVpWebsiteType) do begin + cbWebsite1.Items.Add(WebsiteLabel(wt)); + cbWebsite2.Items.Add(WebsiteLabel(wt)); + end; + cbWebsite1.ItemIndex := Contact.WebsiteType1; + cbWebsite2.ItemIndex := Contact.WebsiteType2; + + DisplayCurrentCountry(atWork); + DisplayCurrentCountry(atHome); + ResizeControls; end; procedure TContactEditForm.ItemChanged(Sender: TObject); begin Contact.Changed := true; - - { if there is a comma in the LastNameEdit, then it is assumed that the name is } - { formatted as last, first. Since the comma & space aren't actually part of } - { the name, we need to allow two extra characters in the namefield's width. } - if Pos(',', LastNameEdit.Text) > 0 then - LastNameEdit.MaxLength := 102 - else - LastNameEdit.MaxLength := 100; end; procedure TContactEditForm.ArrangeControls; begin - edtCountry.Left := cboxCountry.Left; - StateEdit.Left := cboxState.Left; - - if (not Assigned (ControlLink)) or - (ControlLink.Localization.Countries.Count = 0) then begin - edtCountry.Visible := True; - CountryLbl.FocusControl := edtCountry; - cboxCountry.Visible := False; - StateEdit.Visible := True; - StateLbl.FocusControl := StateEdit; - cboxState.Visible := False; + if (not Assigned (ControlLink)) or (ControlLink.Localization.Countries.Count = 0) + then begin + edCountryW.Show; + cbCountryW.Hide; + edCountryH.Show; + cbCountryH.Hide; end else begin - ControlLink.Localization.CountriesToTStrings(cboxCountry.Items); - CountryLbl.FocusControl := cboxCountry; - cboxCountry.Visible := True; - edtCountry.Visible := False; - StateLbl.FocusControl := cboxState; - cboxState.Visible := True; - StateEdit.Visible := False; + ControlLink.Localization.CountriesToTStrings(cbCountryW.Items); + edCountryW.Hide; + cbCountryW.Show; + ControlLink.Localization.CountriesToTStrings(cbCountryH.Items); + edCountryH.Hide; + cbCountryH.Show; end; - tsContacts.ActivePage := tabMain; + + lblCountryComboW.Visible := cbCountryW.Visible; + lblCountryW.Visible := edCountryW.Visible; + lblCountryComboH.Visible := cbCountryH.Visible; + lblCountryH.Visible := edCountryH.Visible; + + PageControl.ActivePage := tabBaseData; end; procedure TContactEditForm.ResizeControls; @@ -384,276 +520,363 @@ var Labels: TLabelArray; Comboboxes: TComboboxArray; Edits: TEditArray; - LargestLabelWidth: Integer; - WidestField: Integer; + largestLabelWidth: Integer; i, j: Integer; OldFont: TFont; FieldTop: Integer; delta: Integer; - corr: Integer; // difference between form's client width and tabsheet width - editHeight: Integer; // DPI-aware height of an edit control - btnHeight: Integer; // DPI-aware height of a button control + hdist: Integer = 4; // Horizontal distance between label and edit/combo vDist: Integer = 4; // Vertical distance between edits - hBorder: Integer = 8; // Distance between container border and label - dist: Integer = 4; // Distance between label and edit/combo - + hBorder: Integer = 8; // Horizontal distance between container border and label + vBorder: Integer = 8; // Vertical distance between container border and 1st control begin - dist := ScaleX(dist , DesignTimeDPI); + {----------------------------------------------------------------------------} + { Preparations } + {----------------------------------------------------------------------------} + hdist := ScaleX(hdist, DesignTimeDPI); vdist := ScaleY(vdist, DesignTimeDPI); hBorder := ScaleX(hBorder, DesignTimeDPI); - editHeight := ScaleY(LastNameEdit.Height, DesignTimeDPI); - btnHeight := ScaleY(OKBtn.Height, DesignTimeDPI); + vBorder := ScaleY(vBorder, DesignTimeDPI); + edBirthdate.ButtonWidth := FEditHeight; - BirthdateEdit.ButtonWidth := editHeight; - - { Note: The resizing algorithm is dependent upon the labels having their - FocusControl property set to the corresponding edit field or combobox. } - - SetLength(Labels, 12); - Labels[0] := LastNameLbl; - Labels[1] := FirstNameLbl; - Labels[2] := TitleLbl; - Labels[3] := AddrLbl; - Labels[4] := CityLbl; - Labels[5] := StateLbl; - Labels[6] := ZipLbl; - Labels[7] := CountryLbl; - Labels[8] := CompanyLbl; - Labels[9] := PositionLbl; - Labels[10] := CategoryLbl; - Labels[11] := BirthdateLbl; - - LargestLabelWidth := 0; - for i := Low(Labels) to High(Labels) do - LargestLabelWidth := Max(LargestLabelWidth, GetLabelWidth(Labels[i])); - - { Determine width of label based upon dpi of screen } - for i := Low(Labels) to High(Labels) do begin - Labels[i].FocusControl.Left := HBorder + LargestLabelWidth + Dist; - Labels[i].Left := Labels[i].FocusControl.Left - DIST - GetLabelWidth(Labels[i]); - Labels[i].Top := Labels[i].FocusControl.Top + (Labels[i].FocusControl.Height - Labels[i].Height) div 2; - end; - - widestField := 250; - - { If localization file is loaded determine the width of the country and state - comboboxes } - if cboxCountry.Visible or cboxState.Visible then begin - OldFont := TFont.Create; - try - OldFont.Assign(Canvas.Font); - if cboxCountry.Visible then begin - Canvas.Font.Assign(cboxCountry.Font); - for j := 0 to cboxCountry.Items.Count - 1 do - widestField := Max(widestField, Canvas.TextWidth(cboxCountry.Items[j]) + ComboArrowWidth); - end; - if cboxState.Visible then begin - Canvas.Font.Assign(cboxCountry.Font); - for j := 0 to cboxState.Items.Count - 1 do - widestField := Max(widestfield, Canvas.TextWidth(cboxState.Items[j]) + ComboArrowWidth); - end; - finally - Canvas.Font.Assign(OldFont); - OldFont.Free; - end; - end; - - { Set form width according to widest field } - corr := ClientWidth - tabMain.ClientWidth; - ClientWidth := LastNameEdit.Left + widestfield + HBorder + corr; - - { Set edit and combo widths } - for i:= Low(Labels) to High(Labels) do - if (Labels[i].FocusControl <> ZipCodeEdit) and - (Labels[i].FocusControl <> BirthdateEdit) - then - Labels[i].FocusControl.Width := widestfield; - cboxCountry.Width := widestField; - cboxState.Width := widestField; - - { Vertically arrange the fields. } - delta := (Labels[0].FocusControl.Height - labels[0].Height) div 2; - FieldTop := TopField; - for i := Low(Labels) to High(Labels) do - if Labels[i].Visible then begin - Labels[i].FocusControl.Top := FieldTop; - Labels[i].Top := FieldTop + delta; - inc(FieldTop, editHeight + VDist); - end; - - OKBtn.Top := vDist; - OKBtn.Height := btnHeight; - CancelBtn.Top := OKBtn.Top; - CancelBtn.Height := OKBtn.Height; - pnlBottom.ClientHeight := btnHeight + vDist*2; - - { Set form height such that first tab is filled completely by controls } - ClientHeight := BirthDateEdit.Top + editHeight + TopField + VDist + // required height of tab sheet - pnlBottom.Height + // height of button panel - tsContacts.Height - tabMain.ClientHeight; // Height of tab + border - - { Page "Contact" } - SetLength(Comboboxes, 5); - Comboboxes[0] := cboxPhoneLbl1; - Comboboxes[1] := cboxPhoneLbl2; - Comboboxes[2] := cboxPhoneLbl3; - Comboboxes[3] := cboxPhoneLbl4; - Comboboxes[4] := cboxPhoneLbl5; - - SetLength(Edits, 5); - Edits[0] := Phone1Edit; - Edits[1] := Phone2Edit; - Edits[2] := Phone3Edit; - Edits[3] := Phone4Edit; - Edits[4] := Phone5Edit; - - largestLabelWidth := GetLabelWidth(EMailLbl); - OldFont := TFont.Create; - try - OldFont.Assign(Canvas.Font); - Canvas.Font.Assign(cboxPhoneLbl1.Font); - for i:=0 to cboxPhoneLbl1.Items.Count-1 do - largestLabelWidth := Max(cboxPhoneLbl1.Canvas.TextWidth(cboxPhoneLbl1.Items[i]) + ComboArrowWidth, largestlabelWidth); - finally - Canvas.Font.Assign(OldFont); - OldFont.Free; - end; - - FieldTop := TopField; - for i:=Low(Comboboxes) to High(Comboboxes) do begin - Comboboxes[i].Left := HBorder; - Comboboxes[i].Width := largestLabelWidth; - Comboboxes[i].Top := FieldTop; - inc(FieldTop, editHeight + VDist); - end; - - for i:= Low(Edits) to High(Edits) do begin - Edits[i].Left := cboxPhoneLbl1.Left + cboxPhoneLbl1.Width + DIST; - Edits[i].Width := ClientWidth - Edits[i].Left - HBorder - corr; - Edits[i].Top := Comboboxes[i].Top; - end; - - EMailEdit.Left := Phone1Edit.Left; - EMailEdit.Width := Phone1Edit.Width; - EMailEdit.Top := Phone5Edit.Top + editHeight + VDist; - EMailLbl.Left := EMailEdit.Left - GetLabelWidth(EMailLbl) - Dist; - EMailLbl.Top := EMailEdit.Top + delta; - - { Page "User-defined" } - SetLength(Labels, 4); - Labels[0] := CustomLbl1; - Labels[1] := CustomLbl2; - Labels[2] := CustomLbl3; - Labels[3] := CustomLbl4; + {----------------------------------------------------------------------------} + { Page "Base data" } + {----------------------------------------------------------------------------} + SetLength(Labels, 5); + Labels[0] := lblLastName; + Labels[1] := lblFirstName; + Labels[2] := lblTitle; + Labels[3] := lblCategory; + Labels[4] := lblBirthdate; largestLabelWidth := 0; for i := Low(Labels) to High(Labels) do largestLabelWidth := Max(largestLabelWidth, GetLabelWidth(Labels[i])); - FieldTop := TopField; + // Determine width of label based upon dpi of screen for i := Low(Labels) to High(Labels) do begin - Labels[i].FocusControl.Left := HBorder + LargestLabelWidth + Dist; - Labels[i].FocusControl.Top := FieldTop; - Labels[i].FocusControl.Width := ClientWidth - Labels[i].FocusControl.Left - HBorder - corr; - Labels[i].Width := LargestLabelWidth; - Labels[i].Left := Labels[i].FocusControl.Left - GetLabelWidth(Labels[i]) - Dist; - Labels[i].Top := FieldTop + delta; - inc(FieldTop, editHeight + VDist); + Labels[i].FocusControl.Left := HBorder + largestLabelWidth + hDist; + Labels[i].Left := Labels[i].FocusControl.Left - hDist - GetLabelWidth(Labels[i]); end; + // Set edit and combo widths + edLastName.Width := edLastName.Parent.ClientWidth - hBorder - edLastName.Left; + edFirstname.Width := edLastName.Width; + edBirthdate.Width := edTitle.Width; + cbCategory.Width := edTitle.Width; + + // Vertically arrange the fields. } + delta := (Labels[0].FocusControl.Height - labels[0].Height) div 2; + FieldTop := vBorder; + for i := Low(Labels) to High(Labels) do + if Labels[i].Visible then begin + Labels[i].FocusControl.Top := FieldTop; + Labels[i].Top := FieldTop + delta; + inc(FieldTop, FEditHeight + VDist); + end; + + {----------------------------------------------------------------------------} + { Page "Contact" } + {----------------------------------------------------------------------------} + gbPhone.Left := hBorder; + gbPhone.Width := gbPhone.Parent.ClientWidth - 2*hBorder; + + gbEMail.Left := hBorder; + gbEMail.Width := gbPhone.Width; + + gbWebsites.Left := hBorder; + gbWebsites.Width := gbPhone.Width; + + SetLength(Comboboxes, 10); + Comboboxes[0] := cbPhone1; + Comboboxes[1] := cbPhone2; + Comboboxes[2] := cbPhone3; + Comboboxes[3] := cbPhone4; + Comboboxes[4] := cbPhone5; + Comboboxes[5] := cbEMail1; + Comboboxes[6] := cbEMail2; + Comboboxes[7] := cbEMail3; + Comboboxes[8] := cbWebsite1; + Comboboxes[9] := cbWebsite1; + + SetLength(Edits, 10); + Edits[0] := edPhone1; + Edits[1] := edPhone2; + Edits[2] := edPhone3; + Edits[3] := edPhone4; + Edits[4] := edPhone5; + Edits[5] := edEMail1; + Edits[6] := edEMail2; + Edits[7] := edEMail3; + Edits[8] := edWebsite1; + Edits[9] := edWebsite2; + + largestLabelWidth := 0; + OldFont := TFont.Create; + try + OldFont.Assign(Canvas.Font); + Canvas.Font.Assign(cbPhone1.Font); + for i:=0 to cbPhone1.Items.Count-1 do + largestLabelWidth := Max(Canvas.TextWidth(cbPhone1.Items[i]) + ComboArrowWidth, largestlabelWidth); + canvas.Font.Assign(cbEmail1.Font); + for i:=0 to cbEMail1.Items.Count-1 do + largestLabelWidth := Max(Canvas.TextWidth(cbEMail1.Items[i]) + ComboArrowWidth, largestLabelWidth); + canvas.Font.Assign(cbWebsite1.Font); + for i:=0 to cbWebsite1.Items.Count-1 do + largestlabelWidth := Max(Canvas.TextWidth(cbWebsite1.Items[i]) + ComboArrowWidth, largestLabelWidth); + finally + Canvas.Font.Assign(OldFont); + OldFont.Free; + end; + + for i:=Low(Comboboxes) to High(Comboboxes) do begin + Comboboxes[i].Left := HBorder; + Comboboxes[i].Width := largestLabelWidth; + end; + + for i:= Low(Edits) to High(Edits) do begin + Edits[i].Left := cbPhone1.Left + cbPhone1.Width + hDist; + Edits[i].Width := Edits[i].Parent.ClientWidth - Edits[i].Left - HBorder; + end; + + gbPhone.AutoSize := true; + gbEMail.AutoSize := true; + gbWebsites.AutoSize := true; + + + {----------------------------------------------------------------------------} + { Page "Addresses" } + {----------------------------------------------------------------------------} + { Note: The resizing algorithm is dependent upon the labels having their + FocusControl property set to the corresponding edit field or combobox. } + + SetLength(Labels, 17); + Labels[0] := lblCompany; + Labels[1] := lblDepartment; + Labels[2] := lblPosition; + Labels[3] := lblAddressW; + Labels[4] := lblCityW; + Labels[5] := lblStateW; + Labels[6] := lblStateComboW; + Labels[7] := lblZipCodeW; + Labels[8] := lblCountryW; + Labels[9] := lblCountryComboW; + Labels[10] := lblAddressH; + Labels[11] := lblCityH; + Labels[12] := lblStateH; + Labels[13] := lblStateComboH; + Labels[14] := lblZipCodeH; + Labels[15] := lblCountryH; + Labels[16] := lblCountryComboH; + + largestLabelWidth := 0; + for i := Low(Labels) to High(Labels) do begin + largestLabelWidth := Max(largestLabelWidth, GetLabelWidth(Labels[i])); + Labels[i].FocusControl.Height := FEditHeight; + end; + + edCompany.Left := HBorder + largestLabelWidth + hDist; + edCompany.Width := edCompany.Parent.ClientWidth - hBorder - edCompany.Left; + + edAddressH.Left := edCompany.Left; + edAddressH.Width := edCompany.Width; + + {----------------------------------------------------------------------------} + { Page "User-defined" } + {----------------------------------------------------------------------------} + SetLength(Labels, 4); + Labels[0] := lblCustom1; + Labels[1] := lblCustom2; + Labels[2] := lblCustom3; + Labels[3] := lblCustom4; + + largestLabelWidth := 0; + for i := Low(Labels) to High(Labels) do + largestLabelWidth := Max(largestLabelWidth, GetLabelWidth(Labels[i])); + + FieldTop := vBorder; + edCustom1.Left := hBorder + largestLabelWidth + hDist; + edCustom1.Width := edCustom1.Parent.ClientWidth - hBorder - edCustom1.Left; + for i := Low(Labels) to High(Labels) do begin + Labels[i].FocusControl.Top := FieldTop; + Labels[i].FocusControl.Left := edCustom1.Left; + Labels[i].FocusControl.Width := edCustom1.Width; + Labels[i].FocusControl.Height := FEditHeight; + labels[i].Top := FieldTop + delta; + Labels[i].Width := LargestLabelWidth; + Labels[i].Left := Labels[i].FocusControl.Left - GetLabelWidth(Labels[i]) - hDist; + inc(FieldTop, FEditHeight + vDist); + end; + + {----------------------------------------------------------------------------} + { Buttons } + {----------------------------------------------------------------------------} OKBtn.Width := Max(GetButtonWidth(OKBtn), GetButtonWidth(CancelBtn)); CancelBtn.Width := OKBtn.Width; {$IFDEF MSWINDOWS} // button order: OK - Cancel CancelBtn.Left := pnlBottom.ClientWidth - HBorder - CancelBtn.Width; - OKBtn.Left := CancelBtn.Left - Dist - OKBtn.Width; + OKBtn.Left := CancelBtn.Left - hDist - OKBtn.Width; {$ELSE} // button order: Cancel - OK OKBtn.Left := pnlBottom.ClientWidth - HBorder - OKBtn.Width; - CancelBtn.Left := OKBtn.Left - Dist - CancelBtn.Width; + CancelBtn.Left := OKBtn.Left - hDist - CancelBtn.Width; OKBtn.TabOrder := 1; {$ENDIF} + OKBtn.Height := FBtnHeight; + CancelBtn.Height := FBtnHeight; + OKBtn.Top := vDist; + CancelBtn.Top := vDist; + pnlBottom.ClientHeight := OKBtn.Height + vDist*2; // Centering is done by anchors + + {----------------------------------------------------------------------------} + { Set form size } + {----------------------------------------------------------------------------} + AutoSize := true; end; -procedure TContactEditForm.DisplayCurrentCountry; +procedure TContactEditForm.DisplayCurrentCountry(AddressType: TVpAddressType); var - Idx : Integer; + idx : Integer; + countryCombo: TCombobox; + countryComboLabel: TLabel; + countryEdit: TEdit; + countryLabel: TLabel; + stateCombo: TCombobox; + stateComboLabel: TLabel; + stateLabel: TLabel; + stateEdit: TEdit; + addressLabel: TLabel; + addressEdit: TEdit; + cityLabel: TLabel; + cityEdit: TEdit; + zipcodeLabel: TLabel; + zipcodeEdit: TEdit; begin + // ArrangeControls; + if not Assigned(ControlLink) then Exit; - Idx := ControlLink.Localization.CountryNameToIndex(cboxCountry.Text); - if Idx > -1 then begin - ControlLink.Localization.StatesToTStrings(Idx, cboxState.Items); - - if ControlLink.Localization.Countries.Items[Idx].Address1Visible then begin - AddrLbl.Visible := True; - AddressEdit.Visible := True; - if ControlLink.Localization.Countries.Items[Idx].Address1Caption <> '' then - AddrLbl.Caption := ControlLink.Localization.Countries.Items[Idx].Address1Caption - else - AddrLbl.Caption := RSAddressLbl; - end else begin - AddrLbl.Visible := False; - AddressEdit.Visible := False; - end; - - if ControlLink.Localization.Countries.Items[Idx].CityVisible then begin - CityLbl.Visible := True; - CityEdit.Visible := True; - if ControlLink.Localization.Countries.Items[Idx].CityCaption <> '' then - CityLbl.Caption := ControlLink.Localization.Countries.Items[Idx].CityCaption - else - CityLbl.Caption := RSCityLbl; - end else begin - CityLbl.Visible := False; - CityEdit.Visible := False; - end; - - if ControlLink.Localization.Countries.Items[Idx].StatesVisible then begin - StateLbl.Visible := True; - if ControlLink.Localization.Countries.Items[Idx].States.Count > 0 then begin - StateLbl.FocusControl := cboxState; - cboxState.Visible := True; - StateEdit.Visible := False; - end else begin - StateLbl.FocusControl := StateEdit; - StateEdit.Visible := True; - cboxState.Visible := False; - StateEdit.Left := cboxState.Left; + case AddressType of + atWork: + begin + countryCombo := cbCountryW; + stateCombo := cbStateW; + stateComboLabel := lblStateComboW; + stateEdit := edStateW; + stateLabel := lblStateW; + addressEdit := edAddressW; + addressLabel := lblAddressW; + cityEdit := edCityW; + cityLabel := lblCityW; + zipcodeLabel := lblZipCodeW; + zipcodeEdit := edZipCodeW; end; - if ControlLink.Localization.Countries.Items[Idx].StateCaption <> '' then - StateLbl.Caption := ControlLink.Localization.Countries.Items[Idx].StateCaption + atHome: + begin + countryCombo := cbCountryH; + stateCombo := cbStateH; + stateComboLabel := lblStateComboH; + stateEdit := edStateH; + stateLabel := lblStateH; + addressEdit := edAddressH; + addressLabel := lblAddressH; + cityEdit := edCityH; + cityLabel := lblCityH; + zipcodeLabel := lblZipCodeH; + zipcodeEdit := edZipCodeH; + end; + end; + + idx := ControlLink.Localization.CountryNameToIndex(countryCombo.Text); + if idx > -1 then begin + ControlLink.Localization.StatesToTStrings(idx, stateCombo.Items); + + if ControlLink.Localization.Countries.Items[idx].Address1Visible then begin + addressEdit.Show; + addressLabel.Show; + if ControlLink.Localization.Countries.Items[idx].Address1Caption <> '' then + addressLabel.Caption := ControlLink.Localization.Countries.Items[idx].Address1Caption else - StateLbl.Caption := RSStateLbl; + addressLabel.Caption := RSAddressLbl; end else begin - StateLbl.Visible := False; - StateEdit.Visible := False; - cboxState.Visible := False; + addressEdit.Hide; + addressLabel.Hide; end; - if ControlLink.Localization.Countries.Items[Idx].ZipVisible then begin - ZipLbl.Visible := True; - ZipCodeEdit.Visible := True; - if ControlLink.Localization.Countries.Items[Idx].ZipCaption <> '' then - ZipLbl.Caption := ControlLink.Localization.Countries.Items[Idx].ZipCaption + if ControlLink.Localization.Countries.Items[idx].CityVisible then begin + cityEdit.Show; + cityLabel.Show; + if ControlLink.Localization.Countries.Items[idx].CityCaption <> '' then + cityLabel.Caption := ControlLink.Localization.Countries.Items[idx].CityCaption else - ZipLbl.Caption := RSZipCodeLbl; + cityLabel.Caption := RSCityLbl; end else begin - ZipLbl.Visible := False; - ZipCodeEdit.Visible := False; + cityEdit.Hide; + cityLabel.Show; + end; + + if ControlLink.Localization.Countries.Items[idx].StatesVisible then begin + stateLabel.Visible := True; + if ControlLink.Localization.Countries.Items[Idx].States.Count > 0 then begin + stateComboLabel.Show; + stateCombo.Show; + stateLabel.Hide; + stateEdit.Hide; + end else begin + stateComboLabel.Hide; + stateCombo.Hide; + stateLabel.Show; + stateEdit.Show; + end; + if ControlLink.Localization.Countries.Items[idx].StateCaption <> '' then begin + stateComboLabel.Caption := ControlLink.Localization.Countries.Items[idx].StateCaption; + stateLabel.Caption := StateComboLabel.Caption; + end else begin + stateLabel.Caption := RSStateLbl; + stateComboLabel.Caption := stateLabel.Caption; + end; + end else begin + stateComboLabel.Hide; + stateCombo.Hide; + stateLabel.Hide; + stateEdit.Hide; + end; + + if ControlLink.Localization.Countries.Items[idx].ZipVisible then begin + zipcodeEdit.Show; + zipcodeLabel.Show; + if ControlLink.Localization.Countries.Items[idx].ZipCaption <> '' then + zipcodeLabel.Caption := ControlLink.Localization.Countries.Items[idx].ZipCaption + else + zipcodeLabel.Caption := RSZipCodeLbl; + end else begin + zipcodeEdit.Hide; + zipcodeLabel.Hide; end; end else begin - cboxState.Items.Clear; - + stateEdit.Show; + stateLabel.Show; + stateCombo.Hide; + stateComboLabel.Hide; + stateCombo.Items.Clear; end; - ResizeControls; + +// ResizeControls; end; -procedure TContactEditForm.cboxCountryChange(Sender: TObject); +procedure TContactEditForm.cbCountryChange(Sender: TObject); begin - StateEdit.Text := ''; - cboxState.Text := ''; - DisplayCurrentCountry; + if Sender = cbCountryW then begin + edStateW.Text := ''; + cbStateW.Text := ''; + DisplayCurrentCountry(atWork); + end else begin + edStateH.Text := ''; + cbStateH.Text := ''; + DisplayCurrentCountry(atHome); + end; + ResizeControls; end; procedure TContactEditForm.FormKeyDown(Sender: TObject; var Key: Word; @@ -666,28 +889,26 @@ begin end; end; -procedure TContactEditForm.tsContactsChange(Sender: TObject); +procedure TContactEditForm.PageControlChange(Sender: TObject); begin if Visible then - if tsContacts.ActivePage = tabMain then - LastNameEdit.SetFocus - else if tsContacts.ActivePage = tabContact then - Phone1Edit.SetFocus - else if tsContacts.ActivePage = tabCustom then - Custom1Edit.SetFocus - else if tsContacts.ActivePage = tabNotes then - NoteEdit.SetFocus; + if PageControl.ActivePage = tabBaseData then + edLastName.SetFocus + else if PageControl.ActivePage = tabAddresses then + edCompany.SetFocus + else if PageControl.ActivePage = tabContact then + edPhone1.SetFocus + else if PageControl.ActivePage = tabCustom then + edCustom1.SetFocus + else if PageControl.ActivePage = tabNotes then + memoNotes.SetFocus; end; procedure TContactEditForm.FormShow(Sender: TObject); begin - if tsContacts.ActivePage = tabMain then - LastNameEdit.SetFocus; - (* - {$IFDEF LCL} - ScaleDPI(Self, DesigntimeDPI); - {$ENDIF} - *) + PageControl.ActivePage := tabBaseData; + if PageControl.ActivePage = tabBaseData then + edLastName.SetFocus; end; diff --git a/components/tvplanit/source/vpdata.pas b/components/tvplanit/source/vpdata.pas index 0a8732ee7..fed50a2a0 100644 --- a/components/tvplanit/source/vpdata.pas +++ b/components/tvplanit/source/vpdata.pas @@ -39,7 +39,7 @@ uses {$ELSE} Windows, {$ENDIF} - SysUtils, Classes, Dialogs, + SysUtils, Classes, Dialogs, Graphics, {$IFDEF VERSION6} Types, {$ENDIF} VpSR; @@ -490,6 +490,7 @@ type end; TVpContact = class + private FOwner: TVpContacts; FLoading: Boolean; FChanged: Boolean; @@ -502,6 +503,7 @@ type FAnniversary: TDateTime; FTitle: string; FCompany: string; + FDepartment: String; FEMail1: string; FEMail2: String; FEMail3: String; @@ -536,7 +538,6 @@ type FCountry2: String; FNotes: string; FPrivateRec: boolean; - FPathToPhoto: String; FCategory: integer; FCustom1: string; FCustom2: string; @@ -571,6 +572,7 @@ type procedure SetCustom3(const Value: string); procedure SetCustom4(const Value: string); procedure SetDeleted(Value: Boolean); + procedure SetDepartment(const Value: String); procedure SetEMail1(const Value: string); procedure SetEMail2(const Value: string); procedure SetEMail3(const Value: string); @@ -580,7 +582,6 @@ type procedure SetFirstName(const Value: string); procedure SetLastName(const Value: string); procedure SetNotes(const Value: string); - procedure SetPathToPhoto(const Value: String); procedure SetPhone1(const Value: string); procedure SetPhone2(const Value: string); procedure SetPhone3(const Value: string); @@ -602,6 +603,7 @@ type procedure SetWebsiteType2(Value: integer); procedure SetZip1(const Value: string); procedure SetZip2(const Value: string); + public constructor Create(Owner: TVpContacts); destructor Destroy; override; @@ -625,6 +627,7 @@ type property Anniversary: TDateTime read FAnniversary write SetAnniversary; property Title: string read FTitle write SetTitle; property Company: string read FCompany write SetCompany; + property Department: String read FDepartment write SetDepartment; property EMail: string read FEmail1 write SetEMail1; deprecated 'Use "EMail1" instead'; property EMail1: String read FEmail1 write SetEMail1; property EMail2: String read FEmail2 write SetEmail2; @@ -665,7 +668,6 @@ type property AddressType2: integer read FAddressType2 write SetAddressType2; property Note: string read FNotes write SetNotes; deprecated 'Use "Notes" instead'; property Notes: string read FNotes write SetNotes; - property PathToPhoto: String read FPathToPhoto write SetPathToPhoto; property Category: integer read FCategory write SetCategory; property Custom1: string read FCustom1 write SetCustom1; property Custom2: string read FCustom2 write SetCustom2; @@ -1813,6 +1815,7 @@ end; constructor TVpContact.Create(Owner: TVpContacts); begin inherited Create; + FChanged := false; FOwner := Owner; @@ -2000,6 +2003,14 @@ begin end; end; +procedure TVpContact.SetDepartment(const Value: String); +begin + if Value <> FDepartment then begin + FDepartment := Value; + Changed := True; + end; +end; + procedure TVpContact.SetEMail1(const Value: string); begin if Value <> FEMail1 then begin @@ -2072,14 +2083,6 @@ begin end; end; -procedure TVpContact.SetPathToPhoto(const Value: string); -begin - if Value <> FPathToPhoto then begin - FPathToPhoto := Value; - Changed := true; - end; -end; - procedure TVpContact.SetPhone1(const Value: string); begin if Value <> FPhone1 then begin diff --git a/components/tvplanit/source/vpdbds.pas b/components/tvplanit/source/vpdbds.pas index 95c80bdb5..3aa8d4eba 100644 --- a/components/tvplanit/source/vpdbds.pas +++ b/components/tvplanit/source/vpdbds.pas @@ -424,7 +424,8 @@ begin Required := false; end; end; {with FieldDefs do} - end else if TableName = ContactsTableName then begin + end else + if TableName = ContactsTableName then begin with FieldDefs do begin Clear; { Record ID } @@ -479,6 +480,13 @@ begin Size := 50; Required := false; end; + { Department } + with AddFieldDef do begin + Name := 'Department'; + DataType := ftString; + Size := 50; + Required := false; + end; { Position } with AddFieldDef do begin Name := 'Job_Position'; @@ -711,13 +719,6 @@ begin DataType := ftInteger; Required := false; end; - { PathToPhoto } - with AddFieldDef do begin - Name := 'PathToPhoto'; - DataType := ftString; - Size := 255; - Required := false; - end; { Custom1 } with AddFieldDef do begin Name := 'Custom1'; @@ -1213,21 +1214,21 @@ begin AContact.RecordID := FieldByName('RecordID').AsInteger; AContact.FirstName := FieldByName('FirstName').AsString; AContact.LastName := FieldByName('LastName').AsString; + AContact.Category := FieldByName('Category').AsInteger; AContact.Birthdate := FieldByName('BirthDate').AsDateTime; AContact.Anniversary := FieldByName('Anniversary').AsDateTime; AContact.Title := FieldByName('Title').AsString; AContact.Company := FieldByName('Company').AsString; AContact.Job_Position := FieldByName('Job_Position').AsString; - AContact.Category := FieldByName('Category').AsInteger; + + // Department -- new in 1.05 + F := FindField('Department'); + if F <> nil then AContact.Department := F.AsString; F := FindField('Notes'); if F = nil then F := FindField('Note'); // deprecated if F <> nil then AContact.Notes := F.AsString; - // photo file name - new in 1.05 - F := FindField('PathToPhoto'); - if F <> nil then AContact.PathToPhoto := F.AsString; - // two address types - new in 1.05 F := FindField('AddressType1'); if F <> nil then AContact.AddressType1 := F.AsInteger; @@ -1460,9 +1461,9 @@ begin if F = nil then F := ContactsTable.FindField('Note'); if F <> nil then F.AsString := Contact.Notes; - // File name of picture -- new in 1.05 - F := ContactsTable.FindField('PathToPhoto'); - if F <> nil then F.AsString := Contact.PathToPhoto; + // Department -- new in 1.05 + F := ContactsTable.FindField('Department'); + if F <> nil then F.AsString := Contact.Department; // two address types -- new in 1.05 F := ContactsTable.FindField('AddressType1'); @@ -1494,13 +1495,6 @@ begin if F <> nil then F.AsString := Contact.Country1; F := ContactsTable.FindField('Country2'); if F <> nil then F.AsString := Contact.Country2; - { - ContactsTable.FieldByName('Address').AsString := Contact.Address; - ContactsTable.FieldByName('City').AsString := Contact.City; - ContactsTable.FieldByName('State').AsString := Contact.State; - ContactsTable.FieldByName('Zip').AsString := Contact.Zip; - ContactsTable.FieldByName('Country').AsString := Contact.Country; - } // Telephones ContactsTable.FieldByName('Phone1').AsString := Contact.Phone1; diff --git a/components/tvplanit/source/vpfbds.pas b/components/tvplanit/source/vpfbds.pas index 33d08b3c3..a9e1dc572 100644 --- a/components/tvplanit/source/vpfbds.pas +++ b/components/tvplanit/source/vpfbds.pas @@ -179,6 +179,7 @@ begin 'Title VARCHAR(50), '+ 'Category INTEGER, '+ 'Company VARCHAR(50), '+ + 'Department VARCHAR(50), '+ 'Job_Position VARCHAR(30), '+ 'AddressType1 INTEGER, '+ 'Address1 VARCHAR(100), '+ @@ -212,7 +213,6 @@ begin 'WebSite2 VARCHAR (100), '+ 'WebSiteType1 INTEGER, '+ 'WebSiteType2 INTEGER, '+ - 'PathToPhoto VARCHAR (255), '+ 'Notes VARCHAR(1024), '+ 'Custom1 VARCHAR (100), '+ 'Custom2 VARCHAR (100), '+ diff --git a/components/tvplanit/source/vpflxds.pas b/components/tvplanit/source/vpflxds.pas index e76f3fc50..d99531db1 100644 --- a/components/tvplanit/source/vpflxds.pas +++ b/components/tvplanit/source/vpflxds.pas @@ -862,6 +862,11 @@ begin if FN <> '' then AContact.Company := FieldByName(FN).AsString; + // Department, new in 1.05 + FN := GetFieldName(FContactMappings, 'Department'); + if FN <> '' then + AContact.Department := FieldByName(FN).AsString; + FN := GetFieldName(FContactMappings, 'Job_Position'); if FN <> '' then AContact.Job_Position := FieldByName(FN).AsString; @@ -870,11 +875,6 @@ begin if FN <> '' then AContact.Category := FieldByName(FN).AsInteger; - // Photo file name, new in 1.05 - FN := GetFieldName(FContactMappings, 'PathToPhoto'); - if FN <> '' then - AContact.PathToPhoto := FieldByName(FN).AsString; - // "Notes" instead of "Note" - new in 1.04 FN := GetFieldName(FContactMappings, 'Notes'); if FN = '' then @@ -1812,6 +1812,10 @@ begin if FN <> '' then ContactsTable.FieldByName(FN).AsString := Contact.Company; + FN := GetFieldName(FContactMappings, 'Department'); + if FN <> '' then + ContactsTable.FieldByName(FN).AsString := Contact.Department; + FN := GetFieldName(FContactMappings, 'Job_Position'); if FN = '' then FN := GetFieldName(FContactMappings, 'Position'); // deprecated @@ -1968,10 +1972,6 @@ begin if FN <> '' then ContactsTable.FieldByName(FN).AsInteger := Contact.Category; - FN := GetFieldName(FContactMappings, 'PathToPhoto'); - if FN <> '' then - ContactsTable.FieldByName(FN).AsString := Contact.PathToPhoto; - FN := GetFieldName(FContactMappings, 'Custom1'); if FN <> '' then ContactsTable.FieldByName(FN).AsString := Contact.Custom1; diff --git a/components/tvplanit/source/vpinids.pas b/components/tvplanit/source/vpinids.pas index 70e728f57..bd40f98ce 100644 --- a/components/tvplanit/source/vpinids.pas +++ b/components/tvplanit/source/vpinids.pas @@ -236,6 +236,7 @@ begin [GetEnumName(TypeInfo(TVpIniVersion), ord(FIniVersionWrite))]); end; try + // Don't change the order of these fields to keep readability of v104 files. L.AddField('FirstName', AContact.FirstName); // 0 L.AddField('LastName', AContact.LastName); L.AddDateTimeField('BirthDate', AContact.BirthDate, 'ddddd'); @@ -294,7 +295,7 @@ begin L.AddField('Zip2', AContact.Zip2); L.AddField('Country2', AContact.Country2); L.AddField('AddressType2', IntToStr(AContact.AddressType2)); - L.AddField('PathToPhoto', AContact.PathToPhoto); + L.AddField('Department', AContact.Department); end; Result := L.DelimitedText; @@ -571,6 +572,7 @@ var begin case FIniVersionRead of iv104: + // Important: DON'T CHANGE THE ORDER OF THESE FIELDS. begin L := TVpIniStrings_v104.Create; try @@ -588,12 +590,12 @@ begin AContact.Title := L.Extract(4); AContact.Company := L.Extract(5); AContact.Job_Position := L.Extract(6); - AContact.EMail := L.Extract(7); - AContact.Address := L.Extract(8); - AContact.City := L.Extract(9); - AContact.State := L.Extract(10); - AContact.Zip := L.Extract(11); - AContact.Country := L.Extract(12); + AContact.EMail1 := L.Extract(7); + AContact.Address1 := L.Extract(8); + AContact.City1 := L.Extract(9); + AContact.State1 := L.Extract(10); + AContact.Zip1 := L.Extract(11); + AContact.Country1 := L.Extract(12); AContact.Notes := DecodeLineEndings(L.Extract(13)); AContact.Phone1 := L.Extract(14); AContact.Phone2 := L.Extract(15); @@ -648,14 +650,14 @@ begin end else if fn = 'title' then AContact.Title := fv - else if fn = 'pathtophoto' then - AContact.PathToPhoto := fv else if fn = 'category' then AContact.Category := StrToInt(fv) else if fn = 'notes' then AContact.Notes := DecodeLineEndings(fv) else if fn = 'company' then AContact.Company := fv + else if fn = 'department' then + AContact.Department := fv else if fn = 'job_position' then AContact.Job_Position := fv else if fn = 'addresstype1' then diff --git a/components/tvplanit/source/vpsqlite3ds.pas b/components/tvplanit/source/vpsqlite3ds.pas index f5ae680df..2739e41a3 100644 --- a/components/tvplanit/source/vpsqlite3ds.pas +++ b/components/tvplanit/source/vpsqlite3ds.pas @@ -120,19 +120,28 @@ begin FConnection.ExecuteDirect( 'CREATE TABLE Contacts ('+ 'RecordID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, '+ - 'ResourceID INTEGER,' + - 'FirstName VARCHAR(50) ,'+ - 'LastName VARCHAR(50) , '+ + 'ResourceID INTEGER, ' + + 'FirstName VARCHAR(50), '+ + 'LastName VARCHAR(50), '+ + 'Category INTEGER, '+ 'Birthdate DATE, '+ 'Anniversary DATE, '+ - 'Title VARCHAR(50) ,'+ - 'Company VARCHAR(50) ,'+ + 'Title VARCHAR(50), '+ + 'Company VARCHAR(50), '+ + 'Department VARCHAR(50), '+ 'Job_Position VARCHAR(30), '+ - 'Address VARCHAR(100), '+ - 'City VARCHAR(50), '+ - 'State VARCHAR(25), '+ - 'Zip VARCHAR(10), '+ - 'Country VARCHAR(25), '+ + 'AddressType1 INTEGER, '+ + 'Address1 VARCHAR(100), '+ + 'City1 VARCHAR(50), '+ + 'State1 VARCHAR(25), '+ + 'Zip1 VARCHAR(10), '+ + 'Country1 VARCHAR(25), '+ + 'AddressType2 INTEGER, '+ + 'Address2 VARCHAR(100), '+ + 'City2 VARCHAR(50), '+ + 'State2 VARCHAR(25), '+ + 'Zip2 VARCHAR(10), '+ + 'Country2 VARCHAR(25), '+ 'Notes VARCHAR(1024), '+ 'Phone1 VARCHAR(25), '+ 'Phone2 VARCHAR(25), '+ @@ -144,8 +153,16 @@ begin 'PhoneType3 INTEGER, '+ 'PhoneType4 INTEGER, '+ 'PhoneType5 INTEGER, '+ - 'Category INTEGER, '+ - 'EMail VARCHAR(100), '+ + 'EMail1 VARCHAR(100), '+ + 'EMail2 VARCHAR(100), '+ + 'EMail3 VARCHAR(100), '+ + 'EMailType1 INTEGER, '+ + 'EMailType2 INTEGER, '+ + 'EMailType3 INTEGER, '+ + 'Website1 VARCHAR(100), '+ + 'Website2 VARCHAR(100), '+ + 'WebsiteType1 INTEGER, '+ + 'WebsiteType2 INTEGER, '+ 'Custom1 VARCHAR(100), '+ 'Custom2 VARCHAR(100),'+ 'Custom3 VARCHAR(100), '+ diff --git a/components/tvplanit/source/vpsr.inc b/components/tvplanit/source/vpsr.inc index b78648eb3..cba207eec 100644 --- a/components/tvplanit/source/vpsr.inc +++ b/components/tvplanit/source/vpsr.inc @@ -254,46 +254,136 @@ resourcestring RSCountryLbl = 'Country:'; RSZipCodeLbl = 'Zip code:'; RSCompanyLbl = 'Company:'; + RSDepartmentLbl = 'Department:'; RSPositionLbl = 'Position:'; RSBirthDateLbl = 'Birth date:'; + RSPhoneFax = 'Phone/fax'; + RSWebsites = 'Websites'; + RSMasterData = 'Master data'; + RSAddresses = 'Addresses'; + RSWorkAddress = 'Work address'; + RSHomeAddress = 'Home address'; { Print Preview dialog captions } RSDlgPrintPreview = 'Print preview'; { Task Edit Dialog Captions } - RSDlgTaskEdit = 'Task'; - RSDueDate = 'Due Date:'; - RSDetails = 'Details:'; - RSTaskComplete = 'Task complete'; - RSCreatedOn = 'Created on'; - RSCompletedOn = 'Completed on'; + RSDlgTaskEdit = 'Task'; + RSDueDate = 'Due date:'; + RSDetails = 'Details:'; + RSTaskComplete = 'Task complete'; + RSCreatedOn = 'Created on'; + RSCompletedOn = 'Completed on'; { Resource Edit Dialog Captions } - RSDlgResEditCaption = 'Resource Edit'; - RSDlgResEditDescription = 'Description'; - RSResource = 'Resource'; + RSDlgResEditCaption = 'Resource edit'; + RSDlgResEditDescription = 'Description'; + RSResource = 'Resource'; { Reminder Dialog Captions} - RSReminder = 'Reminder'; - RSOverdue = 'OVERDUE!'; - RSSnoozeCaption = 'Click &Snooze to be reminded again in:'; - RSSubjectCaption = 'Subject:'; - RSNotesCaption = 'Notes:'; - RSDismissBtn = '&Dismiss'; - RSSnoozeBtn = '&Snooze'; - RSOpenItemBtn = '&Open Item'; - RS1Minute = '1 minute'; - RSXMinutes = '%d minutes'; - RS1Hour = '1 hour'; - RSXHours = '%d hours'; - RS1Day = '1 day'; - RSXDays = '%d days'; - RS1Week = '1 week'; + RSReminder = 'Reminder'; + RSOverdue = 'OVERDUE!'; + RSSnoozeCaption = 'Click &Snooze to be reminded again in:'; + RSSubjectCaption = 'Subject:'; + RSNotesCaption = 'Notes:'; + RSDismissBtn = '&Dismiss'; + RSSnoozeBtn = '&Snooze'; + RSOpenItemBtn = '&Open Item'; + RS1Minute = '1 minute'; + RSXMinutes = '%d minutes'; + RS1Hour = '1 hour'; + RSXHours = '%d hours'; + RS1Day = '1 day'; + RSXDays = '%d days'; + RS1Week = '1 week'; { Calendar } - RSCalendarRevert = 'Revert'; - RSCalendarPopupRevert = 'Revert'; + RSCalendarRevert = 'Revert'; + RSCalendarPopupRevert = 'Revert'; + + { Misc strings } + RSCategoryDesc = 'Category %d'; + + { Print Format Editor } + RSEditPrintFormat = 'Edit Print Formats...'; + RSPrintFormatDesigner = 'Print format designer'; + RSFormatLbl = 'Format:'; + RSFormats = 'Formats:'; + RSElements = 'Elements:'; + RSNewBtn = 'New'; + RSEditBtn = 'Edit'; + RSDeleteBtn = 'Delete'; + RSPrintOrder = 'Print order'; + RSNewFileBtn = 'New file'; + RSLoadFileBtn = 'Load file...'; + RSSaveFileBtn = 'Save file...'; + + RSReportSetup = 'Report setup'; + + { Print Format Item Editor } + RSEditFormatCaption = 'Edit format'; + RSNameLbl = 'Name:'; + RSTimeIncLbl = 'Time increment:'; + RSTimeIncUnits = 'Time increment units:'; + + { Format element editor } + RSEditElementCaption = 'Edit element'; + RSElementTypeLbl = 'Element type'; + RSDayViewElement = 'Day view'; + RSWeekViewElement = 'Week view'; + RSMonthViewElement = 'Month view'; + RSCalendarElement = 'Calendar'; + RSShapeElement = 'Shape'; + RSCaptionElement = 'Caption'; + RSTasksElement = 'Tasks'; + RSContactsElement = 'Contacts'; + RSVisualCaption = 'Visual'; + RSRotationCaption = 'Rotation'; + RSMeasurementCaption = 'Measurement'; + RSPixels = 'Pixels'; + RSPercent = 'Percent'; + RSInches = 'Inches'; + RSLeft = 'Left'; + RSTop = 'Top'; + RSWidth = 'Width'; + RSHeight = 'Height'; + RSVisible = 'Visible'; + RSCaption = 'Caption'; + RSTextCaption = 'Text'; + RSShapeBtn = 'Shape...'; + RSFontBtn = 'Font...'; + + { Shape editor } + RSEditShapeCaption = 'Edit shape'; + RSShapeCaption = 'Shape'; + RSRectangle = 'rectangle'; + RSTopLine = 'top line'; + RSBottomLine = 'bottom line'; + RSLeftLine = 'left line'; + RSRightLine = 'right line'; + RSTLToBRLine = 'top-left to bottom-right line'; + RSBLToTRLine = 'bottom-left to top-right line'; + RSEllipse = 'ellipse'; + RSPenCaption = 'Pen'; + RSBrushCaption = 'Brush'; + RSStyleLbl = 'Style:'; + RSWidthLbl = 'Width:'; + RSModeLbl = 'Mode:'; + RSColorLbl = 'Color:'; + + { Automatic resource adding/selection} + RSAddNewResource = 'No resources have been defined. Would you ' + + 'like to add one now?'; + RSSelectResource = 'No resource has been selected. Would you ' + + 'like to select one now?'; + + { AboutBox } + RSBrowserError = 'Unable to start web browser. Make sure you have ' + + 'it properly setup on your system.'; + + { Ini storage } + RSIniFileStructure = 'Incorrect structure of ini file.'; { XML } sIENotInstalled = 'Cannot open WININET, Microsoft IE required'; @@ -385,86 +475,3 @@ resourcestring RSNoCanvas = 'TCanvas not assigned'; {!!.01} RSNoLocalizationFile = 'Localization file not found.'; {!!.02} - { Misc strings } - RSCategoryDesc = 'Category %d'; - - { Print Format Editor } - RSEditPrintFormat = 'Edit Print Formats...'; - RSPrintFormatDesigner = 'Print format designer'; - RSFormatLbl = 'Format:'; - RSFormats = 'Formats:'; - RSElements = 'Elements:'; - RSNewBtn = 'New'; - RSEditBtn = 'Edit'; - RSDeleteBtn = 'Delete'; - RSPrintOrder = 'Print order'; - RSNewFileBtn = 'New file'; - RSLoadFileBtn = 'Load file...'; - RSSaveFileBtn = 'Save file...'; - - RSReportSetup = 'Report setup'; - - { Print Format Item Editor } - RSEditFormatCaption= 'Edit format'; - RSNameLbl = 'Name:'; - RSTimeIncLbl = 'Time increment:'; - RSTimeIncUnits = 'Time increment units:'; - - { Format element editor } - RSEditElementCaption = 'Edit element'; - RSElementTypeLbl = 'Element type'; - RSDayViewElement = 'Day view'; - RSWeekViewElement = 'Week view'; - RSMonthViewElement = 'Month view'; - RSCalendarElement = 'Calendar'; - RSShapeElement = 'Shape'; - RSCaptionElement = 'Caption'; - RSTasksElement = 'Tasks'; - RSContactsElement = 'Contacts'; - RSVisualCaption = 'Visual'; - RSRotationCaption = 'Rotation'; - RSMeasurementCaption = 'Measurement'; - RSPixels = 'Pixels'; - RSPercent = 'Percent'; - RSInches = 'Inches'; - RSLeft = 'Left'; - RSTop = 'Top'; - RSWidth = 'Width'; - RSHeight = 'Height'; - RSVisible = 'Visible'; - RSCaption = 'Caption'; - RSTextCaption = 'Text'; - RSShapeBtn = 'Shape...'; - RSFontBtn = 'Font...'; - - { Shape editor } - RSEditShapeCaption = 'Edit shape'; - RSShapeCaption = 'Shape'; - RSRectangle = 'rectangle'; - RSTopLine = 'top line'; - RSBottomLine = 'bottom line'; - RSLeftLine = 'left line'; - RSRightLine = 'right line'; - RSTLToBRLine = 'top-left to bottom-right line'; - RSBLToTRLine = 'bottom-left to top-right line'; - RSEllipse = 'ellipse'; - RSPenCaption = 'Pen'; - RSBrushCaption = 'Brush'; - RSStyleLbl = 'Style:'; - RSWidthLbl = 'Width:'; - RSModeLbl = 'Mode:'; - RSColorLbl = 'Color:'; - - { Automatic resource adding/selection} {!!.01} - RSAddNewResource = 'No resources have been defined. Would you ' + {!!.01} - 'like to add one now?'; {!!.01} - RSSelectResource = 'No resource has been selected. Would you ' + {!!.01} - 'like to select one now?'; - - { AboutBox } - RSBrowserError = 'Unable to start web browser. Make sure you have ' + - 'it properly setup on your system.'; - - { Ini storage } - RSIniFileStructure = 'Incorrect structure of ini file.'; - diff --git a/components/tvplanit/source/vpxmlds.pas b/components/tvplanit/source/vpxmlds.pas index 01100dc8b..ca7035d31 100644 --- a/components/tvplanit/source/vpxmlds.pas +++ b/components/tvplanit/source/vpxmlds.pas @@ -598,12 +598,12 @@ begin cont.LastName := GetNodeValue(node) else if nodeName = 'Title' then cont.Title := GetNodeValue(node) - else if nodeName = 'PathToPhoto' then - cont.PathToPhoto := GetNodeValue(node) else if nodeName = 'Job_Position' then cont.Job_Position := GetNodeValue(node) else if nodeName = 'Company' then cont.Company := GetNodeValue(node) + else if nodeName = 'Department' then + cont.Department := GetNodeValue(node) else if (nodeName = 'Address1') or (nodeName = 'Address') then begin cont.Address1 := GetNodeValue(node); cont.AddressType1 := ord(GetAddressTypeAttrValue(node, 'Type', 1)); @@ -984,17 +984,16 @@ begin AContactNode.AppendChild(child); end; - if AContact.PathToPhoto <> '' then begin - child := ADoc.CreateElement('PathToPhoto'); - txt := ADoc.CreateTextNode(AContact.PathToPhoto); + if AContact.Company <> '' then begin + child := ADoc.CreateElement('Company'); + txt := ADoc.CreateTextNode(AContact.Company); child.AppendChild(txt); AContactNode.AppendChild(child); end; - - if AContact.Company <> '' then begin - child := ADoc.CreateElement('Company'); - txt := ADoc.CreateTextNode(AContact.Company); + if AContact.Department <> '' then begin + child := ADoc.CreateElement('Department'); + txt := ADoc.CreateTextNode(AContact.Department); child.AppendChild(txt); AContactNode.AppendChild(child); end;