Changeset 2
- Timestamp:
- Jan 26, 2018, 11:23:26 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
*.lrj
heaptrclog.trc
lib
vCardStudio
*.lps
*.res
-
Property svn:ignore
set to
-
trunk/Forms
-
Property svn:ignore
set to
*.lrj
-
Property svn:ignore
set to
-
trunk/Forms/UFormContacts.lfm
r1 r2 7 7 ClientHeight = 605 8 8 ClientWidth = 807 9 OnClose = FormClose 9 10 OnShow = FormShow 10 11 LCLVersion = '1.8.0.4' 11 12 object ListView1: TListView 12 13 Left = 0 13 Height = 60514 Height = 579 14 15 Top = 0 15 16 Width = 807 … … 21 22 end> 22 23 OwnerData = True 24 PopupMenu = PopupMenuContact 23 25 ReadOnly = True 24 26 RowSelect = True … … 26 28 ViewStyle = vsReport 27 29 OnData = ListView1Data 30 OnDblClick = ListView1DblClick 31 OnSelectItem = ListView1SelectItem 32 end 33 object ToolBar1: TToolBar 34 Left = 0 35 Height = 26 36 Top = 579 37 Width = 807 38 Align = alBottom 39 Caption = 'ToolBar1' 40 Images = Core.ImageList1 41 TabOrder = 1 42 object ToolButton1: TToolButton 43 Left = 1 44 Top = 2 45 Action = AAdd 46 end 47 object ToolButton2: TToolButton 48 Left = 24 49 Top = 2 50 Action = AModify 51 end 52 object ToolButton3: TToolButton 53 Left = 47 54 Top = 2 55 Action = ARemove 56 end 57 end 58 object PopupMenuContact: TPopupMenu 59 Images = Core.ImageList1 60 left = 290 61 top = 175 62 object MenuItem1: TMenuItem 63 Action = AAdd 64 end 65 object MenuItem2: TMenuItem 66 Action = AModify 67 end 68 object MenuItem3: TMenuItem 69 Action = ARemove 70 end 71 end 72 object ActionList1: TActionList 73 Images = Core.ImageList1 74 left = 488 75 top = 171 76 object AAdd: TAction 77 Caption = 'Add' 78 ImageIndex = 9 79 OnExecute = AAddExecute 80 ShortCut = 45 81 end 82 object AModify: TAction 83 Caption = 'Modify' 84 ImageIndex = 6 85 OnExecute = AModifyExecute 86 ShortCut = 13 87 end 88 object ARemove: TAction 89 Caption = 'Remove' 90 ImageIndex = 10 91 OnExecute = ARemoveExecute 92 ShortCut = 46 93 end 28 94 end 29 95 end -
trunk/Forms/UFormContacts.pas
r1 r2 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, UContact;9 ComCtrls, Menus, ActnList, UContact; 10 10 11 11 type … … 14 14 15 15 TFormContacts = class(TForm) 16 AAdd: TAction; 17 ARemove: TAction; 18 AModify: TAction; 19 ActionList1: TActionList; 16 20 ListView1: TListView; 21 MenuItem1: TMenuItem; 22 MenuItem2: TMenuItem; 23 MenuItem3: TMenuItem; 24 PopupMenuContact: TPopupMenu; 25 ToolBar1: TToolBar; 26 ToolButton1: TToolButton; 27 ToolButton2: TToolButton; 28 ToolButton3: TToolButton; 29 procedure AAddExecute(Sender: TObject); 30 procedure AModifyExecute(Sender: TObject); 31 procedure ARemoveExecute(Sender: TObject); 32 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 17 33 procedure FormShow(Sender: TObject); 18 34 procedure ListView1Data(Sender: TObject; Item: TListItem); 35 procedure ListView1DblClick(Sender: TObject); 36 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 37 Selected: Boolean); 19 38 private 20 39 … … 22 41 Contacts: TContacts; 23 42 procedure ReloadList; 43 procedure UpdateInterface; 24 44 end; 25 45 … … 27 47 FormContacts: TFormContacts; 28 48 49 29 50 implementation 30 51 31 52 {$R *.lfm} 53 54 uses 55 UFormContact, UCore; 32 56 33 57 { TFormContacts } … … 42 66 end; 43 67 68 procedure TFormContacts.ListView1DblClick(Sender: TObject); 69 begin 70 AModify.Execute; 71 end; 72 73 procedure TFormContacts.ListView1SelectItem(Sender: TObject; Item: TListItem; 74 Selected: Boolean); 75 begin 76 UpdateInterface; 77 end; 78 44 79 procedure TFormContacts.FormShow(Sender: TObject); 45 80 begin 81 Core.PersistentForm1.Load(Self); 46 82 ReloadList; 83 UpdateInterface; 84 end; 85 86 procedure TFormContacts.AAddExecute(Sender: TObject); 87 var 88 FormContact: TFormContact; 89 begin 90 FormContact := TFormContact.Create(nil); 91 if FormContact.ShowModal = mrOK then begin 92 FormContact.SaveData(TContact(ListView1.Selected.Data)); 93 ReloadList; 94 UpdateInterface; 95 end; 96 FormContact.Free; 97 end; 98 99 procedure TFormContacts.AModifyExecute(Sender: TObject); 100 var 101 FormContact: TFormContact; 102 begin 103 FormContact := TFormContact.Create(nil); 104 FormContact.LoadData(TContact(ListView1.Selected.Data)); 105 if FormContact.ShowModal = mrOK then begin 106 FormContact.SaveData(TContact(ListView1.Selected.Data)); 107 ReloadList; 108 UpdateInterface; 109 end; 110 FormContact.Free; 111 end; 112 113 procedure TFormContacts.ARemoveExecute(Sender: TObject); 114 var 115 I: Integer; 116 begin 117 for I := ListView1.Items.Count - 1 downto 0 do 118 if ListView1.Items[I].Selected then begin 119 Contacts.Delete(I); 120 end; 121 UpdateInterface; 122 end; 123 124 procedure TFormContacts.FormClose(Sender: TObject; var CloseAction: TCloseAction 125 ); 126 begin 127 Core.PersistentForm1.Save(Self); 47 128 end; 48 129 … … 55 136 end; 56 137 138 procedure TFormContacts.UpdateInterface; 139 begin 140 AModify.Enabled := Assigned(ListView1.Selected); 141 ARemove.Enabled := Assigned(ListView1.Selected); 142 end; 143 57 144 end. 58 145 -
trunk/Languages/vCardStudio.po
r1 r2 44 44 msgstr "" 45 45 46 #: tformcontact.buttoncancel.caption 47 msgctxt "tformcontact.buttoncancel.caption" 48 msgid "Cancel" 49 msgstr "" 50 51 #: tformcontact.buttonok.caption 52 msgid "OK" 53 msgstr "" 54 55 #: tformcontact.caption 56 msgid "Contact" 57 msgstr "" 58 59 #: tformcontact.label1.caption 60 msgid "Name:" 61 msgstr "" 62 63 #: tformcontact.tabsheetall.caption 64 msgid "All fields" 65 msgstr "" 66 67 #: tformcontact.tabsheetdetails.caption 68 msgid "Details" 69 msgstr "" 70 71 #: tformcontact.tabsheetgeneral.caption 72 msgid "General" 73 msgstr "" 74 75 #: tformcontacts.aadd.caption 76 msgid "Add" 77 msgstr "" 78 79 #: tformcontacts.amodify.caption 80 msgid "Modify" 81 msgstr "" 82 83 #: tformcontacts.aremove.caption 84 msgid "Remove" 85 msgstr "" 86 46 87 #: tformcontacts.caption 47 88 msgid "Contacts" … … 50 91 #: tformcontacts.listview1.columns[0].caption 51 92 msgid "Name" 93 msgstr "" 94 95 #: tformcontacts.toolbar1.caption 96 msgid "ToolBar1" 52 97 msgstr "" 53 98 … … 83 128 84 129 #: tformsettings.buttoncancel.caption 130 msgctxt "tformsettings.buttoncancel.caption" 85 131 msgid "Cancel" 86 132 msgstr "" -
trunk/Packages/Common
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/Packages/CoolTranslator
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/Packages/TemplateGenerics
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/UCore.lfm
r1 r2 11 11 top = 231 12 12 Bitmap = { 13 4C690 9000000100000001000000000000000000000000000000000000000000013 4C690B0000001000000010000000000000000000000000000000000000000000 14 14 0000000000000000000000000000000000000000000000000000000000000000 15 15 0000000000000000000000000000000000000000000000000000000000000000 … … 299 299 28FF000000000000000000000000000000000000000000000000000000000000 300 300 0000000000003F3428FF3F3428FF3F3428FF3F3428FF00000000000000000000 301 0000000000000000000000000000000000000000000000000000000000000000 302 000070A970FF006400FF006200FF70A670FF0000000000000000000000000000 303 0000000000000000000000000000000000000000000000000000000000000000 304 0000006400FFECFFECFF8CFE8CFF006000FFD4D4D4FF00000000000000000000 305 0000000000000000000000000000000000000000000000000000000000000000 306 0000006400FF8CFE8CFF00E800FF005E00FFB2B2B2FF00000000000000000000 307 0000000000000000000000000000000000000000000000000000000000000000 308 0000006200FF8CFE8CFF00E500FF005C00FFB2B2B2FF00000000000000000000 309 0000000000000000000000000000000000000000000000000000000000000000 310 0000006000FF8CFE8CFF00E000FF005A00FFB2B2B2FF00000000000000000000 311 000000000000000000000000000070A970FF006400FF006400FF006200FF0060 312 00FF006000FF8CFE8CFF00DD00FF005800FF005600FF005400FF005300FF0050 313 00FF709C70FF0000000000000000006400FFECFFECFF8CFE8CFF8CFE8CFF8CFE 314 8CFF8CFE8CFF00DE00FF00D900FF00D400FF00D000FF00CC00FF00C800FF00C4 315 00FF004A00FFD4D4D4FF00000000006200FF8CFE8CFF00EA00FF00E600FF00E2 316 00FF00DE00FF00DA00FF00D400FF00D000FF00CC00FF00C800FF00C400FF00C2 317 00FF004800FFB2B2B2FF0000000070A670FF005E00FF005C00FF005A00FF0058 318 00FF005600FF00D600FF00D000FF005000FF004E00FF004C00FF004A00FF004A 319 00FF4E764EFFB2B2B2FF0000000000000000D4D4D4FFB2B2B2FFB2B2B2FFB2B2 320 B2FF005400FF00D200FF00CE00FF004E00FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2 321 B2FFB2B2B2FFD4D4D4FF00000000000000000000000000000000000000000000 322 0000005300FF00CE00FF00CA00FF004C00FFB2B2B2FF00000000000000000000 323 0000000000000000000000000000000000000000000000000000000000000000 324 0000005000FF00CA00FF00C600FF004A00FFB2B2B2FF00000000000000000000 325 0000000000000000000000000000000000000000000000000000000000000000 326 0000004E00FF00C800FF00C400FF004800FFB2B2B2FF00000000000000000000 327 0000000000000000000000000000000000000000000000000000000000000000 328 0000709B70FF004A00FF004800FF4E764EFFB2B2B2FF00000000000000000000 329 0000000000000000000000000000000000000000000000000000000000000000 330 000000000000D4D4D4FFB2B2B2FFB2B2B2FFD4D4D4FF00000000000000000000 331 0000000000000000000000000000000000000000000000000000000000000000 332 0000000000000000000000000000000000000000000000000000000000000000 333 0000000000000000000000000000000000000000000000000000000000000000 334 0000000000000000000000000000000000000000000000000000000000000000 335 000000000000000000000000000000000000000000008C8CBBFF000088FF8C8C 336 BBFF00000000000000000000000000000000000000008C8CBBFF000075FF8C8C 337 BBFF000000000000000000000000000000008C8CBBFF000088FF619BFFFF0000 338 86FF7979A8FF0000000000000000000000008C8CBBFF000075FF619BFFFF0000 339 6EFF7979A8FF000000000000000000000000000088FF619BFFFF0057FFFF0054 340 FFFF000082FF7979A8FF000000008C8CBBFF000075FF619BFFFF003AFFFF0035 341 FFFF000068FFDCDCDCFF00000000000000008C8CBBFF000086FF0054FFFF0052 342 FFFF004EFFFF00007CFF7979A8FF000075FF619BFFFF003AFFFF0035FFFF0000 343 67FF626291FFB2B2B2FF0000000000000000000000007979A8FF000082FF004E 344 FFFF004BFFFF0047FFFF000075FF619BFFFF003AFFFF0035FFFF000068FF6262 345 91FFB2B2B2FFDCDCDCFF000000000000000000000000000000007979A8FF0000 346 7CFF0047FFFF0042FFFF003EFFFF003AFFFF0035FFFF000068FF626291FFB2B2 347 B2FFDCDCDCFF0000000000000000000000000000000000000000000000007979 348 A8FF000075FF003EFFFF003AFFFF0035FFFF000068FF626291FFB2B2B2FFDCDC 349 DCFF0000000000000000000000000000000000000000000000008C8CBBFF0000 350 75FF619BFFFF003AFFFF0035FFFF0030FFFF002BFFFF000061FF7979A8FF0000 351 000000000000000000000000000000000000000000008C8CBBFF000075FF619B 352 FFFF003AFFFF0035FFFF000067FF002CFFFF0027FFFF0023FFFF000059FF7979 353 A8FF000000000000000000000000000000008C8CBBFF000075FF619BFFFF003A 354 FFFF0035FFFF000067FF626291FF000061FF0023FFFF001FFFFF001BFFFF0000 355 54FF7979A8FF000000000000000000000000000072FF619BFFFF003AFFFF0035 356 FFFF000067FF626291FFB2B2B2FF7979A8FF000059FF001BFFFF0018FFFF0015 357 FFFF000050FFDCDCDCFF00000000000000008C8CBBFF00006EFF0035FFFF0000 358 68FF626291FFB2B2B2FFDCDCDCFF000000007979A8FF000054FF0015FFFF0000 359 50FF626291FFB2B2B2FF0000000000000000000000007979A8FF000067FF6262 360 91FFB2B2B2FFDCDCDCFF0000000000000000000000007979A8FF000050FF6262 361 91FFB2B2B2FFDCDCDCFF00000000000000000000000000000000DCDCDCFFB2B2 362 B2FFDCDCDCFF0000000000000000000000000000000000000000DCDCDCFFB2B2 363 B2FFDCDCDCFF0000000000000000000000000000000000000000000000000000 364 0000000000000000000000000000000000000000000000000000000000000000 301 365 0000000000000000000000000000 302 366 } -
trunk/vCardStudio.lpi
r1 r2 92 92 </Item4> 93 93 </RequiredPackages> 94 <Units Count=" 8">94 <Units Count="9"> 95 95 <Unit0> 96 96 <Filename Value="vCardStudio.lpr"/> … … 137 137 <IsPartOfProject Value="True"/> 138 138 <ComponentName Value="FormContacts"/> 139 <HasResources Value="True"/> 139 140 <ResourceBaseClass Value="Form"/> 140 141 </Unit7> 142 <Unit8> 143 <Filename Value="Forms\UFormContact.pas"/> 144 <IsPartOfProject Value="True"/> 145 <ComponentName Value="FormContact"/> 146 <ResourceBaseClass Value="Form"/> 147 </Unit8> 141 148 </Units> 142 149 </ProjectOptions> -
trunk/vCardStudio.lpr
r1 r2 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UFormMain, UCore, Common, CoolTranslator, UDataFile, 11 TemplateGenerics, SysUtils, UFormContacts 11 TemplateGenerics, SysUtils, UFormContacts, UFormContact 12 12 { you can add units after this }; 13 13
Note:
See TracChangeset
for help on using the changeset viewer.