Changeset 9


Ignore:
Timestamp:
Feb 1, 2018, 1:41:56 PM (6 years ago)
Author:
chronos
Message:
  • Added: More editable contact fields.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.lfm

    r8 r9  
    1717    Top = 8
    1818    Width = 744
    19     ActivePage = TabSheetAll
     19    ActivePage = TabSheetGeneral
    2020    Anchors = [akTop, akLeft, akRight, akBottom]
    21     TabIndex = 2
     21    TabIndex = 0
    2222    TabOrder = 0
    2323    object TabSheetGeneral: TTabSheet
     
    3434      end
    3535      object EditName: TEdit
    36         Left = 100
    37         Height = 28
    38         Top = 15
     36        Left = 120
     37        Height = 28
     38        Top = 16
    3939        Width = 212
    4040        TabOrder = 0
     
    4949      end
    5050      object EditCellPhone: TEdit
    51         Left = 100
    52         Height = 28
    53         Top = 49
     51        Left = 120
     52        Height = 28
     53        Top = 47
    5454        Width = 212
    5555        TabOrder = 1
    5656      end
    5757      object EditPhone: TEdit
    58         Left = 100
     58        Left = 120
    5959        Height = 28
    6060        Top = 83
     
    7878      end
    7979      object Label4: TLabel
    80         Left = 392
     80        Left = 360
    8181        Height = 20
    8282        Top = 47
     
    9393      end
    9494      object Label5: TLabel
    95         Left = 392
     95        Left = 360
    9696        Height = 20
    9797        Top = 13
     
    102102      object MemoNotes: TMemo
    103103        Left = 13
    104         Height = 225
    105         Top = 152
     104        Height = 185
     105        Top = 192
    106106        Width = 708
    107107        Anchors = [akTop, akLeft, akRight, akBottom]
     
    109109      end
    110110      object Label6: TLabel
    111         Left = 12
    112         Height = 20
    113         Top = 126
     111        Left = 16
     112        Height = 20
     113        Top = 168
    114114        Width = 42
    115115        Caption = 'Notes:'
     116        ParentColor = False
     117      end
     118      object EditEmailHome: TEdit
     119        Left = 479
     120        Height = 28
     121        Top = 83
     122        Width = 212
     123        TabOrder = 6
     124      end
     125      object Label20: TLabel
     126        Left = 360
     127        Height = 20
     128        Top = 80
     129        Width = 101
     130        Caption = 'E-mail (Home):'
     131        ParentColor = False
     132      end
     133      object EditEmailWork: TEdit
     134        Left = 479
     135        Height = 28
     136        Top = 122
     137        Width = 212
     138        TabOrder = 7
     139      end
     140      object Label21: TLabel
     141        Left = 360
     142        Height = 20
     143        Top = 120
     144        Width = 95
     145        Caption = 'E-mail (Work):'
     146        ParentColor = False
     147      end
     148      object EditBirthday: TEdit
     149        Left = 120
     150        Height = 28
     151        Top = 120
     152        Width = 212
     153        TabOrder = 8
     154      end
     155      object Label22: TLabel
     156        Left = 13
     157        Height = 20
     158        Top = 120
     159        Width = 58
     160        Caption = 'Birthday:'
    116161        ParentColor = False
    117162      end
     
    119164    object TabSheetDetails: TTabSheet
    120165      Caption = 'Details'
     166      ClientHeight = 391
     167      ClientWidth = 736
     168      object Label7: TLabel
     169        Left = 8
     170        Height = 20
     171        Top = 15
     172        Width = 99
     173        Caption = 'Phone (Home):'
     174        ParentColor = False
     175      end
     176      object EditPhoneHome: TEdit
     177        Left = 144
     178        Height = 28
     179        Top = 15
     180        Width = 212
     181        TabOrder = 0
     182      end
     183      object Label8: TLabel
     184        Left = 8
     185        Height = 20
     186        Top = 51
     187        Width = 93
     188        Caption = 'Phone (Work):'
     189        ParentColor = False
     190      end
     191      object EditPhoneWork: TEdit
     192        Left = 144
     193        Height = 28
     194        Top = 51
     195        Width = 212
     196        TabOrder = 1
     197      end
     198      object Label9: TLabel
     199        Left = 8
     200        Height = 20
     201        Top = 88
     202        Width = 129
     203        Caption = 'Cell phone (Home):'
     204        ParentColor = False
     205      end
     206      object EditCellPhoneHome: TEdit
     207        Left = 144
     208        Height = 28
     209        Top = 90
     210        Width = 212
     211        TabOrder = 2
     212      end
     213      object Label10: TLabel
     214        Left = 8
     215        Height = 20
     216        Top = 122
     217        Width = 123
     218        Caption = 'Cell phone (Work):'
     219        ParentColor = False
     220      end
     221      object EditCellPhoneWork: TEdit
     222        Left = 144
     223        Height = 28
     224        Top = 122
     225        Width = 212
     226        TabOrder = 3
     227      end
     228      object Label11: TLabel
     229        Left = 376
     230        Height = 20
     231        Top = 13
     232        Width = 25
     233        Caption = 'Fax:'
     234        ParentColor = False
     235      end
     236      object EditFax: TEdit
     237        Left = 487
     238        Height = 28
     239        Top = 15
     240        Width = 212
     241        TabOrder = 4
     242      end
     243      object Label12: TLabel
     244        Left = 376
     245        Height = 20
     246        Top = 48
     247        Width = 80
     248        Caption = 'Fax (Home):'
     249        ParentColor = False
     250      end
     251      object EditFaxHome: TEdit
     252        Left = 487
     253        Height = 28
     254        Top = 51
     255        Width = 212
     256        TabOrder = 5
     257      end
     258      object Label13: TLabel
     259        Left = 376
     260        Height = 20
     261        Top = 88
     262        Width = 74
     263        Caption = 'Fax (Work):'
     264        ParentColor = False
     265      end
     266      object EditFaxWork: TEdit
     267        Left = 487
     268        Height = 28
     269        Top = 90
     270        Width = 212
     271        TabOrder = 6
     272      end
     273      object Label14: TLabel
     274        Left = 376
     275        Height = 20
     276        Top = 120
     277        Width = 41
     278        Caption = 'Pager:'
     279        ParentColor = False
     280      end
     281      object EditPager: TEdit
     282        Left = 487
     283        Height = 28
     284        Top = 122
     285        Width = 212
     286        TabOrder = 7
     287      end
     288      object Label15: TLabel
     289        Left = 8
     290        Height = 20
     291        Top = 184
     292        Width = 72
     293        Caption = 'Web page:'
     294        ParentColor = False
     295      end
     296      object EditWebPage: TEdit
     297        Left = 144
     298        Height = 28
     299        Top = 184
     300        Width = 212
     301        TabOrder = 8
     302      end
     303      object Label16: TLabel
     304        Left = 8
     305        Height = 20
     306        Top = 216
     307        Width = 127
     308        Caption = 'Web page (Home):'
     309        ParentColor = False
     310      end
     311      object EditWebPageHome: TEdit
     312        Left = 144
     313        Height = 28
     314        Top = 216
     315        Width = 212
     316        TabOrder = 9
     317      end
     318      object Label17: TLabel
     319        Left = 8
     320        Height = 20
     321        Top = 248
     322        Width = 121
     323        Caption = 'Web page (Work):'
     324        ParentColor = False
     325      end
     326      object EditWebPageWork: TEdit
     327        Left = 144
     328        Height = 28
     329        Top = 248
     330        Width = 212
     331        TabOrder = 10
     332      end
     333      object Label18: TLabel
     334        Left = 375
     335        Height = 20
     336        Top = 184
     337        Width = 32
     338        Caption = 'Title:'
     339        ParentColor = False
     340      end
     341      object EditTitle: TEdit
     342        Left = 487
     343        Height = 28
     344        Top = 184
     345        Width = 212
     346        TabOrder = 11
     347      end
     348      object Label19: TLabel
     349        Left = 375
     350        Height = 20
     351        Top = 216
     352        Width = 56
     353        Caption = 'Address:'
     354        ParentColor = False
     355      end
     356      object EditAddress: TEdit
     357        Left = 488
     358        Height = 28
     359        Top = 216
     360        Width = 212
     361        TabOrder = 12
     362      end
     363      object LabelOrganization: TLabel
     364        Left = 376
     365        Height = 20
     366        Top = 248
     367        Width = 89
     368        Caption = 'Organization:'
     369        ParentColor = False
     370      end
     371      object EditOrganization: TEdit
     372        Left = 487
     373        Height = 28
     374        Top = 248
     375        Width = 212
     376        TabOrder = 13
     377      end
    121378    end
    122379    object TabSheetAll: TTabSheet
     
    124381      ClientHeight = 391
    125382      ClientWidth = 736
     383      OnShow = TabSheetAllShow
    126384      object ListView1: TListView
    127385        Left = 8
     
    139397            Width = 200
    140398          end>
     399        OwnerData = True
    141400        ReadOnly = True
    142401        RowSelect = True
  • trunk/Forms/UFormContact.pas

    r8 r9  
    1616    ButtonCancel: TButton;
    1717    ButtonOk: TButton;
     18    EditWebPage: TEdit;
     19    EditWebPageHome: TEdit;
     20    EditWebPageWork: TEdit;
     21    EditEmailHome: TEdit;
     22    EditEmailWork: TEdit;
     23    EditBirthday: TEdit;
     24    EditTitle: TEdit;
     25    EditAddress: TEdit;
     26    EditOrganization: TEdit;
     27    EditPhoneHome: TEdit;
     28    EditPhoneWork: TEdit;
     29    EditCellPhoneHome: TEdit;
     30    EditCellPhoneWork: TEdit;
     31    EditFax: TEdit;
     32    EditFaxHome: TEdit;
     33    EditFaxWork: TEdit;
     34    EditPager: TEdit;
    1835    EditSurname: TEdit;
    1936    EditEmail: TEdit;
     
    2239    EditCellPhone: TEdit;
    2340    Label1: TLabel;
     41    Label10: TLabel;
     42    Label11: TLabel;
     43    Label12: TLabel;
     44    Label13: TLabel;
     45    Label14: TLabel;
     46    Label15: TLabel;
     47    Label16: TLabel;
     48    Label17: TLabel;
     49    Label18: TLabel;
     50    Label19: TLabel;
    2451    Label2: TLabel;
     52    Label20: TLabel;
     53    Label21: TLabel;
     54    Label22: TLabel;
     55    LabelOrganization: TLabel;
    2556    Label3: TLabel;
    2657    Label4: TLabel;
    2758    Label5: TLabel;
    2859    Label6: TLabel;
     60    Label7: TLabel;
     61    Label8: TLabel;
     62    Label9: TLabel;
    2963    ListView1: TListView;
    3064    MemoNotes: TMemo;
     
    3771    procedure FormShow(Sender: TObject);
    3872    procedure ListView1Data(Sender: TObject; Item: TListItem);
     73    procedure TabSheetAllShow(Sender: TObject);
    3974  private
    4075    Contact: TContact;
     
    6196  Core.PersistentForm1.Load(Self);
    6297  PageControlContact.TabIndex := 0;
    63   ReloadFields;
    6498end;
    6599
     
    71105    Item.SubItems.Add(Contact.Fields[Index]);
    72106  end;
     107end;
     108
     109procedure TFormContact.TabSheetAllShow(Sender: TObject);
     110begin
     111  ReloadFields;
    73112end;
    74113
     
    96135begin
    97136  Self.Contact := Contact;
    98   ReloadFields;
    99137  EditName.Text := Contact.FirstName;
    100138  EditSurname.Text := Contact.LastName;
    101139  EditCellPhone.Text := Contact.TelCell;
    102   EditPhone.Text := Contact.TelHome;
     140  EditPhoneHome.Text := Contact.TelHome;
     141  EditPhoneWork.Text := Contact.TelWork;
    103142  EditEmail.Text := Contact.EmailHome;
    104143  MemoNotes.Lines.Text := Contact.Note;
     144  EditTitle.Text := Contact.Title;
     145  EditOrganization.Text := Contact.Organization;
     146  EditAddress.Text := Contact.AdrHome;
     147  EditEmailHome.Text := Contact.EmailHome;
    105148end;
    106149
     
    110153  Contact.LastName := EditSurname.Text;
    111154  Contact.TelCell := EditCellPhone.Text;
    112   Contact.TelHome := EditPhone.Text;
     155  Contact.TelHome := EditPhoneHome.Text;
     156  Contact.TelWork := EditPhoneWork.Text;
    113157  Contact.EmailHome := EditEmail.Text;
    114158  Contact.Note := MemoNotes.Lines.Text;
     159  Contact.Title := EditTitle.Text;
     160  Contact.Organization := EditOrganization.Text;
     161  Contact.AdrHome := EditAddress.Text;
     162  Contact.EmailHome := EditEmailHome.Text;
    115163end;
    116164
  • trunk/Languages/vCardStudio.cs.po

    r8 r9  
    9191msgstr "Jméno:"
    9292
     93#: tformcontact.label10.caption
     94msgctxt "tformcontact.label10.caption"
     95msgid "Cell phone (Work):"
     96msgstr ""
     97
     98#: tformcontact.label11.caption
     99msgid "Fax:"
     100msgstr ""
     101
     102#: tformcontact.label12.caption
     103msgid "Fax (Home):"
     104msgstr ""
     105
     106#: tformcontact.label13.caption
     107msgid "Fax (Work):"
     108msgstr ""
     109
     110#: tformcontact.label14.caption
     111msgid "Pager:"
     112msgstr ""
     113
     114#: tformcontact.label15.caption
     115msgctxt "tformcontact.label15.caption"
     116msgid "Web page:"
     117msgstr ""
     118
     119#: tformcontact.label16.caption
     120msgctxt "tformcontact.label16.caption"
     121msgid "Web page (Home):"
     122msgstr ""
     123
     124#: tformcontact.label17.caption
     125msgctxt "tformcontact.label17.caption"
     126msgid "Web page (Work):"
     127msgstr ""
     128
     129#: tformcontact.label18.caption
     130msgid "Title:"
     131msgstr ""
     132
     133#: tformcontact.label19.caption
     134msgid "Address:"
     135msgstr ""
     136
    93137#: tformcontact.label2.caption
    94138msgid "Cell phone:"
    95139msgstr "Mobilní číslo:"
    96140
     141#: tformcontact.label20.caption
     142msgid "E-mail (Home):"
     143msgstr ""
     144
     145#: tformcontact.label21.caption
     146msgid "E-mail (Work):"
     147msgstr ""
     148
     149#: tformcontact.label22.caption
     150msgid "Birthday:"
     151msgstr ""
     152
    97153#: tformcontact.label3.caption
    98154msgid "Phone:"
     
    110166msgid "Notes:"
    111167msgstr "Poznámky:"
     168
     169#: tformcontact.label7.caption
     170msgid "Phone (Home):"
     171msgstr ""
     172
     173#: tformcontact.label8.caption
     174msgid "Phone (Work):"
     175msgstr ""
     176
     177#: tformcontact.label9.caption
     178msgid "Cell phone (Home):"
     179msgstr ""
     180
     181#: tformcontact.labelorganization.caption
     182msgid "Organization:"
     183msgstr ""
    112184
    113185#: tformcontact.listview1.columns[0].caption
  • trunk/Languages/vCardStudio.po

    r8 r9  
    8181msgstr ""
    8282
     83#: tformcontact.label10.caption
     84msgctxt "tformcontact.label10.caption"
     85msgid "Cell phone (Work):"
     86msgstr ""
     87
     88#: tformcontact.label11.caption
     89msgid "Fax:"
     90msgstr ""
     91
     92#: tformcontact.label12.caption
     93msgid "Fax (Home):"
     94msgstr ""
     95
     96#: tformcontact.label13.caption
     97msgid "Fax (Work):"
     98msgstr ""
     99
     100#: tformcontact.label14.caption
     101msgid "Pager:"
     102msgstr ""
     103
     104#: tformcontact.label15.caption
     105msgctxt "tformcontact.label15.caption"
     106msgid "Web page:"
     107msgstr ""
     108
     109#: tformcontact.label16.caption
     110msgctxt "tformcontact.label16.caption"
     111msgid "Web page (Home):"
     112msgstr ""
     113
     114#: tformcontact.label17.caption
     115msgctxt "tformcontact.label17.caption"
     116msgid "Web page (Work):"
     117msgstr ""
     118
     119#: tformcontact.label18.caption
     120msgid "Title:"
     121msgstr ""
     122
     123#: tformcontact.label19.caption
     124msgid "Address:"
     125msgstr ""
     126
    83127#: tformcontact.label2.caption
    84128msgid "Cell phone:"
    85129msgstr ""
    86130
     131#: tformcontact.label20.caption
     132msgid "E-mail (Home):"
     133msgstr ""
     134
     135#: tformcontact.label21.caption
     136msgid "E-mail (Work):"
     137msgstr ""
     138
     139#: tformcontact.label22.caption
     140msgid "Birthday:"
     141msgstr ""
     142
    87143#: tformcontact.label3.caption
    88144msgid "Phone:"
     
    99155#: tformcontact.label6.caption
    100156msgid "Notes:"
     157msgstr ""
     158
     159#: tformcontact.label7.caption
     160msgid "Phone (Home):"
     161msgstr ""
     162
     163#: tformcontact.label8.caption
     164msgid "Phone (Work):"
     165msgstr ""
     166
     167#: tformcontact.label9.caption
     168msgid "Cell phone (Home):"
     169msgstr ""
     170
     171#: tformcontact.labelorganization.caption
     172msgid "Organization:"
    101173msgstr ""
    102174
  • trunk/UContact.pas

    r8 r9  
    1515  TDataType = (dtString, dtInteger, dtDate, dtDateTime, dtImage);
    1616
    17   TContactFieldIndex = (cfFirstName, cfMiddleName, cfLastName);
     17  TContactFieldIndex = (cfFirstName, cfMiddleName, cfLastName, cfTelPrefCell,
     18    cfTelCell, cfTelHome, cfTelHome2, cfTelWork, cfTitle, cfOrganization,
     19    cfAddress, cfNote);
    1820
    1921  TContactField = class
     
    6062    Note: string;
    6163    Role: string;
     64    Title: string;
    6265    Categories: string;
    6366    Organization: string;
     
    124127    cfMiddleName: Result := MiddleName;
    125128    cfLastName: Result := LastName;
     129    cfTelPrefCell: Result := TelPrefCell;
     130    cfTelCell: Result := TelCell;
     131    cfTelHome: Result := TelHome;
     132    cfTelHome2: Result := TelHome2;
     133    cfTelWork: Result := TelWork;
     134    cfTitle: Result := Title;
     135    cfOrganization: Result := Organization;
     136    cfAddress: Result := AdrHome;
     137    cfNote: Result := Note;
    126138  end;
    127139end;
     
    133145    cfMiddleName: MiddleName := AValue;
    134146    cfLastName: LastName := AValue;
     147    cfTelPrefCell: TelPrefCell := AValue;
     148    cfTelCell: TelCell := AValue;
     149    cfTelHome: TelHome := AValue;
     150    cfTelHome2: TelHome2 := AValue;
     151    cfTelWork: TelWork := AValue;
     152    cfTitle: Title := AValue;
     153    cfOrganization: Organization := AValue;
     154    cfAddress: AdrHome := AValue;
     155    cfNote: Note := AValue;
    135156  end;
    136157end;
     
    155176    AddNew('Middle Name', cfMiddleName, dtString);
    156177    AddNew('Last Name', cfLastName, dtString);
     178    AddNew('Preferred cell phone', cfTelPrefCell, dtString);
     179    AddNew('Cell phone', cfTelCell, dtString);
     180    AddNew('Home phone', cfTelHome, dtString);
     181    AddNew('Home phone 2', cfTelHome2, dtString);
     182    AddNew('Home work', cfTelWork, dtString);
     183    AddNew('Title', cfTitle, dtString);
     184    AddNew('Organization', cfOrganization, dtString);
     185    AddNew('Address', cfAddress, dtString);
     186    AddNew('Note', cfNote, dtString);
    157187  end;
    158188end;
Note: See TracChangeset for help on using the changeset viewer.