Changeset 10
- Timestamp:
- Mar 14, 2013, 11:35:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r9 r10 111 111 Height = 65 112 112 Top = 168 113 Width = 489 113 Width = 499 114 Anchors = [akTop, akLeft, akRight] 114 115 Caption = 'Selected mothly report' 115 116 ClientHeight = 46 116 ClientWidth = 4 85117 ClientWidth = 495 117 118 TabOrder = 3 118 119 object ButtonMonthly: TButton -
trunk/Forms/UFormSettings.pas
r9 r10 68 68 begin 69 69 LabeledEditToken.Text := Core.Token; 70 ComboBox1.ItemIndex := Integer(Core. Format);70 ComboBox1.ItemIndex := Integer(Core.DataFormat); 71 71 LabeledEditFolder.Text := Core.TargetDirectory; 72 72 end; … … 75 75 begin 76 76 Core.Token := LabeledEditToken.Text; 77 Core. Format := TFioDataFormat(ComboBox1.ItemIndex);77 Core.DataFormat := TFioDataFormat(ComboBox1.ItemIndex); 78 78 Core.TargetDirectory := LabeledEditFolder.Text; 79 79 end; -
trunk/Languages/FioInfo.cs.po
r9 r10 44 44 #: tcore.menuitem3.caption 45 45 msgid "-" 46 msgstr " "46 msgstr "-" 47 47 48 48 #: tformabout.buttonok.caption … … 158 158 msgstr "StaÅŸenà selhalo" 159 159 160 #: ucore.sreport 161 msgid "Dump %s" 162 msgstr "VÃœpis %s" 163 164 #: ucore.ssavedtofile 165 #| msgid "Dump saved to file to %s" 166 msgid "Dump saved to file %s" 167 msgstr "VÃœpis uloÅŸen do souboru %s" 168 160 169 #: uformabout.sapplicationname 161 170 msgid "Application name" -
trunk/Languages/FioInfo.po
r9 r10 150 150 msgstr "" 151 151 152 #: ucore.sreport 153 msgid "Dump %s" 154 msgstr "" 155 156 #: ucore.ssavedtofile 157 msgid "Dump saved to file %s" 158 msgstr "" 159 152 160 #: uformabout.sapplicationname 153 161 msgid "Application name" -
trunk/Packages/CoolTranslator/Demo/Languages
-
Property svn:ignore
set to
*.mo
-
Property svn:ignore
set to
-
trunk/UCore.lfm
r9 r10 391 391 VersionMinor = 0 392 392 VersionBugFix = 0 393 VersionSuffix = 'alfa' 393 394 CompanyName = 'JiÅÃ Hajda' 394 395 CompanyHomePage = 'http://svn.zdechov.net/trac/fioinfo' -
trunk/UCore.pas
r9 r10 50 50 RegistryContext: TRegistryContext; 51 51 Token: string; 52 Format: TFioDataFormat;52 DataFormat: TFioDataFormat; 53 53 TargetDirectory: string; 54 54 ReportYear: Integer; … … 72 72 resourcestring 73 73 SDownloadNotSuccess = 'Download failed'; 74 SReport = 'Dump %s'; 75 SSavedToFile = 'Dump saved to file %s'; 74 76 75 77 { TCore } … … 105 107 OpenKey(Context.Key, True); 106 108 WriteString('TargetDir', TargetDirectory); 107 WriteInteger('DataFormat', Integer( Format));109 WriteInteger('DataFormat', Integer(DataFormat)); 108 110 WriteString('Token', Token); 109 111 WriteDate('ReportTimeFrom', ReportTimeFrom); … … 124 126 OpenKey(Context.Key, True); 125 127 TargetDirectory := ReadStringWithDefault('TargetDir', ExtractFileDir(Application.ExeName)); 126 Format := TFioDataFormat(ReadIntegerWithDefault('DataFormat', Integer(dfXML)));128 DataFormat := TFioDataFormat(ReadIntegerWithDefault('DataFormat', Integer(dfXML))); 127 129 Token := ReadStringWithDefault('Token', ''); 128 130 ReportTimeFrom := ReadDateTimeWithDefault('ReportTimeFrom', Now); … … 154 156 FioAPI: TFioAPI; 155 157 List: TStringList; 158 FileName: string; 156 159 begin 157 160 FioAPI := TFioAPI.Create; 158 161 List := TStringList.Create; 159 162 try 160 FioAPI.Format := Format;163 FioAPI.Format := DataFormat; 161 164 FioAPI.Token := Token; 162 165 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])); 165 170 end else ShowMessage(SDownloadNotSuccess); 166 171 finally … … 174 179 FioAPI: TFioAPI; 175 180 List: TStringList; 181 FileName: string; 176 182 begin 177 183 FioAPI := TFioAPI.Create; 178 184 List := TStringList.Create; 179 185 try 180 FioAPI.Format := Format;186 FioAPI.Format := DataFormat; 181 187 FioAPI.Token := Token; 182 188 if FioAPI.DownloadMonthly(ReportYear, ReportId, List) then begin 183 List.SaveToFile('VÃœpis mÄsÃÄnà ' +IntToStr(ReportYear) +189 FileName := Format(SReport, [IntToStr(ReportYear) + 184 190 '-' + IntToStr(ReportId) + 185 ExtensionSeparator + DataFormatURL[FioAPI.Format]); 191 ExtensionSeparator + DataFormatURL[FioAPI.Format]]); 192 List.SaveToFile(UTF8Decode(FileName)); 193 ShowMessage(Format(SSavedToFile, [FileName])); 186 194 end else ShowMessage(SDownloadNotSuccess); 187 195 finally … … 195 203 FioAPI: TFioAPI; 196 204 List: TStringList; 205 FileName: string; 197 206 begin 198 207 FioAPI := TFioAPI.Create; 199 208 List := TStringList.Create; 200 209 try 201 FioAPI.Format := Format;210 FioAPI.Format := DataFormat; 202 211 FioAPI.Token := Token; 203 212 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) + 205 214 ' ' + 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])); 207 218 end else ShowMessage(SDownloadNotSuccess); 208 219 finally -
trunk/UFioAPI.pas
r6 r10 26 26 27 27 const 28 DataFormatText: array[TFioDataFormat] of string = ('XML', 'C VS', 'GPC', 'OFX',28 DataFormatText: array[TFioDataFormat] of string = ('XML', 'CSV', 'GPC', 'OFX', 29 29 'JSON', 'HTML', 'STA'); 30 DataFormatURL: array[TFioDataFormat] of string = ('xml', 'c vs', 'gpc', 'ofx',30 DataFormatURL: array[TFioDataFormat] of string = ('xml', 'csv', 'gpc', 'ofx', 31 31 'json', 'html', 'sta'); 32 32
Note:
See TracChangeset
for help on using the changeset viewer.