Changeset 189
- Timestamp:
- May 16, 2019, 11:35:07 PM (6 years ago)
- Location:
- branches/generator
- Files:
-
- 2 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator/Languages/generator.cs.po
r137 r189 11 11 "Language: cs\n" 12 12 "X-Generator: Poedit 2.0.4\n" 13 14 #: tformgrammer.buttoncancel.caption15 msgctxt "tformgrammer.buttoncancel.caption"16 msgid "Cancel"17 msgstr "ZruÅ¡it"18 19 #: tformgrammer.buttonok.caption20 msgid "OK"21 msgstr "OK"22 23 #: tformgrammer.caption24 msgid "Grammer settings"25 msgstr "Nastavenà gramatiky"26 27 #: tformgrammer.label1.caption28 msgid "Start rule:"29 msgstr "PoÄáteÄnà pravidlo:"30 31 #: tformgrammer.label2.caption32 msgid "White space rule:"33 msgstr "Pravidlo bÃlÃœch znaků:"34 35 #: tformlookuptable.buttoncancel.caption36 msgctxt "tformlookuptable.buttoncancel.caption"37 msgid "Cancel"38 msgstr "ZruÅ¡it"39 40 #: tformlookuptable.buttonok.caption41 msgctxt "tformlookuptable.buttonok.caption"42 msgid "Ok"43 msgstr "Ok"44 45 #: tformlookuptable.caption46 msgid "Lookup table"47 msgstr "Hledacà tabulka:"48 49 #: tformlookuptable.label1.caption50 msgctxt "tformlookuptable.label1.caption"51 msgid "Name:"52 msgstr "Jméno:"53 54 #: tformlookuptables.aadd.caption55 msgctxt "tformlookuptables.aadd.caption"56 msgid "Add"57 msgstr "PÅidat"58 59 #: tformlookuptables.aadd.hint60 msgctxt "tformlookuptables.aadd.hint"61 msgid "Add"62 msgstr "PÅidat"63 64 #: tformlookuptables.amodify.caption65 msgctxt "tformlookuptables.amodify.caption"66 msgid "Modify"67 msgstr "Upravit"68 69 #: tformlookuptables.amodify.hint70 msgctxt "tformlookuptables.amodify.hint"71 msgid "Modify"72 msgstr "Upravit"73 74 #: tformlookuptables.aremove.caption75 msgctxt "tformlookuptables.aremove.caption"76 msgid "Remove"77 msgstr "Odstranit"78 79 #: tformlookuptables.aremove.hint80 msgctxt "tformlookuptables.aremove.hint"81 msgid "Remove"82 msgstr "Odstranit"83 84 #: tformlookuptables.caption85 msgctxt "tformlookuptables.caption"86 msgid "Lookup tables"87 msgstr "Hledacà tabulky:"88 89 #: tformlookuptables.listview1.columns[0].caption90 msgctxt "tformlookuptables.listview1.columns[0].caption"91 msgid "Name"92 msgstr "Název"93 13 94 14 #: tformmain.abuildcompiler.caption … … 201 121 msgstr "Pravidla" 202 122 203 #: tformrule.buttoncancel.caption204 msgctxt "tformrule.buttoncancel.caption"205 msgid "Cancel"206 msgstr "ZruÅ¡it"207 208 #: tformrule.buttonok.caption209 msgctxt "tformrule.buttonok.caption"210 msgid "Ok"211 msgstr "Ok"212 213 #: tformrule.caption214 msgid "Rule"215 msgstr "Pravidlo"216 217 #: tformrule.checkboxcreatenode.caption218 msgid "Create source node"219 msgstr "VytváÅet zdrojovÃœ uzel"220 221 #: tformrule.label1.caption222 msgctxt "tformrule.label1.caption"223 msgid "Name:"224 msgstr "Jméno:"225 226 #: tformrule.label2.caption227 msgid "Level:"228 msgstr "ÃroveÅ:"229 230 #: tformrule.listview1.columns[0].caption231 msgctxt "tformrule.listview1.columns[0].caption"232 msgid "Name"233 msgstr "Název"234 235 #: tformrule.tabsheet1.caption236 msgctxt "tformrule.tabsheet1.caption"237 msgid "Items"238 msgstr "PoloÅŸky"239 240 #: tformrule.tabsheet2.caption241 msgid "Links"242 msgstr "Vazby"243 244 #: tformrule.tabsheetusedby.caption245 msgid "Used by"246 msgstr "PouÅŸita ÄÃm"247 248 #: tformruleitem.buttoncancel.caption249 msgctxt "tformruleitem.buttoncancel.caption"250 msgid "Cancel"251 msgstr "ZruÅ¡it"252 253 #: tformruleitem.buttonok.caption254 msgctxt "tformruleitem.buttonok.caption"255 msgid "Ok"256 msgstr "Ok"257 258 #: tformruleitem.caption259 msgid "Rule item"260 msgstr "PoloÅŸka pravidla"261 262 #: tformruleitem.checkboxanyexcept.caption263 msgid "Any except"264 msgstr "VÅ¡e kromÄ"265 266 #: tformruleitem.checkboxescapedstring.caption267 msgctxt "tformruleitem.checkboxescapedstring.caption"268 msgid "Escaped strings"269 msgstr "PrefixovanÃœ znaky"270 271 #: tformruleitem.checkboxlookuptable.caption272 msgid "Use lookup table"273 msgstr "PouÅŸÃt hledacà tabulku"274 275 #: tformruleitem.checkboxoptional.caption276 msgid "Optional"277 msgstr "VolitelnÃœ"278 279 #: tformruleitem.checkboxrepetitive.caption280 msgid "Repetitive"281 msgstr "OpakovanÃœ"282 283 #: tformruleitem.comboboxlookuptableaction.text284 msgid "Create"285 msgstr "VytvoÅit"286 287 #: tformruleitem.label1.caption288 msgid "Item action:"289 msgstr "Akce poloÅŸky:"290 291 #: tformruleitem.label2.caption292 msgid "Type:"293 msgstr "Typ:"294 295 #: tformruleitem.labelnonterminal.caption296 msgid "Non-terminal:"297 msgstr "NekoncovÃœ:"298 299 #: tformruleitem.labelterminal.caption300 msgid "Terminal:"301 msgstr "KoncovÃœ:"302 303 #: tformruleitem.labelterminal1.caption304 msgid "Terminal from:"305 msgstr "KoncovÃœ od:"306 307 #: tformruleitem.labelterminal2.caption308 msgid "Terminal to:"309 msgstr "KoncovÃœ do:"310 311 #: tformruleitem.tabsheetnonterminal.caption312 msgid "NonTerminal"313 msgstr "NekoncovÃœ"314 315 #: tformruleitem.tabsheetsubitems.caption316 msgid "SubItems"317 msgstr "PodpoloÅŸky"318 319 #: tformruleitem.tabsheetterminal.caption320 msgid "Terminal"321 msgstr "KoncovÃœ"322 323 #: tformruleitem.tabsheetterminalrange.caption324 msgid "Terminal range"325 msgstr "NekoncovÃœ rozsah"326 327 #: tformruleitems.aadd.caption328 msgctxt "tformruleitems.aadd.caption"329 msgid "Add"330 msgstr "PÅidat"331 332 #: tformruleitems.amodify.caption333 msgctxt "tformruleitems.amodify.caption"334 msgid "Modify"335 msgstr "Upravit"336 337 #: tformruleitems.amovedown.caption338 msgid "Move down"339 msgstr "Posunout dolů"340 341 #: tformruleitems.amoveup.caption342 msgid "Move up"343 msgstr "Posunout nahoru"344 345 #: tformruleitems.aremove.caption346 msgctxt "tformruleitems.aremove.caption"347 msgid "Remove"348 msgstr "Odstranit"349 350 #: tformruleitems.caption351 msgid "Rule items"352 msgstr "PoloÅŸky pravidla"353 354 #: tformruleitems.checkboxwhitespace.caption355 msgid "With white spaces"356 msgstr "S bÃlÃœmi znaky"357 358 #: tformruleitems.label1.caption359 msgid "Operator:"360 msgstr "Operátor:"361 362 #: tformruleitems.listview1.columns[0].caption363 msgctxt "tformruleitems.listview1.columns[0].caption"364 msgid "Name"365 msgstr "Název"366 367 #: tformrules.aadd.caption368 msgctxt "tformrules.aadd.caption"369 msgid "Add"370 msgstr "PÅidat"371 372 #: tformrules.aadd.hint373 msgctxt "tformrules.aadd.hint"374 msgid "Add"375 msgstr "PÅidat"376 377 #: tformrules.amodify.caption378 msgctxt "tformrules.amodify.caption"379 msgid "Modify"380 msgstr "Upravit"381 382 #: tformrules.amodify.hint383 msgctxt "tformrules.amodify.hint"384 msgid "Modify"385 msgstr "Upravit"386 387 #: tformrules.aremove.caption388 msgctxt "tformrules.aremove.caption"389 msgid "Remove"390 msgstr "Odstranit"391 392 #: tformrules.aremove.hint393 msgctxt "tformrules.aremove.hint"394 msgid "Remove"395 msgstr "Odstranit"396 397 #: tformrules.caption398 msgctxt "tformrules.caption"399 msgid "Rules"400 msgstr "Pravidla"401 402 #: tformrules.listview1.columns[0].caption403 msgctxt "tformrules.listview1.columns[0].caption"404 msgid "Name"405 msgstr "Název"406 407 #: tformrules.listview1.columns[1].caption408 msgid "Node"409 msgstr "Uzel"410 411 #: tformrules.listview1.columns[2].caption412 msgctxt "tformrules.listview1.columns[2].caption"413 msgid "Items"414 msgstr "PoloÅŸky"415 416 #: tformrules.listview1.columns[3].caption417 msgid "Char length"418 msgstr "Znaková délka"419 420 #: tformrules.listview1.columns[4].caption421 msgid "Level"422 msgstr "ÃroveÅ"423 424 123 #: uformmain.sdoyouwanttosaveproject 425 124 msgid "There are unsaved changes in project. Do you want to save them?" … … 433 132 msgid "Unsaved changes" 434 133 msgstr "NeuloÅŸené zmÄny" 134 -
branches/generator/Languages/generator.po
r137 r189 1 1 msgid "" 2 2 msgstr "Content-Type: text/plain; charset=UTF-8" 3 4 #: tformgrammer.buttoncancel.caption5 msgctxt "tformgrammer.buttoncancel.caption"6 msgid "Cancel"7 msgstr ""8 9 #: tformgrammer.buttonok.caption10 msgid "OK"11 msgstr ""12 13 #: tformgrammer.caption14 msgid "Grammer settings"15 msgstr ""16 17 #: tformgrammer.label1.caption18 msgid "Start rule:"19 msgstr ""20 21 #: tformgrammer.label2.caption22 msgid "White space rule:"23 msgstr ""24 25 #: tformlookuptable.buttoncancel.caption26 msgctxt "tformlookuptable.buttoncancel.caption"27 msgid "Cancel"28 msgstr ""29 30 #: tformlookuptable.buttonok.caption31 msgctxt "tformlookuptable.buttonok.caption"32 msgid "Ok"33 msgstr ""34 35 #: tformlookuptable.caption36 msgid "Lookup table"37 msgstr ""38 39 #: tformlookuptable.label1.caption40 msgctxt "tformlookuptable.label1.caption"41 msgid "Name:"42 msgstr ""43 44 #: tformlookuptables.aadd.caption45 msgctxt "tformlookuptables.aadd.caption"46 msgid "Add"47 msgstr ""48 49 #: tformlookuptables.aadd.hint50 msgctxt "tformlookuptables.aadd.hint"51 msgid "Add"52 msgstr ""53 54 #: tformlookuptables.amodify.caption55 msgctxt "tformlookuptables.amodify.caption"56 msgid "Modify"57 msgstr ""58 59 #: tformlookuptables.amodify.hint60 msgctxt "tformlookuptables.amodify.hint"61 msgid "Modify"62 msgstr ""63 64 #: tformlookuptables.aremove.caption65 msgctxt "tformlookuptables.aremove.caption"66 msgid "Remove"67 msgstr ""68 69 #: tformlookuptables.aremove.hint70 msgctxt "tformlookuptables.aremove.hint"71 msgid "Remove"72 msgstr ""73 74 #: tformlookuptables.caption75 msgctxt "tformlookuptables.caption"76 msgid "Lookup tables"77 msgstr ""78 79 #: tformlookuptables.listview1.columns[0].caption80 msgctxt "tformlookuptables.listview1.columns[0].caption"81 msgid "Name"82 msgstr ""83 3 84 4 #: tformmain.abuildcompiler.caption … … 191 111 msgstr "" 192 112 193 #: tformrule.buttoncancel.caption194 msgctxt "tformrule.buttoncancel.caption"195 msgid "Cancel"196 msgstr ""197 198 #: tformrule.buttonok.caption199 msgctxt "tformrule.buttonok.caption"200 msgid "Ok"201 msgstr ""202 203 #: tformrule.caption204 msgid "Rule"205 msgstr ""206 207 #: tformrule.checkboxcreatenode.caption208 msgid "Create source node"209 msgstr ""210 211 #: tformrule.label1.caption212 msgctxt "tformrule.label1.caption"213 msgid "Name:"214 msgstr ""215 216 #: tformrule.label2.caption217 msgid "Level:"218 msgstr ""219 220 #: tformrule.listview1.columns[0].caption221 msgctxt "tformrule.listview1.columns[0].caption"222 msgid "Name"223 msgstr ""224 225 #: tformrule.tabsheet1.caption226 msgctxt "tformrule.tabsheet1.caption"227 msgid "Items"228 msgstr ""229 230 #: tformrule.tabsheet2.caption231 msgid "Links"232 msgstr ""233 234 #: tformrule.tabsheetusedby.caption235 msgid "Used by"236 msgstr ""237 238 #: tformruleitem.buttoncancel.caption239 msgctxt "tformruleitem.buttoncancel.caption"240 msgid "Cancel"241 msgstr ""242 243 #: tformruleitem.buttonok.caption244 msgctxt "tformruleitem.buttonok.caption"245 msgid "Ok"246 msgstr ""247 248 #: tformruleitem.caption249 msgid "Rule item"250 msgstr ""251 252 #: tformruleitem.checkboxanyexcept.caption253 msgid "Any except"254 msgstr ""255 256 #: tformruleitem.checkboxescapedstring.caption257 msgctxt "tformruleitem.checkboxescapedstring.caption"258 msgid "Escaped strings"259 msgstr ""260 261 #: tformruleitem.checkboxlookuptable.caption262 msgid "Use lookup table"263 msgstr ""264 265 #: tformruleitem.checkboxoptional.caption266 msgid "Optional"267 msgstr ""268 269 #: tformruleitem.checkboxrepetitive.caption270 msgid "Repetitive"271 msgstr ""272 273 #: tformruleitem.comboboxlookuptableaction.text274 msgid "Create"275 msgstr ""276 277 #: tformruleitem.label1.caption278 msgid "Item action:"279 msgstr ""280 281 #: tformruleitem.label2.caption282 msgid "Type:"283 msgstr ""284 285 #: tformruleitem.labelnonterminal.caption286 msgid "Non-terminal:"287 msgstr ""288 289 #: tformruleitem.labelterminal.caption290 msgid "Terminal:"291 msgstr ""292 293 #: tformruleitem.labelterminal1.caption294 msgid "Terminal from:"295 msgstr ""296 297 #: tformruleitem.labelterminal2.caption298 msgid "Terminal to:"299 msgstr ""300 301 #: tformruleitem.tabsheetnonterminal.caption302 msgid "NonTerminal"303 msgstr ""304 305 #: tformruleitem.tabsheetsubitems.caption306 msgid "SubItems"307 msgstr ""308 309 #: tformruleitem.tabsheetterminal.caption310 msgid "Terminal"311 msgstr ""312 313 #: tformruleitem.tabsheetterminalrange.caption314 msgid "Terminal range"315 msgstr ""316 317 #: tformruleitems.aadd.caption318 msgctxt "TFORMRULEITEMS.AADD.CAPTION"319 msgid "Add"320 msgstr ""321 322 #: tformruleitems.amodify.caption323 msgctxt "TFORMRULEITEMS.AMODIFY.CAPTION"324 msgid "Modify"325 msgstr ""326 327 #: tformruleitems.amovedown.caption328 msgid "Move down"329 msgstr ""330 331 #: tformruleitems.amoveup.caption332 msgid "Move up"333 msgstr ""334 335 #: tformruleitems.aremove.caption336 msgctxt "TFORMRULEITEMS.AREMOVE.CAPTION"337 msgid "Remove"338 msgstr ""339 340 #: tformruleitems.caption341 msgid "Rule items"342 msgstr ""343 344 #: tformruleitems.checkboxwhitespace.caption345 msgid "With white spaces"346 msgstr ""347 348 #: tformruleitems.label1.caption349 msgid "Operator:"350 msgstr ""351 352 #: tformruleitems.listview1.columns[0].caption353 msgctxt "TFORMRULEITEMS.LISTVIEW1.COLUMNS[0].CAPTION"354 msgid "Name"355 msgstr ""356 357 #: tformrules.aadd.caption358 msgctxt "tformrules.aadd.caption"359 msgid "Add"360 msgstr ""361 362 #: tformrules.aadd.hint363 msgctxt "TFORMRULES.AADD.HINT"364 msgid "Add"365 msgstr ""366 367 #: tformrules.amodify.caption368 msgctxt "tformrules.amodify.caption"369 msgid "Modify"370 msgstr ""371 372 #: tformrules.amodify.hint373 msgctxt "TFORMRULES.AMODIFY.HINT"374 msgid "Modify"375 msgstr ""376 377 #: tformrules.aremove.caption378 msgctxt "tformrules.aremove.caption"379 msgid "Remove"380 msgstr ""381 382 #: tformrules.aremove.hint383 msgctxt "TFORMRULES.AREMOVE.HINT"384 msgid "Remove"385 msgstr ""386 387 #: tformrules.caption388 msgctxt "TFORMRULES.CAPTION"389 msgid "Rules"390 msgstr ""391 392 #: tformrules.listview1.columns[0].caption393 msgctxt "tformrules.listview1.columns[0].caption"394 msgid "Name"395 msgstr ""396 397 #: tformrules.listview1.columns[1].caption398 msgid "Node"399 msgstr ""400 401 #: tformrules.listview1.columns[2].caption402 msgctxt "tformrules.listview1.columns[2].caption"403 msgid "Items"404 msgstr ""405 406 #: tformrules.listview1.columns[3].caption407 msgid "Char length"408 msgstr ""409 410 #: tformrules.listview1.columns[4].caption411 msgid "Level"412 msgstr ""413 414 113 #: uformmain.sdoyouwanttosaveproject 415 114 msgid "There are unsaved changes in project. Do you want to save them?" -
branches/generator/Packages/Common/Common.lpk
r167 r189 60 60 <Item5> 61 61 <Filename Value="UPrefixMultiplier.pas"/> 62 <HasRegisterProc Value="True"/> 62 63 <UnitName Value="UPrefixMultiplier"/> 63 64 </Item5> … … 144 145 <EnableI18NForLFM Value="True"/> 145 146 </i18n> 146 <RequiredPkgs Count=" 3">147 <RequiredPkgs Count="2"> 147 148 <Item1> 148 149 <PackageName Value="LCL"/> 149 150 </Item1> 150 151 <Item2> 151 <PackageName Value="TemplateGenerics"/>152 </Item2>153 <Item3>154 152 <PackageName Value="FCL"/> 155 153 <MinVersion Major="1" Valid="True"/> 156 </Item 3>154 </Item2> 157 155 </RequiredPkgs> 158 156 <UsageOptions> -
branches/generator/Packages/Common/Common.pas
r167 r189 20 20 begin 21 21 RegisterUnit('UDebugLog', @UDebugLog.Register); 22 RegisterUnit('UPrefixMultiplier', @UPrefixMultiplier.Register); 22 23 RegisterUnit('ULastOpenedList', @ULastOpenedList.Register); 23 24 RegisterUnit('UJobProgressView', @UJobProgressView.Register); -
branches/generator/Packages/Common/Languages/UJobProgressView.cs.po
r167 r189 24 24 msgstr "DokonÄené" 25 25 26 #: ujobprogressview.soperations27 #, fuzzy28 #| msgid "Operations"29 msgid "Operations:"30 msgstr "Operace"31 32 26 #: ujobprogressview.spleasewait 33 27 msgid "Please wait..." -
branches/generator/Packages/Common/Languages/UJobProgressView.po
r167 r189 14 14 msgstr "" 15 15 16 #: ujobprogressview.soperations17 msgid "Operations:"18 msgstr ""19 20 16 #: ujobprogressview.spleasewait 21 17 msgid "Please wait..." -
branches/generator/Packages/Common/Languages/UThreading.po
r114 r189 3 3 4 4 #: uthreading.scurrentthreadnotfound 5 #, fuzzy,badformat 5 6 msgid "Current thread ID %d not found in virtual thread list." 6 7 msgstr "Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8" -
branches/generator/Packages/Common/UCommon.pas
r167 r189 28 28 unfDNSDomainName = 11); 29 29 30 TFilterMethodMethod = function (FileName: string): Boolean of object; 30 TFilterMethod = function (FileName: string): Boolean of object; 31 TFileNameMethod = procedure (FileName: string) of object; 32 31 33 var 32 34 ExceptionHandler: TExceptionEvent; … … 72 74 function MergeArray(A, B: array of string): TArrayOfString; 73 75 function LoadFileToStr(const FileName: TFileName): AnsiString; 76 procedure SaveStringToFile(S, FileName: string); 74 77 procedure SearchFiles(AList: TStrings; Dir: string; 75 FilterMethod: TFilterMethod Method = nil);78 FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil); 76 79 function GetStringPart(var Text: string; Separator: string): string; 80 function StripTags(const S: string): string; 77 81 function PosFromIndex(SubStr: string; Text: string; 78 82 StartIndex: Integer): Integer; 79 83 function PosFromIndexReverse(SubStr: string; Text: string; 80 84 StartIndex: Integer): Integer; 85 procedure CopyStringArray(Dest: TStringArray; Source: array of string); 81 86 82 87 … … 106 111 I: Integer; 107 112 begin 113 Result := ''; 108 114 for I := 1 to Length(Source) do begin 109 115 Result := Result + LowerCase(IntToHex(Ord(Source[I]), 2)); … … 527 533 end; 528 534 535 procedure SaveStringToFile(S, FileName: string); 536 var 537 F: TextFile; 538 begin 539 AssignFile(F, FileName); 540 try 541 ReWrite(F); 542 Write(F, S); 543 finally 544 CloseFile(F); 545 end; 546 end; 547 529 548 procedure SearchFiles(AList: TStrings; Dir: string; 530 FilterMethod: TFilterMethod Method = nil);549 FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil); 531 550 var 532 551 SR: TSearchRec; … … 538 557 if (SR.Name = '.') or (SR.Name = '..') or (Assigned(FilterMethod) and (not FilterMethod(SR.Name) or 539 558 not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name))) then Continue; 559 if Assigned(FileNameMethod) then 560 FileNameMethod(Dir + SR.Name); 540 561 AList.Add(Dir + SR.Name); 541 562 if (SR.Attr and faDirectory) <> 0 then … … 561 582 Result := Trim(Result); 562 583 Text := Trim(Text); 584 end; 585 586 function StripTags(const S: string): string; 587 var 588 Len: Integer; 589 590 function ReadUntil(const ReadFrom: Integer; const C: Char): Integer; 591 var 592 J: Integer; 593 begin 594 for J := ReadFrom to Len do 595 if (S[j] = C) then 596 begin 597 Result := J; 598 Exit; 599 end; 600 Result := Len + 1; 601 end; 602 603 var 604 I, APos: Integer; 605 begin 606 Len := Length(S); 607 I := 0; 608 Result := ''; 609 while (I <= Len) do begin 610 Inc(I); 611 APos := ReadUntil(I, '<'); 612 Result := Result + Copy(S, I, APos - i); 613 I := ReadUntil(APos + 1, '>'); 614 end; 563 615 end; 564 616 … … 608 660 end; 609 661 662 procedure CopyStringArray(Dest: TStringArray; Source: array of string); 663 var 664 I: Integer; 665 begin 666 SetLength(Dest, Length(Source)); 667 for I := 0 to Length(Dest) - 1 do 668 Dest[I] := Source[I]; 669 end; 670 671 610 672 initialization 611 673 -
branches/generator/Packages/Common/UDebugLog.pas
r167 r189 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, SpecializedList, SyncObjs;8 Classes, SysUtils, FileUtil, fgl, SyncObjs; 9 9 10 10 type … … 29 29 procedure SetMaxCount(const AValue: Integer); 30 30 public 31 Items: T ListObject;31 Items: TFPGObjectList<TDebugLogItem>; 32 32 Lock: TCriticalSection; 33 33 procedure Add(Text: string; Group: string = ''); … … 117 117 begin 118 118 inherited; 119 Items := T ListObject.Create;119 Items := TFPGObjectList<TDebugLogItem>.Create; 120 120 Lock := TCriticalSection.Create; 121 121 MaxCount := 100; -
branches/generator/Packages/Common/UJobProgressView.lfm
r167 r189 15 15 OnShow = FormShow 16 16 Position = poScreenCenter 17 LCLVersion = ' 1.8.2.0'17 LCLVersion = '2.0.2.0' 18 18 object PanelOperationsTitle: TPanel 19 19 Left = 0 … … 241 241 Interval = 100 242 242 OnTimer = TimerUpdateTimer 243 left = 264243 left = 320 244 244 top = 8 245 245 end -
branches/generator/Packages/Common/UJobProgressView.pas
r167 r189 175 175 STotalEstimatedTime = 'Total estimated time: %s'; 176 176 SFinished = 'Finished'; 177 SOperations = 'Operations:';178 177 179 178 procedure Register; -
branches/generator/Packages/Common/UListViewSort.pas
r167 r189 9 9 uses 10 10 {$IFDEF Windows}Windows, CommCtrl, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils, 11 Controls, DateUtils, Dialogs, SpecializedList, Forms, Grids, StdCtrls, ExtCtrls,12 LclIntf, L Messages, LclType, LResources;11 Controls, DateUtils, Dialogs, fgl, Forms, Grids, StdCtrls, ExtCtrls, 12 LclIntf, LclType, LResources; 13 13 14 14 type … … 52 52 {$ENDIF} 53 53 public 54 List: T ListObject;55 Source: T ListObject;54 List: TFPGObjectList<TObject>; 55 Source: TFPGObjectList<TObject>; 56 56 constructor Create(AOwner: TComponent); override; 57 57 destructor Destroy; override; … … 98 98 end; 99 99 100 { TListViewEx } 101 102 TListViewEx = class(TWinControl) 103 private 104 FFilter: TListViewFilter; 105 FListView: TListView; 106 FListViewSort: TListViewSort; 107 procedure ResizeHanlder; 108 public 109 constructor Create(TheOwner: TComponent); override; 110 destructor Destroy; override; 111 published 112 property ListView: TListView read FListView write FListView; 113 property ListViewSort: TListViewSort read FListViewSort write FListViewSort; 114 property Filter: TListViewFilter read FFilter write FFilter; 115 property Visible; 116 end; 117 100 118 procedure Register; 101 119 … … 105 123 procedure Register; 106 124 begin 107 RegisterComponents('Common', [TListViewSort, TListViewFilter]); 125 RegisterComponents('Common', [TListViewSort, TListViewFilter, TListViewEx]); 126 end; 127 128 { TListViewEx } 129 130 procedure TListViewEx.ResizeHanlder; 131 begin 132 end; 133 134 constructor TListViewEx.Create(TheOwner: TComponent); 135 begin 136 inherited Create(TheOwner); 137 Filter := TListViewFilter.Create(Self); 138 Filter.Parent := Self; 139 Filter.Align := alBottom; 140 ListView := TListView.Create(Self); 141 ListView.Parent := Self; 142 ListView.Align := alClient; 143 ListViewSort := TListViewSort.Create(Self); 144 ListViewSort.ListView := ListView; 145 end; 146 147 destructor TListViewEx.Destroy; 148 begin 149 inherited Destroy; 108 150 end; 109 151 … … 277 319 end; 278 320 321 var 322 ListViewSortCompare: TCompareEvent; 323 324 function ListViewCompare(const Item1, Item2: TObject): Integer; 325 begin 326 Result := ListViewSortCompare(Item1, Item2); 327 end; 328 279 329 procedure TListViewSort.Sort(Compare: TCompareEvent); 280 330 begin 331 // TODO: Because TFLGObjectList compare handler is not class method, 332 // it is necessary to use simple function compare handler with local variable 333 ListViewSortCompare := Compare; 281 334 if (List.Count > 0) then 282 List.Sort( Compare);335 List.Sort(ListViewCompare); 283 336 end; 284 337 … … 343 396 begin 344 397 inherited; 345 List := T ListObject.Create;346 List. OwnsObjects := False;398 List := TFPGObjectList<TObject>.Create; 399 List.FreeObjects := False; 347 400 end; 348 401 -
branches/generator/Packages/Common/UMemory.pas
r167 r189 112 112 procedure TMemory.WriteMemory(Position: Integer; Memory: TMemory); 113 113 begin 114 Move(Memory.FData, PByte( @FData+ Position)^, Memory.Size);114 Move(Memory.FData, PByte(PByte(@FData) + Position)^, Memory.Size); 115 115 end; 116 116 117 117 procedure TMemory.ReadMemory(Position: Integer; Memory: TMemory); 118 118 begin 119 Move(PByte( @FData+ Position)^, Memory.FData, Memory.Size);119 Move(PByte(PByte(@FData) + Position)^, Memory.FData, Memory.Size); 120 120 end; 121 121 -
branches/generator/Packages/Common/UPool.pas
r114 r189 6 6 7 7 uses 8 Classes, SysUtils, syncobjs, SpecializedList, UThreading;8 Classes, SysUtils, syncobjs, fgl, UThreading; 9 9 10 10 type … … 22 22 function NewItemObject: TObject; virtual; 23 23 public 24 Items: T ListObject;25 FreeItems: T ListObject;24 Items: TFPGObjectList<TObject>; 25 FreeItems: TFPGObjectList<TObject>; 26 26 function Acquire: TObject; virtual; 27 27 procedure Release(Item: TObject); virtual; … … 185 185 begin 186 186 inherited; 187 Items := T ListObject.Create;188 FreeItems := T ListObject.Create;189 FreeItems. OwnsObjects := False;187 Items := TFPGObjectList<TObject>.Create; 188 FreeItems := TFPGObjectList<TObject>.Create; 189 FreeItems.FreeObjects := False; 190 190 FReleaseEvent := TEvent.Create(nil, False, False, ''); 191 191 end; -
branches/generator/Packages/Common/UPrefixMultiplier.pas
r114 r189 21 21 { TPrefixMultiplier } 22 22 23 TPrefixMultiplier = class 23 TPrefixMultiplier = class(TComponent) 24 24 private 25 function TruncateDigits(Value: Double;Digits:Integer=3):Double;25 function TruncateDigits(Value: Double; Digits: Integer = 3): Double; 26 26 public 27 27 function Add(Value: Double; PrefixMultipliers: TPrefixMultiplierDef; … … 72 72 ); 73 73 74 procedure Register; 75 76 74 77 implementation 78 79 procedure Register; 80 begin 81 RegisterComponents('Common', [TPrefixMultiplier]); 82 end; 75 83 76 84 { TPrefixMultiplier } … … 92 100 end; 93 101 94 function TPrefixMultiplier.Add(Value: Double;PrefixMultipliers:TPrefixMultiplierDef95 ; UnitText:string;Digits:Integer):string;102 function TPrefixMultiplier.Add(Value: Double; PrefixMultipliers: TPrefixMultiplierDef 103 ; UnitText:string; Digits: Integer): string; 96 104 var 97 105 I: Integer; -
branches/generator/Packages/Common/URegistry.pas
r167 r189 29 29 procedure SetCurrentContext(AValue: TRegistryContext); 30 30 public 31 function ReadChar(const Name: string): Char; 32 procedure WriteChar(const Name: string; Value: Char); 31 33 function ReadBoolWithDefault(const Name: string; 32 34 DefaultValue: Boolean): Boolean; 33 35 function ReadIntegerWithDefault(const Name: string; DefaultValue: Integer): Integer; 34 36 function ReadStringWithDefault(const Name: string; DefaultValue: string): string; 37 function ReadCharWithDefault(const Name: string; DefaultValue: Char): Char; 35 38 function ReadFloatWithDefault(const Name: string; 36 39 DefaultValue: Double): Double; … … 89 92 end; 90 93 94 function TRegistryEx.ReadCharWithDefault(const Name: string; DefaultValue: Char 95 ): Char; 96 begin 97 if ValueExists(Name) then Result := ReadChar(Name) 98 else begin 99 WriteChar(Name, DefaultValue); 100 Result := DefaultValue; 101 end; 102 end; 103 91 104 function TRegistryEx.ReadFloatWithDefault(const Name: string; 92 105 DefaultValue: Double): Double; … … 137 150 end; 138 151 152 function TRegistryEx.ReadChar(const Name: string): Char; 153 var 154 S: string; 155 begin 156 S := ReadString(Name); 157 if Length(S) > 0 then Result := S[1] 158 else Result := #0; 159 end; 160 161 procedure TRegistryEx.WriteChar(const Name: string; Value: Char); 162 begin 163 WriteString(Name, Value); 164 end; 165 139 166 function TRegistryEx.ReadBoolWithDefault(const Name: string; 140 167 DefaultValue: Boolean): Boolean; -
branches/generator/Packages/Common/UScaleDPI.pas
r167 r189 289 289 //OldAutoSize: Boolean; 290 290 begin 291 //if not (Control is TCustomPage) then 292 // Resize childs first 293 if Control is TWinControl then begin 294 WinControl := TWinControl(Control); 295 if WinControl.ControlCount > 0 then begin 296 for I := 0 to WinControl.ControlCount - 1 do begin 297 if WinControl.Controls[I] is TControl then begin 298 ScaleControl(WinControl.Controls[I], FromDPI); 299 end; 300 end; 301 end; 302 end; 303 291 304 //if Control is TMemo then Exit; 292 305 //if Control is TForm then … … 340 353 end; 341 354 342 //if not (Control is TCustomPage) then343 if Control is TWinControl then begin344 WinControl := TWinControl(Control);345 if WinControl.ControlCount > 0 then begin346 for I := 0 to WinControl.ControlCount - 1 do begin347 if WinControl.Controls[I] is TControl then begin348 ScaleControl(WinControl.Controls[I], FromDPI);349 end;350 end;351 end;352 end;353 355 //if Control is TForm then 354 356 // Control.EnableAutoSizing; -
branches/generator/Packages/Common/UXMLUtils.pas
r167 r189 7 7 uses 8 8 {$IFDEF WINDOWS}Windows,{$ENDIF} 9 Classes, SysUtils, DateUtils, DOM, XMLRead;9 Classes, SysUtils, DateUtils, DOM, xmlread; 10 10 11 11 function XMLTimeToDateTime(XMLDateTime: string): TDateTime; -
branches/generator/generator.lpi
r167 r189 2 2 <CONFIG> 3 3 <ProjectOptions> 4 <Version Value="1 0"/>4 <Version Value="11"/> 5 5 <General> 6 6 <SessionStorage Value="InProjectDir"/> 7 7 <MainUnit Value="0"/> 8 8 <Title Value="Language generator"/> 9 <Scaled Value="True"/> 9 10 <ResourceType Value="res"/> 10 11 <UseXPManifest Value="True"/> 12 <XPManifest> 13 <DpiAware Value="True"/> 14 </XPManifest> 11 15 <Icon Value="0"/> 12 16 </General> … … 65 69 </PublishOptions> 66 70 <RunParams> 67 <local> 68 <FormatVersion Value="1"/> 69 </local> 71 <FormatVersion Value="2"/> 72 <Modes Count="1"> 73 <Mode0 Name="default"/> 74 </Modes> 70 75 </RunParams> 71 <RequiredPackages Count=" 4">76 <RequiredPackages Count="3"> 72 77 <Item1> 73 78 <PackageName Value="FCL"/> 74 79 </Item1> 75 80 <Item2> 76 <PackageName Value=" TemplateGenerics"/>77 <DefaultFilename Value="Packages/ TemplateGenerics/TemplateGenerics.lpk" Prefer="True"/>81 <PackageName Value="Common"/> 82 <DefaultFilename Value="Packages/Common/Common.lpk" Prefer="True"/> 78 83 </Item2> 79 84 <Item3> 80 <PackageName Value="Common"/> 81 <DefaultFilename Value="Packages/Common/Common.lpk" Prefer="True"/> 85 <PackageName Value="LCL"/> 82 86 </Item3> 83 <Item4>84 <PackageName Value="LCL"/>85 </Item4>86 87 </RequiredPackages> 87 88 <Units Count="12"> -
branches/generator/generator.lpr
r137 r189 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UCore, Common, TemplateGenerics,UFormMain, SysUtils, UBuilder,10 Forms, UCore, Common, UFormMain, SysUtils, UBuilder, 11 11 UFormRules, UFormLookupTables, UFormLookupTable 12 12 { you can add units after this }; … … 26 26 {$ENDIF} 27 27 28 Application.Title := 'Language generator'; 28 Application.Scaled:=True; 29 Application.Title:='Language generator'; 29 30 RequireDerivedFormResource := True; 30 31 Application.Initialize;
Note:
See TracChangeset
for help on using the changeset viewer.