Changeset 10


Ignore:
Timestamp:
Mar 14, 2013, 11:35:29 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: České znaky v názvu ukládaných výpisů.
  • Opraveno: Název exportu CVS na CSV.
Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r9 r10  
    111111    Height = 65
    112112    Top = 168
    113     Width = 489
     113    Width = 499
     114    Anchors = [akTop, akLeft, akRight]
    114115    Caption = 'Selected mothly report'
    115116    ClientHeight = 46
    116     ClientWidth = 485
     117    ClientWidth = 495
    117118    TabOrder = 3
    118119    object ButtonMonthly: TButton
  • trunk/Forms/UFormSettings.pas

    r9 r10  
    6868begin
    6969  LabeledEditToken.Text := Core.Token;
    70   ComboBox1.ItemIndex := Integer(Core.Format);
     70  ComboBox1.ItemIndex := Integer(Core.DataFormat);
    7171  LabeledEditFolder.Text := Core.TargetDirectory;
    7272end;
     
    7575begin
    7676  Core.Token := LabeledEditToken.Text;
    77   Core.Format := TFioDataFormat(ComboBox1.ItemIndex);
     77  Core.DataFormat := TFioDataFormat(ComboBox1.ItemIndex);
    7878  Core.TargetDirectory := LabeledEditFolder.Text;
    7979end;
  • trunk/Languages/FioInfo.cs.po

    r9 r10  
    4444#: tcore.menuitem3.caption
    4545msgid "-"
    46 msgstr ""
     46msgstr "-"
    4747
    4848#: tformabout.buttonok.caption
     
    158158msgstr "Staşení selhalo"
    159159
     160#: ucore.sreport
     161msgid "Dump %s"
     162msgstr "VÃœpis %s"
     163
     164#: ucore.ssavedtofile
     165#| msgid "Dump saved to file to %s"
     166msgid "Dump saved to file %s"
     167msgstr "VÃœpis uloÅŸen do souboru %s"
     168
    160169#: uformabout.sapplicationname
    161170msgid "Application name"
  • trunk/Languages/FioInfo.po

    r9 r10  
    150150msgstr ""
    151151
     152#: ucore.sreport
     153msgid "Dump %s"
     154msgstr ""
     155
     156#: ucore.ssavedtofile
     157msgid "Dump saved to file %s"
     158msgstr ""
     159
    152160#: uformabout.sapplicationname
    153161msgid "Application name"
  • trunk/Packages/CoolTranslator/Demo/Languages

    • Property svn:ignore set to
      *.mo
  • trunk/UCore.lfm

    r9 r10  
    391391    VersionMinor = 0
    392392    VersionBugFix = 0
     393    VersionSuffix = 'alfa'
    393394    CompanyName = 'Jiří Hajda'
    394395    CompanyHomePage = 'http://svn.zdechov.net/trac/fioinfo'
  • trunk/UCore.pas

    r9 r10  
    5050    RegistryContext: TRegistryContext;
    5151    Token: string;
    52     Format: TFioDataFormat;
     52    DataFormat: TFioDataFormat;
    5353    TargetDirectory: string;
    5454    ReportYear: Integer;
     
    7272resourcestring
    7373  SDownloadNotSuccess = 'Download failed';
     74  SReport = 'Dump %s';
     75  SSavedToFile = 'Dump saved to file %s';
    7476
    7577{ TCore }
     
    105107    OpenKey(Context.Key, True);
    106108    WriteString('TargetDir', TargetDirectory);
    107     WriteInteger('DataFormat', Integer(Format));
     109    WriteInteger('DataFormat', Integer(DataFormat));
    108110    WriteString('Token', Token);
    109111    WriteDate('ReportTimeFrom', ReportTimeFrom);
     
    124126    OpenKey(Context.Key, True);
    125127    TargetDirectory := ReadStringWithDefault('TargetDir', ExtractFileDir(Application.ExeName));
    126     Format := TFioDataFormat(ReadIntegerWithDefault('DataFormat', Integer(dfXML)));
     128    DataFormat := TFioDataFormat(ReadIntegerWithDefault('DataFormat', Integer(dfXML)));
    127129    Token := ReadStringWithDefault('Token', '');
    128130    ReportTimeFrom := ReadDateTimeWithDefault('ReportTimeFrom', Now);
     
    154156  FioAPI: TFioAPI;
    155157  List: TStringList;
     158  FileName: string;
    156159begin
    157160  FioAPI := TFioAPI.Create;
    158161  List := TStringList.Create;
    159162  try
    160     FioAPI.Format := Format;
     163    FioAPI.Format := DataFormat;
    161164    FioAPI.Token := Token;
    162165    if FioAPI.DownloadLast(List) then begin
    163       List.SaveToFile('VÃœpis ' + FormatDateTime('yyyy-mm-dd hh-nn-ss', Now) +
    164         ExtensionSeparator + DataFormatURL[FioAPI.Format]);
     166      FileName := Format(SReport, [FormatDateTime('yyyy-mm-dd hh-nn-ss', Now) +
     167        ExtensionSeparator + DataFormatURL[FioAPI.Format]]);
     168      List.SaveToFile(UTF8Decode(FileName));
     169      ShowMessage(Format(SSavedToFile, [FileName]));
    165170    end else ShowMessage(SDownloadNotSuccess);
    166171  finally
     
    174179  FioAPI: TFioAPI;
    175180  List: TStringList;
     181  FileName: string;
    176182begin
    177183  FioAPI := TFioAPI.Create;
    178184  List := TStringList.Create;
    179185  try
    180     FioAPI.Format := Format;
     186    FioAPI.Format := DataFormat;
    181187    FioAPI.Token := Token;
    182188    if FioAPI.DownloadMonthly(ReportYear, ReportId, List) then begin
    183       List.SaveToFile('VÃœpis měsíční ' + IntToStr(ReportYear) +
     189      FileName := Format(SReport, [IntToStr(ReportYear) +
    184190        '-' + IntToStr(ReportId) +
    185         ExtensionSeparator + DataFormatURL[FioAPI.Format]);
     191        ExtensionSeparator + DataFormatURL[FioAPI.Format]]);
     192      List.SaveToFile(UTF8Decode(FileName));
     193      ShowMessage(Format(SSavedToFile, [FileName]));
    186194    end else ShowMessage(SDownloadNotSuccess);
    187195  finally
     
    195203  FioAPI: TFioAPI;
    196204  List: TStringList;
     205  FileName: string;
    197206begin
    198207  FioAPI := TFioAPI.Create;
    199208  List := TStringList.Create;
    200209  try
    201     FioAPI.Format := Format;
     210    FioAPI.Format := DataFormat;
    202211    FioAPI.Token := Token;
    203212    if FioAPI.DownloadInterval(ReportTimeFrom, ReportTimeTo, List) then begin
    204       List.SaveToFile('VÃœpis ' + FormatDateTime('yyyy-mm-dd', ReportTimeFrom) +
     213      FileName := Format(SReport, [FormatDateTime('yyyy-mm-dd', ReportTimeFrom) +
    205214        ' ' + FormatDateTime('yyyy-mm-dd', ReportTimeTo) +
    206         ExtensionSeparator + DataFormatURL[FioAPI.Format]);
     215        ExtensionSeparator + DataFormatURL[FioAPI.Format]]);
     216      List.SaveToFile(UTF8Decode(FileName));
     217      ShowMessage(Format(SSavedToFile, [FileName]));
    207218    end else ShowMessage(SDownloadNotSuccess);
    208219  finally
  • trunk/UFioAPI.pas

    r6 r10  
    2626
    2727const
    28   DataFormatText: array[TFioDataFormat] of string = ('XML', 'CVS', 'GPC', 'OFX',
     28  DataFormatText: array[TFioDataFormat] of string = ('XML', 'CSV', 'GPC', 'OFX',
    2929    'JSON', 'HTML', 'STA');
    30   DataFormatURL: array[TFioDataFormat] of string = ('xml', 'cvs', 'gpc', 'ofx',
     30  DataFormatURL: array[TFioDataFormat] of string = ('xml', 'csv', 'gpc', 'ofx',
    3131    'json', 'html', 'sta');
    3232
Note: See TracChangeset for help on using the changeset viewer.