Changeset 22 for trunk


Ignore:
Timestamp:
Mar 25, 2013, 11:47:38 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Příprava pro zobrazování seznamu operací.
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAccounts.lfm

    r21 r22  
    2020    Columns = <   
    2121      item
     22        Caption = 'Seq.'
     23      end   
     24      item
    2225        Caption = 'Name'
    2326        Width = 150
     
    7376  object LabeledEditToken: TLabeledEdit
    7477    Left = 8
     78    Height = 21
     79    Top = 432
     80    Width = 601
    7581    Height = 27
    7682    Top = 428
     
    8288    EditLabel.AnchorSideBottom.Control = LabeledEditToken
    8389    EditLabel.Left = 8
     90    EditLabel.Height = 13
     91    EditLabel.Top = 416
     92    EditLabel.Width = 601
    8493    EditLabel.Height = 17
    8594    EditLabel.Top = 408
     
    95104    Top = 374
    96105    Width = 617
     106    Height = 21
     107    Top = 378
     108    Width = 601
    97109    Anchors = [akLeft, akRight, akBottom]
    98110    EditLabel.AnchorSideLeft.Control = LabeledEditName
     
    104116    EditLabel.Top = 354
    105117    EditLabel.Width = 617
     118    EditLabel.Height = 13
     119    EditLabel.Top = 362
     120    EditLabel.Width = 601
    106121    EditLabel.Caption = 'Name'
    107122    EditLabel.ParentColor = False
  • trunk/Forms/UFormAccounts.lrt

    r20 r22  
    11TFORMACCOUNTS.CAPTION=Accounts
    2 TFORMACCOUNTS.LISTVIEW1.COLUMNS[0].CAPTION=Name
    3 TFORMACCOUNTS.LISTVIEW1.COLUMNS[1].CAPTION=Number
    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
     2TFORMACCOUNTS.LISTVIEW1.COLUMNS[0].CAPTION=Seq.
     3TFORMACCOUNTS.LISTVIEW1.COLUMNS[1].CAPTION=Name
     4TFORMACCOUNTS.LISTVIEW1.COLUMNS[2].CAPTION=Number
     5TFORMACCOUNTS.LISTVIEW1.COLUMNS[3].CAPTION=Bank code
     6TFORMACCOUNTS.LISTVIEW1.COLUMNS[4].CAPTION=Balance
     7TFORMACCOUNTS.LISTVIEW1.COLUMNS[5].CAPTION=Date
     8TFORMACCOUNTS.LISTVIEW1.COLUMNS[6].CAPTION=Token
    89TFORMACCOUNTS.BUTTONOK.CAPTION=Ok
    910TFORMACCOUNTS.BUTTONCANCEL.CAPTION=Cancel
  • trunk/Forms/UFormAccounts.pas

    r21 r22  
    6060  if (Item.Index >= 0) and (Item.Index < Accounts.Count) then
    6161  with TAccount(Accounts[Item.Index]) do begin
    62     Item.Caption := Name;
     62    Item.Caption := IntToStr(Item.Index + 1);
    6363    Item.Data := Accounts[Item.Index];
     64    Item.SubItems.Add(Name);
    6465    Item.SubItems.Add(Number);
    6566    Item.SubItems.Add(BankCode);
  • trunk/Forms/UFormMain.lfm

    r20 r22  
    2828    Anchors = [akLeft, akRight, akBottom]
    2929    Caption = 'New transaction from last check'
    30     ClientHeight = 38
     30    ClientHeight = 39
    3131    ClientWidth = 577
    3232    TabOrder = 1
     
    4242    object Label7: TLabel
    4343      Left = 6
    44       Height = 17
    45       Top = 12
    46       Width = 47
     44      Height = 13
     45      Top = 12
     46      Width = 35
    4747      Caption = 'Last id:'
    4848      ParentColor = False
     
    5050    object SpinEditLastId: TSpinEdit
    5151      Left = 70
    52       Height = 27
     52      Height = 21
    5353      Top = 7
    5454      Width = 96
     
    6464    Anchors = [akLeft, akRight, akBottom]
    6565    Caption = 'Transactions from defined time interval'
    66     ClientHeight = 53
     66    ClientHeight = 54
    6767    ClientWidth = 577
    6868    TabOrder = 2
     
    7878    object DateEditStart: TDateEdit
    7979      Left = 54
    80       Height = 27
     80      Height = 21
    8181      Top = 7
    8282      Width = 80
     
    9494    object DateEditTo: TDateEdit
    9595      Left = 238
    96       Height = 27
     96      Height = 21
    9797      Top = 7
    9898      Width = 80
     
    110110    object Label1: TLabel
    111111      Left = 6
    112       Height = 17
    113       Top = 12
    114       Width = 36
     112      Height = 13
     113      Top = 12
     114      Width = 28
    115115      Caption = 'From:'
    116116      ParentColor = False
     
    118118    object Label4: TLabel
    119119      Left = 174
    120       Height = 17
    121       Top = 12
    122       Width = 18
     120      Height = 13
     121      Top = 12
     122      Width = 16
    123123      Caption = 'To:'
    124124      ParentColor = False
     
    132132    Anchors = [akLeft, akRight, akBottom]
    133133    Caption = 'Selected mothly report'
    134     ClientHeight = 46
     134    ClientHeight = 47
    135135    ClientWidth = 578
    136136    TabOrder = 3
     
    146146    object SpinEditYear: TSpinEdit
    147147      Left = 54
    148       Height = 27
     148      Height = 21
    149149      Top = 7
    150150      Width = 96
     
    156156    object SpinEditId: TSpinEdit
    157157      Left = 238
    158       Height = 27
     158      Height = 21
    159159      Top = 7
    160160      Width = 96
     
    166166    object Label2: TLabel
    167167      Left = 6
    168       Height = 17
    169       Top = 12
    170       Width = 31
     168      Height = 13
     169      Top = 12
     170      Width = 26
    171171      Caption = 'Year:'
    172172      ParentColor = False
     
    174174    object Label3: TLabel
    175175      Left = 174
    176       Height = 17
    177       Top = 12
    178       Width = 56
     176      Height = 13
     177      Top = 12
     178      Width = 41
    179179      Caption = 'Number:'
    180180      ParentColor = False
     
    201201  object Label5: TLabel
    202202    Left = 16
    203     Height = 17
     203    Height = 13
    204204    Top = 12
    205     Width = 56
     205    Width = 43
    206206    Caption = 'Account:'
    207207    ParentColor = False
     
    209209  object ComboBoxAccounts: TComboBox
    210210    Left = 96
    211     Height = 29
     211    Height = 21
    212212    Top = 8
    213213    Width = 395
    214214    Anchors = [akTop, akLeft, akRight]
    215     ItemHeight = 0
     215    ItemHeight = 13
    216216    OnChange = ComboBoxAccountsChange
    217217    Style = csDropDownList
     
    235235    Anchors = [akTop, akLeft, akRight, akBottom]
    236236    Caption = 'Account state'
    237     ClientHeight = 178
     237    ClientHeight = 179
    238238    ClientWidth = 577
    239239    TabOrder = 8
    240240    object Label6: TLabel
    241241      Left = 14
    242       Height = 17
    243       Top = 7
    244       Width = 56
     242      Height = 13
     243      Top = 7
     244      Width = 41
    245245      Caption = 'Balance:'
    246246      ParentColor = False
     
    248248    object LabelBalance: TLabel
    249249      Left = 110
    250       Height = 17
    251       Top = 7
    252       Width = 12
     250      Height = 13
     251      Top = 7
     252      Width = 9
    253253      Caption = '   '
    254254      ParentColor = False
     
    263263      TabOrder = 0
    264264    end
    265     object ListView1: TListView
     265    object ListViewOperation: TListView
    266266      Left = 6
    267       Height = 144
    268       Top = 31
     267      Height = 145
     268      Top = 32
    269269      Width = 561
    270270      Anchors = [akTop, akLeft, akRight, akBottom]
     
    296296          Width = 134
    297297        end>
     298      OwnerData = True
     299      ReadOnly = True
     300      RowSelect = True
    298301      TabOrder = 1
    299302      ViewStyle = vsReport
     303      OnData = ListViewOperationData
    300304    end
    301305  end
  • trunk/Forms/UFormMain.lrt

    r20 r22  
    2121TFORMMAIN.LABELBALANCE.CAPTION=   
    2222TFORMMAIN.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.
     23TFORMMAIN.LISTVIEWOPERATION.COLUMNS[0].CAPTION=Id
     24TFORMMAIN.LISTVIEWOPERATION.COLUMNS[1].CAPTION=Date
     25TFORMMAIN.LISTVIEWOPERATION.COLUMNS[2].CAPTION=Account
     26TFORMMAIN.LISTVIEWOPERATION.COLUMNS[3].CAPTION=Value
     27TFORMMAIN.LISTVIEWOPERATION.COLUMNS[4].CAPTION=Var. sym.
     28TFORMMAIN.LISTVIEWOPERATION.COLUMNS[5].CAPTION=Spec. sym.
     29TFORMMAIN.LISTVIEWOPERATION.COLUMNS[6].CAPTION=Const. sym.
  • trunk/Forms/UFormMain.pas

    r20 r22  
    3838    Label7: TLabel;
    3939    LabelBalance: TLabel;
    40     ListView1: TListView;
     40    ListViewOperation: TListView;
    4141    SpinEditYear: TSpinEdit;
    4242    SpinEditId: TSpinEdit;
     
    5555    procedure FormCreate(Sender: TObject);
    5656    procedure FormShow(Sender: TObject);
     57    procedure ListViewOperationData(Sender: TObject; Item: TListItem);
    5758  private
    5859    { private declarations }
    5960  public
     61    procedure ReloadList;
    6062    procedure LoadInterface;
    6163    procedure SaveInterface;
     
    114116    Core.LoadAccount(Core.CurrentAccount);
    115117    LoadInterface;
     118    ReloadList;
    116119  end;
    117120end;
     
    137140  LoadInterface;
    138141  Core.CoolTranslator1.Translate;
     142end;
     143
     144procedure TFormMain.ListViewOperationData(Sender: TObject; Item: TListItem);
     145begin
     146  if Assigned(Core.CurrentAccount) then
     147  with Core.CurrentAccount do begin
     148  if (Item.Index >= 0) and (Item.Index < Operations.Count) then
     149  with TAccountOperation(Operations[Item.Index]) do begin
     150    Item.Caption := IntToStr(Item.Index + 1);
     151    Item.Data := Operations[Item.Index];
     152    Item.SubItems.Add(DateToStr(Time));
     153    Item.SubItems.Add(Account);
     154    Item.SubItems.Add(FloatToStr(Value));
     155    Item.SubItems.Add(VarSym);
     156    Item.SubItems.Add(SpecSym);
     157    Item.SubItems.Add(ConstSym);
     158  end;
     159  end;
     160end;
     161
     162procedure TFormMain.ReloadList;
     163begin
     164  if Assigned(Core.CurrentAccount) then
     165    ListViewOperation.Items.Count := Core.CurrentAccount.Operations.Count
     166    else ListViewOperation.Items.Count;
     167  ListViewOperation.Refresh;
    139168end;
    140169
  • trunk/Languages/FioInfo.cs.po

    r20 r22  
    99"MIME-Version: 1.0\n"
    1010"Content-Transfer-Encoding: 8bit\n"
     11"X-Generator: Poedit 1.5.5\n"
    1112
    1213#: tcore.aabout.caption
     
    9798
    9899#: tformaccounts.listview1.columns[0].caption
     100#| msgid "Name"
    99101msgctxt "tformaccounts.listview1.columns[0].caption"
     102msgid "Seq."
     103msgstr "Poř."
     104
     105#: tformaccounts.listview1.columns[1].caption
     106#| msgid "Number"
     107msgctxt "tformaccounts.listview1.columns[1].caption"
    100108msgid "Name"
    101109msgstr "Jméno"
    102110
    103 #: tformaccounts.listview1.columns[1].caption
     111#: tformaccounts.listview1.columns[2].caption
     112#| msgid "Bank code"
    104113msgid "Number"
    105114msgstr "Číslo"
    106115
    107 #: tformaccounts.listview1.columns[2].caption
     116#: tformaccounts.listview1.columns[3].caption
    108117#| msgid "Balance"
     118msgctxt "tformaccounts.listview1.columns[3].caption"
    109119msgid "Bank code"
    110120msgstr "Kód banky"
    111121
    112 #: tformaccounts.listview1.columns[3].caption
     122#: tformaccounts.listview1.columns[4].caption
    113123#| msgid "Date"
    114 msgctxt "tformaccounts.listview1.columns[3].caption"
     124msgctxt "tformaccounts.listview1.columns[4].caption"
    115125msgid "Balance"
    116126msgstr "Zůstatek"
    117127
    118 #: tformaccounts.listview1.columns[4].caption
     128#: tformaccounts.listview1.columns[5].caption
    119129#| msgid "Token"
    120 msgctxt "tformaccounts.listview1.columns[4].caption"
     130msgctxt "tformaccounts.listview1.columns[5].caption"
    121131msgid "Date"
    122132msgstr "Datum"
    123133
    124 #: tformaccounts.listview1.columns[5].caption
    125 msgctxt "tformaccounts.listview1.columns[5].caption"
     134#: tformaccounts.listview1.columns[6].caption
     135#| msgid "Token"
     136msgctxt "tformaccounts.listview1.columns[6].caption"
    126137msgid "Token"
    127138msgstr "Token"
     
    225236msgstr "   "
    226237
    227 #: tformmain.listview1.columns[0].caption
     238#: tformmain.listviewoperation.columns[0].caption
     239msgctxt "tformmain.listviewoperation.columns[0].caption"
    228240msgid "Id"
    229241msgstr "Id"
    230242
    231 #: tformmain.listview1.columns[1].caption
    232 msgctxt "tformmain.listview1.columns[1].caption"
     243#: tformmain.listviewoperation.columns[1].caption
     244msgctxt "tformmain.listviewoperation.columns[1].caption"
    233245msgid "Date"
    234246msgstr "Datum"
    235247
    236 #: tformmain.listview1.columns[2].caption
     248#: tformmain.listviewoperation.columns[2].caption
     249msgctxt "tformmain.listviewoperation.columns[2].caption"
    237250msgid "Account"
    238251msgstr "Účet"
    239252
    240 #: tformmain.listview1.columns[3].caption
     253#: tformmain.listviewoperation.columns[3].caption
     254msgctxt "tformmain.listviewoperation.columns[3].caption"
    241255msgid "Value"
    242256msgstr "Hodnota"
    243257
    244 #: tformmain.listview1.columns[4].caption
     258#: tformmain.listviewoperation.columns[4].caption
     259msgctxt "tformmain.listviewoperation.columns[4].caption"
    245260msgid "Var. sym."
    246261msgstr "Var. sym."
    247262
    248 #: tformmain.listview1.columns[5].caption
     263#: tformmain.listviewoperation.columns[5].caption
     264msgctxt "tformmain.listviewoperation.columns[5].caption"
    249265msgid "Spec. sym."
    250266msgstr "Spec. sym."
    251267
    252 #: tformmain.listview1.columns[6].caption
     268#: tformmain.listviewoperation.columns[6].caption
     269msgctxt "tformmain.listviewoperation.columns[6].caption"
    253270msgid "Const. sym."
    254271msgstr "Konst. sym."
     
    278295
    279296#: tformsettings.label2.caption
    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"
     297#| msgid ""
     298#| "%f - data format, %d - date, %t - time, %a - account number, %n - account "
     299#| "name, %% - percent symbol"
     300msgid ""
     301"%f - data format, %d - date, %t - time, %a - account number, %n - account "
     302"name, %b - bank code, %% - percent symbol"
     303msgstr ""
     304"%f - formát dat, %d - datum, %t - čas, %a - číslo účtu, %n - jméno účtu, %b "
     305"- kód banky, %% - znak procent"
    283306
    284307#: tformsettings.label3.caption
     
    347370msgid "Select destination folder"
    348371msgstr "Vyberte cílovou sloşku"
    349 
  • trunk/Languages/FioInfo.po

    r20 r22  
    9090#: tformaccounts.listview1.columns[0].caption
    9191msgctxt "tformaccounts.listview1.columns[0].caption"
     92msgid "Seq."
     93msgstr ""
     94
     95#: tformaccounts.listview1.columns[1].caption
     96msgctxt "tformaccounts.listview1.columns[1].caption"
    9297msgid "Name"
    9398msgstr ""
    9499
    95 #: tformaccounts.listview1.columns[1].caption
     100#: tformaccounts.listview1.columns[2].caption
    96101msgid "Number"
    97 msgstr ""
    98 
    99 #: tformaccounts.listview1.columns[2].caption
    100 msgid "Bank code"
    101102msgstr ""
    102103
    103104#: tformaccounts.listview1.columns[3].caption
    104105msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[3].CAPTION"
    105 msgid "Balance"
     106msgid "Bank code"
    106107msgstr ""
    107108
    108109#: tformaccounts.listview1.columns[4].caption
    109110msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[4].CAPTION"
    110 msgid "Date"
     111msgid "Balance"
    111112msgstr ""
    112113
    113114#: tformaccounts.listview1.columns[5].caption
    114115msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[5].CAPTION"
     116msgid "Date"
     117msgstr ""
     118
     119#: tformaccounts.listview1.columns[6].caption
     120msgctxt "TFORMACCOUNTS.LISTVIEW1.COLUMNS[6].CAPTION"
    115121msgid "Token"
    116122msgstr ""
     
    213219msgstr ""
    214220
    215 #: tformmain.listview1.columns[0].caption
     221#: tformmain.listviewoperation.columns[0].caption
     222msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[0].CAPTION"
    216223msgid "Id"
    217224msgstr ""
    218225
    219 #: tformmain.listview1.columns[1].caption
    220 msgctxt "TFORMMAIN.LISTVIEW1.COLUMNS[1].CAPTION"
     226#: tformmain.listviewoperation.columns[1].caption
     227msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[1].CAPTION"
    221228msgid "Date"
    222229msgstr ""
    223230
    224 #: tformmain.listview1.columns[2].caption
     231#: tformmain.listviewoperation.columns[2].caption
     232msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[2].CAPTION"
    225233msgid "Account"
    226234msgstr ""
    227235
    228 #: tformmain.listview1.columns[3].caption
     236#: tformmain.listviewoperation.columns[3].caption
     237msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[3].CAPTION"
    229238msgid "Value"
    230239msgstr ""
    231240
    232 #: tformmain.listview1.columns[4].caption
     241#: tformmain.listviewoperation.columns[4].caption
     242msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[4].CAPTION"
    233243msgid "Var. sym."
    234244msgstr ""
    235245
    236 #: tformmain.listview1.columns[5].caption
     246#: tformmain.listviewoperation.columns[5].caption
     247msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[5].CAPTION"
    237248msgid "Spec. sym."
    238249msgstr ""
    239250
    240 #: tformmain.listview1.columns[6].caption
     251#: tformmain.listviewoperation.columns[6].caption
     252msgctxt "TFORMMAIN.LISTVIEWOPERATION.COLUMNS[6].CAPTION"
    241253msgid "Const. sym."
    242254msgstr ""
  • trunk/UCore.lfm

    r21 r22  
    647647    object MenuItem7: TMenuItem
    648648      Action = ASettings
     649      Bitmap.Data = {
     650        36040000424D3604000000000000360000002800000010000000100000000100
     651        2000000000000004000064000000640000000000000000000000000000000000
     652        0000000000000000000000000000000000003F3428FF3F3428FF3F3428FF3F34
     653        28FF000000000000000000000000000000000000000000000000000000000000
     654        0000000000003F3428FF3F3428FF00000000776D66FFE5DBD2FFE5DBD2FF776D
     655        66FF000000003F3428FF3F3428FF000000000000000000000000000000000000
     656        00003F3428FF877D73FFE1D9D1FF574D42FF766C63FFEDE5DDFFEDE5DDFF766C
     657        63FF574D42FFE1D9D1FF877D73FF3F3428FF0000000000000000000000003F34
     658        28FFB6B0A9FFE1D9D1FFC8BEB4FFE1D9D1FFC8BEB4FFEDE5DDFFEDE5DDFFC8BE
     659        B4FFE1D9D1FFC8BEB4FFE1D9D1FFB6B0A9FF3F3428FF00000000000000003F34
     660        28FFE1D9D1FFEBE7E2FFE1D9D1FFAEA7A0FFE2DDDAFFB7B1ABFFB7B1ABFFE2DD
     661        DAFFAEA7A0FFE1D9D1FFEBE7E2FFE1D9D1FF3F3428FF00000000000000000000
     662        000061564CFFE1D9D1FFACA39BFFE4E1DCFFAFA8A4FF695E53FF695E53FFAFA8
     663        A4FFE4E1DCFFACA39BFFE1D9D1FF61564CFF0000000000000000463B2FFF3E33
     664        28FF61564CFFAFA8A4FFC1BCB6FFAFA8A4FF695E53FFFFFFFFFFFFFFFFFF695E
     665        53FFAFA8A4FFC1BCB6FFAFA8A4FF61564CFF3E3328FF463B2FFF897E74FFE8E0
     666        D7FFE8E0D7FFB0ACA8FFE8E3DDFF695E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     667        FFFF695E53FFE8E3DDFFB0ACA8FFE8E0D7FFE8E0D7FF897E74FF877B70FFFFFF
     668        FFFFFFFFFFFFBFBCB8FFD6CDC5FF695E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     669        FFFF695E53FFD6CDC5FFBFBCB8FFFFFFFFFFFFFFFFFF877B70FF8E8378FF897D
     670        72FF84796CFFD8D5D3FFC9C2B9FFA99C90FF594F45FFFFFFFFFFFFFFFFFF6056
     671        4DFFA99C90FFC9C2B9FFD8D5D3FF84796CFF897D72FF8E8378FF000000000000
     672        0000696053FFDFDFDEFFDFDFDEFFD1C4BAFF8E8377FF44392EFF44392EFF8E83
     673        77FFD1C4BAFFDFDFDEFFDFDFDEFF696053FF0000000000000000000000006960
     674        53FFF6F1EEFFBBAC9DFFDFD8D3FFEEEFEFFFEBE7E2FFE3D9D1FFE3D9D1FFEBE7
     675        E2FFEEEFEFFFDFD8D3FFBBAC9DFFF6F1EEFF696053FF0000000000000000675D
     676        50FFCDC6BFFFF6F1EEFFF8F7F4FFF8F7F4FFFFFFFFFFFCFDFDFFFCFDFDFFFFFF
     677        FFFFF8F7F4FFF8F7F4FFF6F1EEFFCDC6BFFF696053FF00000000000000000000
     678        0000998F83FFCCC5BEFFF6F1EEFF908377FF908377FFEDE7E0FFEDE7E0FF9083
     679        77FF908377FFF6F1EEFFCCC5BEFFA9A096FF0000000000000000000000000000
     680        0000000000009C9083FF9C9083FF00000000998D80FFFFFFFFFFFFFFFFFF998D
     681        80FF000000009C9083FF9C9083FF000000000000000000000000000000000000
     682        000000000000000000000000000000000000A19588FF9C9083FF9C9083FFA195
     683        88FF000000000000000000000000000000000000000000000000
     684      }
    649685    end
    650686    object MenuItem8: TMenuItem
    651687      Action = AAbout
     688      Bitmap.Data = {
     689        36040000424D3604000000000000360000002800000010000000100000000100
     690        2000000000000004000064000000640000000000000000000000000000000000
     691        0000000000000000000000000000000000000000000000000000000000000000
     692        0000000000000000000000000000000000000000000000000000000000000000
     693        00000000000000000000916429FF855A24FF885015FF824A1DFF7E4719FF7944
     694        17FF583C0EFF49340DFF00000000000000000000000000000000000000000000
     695        000000000000A1692CFFC08858FFE0C9B4FFF7F1ECFFFEFDFCFFFEFDFCFFF5F0
     696        ECFFDCC9B8FF9E7857FF473108FF000000000000000000000000000000000000
     697        0000B2702BFFDBAB80FFF8EFE7FFE2BBA6FFCC7E56FFC15823FFC05722FFC97F
     698        56FFDEBAA7FFF2EBE7FFB39376FF483108FF000000000000000000000000B677
     699        34FFD6996BFFF9F0E7FFDDA488FFC75013FFC04E11FFDCA688FFFFFEFEFFB549
     700        11FFB64A10FFD59E82FFF3ECE7FF9A7352FF49340DFF0000000000000000B479
     701        3AFFEFD6C1FFEDC5B2FFDD5A1AFFD55617FFD25313FFD87D4DFFE3A686FFBB4C
     702        11FFB34A12FFB64A10FFDEB9A6FFDCC9B8FF563C0DFF0000000000000000CD7F
     703        45FFFCF4EDFFEC9772FFE86021FFE05A1DFFDB5819FFEDAA89FFFFFEFEFFC84E
     704        12FFB94C11FFB34C13FFC77B53FFF6F0ECFF7A4319FF0000000000000000CD81
     705        47FFFFFEFEFFF87A46FFF96829FFF66525FFF16020FFF18653FFFFFEFEFFF0BF
     706        A8FFC55A24FFB64C15FFB75724FFFEFEFDFF7F481AFF0000000000000000CD84
     707        4EFFFFFEFEFFFC814CFFFF7031FFFF6B2CFFFD6928FFF86523FFF49265FFFDF5
     708        F1FFF4D4C5FFC65018FFBA5927FFFEFEFDFF834A1CFF0000000000000000D183
     709        4CFFFCF7F1FFFAA582FFFF733AFFFF844EFFFFAE8AFFFE6C2DFFF76727FFF192
     710        68FFFFFEFEFFE98354FFD78560FFF8F1ECFF81551FFF0000000000000000C483
     711        41FFF0DAC3FFFAD1C0FFFF7940FFFF986EFFFFFEFEFFFFC9B2FFFD9164FFFAC6
     712        AFFFFEF5F1FFF5773DFFEDC5B2FFE4CBB3FF905D21FF0000000000000000C484
     713        45FFDCA277FFFCF4EDFFFABFA6FFFF7A43FFFFBB9EFFFFF6F3FFFFFEFEFFFEED
     714        E5FFFA9970FFF3B69CFFF8F0E6FFBB8B56FF986426FF00000000000000000000
     715        0000C48443FFE5B999FFFCF4EDFFFBD2C1FFFAA887FFFD8757FFFD8454FFF8A5
     716        82FFF7CEBDFFFAF1E7FFD2A77AFFA36A2AFF0000000000000000000000000000
     717        000000000000C58442FFDCA277FFF3DAC7FFFCF7F1FFFFFEFEFFFFFEFEFFFCF4
     718        EDFFF1D6C0FFC7935DFFA66F33FF000000000000000000000000000000000000
     719        00000000000000000000C58444FFC28342FFD89C6DFFD69668FFD49463FFD696
     720        68FFB2793CFFB1783BFF00000000000000000000000000000000000000000000
     721        0000000000000000000000000000000000000000000000000000000000000000
     722        0000000000000000000000000000000000000000000000000000
     723      }
    652724    end
    653725    object MenuItem2: TMenuItem
    654726      Action = AExit
     727      Bitmap.Data = {
     728        36040000424D3604000000000000360000002800000010000000100000000100
     729        2000000000000004000064000000640000000000000000000000000000000000
     730        0000000000000000000000000000000000FF0000000000000000000000000000
     731        0000000000000000000000000000000000000000000000000000000000000000
     732        00000000000000000000000000FF000000FF0000000000000000000000000000
     733        0000000000000000000000000000000000000000000000000000000000000000
     734        000000000000000000FF008484FF000000FF0000000000000000000000000000
     735        0000000000000000000000000000000000000000000000000000000000000000
     736        0000000000FF008484FF008484FF000000FF0000000000000000000000000000
     737        0000000000000000000000000000000000000000000000000000000000FF0000
     738        00FF008484FF008484FF008484FF000000FF000000FF000000FF000000FF0000
     739        00FF000000FF000000FF000000FF000000000000000000000000000000000000
     740        00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     741        0000000000000000000000000000000000000000000000000000000000000000
     742        00FF008484FF008484FF000000FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     743        0000000000000000000000000000840000FF0000000000000000000000000000
     744        00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     745        00000000000000000000840000FF840000FF0000000000000000000000000000
     746        00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     747        000000000000840000FF840000FF840000FF840000FF840000FF000000000000
     748        00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     749        0000840000FF840000FF840000FF840000FF840000FF840000FF000000000000
     750        00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000
     751        000000000000840000FF840000FF840000FF840000FF840000FF000000000000
     752        00FF008484FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000
     753        00000000000000000000840000FF840000FF0000000000000000000000000000
     754        00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000
     755        0000000000000000000000000000840000FF0000000000000000000000000000
     756        00FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000
     757        0000000000000000000000000000000000000000000000000000000000000000
     758        00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     759        0000000000000000000000000000000000000000000000000000000000000000
     760        0000000000000000000000000000000000000000000000000000000000000000
     761        0000000000000000000000000000000000000000000000000000
     762      }
    655763    end
    656764  end
  • trunk/UCore.pas

    r20 r22  
    1111
    1212type
     13
     14  { TAccountOperation }
     15
    1316  TAccountOperation = class
    1417    Id: string;
    1518    Time: TDateTime;
    1619    Value: Double;
     20    Account: string;
    1721    VarSym: string;
    1822    SpecSym: string;
    1923    ConstSym: string;
     24    procedure LoadFromRegistry(Context: TRegistryContext);
     25    procedure SaveToRegistry(Context: TRegistryContext);
    2026  end;
    2127
     
    118124  SDumpFormat = 'Dump %d %t.%f';
    119125
     126{ TAccountOperation }
     127
     128procedure TAccountOperation.LoadFromRegistry(Context: TRegistryContext);
     129begin
     130  with TRegistryEx.Create do
     131  try
     132    RootKey := Context.RootKey;
     133    OpenKey(Context.Key, True);
     134    Id := UTF8Encode(ReadStringWithDefault('Id', UTF8Decode('')));
     135    Time := ReadDateTimeWithDefault('Time', 0);
     136    Value := ReadFloatWithDefault('Value', 0);
     137    Account := UTF8Encode(ReadStringWithDefault('Account', UTF8Decode('')));
     138    VarSym := UTF8Encode(ReadStringWithDefault('VarSym', UTF8Decode('')));
     139    SpecSym := UTF8Encode(ReadStringWithDefault('SpecSym', UTF8Decode('')));
     140    ConstSym := UTF8Encode(ReadStringWithDefault('ConstSym', UTF8Decode('')));
     141  finally
     142    Free;
     143  end;
     144end;
     145
     146procedure TAccountOperation.SaveToRegistry(Context: TRegistryContext);
     147begin
     148  with TRegistryEx.Create do
     149  try
     150    RootKey := Context.RootKey;
     151    OpenKey(Context.Key, True);
     152    WriteString('Id', UTF8Decode(Id));
     153    WriteString('Account', UTF8Decode(Account));
     154    WriteDateTime('Time', Time);
     155    WriteFloat('Value', Value);
     156    WriteString('VarSym', UTF8Decode(VarSym));
     157    WriteString('SpecSym', UTF8Decode(SpecSym));
     158    WriteString('ConstSym', UTF8Decode(ConstSym));
     159  finally
     160    Free;
     161  end;
     162end;
     163
    120164{ TAccount }
    121165
     
    127171  Time := Source.Time;
    128172  Number := Source.Number;
     173  BankCode := Source.BankCode;
     174  //Operations.Assign(Source.Operations);
    129175end;
    130176
    131177procedure TAccount.LoadFromRegistry(Context: TRegistryContext);
     178var
     179  I: Integer;
    132180begin
    133181  with TRegistryEx.Create do
     
    144192    Free;
    145193  end;
     194  with Operations do
     195  for I := 0 to Count - 1 do begin
     196    if not Assigned(Items[I]) then Items[I] := TAccountOperation.Create;
     197    TAccountOperation(Items[I]).LoadFromRegistry(RegContext(Context.RootKey, Context.Key + '\' + IntToStr(I)));
     198  end;
    146199end;
    147200
    148201procedure TAccount.SaveToRegistry(Context: TRegistryContext);
     202var
     203  I: Integer;
    149204begin
    150205  with TRegistryEx.Create do
     
    161216    Free;
    162217  end;
     218  with Operations do
     219  for I := 0 to Count - 1 do
     220    TAccountOperation(Items[I]).SaveToRegistry(RegContext(Context.RootKey, Context.Key + '\' + IntToStr(I)));
    163221end;
    164222
     
    219277    Strings.Delete(Strings.Count - 1);
    220278  for I := 0 to Count - 1 do begin
    221     Strings.Strings[I] := IntToStr(I) + ': ' + TAccount(Items[I]).Name + ' (' +
     279    Strings.Strings[I] := IntToStr(I + 1) + ': ' + TAccount(Items[I]).Name + ' (' +
    222280      TAccount(Items[I]).Number + '/' + TAccount(Items[I]).BankCode + ')';
    223281    Strings.Objects[I] := Items[I];
  • trunk/UFioAPI.pas

    r10 r22  
    66
    77uses
    8   Classes, SysUtils, httpsend, ssl_openssl;
     8  Classes, SysUtils, httpsend, ssl_openssl, dateutils;
    99
    1010type
     
    2323    function DownloadMonthly(Year, Id: Integer; Data: TStrings): Boolean;
    2424    function DownloadLast(Data: TStrings): Boolean;
     25    function SetLastId(Id: Integer): Boolean;
     26    function SetLastDate(Date: TDate): Boolean;
    2527  end;
    2628
     
    4648        100..299:
    4749          begin
    48             Data.LoadFromStream(HTTPSender.Document);
     50            if Assigned(Data) then
     51              Data.LoadFromStream(HTTPSender.Document);
    4952            Result := True;
    5053          end; //informational, success
     
    8588end;
    8689
     90function TFioAPI.SetLastId(Id: Integer): Boolean;
     91begin
     92  Result := Download('https://www.fio.cz/ib_api/rest/set-last-id/' + Token +
     93    '/' + IntToStr(Id), nil);
     94end;
     95
     96function TFioAPI.SetLastDate(Date: TDate): Boolean;
     97begin
     98  Result := Download('https://www.fio.cz/ib_api/rest/set-last-date/' + Token +
     99    '/' + IntToStr(YearOf(Date)) + '/' + IntToStr(MonthOf(Date)) + '/' +
     100    IntToStr(DayOf(Date)), nil);
     101end;
     102
    87103end.
    88104
Note: See TracChangeset for help on using the changeset viewer.