Changeset 22 for trunk/Forms


Ignore:
Timestamp:
Mar 25, 2013, 11:47:38 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Příprava pro zobrazování seznamu operací.
Location:
trunk/Forms
Files:
6 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
Note: See TracChangeset for help on using the changeset viewer.