Changeset 16 for trunk


Ignore:
Timestamp:
Mar 19, 2013, 9:43:12 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Načítání stavu účtu na českých Windows s desetinnou čárkou.
  • Opraveno: Automatický výběr aktivního účtu.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/FioInfo.lpi

    r12 r16  
    4949          <Linking>
    5050            <Debugging>
    51               <UseHeaptrc Value="True"/>
    5251              <UseExternalDbgSyms Value="True"/>
    5352            </Debugging>
  • trunk/Forms/UFormMain.pas

    r15 r16  
    8585begin
    8686  Core.SelectedAccountIndex := ComboBoxAccounts.ItemIndex;
    87   if ComboBoxAccounts.ItemIndex <> -1 then
    88     Core.CurrentAccount := TAccount(Core.Accounts[ComboBoxAccounts.ItemIndex])
    89     else Core.CurrentAccount := nil;
    9087  LoadInterface;
    9188end;
     
    143140  Core.Accounts.LoadToStrings(ComboBoxAccounts.Items);
    144141  if (Core.SelectedAccountIndex >= 0) and
    145     (Core.SelectedAccountIndex < ComboBoxAccounts.Items.Count) then
     142    (Core.SelectedAccountIndex < ComboBoxAccounts.Items.Count) then begin
    146143    ComboBoxAccounts.ItemIndex := Core.SelectedAccountIndex;
     144  end;
     145  if (ComboBoxAccounts.Items.Count > 0) and (ComboBoxAccounts.ItemIndex = -1) then
     146    ComboBoxAccounts.ItemIndex := 0;
     147  if ComboBoxAccounts.ItemIndex <> -1 then
     148    Core.CurrentAccount := TAccount(Core.Accounts[ComboBoxAccounts.ItemIndex])
     149    else Core.CurrentAccount := nil;
    147150  DateEditStart.Date := Core.ReportTimeFrom;
    148151  DateEditTo.Date := Core.ReportTimeTo;
     
    153156  ButtonMonthly.Enabled := Assigned(Core.CurrentAccount);
    154157  ButtonNew.Enabled := Assigned(Core.CurrentAccount);
     158  ButtonGetState.Enabled := Assigned(Core.CurrentAccount);
    155159  Core.ADownloadInterval.Enabled := Assigned(Core.CurrentAccount);
    156160  Core.ADownloadMonthly.Enabled := Assigned(Core.CurrentAccount);
  • trunk/Packages/TemplateGenerics/Generic/GenericListObject.inc

    r6 r16  
    6767procedure TGListObject.Put(Index: TGListIndex; const AValue: TGListItem);
    6868begin
    69   if OwnsObjects and (FItems[Index] <> AValue) then FItems[Index].Free;
     69  if OwnsObjects and (FItems[Index] <> AValue) and Assigned(FItems[Index]) then FItems[Index].Free;
    7070  inherited Put(Index, AValue);
    7171end;
  • trunk/UCore.pas

    r15 r16  
    259259  Mem := TMemoryStream.Create;
    260260  try
    261     FioAPI.Format := DataFormat;
     261    FioAPI.Format := dfXML;
    262262    FioAPI.Token := Account.Token;
    263263    Account.Time := Now;
     
    276276      Node2 := Node.FindNode('closingBalance');
    277277      if Assigned(Node2) then
    278         Account.Balance := StrToFloat(Node2.TextContent);
     278        Account.Balance := StrToFloat(StringReplace(Node2.TextContent, '.',
     279          DefaultFormatSettings.DecimalSeparator, [rfReplaceAll]));
    279280    end else begin
    280281      Account.Number := '';
Note: See TracChangeset for help on using the changeset viewer.