Changeset 22 for trunk/Forms/UFormMain.pas
- Timestamp:
- Mar 25, 2013, 11:47:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r20 r22 38 38 Label7: TLabel; 39 39 LabelBalance: TLabel; 40 ListView 1: TListView;40 ListViewOperation: TListView; 41 41 SpinEditYear: TSpinEdit; 42 42 SpinEditId: TSpinEdit; … … 55 55 procedure FormCreate(Sender: TObject); 56 56 procedure FormShow(Sender: TObject); 57 procedure ListViewOperationData(Sender: TObject; Item: TListItem); 57 58 private 58 59 { private declarations } 59 60 public 61 procedure ReloadList; 60 62 procedure LoadInterface; 61 63 procedure SaveInterface; … … 114 116 Core.LoadAccount(Core.CurrentAccount); 115 117 LoadInterface; 118 ReloadList; 116 119 end; 117 120 end; … … 137 140 LoadInterface; 138 141 Core.CoolTranslator1.Translate; 142 end; 143 144 procedure TFormMain.ListViewOperationData(Sender: TObject; Item: TListItem); 145 begin 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; 160 end; 161 162 procedure TFormMain.ReloadList; 163 begin 164 if Assigned(Core.CurrentAccount) then 165 ListViewOperation.Items.Count := Core.CurrentAccount.Operations.Count 166 else ListViewOperation.Items.Count; 167 ListViewOperation.Refresh; 139 168 end; 140 169
Note:
See TracChangeset
for help on using the changeset viewer.