- Timestamp:
- Mar 25, 2013, 10:58:03 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAccounts.lfm
r12 r20 28 28 end 29 29 item 30 Caption = 'Bank code' 31 end 32 item 30 33 Caption = 'Balance' 31 34 Width = 80 … … 39 42 end> 40 43 OwnerData = True 44 PopupMenu = PopupMenu1 41 45 ReadOnly = True 42 46 RowSelect = True … … 72 76 Top = 308 73 77 Width = 75 78 Action = AAdd 74 79 Anchors = [akLeft, akBottom] 75 Caption = 'Add'76 80 Color = clScrollBar 77 OnClick = ButtonAddClick78 81 TabOrder = 3 79 82 end … … 83 86 Top = 308 84 87 Width = 75 88 Action = ARemove 85 89 Anchors = [akLeft, akBottom] 86 Caption = 'Remove'87 90 Color = clScrollBar 88 OnClick = ButtonRemoveClick89 91 TabOrder = 4 90 92 end … … 127 129 OnChange = LabeledEditTokenChange 128 130 end 131 object ActionList1: TActionList 132 Images = Core.ImageList1 133 left = 200 134 top = 304 135 object AAdd: TAction 136 Caption = 'Add' 137 OnExecute = AAddExecute 138 ShortCut = 45 139 end 140 object ARemove: TAction 141 Caption = 'Remove' 142 OnExecute = ARemoveExecute 143 ShortCut = 46 144 end 145 end 146 object PopupMenu1: TPopupMenu 147 Images = Core.ImageList1 148 left = 280 149 top = 304 150 object MenuItem1: TMenuItem 151 Action = AAdd 152 end 153 object MenuItem2: TMenuItem 154 Action = ARemove 155 end 156 end 129 157 end -
trunk/Forms/UFormAccounts.lrt
r12 r20 2 2 TFORMACCOUNTS.LISTVIEW1.COLUMNS[0].CAPTION=Name 3 3 TFORMACCOUNTS.LISTVIEW1.COLUMNS[1].CAPTION=Number 4 TFORMACCOUNTS.LISTVIEW1.COLUMNS[2].CAPTION=Balance 5 TFORMACCOUNTS.LISTVIEW1.COLUMNS[3].CAPTION=Date 6 TFORMACCOUNTS.LISTVIEW1.COLUMNS[4].CAPTION=Token 4 TFORMACCOUNTS.LISTVIEW1.COLUMNS[2].CAPTION=Bank code 5 TFORMACCOUNTS.LISTVIEW1.COLUMNS[3].CAPTION=Balance 6 TFORMACCOUNTS.LISTVIEW1.COLUMNS[4].CAPTION=Date 7 TFORMACCOUNTS.LISTVIEW1.COLUMNS[5].CAPTION=Token 7 8 TFORMACCOUNTS.BUTTONOK.CAPTION=Ok 8 9 TFORMACCOUNTS.BUTTONCANCEL.CAPTION=Cancel 9 TFORMACCOUNTS.BUTTONADD.CAPTION=Add10 TFORMACCOUNTS.BUTTONREMOVE.CAPTION=Remove11 10 TFORMACCOUNTS.LABELEDEDITTOKEN.EDITLABEL.CAPTION=Token 12 11 TFORMACCOUNTS.LABELEDEDITNAME.EDITLABEL.CAPTION=Name 12 TFORMACCOUNTS.AADD.CAPTION=Add 13 TFORMACCOUNTS.AREMOVE.CAPTION=Remove -
trunk/Forms/UFormAccounts.pas
r14 r20 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 StdCtrls, ExtCtrls, SpecializedList;9 StdCtrls, ExtCtrls, ActnList, Menus, SpecializedList; 10 10 11 11 type … … 14 14 15 15 TFormAccounts = class(TForm) 16 AAdd: TAction; 17 ARemove: TAction; 18 ActionList1: TActionList; 16 19 ButtonAdd: TButton; 17 20 ButtonRemove: TButton; … … 21 24 LabeledEditName: TLabeledEdit; 22 25 ListView1: TListView; 23 procedure ButtonAddClick(Sender: TObject); 24 procedure ButtonRemoveClick(Sender: TObject); 26 MenuItem1: TMenuItem; 27 MenuItem2: TMenuItem; 28 PopupMenu1: TPopupMenu; 29 procedure AAddExecute(Sender: TObject); 30 procedure ARemoveExecute(Sender: TObject); 25 31 procedure FormCreate(Sender: TObject); 26 32 procedure FormDestroy(Sender: TObject); … … 57 63 Item.Data := Accounts[Item.Index]; 58 64 Item.SubItems.Add(Number); 65 Item.SubItems.Add(BankCode); 59 66 Item.SubItems.Add(FloatToStr(Balance)); 60 67 Item.SubItems.Add(DateToStr(Time)); … … 97 104 end; 98 105 99 procedure TFormAccounts.ButtonAddClick(Sender: TObject); 106 procedure TFormAccounts.ARemoveExecute(Sender: TObject); 107 begin 108 if Assigned(ListView1.Selected) then begin 109 Accounts.Delete(Accounts.IndexOf(ListView1.Selected.Data)); 110 Reload; 111 end; 112 end; 113 114 procedure TFormAccounts.AAddExecute(Sender: TObject); 100 115 begin 101 116 with Accounts.AddNew(TAccount.Create) do begin 102 117 end; 103 Reload;104 end;105 106 procedure TFormAccounts.ButtonRemoveClick(Sender: TObject);107 begin108 Accounts.Delete(Accounts.IndexOf(ListView1.Selected.Data));109 118 Reload; 110 119 end; … … 124 133 procedure TFormAccounts.UpdateInterface; 125 134 begin 126 ButtonRemove.Enabled := Assigned(ListView1.Selected);135 ARemove.Enabled := Assigned(ListView1.Selected); 127 136 LabeledEditToken.Enabled := Assigned(ListView1.Selected); 128 137 LabeledEditName.Enabled := Assigned(ListView1.Selected); -
trunk/Forms/UFormMain.lfm
r15 r20 1 1 object FormMain: TFormMain 2 Left = 3 643 Height = 3904 Top = 1 835 Width = 5192 Left = 357 3 Height = 513 4 Top = 122 5 Width = 602 6 6 Caption = 'FioInfo' 7 ClientHeight = 3908 ClientWidth = 5197 ClientHeight = 513 8 ClientWidth = 602 9 9 OnClose = FormClose 10 10 OnCreate = FormCreate … … 13 13 LCLVersion = '1.1' 14 14 object ButtonSettings: TButton 15 Left = 38415 Left = 454 16 16 Height = 25 17 Top = 35817 Top = 481 18 18 Width = 112 19 19 Action = Core.ASettings … … 24 24 Left = 16 25 25 Height = 57 26 Top = 12027 Width = 49828 Anchors = [ak Top, akLeft, akRight]26 Top = 250 27 Width = 581 28 Anchors = [akLeft, akRight, akBottom] 29 29 Caption = 'New transaction from last check' 30 30 ClientHeight = 38 31 ClientWidth = 49431 ClientWidth = 577 32 32 TabOrder = 1 33 33 object ButtonNew: TButton … … 40 40 TabOrder = 0 41 41 end 42 object Label7: TLabel 43 Left = 6 44 Height = 17 45 Top = 12 46 Width = 47 47 Caption = 'Last id:' 48 ParentColor = False 49 end 50 object SpinEditLastId: TSpinEdit 51 Left = 70 52 Height = 27 53 Top = 7 54 Width = 96 55 MaxValue = 1000000000 56 TabOrder = 1 57 end 42 58 end 43 59 object GroupBox2: TGroupBox 44 60 Left = 17 45 61 Height = 72 46 Top = 18447 Width = 49848 Anchors = [ak Top, akLeft, akRight]62 Top = 316 63 Width = 581 64 Anchors = [akLeft, akRight, akBottom] 49 65 Caption = 'Transactions from defined time interval' 50 66 ClientHeight = 53 51 ClientWidth = 49467 ClientWidth = 577 52 68 TabOrder = 2 53 69 object ButtonInterval: TButton … … 112 128 Left = 16 113 129 Height = 65 114 Top = 280115 Width = 499116 Anchors = [ak Top, akLeft, akRight]130 Top = 412 131 Width = 582 132 Anchors = [akLeft, akRight, akBottom] 117 133 Caption = 'Selected mothly report' 118 134 ClientHeight = 46 119 ClientWidth = 495135 ClientWidth = 578 120 136 TabOrder = 3 121 137 object ButtonMonthly: TButton … … 168 184 Left = 16 169 185 Height = 25 170 Top = 358186 Top = 481 171 187 Width = 112 172 188 Action = Core.AExit … … 177 193 Left = 136 178 194 Height = 25 179 Top = 358195 Top = 481 180 196 Width = 112 181 197 Action = Core.AAbout … … 195 211 Height = 29 196 212 Top = 8 197 Width = 3 12213 Width = 395 198 214 Anchors = [akTop, akLeft, akRight] 199 215 ItemHeight = 0 … … 203 219 end 204 220 object ButtonNew1: TButton 205 Left = 4 16221 Left = 499 206 222 Height = 25 207 223 Top = 8 … … 214 230 object GroupBox4: TGroupBox 215 231 Left = 16 216 Height = 65232 Height = 197 217 233 Top = 48 218 Width = 498219 Anchors = [akTop, akLeft, akRight ]234 Width = 581 235 Anchors = [akTop, akLeft, akRight, akBottom] 220 236 Caption = 'Account state' 221 ClientHeight = 46222 ClientWidth = 494237 ClientHeight = 178 238 ClientWidth = 577 223 239 TabOrder = 8 224 240 object Label6: TLabel … … 241 257 Left = 358 242 258 Height = 25 243 Top = 7259 Top = -1 244 260 Width = 112 245 261 Caption = 'Get' … … 247 263 TabOrder = 0 248 264 end 265 object ListView1: TListView 266 Left = 6 267 Height = 144 268 Top = 31 269 Width = 561 270 Anchors = [akTop, akLeft, akRight, akBottom] 271 Columns = < 272 item 273 Caption = 'Id' 274 end 275 item 276 Caption = 'Date' 277 Width = 80 278 end 279 item 280 Caption = 'Account' 281 Width = 80 282 end 283 item 284 Caption = 'Value' 285 Width = 80 286 end 287 item 288 Caption = 'Var. sym.' 289 Width = 70 290 end 291 item 292 Caption = 'Spec. sym.' 293 end 294 item 295 Caption = 'Const. sym.' 296 Width = 134 297 end> 298 TabOrder = 1 299 ViewStyle = vsReport 300 end 249 301 end 250 302 end -
trunk/Forms/UFormMain.lrt
r15 r20 2 2 TFORMMAIN.GROUPBOX1.CAPTION=New transaction from last check 3 3 TFORMMAIN.BUTTONNEW.CAPTION=Download 4 TFORMMAIN.LABEL7.CAPTION=Last id: 4 5 TFORMMAIN.GROUPBOX2.CAPTION=Transactions from defined time interval 5 6 TFORMMAIN.BUTTONINTERVAL.CAPTION=Download … … 20 21 TFORMMAIN.LABELBALANCE.CAPTION= 21 22 TFORMMAIN.BUTTONGETSTATE.CAPTION=Get 23 TFORMMAIN.LISTVIEW1.COLUMNS[0].CAPTION=Id 24 TFORMMAIN.LISTVIEW1.COLUMNS[1].CAPTION=Date 25 TFORMMAIN.LISTVIEW1.COLUMNS[2].CAPTION=Account 26 TFORMMAIN.LISTVIEW1.COLUMNS[3].CAPTION=Value 27 TFORMMAIN.LISTVIEW1.COLUMNS[4].CAPTION=Var. sym. 28 TFORMMAIN.LISTVIEW1.COLUMNS[5].CAPTION=Spec. sym. 29 TFORMMAIN.LISTVIEW1.COLUMNS[6].CAPTION=Const. sym. -
trunk/Forms/UFormMain.pas
r16 r20 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ExtCtrls, Menus, ActnList, Spin, EditBtn, UFioAPI, URegistry,Registry,10 DateUtils;9 ExtCtrls, Menus, ActnList, Spin, EditBtn, ComCtrls, UFioAPI, URegistry, 10 Registry, DateUtils; 11 11 12 12 type … … 36 36 Label5: TLabel; 37 37 Label6: TLabel; 38 Label7: TLabel; 38 39 LabelBalance: TLabel; 40 ListView1: TListView; 39 41 SpinEditYear: TSpinEdit; 40 42 SpinEditId: TSpinEdit; 43 SpinEditLastId: TSpinEdit; 41 44 procedure ButtonGetStateClick(Sender: TObject); 42 45 procedure ButtonIntervalClick(Sender: TObject); -
trunk/Forms/UFormSettings.lfm
r18 r20 100 100 Width = 532 101 101 Anchors = [akTop, akLeft, akRight] 102 Caption = '%f - data format, %d - date, %t - time, %a - account number, %n - account name, % % - percent symbol'102 Caption = '%f - data format, %d - date, %t - time, %a - account number, %n - account name, %b - bank code, %% - percent symbol' 103 103 ParentColor = False 104 104 WordWrap = True -
trunk/Forms/UFormSettings.lrt
r18 r20 6 6 TFORMSETTINGS.BUTTON1.CAPTION=Select 7 7 TFORMSETTINGS.LABELEDEDITFILENAMEFORMAT.EDITLABEL.CAPTION=Output file name format: 8 TFORMSETTINGS.LABEL2.CAPTION=%f - data format, %d - date, %t - time, %a - account number, %n - account name, % % - percent symbol8 TFORMSETTINGS.LABEL2.CAPTION=%f - data format, %d - date, %t - time, %a - account number, %n - account name, %b - bank code, %% - percent symbol 9 9 TFORMSETTINGS.LABEL3.CAPTION=Interface language: -
trunk/Languages/FioInfo.cs.po
r18 r20 61 61 msgstr "O aplikaci" 62 62 63 #: tformaccounts.buttonadd.caption 63 #: tformaccounts.aadd.caption 64 msgctxt "tformaccounts.aadd.caption" 64 65 msgid "Add" 65 66 msgstr "PÅidat" 67 68 #: tformaccounts.aremove.caption 69 msgctxt "tformaccounts.aremove.caption" 70 msgid "Remove" 71 msgstr "Odebrat" 66 72 67 73 #: tformaccounts.buttoncancel.caption … … 75 81 msgstr "Ok" 76 82 77 #: tformaccounts.buttonremove.caption78 msgid "Remove"79 msgstr "Odebrat"80 81 83 #: tformaccounts.caption 82 84 msgctxt "tformaccounts.caption" … … 104 106 105 107 #: tformaccounts.listview1.columns[2].caption 108 #| msgid "Balance" 109 msgid "Bank code" 110 msgstr "Kód banky" 111 112 #: tformaccounts.listview1.columns[3].caption 113 #| msgid "Date" 114 msgctxt "tformaccounts.listview1.columns[3].caption" 106 115 msgid "Balance" 107 116 msgstr "Zůstatek" 108 117 109 #: tformaccounts.listview1.columns[ 3].caption118 #: tformaccounts.listview1.columns[4].caption 110 119 #| msgid "Token" 111 msgctxt "tformaccounts.listview1.columns[ 3].caption"120 msgctxt "tformaccounts.listview1.columns[4].caption" 112 121 msgid "Date" 113 122 msgstr "Datum" 114 123 115 #: tformaccounts.listview1.columns[ 4].caption116 msgctxt "tformaccounts.listview1.columns[ 4].caption"124 #: tformaccounts.listview1.columns[5].caption 125 msgctxt "tformaccounts.listview1.columns[5].caption" 117 126 msgid "Token" 118 127 msgstr "Token" … … 208 217 msgstr "Zůstatek:" 209 218 219 #: tformmain.label7.caption 220 msgid "Last id:" 221 msgstr "Poslednà Id:" 222 210 223 #: tformmain.labelbalance.caption 211 224 msgid " " 212 msgstr "" 225 msgstr " " 226 227 #: tformmain.listview1.columns[0].caption 228 msgid "Id" 229 msgstr "Id" 230 231 #: tformmain.listview1.columns[1].caption 232 msgctxt "tformmain.listview1.columns[1].caption" 233 msgid "Date" 234 msgstr "Datum" 235 236 #: tformmain.listview1.columns[2].caption 237 msgid "Account" 238 msgstr "ÃÄet" 239 240 #: tformmain.listview1.columns[3].caption 241 msgid "Value" 242 msgstr "Hodnota" 243 244 #: tformmain.listview1.columns[4].caption 245 msgid "Var. sym." 246 msgstr "Var. sym." 247 248 #: tformmain.listview1.columns[5].caption 249 msgid "Spec. sym." 250 msgstr "Spec. sym." 251 252 #: tformmain.listview1.columns[6].caption 253 msgid "Const. sym." 254 msgstr "Konst. sym." 213 255 214 256 #: tformsettings.button1.caption … … 236 278 237 279 #: tformsettings.label2.caption 238 msgid "%f - data format, %d - date, %t - time, %a - account number, %n - account name, %% - percent symbol" 239 msgstr "%f - formát dat, %d - datum, %t - Äas, %a - ÄÃslo úÄtu, %n - jméno úÄtu, %% - znak procent" 280 #| msgid "%f - data format, %d - date, %t - time, %a - account number, %n - account name, %% - percent symbol" 281 msgid "%f - data format, %d - date, %t - time, %a - account number, %n - account name, %b - bank code, %% - percent symbol" 282 msgstr "%f - formát dat, %d - datum, %t - Äas, %a - ÄÃslo úÄtu, %n - jméno úÄtu, %b - kód banky, %% - znak procent" 240 283 241 284 #: tformsettings.label3.caption -
trunk/Languages/FioInfo.po
r18 r20 53 53 msgstr "" 54 54 55 #: tformaccounts.buttonadd.caption 55 #: tformaccounts.aadd.caption 56 msgctxt "TFORMACCOUNTS.AADD.CAPTION" 56 57 msgid "Add" 58 msgstr "" 59 60 #: tformaccounts.aremove.caption 61 msgctxt "TFORMACCOUNTS.AREMOVE.CAPTION" 62 msgid "Remove" 57 63 msgstr "" 58 64 … … 67 73 msgstr "" 68 74 69 #: tformaccounts.buttonremove.caption70 msgid "Remove"71 msgstr ""72 73 75 #: tformaccounts.caption 74 76 msgctxt "tformaccounts.caption" … … 96 98 97 99 #: tformaccounts.listview1.columns[2].caption 98 msgid "Ba lance"100 msgid "Bank code" 99 101 msgstr "" 100 102 101 103 #: tformaccounts.listview1.columns[3].caption 102 104 msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[3].CAPTION" 103 msgid " Date"105 msgid "Balance" 104 106 msgstr "" 105 107 106 108 #: tformaccounts.listview1.columns[4].caption 107 109 msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[4].CAPTION" 110 msgid "Date" 111 msgstr "" 112 113 #: tformaccounts.listview1.columns[5].caption 114 msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[5].CAPTION" 108 115 msgid "Token" 109 116 msgstr "" … … 198 205 msgstr "" 199 206 207 #: tformmain.label7.caption 208 msgid "Last id:" 209 msgstr "" 210 200 211 #: tformmain.labelbalance.caption 201 212 msgid " " 213 msgstr "" 214 215 #: tformmain.listview1.columns[0].caption 216 msgid "Id" 217 msgstr "" 218 219 #: tformmain.listview1.columns[1].caption 220 msgctxt "TFORMMAIN.LISTVIEW1.COLUMNS[1].CAPTION" 221 msgid "Date" 222 msgstr "" 223 224 #: tformmain.listview1.columns[2].caption 225 msgid "Account" 226 msgstr "" 227 228 #: tformmain.listview1.columns[3].caption 229 msgid "Value" 230 msgstr "" 231 232 #: tformmain.listview1.columns[4].caption 233 msgid "Var. sym." 234 msgstr "" 235 236 #: tformmain.listview1.columns[5].caption 237 msgid "Spec. sym." 238 msgstr "" 239 240 #: tformmain.listview1.columns[6].caption 241 msgid "Const. sym." 202 242 msgstr "" 203 243 … … 226 266 227 267 #: tformsettings.label2.caption 228 msgid "%f - data format, %d - date, %t - time, %a - account number, %n - account name, % % - percent symbol"268 msgid "%f - data format, %d - date, %t - time, %a - account number, %n - account name, %b - bank code, %% - percent symbol" 229 269 msgstr "" 230 270 -
trunk/UCore.lfm
r14 r20 405 405 EmailContact = 'robie@centrum.cz' 406 406 AppName = 'FioInfo' 407 ReleaseDate = 4135 2407 ReleaseDate = 41358 408 408 RegistryKey = '\Software\Chronosoft\FioInfo' 409 409 RegistryRoot = rrKeyCurrentUser -
trunk/UCore.pas
r19 r20 11 11 12 12 type 13 TAccountOperation = class 14 Id: string; 15 Time: TDateTime; 16 Value: Double; 17 VarSym: string; 18 SpecSym: string; 19 ConstSym: string; 20 end; 13 21 14 22 { TAccount } … … 18 26 Name: string; 19 27 Number: string; 28 BankCode: string; 20 29 Balance: Double; 21 30 Time: TDateTime; 31 Operations: TListObject; 22 32 procedure Assign(Source: TAccount); 23 33 procedure LoadFromRegistry(Context: TRegistryContext); 24 34 procedure SaveToRegistry(Context: TRegistryContext); 35 constructor Create; 36 destructor Destroy; override; 25 37 end; 26 38 … … 128 140 Balance := ReadFloatWithDefault('Balance', 0); 129 141 Number := UTF8Encode(ReadStringWithDefault('Number', '')); 142 BankCode := UTF8Encode(ReadStringWithDefault('BankCode', '')); 130 143 finally 131 144 Free; … … 144 157 WriteString('Token', UTF8Decode(Token)); 145 158 WriteFloat('Balance', Balance); 146 finally 147 Free; 148 end; 159 WriteString('BankCode', UTF8Decode(BankCode)); 160 finally 161 Free; 162 end; 163 end; 164 165 constructor TAccount.Create; 166 begin 167 Operations := TListObject.Create; 168 end; 169 170 destructor TAccount.Destroy; 171 begin 172 Operations.Free; 173 inherited Destroy; 149 174 end; 150 175 … … 194 219 Strings.Delete(Strings.Count - 1); 195 220 for I := 0 to Count - 1 do begin 196 Strings.Strings[I] := TAccount(Items[I]).Name + ' (' + TAccount(Items[I]).Number + ')'; 221 Strings.Strings[I] := IntToStr(I) + ': ' + TAccount(Items[I]).Name + ' (' + 222 TAccount(Items[I]).Number + '/' + TAccount(Items[I]).BankCode + ')'; 197 223 Strings.Objects[I] := Items[I]; 198 224 end; … … 240 266 Result := StringReplace(Result, '%a', CurrentAccount.Number, [rfReplaceAll]); 241 267 Result := StringReplace(Result, '%n', CurrentAccount.Name, [rfReplaceAll]); 268 Result := StringReplace(Result, '%b', CurrentAccount.BankCode, [rfReplaceAll]); 242 269 Result := StringReplace(Result, '%%', '%', [rfReplaceAll]); 243 270 end; … … 273 300 Node2 := Node.FindNode('bankId'); 274 301 if Assigned(Node2) then 275 Account. Number := Account.Number + '/' +UTF8Encode(Node2.TextContent);302 Account.BankCode := UTF8Encode(Node2.TextContent); 276 303 Node2 := Node.FindNode('closingBalance'); 277 304 if Assigned(Node2) then … … 279 306 DefaultFormatSettings.DecimalSeparator, [rfReplaceAll])); 280 307 end else begin 308 Account.BankCode := ''; 281 309 Account.Number := ''; 282 310 Account.Balance := 0;
Note:
See TracChangeset
for help on using the changeset viewer.