hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringclasses
163 values
lang
stringclasses
53 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
112
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
113
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
113
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.05M
avg_line_length
float64
1
966k
max_line_length
int64
1
977k
alphanum_fraction
float64
0
1
834c347cf8203e8fad4a25dc6f3c41a7b3cdcd49
490
lpr
Pascal
samples/lazarus/Samples.lpr
AndersondaCampo/mail4delphi
38e79ef6632f0581a50f67e542a08dc075640457
[ "MIT" ]
86
2020-05-14T20:49:29.000Z
2022-03-17T18:20:12.000Z
samples/lazarus/Samples.lpr
AndersondaCampo/mail4delphi
38e79ef6632f0581a50f67e542a08dc075640457
[ "MIT" ]
6
2020-05-20T10:59:12.000Z
2021-05-13T19:56:10.000Z
samples/lazarus/Samples.lpr
AndersondaCampo/mail4delphi
38e79ef6632f0581a50f67e542a08dc075640457
[ "MIT" ]
36
2020-06-02T18:07:57.000Z
2022-03-25T20:35:20.000Z
program Samples; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Interfaces, Forms, indylaz, View.Samples in 'src\view\View.Samples.pas' {FrmSamples}, Mail4Delphi.Intf in '..\..\src\Mail4Delphi.Intf.pas', Mail4Delphi in '..\..\src\Mail4Delphi.pas'; {$R *.res} begin RequireDerivedFormResource:=True; Application.Scaled:=True; Application.Initialize; Application.CreateForm(TFrmSamples, FrmSamples); Application.Run; end.
19.6
59
0.706122
85ff180c0a62053968a9f26e1fcf2aed0e8daa93
21,943
pas
Pascal
npm_precl/part.pas
ghisvail/MRIcron
17994ad3d38c27644ece83b2fffa2537c0ac0ed4
[ "BSD-3-Clause" ]
44
2016-02-09T07:07:25.000Z
2021-10-31T18:49:32.000Z
npm_precl/part.pas
ghisvail/MRIcron
17994ad3d38c27644ece83b2fffa2537c0ac0ed4
[ "BSD-3-Clause" ]
18
2016-02-25T09:52:38.000Z
2022-02-17T01:45:35.000Z
npm_precl/part.pas
ghisvail/MRIcron
17994ad3d38c27644ece83b2fffa2537c0ac0ed4
[ "BSD-3-Clause" ]
19
2016-03-01T19:40:12.000Z
2021-11-03T12:52:46.000Z
unit part; //Physiological Artifact Removal Tool {$H+} interface uses define_types,dialogs,SysUtils; function ApplyPart( lFilename: string;lImgData: singleP; lBins,lVolVox,lSlices, lImgVol : integer; lTRsec: single): string; implementation type TPhysioT = RECORD Triggers,InterpolatedTriggers: integer; TriggerMedian,TriggerQ1,TriggerQ3: Double; TriggerRA: singleP; END; function SaveTriggersAs3ColumnFSL(lPhysioIn: TPhysioT; lOutName: string): boolean; var lF: textfile; lPos: integer; begin result := false; if (lPhysioIn.Triggers < 1) then exit; assignfile(lF,lOutName+'.txt'); Filemode := 0; rewrite(lF); for lPos := 1 to lPhysioIn.Triggers do Writeln(lf,realtostr(lPhysioIn.TriggerRA^[lPos],3)+' 1 1'); closefile(lF); Filemode := 2; result := true; end; procedure qsort(lower, upper : integer; var Data:SingleP); //40ms - fast but very recursive... var left, right : integer; pivot,lswap: single; begin pivot:=Data^[(lower+upper) div 2]; left:=lower; right:=upper; while left<=right do begin while Data^[left] < pivot do left:=left+1; { Parting for left } while Data^[right] > pivot do right:=right-1;{ Parting for right} if left<=right then begin { Validate the change } lswap := Data^[left]; Data^[left] := Data^[right]; Data^[right] := lswap; left:=left+1; right:=right-1; end; //validate end;//while left <=right if right>lower then qsort(lower,right,Data); { Sort the LEFT part } if upper>left then qsort(left ,upper,data); { Sort the RIGHT part } end; procedure QuartileTriggerSpacing(var lPhysio: TPhysioT); var lTriggerDelayRA: singleP; lPos: integer; begin lPhysio.TriggerQ1 := 0; lPhysio.TriggerMedian := 0; lPhysio.TriggerQ3 := 0; if lPhysio.Triggers < 4 then exit; getmem(lTriggerDelayRA,(lPhysio.Triggers-1)*sizeof(single)); for lPos := 1 to (lPhysio.Triggers-1) do lTriggerDelayRA^[lPos] := abs(lPhysio.TriggerRA^[lPos]-lPhysio.TriggerRA^[lPos+1]); qsort(1,lPhysio.Triggers-1,lTriggerDelayRA);//-1 : fence post vs wire lPos := lPhysio.Triggers div 2; lPhysio.TriggerMedian := lTriggerDelayRA^[lPos]; lPos := lPhysio.Triggers div 4; lPhysio.TriggerQ1 := lTriggerDelayRA^[lPos]; lPos := round(0.75*lPhysio.Triggers ); lPhysio.TriggerQ3 := lTriggerDelayRA^[lPos]; freemem(lTriggerDelayRA); end; function PARTool (var lPhysio: TPhysioT; lImgData: singleP; lTRsec: single; lnVolVox,lnSlices, lImgVol, lBinIn : integer): string; const kMinSamplesPerBin = 4; var lV,lSliceTime,lMeanSignal,lOnsetTime,lBinWidth,lBinMin,lBinMax,lTimeSinceTrigger,lPrevTriggerTime: double; lSlice,lSlicePos,lnSliceVox,lnSlicePos,lVoxel,lBin,lSample,lnBin,lnBinDiv2,lNextTrigger,lSamplesWithVariance,lCorrectedSamples,lVolOffset: integer; lBinCountRA,lVolBinRA: longintp; lVariance : boolean; lBinEstimateRA: doublep; begin result := ''; if (lPhysio.Triggers < 4) or (lnVolVox < 4) or (lImgVol < 4) then begin showmessage('PART requires at least 4 triggers and at least 4 volumes each with at least 4 voxels'); exit; end; if (lBinIn < 4) then begin showmessage('PART requires at least 4 data bins'); exit; end; lnSliceVox := lnVolVox div lnSlices; if (lnVolVox mod lnSlices) <> 0 then begin showmessage('PART requires volvox to be evenly divisible by number of slices.'); exit; end; lSamplesWithVariance := 0; lCorrectedSamples := 0; QuartileTriggerSpacing(lPhysio); //find number bin range - this is median-1.5IQR..median+1.5IQR lBinMin := -lPhysio.TriggerMedian/2-(abs(lPhysio.TriggerQ1-lPhysio.TriggerQ3)*0.75); lBinMax := +lPhysio.TriggerMedian/2+abs(lPhysio.TriggerQ1-lPhysio.TriggerQ3)*0.75; //next - create bins lnBin := lBinIn; //could adjust number of bins and return here wth a label lBinWidth := abs((lBinMax-lBinMin)/(lnBin-1));//lnBin-1: fenceposts vs wire lnBinDiv2 := (lnBin div 2)+1; getmem(lBinCountRA,lnBin*sizeof(integer)); getmem(lBinEstimateRA,lnBin*sizeof(double)); getmem(lVolBinRA,lImgVol*sizeof(integer)); lVoxel := 0; for lSlice := 1 to lnSlices do begin //adjust slices so slice 1 occurs at 0, slice 2 at 1/nslices... lSliceTime := ((lSlice-1)/lnSlices)-1; //-1 as 1st volume starts at zero, not 1 //do next step for each slice - different slices have different bin distributions due to different slicetime //next count number of samples in each bin for lBin := 1 to lnBin do lBinCountRA^[lBin] := 0; lPrevTriggerTime := -MaxInt; lNextTrigger := 1; for lSample := 1 to lImgVol do begin //for each sample, find nearest trigger lOnsetTime := lSample+lSliceTime; if lOnsetTime > lPhysio.TriggerRA^[lNextTrigger] then begin while (lNextTrigger <= lPhysio.Triggers ) and (lOnsetTime > lPhysio.TriggerRA^[lNextTrigger]) do begin lPrevTriggerTime := lPhysio.TriggerRA^[lNextTrigger]; inc(lNextTrigger); end; //while end;//if onset > lTimeSinceTrigger := lOnsetTime-lPrevTriggerTime; if lTimeSinceTrigger > abs(lPhysio.TriggerRA^[lNextTrigger]-lOnsetTime) then lTimeSinceTrigger := -abs(lPhysio.TriggerRA^[lNextTrigger]-lOnsetTime);//use abs in case we are past final trigger //now compute bin... //inc(lCorrectedSamples); if (lTimeSinceTrigger > lBinMin) and (lTimeSinceTrigger < lBinMax) then begin lBin := round( (lTimeSinceTrigger)/ lBinWidth)+lnBinDiv2; lVolBinRA^[lSample] := lBin; if (lBin < 1) or (lBin > lnBin) then fx(-661,lBin,lTimeSinceTrigger) else inc(lBinCountRA^[lBin]); end else lVolBinRA^[lSample] := 0; end; //for each volume for lSlicePos := 1 to lnSliceVox do begin inc(lVoxel); //first - only correct voxels with variability - do not waste time outside brain lVolOffset := lVoxel; lVariance := false; lSample := 1; lV := lImgData^[lVolOffset]; while (not lVariance) and (lSample <= lImgVol) do begin if lV <> lImgData^[lVolOffset] then lVariance := true; inc(lSample); lVolOffset := lVolOffset+lnVolVox; end; //while no variance if lVariance then begin //voxel intensity varies accross time - attempt to remove artifact lSamplesWithVariance := lSamplesWithVariance +lImgVol; //1st - sum effects for lBin := 1 to lnBin do lBinEstimateRA^[lBin] := 0; lMeanSignal := 0; lVolOffset := lVoxel; for lSample := 1 to lImgVol do begin lMeanSignal := lImgData^[lVolOffset] + lMeanSignal; lBin := lVolBinRA^[lSample]; if (lBin > 0) and (lBinCountRA^[lBin] > kMinSamplesPerBin) then lBinEstimateRA^[lBin] := lBinEstimateRA^[lBin]+ lImgData^[lVolOffset]; lVolOffset := lVolOffset+lnVolVox; end; //for each volume lMeanSignal := lMeanSignal /lImgVol; //next compute correction... average signal in bin - average voxel intensity irrelevant of bin for lBin := 1 to lnBin do if lBinCountRA^[lBin] > kMinSamplesPerBin then lBinEstimateRA^[lBin] := (lBinEstimateRA^[lBin]/lBinCountRA^[lBin])-lMeanSignal; //lBinEstimateRA[lBin] := lBinEstimateRA[lBin]-lBinMeanCount; //next apply correction - inner loop complete for each voxel! lVolOffset := lVoxel; for lSample := 1 to lImgVol do begin //for each sample, find nearest trigger lBin := lVolBinRA^[lSample]; if (lBin > 0) and (lBinCountRA^[lBin] > kMinSamplesPerBin) then begin lImgData^[lVolOffset] := (lImgData^[lVolOffset]-lBinEstimateRA^[lBin]); inc(lCorrectedSamples) end; lVolOffset := lVolOffset+lnVolVox; end; //for each volume end; //if variance end;//for each voxel in slice end; //for slice //**INNER LOOP end - //next - report results result :=' Time per vol (TR) [sec] '+realtostr(lTRsec,4)+kCR; result :=result +' fMRI Volumes '+inttostr(lImgVol)+kCR; result :=result +' Triggers n/First...Last [vol] '+realtostr(lPhysio.Triggers,0)+'/'+realtostr(lPhysio.TriggerRA^[1],2)+'...'+realtostr(lPhysio.TriggerRA^[lPhysio.Triggers],2)+kCR; if abs(lImgVol-lPhysio.TriggerRA^[lPhysio.Triggers]) > 10 then begin result :=result +'******* WARNING: Duration of fMRI session and duration of triggers is very different *******'; result :=result +'******* Please ensure specified TR is correct, files are correct and onset of fMRI was synchronized with physio data *******'; end; result := result + ' Q1/Median/Q2 [sec] '+realtostr(lTRsec*lPhysio.TriggerQ1,2)+'/'+realtostr(lTRsec*lPhysio.TriggerMedian,2)+'/'+realtostr(lTRsec*lPhysio.TriggerQ3,2)+kCR; result := result + ' Bin n/Range [sec] '+inttostr(lnBin)+'/'+realtostr(lTRsec*lBinMin,2)+ '...'+realtostr(lTRsec*lBinMax,2)+kCR; result := result+ ' voxels without variance (outside brain) %: '+realtostr(100*( (lnVolVox-(lSamplesWithVariance/lImgVol))/lnVolVox),2)+kCR; if lSamplesWithVariance > 0 then result := result+ ' voxels with variance which were corrected %: '+realtostr(100*(lCorrectedSamples/lSamplesWithVariance),2)+kCR; for lBin := 1 to lnBin do result := result+(' Bin '+inttostr(lBin)+ ' '+realtostr(lBin*lBinWidth+lBinMin ,2) +' '+inttostr(lBinCountRA^[lBin]) )+kCR; freemem(lBinCountRA); freemem(lBinEstimateRA); freemem(lVolBinRA); end; function StrVal (var lNumStr: string): integer; begin try result := strtoint(lNumStr); except on EConvertError do begin showmessage('StrVal Error - Unable to convert the string '+lNumStr+' to a number'); result := MaxInt; end; end; end; procedure AddSample(var lNumStr: string; var lnTotal,lnSample, lnTrigger: integer; var lPhysio: TPhysioT); var lVal: integer; begin lVal := StrVal(lNumStr); if lVal = 5003 then exit; lNumStr := ''; inc(lnTotal); if lnTotal < 5 then exit; if lVal > 4096 then begin if lVal <> 5000 then begin showmessage('Potentially serious error: unknown trigger type : '+inttostr(lVal)); end; inc(lnTrigger); if (lPhysio.Triggers <> 0) then lPhysio.TriggerRA^[lnTrigger] := lnSample; end else begin inc(lnSample); end; end; function AdjustStartPos (var lStr: string; var lStartPos: integer): boolean; //Some Siemens physio files appear to have nonsense characters befor real data<bh:ef><bh:bb><bh:bf>1 var lLen: integer; begin lLen := length(lStr); result := false; if (lLen-lStartPos)<2 then exit; result := true; repeat if lStr[lStartPos] in [ '0'..'9'] then exit; inc(lStartPos); until (lStartPos = lLen); result := false; end; procedure CountValidItems(var lStr: string; var lStartPos,lnSample, lnTrigger: integer; var lPhysio: TPhysioT); label 123; var lPos,lnTotal: integer; lNumStr: string; begin lnTotal:= 0; lnSample := 0; lnTrigger := 0; lNumStr := ''; if length(lStr)<2 then exit; if not AdjustStartPos ( lStr, lStartPos) then exit; //Oct 2009 for lPos := lStartPos to length(lStr) do begin if (lStr[lPos] = ' ') and (lNumStr <> '') then begin if lNumStr = '5003' then begin lNumStr := ''; goto 123; //end of recording end else AddSample(lNumStr, lnTotal,lnSample, lnTrigger, lPhysio); end else begin if lStr[lPos] in [ '0'..'9'] then lNumStr := lNumStr + lStr[lPos] else if lStr[lPos] in [' '] then else begin //Showmessage(lStr[lPos]); goto 123; end; end; end; //for length 123: if (lNumStr <> '') then AddSample(lNumStr, lnTotal,lnSample, lnTrigger, lPhysio); lStartPos := lPos; while (lStartPos < length(lStr)) and ( lStr[lStartPos] <> ' ') do begin inc(lStartPos); end; end; procedure CreatePhysio (var lPhysio: TPhysioT); begin lPhysio.Triggers := 0; end; procedure ClosePhysio (var lPhysio: TPhysioT); begin with lPhysio do begin if Triggers > 0 then freemem(TriggerRA); Triggers := 0; end; end; procedure InitPhysio(lnTrigger: integer; var lPhysio: TPhysioT); begin ClosePhysio (lPhysio); with lPhysio do begin Triggers := lnTrigger; InterpolatedTriggers := 0; if Triggers > 0 then getmem(TriggerRA,Triggers*sizeof(single)); end; end; function load3ColTxtPhysio (lFilename: string; var lPhysio: TPhysioT): boolean; var F: TextFile; lnTrigger: integer; lFloat,lFloat2,lFloat3: single; begin result := false; if not fileexists(lFilename) then exit; ClosePhysio(lPhysio); AssignFile(F, lFilename); FileMode := 0; //Set file access to read only //pass 1 - count number of triggers lnTrigger := 0; Reset(F); while not EOF(F) do begin {$I-} read(F,lFloat,lFloat2,lFloat3); //read triplets instead of readln: this should load UNIX files {$I+} if (ioresult = 0) and (lFloat > 0) then inc(lnTrigger); end; //pass 2 - load array InitPhysio(lnTrigger, lPhysio); lnTrigger := 0; Reset(F); while not EOF(F) do begin {$I-} read(F,lFloat,lFloat2,lFloat3); //read triplets instead of readln: this should load UNIX files {$I+} if (ioresult = 0) and (lFloat > 0) then begin inc(lnTrigger); lPhysio.TriggerRA^[lnTrigger] := lFloat; end; end; FileMode := 2; //Set file access to read/write CloseFile(F); result := true; end; procedure ReadlnX (var F: TextFile; var lResult: string); var lCh: char; begin lResult := ''; while not Eof(F) do begin Read(F, lCh); if (lCh in [#10,#13]) then begin if lResult <> '' then begin //Showmessage(lResult); exit; end; end else lResult := lResult + lCh; end; end; //ReadlnX function loadSiemensPhysio (lFilename: string; var lPhysio: TPhysioT): boolean; var F: TextFile; lStr: string; lPos,lnSample,lnTrigger: integer; begin result := false; if not fileexists(lFilename) then exit; ClosePhysio(lPhysio); AssignFile(F, lFilename); FileMode := 0; //Set file access to read only Reset(F); ReadlnX(F,lStr);//ColNames if length(lStr) < 1 then begin CloseFile(F); exit; end; //first pass - count items lPos := 1; CountValidItems(lStr,lPos,lnSample,lnTrigger,lPhysio); //second pass - load array if (lnSample < 1) and (lnTrigger < 1) then begin CloseFile(F); exit; end; //2nd pass... InitPhysio(lnTrigger, lPhysio); lPos := 1; CountValidItems(lStr,lPos,lnSample,lnTrigger,lPhysio); FileMode := 2; //Set file access to read/write CloseFile(F); result := true; end; function InterpolateGaps (var lPhysioIn: TPhysioT): boolean; //attempts to fill missing trigger pulses //you must call QuartileTriggerSpacing before this function! // it assumes q1/median/q3 are filled var lGap,l2Min,l2Max,l3Min,l3Max: double; lnReplace,lTrigger,lTrigger2: integer; lTempPhysio: TPhysioT; begin result := false; if (lPhysioIn.Triggers < 4) then begin showmessage('InterpolateGaps requires at least 4 triggers.'); exit; end; l2Min := 2*lPhysioIn.TriggerMedian-(abs(lPhysioIn.TriggerQ1-lPhysioIn.TriggerQ3)*1.5); l2Max := 2*lPhysioIn.TriggerMedian+(abs(lPhysioIn.TriggerQ1-lPhysioIn.TriggerQ3)*1.5); l3Min := 3*lPhysioIn.TriggerMedian-(abs(lPhysioIn.TriggerQ1-lPhysioIn.TriggerQ3)*1.5); l3Max := 3*lPhysioIn.TriggerMedian+(abs(lPhysioIn.TriggerQ1-lPhysioIn.TriggerQ3)*1.5); if l2Max > l3Min then exit; //variability too high to determine gaps lnReplace := 0; for lTrigger := 2 to lPhysioIn.Triggers do begin lGap := lPhysioIn.TriggerRA^[lTrigger] - lPhysioIn.TriggerRA^[lTrigger-1]; if (lGap > l2Min) and (lGap < l2Max) then inc(lnReplace); if (lGap > l3Min) and (lGap < l3Max) then inc(lnReplace,2); end; if lnReplace = 0 then begin result := true; exit; end; //create temp backup CreatePhysio(lTempPhysio); InitPhysio(lPhysioIn.Triggers, lTempPhysio); for lTrigger := 1 to lPhysioIn.Triggers do lTempPhysio.TriggerRA[lTrigger] := lPhysioIn.TriggerRA[lTrigger]; //create resized array InitPhysio(lTempPhysio.Triggers+lnReplace, lPhysioIn); //fill gaps lPhysioIn.TriggerRA[1] := lTempPhysio.TriggerRA[1]; lTrigger2 := 1; for lTrigger := 2 to lTempPhysio.Triggers do begin inc(lTrigger2); lGap := lTempPhysio.TriggerRA^[lTrigger] - lTempPhysio.TriggerRA^[lTrigger-1]; if ((lGap > l2Min) and (lGap < l2Max)) then begin //1 beat lPhysioIn.TriggerRA^[lTrigger2] := lTempPhysio.TriggerRA^[lTrigger-1]+(lgap / 2); inc(lTrigger2); end; if ((lGap > l3Min) and (lGap < l3Max)) then begin //2 beats lPhysioIn.TriggerRA^[lTrigger2] := lTempPhysio.TriggerRA^[lTrigger-1]+(lgap / 3); inc(lTrigger2); lPhysioIn.TriggerRA^[lTrigger2] := lTempPhysio.TriggerRA^[lTrigger-1]+(2*lgap / 3); inc(lTrigger2); end; lPhysioIn.TriggerRA^[lTrigger2] := lTempPhysio.TriggerRA^[lTrigger]; end; ClosePhysio (lTempPhysio); lPhysioIn.InterpolatedTriggers := lnReplace; result := true; end; function ScalePhysioToTime(lPhysio: TPhysioT; lSamplesPerUnit: single): boolean; var lScale: single; lTrigger: integer; begin result := false; if (lPhysio.Triggers < 4) then begin showmessage('ScalePhysioToTR requires at least 4 triggers.'); exit; end; if (lSamplesPerUnit <= 0) then begin showmessage('ScalePhysioToTime requires TR(sec) and samples/sec >0.'); exit; end; lScale := 1/(lSamplesPerUnit); //use reciprocal: mults faster than divides for lTrigger := 1 to lPhysio.Triggers do lPhysio.TriggerRA^[lTrigger] := lPhysio.TriggerRA^[lTrigger] * lScale; result := true; end; procedure EnsureAscending(lPhysio: TPhysioT); //check if order is correct - if not the sort... //an alternative is to always sort, but this method is faster and less resource intensive for sorted data var lPos: integer; begin if lPhysio.Triggers < 2 then exit; for lPos := 2 to lPhysio.Triggers do begin if lPhysio.TriggerRA^[lPos] < lPhysio.TriggerRA^[lPos-1] then begin showmessage('Warning: input times are not in ascending order - data will be sorted.'); qsort(1,lPhysio.Triggers,lPhysio.TriggerRA); //ensure trigger timings are in order... exit; end; end; end; function ApplyPart( lFilename: string;lImgData: singleP; lBins,lVolVox,lSlices, lImgVol : integer; lTRsec: single): string; var lPhysio: TPhysioT; begin result := ''; if not fileexists (lFilename) then exit; CreatePhysio(lPhysio); if UpCaseExt(lFilename) = '.TXT' then begin if not load3ColTxtPhysio(lFilename,lPhysio) then exit; end else if not loadSiemensPhysio(lFilename,lPhysio) then exit; EnsureAscending(lPhysio); QuartileTriggerSpacing(lPhysio); if not InterpolateGaps (lPhysio) then exit; if UpCaseExt(lFilename) <> '.TXT' then begin//export Siemens file as 3-column text ScalePhysioToTime(lPhysio,50); //50: siemens files use 50 Hz sampling -> convert to sec SaveTriggersAs3ColumnFSL(lPhysio,lFilename); //do this before TR conversion... end; ScalePhysioToTime(lPhysio,lTRsec); //Convert sec to volumes result := PARTool (lPhysio,lImgData,lTRsec,lVolVox,lSlices, lImgVol, lBins); ClosePhysio(lPhysio); end; end.
39.465827
185
0.597411
f1604f5845e3c92264aaa81a814504a45e41237e
322
pas
Pascal
WaitFormUnit.pas
winsys/ms
d35137fd1f0a5142e03c47345cdb81509b6d96e5
[ "MIT" ]
null
null
null
WaitFormUnit.pas
winsys/ms
d35137fd1f0a5142e03c47345cdb81509b6d96e5
[ "MIT" ]
null
null
null
WaitFormUnit.pas
winsys/ms
d35137fd1f0a5142e03c47345cdb81509b6d96e5
[ "MIT" ]
null
null
null
unit WaitFormUnit; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TWaitForm = class(TForm) Label1: TLabel; private { Private declarations } public { Public declarations } end; var WaitForm: TWaitForm; implementation {$R *.DFM} end.
12.384615
75
0.695652
f15eb323b0aa30282449a0d96350c19f1a69cf1d
12,604
dfm
Pascal
fontes/interface/FTelaCompra.dfm
anderson-81/sge-monografia-2007
78ecf9767e35e4d096bbc725001a96ab59818b36
[ "MIT" ]
2
2019-10-20T07:25:17.000Z
2019-11-09T04:17:16.000Z
fontes/interface/FTelaCompra.dfm
anderson-81/sge-monografia-2007
78ecf9767e35e4d096bbc725001a96ab59818b36
[ "MIT" ]
null
null
null
fontes/interface/FTelaCompra.dfm
anderson-81/sge-monografia-2007
78ecf9767e35e4d096bbc725001a96ab59818b36
[ "MIT" ]
1
2019-11-09T04:17:17.000Z
2019-11-09T04:17:17.000Z
object FrmTelaCompra: TFrmTelaCompra Left = 324 Top = 135 Width = 474 Height = 543 BorderStyle = bsSizeToolWin Caption = 'Compra' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False Position = poDesktopCenter OnClose = FormClose OnCloseQuery = FormCloseQuery OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object Venda: TLabel Left = 8 Top = 8 Width = 74 Height = 24 Caption = 'Compra' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -21 Font.Name = 'MS Sans Serif' Font.Style = [fsBold] ParentFont = False end object GroupBox1: TGroupBox Left = 8 Top = 32 Width = 450 Height = 97 Caption = 'Dados sobre Fornecedor' TabOrder = 0 object Label1: TLabel Left = 24 Top = 24 Width = 23 Height = 13 Caption = 'CPF:' end object Label2: TLabel Left = 24 Top = 64 Width = 66 Height = 13 Caption = 'Raz'#227'o Social:' end object Edit1: TEdit Left = 96 Top = 60 Width = 300 Height = 21 Color = clInactiveBorder ReadOnly = True TabOrder = 0 OnEnter = Edit1Enter end object MaskEdit1: TMaskEdit Left = 96 Top = 20 Width = 300 Height = 21 Color = clInactiveBorder ReadOnly = True TabOrder = 1 OnEnter = MaskEdit1Enter end end object GroupBox2: TGroupBox Left = 8 Top = 136 Width = 450 Height = 289 Caption = 'Dados sobre Compra' TabOrder = 1 object Label3: TLabel Left = 16 Top = 224 Width = 93 Height = 20 Caption = 'Valor Total:' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -16 Font.Name = 'MS Sans Serif' Font.Style = [fsBold] ParentFont = False end object DBGrid1: TDBGrid Left = 16 Top = 24 Width = 420 Height = 185 Options = [dgTitles, dgColLines, dgRowLines, dgTabs, dgRowSelect] ReadOnly = True TabOrder = 0 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [] OnColEnter = DBGrid1ColEnter Columns = < item Expanded = False Title.Caption = 'C'#243'digo' Width = 40 Visible = True end item Expanded = False Title.Caption = 'Nome' Width = 140 Visible = True end item Expanded = False Title.Caption = 'Qtd./Peso' Width = 60 Visible = True end item Expanded = False Title.Caption = 'Qtd./Unit' Width = 60 Visible = True end item Expanded = False Title.Caption = 'Valor Pago (R$)' Width = 87 Visible = True end> end object BitBtn1: TBitBtn Left = 254 Top = 240 Width = 90 Height = 40 Caption = 'Excluir' TabOrder = 1 OnClick = BitBtn1Click Glyph.Data = { 36030000424D3603000000000000360000002800000010000000100000000100 1800000000000003000000000000000000000000000000000000FFFFF7F7F7F7 FFFFF7FFFFFFFFFFFFF7F7F7FFF7F7F7F7F7FFFFF7F7F7F7FFFFF7F7F7F7F7FF F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFFFFF9CA584DEDEDEFFFFF7F7F7FFF7 F7F7F7F7F7F7F7F7F7F7FFF7F7F7FFFFFFFFFFF7F7F7FFF7F7F7FFF7F7FFFFFF 846BDE0800E7211052FFFFFFF7FFF7F7F7F7FFF7F7F7F7F7F7FFF7FFFFFF634A BD0000B5FFFFFFF7F7F7F7F7FFFFFFF7DED6F70000D61800C6ADB594FFFFFFF7 F7F7F7F7FFF7F7F7FFFFFF634ABD0000CEDEDEEFFFFFFFF7F7F7F7FFF7F7F7F7 FFFFF7DED6F70000DE100084EFF7D6FFFFFFF7FFF7FFFFFF5231CE0000C6F7F7 EFFFFFFFFFFFF7F7F7F7F7F7FFF7F7F7F7F7FFFFFFF7DED6F70000DE181063EF F7DEFFFFFF4A31CE0000CEEFEFE7FFFFFFF7F7F7F7F7FFF7F7F7FFF7F7F7F7F7 F7FFF7F7F7F7FFFFF7DED6F70000DE29295A6342DE0000CEEFEFE7FFFFFFFFF7 F7F7F7F7F7FFF7F7F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFFFFFF7EFEFFF10 00DE1000D6C6C6ADFFFFFFF7F7F7F7F7FFF7F7F7F7F7F7F7F7F7FFFFF7F7F7F7 FFFFF7F7F7F7F7FFF7FFFFFF5231D61800CE2100DE180873EFEFCEFFFFFFF7FF F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7F7F7FFF7F7F7FFFFFF4A31CE0000CEEF EFE7F7F7FF4218E708009CADAD8CFFFFFFF7F7F7F7F7FFF7F7F7FFF7F7F7F7F7 F7FFF7FFFFFF5231CE0000D6E7E7E7FFFFFFFFFFF7FFFFFF5A39E70000BD6B6B 6BFFFFFFF7FFF7F7F7F7F7F7FFF7F7F7FFFFFF4A29CE0800DE634AC6FFFFFFF7 F7F7F7F7FFF7F7F7FFFFFFDED6F70000DE9C94ADFFFFFFF7F7F7F7FFF7FFFFF7 5231DE0800D6634AC6FFFFFFFFF7F7F7F7F7F7FFF7F7F7F7FFF7F7F7FFF7FFFF F7FFFFFFFFFFF7F7F7F7F7F7FFFFFFF70800DE5231D6FFFFFFF7F7F7F7F7FFF7 F7F7F7F7FFF7F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFF7F7F7FFF7F7F7F7F7 FFFFF7FFFFFFFFF7F7F7F7F7F7FFF7F7F7F7FFF7F7F7F7F7F7FFF7F7F7F7FFF7 F7F7F7F7F7FFF7F7F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFF7F7F7F7F7F7F7 F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFF7F7F7F7F7F7F7F7F7} end object BitBtn2: TBitBtn Left = 345 Top = 240 Width = 90 Height = 40 Caption = '&Selecionar' TabOrder = 2 OnClick = BitBtn2Click Glyph.Data = { 36030000424D3603000000000000360000002800000010000000100000000100 1800000000000003000000000000000000000000000000000000DAEBEED0E0E3 B7C6C9B5C4C7B5C4C7B5C4C7B5C4C7B5C4C7B5C4C7B5C4C7B5C4C7B5C4C7B5C4 C7B5C4C7B5C4C7BFCFD1E2F4F77780821613124F4D4D535B5B535B5B535B5B53 5B5B535B5B535B5B535B5B535B5B535B5B4F5353545252000000E2F4F7747E80 9A9999FFFFFFAC4646B65959B65959B65959B65959B65959B65959B65959B251 51D99F9FFFFFFF1D1D1DE2F4F7747E80919191FFFFFFF5EBEBF8F2F2F8F2F2F8 F2F2F8F2F2F8F2F2F8F2F2F8F2F2F4EAEAF4E9E9FFFFFF1A1A1AE2F4F7768284 857979FFFFFF6000006C00006C00006C00006C00006C00006C00006A00007E00 00F7EFEFFFF3F3181818E2F4F77D9194380000730000BF7F7FB97272B97272B9 7272B97272B97272B97272B97272B97272962D2D7C00000A0000E2F4F77D9194 380000730000BF7F7FB97272B97272B97272B97272B97272B97272B97272B972 72962D2D7C00000A0000E2F4F7768284847979FFFFFF6000006C00006C00006C 00006C00006C00006C00006A00007E0000F7EFEFFFF3F3181818E2F4F7747E80 919191FFFFFFF5EBEBF8F2F2F8F2F2F8F2F2F8F2F2F8F2F2F8F2F2F8F2F2F4EA EAF4E9E9FFFFFF1A1A1AE9FCFF7E898B9A9999FFFFFFAC4646B65959B65959B6 5959B65959B65959B65959B65959B25151D99F9FFFFFFF1D1D1DA5B4B8080B0C 1B1B1B4B4B4B4F59594F59594F59594F59594F59594F59594F5959646D6D535B 5B4F53535452520404049CAAAEDFDEDDDADDDDD5D8D8D5D8D8D5D8D8D5D8D8D5 D8D8D5D8D8D5D8D8E8E9E9000000BFD1D4BBCBCEC6D6D9111313A5B4B8FFFDFD EDD4D4EFD8D8EFD8D8EFD8D8EFD8D8EFD8D8EFD8D8EDD4D4FFFFFF050606FFFF FF627074CCDDE11B1D1DA8B9BDEDC8C7A44140AA4C4CAA4C4CAA4C4CAA4C4CAA 4C4CAA4C4CA44140FDD8D8090C0CFFFFFF4B4848CCD8DA1E212196A4A8C0CDCF C2D5D7C2D5D7C2D5D7C2D5D7C2D5D7C2D5D7C2D5D7C2D5D7D0DEE00000005553 535E5C5B515454000000D0E1E4CCDEE1CCDEE1CCDEE1CCDEE1CCDEE1CCDEE1CC DEE1CCDEE1CCDEE1CFE1E4C2D1D4B4C4C6B5C4C7B6C5C8C0CFD2} end object CurrencyEdit1: TCurrencyEdit Left = 16 Top = 248 Width = 150 Height = 32 Color = clInactiveBorder Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -21 Font.Name = 'MS Sans Serif' Font.Style = [fsBold] ParentFont = False ReadOnly = True TabOrder = 3 OnEnter = CurrencyEdit1Enter end object Edit2: TEdit Left = 120 Top = 216 Width = 121 Height = 21 TabOrder = 4 Visible = False end end object GroupBox3: TGroupBox Left = 8 Top = 432 Width = 450 Height = 73 Caption = 'Opera'#231#245'es' TabOrder = 2 object BitBtn3: TBitBtn Left = 232 Top = 24 Width = 150 Height = 30 Hint = 'Confirma a realiza'#231#227'o de uma venda.' Caption = 'C&onfirmar' TabOrder = 0 OnClick = BitBtn3Click Glyph.Data = { 36030000424D3603000000000000360000002800000010000000100000000100 1800000000000003000000000000000000000000000000000000FFFFF7FFF7FF 004A00182118FFFFFFFFFFFFFFFFF7F7F7F7FFFFF7F7F7F7FFFFF7F7F7F7F7FF F7F7F7F7FFF7F7F7F7F7F7F7F7FFF7FF004A00006B00293929081808FFFFFFFF FFF7F7F7FFF7F7F7F7F7FFF7F7F7F7F7FFF7F7F7F7F7FFF7F7F7FFFFF7FFEFFF 005200089418007300085A08081800FFFFFFFFFFFFF7F7F7F7FFF7F7F7F7FFF7 F7F7F7F7F7FFF7F7F7F7F7F7FFFFEFFF00520010A52110A52900840808630821 3121081008FFFFFFF7F7FFF7F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7FFF7FFEFFF 005A0010A53118B53110AD29089410006B00186308001800FFFFFFF7F7F7FFFF F7F7F7F7FFFFF7F7F7F7F7F7FFFFEFFF00520021AD3921B54218B52910A53108 9C10007308086300001008FFFFFFFFFFFFF7F7F7F7F7FFF7F7F7FFFFF7FFEFFF 005A0018AD4229C65218B54218B53110AD2910A518008C08006B001831211010 08FFFFFFFFFFF7F7F7F7F7F7FFFFEFFF00520029B54A29BD5A21BD4A18B54218 B52910A52908A518009410007300105A08081808FFF7FFFFF7F7FFFFF7FFEFFF 005A0021B54A31CE6329BD5A21C65218B54218B53110AD2908A518007B00004A 00001008FFFFFFF7F7F7F7F7F7FFEFFF00520029BD5231C66331CE5A29BD5A21 BD4A21B54210A521005200002900FFF7FFFFFFFFF7F7F7F7F7F7FFFFF7FFEFFF 005A0029BD5239D66B29C66331CE6329BD52109429003100FFF7FFFFFFFFFFFF F7F7F7F7F7FFF7F7F7F7F7F7FFFFEFFF00520039C65A39D67B39CE6321B55210 8410002900FFFFFFF7F7F7F7F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7FFF7FFEFFF 005A0039C66B42DE7321AD42005A00002100FFFFFFF7F7F7FFF7F7F7F7F7FFFF F7F7F7F7FFFFF7F7F7F7F7F7FFFFEFFF005A0039C65A188C29003100FFEFFFFF FFFFF7F7FFF7F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFF7F7F7FFFFF7FFEFFF 004A00087310002900FFFFFFF7FFF7F7F7F7FFF7F7F7F7F7F7FFF7F7F7F7FFF7 F7F7F7F7F7FFF7F7F7F7F7F7FFFFEFFF004A00003900FFFFFFF7FFF7F7F7F7F7 F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7FFF7F7F7F7F7F7F7F7F7} end object BitBtn4: TBitBtn Left = 80 Top = 24 Width = 150 Height = 30 Hint = 'Cancela a Realiza'#231#227'o de uma Venda.' Caption = '&Cancelar' ParentShowHint = False ShowHint = True TabOrder = 1 OnClick = BitBtn4Click Glyph.Data = { 36030000424D3603000000000000360000002800000010000000100000000100 1800000000000003000000000000000000000000000000000000FFFFF7F7F7F7 FFFFF7F7F7F7FFFFF7FFFFFFE7E7D6B5B5A5BDBDADADADA5FFFFFFFFFFFFF7FF F7F7F7F7FFF7F7F7F7F7F7F7F7F7F7F7F7F7FFFFFFF7DEDEE7A5A5C618219410 29B51021AD213194212973BDBDA5FFFFFFFFFFF7F7F7FFF7F7F7FFF7F7F7F7F7 FFFFF7E7E7E70018B50010EF1029F70829F71029F70821F70821DE0010A53139 5AE7E7E7FFFFFFF7F7F7F7F7FFFFFFF7E7E7E70008DE0821F70821EF0010EF00 10EF0008F70018EF1029F71029F70008BD313963DEDEE7FFFFF7F7FFF7FFFFF7 3952EF0021EF0021EF425AF7E7E7F7FFFFF7FFFFF79CADF70018EF1029EF1031 FF0010AD848C84FFFFFFFFFFFF8494EF0010EF0821EF2942F7FFFFF7FFF7FFF7 F7F7FFFFFF5A6BDE0818F71029EF1029F70821EF182973E7E7DEFFFFF70008EF 1029EF0018DEFFFFF7F7F7F7F7FFF7FFFFFF394ADE0018F70821EF0829EF1029 EF0829F71829B5B5B5B5D6D6F70010EF0018F78C9CDEFFFFFFF7F7F7FFFFFF31 4ADE0018F70018EF394AF7FFFFF70018F71029F70008C6BDBDB58494EF0018EF 0821EF8494D6FFFFF7FFFFFF394ADE0018F70021EF394AEFFFFFF7FFFFF71839 EF0821F70008C6B5BDB5D6D6F70018EF1021F70008A5FFFFFF394AE70018F700 18EF394AF7FFFFF7F7F7FFFFFFF70018EF0821EF1829CEE7E7D6FFFFF70000EF 1029EF0818D61029D60021F70018EF394AEFFFFFF7F7F7F7FFFFF794A5F70018 EF0821F75A6BBDFFFFFFFFFFFF949CEF0018EF1029EF1021F70821EF5263FFFF FFF7FFFFFFFFFFFFDEDEEF0010E70821F70018EFE7E7E7FFFFF7F7FFF7FFFFF7 0000EF1029EF1029EF0829F700109C8494C68C94D60010BD0010E70821EF0010 EF6B7BBDFFFFFFF7F7F7F7F7FFFFFFF7DEDEF70000EF0018EF1029EF1021F700 21EF0018F71029EF0818F70008EFD6DEF7FFFFF7F7F7FFF7F7F7FFF7F7F7F7F7 FFFFF7FFFFF7949CF70008EF0018EF0018EF0821EF0000EF4A63EFE7E7F7FFFF F7F7F7F7F7FFF7F7F7F7F7F7FFF7F7F7F7F7F7F7F7F7FFFFFFFFFFF7CED6F78C 94EF848CF7FFFFF7FFFFF7FFFFF7F7F7FFF7F7F7F7F7F7F7F7F7} end end object Edit3: TEdit Left = 336 Top = 8 Width = 121 Height = 21 TabOrder = 3 Visible = False end object Edit4: TEdit Left = 208 Top = 8 Width = 121 Height = 21 TabOrder = 4 Visible = False end end
37.070588
72
0.74524
830c176a3ed04b2aa38b4fdd2f043bee5ccce4cb
1,067
pas
Pascal
Controller/Menus.Controller.ListBox.Produtos.pas
brendolan/MenusEmMVC
5836a3843e48413f4d2c643f75c1fa2757b96fb8
[ "MIT" ]
null
null
null
Controller/Menus.Controller.ListBox.Produtos.pas
brendolan/MenusEmMVC
5836a3843e48413f4d2c643f75c1fa2757b96fb8
[ "MIT" ]
null
null
null
Controller/Menus.Controller.ListBox.Produtos.pas
brendolan/MenusEmMVC
5836a3843e48413f4d2c643f75c1fa2757b96fb8
[ "MIT" ]
null
null
null
unit Menus.Controller.ListBox.Produtos; interface uses Menus.Controller.Interfaces, System.Classes; type TControllerListBoxProdutos = class(TInterfacedObject, IControllerListBoxMenu) private FContainer: TComponent; public constructor Create(Container: TComponent); destructor Destroy; override; procedure Exibir; class function New(Container: TComponent): IControllerListBoxMenu; end; implementation { TControllerListBoxProdutos } uses Menus.Controller.ListBox.Factory, Menus.Controller.ListBox.Itens.Factory; constructor TControllerListBoxProdutos.Create(Container: TComponent); begin FContainer := Container; end; destructor TControllerListBoxProdutos.Destroy; begin inherited; end; procedure TControllerListBoxProdutos.Exibir; begin TControllerListBoxFactory.New .Default(FContainer) .AddItem(TControllerListBoxItensFactory.New.Cliente.Show) .Exibir; end; class function TControllerListBoxProdutos.New(Container: TComponent): IControllerListBoxMenu; begin Result := Self.Create(Container); end; end.
20.519231
93
0.800375
f14dad92fec6ed6ee41ce14bdcaf3a21e8ac38bb
13,998
pas
Pascal
Source/Lollipop.Framework.pas
CWBudde/LollipopMathTasks
848ecead94a2d63674caf3d8d0ac07cb5b942c81
[ "Apache-2.0" ]
1
2020-04-18T22:12:38.000Z
2020-04-18T22:12:38.000Z
Source/Lollipop.Framework.pas
CWBudde/LollipopMathTasks
848ecead94a2d63674caf3d8d0ac07cb5b942c81
[ "Apache-2.0" ]
null
null
null
Source/Lollipop.Framework.pas
CWBudde/LollipopMathTasks
848ecead94a2d63674caf3d8d0ac07cb5b942c81
[ "Apache-2.0" ]
null
null
null
unit Lollipop.Framework; interface uses W3C.DOM4, W3C.HTML5, W3C.Canvas2DContext, W3C.CSSOM, W3C.SVG2; type TVector2i = record X: Integer; Y: Integer; class function Create(const X, Y: Integer): TVector2i; static; end; TVector2f = record X: Float; Y: Float; class function Create(const X, Y: Float): TVector2f; static; end; IHtmlElementOwner = interface function GetHtmlElement: JHTMLElement; property HtmlElement: JHTMLElement read GetHtmlElement; end; THtmlElement = class; THtmlElementClass = class of THtmlElement; THtmlElement = class(IHtmlElementOwner) private function GetVisible: Boolean; procedure SetName(Value: String); procedure SetVisible(Value: Boolean); protected FOwner: IHtmlElementOwner; FName: String; FElement: JHTMLElement; class var Counter: Integer; function GetHtmlElement: JHTMLElement; class function ElementName: String; virtual; abstract; procedure NameChanged; virtual; procedure AfterConstructor; virtual; empty; property Element: JHTMLElement read FElement; public constructor Create(Owner: IHtmlElementOwner); overload; virtual; constructor Create(Element: JHTMLElement); overload; virtual; destructor Destroy; override; property Name: String read FName write SetName; property Visible: Boolean read GetVisible write SetVisible; property Style: JCSS2Properties read (JCSS2Properties(Element.Style)); property Owner: IHtmlElementOwner read FOwner; end; TDivElement = class(THtmlElement) protected class function ElementName: String; override; public property DivElement: JHTMLDivElement read (JHTMLDivElement(Element)); end; TButtonElement = class(THtmlElement) protected FTextNode: JText; class function ElementName: String; override; public constructor Create(Owner: IHtmlElementOwner); overload; override; property ButtonElement: JHTMLButtonElement read (JHTMLButtonElement(Element)); property Text: string read (FTextNode.Data) write (FTextNode.Data); end; TParagraphElement = class(THtmlElement) private FTextNode: JText; protected class function ElementName: String; override; public constructor Create(Owner: IHtmlElementOwner); overload; override; property ParagraphElement: JHTMLParagraphElement read (JHTMLParagraphElement(Element)); property Text: string read (FTextNode.Data) write (FTextNode.Data); end; TLinkElement = class(THtmlElement) private FTextNode: JText; protected class function ElementName: String; override; public constructor Create(Owner: IHtmlElementOwner); overload; override; property LinkElement: JHTMLLinkElement read (JHTMLLinkElement(Element)); property Text: string read (FTextNode.Data) write (FTextNode.Data); end; TCustomHeadingElement = class(THtmlElement) private FTextNode: JText; public constructor Create(Owner: IHtmlElementOwner); overload; override; property HeadingElement: JHTMLHeadingElement read (JHTMLHeadingElement(Element)); property Text: string read (FTextNode.Data) write (FTextNode.Data); end; TH1Element = class(TCustomHeadingElement) protected class function ElementName: String; override; end; TH2Element = class(TCustomHeadingElement) protected class function ElementName: String; override; end; TH3Element = class(TCustomHeadingElement) protected class function ElementName: String; override; end; TH4Element = class(TCustomHeadingElement) protected class function ElementName: String; override; end; TH5Element = class(TCustomHeadingElement) protected class function ElementName: String; override; end; TH6Element = class(TCustomHeadingElement) protected class function ElementName: String; override; end; TImageElement = class(THtmlElement) protected class function ElementName: String; override; public property ImageElement: JHTMLImageElement read (JHTMLImageElement(Element)); end; TInputElement = class(THtmlElement) protected class function ElementName: String; override; public property InputElement: JHTMLInputElement read (JHTMLInputElement(Element)); property Value: string read (InputElement.Value) write (InputElement.Value); end; TInputTextElement = class(TInputElement) public constructor Create(Owner: IHtmlElementOwner); overload; override; property Placeholder: String read (InputElement.Placeholder) write (InputElement.Placeholder); end; TInputPasswordElement = class(TInputElement) public constructor Create(Owner: IHtmlElementOwner); overload; override; property Placeholder: String read (InputElement.Placeholder) write (InputElement.Placeholder); end; TInputRadioElement = class(TInputElement) public constructor Create(Owner: IHtmlElementOwner); overload; override; end; TInputCheckBoxElement = class(TInputElement) public constructor Create(Owner: IHtmlElementOwner); overload; override; end; TInputRangeElement = class(TInputElement) public constructor Create(Owner: IHtmlElementOwner); overload; override; end; TFieldSetElement = class(THtmlElement) protected class function ElementName: String; override; end; TLabelElement = class(THtmlElement) private FTextNode: JText; protected class function ElementName: String; override; public constructor Create(Owner: IHtmlElementOwner); overload; override; property LabelElement: JHTMLLabelElement read (JHTMLLabelElement(Element)); property Text: string read (FTextNode.Data) write (FTextNode.Data); end; TCanvasElement = class(THtmlElement) protected class function ElementName: String; override; public property CanvasElement: JHTMLCanvasElement read (JHTMLCanvasElement(Element)); end; TCanvas2DElement = class(TCanvasElement) private FContext: JCanvasRenderingContext2D; public constructor Create(Owner: IHtmlElementOwner); overload; override; property Context: JCanvasRenderingContext2D read FContext; end; TSvgElement = class(THtmlElement) protected class function ElementName: String; override; public constructor Create(Owner: IHtmlElementOwner); overload; override; property SvgElement: JSvgSvgElement read (JSvgSvgElement(Element)); end; TApplication = class(IHtmlElementOwner) private FElements: array of THtmlElement; function GetHtmlElement: JHTMLElement; public constructor Create; destructor Destroy; override; procedure DeviceReady; virtual; procedure Pause; virtual; empty; procedure Resume; virtual; empty; function CreateElement(HtmlElementClass: THtmlElementClass): THtmlElement; procedure Run; empty; end; var Application: TApplication; CordovaAvailable: Boolean; implementation uses WHATWG.Console, W3C.CSSOM, Cordova.StatusBar; { TVector2i } class function TVector2i.Create(const X, Y: Integer): TVector2i; begin Result.X := X; Result.Y := Y; end; { TVector2f } class function TVector2f.Create(const X, Y: Float): TVector2f; begin Result.X := X; Result.Y := Y; end; { THtmlElement } constructor THtmlElement.Create(Owner: IHtmlElementOwner); var Classes: String; begin FOwner := Owner; FElement := JHTMLElement(Document.createElement(ElementName)); Owner.HtmlElement.appendChild(FElement); Classes := ClassName; var ParentClass := ClassParent; while Assigned(ParentClass) do begin if ParentClass.ClassName = 'TObject' then break; Classes += ' ' + ParentClass.ClassName; ParentClass := ParentClass.ClassParent; end; // specify element class FElement.setAttribute('class', Classes); Inc(Counter); FName := ElementName + IntToStr(Counter); // call after constructor AfterConstructor; end; constructor THtmlElement.Create(Element: JHTMLElement); begin FOwner := nil; FElement := Element; Inc(Counter); FName := ElementName + IntToStr(Counter); // call after constructor AfterConstructor; end; destructor THtmlElement.Destroy; begin //BeforeDestructor; FOwner.HtmlElement.removeChild(FElement); inherited; end; function THtmlElement.GetHtmlElement: JHTMLElement; begin Result := FElement; end; function THtmlElement.GetVisible: Boolean; begin Result := Element.style.getPropertyValue('visibility') = 'visible'; end; procedure THtmlElement.SetName(Value: String); begin if Name <> Value then begin FName := Value; NameChanged; end; end; procedure THtmlElement.SetVisible(Value: Boolean); begin Element.style.setProperty('visibility', if Value then 'visible' else 'hidden'); end; procedure THtmlElement.NameChanged; begin FElement.id := Name; end; { TDivElement } class function TDivElement.ElementName: String; begin Result := 'div'; end; { TButtonElement } constructor TButtonElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); FTextNode := Document.createTextNode(''); Element.appendChild(FTextNode); end; class function TButtonElement.ElementName: String; begin Result := 'button'; end; { TParagraphElement } constructor TParagraphElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); FTextNode := Document.createTextNode(''); Element.appendChild(FTextNode); end; class function TParagraphElement.ElementName: String; begin Result := 'p'; end; { TLinkElement } constructor TLinkElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); FTextNode := Document.createTextNode(''); Element.appendChild(FTextNode); end; class function TLinkElement.ElementName: String; begin Result := 'a'; end; { TCustomHeadingElement } constructor TCustomHeadingElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); FTextNode := Document.createTextNode(''); Element.appendChild(FTextNode); end; { TH1Element } class function TH1Element.ElementName: String; begin Result := 'H1'; end; { TH2Element } class function TH2Element.ElementName: String; begin Result := 'H2'; end; { TH3Element } class function TH3Element.ElementName: String; begin Result := 'H3'; end; { TH4Element } class function TH4Element.ElementName: String; begin Result := 'H4'; end; { TH5Element } class function TH5Element.ElementName: String; begin Result := 'H5'; end; { TH6Element } class function TH6Element.ElementName: String; begin Result := 'H6'; end; { TImageElement } class function TImageElement.ElementName: String; begin Result := 'img'; end; { TInputElement } class function TInputElement.ElementName: String; begin Result := 'input'; end; { TInputTextElement } constructor TInputTextElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); InputElement.type := THTMLInputElementType.Text; end; { TInputPasswordElement } constructor TInputPasswordElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); InputElement.type := THTMLInputElementType.Password; end; { TInputRadioElement } constructor TInputRadioElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); InputElement.type := THTMLInputElementType.Radio; end; { TInputCheckBoxElement } constructor TInputCheckBoxElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); InputElement.type := THTMLInputElementType.CheckBox; end; { TInputRangeElement } constructor TInputRangeElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); InputElement.type := THTMLInputElementType.Range; end; { TFieldSetElement } class function TFieldSetElement.ElementName: String; begin Result := 'fieldset'; end; { TLabelElement } constructor TLabelElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); FTextNode := Document.createTextNode(''); Element.appendChild(FTextNode); end; class function TLabelElement.ElementName: String; begin Result := 'label'; end; { TCanvasElement } class function TCanvasElement.ElementName: String; begin Result := 'canvas'; end; { TCanvas2DElement } constructor TCanvas2DElement.Create(Owner: IHtmlElementOwner); begin inherited Create(Owner); FContext := JCanvasRenderingContext2D(CanvasElement.getContext('2d')); end; { TSvgElement } constructor TSvgElement.Create(Owner: IHtmlElementOwner); var Classes: String; begin FOwner := Owner; FElement := JHTMLElement(Document.createElementNS('http://www.w3.org/2000/svg', ElementName)); Owner.HtmlElement.appendChild(FElement); Classes := ClassName; var ParentClass := ClassParent; while Assigned(ParentClass) do begin if ParentClass.ClassName = 'TObject' then break; Classes += ' ' + ParentClass.ClassName; ParentClass := ParentClass.ClassParent; end; // specify element class FElement.setAttribute('class', Classes); Inc(Counter); FName := ElementName + IntToStr(Counter); // call after constructor AfterConstructor; end; class function TSvgElement.ElementName: String; begin Result := 'svg'; end; { TApplication } constructor TApplication.Create; begin // add cordova events Document.addEventListener('deviceready', @DeviceReady); end; destructor TApplication.Destroy; begin inherited; end; function TApplication.GetHtmlElement: JHTMLElement; begin Result := Document.Body; end; function TApplication.CreateElement(HtmlElementClass: THtmlElementClass): THtmlElement; begin Result := HtmlElementClass.Create(Self as IHtmlElementOwner); FElements.Add(Result); end; procedure TApplication.DeviceReady; begin {$IFDEF DEBUG} Console.Log('Cordova is ready!'); {$ENDIF} // add cordova events Document.addEventListener('pause', @Pause); Document.addEventListener('resume', @Resume); {$IFDEF iOS} // try to hide status bar if Assigned(StatusBar) then StatusBar.hide; {$ENDIF} CordovaAvailable := True; end; initialization Application := TApplication.Create; end.
21.535385
98
0.750607
f12f2e8e3b2da127a972367108458852a53665a7
60,208
dfm
Pascal
Catalogos/UsuariosPerfilesEdit.dfm
NetVaIT/MAS
ebdbf2dc8ca6405186683eb713b9068322feb675
[ "Apache-2.0" ]
null
null
null
Catalogos/UsuariosPerfilesEdit.dfm
NetVaIT/MAS
ebdbf2dc8ca6405186683eb713b9068322feb675
[ "Apache-2.0" ]
null
null
null
Catalogos/UsuariosPerfilesEdit.dfm
NetVaIT/MAS
ebdbf2dc8ca6405186683eb713b9068322feb675
[ "Apache-2.0" ]
null
null
null
inherited frmUsuariosPerfiles: TfrmUsuariosPerfiles Caption = 'frmUsuariosPerfiles' ClientWidth = 1048 ExplicitWidth = 1048 ExplicitHeight = 650 PixelsPerInch = 96 TextHeight = 13 inherited splDetail3: TSplitter Width = 1048 ExplicitWidth = 964 end inherited splDetail2: TSplitter Width = 1048 ExplicitWidth = 964 end inherited splDetail1: TSplitter Width = 1048 ExplicitWidth = 964 end inherited pnlClose: TPanel Width = 1048 ExplicitWidth = 1048 end inherited pnlDetail3: TPanel Width = 1048 ExplicitWidth = 1048 end inherited pnlDetail2: TPanel Width = 1048 ExplicitWidth = 1048 end inherited pnlDetail1: TPanel Width = 1048 ExplicitLeft = 0 ExplicitTop = 480 ExplicitWidth = 1048 end inherited pcMain: TcxPageControl Top = 22 Width = 1048 Height = 455 ExplicitTop = 22 ExplicitWidth = 1048 ExplicitHeight = 455 ClientRectBottom = 454 ClientRectRight = 1047 inherited tsGeneral: TcxTabSheet ExplicitLeft = 1 ExplicitTop = 1 ExplicitWidth = 1046 ExplicitHeight = 453 inherited cxScrollBox1: TcxScrollBox Width = 1046 Height = 453 ExplicitWidth = 1046 ExplicitHeight = 453 inherited tbarData: TToolBar Width = 1044 ExplicitLeft = 0 ExplicitTop = 0 ExplicitWidth = 1044 inherited ToolButton19: TToolButton OnMouseDown = ToolButton19MouseDown end object ToolButton3: TToolButton Left = 254 Top = 0 Action = DataSetEdit end end inherited pnlMaster: TPanel Width = 1044 Height = 426 ExplicitLeft = 0 ExplicitTop = 25 ExplicitWidth = 1044 ExplicitHeight = 426 object Label1: TLabel Left = 32 Top = 32 Width = 24 Height = 13 Caption = 'Perfil' FocusControl = cxDBTextEdit1 end object Label2: TLabel Left = 33 Top = 88 Width = 71 Height = 13 Caption = 'Permisos Menu' FocusControl = cxDBTextEdit2 end object Label3: TLabel Left = 33 Top = 134 Width = 84 Height = 13 Caption = 'Permiso Opciones' FocusControl = cxDBTextEdit3 end object Label4: TLabel Left = 334 Top = 29 Width = 77 Height = 13 Caption = 'Permiso Funci'#243'n' FocusControl = cxDBTextEdit4 end object cxDBTextEdit1: TcxDBTextEdit Left = 32 Top = 48 DataBinding.DataField = 'Descripcion' DataBinding.DataSource = DataSource TabOrder = 0 Width = 222 end object cxDBTextEdit2: TcxDBTextEdit Left = 33 Top = 107 DataBinding.DataField = 'PermisoMenu' DataBinding.DataSource = DataSource TabOrder = 1 Width = 392 end object cxDBTextEdit3: TcxDBTextEdit Left = 33 Top = 153 DataBinding.DataField = 'PermisoOpcion' DataBinding.DataSource = DataSource TabOrder = 2 Width = 392 end object PnlMenus: TPanel Left = 23 Top = 107 Width = 914 Height = 246 BevelOuter = bvNone Enabled = False TabOrder = 3 object ChckLstBxOpcionesCat: TCheckListBox Tag = 1000 Left = 12 Top = 30 Width = 118 Height = 219 ItemHeight = 13 Items.Strings = ( 'Bancos |1' 'Monedas |2' 'Ubicaciones |3' 'Cotizaci'#243'n Monedas |4' 'Unidades de Medida |5' 'M'#233'todos de Pago 33 |6' 'Formas de Pago 33 |14' 'Clientes |7' 'Proveedores |8' 'Empleados |9' 'Productos |10' 'Emisor |11' 'Perfiles |12' 'Paqueter'#237'as |13' 'Almacenes |30' 'Clasifica Productos |15') TabOrder = 0 end object ChckLstBxOpcionesAlm: TCheckListBox Tag = 3000 Left = 384 Top = 30 Width = 118 Height = 128 ItemHeight = 13 Items.Strings = ( 'Inventario |32' 'Devoluci'#243'n Producto |31' 'SalidasX Ajuste |33' 'Entradas X Ajuste |36' 'Acomodo Mercanc'#237'a |46' 'Lista de Precios |34' 'Kardex Movtos |35' 'Costo Inventario |51') TabOrder = 1 end object ChckLstBxOpcionesVenta: TCheckListBox Tag = 2000 Left = 260 Top = 30 Width = 118 Height = 128 ItemHeight = 13 Items.Strings = ( 'Cotizaciones |20' 'Pedido |21' 'Ordenes Salida |22' 'Ordenes Entrega |27' 'Facturas |23' 'Notas Venta |24' 'Notas Cr'#233'dito |25' 'Notas Cargo |26' 'Fletes |28') TabOrder = 2 end object ChckLstBxOpcionesCXC: TCheckListBox Tag = 6000 Left = 508 Top = 30 Width = 118 Height = 128 ItemHeight = 13 Items.Strings = ( 'Registro Pagos |60' 'Aplicaciones |61' 'Antiguedad Saldos |62') TabOrder = 3 end object ChckLstBxOpcionesCompra: TCheckListBox Tag = 4000 Left = 136 Top = 30 Width = 118 Height = 128 ItemHeight = 13 Items.Strings = ( 'Proyeccion Compras |47' 'Requisici'#243'n |41' 'Orden Compra |42' 'Backorder |40' 'Facturas |43' 'Entrada Mercanc'#237'a |44' 'Acomodo Mercanc'#237'a |46' 'Ordenes Entrada |45') TabOrder = 4 end object ChckLstBxOpcionesRep: TCheckListBox Tag = 5000 Left = 756 Top = 30 Width = 118 Height = 128 ItemHeight = 13 Items.Strings = ( 'Ventas Unidades |50' 'Costo Inventario |51' 'Ventas X Cliente |52' 'Reporte de Control |53') TabOrder = 5 end object ChckBxCat: TCheckBox Tag = 1000 Left = 15 Top = 7 Width = 97 Height = 17 Caption = 'Cat'#225'logos |1000' TabOrder = 6 OnClick = ChckBxCatClick end object ChckBxAlm: TCheckBox Tag = 3000 Left = 384 Top = 7 Width = 97 Height = 17 Caption = 'Almacenes |3000' TabOrder = 7 OnClick = ChckBxCatClick end object ChckBxVentas: TCheckBox Tag = 2000 Left = 263 Top = 7 Width = 97 Height = 17 Caption = 'Ventas |2000' TabOrder = 8 OnClick = ChckBxCatClick end object ChckBxCompras: TCheckBox Tag = 4000 Left = 137 Top = 7 Width = 97 Height = 17 Caption = 'Compras |4000' TabOrder = 9 OnClick = ChckBxCatClick end object ChckBxCxC: TCheckBox Tag = 6000 Left = 508 Top = 7 Width = 105 Height = 17 Caption = 'Cuentas X Cobrar |6000' TabOrder = 10 OnClick = ChckBxCatClick end object ChckBxRep: TCheckBox Tag = 5000 Left = 758 Top = 7 Width = 97 Height = 17 Caption = 'Reportes |5000' TabOrder = 11 OnClick = ChckBxCatClick end object BtnActOpcion: TButton Left = 160 Top = 164 Width = 113 Height = 25 Caption = 'Actualiza Opciones' TabOrder = 12 Visible = False OnClick = BtnActOpcionClick end object CheckBox1: TCheckBox Tag = 7000 Left = 632 Top = 7 Width = 97 Height = 17 Caption = 'Cierre |7000' TabOrder = 13 OnClick = ChckBxCatClick end object ChckLstBxOpcCierre: TCheckListBox Tag = 7000 Left = 632 Top = 30 Width = 118 Height = 128 ItemHeight = 13 Items.Strings = ( 'Reporte mensual |70' 'Informe Inventario |71') TabOrder = 14 end end object cxDBTextEdit4: TcxDBTextEdit Left = 334 Top = 48 DataBinding.DataField = 'PermisosFuncion' DataBinding.DataSource = DataSource TabOrder = 4 Width = 311 end end end end end object PnlTitulo: TPanel [8] Left = 0 Top = 0 Width = 1048 Height = 22 Align = alTop Alignment = taLeftJustify Caption = ' Perfiles' Color = 5553385 Font.Charset = DEFAULT_CHARSET Font.Color = clWhite Font.Height = -13 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentBackground = False ParentFont = False TabOrder = 5 end inherited DataSource: TDataSource DataSet = DmPerfilesUsuario.adodsMaster OnStateChange = DataSourceStateChange OnDataChange = DataSourceDataChange end inherited ilPageControl: TImageList Bitmap = { 494C0101020004009C0110001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000001000000001002000000000000010 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008C96A5008C8E8400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFF7F700FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFE7E700FFE7 E700FFDFDE00FFDFDE00FFD7AD0000000000FF9E0000FFF7F700FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFE7E700FFEF EF002979FF006BD7FF00ADAEAD00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFEFEF00FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFDFDE00FFDF DE00FFD7D600FFD7D600FFDFDE0000000000FF9E0000FFEFEF00FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700EFDFDE003179 FF006BD7FF00398EFF00EFDFEF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFF7F700FFF7F700FFF7 F700FFF7F700FFF7F700FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFDF DE00FFDFDE00FFD7D600FFDFDE0000000000FF9E0000FFF7F700FFF7F700FFF7 F700FFF7F700FFF7F700F7EFEF008C8E8C0084868C00ADA6AD008C8E8C007BA6 B500398EFF00F7DFE700FFDFDE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFF7F700FFFFFF00FFFF FF00FFFFFF00FFF7F700FFF7F700FFF7F700FFEFEF00FFEFEF00FFE7E700FFE7 E700FFDFDE00FFDFDE00FFDFDE0000000000FF9E0000FFF7F700FFFFFF00FFFF FF00FFFFFF00DEDFDE00E7C79400F7CF9400F7CF9C00F7CF8C0063616B009496 9400EFDFE700FFDFDE00FFDFDE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFE7E700FFE7 E700FFDFDE00FFDFDE00FFDFDE0000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00B5A69400F7D7A500F7D7A500F7D79C00EFCF8C00F7CF9400C6B6 BD00FFDFDE00FFDFDE00FFDFDE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFEFEF00FFE7 E700FFDFDE00FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00F7DFAD00F7E7BD00F7E7C600F7DFAD00F7D79C00F7D7A5008C8E 9400FFDFDE00FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFEF00FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00DECFAD00FFF7DE00FFF7E700F7EFC600F7DFAD00F7D7A5009C96 9C00FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00A5A6AD00FFFFEF00FFFFEF00FFEFCE00F7DFAD00E7CF9C00FFEF EF00FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00A5A6A500E7DFBD00FFEFBD00B5A69400E7D7DE00FFE7 E700FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFEF00FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E000000000000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000EF860000EF860000EF86 0000EF860000EF860000EF860000EF860000EF860000EF860000EF860000EF86 0000EF860000EF860000F796000000000000FF9E0000EF860000EF860000EF86 0000EF860000EF860000EF860000EF860000EF860000EF860000EF860000EF86 0000EF860000EF860000F7960000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E00000000000000000000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000100000000100010000000000800000000000000000000000 000000000000000000000000FFFFFF00FFFFFFFF00000000FFFFFFF900000000 0001000100000000000100010000000000010001000000000001000100000000 0001000100000000000100010000000000010001000000000001000100000000 0001000100000000000100010000000000010001000000000001000100000000 8001800100000000FFFFFFFF0000000000000000000000000000000000000000 000000000000} end inherited ilAction: TImageList Bitmap = { 494C01010C000E00C00110001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000004000000001002000000000000040 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000F9F9F906F9F9 F906F8F8F807F8F8F807F9F9F906F9F9F906F8F8F807F8F8F807F9F9F906F8F8 F807F8F8F807F9F9F90600000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000CCCCCC339B9B9B648B8B 8B749D9D9D62A6A6A659989898678E8E8E71A5A5A55AA4A4A45B898989769F9F 9F60A5A5A55A9C9C9C63CDCDCD32000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000C6C7C6000000 00000086840000000000000000000000000000000000B1B1B14EBABABA459292 926DC4C4C43BDBDBDB24B7B7B7489B9B9B64DBDBDB24D7D7D7288D8D8D72CACA CA35DBDBDB24B9B9B946B1B1B14E000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000C6C7C6000000 00000086840000000000000000000000000000000000AEAEAE519C9C9C637C7C 7C83A5A5A55AB8B8B8479A9A9A658383837CB7B7B748B4B4B44B77777788AAAA AA55B7B7B7489C9C9C63AEAEAE51000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000000000000000 00000086840000000000000000000000000000000000B0B0B04FABABAB548888 8877B4B4B44BC9C9C936A8A8A8578F8F8F70C9C9C936C5C5C53A8282827DBABA BA45C9C9C936ABABAB54B0B0B04F000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008486 8400000000008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000868400008684000086840000868400008684000086 84000086840000000000000000000000000000000000B0B0B04FB1B1B14E8C8C 8C73BBBBBB44D0D0D02FAEAEAE519494946BD0D0D02FCCCCCC3387878778C1C1 C13ED0D0D02FB1B1B14EB0B0B04F000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000000000000086 84000086840000000000000000000000000000000000AEAEAE519D9D9D627C7C 7C83A5A5A55AB9B9B9469A9A9A658383837CB8B8B847B5B5B54A78787887ABAB AB54B8B8B8479C9C9C63AEAEAE51000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 00000086840000000000000000000000000000000000B2B2B24DC2C2C23D9999 9966CBCBCB34E3E3E31CBEBEBE41A2A2A25DE3E3E31CDFDFDF209393936CD2D2 D22DE3E3E31CC1C1C13EB2B2B24D000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 00000086840000000000000000000000000000000000ADADAD52989898677878 7887A0A0A05FB3B3B34C969696697E7E7E81B0B0B04FADADAD527373738CA5A5 A55AB2B2B24D98989867ADADAD52000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008486 8400000000000000000084868400000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 00000000000000000000000000000000000000000000B3B3B34CC8C8C8379D9D 9D62CFCFCF30E7E7E718C4C4C43B6B6B6B944A4A4AB5515151AE79797986D7D7 D728E6E6E619C4C4C43BB3B3B34C000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 0000C6C7C60000000000000000000000000000000000A7A7A7586363639C5858 58A79B9B9B64ADADAD529191916E6464649B6D6D6D926F6F6F906464649BA0A0 A05FACACAC539292926DADADAD52000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000099999966000000FF2222 22DDD4D4D42BE9E9E916C2C2C23DA6A6A659ECECEC13E8E8E81796969669D7D7 D728E8E8E817C5C5C53AB2B2B24D000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000C4C4C43B555555AA6161 619E9F9F9F60A7A7A758999999668F8F8F70A7A7A758A5A5A55A8A8A8A75A1A1 A15EA7A7A7589D9D9D62CDCDCD32000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000FDFDFD02FBFB FB04F8F8F807F8F8F807F9F9F906F9F9F906F8F8F807F8F8F807F9F9F906F8F8 F807F8F8F807F9F9F90600000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848684000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848684008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848684000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000400000000100010000000000000200000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000FFFFFFFFFF7EFFFFFFFFFFFFBFFFC003 FFFFFFFFF0038001FFFFFC7FE0038001F3E7F0FFE0038001F1C7F1FFE0038001 F88FE3FFE0038001FC1FE7FF20038001FE3FE707E0028001FC1FE387E0038001 F88FE107E0038001F1C7F007E0038001F3E7F837E0038001FFFFFFFFFFFF8001 FFFFFFFFBF7DC003FFFFFFFF7F7EFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7FFFFFFFFFFBFFFC7FFFFFFFFFF1FF FC7FFFFFE007E0FFE00FE007F00FC47FE00FE007F81FCE3FE00FE007FC3FFF1F FC7FFFFFFE7FFF8FFC7FFFFFFFFFFFC7FC7FFFFFFFFFFFE7FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7E7FF9FF9FFE7E7 E787FE1FF87FE1E7E607F81FF81FE067E007F01FF80FE007E607F81FF81FE067 E787FE1FF87FE1E7E7E7FF9FF9FFE7E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 000000000000} end inherited cxStyleRepository1: TcxStyleRepository PixelsPerInch = 96 end end
56.8
71
0.796887
f1686dd5a8295ff4f2f0b77e96cf876e588fa34c
9,114
pas
Pascal
windows/src/ext/jedi/jvcl/tests/restructured/source/JvBoxProcs.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jvcl/tests/restructured/source/JvBoxProcs.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
4,451
2017-05-29T02:52:06.000Z
2022-03-31T23:53:23.000Z
windows/src/ext/jedi/jvcl/tests/restructured/source/JvBoxProcs.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
72
2017-05-26T04:08:37.000Z
2022-03-03T10:26:20.000Z
{----------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: JvJvBoxProcs.PAS, released on 2002-07-04. The Initial Developers of the Original Code are: Fedor Koshevnikov, Igor Pavluk and Serge Korolev Copyright (c) 1997, 1998 Fedor Koshevnikov, Igor Pavluk and Serge Korolev Copyright (c) 2001,2002 SGB Software All Rights Reserved. Last Modified: 2002-07-04 You may retrieve the latest version of this file at the Project JEDI's JVCL home page, located at http://jvcl.sourceforge.net Known Issues: -----------------------------------------------------------------------------} {$I JVCL.INC} unit JvBoxProcs; interface uses Classes, Controls, StdCtrls, JvxCtrls; procedure BoxMoveSelectedItems(SrcList, DstList: TWinControl); procedure BoxMoveAllItems(SrcList, DstList: TWinControl); procedure BoxDragOver(List: TWinControl; Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean; Sorted: Boolean); procedure BoxMoveFocusedItem(List: TWinControl; DstIndex: Integer); procedure BoxMoveSelected(List: TWinControl; Items: TStrings); procedure BoxSetItem(List: TWinControl; Index: Integer); function BoxGetFirstSelection(List: TWinControl): Integer; function BoxCanDropItem(List: TWinControl; X, Y: Integer; var DragIndex: Integer): Boolean; implementation uses {$IFDEF WIN32} Windows {$ELSE} WinTypes, WinProcs {$ENDIF}, Graphics; function BoxItems(List: TWinControl): TStrings; begin if List is TCustomListBox then Result := TCustomListBox(List).Items else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).Items else Result := nil; end; function BoxGetSelected(List: TWinControl; Index: Integer): Boolean; begin if List is TCustomListBox then Result := TCustomListBox(List).Selected[Index] else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).Selected[Index] else Result := False; end; procedure BoxSetSelected(List: TWinControl; Index: Integer; Value: Boolean); begin if List is TCustomListBox then TCustomListBox(List).Selected[Index] := Value else if List is TJvxCustomListBox then TJvxCustomListBox(List).Selected[Index] := Value; end; function BoxGetItemIndex(List: TWinControl): Integer; begin if List is TCustomListBox then Result := TCustomListBox(List).ItemIndex else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).ItemIndex else Result := LB_ERR; end; {$IFNDEF WIN32} function BoxGetCanvas(List: TWinControl): TCanvas; begin if List is TCustomListBox then Result := TCustomListBox(List).Canvas else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).Canvas else Result := nil; end; {$ENDIF} procedure BoxSetItemIndex(List: TWinControl; Index: Integer); begin if List is TCustomListBox then TCustomListBox(List).ItemIndex := Index else if List is TJvxCustomListBox then TJvxCustomListBox(List).ItemIndex := Index; end; function BoxMultiSelect(List: TWinControl): Boolean; begin if List is TCustomListBox then Result := TListBox(List).MultiSelect else if List is TJvxCustomListBox then Result := TJvxCheckListBox(List).MultiSelect else Result := False; end; function BoxSelCount(List: TWinControl): Integer; begin if List is TCustomListBox then Result := TCustomListBox(List).SelCount else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).SelCount else Result := 0; end; function BoxItemAtPos(List: TWinControl; Pos: TPoint; Existing: Boolean): Integer; begin if List is TCustomListBox then Result := TCustomListBox(List).ItemAtPos(Pos, Existing) else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).ItemAtPos(Pos, Existing) else Result := LB_ERR; end; function BoxItemRect(List: TWinControl; Index: Integer): TRect; begin if List is TCustomListBox then Result := TCustomListBox(List).ItemRect(Index) else if List is TJvxCustomListBox then Result := TJvxCustomListBox(List).ItemRect(Index) else FillChar(Result, SizeOf(Result), 0); end; procedure BoxMoveSelected(List: TWinControl; Items: TStrings); var I: Integer; begin if BoxItems(List) = nil then Exit; I := 0; while I < BoxItems(List).Count do begin if BoxGetSelected(List, I) then begin Items.AddObject(BoxItems(List).Strings[I], BoxItems(List).Objects[I]); BoxItems(List).Delete(I); end else Inc(I); end; end; function BoxGetFirstSelection(List: TWinControl): Integer; var I: Integer; begin Result := LB_ERR; if BoxItems(List) = nil then Exit; for I := 0 to BoxItems(List).Count - 1 do begin if BoxGetSelected(List, I) then begin Result := I; Exit; end; end; Result := LB_ERR; end; procedure BoxSetItem(List: TWinControl; Index: Integer); var MaxIndex: Integer; begin if BoxItems(List) = nil then Exit; with List do begin if CanFocus then SetFocus; MaxIndex := BoxItems(List).Count - 1; if Index = LB_ERR then Index := 0 else if Index > MaxIndex then Index := MaxIndex; if Index >= 0 then begin if BoxMultiSelect(List) then BoxSetSelected(List, Index, True) else BoxSetItemIndex(List, Index); end; end; end; procedure BoxMoveSelectedItems(SrcList, DstList: TWinControl); var Index, I, NewIndex: Integer; begin Index := BoxGetFirstSelection(SrcList); if Index <> LB_ERR then begin BoxItems(SrcList).BeginUpdate; BoxItems(DstList).BeginUpdate; try I := 0; while I < BoxItems(SrcList).Count do begin if BoxGetSelected(SrcList, I) then begin NewIndex := BoxItems(DstList).AddObject(BoxItems(SrcList).Strings[I], BoxItems(SrcList).Objects[I]); if (SrcList is TJvxCheckListBox) and (DstList is TJvxCheckListBox) then begin TJvxCheckListBox(DstList).State[NewIndex] := TJvxCheckListBox(SrcList).State[I]; end; BoxItems(SrcList).Delete(I); end else Inc(I); end; BoxSetItem(SrcList, Index); finally BoxItems(SrcList).EndUpdate; BoxItems(DstList).EndUpdate; end; end; end; procedure BoxMoveAllItems(SrcList, DstList: TWinControl); var I, NewIndex: Integer; begin for I := 0 to BoxItems(SrcList).Count - 1 do begin NewIndex := BoxItems(DstList).AddObject(BoxItems(SrcList)[I], BoxItems(SrcList).Objects[I]); if (SrcList is TJvxCheckListBox) and (DstList is TJvxCheckListBox) then begin TJvxCheckListBox(DstList).State[NewIndex] := TJvxCheckListBox(SrcList).State[I]; end; end; BoxItems(SrcList).Clear; BoxSetItem(SrcList, 0); end; function BoxCanDropItem(List: TWinControl; X, Y: Integer; var DragIndex: Integer): Boolean; var Focused: Integer; begin Result := False; if (BoxSelCount(List) = 1) or (not BoxMultiSelect(List)) then begin Focused := BoxGetItemIndex(List); if Focused <> LB_ERR then begin DragIndex := BoxItemAtPos(List, Point(X, Y), True); if (DragIndex >= 0) and (DragIndex <> Focused) then begin Result := True; end; end; end; end; procedure BoxDragOver(List: TWinControl; Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean; Sorted: Boolean); var DragIndex: Integer; R: TRect; procedure DrawItemFocusRect(Idx: Integer); {$IFDEF WIN32} var P: TPoint; DC: HDC; {$ENDIF} begin R := BoxItemRect(List, Idx); {$IFDEF WIN32} P := List.ClientToScreen(R.TopLeft); R := Bounds(P.X, P.Y, R.Right - R.Left, R.Bottom - R.Top); DC := GetDC(0); DrawFocusRect(DC, R); ReleaseDC(0, DC); {$ELSE} BoxGetCanvas(List).DrawFocusRect(R); {$ENDIF} end; begin if Source <> List then Accept := (Source is TWinControl) or (Source is TJvxCustomListBox) else begin if Sorted then Accept := False else begin Accept := BoxCanDropItem(List, X, Y, DragIndex); if ((List.Tag - 1) = DragIndex) and (DragIndex >= 0) then begin if State = dsDragLeave then begin DrawItemFocusRect(List.Tag - 1); List.Tag := 0; end; end else begin if List.Tag > 0 then DrawItemFocusRect(List.Tag - 1); if DragIndex >= 0 then DrawItemFocusRect(DragIndex); List.Tag := DragIndex + 1; end; end; end; end; procedure BoxMoveFocusedItem(List: TWinControl; DstIndex: Integer); begin if (DstIndex >= 0) and (DstIndex < BoxItems(List).Count) then if (DstIndex <> BoxGetItemIndex(List)) then begin BoxItems(List).Move(BoxGetItemIndex(List), DstIndex); BoxSetItem(List, DstIndex); end; end; end.
29.118211
97
0.69684
f1890861763a4b4bbbc01881ac5f9ad27bf762dc
36,636
pas
Pascal
source/BegaScrollBox.pas
the-Arioch/HtmlViewer
302b9a4ae9d4042eb1e99fbbd91ac484ac98de29
[ "MIT" ]
3
2015-03-31T13:32:10.000Z
2017-10-13T07:51:58.000Z
source/BegaScrollBox.pas
the-Arioch/HtmlViewer
302b9a4ae9d4042eb1e99fbbd91ac484ac98de29
[ "MIT" ]
null
null
null
source/BegaScrollBox.pas
the-Arioch/HtmlViewer
302b9a4ae9d4042eb1e99fbbd91ac484ac98de29
[ "MIT" ]
1
2016-10-18T06:20:25.000Z
2016-10-18T06:20:25.000Z
{------------------------------------------------------------------------------- Copyright (C) 2006-2014 by Bernd Gabriel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------} {$include htmlcons.inc} unit BegaScrollBox; interface uses {$ifdef UseVCLStyles} Vcl.Themes, {$endif} Classes, SysUtils, Messages, {$ifdef LCL} LclIntf, LclType, LMessages, HtmlMisc, {$else} FlatSB, {$endif LCL} Windows, CommCtrl, Controls, ExtCtrls, Forms, Graphics, Math, Menus, MultiMon, TypInfo; type TBegaScrollingWinClientSize = (csCurrent, csWithoutBar, csWithBar); TBegaScrollingWinControl = class; TBegaScrollBar = class(TPersistent) private FControl: TBegaScrollingWinControl; FIncrement: TScrollBarInc; FPageIncrement: TScrollbarInc; // FRange: Integer; FPosition: Integer; FMaxPos: Integer; // FKind: TScrollBarKind; FMargin: Word; FVisible: Boolean; FTracking: Boolean; FScaled: Boolean; FSmooth: Boolean; FDelay: Integer; FButtonSize: Integer; FColor: TColor; FParentColor: Boolean; FSize: Integer; FStyle: TScrollBarStyle; FThumbSize: Integer; FPageDiv: Integer; FLineDiv: Integer; FUpdateNeeded: Boolean; constructor Create(AControl: TBegaScrollingWinControl; AKind: TScrollBarKind); procedure CalcAutoRange; function ControlSize(ControlSB, AssumeSB: Boolean): Integer; overload; procedure DoSetRange(Value: Integer); function GetScrollPos: Integer; function NeedsScrollBarVisible: Boolean; function IsIncrementStored: Boolean; procedure ScrollMessage(var Msg: TWMScroll); procedure SetButtonSize(Value: Integer); procedure SetColor(Value: TColor); procedure SetParentColor(Value: Boolean); procedure SetPosition(Value: Integer); procedure SetRange(Value: Integer); procedure SetSize(Value: Integer); procedure SetStyle(Value: TScrollBarStyle); procedure SetThumbSize(Value: Integer); procedure SetVisible(Value: Boolean); function IsRangeStored: Boolean; procedure Update(ControlSB, AssumeSB: Boolean); public function ControlSize(Which: TBegaScrollingWinClientSize): Integer; overload; function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; virtual; function IsScrollBarVisible: Boolean; procedure Assign(Source: TPersistent); override; procedure ChangeBiDiPosition; property Kind: TScrollBarKind read FKind; property ScrollPos: Integer read GetScrollPos; published property ButtonSize: Integer read FButtonSize write SetButtonSize default 0; property Color: TColor read FColor write SetColor default clBtnHighlight; property Increment: TScrollBarInc read FIncrement write FIncrement stored IsIncrementStored default 8; property Margin: Word read FMargin write FMargin default 0; property ParentColor: Boolean read FParentColor write SetParentColor default True; property Range: Integer read FRange write SetRange stored IsRangeStored default 0; property Position: Integer read FPosition write SetPosition default 0; property Smooth: Boolean read FSmooth write FSmooth default False; property Size: Integer read FSize write SetSize default 0; property Style: TScrollBarStyle read FStyle write SetStyle default ssRegular; property ThumbSize: Integer read FThumbSize write SetThumbSize default 0; property Tracking: Boolean read FTracking write FTracking default False; property Visible: Boolean read FVisible write SetVisible default True; end; TBegaScrollingWinControl = class(TWinControl) {$ifdef UseVCLStyles} strict private class destructor Destroy; class constructor Create; {$endif} private FAutoRangeCount: Integer; FAutoScroll: Boolean; FHorzScrollBar: TBegaScrollBar; FUpdatingScrollBars: Boolean; FVertScrollBar: TBegaScrollBar; FPanningEnabled: Boolean; FPanning: Boolean; FPanningStart: TPoint; procedure CalcAutoRange; procedure ScaleScrollBars(M, D: Integer); procedure SetAutoScroll(Value: Boolean); procedure SetHorzScrollBar(Value: TBegaScrollBar); procedure SetVertScrollBar(Value: TBegaScrollBar); procedure UpdateScrollBars; procedure WMSize(var Message: TWMSize); message WM_SIZE; procedure WMHScroll(var Message: TWMHScroll); message WM_HSCROLL; procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL; procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; function GetMaxScroll: TPoint; protected function AutoScrollEnabled: Boolean; virtual; function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; procedure AdjustClientRect(var Rect: TRect); override; procedure AlignControls(AControl: TControl; var ARect: TRect); override; procedure AutoScrollInView(AControl: TControl); virtual; procedure ChangeScale(M, D: Integer); override; procedure CreateParams(var Params: TCreateParams); override; procedure CreateWnd; override; procedure DoFlipChildren; override; procedure Resizing(State: TWindowState); virtual; property AutoScroll: Boolean read FAutoScroll write SetAutoScroll default True; property PanningEnabled: Boolean read FPanningEnabled write FPanningEnabled default True; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; function isPanning: Boolean; virtual; procedure DisableAutoRange; procedure EnableAutoRange; procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; procedure MouseMove(Shift: TShiftState; X: Integer; Y: Integer); override; procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer); override; procedure ScrollInView(AControl: TControl); published property HorzScrollBar: TBegaScrollBar read FHorzScrollBar write SetHorzScrollBar; property VertScrollBar: TBegaScrollBar read FVertScrollBar write SetVertScrollBar; end; {$ifdef UseVCLStyles} TBegaScrollingWinControlStyleHook = class(TScrollingStyleHook) strict protected procedure WndProc(var Message: TMessage); override; public constructor Create(AControl: TWinControl); override; end; {$endif} TBegaScrollBox = class(TBegaScrollingWinControl) private FBorderStyle: TBorderStyle; procedure SetBorderStyle(Value: TBorderStyle); // procedure WMNCHitTest(var Message: TMessage); message WM_NCHITTEST; {$ifndef LCL} procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; {$endif LCL} protected procedure CreateParams(var Params: TCreateParams); override; public constructor Create(AOwner: TComponent); override; published property Align; property Anchors; property AutoScroll; property AutoSize; {$ifndef LCL} property BevelEdges; property BevelInner; property BevelOuter; property BevelKind; property BevelWidth; {$endif LCL} property BiDiMode; property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; property Constraints; property DockSite; property DragCursor; property DragKind; property DragMode; property Enabled; property Color nodefault; {$ifndef LCL} property Ctl3D; {$endif LCL} property Font; property PanningEnabled; property ParentBiDiMode; property ParentColor; {$ifndef LCL} property ParentCtl3D; {$endif LCL} property ParentFont; property ParentShowHint; property PopupMenu; property ShowHint; property TabOrder; property TabStop; property Visible; {$ifndef LCL} property OnCanResize; {$endif LCL} property OnClick; property OnConstrainedResize; property OnContextPopup; property OnDblClick; property OnDockDrop; property OnDockOver; property OnDragDrop; property OnDragOver; property OnEndDock; property OnEndDrag; property OnEnter; property OnExit; property OnKeyDown; property OnKeyUp; property OnGetSiteInfo; property OnMouseDown; property OnMouseMove; property OnMouseUp; property OnMouseWheel; property OnMouseWheelDown; property OnMouseWheelUp; property OnResize; property OnStartDock; property OnStartDrag; property OnUnDock; end; EBegaScrollBoxEnumException = class(Exception) public constructor createEnum(EnumType: PTypeInfo; const Value); end; implementation {$ifdef UseVCLStyles} uses {$ifndef HasSystemUITypes} Vcl.Styles, {$endif} System.UITypes; {$endif} { TBegaScrollBar } constructor TBegaScrollBar.Create(AControl: TBegaScrollingWinControl; AKind: TScrollBarKind); begin inherited Create; FControl := AControl; FKind := AKind; FPageIncrement := 80; FIncrement := FPageIncrement div 10; FVisible := True; FDelay := 10; FLineDiv := 4; FPageDiv := 12; FColor := clBtnHighlight; FParentColor := True; FUpdateNeeded := True; end; function TBegaScrollBar.IsIncrementStored: Boolean; begin Result := not Smooth; end; procedure TBegaScrollBar.Assign(Source: TPersistent); begin if Source is TBegaScrollBar then begin Visible := TBegaScrollBar(Source).Visible; Range := TBegaScrollBar(Source).Range; Position := TBegaScrollBar(Source).Position; Increment := TBegaScrollBar(Source).Increment; Exit; end; inherited Assign(Source); end; procedure TBegaScrollBar.ChangeBiDiPosition; begin if Kind = sbHorizontal then if IsScrollBarVisible then if not FControl.UseRightToLeftScrollBar then Position := 0 else Position := Range; end; procedure TBegaScrollBar.CalcAutoRange; var I: Integer; NewMin, NewWidth: Integer; procedure processLeftTop(ALeftTop, AWidthHeight: Integer); var Size: Integer; begin Size := AWidthHeight + math.max(ALeftTop, 0); if NewMin > ALeftTop then NewMin := ALeftTop; if NewWidth < Size then NewWidth := Size; end; procedure processRightBottom(AWidthHeight: Integer); begin if NewWidth < AWidthHeight then NewWidth := AWidthHeight; end; procedure ProcessHorz(Control: TControl); begin if Control.Visible then case Control.Align of alLeft: processLeftTop(Control.Left, Control.Width); alRight: processRightBottom(Control.Width); alNone: if Control.Anchors * [akLeft, akRight] = [akLeft] then processLeftTop(Control.Left, Control.Width) else if Control.Anchors * [akLeft, akRight] = [akRight] then processRightBottom(Control.Width); end; end; procedure ProcessVert(Control: TControl); begin if Control.Visible then case Control.Align of alTop: processLeftTop(Control.Top, Control.Height); alBottom: processRightBottom(Control.Height); alNone: if Control.Anchors * [akTop, akBottom] = [akTop] then processLeftTop(Control.Top, Control.Height) else if Control.Anchors * [akTop, akBottom] = [akBottom] then processRightBottom(Control.Height); end; end; var NeedScrollBar: Boolean; MaxSize, NewSize, NewMax: Integer; begin if FControl.FAutoScroll then begin if FControl.AutoScrollEnabled then begin MaxSize := ControlSize(False, False); NewMin := 0; NewWidth := MaxSize; for I := 0 to FControl.ControlCount - 1 do if Kind = sbHorizontal then ProcessHorz(FControl.Controls[I]) else ProcessVert(FControl.Controls[I]); if NewMin > 0 then NewMin := 0; NewMax := NewMin + NewWidth; NeedScrollBar := (NewMin < 0) or (NewMax > MaxSize); NewSize := ControlSize(False, NeedScrollBar); if NewMax < NewSize then NewMax := NewSize; FPosition := -NewMin; DoSetRange(NewMax - NewMin); end else DoSetRange(0); end; end; function TBegaScrollBar.IsScrollBarVisible: Boolean; var Style: Longint; begin Style := WS_HSCROLL; if Kind = sbVertical then Style := WS_VSCROLL; Result := (Visible) and (GetWindowLong(FControl.Handle, GWL_STYLE) and Style <> 0); end; function TBegaScrollBar.ControlSize(ControlSB, AssumeSB: Boolean): Integer; var BorderAdjust: Integer; function ScrollBarVisible(Code: Word): Boolean; var Style: Longint; begin Style := WS_HSCROLL; if Code = SB_VERT then Style := WS_VSCROLL; Result := GetWindowLong(FControl.Handle, GWL_STYLE) and Style <> 0; end; function Adjustment(Code, Metric: Word): Integer; begin Result := 0; if not ControlSB then if AssumeSB and not ScrollBarVisible(Code) then Result := -(GetSystemMetrics(Metric) - BorderAdjust) else if not AssumeSB and ScrollBarVisible(Code) then Result := GetSystemMetrics(Metric) - BorderAdjust; end; begin BorderAdjust := Integer(GetWindowLong(FControl.Handle, GWL_STYLE) and (WS_BORDER or WS_THICKFRAME) <> 0); if Kind = sbVertical then Result := FControl.ClientHeight + Adjustment(SB_HORZ, SM_CXHSCROLL) else Result := FControl.ClientWidth + Adjustment(SB_VERT, SM_CYVSCROLL); end; //- BG ----------------------------------------------------------- 22.01.2006 -- function TBegaScrollBar.ControlSize( Which: TBegaScrollingWinClientSize): Integer; begin case Which of csCurrent: Result := ControlSize(True, False); csWithoutBar: Result := ControlSize(False, False); csWithBar: Result := ControlSize(False, True); else raise EBegaScrollBoxEnumException.createEnum(TypeInfo(TBegaScrollingWinClientSize), Which); end; end; function TBegaScrollBar.GetScrollPos: Integer; begin Result := 0; if Visible then Result := Position; end; function TBegaScrollBar.NeedsScrollBarVisible: Boolean; begin Result := FRange > ControlSize(False, False); end; procedure TBegaScrollBar.ScrollMessage(var Msg: TWMScroll); var Incr, FinalIncr, Count: Integer; CurrentTime, StartTime, ElapsedTime: Longint; function GetRealScrollPosition: Integer; var SI: TScrollInfo; Code: Integer; begin SI.cbSize := SizeOf(TScrollInfo); SI.fMask := SIF_TRACKPOS; Code := SB_HORZ; if FKind = sbVertical then Code := SB_VERT; Result := Msg.Pos; if FlatSB_GetScrollInfo(FControl.Handle, Code, SI) then Result := SI.nTrackPos; end; begin with Msg do begin if FSmooth and (ScrollCode in [SB_LINEUP, SB_LINEDOWN, SB_PAGEUP, SB_PAGEDOWN]) then begin case ScrollCode of SB_LINEUP, SB_LINEDOWN: begin Incr := FIncrement div FLineDiv; FinalIncr := FIncrement mod FLineDiv; Count := FLineDiv; end; SB_PAGEUP, SB_PAGEDOWN: begin Incr := FPageIncrement; FinalIncr := Incr mod FPageDiv; Incr := Incr div FPageDiv; Count := FPageDiv; end; else Count := 0; Incr := 0; FinalIncr := 0; end; CurrentTime := 0; while Count > 0 do begin StartTime := GetCurrentTime; ElapsedTime := StartTime - CurrentTime; if ElapsedTime < FDelay then Sleep(FDelay - ElapsedTime); CurrentTime := StartTime; case ScrollCode of SB_LINEUP: SetPosition(FPosition - Incr); SB_LINEDOWN: SetPosition(FPosition + Incr); SB_PAGEUP: SetPosition(FPosition - Incr); SB_PAGEDOWN: SetPosition(FPosition + Incr); end; FControl.Update; Dec(Count); end; if FinalIncr > 0 then begin case ScrollCode of SB_LINEUP: SetPosition(FPosition - FinalIncr); SB_LINEDOWN: SetPosition(FPosition + FinalIncr); SB_PAGEUP: SetPosition(FPosition - FinalIncr); SB_PAGEDOWN: SetPosition(FPosition + FinalIncr); end; end; end else case ScrollCode of SB_LINEUP: SetPosition(FPosition - FIncrement); SB_LINEDOWN: SetPosition(FPosition + FIncrement); SB_PAGEUP: SetPosition(FPosition - ControlSize(True, False)); SB_PAGEDOWN: SetPosition(FPosition + ControlSize(True, False)); SB_THUMBPOSITION: if FRange > 32767 then SetPosition(GetRealScrollPosition) else SetPosition(Pos); SB_THUMBTRACK: if Tracking then if FRange > 32767 then SetPosition(GetRealScrollPosition) else SetPosition(Pos); SB_TOP: SetPosition(0); SB_BOTTOM: SetPosition(FMaxPos); SB_ENDSCROLL: begin end; end; end; end; procedure TBegaScrollBar.SetButtonSize(Value: Integer); const SysConsts: array[TScrollBarKind] of Integer = (SM_CXHSCROLL, SM_CXVSCROLL); var NewValue: Integer; begin if Value <> ButtonSize then begin NewValue := Value; if NewValue = 0 then Value := GetSystemMetrics(SysConsts[Kind]); FButtonSize := Value; FUpdateNeeded := True; FControl.UpdateScrollBars; if NewValue = 0 then FButtonSize := 0; end; end; procedure TBegaScrollBar.SetColor(Value: TColor); begin if Value <> Color then begin FColor := Value; FParentColor := False; FUpdateNeeded := True; FControl.UpdateScrollBars; end; end; procedure TBegaScrollBar.SetParentColor(Value: Boolean); begin if ParentColor <> Value then begin FParentColor := Value; if Value then Color := clBtnHighlight; end; end; procedure TBegaScrollBar.SetPosition(Value: Integer); var Code: Word; Form: TCustomForm; Delta: Integer; begin if csReading in FControl.ComponentState then FPosition := Value else begin if Value < 0 then Value := 0 else if Value > FMaxPos then Value := FMaxPos; if Kind = sbHorizontal then Code := SB_HORZ else Code := SB_VERT; if Value <> FPosition then begin Delta := FPosition - Value; if Kind = sbHorizontal then FControl.ScrollBy(Delta, 0) else FControl.ScrollBy(0, Delta); if csDesigning in FControl.ComponentState then begin Form := GetParentForm(FControl); if (Form <> nil) and (Form.Designer <> nil) then Form.Designer.Modified; end; FPosition := Value; end; if FlatSB_GetScrollPos(FControl.Handle, Code) <> FPosition then FlatSB_SetScrollPos(FControl.Handle, Code, FPosition, True); end; end; procedure TBegaScrollBar.SetSize(Value: Integer); const SysConsts: array[TScrollBarKind] of Integer = (SM_CYHSCROLL, SM_CYVSCROLL); var NewValue: Integer; begin if Value <> Size then begin NewValue := Value; if NewValue = 0 then Value := GetSystemMetrics(SysConsts[Kind]); FSize := Value; FUpdateNeeded := True; FControl.UpdateScrollBars; if NewValue = 0 then FSize := 0; end; end; procedure TBegaScrollBar.SetStyle(Value: TScrollBarStyle); begin if Style <> Value then begin FStyle := Value; FUpdateNeeded := True; FControl.UpdateScrollBars; end; end; procedure TBegaScrollBar.SetThumbSize(Value: Integer); begin if Value <> ThumbSize then begin FThumbSize := Value; FUpdateNeeded := True; FControl.UpdateScrollBars; end; end; procedure TBegaScrollBar.DoSetRange(Value: Integer); begin FRange := Value; if FRange < 0 then FRange := 0; FControl.UpdateScrollBars; end; function TBegaScrollBar.IsRangeStored: Boolean; begin Result := not FControl.AutoScroll; end; procedure TBegaScrollBar.SetVisible(Value: Boolean); begin FVisible := Value; FControl.UpdateScrollBars; end; procedure TBegaScrollBar.Update(ControlSB, AssumeSB: Boolean); type TPropKind = (pkStyle, pkButtonSize, pkThumbSize, pkSize, pkBkColor); const Props: array[TScrollBarKind, TPropKind] of Integer = ( { Horizontal } (WSB_PROP_HSTYLE, WSB_PROP_CXHSCROLL, WSB_PROP_CXHTHUMB, WSB_PROP_CYHSCROLL, WSB_PROP_HBKGCOLOR), { Vertical } (WSB_PROP_VSTYLE, WSB_PROP_CYVSCROLL, WSB_PROP_CYVTHUMB, WSB_PROP_CXVSCROLL, WSB_PROP_VBKGCOLOR)); // Kinds: array[TScrollBarKind] of Integer = (WSB_PROP_HSTYLE, WSB_PROP_VSTYLE); Styles: array[TScrollBarStyle] of Integer = (FSB_REGULAR_MODE, FSB_ENCARTA_MODE, FSB_FLAT_MODE); Code: array[TScrollBarKind] of Word = (SB_HORZ, SB_VERT); var ScrollInfo: TScrollInfo; procedure UpdateScrollProperties(Redraw: Boolean); begin FlatSB_SetScrollProp(FControl.Handle, Props[Kind, pkStyle], Styles[Style], Redraw); if ButtonSize > 0 then FlatSB_SetScrollProp(FControl.Handle, Props[Kind, pkButtonSize], ButtonSize, False); if ThumbSize > 0 then FlatSB_SetScrollProp(FControl.Handle, Props[Kind, pkThumbSize], ThumbSize, False); if Size > 0 then FlatSB_SetScrollProp(FControl.Handle, Props[Kind, pkSize], Size, False); FlatSB_SetScrollProp(FControl.Handle, Props[Kind, pkBkColor], ColorToRGB(Color), False); end; var BarSize: Integer; begin if Visible then begin BarSize := ControlSize(ControlSB, AssumeSB); if BarSize > FRange then BarSize := FRange; end else BarSize := FRange; FMaxPos := FRange - BarSize; ScrollInfo.cbSize := SizeOf(ScrollInfo); ScrollInfo.fMask := SIF_ALL; ScrollInfo.nMin := 0; if FMaxPos > 0 then ScrollInfo.nMax := FRange else ScrollInfo.nMax := 0; ScrollInfo.nPage := BarSize + 1; ScrollInfo.nPos := FPosition; ScrollInfo.nTrackPos := FPosition; UpdateScrollProperties(FUpdateNeeded); FUpdateNeeded := False; FlatSB_SetScrollInfo(FControl.Handle, Code[Kind], ScrollInfo, True); SetPosition(FPosition); FPageIncrement := (ControlSize(True, False) * 9) div 10; if Smooth then FIncrement := FPageIncrement div 10; end; //- BG ----------------------------------------------------------- 21.01.2006 -- procedure TBegaScrollBar.SetRange(Value: Integer); begin FControl.FAutoScroll := False; FScaled := True; DoSetRange(Value); end; //- BG ----------------------------------------------------------- 22.02.2006 -- function TBegaScrollBar.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; begin Result := Visible; Position := Position - WheelDelta; end; { TBegaScrollingWinControl } constructor TBegaScrollingWinControl.Create(AOwner: TComponent); begin inherited Create(AOwner); FHorzScrollBar := TBegaScrollBar.Create(Self, sbHorizontal); FVertScrollBar := TBegaScrollBar.Create(Self, sbVertical); FAutoScroll := True; FPanningEnabled := True; end; destructor TBegaScrollingWinControl.Destroy; begin FHorzScrollBar.Free; FVertScrollBar.Free; inherited Destroy; end; procedure TBegaScrollingWinControl.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); with Params.WindowClass do style := style and not (CS_HREDRAW or CS_VREDRAW); end; procedure TBegaScrollingWinControl.CreateWnd; begin inherited CreateWnd; //! Scroll bars don't move to the Left side of a TBegaScrollingWinControl when the //! WS_EX_LeftScrollBar flag is set and InitializeFlatSB is called. //! A call to UnInitializeFlatSB does nothing. if not SysLocale.MiddleEast and not CheckWin32Version(5, 1) then InitializeFlatSB(Handle); UpdateScrollBars; end; procedure TBegaScrollingWinControl.AlignControls(AControl: TControl; var ARect: TRect); begin CalcAutoRange; inherited AlignControls(AControl, ARect); end; function TBegaScrollingWinControl.AutoScrollEnabled: Boolean; begin Result := not AutoSize and not (DockSite and UseDockManager); end; procedure TBegaScrollingWinControl.DoFlipChildren; var Loop: Integer; TheWidth: Integer; ScrollBarActive: Boolean; FlippedList: TList; begin FlippedList := TList.Create; try TheWidth := ClientWidth; with HorzScrollBar do begin ScrollBarActive := (IsScrollBarVisible) and (TheWidth < Range); if ScrollBarActive then begin TheWidth := Range; Position := 0; end; end; for Loop := 0 to ControlCount - 1 do with Controls[Loop] do begin FlippedList.Add(Controls[Loop]); Left := TheWidth - Width - Left; end; { Allow controls that have associations to realign themselves } for Loop := 0 to FlippedList.Count - 1 do TControl(FlippedList[Loop]).Perform(CM_ALLCHILDRENFLIPPED, 0, 0); if ScrollBarActive then HorzScrollBar.ChangeBiDiPosition; finally FlippedList.Free; end; end; procedure TBegaScrollingWinControl.CalcAutoRange; begin if FAutoRangeCount <= 0 then begin HorzScrollBar.CalcAutoRange; VertScrollBar.CalcAutoRange; end; end; procedure TBegaScrollingWinControl.SetAutoScroll(Value: Boolean); begin if FAutoScroll <> Value then begin FAutoScroll := Value; if Value then CalcAutoRange else begin HorzScrollBar.setRange(0); VertScrollBar.setRange(0); end; end; end; procedure TBegaScrollingWinControl.SetHorzScrollBar(Value: TBegaScrollBar); begin FHorzScrollBar.Assign(Value); end; procedure TBegaScrollingWinControl.SetVertScrollBar(Value: TBegaScrollBar); begin FVertScrollBar.Assign(Value); end; procedure TBegaScrollingWinControl.UpdateScrollBars; begin if not FUpdatingScrollBars and HandleAllocated then try FUpdatingScrollBars := True; if FVertScrollBar.NeedsScrollBarVisible then begin FHorzScrollBar.Update(False, True); FVertScrollBar.Update(True, False); end else if FHorzScrollBar.NeedsScrollBarVisible then begin FVertScrollBar.Update(False, True); FHorzScrollBar.Update(True, False); end else begin FVertScrollBar.Update(False, False); FHorzScrollBar.Update(True, False); end; finally FUpdatingScrollBars := False; end; end; procedure TBegaScrollingWinControl.AutoScrollInView(AControl: TControl); begin if (AControl <> nil) and not (csLoading in AControl.ComponentState) and not (csLoading in ComponentState) then ScrollInView(AControl); end; procedure TBegaScrollingWinControl.DisableAutoRange; begin Inc(FAutoRangeCount); end; procedure TBegaScrollingWinControl.EnableAutoRange; begin if FAutoRangeCount > 0 then begin Dec(FAutoRangeCount); if (FAutoRangeCount = 0) and (FHorzScrollBar.Visible or FVertScrollBar.Visible) then CalcAutoRange; end; end; procedure TBegaScrollingWinControl.ScrollInView(AControl: TControl); var Rect: TRect; begin if AControl = nil then Exit; Rect := AControl.ClientRect; Dec(Rect.Left, HorzScrollBar.Margin); Inc(Rect.Right, HorzScrollBar.Margin); Dec(Rect.Top, VertScrollBar.Margin); Inc(Rect.Bottom, VertScrollBar.Margin); Rect.TopLeft := ScreenToClient(AControl.ClientToScreen(Rect.TopLeft)); Rect.BottomRight := ScreenToClient(AControl.ClientToScreen(Rect.BottomRight)); if Rect.Left < 0 then with HorzScrollBar do Position := Position + Rect.Left else if Rect.Right > ClientWidth then begin if Rect.Right - Rect.Left > ClientWidth then Rect.Right := Rect.Left + ClientWidth; with HorzScrollBar do Position := Position + Rect.Right - ClientWidth; end; if Rect.Top < 0 then with VertScrollBar do Position := Position + Rect.Top else if Rect.Bottom > ClientHeight then begin if Rect.Bottom - Rect.Top > ClientHeight then Rect.Bottom := Rect.Top + ClientHeight; with VertScrollBar do Position := Position + Rect.Bottom - ClientHeight; end; end; procedure TBegaScrollingWinControl.ScaleScrollBars(M, D: Integer); begin if M <> D then begin if not (csLoading in ComponentState) then begin HorzScrollBar.FScaled := True; VertScrollBar.FScaled := True; end; HorzScrollBar.Position := 0; VertScrollBar.Position := 0; if not FAutoScroll then begin with HorzScrollBar do if FScaled then Range := MulDiv(Range, M, D); with VertScrollBar do if FScaled then Range := MulDiv(Range, M, D); end; end; HorzScrollBar.FScaled := False; VertScrollBar.FScaled := False; end; procedure TBegaScrollingWinControl.ChangeScale(M, D: Integer); begin ScaleScrollBars(M, D); inherited ChangeScale(M, D); end; procedure TBegaScrollingWinControl.Resizing(State: TWindowState); begin // Overridden by TCustomFrame end; procedure TBegaScrollingWinControl.WMSize(var Message: TWMSize); var NewState: TWindowState; begin Inc(FAutoRangeCount); try inherited; NewState := wsNormal; case Message.SizeType of SIZENORMAL: NewState := wsNormal; SIZEICONIC: NewState := wsMinimized; SIZEFULLSCREEN: NewState := wsMaximized; end; Resizing(NewState); finally Dec(FAutoRangeCount); end; FUpdatingScrollBars := True; try CalcAutoRange; finally FUpdatingScrollBars := False; end; if FHorzScrollBar.Visible or FVertScrollBar.Visible then UpdateScrollBars; end; procedure TBegaScrollingWinControl.WMHScroll(var Message: TWMHScroll); begin if (Message.ScrollBar = 0) and FHorzScrollBar.Visible then FHorzScrollBar.ScrollMessage(Message) else inherited; end; procedure TBegaScrollingWinControl.WMVScroll(var Message: TWMVScroll); begin if (Message.ScrollBar = 0) and FVertScrollBar.Visible then FVertScrollBar.ScrollMessage(Message) else inherited; end; procedure TBegaScrollingWinControl.AdjustClientRect(var Rect: TRect); begin Rect := Bounds(-HorzScrollBar.Position, -VertScrollBar.Position, Max(HorzScrollBar.Range, ClientWidth), Max(VertScrollBar.Range, ClientHeight)); inherited AdjustClientRect(Rect); end; procedure TBegaScrollingWinControl.CMBiDiModeChanged(var Message: TMessage); var Save: Integer; begin Save := Message.WParam; try { prevent inherited from calling Invalidate & RecreateWnd } if not (Self is TBegaScrollBox) then Message.wParam := 1; inherited; finally Message.wParam := Save; end; if HandleAllocated then begin HorzScrollBar.ChangeBiDiPosition; UpdateScrollBars; end; end; //- BG ----------------------------------------------------------- 22.01.2006 -- function TBegaScrollingWinControl.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; begin Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); if not Result and not (ssAlt in Shift) then Result := VertScrollBar.DoMouseWheel(Shift, WheelDelta, MousePos); if not Result then Result := HorzScrollBar.DoMouseWheel(Shift, WheelDelta, MousePos); end; //- BG ----------------------------------------------------------- 13.07.2006 -- function TBegaScrollingWinControl.isPanning: Boolean; begin Result := FPanning; end; //- BG ----------------------------------------------------------- 13.07.2006 -- procedure TBegaScrollingWinControl.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if FPanningEnabled and (Shift * [ssShift, ssAlt, ssCtrl] = []) then begin FPanning := True; FPanningStart.X := X; FPanningStart.Y := Y; end else inherited; end; //-- BG ---------------------------------------------------------- 29.07.2013 -- function TBegaScrollingWinControl.GetMaxScroll(): TPoint; var I: Integer; Control: TControl; begin // Do not scroll topest leftest corner of all child controls into my client rect. Result.X := 0; Result.Y := 0; for I := 0 to ControlCount - 1 do begin Control := Controls[I]; Result.X := Max(Result.X, -Control.Left); Result.Y := Max(Result.Y, -Control.Top); end; end; //- BG ----------------------------------------------------------- 13.07.2006 -- procedure TBegaScrollingWinControl.MouseMove(Shift: TShiftState; X, Y: Integer); var Scroll: TPoint; begin if FPanning then begin Scroll := GetMaxScroll; Scroll.X := Min(Scroll.X, X - FPanningStart.X); Scroll.Y := Min(Scroll.Y, Y - FPanningStart.Y); ScrollBy(Scroll.X, Scroll.Y); FPanningStart.X := X; FPanningStart.Y := Y; end else inherited; end; //- BG ----------------------------------------------------------- 13.07.2006 -- procedure TBegaScrollingWinControl.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var Scroll: TPoint; begin if FPanning then begin Scroll := GetMaxScroll; Scroll.X := Min(Scroll.X, X - FPanningStart.X); Scroll.Y := Min(Scroll.Y, Y - FPanningStart.Y); ScrollBy(Scroll.X, Scroll.Y); FPanning := False; end else inherited; end; {$ifdef UseVCLStyles} type TWinControlClassHook = class(TWinControl); class constructor TBegaScrollingWinControl.Create; {Workaround for an issue calling TCustomStyleEngine.RegisterStyleHook in Delphi XE2. It turns out that an abstract method TCustomStyleEngine.Notification was being called by TCustomStyleEngine.UnRegisterStyleHook . This could cause the program to raise an Abstract Method exception when exiting. This is the exact same issue as described at http://code.google.com/p/virtual-treeview/issues/detail?id=345 . } begin {$ifdef HasSystemUITypes} TCustomStyleEngine.RegisterStyleHook(TBegaScrollingWinControl, TBegaScrollingWinControlStyleHook); {$else} TStyleEngine.RegisterStyleHook(TBegaScrollingWinControl, TBegaScrollingWinControlStyleHook); {$endif} end; class destructor TBegaScrollingWinControl.Destroy; begin {$ifdef HasSystemUITypes} TCustomStyleEngine.UnRegisterStyleHook(TBegaScrollingWinControl, TBegaScrollingWinControlStyleHook); {$else} TStyleEngine.UnRegisterStyleHook(TBegaScrollingWinControl, TBegaScrollingWinControlStyleHook); {$endif} end; procedure TBegaScrollingWinControlStyleHook.WndProc(var Message: TMessage); begin // Reserved for potential updates inherited; end; constructor TBegaScrollingWinControlStyleHook.Create(AControl: TWinControl); begin inherited; OverrideEraseBkgnd := True; {$ifdef has_StyleElements} if seClient in Control.StyleElements then Brush.Color := StyleServices.GetStyleColor(scPanel) else Brush.Color := TWinControlClassHook(Control).Color; {$else} Brush.Color := StyleServices.GetStyleColor(scListBox); {$Endif} end; {$endif} { TBegaScrollBox } constructor TBegaScrollBox.Create(AOwner: TComponent); begin inherited Create(AOwner); ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks]; Width := 185; Height := 41; FBorderStyle := bsSingle; end; procedure TBegaScrollBox.CreateParams(var Params: TCreateParams); const BorderStyles: array[TBorderStyle] of DWORD = (0, WS_BORDER); begin inherited CreateParams(Params); with Params do begin Style := Style or BorderStyles[FBorderStyle]; if NewStyleControls {$ifndef LCL} and Ctl3D {$endif} and (FBorderStyle = bsSingle) then begin Style := Style and not WS_BORDER; ExStyle := ExStyle or WS_EX_CLIENTEDGE; end; end; end; procedure TBegaScrollBox.SetBorderStyle(Value: TBorderStyle); begin if Value <> FBorderStyle then begin FBorderStyle := Value; RecreateWnd {$ifdef LCL}(Self){$endif}; end; end; {$ifndef LCL} procedure TBegaScrollBox.CMCtl3DChanged(var Message: TMessage); begin if NewStyleControls and (FBorderStyle = bsSingle) then RecreateWnd; inherited; end; {$endif} { EBegaScrollBoxEnumException } //- BG ----------------------------------------------------------- 23.01.2005 -- constructor EBegaScrollBoxEnumException.createEnum(EnumType: PTypeInfo; const Value); begin inherited createFmt('unsupported: %s.%s', [EnumType.Name, GetEnumName(EnumType, integer(Value))]); end; end.
29.450161
107
0.706709
8301805db10aa2a1d806749ad242075fe65b8317
312
pas
Pascal
Test/BuildScripts/PartialA.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
79
2015-03-18T10:46:13.000Z
2022-03-17T18:05:11.000Z
Test/BuildScripts/PartialA.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
6
2016-03-29T14:39:00.000Z
2020-09-14T10:04:14.000Z
Test/BuildScripts/PartialA.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
25
2016-05-04T13:11:38.000Z
2021-09-29T13:34:31.000Z
unit PartialA; interface type TTest = partial class FieldA : String = 'hello'; procedure PrintA; procedure AdjustA; end; implementation procedure TTest.PrintA; begin PrintLn('A: '+FieldA); end; procedure TTest.AdjustA; begin FieldA:='world'; end; end.
12.48
33
0.615385
6a8da01c159dfb5c8bd2a44aec28f7e757a9f251
866
pas
Pascal
src/CatPointer.pas
esc0rtd3w/catarinka
9163779539557d95b30205c4c817afcdff1332c9
[ "BSD-3-Clause" ]
null
null
null
src/CatPointer.pas
esc0rtd3w/catarinka
9163779539557d95b30205c4c817afcdff1332c9
[ "BSD-3-Clause" ]
null
null
null
src/CatPointer.pas
esc0rtd3w/catarinka
9163779539557d95b30205c4c817afcdff1332c9
[ "BSD-3-Clause" ]
1
2020-02-14T00:58:07.000Z
2020-02-14T00:58:07.000Z
unit CatPointer; { Catarinka - Pointer To String and vice-versa functions Copyright (c) 2014 Felipe Daragon License: 3-clause BSD See https://github.com/felipedaragon/catarinka/ for details } interface {$I Catarinka.inc} uses {$IFDEF DXE2_OR_UP} System.SysUtils; {$ELSE} SysUtils; {$ENDIF} function PointerToStr(const P: Pointer): string; function StrToPointer(const s: string): Pointer; implementation function PointerToStr(const P: Pointer): string; var PP: Pointer; PC: ^Cardinal; begin PP := @P; PC := PP; Result := string(pansichar(PC^)); end; function StrToPointer(const s: string): Pointer; var c: Cardinal; P: Pointer; PC: ^Cardinal; PP: ^Pointer; tStr: pansichar; begin GetMem(tStr, 1 + Length(s)); StrPCopy(tStr, ansistring(s)); c := integer(tStr); PC := @c; P := PC; PP := P; Result := PP^; end; end.
16.339623
61
0.677829
f1ae68520097afdb6d10d36d6c8af8b265028565
333
dpr
Pascal
hw.dpr
memoguard/Hw
4280ac7807284a2e3ba405ce27d4d0b95f348578
[ "Apache-2.0" ]
null
null
null
hw.dpr
memoguard/Hw
4280ac7807284a2e3ba405ce27d4d0b95f348578
[ "Apache-2.0" ]
null
null
null
hw.dpr
memoguard/Hw
4280ac7807284a2e3ba405ce27d4d0b95f348578
[ "Apache-2.0" ]
null
null
null
program hw; uses FastMM4, Forms, SynCommons, SynLog, SynLZ, uhw in 'uhw.pas' {frmhw}; begin Application.Initialize; with TSynLog.Family do begin Level := LOG_VERBOSE; PerThreadLog := ptOneFilePerThread; EchoToConsole := LOG_VERBOSE; end; Application.CreateForm(Tfrmhw, frmhw); Application.Run; end.
16.65
40
0.702703
f1464736d0fa076bead9bdd1ab41082e3e553801
4,159
pas
Pascal
dom/pospolite.view.dom.document.pas
khongten001/PospoliteView
e20308e1b621712c6483053419759076a93e5f01
[ "BSD-3-Clause" ]
null
null
null
dom/pospolite.view.dom.document.pas
khongten001/PospoliteView
e20308e1b621712c6483053419759076a93e5f01
[ "BSD-3-Clause" ]
null
null
null
dom/pospolite.view.dom.document.pas
khongten001/PospoliteView
e20308e1b621712c6483053419759076a93e5f01
[ "BSD-3-Clause" ]
null
null
null
unit Pospolite.View.DOM.Document; { +-------------------------+ | Package: Pospolite View | | Author: Matek0611 | | Email: matiowo@wp.pl | | Version: 1.0p | +-------------------------+ Comments: ... } {$mode objfpc}{$H+} interface uses Classes, SysUtils, Pospolite.View.Basics, Pospolite.View.CSS.Selector; type { TPLHTMLDocumentQueries } TPLHTMLDocumentQueries = class sealed public class function querySelectorFast(const AQuery: TPLString; AObject: TPLHTMLObject; const AFirstOnly: TPLBool): TPLHTMLObjects; class function querySelector(const AQuery: TPLString; AObject: TPLHTMLObject ): TPLHTMLObject; class function querySelectorAll(const AQuery: TPLString; AObject: TPLHTMLObject ): TPLHTMLObjects; inline; end; implementation { TPLHTMLDocumentQueries } class function TPLHTMLDocumentQueries.querySelectorFast( const AQuery: TPLString; AObject: TPLHTMLObject; const AFirstOnly: TPLBool ): TPLHTMLObjects; var sel: IPLCSSSelectors; s: TPLCSSSelector; i, j, id: SizeInt; ssp: TPLCSSSimpleSelectorPattern; tmp: IPLHTMLObjects; res: TPLBool; objp, obja: TPLHTMLObject; procedure TrySelect(a: TPLHTMLObject); var obj, applied: TPLHTMLObject; begin if not Assigned(a) then exit; if ssp.AppliesTo(a, applied) then tmp.Add(applied); for obj in a.Children do TrySelect(obj); end; begin Result := TPLHTMLObjects.Create(false); if not Assigned(AObject) then exit; tmp := TPLHTMLObjects.Create(false); sel := TPLCSSSelectorParser.ParseSelector(AQuery); for s in sel do begin // parsowanie od tyłu, jak to robi przeglądarka tmp.Clear; ssp := s.SimpleSelectors.Last; TrySelect(AObject); for i := 0 to tmp.Count-1 do begin res := true; objp := tmp[i]; for j := s.Combinators.Count-1 downto 0 do begin ssp := s.SimpleSelectors[j]; case s.Combinators[j].Value of scDescendant: begin objp := objp.Parent; res := false; while Assigned(objp) do begin if ssp.AppliesTo(objp, obja) then begin res := true; objp := obja; break; end else objp := objp.Parent; end; end; scChild: begin objp := objp.Parent; if ssp.AppliesTo(objp, obja) then begin objp := obja; break; end else res := false; end; scAdjascentSibling: begin obja := objp.Parent; id := objp.GetIDFromParent; if id > 0 then begin id -= 1; // omijanie zwykłego tekstu while (id >= 0) and (obja.Children[id].Name = 'internal_text_object') do id -= 1; res := (id >= 0) and ssp.AppliesTo(obja.Children[id], objp); end else res := false; end; scGeneralSibling: begin obja := objp.Parent; id := objp.GetIDFromParent; if id > 0 then begin id -= 1; while (id >= 0) and not ssp.AppliesTo(objp.Parent.Children[id], obja) do id -= 1; res := id >= 0; if res then objp := obja; end else res := false; end; scUndefined: res := false; end; if not res then break; end; if res and (Result.Find(tmp[i]) < 0) then Result.Add(tmp[i]); end; end; if AFirstOnly then while Result.Count > 1 do Result.Pop; end; class function TPLHTMLDocumentQueries.querySelector(const AQuery: TPLString; AObject: TPLHTMLObject): TPLHTMLObject; var objs: IPLHTMLObjects; begin // false cuz we can omit while by objs.First objs := querySelectorFast(AQuery, AObject, false); if not objs.Empty then Result := objs.First else Result := nil; end; class function TPLHTMLDocumentQueries.querySelectorAll(const AQuery: TPLString; AObject: TPLHTMLObject): TPLHTMLObjects; begin Result := querySelectorFast(AQuery, AObject, false); end; end.
25.832298
95
0.592931
85ed7ddbba121ce947dca8789bac7a2c48327b56
6,760
pas
Pascal
source/Http/Fido.Http.Response.pas
sirodcar/FidoLib
4e9337482e4ac3a050d9daf8e964b3f2223c7649
[ "MIT" ]
1
2021-11-28T20:30:36.000Z
2021-11-28T20:30:36.000Z
source/Http/Fido.Http.Response.pas
sirodcar/FidoLib
4e9337482e4ac3a050d9daf8e964b3f2223c7649
[ "MIT" ]
null
null
null
source/Http/Fido.Http.Response.pas
sirodcar/FidoLib
4e9337482e4ac3a050d9daf8e964b3f2223c7649
[ "MIT" ]
1
2021-11-28T20:30:38.000Z
2021-11-28T20:30:38.000Z
(* * Copyright 2021 Mirko Bianco (email: writetomirko@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *) unit Fido.Http.Response; interface uses System.Classes, System.SysUtils, Generics.Defaults, Spring, Spring.Collections, Fido.Http.Types, Fido.Http.RequestInfo.Intf, Fido.Http.ResponseInfo.Intf, Fido.Http.Response.Intf, Fido.DesignPatterns.Decorator.TIdHTTPRequestInfoAsIHTTPRequestInfo; type THttpResponse = class(TInterfacedObject, IHttpResponse) private FRequestInfo: IHTTPRequestInfo; FResponseInfo: IHTTPResponseInfo; FResponseCode: Integer; FBody: string; FHeaderParams: IDictionary<string, string>; FMimeType: TMimeType; FResponseText: string; constructor StringsToDictionary( const Strings: TStrings; const Dictionary: IDictionary<string, string>); procedure ApplyChanges; public constructor Create( const RequestInfo: IHTTPRequestInfo; const ResponseInfo: IHTTPResponseInfo); procedure SetResponseCode( const ResponseCode: Integer; const ResponseText: string = ''); function Body: string; procedure SetBody(const Body: string); procedure SetStream(const Stream: TStream); function HeaderParams: IDictionary<string, string>; function MimeType: TMimeType; procedure SetMimeType(const MimeType: TMimeType); procedure ServeFile(FilenamePath: string); procedure WriteHeader; procedure WriteBytesToWebSocket(const Buffer: TWSBytes); procedure ReadBytesFromWebSocket(var Buffer: TWSBytes; ByteCount: Integer; Append: Boolean = True); procedure DisconnectWebSocket; function GetWebSocketSignature(const Key: string): string; end; implementation { THttpResponse } procedure THttpResponse.ServeFile(FilenamePath: string); begin FResponseInfo.SmartServeFile(FilenamePath); end; procedure THttpResponse.SetBody(const Body: string); begin FBody := Body; end; procedure THttpResponse.SetMimeType(const MimeType: TMimeType); begin FMimeType := MimeType; FResponseInfo.SetContentType(SMimeType[MimeType]); end; procedure THttpResponse.SetResponseCode(const ResponseCode: Integer; const ResponseText: string); begin FResponseCode := ResponseCode; FResponseText := ResponseText; ApplyChanges; end; procedure THttpResponse.SetStream(const Stream: TStream); begin FResponseInfo.SetContentStream(Stream); end; constructor THttpResponse.StringsToDictionary(const Strings: TStrings; const Dictionary: IDictionary<string, string>); var I: Integer; begin Guard.CheckNotNull(Strings, 'Strings'); Guard.CheckNotNull(Dictionary, 'Dictionary'); Strings.Text := FResponseInfo.EncodeString(Strings.Text); for I := 0 to Strings.Count - 1 do Dictionary.AddOrSetValue(Strings.Names[I], Strings.ValueFromIndex[I]); end; procedure THttpResponse.WriteBytesToWebSocket(const Buffer: TWSBytes); begin FResponseInfo.WriteBytesToWebSocket(Buffer); end; procedure THttpResponse.WriteHeader; begin FResponseInfo.WriteHeader; end; constructor THttpResponse.Create(const RequestInfo: IHTTPRequestInfo; const ResponseInfo: IHTTPResponseInfo); var TempBodyParams: Shared<TStringList>; Accepts: Shared<TStringList>; MimeLine: Shared<TStringList>; MimeTypeIndex: Integer; StringMimeType: string; I: Integer; Found: Boolean; function ConvertToRestCommand(const Item: string): THttpMethod; var I: Integer; begin Result := rmUnknown; for I := 0 to Integer(High(SHttpMethod)) do if UpperCase(SHttpMethod[THttpMethod(I)]) = UpperCase(Item) then Exit(THttpMethod(I)); end; begin Guard.CheckNotNull(RequestInfo, 'RequestInfo'); Guard.CheckNotNull(ResponseInfo, 'ResponseInfo'); FRequestInfo := RequestInfo; FResponseInfo := ResponseInfo; inherited Create; FHeaderParams := TCollections.CreateDictionary<string, string>(TIStringComparer.Ordinal); TempBodyParams := TStringList.Create; Accepts := TStringList.Create; Accepts.Value.Delimiter := ','; Accepts.Value.DelimitedText := RequestInfo.Accept; Found := False; MimeTypeIndex := -1; for I := 0 to Accepts.Value.Count - 1 do begin MimeLine := TStringList.Create; MimeLine.Value.Delimiter := ';'; MimeLine.Value.DelimitedText := Accepts.Value[I]; MimeTypeIndex := -1; for StringMimeType in SMimeType do begin Inc(MimeTypeIndex); if Trim(MimeLine.Value[0].ToUpper) = StringMimeType.ToUpper then begin Found := True; Break; end; end; if Found then Break end; if Found then FMimeType := TMimeType(MimeTypeIndex); StringsToDictionary(RequestInfo.RawHeaders, FHeaderParams); FResponseCode := ResponseInfo.ResponseCode; ResponseInfo.SetContentType(SMimeType[FMimeType]); end; procedure THttpResponse.DisconnectWebSocket; begin FResponseInfo.DisconnectWebSocket; end; function THttpResponse.GetWebSocketSignature(const Key: string): string; begin Result := FResponseInfo.GetWebSocketSignature(Key); end; procedure THttpResponse.ApplyChanges; begin FResponseInfo.SetResponseCode(FResponseCode); if not FResponseText.IsEmpty then FResponseInfo.SetResponseText(FResponseText); FResponseInfo.SetContentText(Body); FResponseInfo.SetCustomHeaders(FHeaderParams); end; function THttpResponse.Body: string; begin Result := FBody; end; function THttpResponse.HeaderParams: IDictionary<string, string>; begin Result := FHeaderParams; end; function THttpResponse.MimeType: TMimeType; begin Result := FMimeType; end; procedure THttpResponse.ReadBytesFromWebSocket(var Buffer: TWSBytes; ByteCount: Integer; Append: Boolean); begin FResponseInfo.ReadBytesFromWebSocket(Buffer, ByteCount, Append); end; end.
27.479675
118
0.759172
8332543e7db299a0379d231d9d727549383dad57
13,148
pas
Pascal
Settings/Streams/SettingsStream.pas
coolchyni/jcf-cli
69fd71b962fd1c1386ec4939e94dab70568bf7e6
[ "MIT" ]
22
2018-05-31T23:01:15.000Z
2021-11-16T11:25:36.000Z
Settings/Streams/SettingsStream.pas
luridarmawan/jcf-cli
aa61b3ae771ce8c9c45b8f5c3a3109f8ca82fc02
[ "MIT" ]
1
2018-08-14T21:15:51.000Z
2018-08-15T12:42:58.000Z
Settings/Streams/SettingsStream.pas
luridarmawan/jcf-cli
aa61b3ae771ce8c9c45b8f5c3a3109f8ca82fc02
[ "MIT" ]
6
2018-05-31T06:31:55.000Z
2022-02-19T03:04:14.000Z
{(*} (*------------------------------------------------------------------------------ Delphi Code formatter source code The Original Code is SettingsStream.pas, released October 2001. The Initial Developer of the Original Code is Anthony Steele. Portions created by Anthony Steele are Copyright (C) 1999-2008 Anthony Steele. All Rights Reserved. Contributor(s): Anthony Steele. The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"). you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the "GPL") See http://www.gnu.org/licenses/gpl.html ------------------------------------------------------------------------------*) {*)} unit SettingsStream; { AFS 5 October 2001 fns used in writing settings to a stream And yes, this was influenced by the fact that I have been recently working with Java io classes } {$I JcfGlobal.inc} interface uses { delphi } Classes; type // abstract base class - interface TSettingsOutput = class(TObject) private public procedure WriteXMLHeader; virtual; abstract; procedure OpenSection(const psName: string); virtual; abstract; procedure CloseSection(const psName: string); virtual; abstract; procedure Write(const psTagName, psValue: string); overload; virtual; abstract; procedure Write(const psTagName: string; const piValue: integer); overload; virtual; abstract; procedure Write(const psTagName: string; const pbValue: boolean); overload; virtual; abstract; procedure Write(const psTagName: string; const pdValue: double); overload; virtual; abstract; procedure Write(const psTagName: string; const pcValue: TStrings); overload; virtual; abstract; end; // sublcass that wraps a stream (eg a file). TSettingsStreamOutput = class(TSettingsOutput) private fcStream: TStream; fbOwnStream: boolean; fiOpenSections: integer; procedure WriteText(const psText: string); public constructor Create(const psFileName: string); overload; constructor Create(const pcStream: TStream); overload; destructor Destroy; override; procedure WriteXMLHeader; override; procedure OpenSection(const psName: string); override; procedure CloseSection(const psName: string); override; procedure Write(const psTagName, psValue: string); override; procedure Write(const psTagName: string; const piValue: integer); override; procedure Write(const psTagName: string; const pbValue: boolean); override; procedure Write(const psTagName: string; const pdValue: double); override; procedure Write(const psTagName: string; const pcValue: TStrings); override; end; { settings reading interface } TSettingsInput = class(TObject) public function ExtractSection(const psSection: string): TSettingsInput; virtual; abstract; function HasTag(const psTag: string): boolean; virtual; abstract; function Read(const psTag: string): string; overload; virtual; abstract; function Read(const psTag, psDefault: string): string; overload; virtual; abstract; function Read(const psTag: string; const piDefault: integer): integer; overload; virtual; abstract; function Read(const psTag: string; const pfDefault: double): double; overload; virtual; abstract; function Read(const psTag: string; const pbDefault: boolean): boolean; overload; virtual; abstract; function Read(const psTag: string; const pcStrings: TStrings): boolean; overload; virtual; abstract; end; { object to read settings from a string } TSettingsInputString = class(TSettingsInput) private fsText: string; procedure InternalGetValue(const psTag: string; out psResult: string; out pbFound: boolean); //function RestrictToSection(const psSection: string): boolean; public constructor Create(const psText: string); destructor Destroy; override; function ExtractSection(const psSection: string): TSettingsInput; override; function HasTag(const psTag: string): boolean; override; function Read(const psTag: string): string; override; function Read(const psTag, psDefault: string): string; override; function Read(const psTag: string; const piDefault: integer): integer; override; function Read(const psTag: string; const pfDefault: double): double; override; function Read(const psTag: string; const pbDefault: boolean): boolean; override; function Read(const psTag: string; const pcStrings: TStrings): boolean; override; property Text: string Read fsText; end; { dummy impl that always returns the default } { TSettingsInputDummy } TSettingsInputDummy = class(TSettingsInput) private public function ExtractSection(const {%H-}psSection: string): TSettingsInput; override; function HasTag(const {%H-}psTag: string): boolean; override; function Read(const {%H-}psTag: string): string; override; function Read(const {%H-}psTag, psDefault: string): string; override; function Read(const {%H-}psTag: string; const piDefault: integer): integer; override; function Read(const {%H-}psTag: string; const pfDefault: double): double; override; function Read(const {%H-}psTag: string; const pbDefault: boolean): boolean; override; function Read(const {%H-}psTag: string; const {%H-}pcStrings: TStrings): boolean; override; end; implementation uses { delphi } {$ifndef fpc}Windows,{$endif} SysUtils, { local} JcfStringUtils, JcfMiscFunctions; const XML_HEADER = '<?xml version="1.0" ?>' + NativeLineBreak; constructor TSettingsStreamOutput.Create(const psFileName: string); begin inherited Create(); fcStream := TFileStream.Create(psFileName, fmCreate); fbOwnStream := True; fiOpenSections := 0; end; constructor TSettingsStreamOutput.Create(const pcStream: TStream); begin inherited Create(); fcStream := pcStream; fbOwnStream := False; fiOpenSections := 0; end; destructor TSettingsStreamOutput.Destroy; begin if fbOwnStream then fcStream.Free; fcStream := nil; inherited; end; // internal used to implement all writes procedure TSettingsStreamOutput.WriteText(const psText: string); var lp: PAnsiChar; begin Assert(fcStream <> nil); // write as 8-bit text or as 16? lp := PAnsiChar(AnsiString(psText)); fcStream.WriteBuffer(lp^, Length(psText)); end; procedure TSettingsStreamOutput.WriteXMLHeader; begin WriteText(XML_HEADER); end; procedure TSettingsStreamOutput.OpenSection(const psName: string); begin WriteText(StrRepeat(' ', fiOpenSections) + '<' + psName + '>' + NativeLineBreak); Inc(fiOpenSections); end; procedure TSettingsStreamOutput.CloseSection(const psName: string); begin Dec(fiOpenSections); WriteText(StrRepeat(' ', fiOpenSections) + '</' + psName + '>' + NativeLineBreak); end; procedure TSettingsStreamOutput.Write(const psTagName, psValue: string); var lsTemp: string; begin Assert(fcStream <> nil); lsTemp := StrRepeat(' ', fiOpenSections + 1) + '<' + psTagName + '> ' + psValue + ' </' + psTagName + '>' + NativeLineBreak; WriteText(lsTemp); end; procedure TSettingsStreamOutput.Write(const psTagName: string; const piValue: integer); begin Write(psTagName, IntToStr(piValue)); end; procedure TSettingsStreamOutput.Write(const psTagName: string; const pbValue: boolean); begin Write(psTagName, BooleanToStr(pbValue)); end; // this also works for TDateTime procedure TSettingsStreamOutput.Write(const psTagName: string; const pdValue: double); begin Write(psTagName, Float2Str(pdValue)); end; procedure TSettingsStreamOutput.Write(const psTagName: string; const pcValue: TStrings); begin Write(psTagName, pcValue.CommaText); end; {----------------------------------------------------------------------------- SettingsInputString } constructor TSettingsInputString.Create(const psText: string); begin inherited Create; fsText := psText; end; destructor TSettingsInputString.Destroy; begin inherited; end; procedure TSettingsInputString.InternalGetValue(const psTag: string; out psResult: string; out pbFound: boolean); var liStart, liEnd: integer; lsStart, lsEnd: string; begin lsStart := '<' + psTag + '>'; lsEnd := '</' + psTag + '>'; liStart := StrFind(lsStart, fsText, 1); liEnd := StrFind(lsEnd, fsText, 1); if (liStart > 0) and (liEnd > liStart) then begin liStart := liStart + Length(lsStart); psResult := Copy(fsText, liStart, (liEnd - liStart)); psResult := Trim(psResult); pbFound := True; end else begin psResult := ''; pbFound := False; end; end; { function TSettingsInputString.RestrictToSection(const psSection: string): boolean; var lsNewText: string; begin InternalGetValue(psSection, lsNewText, Result); if Result then fsText := lsNewText; end; } function TSettingsInputString.ExtractSection(const psSection: string): TSettingsInput; var lsNewText: string; lbFound: boolean; begin InternalGetValue(psSection, lsNewText, lbFound); if lbFound then Result := TSettingsInputString.Create(lsNewText) else Result := nil; end; function TSettingsInputString.Read(const psTag: string): string; var lbFound: boolean; begin InternalGetValue(psTag, Result, lbFound); end; function TSettingsInputString.Read(const psTag, psDefault: string): string; var lbFound: boolean; begin InternalGetValue(psTag, Result, lbFound); if not lbFound then Result := psDefault; end; function TSettingsInputString.Read(const psTag: string; const piDefault: integer): integer; var lbFound: boolean; lsNewText: string; begin try InternalGetValue(psTag, lsNewText, lbFound); if lbFound and (lsNewText <> '') then begin // cope with some old data if AnsiSameText(lsNewText, 'true') then Result := 1 else if AnsiSameText(lsNewText, 'false') then Result := 0 else Result := StrToInt(lsNewText); end else Result := piDefault; except on E: Exception do raise Exception.Create('Could not read integer setting' + NativeLineBreak + 'name: ' + psTag + NativeLineBreak + 'value: ' + lsNewText + NativeLineBreak + E.Message); end; end; function TSettingsInputString.Read(const psTag: string; const pfDefault: double): double; var lbFound: boolean; lsNewText: string; begin try InternalGetValue(psTag, lsNewText, lbFound); if lbFound then Result := Str2Float(lsNewText) else Result := pfDefault; except on E: Exception do raise Exception.Create('Could not read float setting' + NativeLineBreak + 'name: ' + psTag + NativeLineBreak + 'value: ' + lsNewText + NativeLineBreak + E.Message); end; end; function TSettingsInputString.Read(const psTag: string; const pbDefault: boolean): boolean; var lbFound: boolean; lsNewText: string; begin try InternalGetValue(psTag, lsNewText, lbFound); if lbFound then Result := StrToBoolean(lsNewText) else Result := pbDefault; except on E: Exception do raise Exception.Create('Could not read boolean setting' + NativeLineBreak + 'name: ' + psTag + NativeLineBreak + 'value: ' + lsNewText + NativeLineBreak + E.Message); end; end; function TSettingsInputString.Read(const psTag: string; const pcStrings: TStrings): boolean; var lbFound: boolean; lsNewText: string; begin Assert(pcStrings <> nil); InternalGetValue(psTag, lsNewText, lbFound); if lbFound then begin pcStrings.CommaText := lsNewText; TrimStrings(pcStrings); end; Result := lbFound; end; function TSettingsInputString.HasTag(const psTag: string): boolean; var lsDummy: string; begin InternalGetValue(psTag, lsDummy, Result); end; { TSettingsInputDummy } function TSettingsInputDummy.Read(const psTag: string; const piDefault: integer): integer; begin Result := piDefault; end; function TSettingsInputDummy.Read(const psTag: string; const pfDefault: double): double; begin Result := pfDefault; end; function TSettingsInputDummy.Read(const psTag, psDefault: string): string; begin Result := psDefault; end; function TSettingsInputDummy.ExtractSection(const psSection: string): TSettingsInput; begin Result := TSettingsInputDummy.Create; end; function TSettingsInputDummy.HasTag(const psTag: string): boolean; begin Result := True; end; function TSettingsInputDummy.Read(const psTag: string): string; begin Result := ''; end; function TSettingsInputDummy.Read(const psTag: string; const pbDefault: boolean): boolean; begin Result := pbDefault; end; function TSettingsInputDummy.Read(const psTag: string; const pcStrings: TStrings): boolean; begin Result := True; end; end.
27.506276
104
0.715318
8586d9779feefe985a7627f455f1b87d9f921e96
15,775
pas
Pascal
Thirdy/Dcu32Int/DCUTbl.pas
Slipinir/RFindUnit
fda073d0b8efe4ec482bf2b8af9772e275699741
[ "MIT" ]
80
2016-01-27T19:28:36.000Z
2021-10-04T18:47:46.000Z
Thirdy/Dcu32Int/DCUTbl.pas
Slipinir/RFindUnit
fda073d0b8efe4ec482bf2b8af9772e275699741
[ "MIT" ]
68
2016-01-24T14:24:09.000Z
2020-12-18T10:42:42.000Z
Thirdy/Dcu32Int/DCUTbl.pas
Slipinir/RFindUnit
fda073d0b8efe4ec482bf2b8af9772e275699741
[ "MIT" ]
37
2016-02-17T05:25:24.000Z
2021-11-24T17:00:32.000Z
unit DCUTbl; (* The table of used units module of the DCU32INT utility by Alexei Hmelnov. It is used to obtain the necessary imported declarations. If the imported unit was not found, the program will still work, but, for example, will show the corresponding constant value as a HEX dump. ---------------------------------------------------------------------------- E-Mail: alex@icc.ru http://hmelnov.icc.ru/DCU/ ---------------------------------------------------------------------------- See the file "readme.txt" for more details. ------------------------------------------------------------------------ IMPORTANT NOTE: This software is provided 'as-is', without any expressed or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. *) interface uses SysUtils,Classes,DCU32,DCP{$IFDEF Win32},Windows{$ENDIF}; const PathSep = {$IFNDEF LINUX}';'{$ELSE}':'{$ENDIF}; DirSep = {$IFNDEF LINUX}'\'{$ELSE}'/'{$ENDIF}; var DCUPath: String='*'; {To disable LIB directory autodetection use -U flag} PASPath: String='*' {Let only presence of -P signals, that source lines are required}; TopLevelUnitClass: TUnitClass = TUnit; IgnoreUnitStamps: Boolean = true; function ExtractFileNamePkg(const FN: String): String; function GetDCUByName(FName,FExt: String; VerRq: integer; MSILRq: boolean; PlatformRq: TDCUPlatform; StampRq: integer): TUnit; function GetDCUOfMemory(MemP: Pointer): TUnit; procedure FreeDCU; procedure LoadSourceLines(FName: String; Lines: TStrings); procedure SetUnitAliases(const V: String); function IsDCPName(const S: String): Boolean; function LoadPackage(const FName: String; IsMain: Boolean): TDCPackage; const PkgSep = '@'; implementation {const PkgErr = Pointer(1);} var PathList: TStringList = Nil; FUnitAliases: TStringList = Nil; AddedUnitDirToPath: boolean = false; AutoLibDirNDX: Integer = -1; procedure FreePackages; var i: integer; Pkg: TDCPackage; begin if PathList=Nil then Exit; for i:=0 to PathList.Count-1 do begin Pkg := TDCPackage(PathList.Objects[i]); {if Pkg=PkgErr then Continue;} Pkg.Free; end ; PathList.Clear; end ; function ExtractFileNamePkg(const FN: String): String; {Extract file name for packaged or normal files} var CP: PChar; begin Result := ExtractFileName(FN); CP := StrScan(PChar(Result),PkgSep); if CP<>Nil then Result := StrPas(CP+1); end ; function GetDelphiLibDir(VerRq: integer; MSILRq: boolean; PlatformRq: TDCUPlatform): String; { Delphi LIB directory autodetection } {$IFDEF Win32} const sRoot = 'RootDir'; sPlatformDir: array[TDCUPlatform]of String = ('win32','win64','osx32','iOSSimulator','iOSDevice','Android'); var Key: HKey; sPath,sRes,sLib: String; DataType, DataSize: Integer; {$ENDIF} begin Result := ''; {$IFDEF Win32} sPath := ''; sLib := 'Lib'; case VerRq of verD2..verD7: sPath := Format('SOFTWARE\Borland\Delphi\%d.0',[VerRq]); verD8: sPath := 'SOFTWARE\Borland\BDS\2.0'; verD2005: sPath := 'SOFTWARE\Borland\BDS\3.0'; verD2006: sPath := 'SOFTWARE\Borland\BDS\4.0'; // verD2007: sPath := 'SOFTWARE\Borland\BDS\5.0'; This version was not detected verD2009: sPath := 'SOFTWARE\CodeGear\BDS\6.0'; verD2010: sPath := 'SOFTWARE\CodeGear\BDS\7.0'; verD_XE: sPath := 'SOFTWARE\Embarcadero\BDS\8.0'; verD_XE2: sPath := 'SOFTWARE\Embarcadero\BDS\9.0'; verD_XE3: sPath := 'SOFTWARE\Embarcadero\BDS\10.0'; verD_XE4: sPath := 'SOFTWARE\Embarcadero\BDS\11.0'; verD_XE5: sPath := 'SOFTWARE\Embarcadero\BDS\12.0'; //verAppMethod: sPath := 'SOFTWARE\Embarcadero\BDS\13.0'; == verD_XE7 verD_XE6: sPath := 'SOFTWARE\Embarcadero\BDS\14.0'; verD_XE7: sPath := 'SOFTWARE\Embarcadero\BDS\15.0'; end ; if sPath='' then Exit; if RegOpenKeyEx(HKEY_CURRENT_USER, PChar(sPath), 0, KEY_READ, Key)<>ERROR_SUCCESS then if RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar(sPath), 0, KEY_READ, Key)<>ERROR_SUCCESS then Exit; try if RegQueryValueEx(Key, sRoot, nil, @DataType, nil, @DataSize)<>ERROR_SUCCESS then Exit; if DataType<>REG_SZ then Exit; if DataSize<=SizeOf(Char) then Exit; SetString(sRes, nil, (DataSize div SizeOf(Char)) - 1); if RegQueryValueEx(Key, sRoot, nil, @DataType, PByte(sRes), @DataSize) <> ERROR_SUCCESS then Exit; if sRes[Length(sRes)]<>DirSep then sRes := sRes+DirSep; if VerRq>=verD_XE then sLib := 'lib'+DirSep+sPlatformDir[PlatformRq]+DirSep+'release'; Result := sRes+sLib+DirSep; finally RegCloseKey(Key); end ; {$ENDIF} end ; function IsDCPName(const S: String): Boolean; var Ext: String; begin Ext := ExtractFileExt(S); Result := (CompareText(Ext,'.dcp')=0)or(CompareText(Ext,'.dcpil')=0); end ; function AddToPathList(S: String; SurePkg: boolean): integer; begin if S='' then begin Result := -1; Exit; end ; Result := PathList.IndexOf(S); if Result>=0 then Exit; {It may be wrong on Unix} if SurePkg or IsDCPName(S) then begin if FileExists(S) then begin Result := PathList.AddObject(S,TDCPackage.Create); Exit; end ; Result := -1; if SurePkg then Exit; end ; if not (AnsiLastChar(S)^ in [{$IFNDEF Linux}':',{$ENDIF} DirSep]) then S := S + DirSep; Result := PathList.Add(S); end ; procedure FindPackagesAndAddToPathList(const Mask: String); var SR: TSearchRec; Path,FN,Ext: String; lExt: Integer; begin Ext := ExtractFileExt(Mask); lExt := Length(Ext); if SysUtils.FindFirst(Mask, faAnyFile, sr)<>0 then Exit; Path := ExtractFilePath(Mask); repeat if (sr.Attr and faDirectory)=0 then begin Ext := ExtractFileExt(sr.Name); if Length(Ext)=lExt then //Check that we don`t have .dcpil instead of .dcp AddToPathList(Path+sr.Name,true{SurePkg}); end ; until FindNext(sr) <> 0; end ; procedure SetPathList(const DirList: string); var I, P, L,hDir: Integer; sDir: String; CP: PChar; begin P := 1; L := Length(DirList); while True do begin while (P <= L) and (DirList[P] = PathSep) do Inc(P); if P > L then Break; I := P; while (P <= L) and (DirList[P] <> PathSep) do begin if DirList[P] in LeadBytes then Inc(P); Inc(P); end; sDir := Copy(DirList, I, P-I); if sDir='' then Continue {Paranoic}; CP := PChar(sDir); if ((StrScan(CP,'*')<>Nil)or(StrScan(CP,'?')<>Nil))and IsDCPName(sDir) then begin FindPackagesAndAddToPathList(sDir); Continue; end ; hDir := AddToPathList(sDir,False{SurePkg}); if sDir='*' then AutoLibDirNDX := hDir; //Mark the place to add the directory from registry end; end; (* function AllFilesSearch(Name: string; var DirList: string): string; var I, P, L: Integer; begin Result := Name; P := 1; L := Length(DirList); while True do begin while (P <= L) and (DirList[P] = PathSep) do Inc(P); if P > L then Break; I := P; while (P <= L) and (DirList[P] <> PathSep) do begin if DirList[P] in LeadBytes then Inc(P); Inc(P); end; Result := Copy(DirList, I, P - I); if not (AnsiLastChar(Result)^ in [{$IFNDEF Linux}':',{$ENDIF} DirSep]) then Result := Result + DirSep; Result := Result + Name; if FileExists(Result) then begin Delete(DirList,1,P+1); Exit; end ; end; Result := ''; DirList := ''; end; *) type TDCUSearchRec = record hPath: integer; FN,UnitName: String; Res: PDCPUnitHdr; end ; function InitDCUSearch(FN,FExt: String; var SR: TDCUSearchRec): boolean {HasPath}; var Dir: String; CP: PChar; AddedUnitDir: boolean; begin FillChar(SR,SizeOf(TDCUSearchRec),0); SR.FN := FN; SR.hPath := -1; Dir := ExtractFileDir(FN); Result := Dir<>''; AddedUnitDir := AddedUnitDirToPath; if not AddedUnitDirToPath then begin if (PASPath<>'*') then begin if (PASPath='') then PASPath := Dir else PASPath := Dir + PathSep + PASPath; end ; AddedUnitDirToPath := true; end ; CP := PChar(FN)+Length(Dir); CP := StrScan(CP+1,PkgSep); if CP<>Nil then begin SetLength(FN,CP-PChar(FN)); //Package name with path SR.hPath := AddToPathList(FN,true{SurePkg}); if SR.hPath>=0 then SR.UnitName := StrPas(CP+1); SR.UnitName := ChangeFileExt(SR.UnitName,''); Exit; end ; {if ExtractFileExt(SR.FN)='' then SR.FN := SR.FN+'.dcu';} SR.UnitName := ExtractFileName(SR.FN); SR.FN := SR.FN+FExt; (* if (DCUPath='') then DCUPath := Dir else DCUPath := Dir + {$IFNDEF LINUX}';'{$ELSE}';'{$ENDIF}+DCUPath; *) if not AddedUnitDir then AddToPathList(Dir,False{SurePkg}); if Dir='' then SR.hPath := 0; end ; function FindDCU(var SR: TDCUSearchRec): String; var S: String; Pkg: TDCPackage; begin Result := ''; SR.Res := Nil; if SR.hPath<0 then begin if FileExists(SR.FN) then Result := SR.FN; Exit; end ; if PathList=Nil then Exit {Paranoic}; if SR.hPath>=PathList.Count then SR.hPath := -1 else begin S := PathList[SR.hPath]; Pkg := TDCPackage(PathList.Objects[SR.hPath]); Inc(SR.hPath); if Pkg=Nil then begin if S='*'+DirSep then Exit; Result := S+SR.FN; if FileExists(Result) then Exit; Result := ''; end else if Pkg.Load(S,false) then begin SR.Res := Pkg.GetFileByName(SR.UnitName); if SR.Res<>Nil then Result := S+PkgSep+SR.UnitName+ExtractFileExt(SR.FN); end ; end ; end ; var UnitList: TStringList = Nil; function GetUnitList: TStringList; begin if UnitList=Nil then begin UnitList := TStringList.Create; UnitList.Sorted := true; UnitList.Duplicates := dupError; end ; Result := UnitList; end ; procedure RegisterUnit(const Name: String; U: TUnit); var UL: TStringList; begin UL := GetUnitList; UL.AddObject(Name,U); end ; procedure NeedPathList; begin if PathList=Nil then begin PathList := TStringList.Create; SetPathList(DCUPath); end ; end; function GetDCUByName(FName,FExt: String; VerRq: integer; MSILRq: boolean; PlatformRq: TDCUPlatform; StampRq: integer): TUnit; var UL: TStringList; NDX: integer; U0: TUnit; // SearchPath: String; SR: TDCUSearchRec; FN,UnitName: String; HasPath: Boolean; Cl: TUnitClass; begin UL := GetUnitList; NeedPathList; if (AutoLibDirNDX>=0)and(VerRq>0) then begin FN := GetDelphiLibDir(VerRq,MSILRq,PlatformRq); if (FN<>'')and(PathList.IndexOf(FN)>=0) then FN := ''; if FN='' then PathList.Delete(AutoLibDirNDX) else PathList[AutoLibDirNDX] := FN; AutoLibDirNDX := -1; //Substitution for * was made end ; {if not AddedUnitDirToPath then begin AddUnitDirToPath(FName); AddedUnitDirToPath := true; end ;} UnitName := ExtractFileNamePkg(FName); HasPath := Length(UnitName)<Length(FName); if HasPath or(FExt=''{FExt is not empty for the units from uses}) then UnitName := ChangeFileExt(UnitName,''); if not HasPath and(FUnitAliases<>Nil) then begin FN := FUnitAliases.Values[UnitName{FName}]; if FN<>'' then begin UnitName{FName} := FN; FName{FName} := FN; end ; end ; if IgnoreUnitStamps or not((VerRq>verD2){In Delphi 2.0 Stamp is not used}and (VerRq<=verD7){The higher versions ignore the value too}or(VerRq>=verK1)) then StampRq := 0; if UL.Find(UnitName{FName},NDX) then Result := TUnit(UL.Objects[NDX]) else begin InitDCUSearch(FName,FExt,SR); // SearchPath := DCUPath; Result := Nil; U0 := CurUnit; try FN := FName; repeat FName := FindDCU(SR); if FName<>'' then begin if VerRq=0 then Cl := TopLevelUnitClass else Cl := TUnit; Result := Cl.Create; try if Result.Load(FName,VerRq,MSILRq,PlatformRq,SR.Res) then begin if (StampRq=0)or(StampRq=Result.Stamp) then {Let`s check it here to try to find the correct stamp somewhere else} break; end; except on E: Exception do begin if VerRq=0 then //Main Unit => reraise; raise; //The unit with the required version found, but it was wrong. //Report the problem and stop the search Writeln(Format('!!!%s: %s',[E.ClassName,E.Message])); Result.Free; Result := Nil; break; end ; end ; Result.Free; Result := Nil; end ; until SR.hPath<0; if Result<>Nil then RegisterUnit(UnitName{Result.UnitName - some units in packages may have different source file name}, Result) else RegisterUnit(FN, Nil); //Means: don't seek this name again, //It's supposed that FName is a unit name without path finally CurUnit := U0; end ; end ; if Result=Nil then Exit; if (StampRq<>0)and(StampRq<>Result.Stamp) then Result := Nil; end ; function GetDCUOfMemory(MemP: Pointer): TUnit; var UL: TStringList; U: TUnit; i: Integer; begin if MemP<>Nil then begin if (CurUnit<>Nil)and CurUnit.IsValidMemPtr(MemP) then begin Result := CurUnit; Exit; end ; UL := GetUnitList; for i:=0 to UL.Count-1 do begin U := TUnit(UL.Objects[i]); if (U<>Nil)and U.IsValidMemPtr(MemP) then begin Result := U; Exit; end ; end ; end ; Result := Nil; end ; procedure FreeDCU; var i: integer; U: TUnit; begin if UnitList=Nil then Exit; for i:=0 to UnitList.Count-1 do begin U := TUnit(UnitList.Objects[i]); U.Free; end ; UnitList.Free; UnitList := Nil; FreePackages; end ; function FindPAS(FName: String): String; var S: String; begin if PASPath='*' then begin Result := ''; Exit; end ; S := ExtractFilePath(FName); if S<>'' then begin if FileExists(FName) then begin Result := FName; Exit; end ; FName := ExtractFileName(FName); end ; Result := FileSearch(FName,PASPath); end ; procedure LoadSourceLines(FName: String; Lines: TStrings); var S: String; begin S := FindPAS(FName); if S='' then Exit; Lines.LoadFromFile(S); end ; procedure SetUnitAliases(const V: String); var CP,EP,NP: PChar; S: String; begin if FUnitAliases<>Nil then FUnitAliases.Clear; if V='' then Exit; if FUnitAliases=Nil then FUnitAliases := TStringList.Create; CP := PChar(V); repeat NP := StrScan(CP,';'); if NP=Nil then EP := StrEnd(CP) else begin EP := NP; NP := EP+1; end ; SetString(S,CP,EP-CP); if S<>'' then FUnitAliases.Add(S); CP := NP; until CP=Nil; end ; function LoadPackage(const FName: String; IsMain: Boolean): TDCPackage; var hPkg: Integer; begin Result :=Nil; NeedPathList; hPkg := AddToPathList(FName,true{SurePkg}); if hPkg<0 then Exit; Result := TDCPackage(PathList.Objects[hPkg]); if Result=Nil then Exit; if not Result.Load(FName,IsMain) then Result := Nil; end; initialization finalization FUnitAliases.Free; PathList.Free; end.
25.692182
116
0.63252
f169ba745c21bb105128455b1de41a03506038ec
228,098
pas
Pascal
references/embarcadero/tokyo/10_2_3/patched/fmx/FMX.Graphics.pas
zekiguven/alcinoe
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
[ "Apache-2.0" ]
2
2020-02-17T18:42:30.000Z
2020-11-14T04:57:48.000Z
references/embarcadero/tokyo/10_2_3/patched/fmx/FMX.Graphics.pas
zekiguven/alcinoe
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
[ "Apache-2.0" ]
2
2019-06-23T00:02:43.000Z
2019-10-12T22:39:28.000Z
references/embarcadero/tokyo/10_2_3/patched/fmx/FMX.Graphics.pas
zekiguven/alcinoe
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
[ "Apache-2.0" ]
null
null
null
{*******************************************************} { } { Delphi FireMonkey Platform } { } { Copyright(c) 2011-2017 Embarcadero Technologies, Inc. } { All rights reserved } { } {*******************************************************} unit FMX.Graphics; {$MINENUMSIZE 4} {$H+} interface {$SCOPEDENUMS ON} uses System.Types, System.UITypes, System.Classes, System.Messaging, System.Generics.Collections, System.SysUtils, FMX.Types, FMX.Surfaces, System.Math.Vectors; type TCanvas = class; TCanvasClass = class of TCanvas; TBitmap = class; TBitmapImage = class; TTextSettings = class; { TGradientPoint } TGradientPoint = class(TCollectionItem) private FColor: TAlphaColor; FOffset: Single; function GetColor: TAlphaColor; procedure SetColor(const Value: TAlphaColor); public procedure Assign(Source: TPersistent); override; property IntColor: TAlphaColor read FColor write FColor; published property Color: TAlphaColor read GetColor write SetColor; property Offset: Single read FOffset write FOffset nodefault; end; { TGradientPoints } TGradientPoints = class(TCollection) private function GetPoint(Index: Integer): TGradientPoint; public property Points[Index: Integer]: TGradientPoint read GetPoint; default; end; { TGradient } TGradientStyle = (Linear, Radial); TGradientStyleHelper = record helper for TGradientStyle const gsLinear = TGradientStyle.Linear deprecated 'Use TGradientStyle.Linear'; gsRadial = TGradientStyle.Radial deprecated 'Use TGradientStyle.Radial'; end; TGradient = class(TPersistent) private FPoints: TGradientPoints; FOnChanged: TNotifyEvent; FStartPosition: TPosition; FStopPosition: TPosition; FStyle: TGradientStyle; FRadialTransform: TTransform; procedure SetStartPosition(const Value: TPosition); procedure SetStopPosition(const Value: TPosition); procedure PositionChanged(Sender: TObject); procedure SetColor(const Value: TAlphaColor); procedure SetColor1(const Value: TAlphaColor); function IsLinearStored: Boolean; procedure SetStyle(const Value: TGradientStyle); function IsRadialStored: Boolean; procedure SetRadialTransform(const Value: TTransform); public constructor Create; destructor Destroy; override; procedure Assign(Source: TPersistent); override; procedure Change; procedure ApplyOpacity(const AOpacity: Single); function InterpolateColor(Offset: Single): TAlphaColor; overload; function InterpolateColor(X, Y: Single): TAlphaColor; overload; function Equal(const AGradient: TGradient): Boolean; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; { fast access } property Color: TAlphaColor write SetColor; property Color1: TAlphaColor write SetColor1; published property Points: TGradientPoints read FPoints write FPoints; property Style: TGradientStyle read FStyle write SetStyle default TGradientStyle.Linear; { linear } property StartPosition: TPosition read FStartPosition write SetStartPosition stored IsLinearStored; property StopPosition: TPosition read FStopPosition write SetStopPosition stored IsLinearStored; { radial } property RadialTransform: TTransform read FRadialTransform write SetRadialTransform stored IsRadialStored; end; { TBrushResource } TBrush = class; TBrushObject = class; TBrushResource = class(TInterfacedPersistent, IFreeNotification) private FStyleResource: TBrushObject; FStyleLookup: string; FOnChanged: TNotifyEvent; function GetBrush: TBrush; procedure SetStyleResource(const Value: TBrushObject); function GetStyleLookup: string; procedure SetStyleLookup(const Value: string); { IFreeNotification } procedure FreeNotification(AObject: TObject); public destructor Destroy; override; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; procedure Assign(Source: TPersistent); override; property Brush: TBrush read GetBrush; published property StyleResource: TBrushObject read FStyleResource write SetStyleResource stored False; property StyleLookup: string read GetStyleLookup write SetStyleLookup; end; { TBrushBitmap } TWrapMode = (Tile, TileOriginal, TileStretch); TWrapModeHelper = record helper for TWrapMode const wmTile = TWrapMode.Tile deprecated 'Use TWrapMode.Tile'; wmTileOriginal = TWrapMode.TileOriginal deprecated 'Use TWrapMode.TileOriginal'; wmTileStretch = TWrapMode.TileStretch deprecated 'Use TWrapMode.TileStretch'; end; TBrushBitmap = class(TInterfacedPersistent) private FOnChanged: TNotifyEvent; FBitmap: TBitmap; FWrapMode: TWrapMode; procedure SetWrapMode(const Value: TWrapMode); procedure SetBitmap(const Value: TBitmap); function GetBitmapImage: TBitmapImage; protected procedure DoChanged; virtual; public constructor Create; destructor Destroy; override; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; procedure Assign(Source: TPersistent); override; published property Bitmap: TBitmap read FBitmap write SetBitmap; /// <summary>Image to be used by the brush.</summary> property Image: TBitmapImage read GetBitmapImage; property WrapMode: TWrapMode read FWrapMode write SetWrapMode; end; { TBrush } TBrushKind = (None, Solid, Gradient, Bitmap, Resource); TBrushKindHelper = record helper for TBrushKind const bkNone = TBrushKind.None deprecated 'Use TBrushKind.None'; bkSolid = TBrushKind.Solid deprecated 'Use TBrushKind.Solid'; bkGradient = TBrushKind.Gradient deprecated 'Use TBrushKind.Gradient'; bkBitmap = TBrushKind.Bitmap deprecated 'Use TBrushKind.Bitmap'; bkResource = TBrushKind.Resource deprecated 'Use TBrushKind.Resource'; end; TBrush = class(TPersistent) private FColor: TAlphaColor; FKind: TBrushKind; FOnChanged: TNotifyEvent; FGradient: TGradient; FDefaultKind: TBrushKind; FDefaultColor: TAlphaColor; FResource: TBrushResource; FBitmap: TBrushBitmap; FOnGradientChanged: TNotifyEvent; procedure SetColor(const Value: TAlphaColor); procedure SetKind(const Value: TBrushKind); procedure SetGradient(const Value: TGradient); function IsColorStored: Boolean; function IsGradientStored: Boolean; function GetColor: TAlphaColor; function IsKindStored: Boolean; procedure SetResource(const Value: TBrushResource); function IsResourceStored: Boolean; function IsBitmapStored: Boolean; protected procedure GradientChanged(Sender: TObject); procedure ResourceChanged(Sender: TObject); procedure BitmapChanged(Sender: TObject); public constructor Create(const ADefaultKind: TBrushKind; const ADefaultColor: TAlphaColor); destructor Destroy; override; procedure Assign(Source: TPersistent); override; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; property OnGradientChanged: TNotifyEvent read FOnGradientChanged write FOnGradientChanged; property DefaultColor: TAlphaColor read FDefaultColor write FDefaultColor; property DefaultKind: TBrushKind read FDefaultKind write FDefaultKind; published property Color: TAlphaColor read GetColor write SetColor stored IsColorStored; property Bitmap: TBrushBitmap read FBitmap write FBitmap stored IsBitmapStored; property Kind: TBrushKind read FKind write SetKind stored IsKindStored; property Gradient: TGradient read FGradient write SetGradient stored IsGradientStored; property Resource: TBrushResource read FResource write SetResource stored IsResourceStored; end; TStrokeCap = (Flat, Round); TStrokeCapHelper = record helper for TStrokeCap const scFlat = TStrokeCap.Flat deprecated 'Use TStrokeCap.Flat'; scRound = TStrokeCap.Round deprecated 'Use TStrokeCap.Round'; end; TStrokeJoin = (Miter, Round, Bevel); TStrokeJoinHelper = record helper for TStrokeJoin const sjMiter = TStrokeJoin.Miter deprecated 'Use TStrokeJoin.Miter'; sjRound = TStrokeJoin.Round deprecated 'Use TStrokeJoin.Round'; sjBevel = TStrokeJoin.Bevel deprecated 'Use TStrokeJoin.Bevel'; end; TStrokeDash = (Solid, Dash, Dot, DashDot, DashDotDot, Custom); TStrokeDashHelper = record helper for TStrokeDash const sdSolid = TStrokeDash.Solid deprecated 'Use TStrokeDash.Solid'; sdDash = TStrokeDash.Dash deprecated 'Use TStrokeDash.Dash'; sdDot = TStrokeDash.Dot deprecated 'Use TStrokeDash.Dot'; sdDashDot = TStrokeDash.DashDot deprecated 'Use TStrokeDash.DashDot'; sdDashDotDot = TStrokeDash.DashDotDot deprecated 'Use TStrokeDash.DashDotDot'; sdCustom = TStrokeDash.Custom deprecated 'Use TStrokeDash.Custom'; end; TDashArray = TArray<Single>; TStrokeBrush = class(TBrush) public type TDashData = record DashArray: TDashArray; DashOffset: Single; constructor Create(const ADashArray: TDashArray; ADashOffset: Single); end; TDashDevice = (Screen, Printer); TDashDeviceHelper = record helper for TDashDevice const ddScreen = TDashDevice.Screen deprecated 'Use TDashDevice.Screen'; ddPrinter = TDashDevice.Printer deprecated 'Use TDashDevice.Printer'; end; TStdDashes = array[TDashDevice, TStrokeDash] of TDashData; private class var FStdDash: TStdDashes; FStdDashCreated: Boolean; private FJoin: TStrokeJoin; FThickness: Single; FCap: TStrokeCap; FDash: TStrokeDash; FDashArray: TDashArray; FDashOffset: Single; function IsThicknessStored: Boolean; procedure SetCap(const Value: TStrokeCap); procedure SetDash(const Value: TStrokeDash); procedure SetJoin(const Value: TStrokeJoin); procedure SetThickness(const Value: Single); function GetDashArray: TDashArray; class function GetStdDash(const Device: TDashDevice; const Dash: TStrokeDash): TDashData; static; procedure ReadCustomDash(AStream: TStream); procedure WriteCustomDash(AStream: TStream); protected procedure DefineProperties(Filer: TFiler); override; public constructor Create(const ADefaultKind: TBrushKind; const ADefaultColor: TAlphaColor); reintroduce; procedure Assign(Source: TPersistent); override; procedure SetCustomDash(const Dash: array of Single; Offset: Single); property DashArray: TDashArray read GetDashArray; property DashOffset: Single read FDashOffset; class property StdDash[const Device: TDashDevice; const Dash: TStrokeDash]: TDashData read GetStdDash; published property Thickness: Single read FThickness write SetThickness stored IsThicknessStored nodefault; property Cap: TStrokeCap read FCap write SetCap default TStrokeCap.Flat; property Dash: TStrokeDash read FDash write SetDash default TStrokeDash.Solid; property Join: TStrokeJoin read FJoin write SetJoin default TStrokeJoin.Miter; end; IFMXSystemFontService = interface(IInterface) ['{62017F22-ADF1-44D9-A21D-796D8C7F3CF0}'] function GetDefaultFontFamilyName: string; function GetDefaultFontSize: Single; end; { TFont } TFontClass = class of TFont; TFontWeight = (Thin, UltraLight, Light, SemiLight, Regular, Medium, Semibold, Bold, UltraBold, Black, UltraBlack); /// <summary> /// Font weight type helper /// </summary> TFontWeightHelper = record helper for TFontWeight /// <summary> /// Checks wherever current weight value is TFontWeight.Regular /// </summary> function IsRegular: Boolean; end; TFontSlant = (Regular, Italic, Oblique); /// <summary> /// Font slant type helper /// </summary> TFontSlantHelper = record helper for TFontSlant /// <summary> /// Checks wherever current slant value is TFontSlant.Regular /// </summary> function IsRegular: Boolean; end; TFontStretch = (UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, Regular, SemiExpanded, Expanded, ExtraExpanded, UltraExpanded); /// <summary> /// Font stretch type helper /// </summary> TFontStretchHelper = record helper for TFontStretch /// <summary> /// Checks wherever current stretch value is TFontStretch.Regular /// </summary> function IsRegular: Boolean; end; /// <summary> /// Extended font style based on TFontStyles. Support multi-weight and multi-stretch fonts /// </summary> TFontStyleExt = record /// <summary> /// Set of regular <c>TFontStyle</c>. May contains any <c>TFontStyle</c> value but TFont will process only /// fsOutline and fsStrikeOut values /// </summary> SimpleStyle: TFontStyles; /// <summary> /// Default font weight value /// </summary> Weight: TFontWeight; /// <summary> /// Default font slant value /// </summary> Slant: TFontSlant; /// <summary> /// Default font stretch value /// </summary> Stretch: TFontStretch; /// <summary> /// Common extended font style constructor. /// Initialy new style is initializing using <c>AOtherStyles</c> values. After that <c>AWeight</c>, <c>ASlant</c> /// and <c>AStretch</c> values are applying /// </summary> /// <remarks> /// Basicaly bsBold or fsItalic values in AOtherStyles are ignoring. Because after creating result from the set of /// <c>TFontStyle</c> values system will set styles from <c>AWeight</c>, <c>ASlant</c> and <c>AStretch</c> which /// will replace style values. /// </remarks> class function Create(const AWeight: TFontWeight = TFontWeight.Regular; const AStant: TFontSlant = TFontSlant.Regular; const AStretch: TFontStretch = TFontStretch.Regular; const AOtherStyles: TFontStyles = []): TFontStyleExt; overload; static; inline; ///<summary>Constructor that allows to create extended style from the regular <c>TFontStyles</c></summary> class function Create(const AStyle: TFontStyles): TFontStyleExt; overload; static; inline; ///<summary>Default style with regular parameters without any decorations</summary> class function Default: TFontStyleExt; static; inline; //Operators ///<summary>Overriding equality check operator</summary> class operator Equal(const A, B: TFontStyleExt): Boolean; ///<summary>Overriding inequality check operator</summary> class operator NotEqual(const A, B: TFontStyleExt): Boolean; ///<summary>Overriding implicit conversion to TFontStyles</summary> class operator Implicit(const AStyle: TFontStyleExt): TFontStyles; ///<summary>Overriding addition operator with both extended styles</summary> class operator Add(const A, B: TFontStyleExt): TFontStyleExt; ///<summary>Overriding addition operator with single font style item</summary> class operator Add(const A: TFontStyleExt; const B: TFontStyle): TFontStyleExt; ///<summary>Overriding addition operator with set of font styles</summary> class operator Add(const A: TFontStyleExt; const B: TFontStyles): TFontStyleExt; ///<summary>Overriding subtraction operator with single font style item</summary> class operator Subtract(const A: TFontStyleExt; const B: TFontStyle): TFontStyleExt; ///<summary>Overriding subtraction operator with set of font styles</summary> class operator Subtract(const A: TFontStyleExt; const B: TFontStyles): TFontStyleExt; ///<summary>Overriding check whether TFontStyle contains in TFontStyleExt</summary> class operator In(const A: TFontStyle; const B: TFontStyleExt): Boolean; ///<summary>Overriding Multiply set of TFontStyle to the TFontStyleExt</summary> class operator Multiply(const A: TFontStyles; const B: TFontStyleExt): TFontStyles; /// <summary> /// Overriding Multiply set of TFontStyle to the TFontStyleExt /// </summary> function IsRegular: Boolean; end; TFont = class(TPersistent) private const DefaultFontSize: Single = 12.0; DefaultFontFamily = 'Tahoma'; MaxFontSize: Single = 512.0; private FSize: Single; FFamily: TFontName; FStyleExt: TFontStyleExt; FUpdating: Boolean; FChanged: Boolean; FOnChanged: TNotifyEvent; procedure SetFamily(const Value: TFontName); procedure SetSize(const Value: Single); function GetStyle: TFontStyles; procedure SetStyle(const Value: TFontStyles); procedure SetStyleExt(const Value: TFontStyleExt); procedure ReadStyleExt(AStream: TStream); procedure WriteStyleExt(AStream: TStream); private class var FFontSvc: IFMXSystemFontService; protected procedure DefineProperties(Filer: TFiler); override; function DefaultFamily: string; virtual; function DefaultSize: Single; virtual; procedure DoChanged; virtual; public constructor Create; procedure AfterConstruction; override; procedure Change; procedure Assign(Source: TPersistent); override; procedure SetSettings(const AFamily: string; const ASize: Single; const AStyle: TFontStyleExt); function Equals(Obj: TObject): Boolean; override; function IsFamilyStored: Boolean; function IsSizeStored: Boolean; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; /// <summary> /// Refrects current font style, including underline and strikeout /// </summary> property StyleExt: TFontStyleExt read FStyleExt write SetStyleExt; published property Family: TFontName read FFamily write SetFamily stored IsFamilyStored; property Size: Single read FSize write SetSize stored IsSizeStored nodefault; property Style: TFontStyles read GetStyle write SetStyle stored False; end; { TBitmapCodec } PBitmapCodecSaveParams = ^TBitmapCodecSaveParams; TBitmapCodecSaveParams = record // encode quality 0..100 Quality: Integer; end; TCustomBitmapCodec = class abstract public class function GetImageSize(const AFileName: string): TPointF; virtual; abstract; class function IsValid(const AStream: TStream): Boolean; virtual; abstract; function LoadFromFile(const AFileName: string; const Bitmap: TBitmapSurface; const MaxSizeLimit: Cardinal = 0): Boolean; virtual; abstract; function LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single; const UseEmbedded: Boolean; const Bitmap: TBitmapSurface): Boolean; virtual; abstract; function LoadFromStream(const AStream: TStream; const Bitmap: TBitmapSurface; const MaxSizeLimit: Cardinal = 0): Boolean; virtual; abstract; function SaveToFile(const AFileName: string; const Bitmap: TBitmapSurface; const SaveParams: PBitmapCodecSaveParams = nil): Boolean; virtual; abstract; function SaveToStream(const AStream: TStream; const Bitmap: TBitmapSurface; const Extension: string; const SaveParams: PBitmapCodecSaveParams = nil): Boolean; virtual; abstract; end; TCustomBitmapCodecClass = class of TCustomBitmapCodec; { TBitmapCodecManager } EBitmapCodecManagerException = class(Exception); TBitmapCodecManager = class sealed public type TBitmapCodecClassDescriptor = record Extension: string; Description: string; BitmapCodecClass: TCustomBitmapCodecClass; CanSave: Boolean; end; strict private type TBitmapCodecDescriptorField = (Extension, Description); strict private class var FBitmapCodecClassDescriptors: TList<TBitmapCodecClassDescriptor>; class function FindBitmapCodecDescriptor(const Name: string; const Field: TBitmapCodecDescriptorField): TBitmapCodecClassDescriptor; class function GuessCodecClass(const Name: string; const Field: TBitmapCodecDescriptorField): TCustomBitmapCodecClass; private public // Reserved for internal use only - do not call directly! class procedure UnInitialize; // Register a bitmap codec class with a file extension, description class procedure RegisterBitmapCodecClass(const Extension, Description: string; const CanSave: Boolean; const BitmapCodecClass: TCustomBitmapCodecClass); class procedure UnregisterBitmapCodecClass(const Extension: string); // Helpful function class function GetFileTypes: string; class function GetFilterString: string; class function CodecExists(const AFileName: string): Boolean; overload; class function GetImageSize(const AFileName: string): TPointF; class function LoadFromFile(const AFileName: string; const Bitmap: TBitmapSurface; const MaxSizeLimit: Cardinal = 0): Boolean; class function LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single; const UseEmbedded: Boolean; const Bitmap: TBitmapSurface): Boolean; class function LoadFromStream(const AStream: TStream; const Bitmap: TBitmapSurface; const MaxSizeLimit: Cardinal = 0): Boolean; class function SaveToStream(const AStream: TStream; const Bitmap: TBitmapSurface; const Extension: string; SaveParams: PBitmapCodecSaveParams = nil): Boolean; overload; class function SaveToFile(const AFileName: string; const Bitmap: TBitmapSurface; const SaveParams: PBitmapCodecSaveParams = nil): Boolean; end; { TImageTypeChecker } /// <summary>Helper class for BitmapCodec</summary> TImageTypeChecker = class private type TImageData = record DataType: String; Length: Integer; Header: array[0..3] of Byte; end; public /// <summary>Analizes the header to guess the image format of he given file</summary> class function GetType(AFileName: String): String; overload; /// <summary>Analizes the header to guess the image format of he given stream</summary> class function GetType(AData: TStream): String; overload; end; { TBitmap } IBitmapObject = interface(IFreeNotificationBehavior) ['{5C17D001-47C1-462F-856D-8358B7B2C842}'] function GetBitmap: TBitmap; property Bitmap: TBitmap read GetBitmap; end; TBitmapData = record private FPixelFormat: TPixelFormat; FWidth: Integer; FHeight: Integer; function GetBytesPerPixel: Integer; function GetBytesPerLine: Integer; public Data: Pointer; Pitch: Integer; constructor Create(const AWidth, AHeight: Integer; const APixelFormat: TPixelFormat); function GetPixel(const X, Y: Integer): TAlphaColor; procedure SetPixel(const X, Y: Integer; const AColor: TAlphaColor); procedure Copy(const Source: TBitmapData); // Access to scanline in PixelFormat function GetScanline(const I: Integer): Pointer; function GetPixelAddr(const I, J: Integer): Pointer; property PixelFormat: TPixelFormat read FPixelFormat; property BytesPerPixel: Integer read GetBytesPerPixel; property BytesPerLine: Integer read GetBytesPerLine; property Width: Integer read FWidth; property Height: Integer read FHeight; end; TMapAccess = (Read, Write, ReadWrite); TMapAccessHelper = record helper for TMapAccess const maRead = TMapAccess.Read deprecated 'Use TMapAccess.Read'; maWrite = TMapAccess.Write deprecated 'Use TMapAccess.Write'; maReadWrite = TMapAccess.ReadWrite deprecated 'Use TMapAccess.ReadWrite'; end; TBitmapImage = class private FRefCount: Integer; FHandle: THandle; FCanvasClass: TCanvasClass; FWidth: Integer; FHeight: Integer; FBitmapScale: Single; FPixelFormat: TPixelFormat; procedure CreateHandle; procedure FreeHandle; function GetCanvasClass: TCanvasClass; public constructor Create; procedure IncreaseRefCount; inline; procedure DecreaseRefCount; property RefCount: Integer read FRefCount; property CanvasClass: TCanvasClass read GetCanvasClass; property Handle: THandle read FHandle; property BitmapScale: Single read FBitmapScale; property PixelFormat: TPixelFormat read FPixelFormat; property Height: Integer read FHeight; property Width: Integer read FWidth; end; TBitmap = class(TInterfacedPersistent, IStreamPersist) private FImage: TBitmapImage; FCanvas: TCanvas; FMapped: Boolean; FMapAccess: TMapAccess; FOnChange: TNotifyEvent; function GetBytesPerLine: Integer; function GetBytesPerPixel: Integer; function GetCanvas: TCanvas; function GetPixelFormat: TPixelFormat; function GetImage: TBitmapImage; function GetHeight: Integer; function GetWidth: Integer; function GetBitmapScale: Single; function GetHandle: THandle; procedure SetWidth(const Value: Integer); procedure SetHeight(const Value: Integer); procedure SetBitmapScale(const Scale: Single); procedure ReadBitmap(Stream: TStream); procedure WriteBitmap(Stream: TStream); function GetCanvasClass: TCanvasClass; function GetBounds: TRect; function GetSize: TSize; function GetBoundsF: TRectF; protected procedure CreateNewReference; procedure CopyToNewReference; procedure DestroyResources; virtual; procedure BitmapChanged; virtual; procedure AssignFromSurface(const Source: TBitmapSurface); procedure DoChange; virtual; protected procedure AssignTo(Dest: TPersistent); override; procedure DefineProperties(Filer: TFiler); override; procedure ReadStyleLookup(Reader: TReader); virtual; public constructor Create; overload; virtual; constructor Create(const AWidth, AHeight: Integer); overload; virtual; constructor CreateFromStream(const AStream: TStream); virtual; constructor CreateFromFile(const AFileName: string); virtual; constructor CreateFromBitmapAndMask(const Bitmap, Mask: TBitmap); destructor Destroy; override; procedure Assign(Source: TPersistent); override; function EqualsBitmap(const Bitmap: TBitmap): Boolean; procedure SetSize(const ASize: TSize); overload; procedure SetSize(const AWidth, AHeight: Integer); overload; procedure CopyFromBitmap(const Source: TBitmap); overload; procedure CopyFromBitmap(const Source: TBitmap; SrcRect: TRect; DestX, DestY: Integer); overload; function IsEmpty: Boolean; function HandleAllocated: Boolean; procedure FreeHandle; procedure Clear(const AColor: TAlphaColor); virtual; procedure ClearRect(const ARect: TRectF; const AColor: TAlphaColor = 0); procedure Rotate(const Angle: Single); procedure Resize(const AWidth, AHeight: Integer); procedure FlipHorizontal; procedure FlipVertical; procedure InvertAlpha; procedure ReplaceOpaqueColor(const Color: TAlphaColor); function CreateMask: PByteArray; procedure ApplyMask(const Mask: PByteArray; const DstX: Integer = 0; const DstY: Integer = 0); function CreateThumbnail(const AWidth, AHeight: Integer): TBitmap; function Map(const Access: TMapAccess; var Data: TBitmapData): Boolean; procedure Unmap(var Data: TBitmapData); procedure LoadFromFile(const AFileName: string); procedure LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single; const UseEmbedded: Boolean = True); procedure SaveToFile(const AFileName: string; const SaveParams: PBitmapCodecSaveParams = nil); procedure LoadFromStream(Stream: TStream); procedure SaveToStream(Stream: TStream); property Canvas: TCanvas read GetCanvas; property CanvasClass: TCanvasClass read GetCanvasClass; property Image: TBitmapImage read GetImage; property Handle: THandle read GetHandle; property PixelFormat: TPixelFormat read GetPixelFormat; property BytesPerPixel: Integer read GetBytesPerPixel; property BytesPerLine: Integer read GetBytesPerLine; /// <summary>Helper property that returns bitmap bounds in TRect</summary> property Bounds: TRect read GetBounds; /// <summary>Helper property that returns bitmap bounds in TRectF</summary> property BoundsF: TRectF read GetBoundsF; property BitmapScale: Single read GetBitmapScale write SetBitmapScale; property Width: Integer read GetWidth write SetWidth; property Height: Integer read GetHeight write SetHeight; /// <summary>Helper property that returns dimention of bitmap as TSize</summary> property Size: TSize read GetSize write SetSize; property OnChange: TNotifyEvent read FOnChange write FOnChange; end; { TPathData } TPathData = class; IPathObject = interface(IFreeNotificationBehavior) ['{8C014863-4F69-48F2-9CF7-E336BFD3F06B}'] function GetPath: TPathData; property Path: TPathData read GetPath; end; TPathPointKind = (MoveTo, LineTo, CurveTo, Close); TPathPointKindHelper = record helper for TPathPointKind const ppMoveTo = TPathPointKind.MoveTo deprecated 'Use TPathPointKind.MoveTo'; ppLineTo = TPathPointKind.LineTo deprecated 'Use TPathPointKind.LineTo'; ppCurveTo = TPathPointKind.CurveTo deprecated 'Use TPathPointKind.CurveTo'; ppClose = TPathPointKind.Close deprecated 'Use TPathPointKind.Close'; end; TPathPoint = packed record Kind: TPathPointKind; Point: TPointF; class function Create(const AKind: TPathPointKind; const APoint: TPointF): TPathPoint; static; inline; class operator Equal(const APoint1, APoint2: TPathPoint): Boolean; class operator NotEqual(const APoint1, APoint2: TPathPoint): Boolean; end; TPathObject = class; TPathData = class(TInterfacedPersistent, IFreeNotification) private const MinFlatness = 0.05; public const DefaultFlatness = 0.25; private FOnChanged: TNotifyEvent; FStyleResource: TObject; FStyleLookup: string; FStartPoint: TPointF; FPathData: TList<TPathPoint>; FRecalcBounds: Boolean; FBounds: TRectF; function GetPathString: string; procedure SetPathString(const Value: string); procedure CalculateBezierCoefficients(const Bezier: TCubicBezier; out AX, BX, CX, AY, BY, CY: Single); function PointOnBezier(const StartPoint: TPointF; const AX, BX, CX, AY, BY, CY, T: Single): TPointF; function CreateBezier(const Bezier: TCubicBezier; const PointCount: Integer): TPolygon; procedure AddArcSvgPart(const Center, Radius: TPointF; StartAngle, SweepAngle: Single); procedure AddArcSvg(const P1, Radius: TPointF; Angle: Single; const LargeFlag, SweepFlag: Boolean; const P2: TPointF); function GetStyleLookup: string; procedure SetStyleLookup(const Value: string); function GetPath: TPathData; function GetCount: Integer; inline; function GetPoint(AIndex: Integer): TPathPoint; inline; function GetTokensFromString(const PathString: string; var Pos: Integer): string; function GetNumberFromString(const PathString: string; var Pos: Integer): string; function GetPointFromString(const PathString: string; var Pos: Integer): TPointF; function HasRelativeOffset(const PathString: string; const Pos: Integer): Boolean; protected { rtl } procedure DefineProperties(Filer: TFiler); override; procedure ReadPath(Stream: TStream); procedure WritePath(Stream: TStream); { IFreeNotification } procedure FreeNotification(AObject: TObject); procedure DoChanged(NeedRecalcBounds: Boolean = True); virtual; public constructor Create; virtual; destructor Destroy; override; procedure Assign(Source: TPersistent); override; function EqualsPath(const Path: TPathData): Boolean; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; { creation } function LastPoint: TPointF; procedure MoveTo(const P: TPointF); procedure MoveToRel(const P: TPointF); procedure LineTo(const P: TPointF); procedure LineToRel(const P: TPointF); procedure HLineTo(const X: Single); procedure HLineToRel(const X: Single); procedure VLineTo(const Y: Single); procedure VLineToRel(const Y: Single); procedure CurveTo(const ControlPoint1, ControlPoint2, EndPoint: TPointF); procedure CurveToRel(const ControlPoint1, ControlPoint2, EndPoint: TPointF); procedure SmoothCurveTo(const ControlPoint2, EndPoint: TPointF); procedure SmoothCurveToRel(const ControlPoint2, EndPoint: TPointF); procedure QuadCurveTo(const ControlPoint, EndPoint: TPointF); procedure ClosePath; { shapes } procedure AddEllipse(const ARect: TRectF); procedure AddRectangle(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const ACornerType: TCornerType = TCornerType.Round); procedure AddArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single); { modification } procedure AddPath(APath: TPathData); procedure Clear; procedure Flatten(const Flatness: Single = DefaultFlatness); procedure Scale(const ScaleX, ScaleY: Single); overload; procedure Scale(const AScale: TPointF); overload; inline; procedure Translate(const DX, DY: Single); overload; procedure Translate(const Delta: TPointF); overload; inline; procedure FitToRect(const ARect: TRectF); procedure ApplyMatrix(const M: TMatrix); { params } function GetBounds: TRectF; { convert } function FlattenToPolygon(var Polygon: TPolygon; const Flatness: Single = DefaultFlatness): TPointF; function IsEmpty: Boolean; { access } property Count: Integer read GetCount; property Points[AIndex: Integer]: TPathPoint read GetPoint; default; { resoruces } property ResourcePath: TPathData read GetPath; published property Data: string read GetPathString write SetPathString stored False; { This property allow to link path with PathObject by name. } property StyleLookup: string read GetStyleLookup write SetStyleLookup; end; { TCanvasSaveState } TCanvasSaveState = class(TPersistent) private protected FAssigned: Boolean; FFill: TBrush; FStroke: TStrokeBrush; FDash: TDashArray; FDashOffset: Single; FFont: TFont; FMatrix: TMatrix; FOffset: TPointF; procedure AssignTo(Dest: TPersistent); override; public constructor Create; destructor Destroy; override; procedure Assign(Source: TPersistent); override; property Assigned: Boolean read FAssigned; end; TRegion = array of TRectF; TRegionArray = array of TRegion; { TCanvas } ECanvasException = class(Exception); TFillTextFlag = (RightToLeft); TFillTextFlagHelper = record helper for TFillTextFlag const ftRightToLeft = TFillTextFlag.RightToLeft deprecated 'Use TFillTextFlag.RightToLeft'; end; TFillTextFlags = set of TFillTextFlag; TAbstractPrinter = class(TPersistent); PClipRects = ^TClipRects; TClipRects = array of TRectF; ICanvasObject = interface ['{61166E3B-9BC3-41E3-9D9A-5C6AB6460950}'] function GetCanvas: TCanvas; property Canvas: TCanvas read GetCanvas; end; IModulateCanvas = interface ['{B7CFFA1B-FBCF-4B36-AA32-93856F621F28}'] function GetModulateColor: TAlphaColor; procedure SetModulateColor(const AColor: TAlphaColor); property ModulateColor: TAlphaColor read GetModulateColor write SetModulateColor; end; TCanvasStyle = (NeedGPUSurface, SupportClipRects, SupportModulation); TCanvasStyles = set of TCanvasStyle; TCanvasAttribute = (MaxBitmapSize); TCanvasQuality = (SystemDefault, HighPerformance, HighQuality); TCanvasQualityHelper = record helper for TCanvasQuality const ccSystemDefault = TCanvasQuality.SystemDefault deprecated 'Use TCanvasQuality.SystemDefault'; ccHighPerformance = TCanvasQuality.HighPerformance deprecated 'Use TCanvasQuality.HighPerformance'; ccHighQuality = TCanvasQuality.HighQuality deprecated 'Use TCanvasQuality.HighQuality'; end; TCanvas = class abstract(TInterfacedPersistent) public const MaxAllowedBitmapSize = $FFFF; DefaultScale = 1; protected class var FLock: TObject; private FBeginSceneCount: Integer; FFill: TBrush; FStroke: TStrokeBrush; FParent: TWindowHandle; [Weak] FBitmap: TBitmap; FScale: Single; FQuality: TCanvasQuality; FMatrix: TMatrix; procedure SetFill(const Value: TBrush); protected type TMatrixMeaning = (Unknown, Identity, Translate); TMatrixMeaningHelper = record helper for TMatrixMeaning const mmUnknown = TMatrixMeaning.Unknown deprecated 'Use TMatrixMeaning.Unknown'; mmIdentity = TMatrixMeaning.Identity deprecated 'Use TMatrixMeaning.Identity'; mmTranslate = TMatrixMeaning.Translate deprecated 'Use TMatrixMeaning.Translate'; end; TCustomMetaBrush = class private FValid: Boolean; public property Valid: Boolean read FValid write FValid; end; TMetaBrush = class(TCustomMetaBrush) private FKind: TBrushKind; FColor: TAlphaColor; FOpacity: Single; FGradient: TGradient; FRect: TRectF; [Weak] FBitmapImage: TBitmapImage; FWrapMode: TWrapMode; function GetGradient: TGradient; public destructor Destroy; override; property Kind: TBrushKind read FKind write FKind; property Color: TAlphaColor read FColor write FColor; property Opacity: Single read FOpacity write FOpacity; property Rect: TRectF read FRect write FRect; property WrapMode: TWrapMode read FWrapMode write FWrapMode; property Gradient: TGradient read GetGradient; property Image: TBitmapImage read FBitmapImage write FBitmapImage; end; TMetaStrokeBrush = class(TCustomMetaBrush) private FCap: TStrokeCap; FDash: TStrokeDash; FJoin: TStrokeJoin; FDashArray: TDashArray; FDashOffset: Single; public property Cap: TStrokeCap read FCap write FCap; property Dash: TStrokeDash read FDash write FDash; property Join: TStrokeJoin read FJoin write FJoin; property DashArray: TDashArray read FDashArray write FDashArray; property DashOffset: Single read FDashOffset write FDashOffset; end; private FMatrixMeaning: TMatrixMeaning; FMatrixTranslate: TPointF; FBlending: Boolean; /// <summary>Indicates offset of drawing area</summary> FOffset: TPointF; procedure SetBlending(const Value: Boolean); class constructor Create; class destructor Destroy; type TCanvasSaveStateList = TObjectList<TCanvasSaveState>; protected FClippingChangeCount: Integer; FSavingStateCount: Integer; FWidth, FHeight: Integer; FFont: TFont; FCanvasSaveData: TCanvasSaveStateList; FPrinter: TAbstractPrinter; procedure FontChanged(Sender: TObject); virtual; { Window } function CreateSaveState: TCanvasSaveState; virtual; procedure Initialize; procedure UnInitialize; function GetCanvasScale: Single; virtual; { scene } function DoBeginScene(const AClipRects: PClipRects = nil; AContextHandle: THandle = 0): Boolean; virtual; procedure DoEndScene; virtual; procedure DoFlush; virtual; { constructors } constructor CreateFromWindow(const AParent: TWindowHandle; const AWidth, AHeight: Integer; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault); virtual; constructor CreateFromBitmap(const ABitmap: TBitmap; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault); virtual; constructor CreateFromPrinter(const APrinter: TAbstractPrinter); virtual; { bitmap } class function DoInitializeBitmap(const Width, Height: Integer; const Scale: Single; var PixelFormat: TPixelFormat): THandle; virtual; abstract; class procedure DoFinalizeBitmap(var Bitmap: THandle); virtual; abstract; class function DoMapBitmap(const Bitmap: THandle; const Access: TMapAccess; var Data: TBitmapData): Boolean; virtual; abstract; class procedure DoUnmapBitmap(const Bitmap: THandle; var Data: TBitmapData); virtual; abstract; class procedure DoCopyBitmap(const Source, Dest: TBitmap); virtual; { states } procedure DoBlendingChanged; virtual; { drawing } /// <summary>Apply a new matrix transformations to the canvas.</summary> procedure DoSetMatrix(const M: TMatrix); virtual; procedure DoFillRect(const ARect: TRectF; const AOpacity: Single; const ABrush: TBrush); virtual; abstract; procedure DoFillRoundRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TBrush; const ACornerType: TCornerType = TCornerType.Round); virtual; procedure DoFillPath(const APath: TPathData; const AOpacity: Single; const ABrush: TBrush); virtual; abstract; procedure DoFillEllipse(const ARect: TRectF; const AOpacity: Single; const ABrush: TBrush); virtual; abstract; function DoFillPolygon(const Points: TPolygon; const AOpacity: Single; const ABrush: TBrush): Boolean; virtual; procedure DoDrawBitmap(const ABitmap: TBitmap; const SrcRect, DstRect: TRectF; const AOpacity: Single; const HighSpeed: Boolean); virtual; abstract; procedure DoDrawLine(const APt1, APt2: TPointF; const AOpacity: Single; const ABrush: TStrokeBrush); virtual; abstract; procedure DoDrawRect(const ARect: TRectF; const AOpacity: Single; const ABrush: TStrokeBrush); virtual; abstract; function DoDrawPolygon(const Points: TPolygon; const AOpacity: Single; const ABrush: TStrokeBrush): Boolean; virtual; procedure DoDrawPath(const APath: TPathData; const AOpacity: Single; const ABrush: TStrokeBrush); virtual; abstract; procedure DoDrawEllipse(const ARect: TRectF; const AOpacity: Single; const ABrush: TStrokeBrush); virtual; abstract; property Parent: TWindowHandle read FParent; protected function TransformPoint(const P: TPointF): TPointF; inline; function TransformRect(const Rect: TRectF): TRectF; inline; property MatrixMeaning: TMatrixMeaning read FMatrixMeaning; property MatrixTranslate: TPointF read FMatrixTranslate; public destructor Destroy; override; { lock } class procedure Lock; class procedure Unlock; { caps } class function GetCanvasStyle: TCanvasStyles; virtual; class function GetAttribute(const Value: TCanvasAttribute): Integer; virtual; { scene } procedure SetSize(const AWidth, AHeight: Integer); virtual; function BeginScene(AClipRects: PClipRects = nil; AContextHandle: THandle = 0): Boolean; procedure EndScene; property BeginSceneCount: integer read FBeginSceneCount; procedure Flush; { buffer } procedure Clear(const Color: TAlphaColor); virtual; abstract; procedure ClearRect(const ARect: TRectF; const AColor: TAlphaColor = 0); virtual; abstract; /// <summary>Return True is Scale is integer value</summary> function IsScaleInteger: Boolean; { matrix } procedure SetMatrix(const M: TMatrix); procedure MultiplyMatrix(const M: TMatrix); { state } function SaveState: TCanvasSaveState; procedure RestoreState(const State: TCanvasSaveState); { bitmap } class function InitializeBitmap(const Width, Height: Integer; const Scale: Single; var PixelFormat: TPixelFormat): THandle; class procedure FinalizeBitmap(var Bitmap: THandle); class function MapBitmap(const Bitmap: THandle; const Access: TMapAccess; var Data: TBitmapData): Boolean; class procedure UnmapBitmap(const Bitmap: THandle; var Data: TBitmapData); class procedure CopyBitmap(const Source, Dest: TBitmap); { aligning } function AlignToPixel(const Value: TPointF): TPointF; overload; inline; function AlignToPixel(const Rect: TRectF): TRectF; overload; inline; function AlignToPixelVertically(const Value: Single): Single; inline; function AlignToPixelHorizontally(const Value: Single): Single; inline; { clipping } procedure IntersectClipRect(const ARect: TRectF); virtual; abstract; procedure ExcludeClipRect(const ARect: TRectF); virtual; abstract; { drawing } procedure FillArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single); overload; procedure FillArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single; const ABrush: TBrush); overload; procedure FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ACornerType: TCornerType = TCornerType.Round); overload; procedure FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TBrush; const ACornerType: TCornerType = TCornerType.Round); overload; procedure FillPath(const APath: TPathData; const AOpacity: Single); overload; procedure FillPath(const APath: TPathData; const AOpacity: Single; const ABrush: TBrush); overload; procedure FillEllipse(const ARect: TRectF; const AOpacity: Single); overload; procedure FillEllipse(const ARect: TRectF; const AOpacity: Single; const ABrush: TBrush); overload; procedure DrawBitmap(const ABitmap: TBitmap; const SrcRect, DstRect: TRectF; const AOpacity: Single; const HighSpeed: Boolean = False); procedure DrawLine(const APt1, APt2: TPointF; const AOpacity: Single); overload; procedure DrawLine(const APt1, APt2: TPointF; const AOpacity: Single; const ABrush: TStrokeBrush); overload; procedure DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ACornerType: TCornerType = TCornerType.Round); overload; procedure DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TStrokeBrush; const ACornerType: TCornerType = TCornerType.Round); overload; procedure DrawPath(const APath: TPathData; const AOpacity: Single); overload; procedure DrawPath(const APath: TPathData; const AOpacity: Single; const ABrush: TStrokeBrush); overload; procedure DrawEllipse(const ARect: TRectF; const AOpacity: Single); overload; procedure DrawEllipse(const ARect: TRectF; const AOpacity: Single; const ABrush: TStrokeBrush); overload; procedure DrawArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single); overload; procedure DrawArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single; const ABrush: TStrokeBrush); overload; { mesauring } function PtInPath(const APoint: TPointF; const APath: TPathData): Boolean; virtual; abstract; { helpers } procedure DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ASides: TSides; const ACornerType: TCornerType = TCornerType.Round); overload; procedure DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ASides: TSides; const ABrush: TStrokeBrush; const ACornerType: TCornerType = TCornerType.Round); overload; procedure DrawDashRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const AColor: TAlphaColor); { linear polygon } procedure FillPolygon(const Points: TPolygon; const AOpacity: Single); virtual; procedure DrawPolygon(const Points: TPolygon; const AOpacity: Single); virtual; { text } function LoadFontFromStream(const AStream: TStream): Boolean; virtual; { deprecated, use TTextLayout } procedure FillText(const ARect: TRectF; const AText: string; const WordWrap: Boolean; const AOpacity: Single; const Flags: TFillTextFlags; const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center); virtual; procedure MeasureText(var ARect: TRectF; const AText: string; const WordWrap: Boolean; const Flags: TFillTextFlags; const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center); virtual; procedure MeasureLines(const ALines: TLineMetricInfo; const ARect: TRectF; const AText: string; const WordWrap: Boolean; const Flags: TFillTextFlags; const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center); virtual; function TextToPath(Path: TPathData; const ARect: TRectF; const AText: string; const WordWrap: Boolean; const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center): Boolean; virtual; function TextWidth(const AText: string): Single; function TextHeight(const AText: string): Single; { properties } property Blending: Boolean read FBlending write SetBlending; property Quality: TCanvasQuality read FQuality; property Stroke: TStrokeBrush read FStroke; property Fill: TBrush read FFill write SetFill; property Font: TFont read FFont; property Matrix: TMatrix read FMatrix; property Width: Integer read FWidth; property Height: Integer read FHeight; property Bitmap: TBitmap read FBitmap; property Scale: Single read FScale; /// <summary>Allows to offset drawing area</summary> property Offset: TPointF read FOffset write FOffset; { statistics } property ClippingChangeCount: Integer read FClippingChangeCount; property SavingStateCount: Integer read FSavingStateCount; end; ECanvasManagerException = class(Exception); TCanvasDestroyMessage = class(TMessage); TCanvasManager = class sealed private type TCanvasClassRec = record CanvasClass: TCanvasClass; Default: Boolean; PrinterCanvas: Boolean; end; strict private class var FCanvasList: TList<TCanvasClassRec>; class var FDefaultCanvasClass: TCanvasClass; class var FDefaultPrinterCanvasClass: TCanvasClass; class var FMeasureBitmap: TBitmap; class var FEnableSoftwareCanvas: Boolean; private class function GetDefaultCanvas: TCanvasClass; static; class function GetMeasureCanvas: TCanvas; static; class function GetDefaultPrinterCanvas: TCanvasClass; static; public // Reserved for internal use only - do not call directly! class procedure UnInitialize; // Register a rendering Canvas class class procedure RegisterCanvas(const CanvasClass: TCanvasClass; const ADefault: Boolean; const APrinterCanvas: Boolean); // Return default Canvas class property DefaultCanvas: TCanvasClass read GetDefaultCanvas; // Return default Canvas class property DefaultPrinterCanvas: TCanvasClass read GetDefaultPrinterCanvas; // Return canvas instance used for text measuring for example class property MeasureCanvas: TCanvas read GetMeasureCanvas; // Creation helper class function CreateFromWindow(const AParent: TWindowHandle; const AWidth, AHeight: Integer; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault): TCanvas; class function CreateFromBitmap(const ABitmap: TBitmap; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault): TCanvas; class function CreateFromPrinter(const APrinter: TAbstractPrinter): TCanvas; class procedure RecreateFromPrinter(const Canvas: TCanvas; const APrinter: TAbstractPrinter); class procedure EnableSoftwareCanvas(const Enable: Boolean); end; TPrinterCanvas = class(TCanvas) end; TPrinterCanvasClass = class of TPrinterCanvas; { TBrushObject } IBrushObject = interface(IFreeNotificationBehavior) ['{BB870DB6-0228-4165-9906-CF75BFF8C7CA}'] function GetBrush: TBrush; property Brush: TBrush read GetBrush; end; TBrushObject = class(TFmxObject, IBrushObject) private FBrush: TBrush; { IBrushObject } function GetBrush: TBrush; protected procedure SetName(const NewName: TComponentName); override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; published property Brush: TBrush read FBrush write FBrush; end; { TFontObject } IFontObject = interface(IFreeNotificationBehavior) ['{F87FBCFE-CE5F-430C-8F46-B20B2E395C1B}'] function GetFont: TFont; property Font: TFont read GetFont; end; TFontObject = class(TFmxObject, IFontObject) private FFont: TFont; { IFontObject } function GetFont: TFont; protected procedure SetName(const NewName: TComponentName); override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; published property Font: TFont read FFont write FFont; end; { TPathObject } TPathObject = class(TFmxObject, IPathObject) private FPath: TPathData; { IPathObject } function GetPath: TPathData; protected procedure SetName(const NewName: TComponentName); override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; published property Path: TPathData read FPath write FPath; end; { TBitmapObject } TBitmapObject = class(TFmxObject, IBitmapObject) private FBitmap: TBitmap; { IBitmapObject } function GetBitmap: TBitmap; protected procedure SetName(const NewName: TComponentName); override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; published property Bitmap: TBitmap read FBitmap write FBitmap; end; { TColorObject } TColorObject = class(TFmxObject) private FColor: TAlphaColor; protected procedure SetName(const NewName: TComponentName); override; published property Color: TAlphaColor read FColor write FColor; end; TFontColorForStateClass = class of TFontColorForState; TFontColorForState = class (TPersistent) public type TIndex = (Normal, Hot, Pressed, Focused, Active); private [Weak] FOwner: TTextSettings; FColor: array [TIndex] of TAlphaColor; FUpdateCount: Integer; FChanged: Boolean; function GetColor(const Index: TIndex): TAlphaColor; procedure SetColor(const Index: TIndex; const Value: TAlphaColor); protected function GetOwner: TPersistent; override; function GetCurrentColor(const Index: TIndex): TAlphaColor; virtual; procedure DoChanged; virtual; public constructor Create(const AOwner: TTextSettings); virtual; procedure AfterConstruction; override; procedure BeginUpdate; procedure EndUpdate; procedure Change; property Owner: TTextSettings read FOwner; procedure Assign(Source: TPersistent); override; function Equals(Obj: TObject): Boolean; override; property CurrentColor[const Index: TIndex]: TAlphaColor read GetCurrentColor; property Color[const Index: TIndex]: TAlphaColor read GetColor write SetColor; default; property Normal: TAlphaColor index TIndex.Normal read GetColor write SetColor default TAlphaColorRec.Null; property Hot: TAlphaColor index TIndex.Hot read GetColor write SetColor default TAlphaColorRec.Null; property Pressed: TAlphaColor index TIndex.Pressed read GetColor write SetColor default TAlphaColorRec.Null; property Focused: TAlphaColor index TIndex.Focused read GetColor write SetColor default TAlphaColorRec.Null; property Active: TAlphaColor index TIndex.Active read GetColor write SetColor default TAlphaColorRec.Null; end; TTextSettingsClass = class of TTextSettings; /// <summary> /// This class combines some of properties that relate to the text /// </summary> TTextSettings = class(TPersistent) private [Weak] FOwner: TPersistent; FFont: TFont; FUpdateCount: Integer; FHorzAlign: TTextAlign; FVertAlign: TTextAlign; FWordWrap: Boolean; FFontColor: TAlphaColor; FIsChanged: Boolean; FIsAdjustChanged: Boolean; FOnChanged: TNotifyEvent; FTrimming: TTextTrimming; FFontColorForState: TFontColorForState; procedure SetFontColor(const Value: TAlphaColor); procedure SetHorzAlign(const Value: TTextAlign); procedure SetVertAlign(const Value: TTextAlign); procedure SetWordWrap(const Value: Boolean); procedure SetTrimming(const Value: TTextTrimming); procedure SetFontColorForState(const Value: TFontColorForState); function StoreFontColorForState: Boolean; function CreateFontColorForState: TFontColorForState; protected procedure DoChanged; virtual; procedure SetFont(const Value: TFont); virtual; function GetOwner: TPersistent; override; function GetTextColorsClass: TFontColorForStateClass; virtual; procedure DoAssign(const Source: TTextSettings); virtual; procedure DoAssignNotStyled(const TextSettings: TTextSettings; const StyledSettings: TStyledSettings); virtual; public constructor Create(const AOwner: TPersistent); virtual; destructor Destroy; override; procedure AfterConstruction; override; procedure Assign(Source: TPersistent); override; procedure AssignNotStyled(const TextSettings: TTextSettings; const StyledSettings: TStyledSettings); function Equals(Obj: TObject): Boolean; override; procedure Change; procedure BeginUpdate; procedure EndUpdate; procedure UpdateStyledSettings(const OldTextSettings, DefaultTextSettings: TTextSettings; var StyledSettings: TStyledSettings); virtual; property UpdateCount: integer read FUpdateCount; property IsChanged: boolean read FIsChanged write FIsChanged; property IsAdjustChanged: boolean read FIsAdjustChanged write FIsAdjustChanged; property Font: TFont read FFont write SetFont; property FontColor: TAlphaColor read FFontColor write SetFontColor default TAlphaColorRec.Black; property FontColorForState: TFontColorForState read FFontColorForState write SetFontColorForState stored StoreFontColorForState; property HorzAlign: TTextAlign read FHorzAlign write SetHorzAlign default TTextAlign.Leading; property VertAlign: TTextAlign read FVertAlign write SetVertAlign default TTextAlign.Center; property WordWrap: Boolean read FWordWrap write SetWordWrap default False; property Trimming: TTextTrimming read FTrimming write SetTrimming default TTextTrimming.None; property Owner: TPersistent read FOwner; property OnChanged: TNotifyEvent read FOnChanged write FOnChanged; end; ITextSettings = interface ['{FD99635D-D8DB-4E26-B36F-97D3AABBCCB3}'] function GetDefaultTextSettings: TTextSettings; function GetTextSettings: TTextSettings; procedure SetTextSettings(const Value: TTextSettings); function GetResultingTextSettings: TTextSettings; function GetStyledSettings: TStyledSettings; procedure SetStyledSettings(const Value: TStyledSettings); property DefaultTextSettings: TTextSettings read GetDefaultTextSettings; property TextSettings: TTextSettings read GetTextSettings write SetTextSettings; property ResultingTextSettings: TTextSettings read GetResultingTextSettings; property StyledSettings: TStyledSettings read GetStyledSettings write SetStyledSettings; end; implementation uses System.UIConsts, System.Math, System.TypInfo, System.Character, FMX.Consts, FMX.Platform, FMX.TextLayout, FMX.Utils; { TImageTypeChecker } class function TImageTypeChecker.GetType(AFileName: String): String; var LStream: TStream; begin LStream := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyWrite); try Result := GetType(LStream); finally LStream.Free; end; end; class function TImageTypeChecker.GetType(AData: TStream): String; var LBuffer : TBytes; I: Integer; LOldPos: Int64; const MaxImageDataLength = 4; ImageData: array[0..6] of TImageData = ( (DataType: SGIFImageExtension; Length: 3; Header: (71,73,70,0)), // gif (DataType: SBMPImageExtension; Length: 2; Header: (66,77,0,0)), // bmp (DataType: SPNGImageExtension; Length: 4; Header: (137,80,78,71)), // png (DataType: STIFFImageExtension; Length: 3; Header: (73,73,42,0)), // tiff (DataType: STIFFImageExtension; Length: 3; Header: (77,77,42,0)), // tiff 2 (DataType: SJPGImageExtension; Length: 4; Header: (255,216,255,224)), // jpg (DataType: SJPGImageExtension; Length: 4; Header: (255,216,255,225)) // jpg (canon) ); begin Result := String.Empty; SetLength(LBuffer, MaxImageDataLength); LOldPos := AData.Position; try if AData.Read(LBuffer, MaxImageDataLength) = MaxImageDataLength then begin for I := Low(ImageData) to High(ImageData) do begin if (CompareMem(@ImageData[I].Header[0], LBuffer, ImageData[i].Length) ) then begin Result := ImageData[I].DataType; break; end; end; end; finally AData.Position := LOldPos; end; end; { TGradientPoint } procedure TGradientPoint.Assign(Source: TPersistent); begin if Source is TGradientPoint then begin FColor := TGradientPoint(Source).FColor; FOffset := TGradientPoint(Source).FOffset; end else inherited; end; function TGradientPoint.GetColor: TAlphaColor; begin Result := FColor; end; procedure TGradientPoint.SetColor(const Value: TAlphaColor); begin FColor := Value; end; { TGradientPoints } function TGradientPoints.GetPoint(Index: Integer): TGradientPoint; begin Result := TGradientPoint(Items[Index]); end; { TGradient } constructor TGradient.Create; var P: TGradientPoint; begin inherited; FStartPosition := TPosition.Create(PointF(0, 0)); FStartPosition.OnChange := PositionChanged; FStopPosition := TPosition.Create(PointF(0, 1)); FStopPosition.OnChange := PositionChanged; FRadialTransform := TTransform.Create; FRadialTransform.OnChanged := PositionChanged; FPoints := TGradientPoints.Create(TGradientPoint); P := TGradientPoint(FPoints.Add); P.IntColor := $FF000000; P := TGradientPoint(FPoints.Add); P.IntColor := $FFFFFFFF; P.Offset := 1; end; procedure TGradient.ApplyOpacity(const AOpacity: Single); var I: Integer; begin if AOpacity < 1.0 then for I := 0 to FPoints.Count - 1 do FPoints[I].Color := MakeColor(FPoints[I].Color, AOpacity); end; procedure TGradient.Assign(Source: TPersistent); var SaveChanged: TNotifyEvent; begin if Source is TGradient then begin SaveChanged := FOnChanged; FOnChanged := nil; FPoints.Clear; FPoints.Assign(TGradient(Source).FPoints); FStyle := TGradient(Source).Style; if FStyle = TGradientStyle.Linear then begin FStopPosition.Assign(TGradient(Source).StopPosition); FStartPosition.Assign(TGradient(Source).StartPosition); end else begin FRadialTransform.Assign(TGradient(Source).RadialTransform); end; FOnChanged := SaveChanged; if Assigned(FOnChanged) then FOnChanged(Self); end else inherited; end; destructor TGradient.Destroy; begin FStartPosition.Free; FStopPosition.Free; FRadialTransform.Free; FPoints.Free; inherited; end; function TGradient.Equal(const AGradient: TGradient): Boolean; var I: Integer; begin Result := True; if FPoints.Count <> AGradient.FPoints.Count then Exit(False); if not SameValue(FStartPosition.X, AGradient.FStartPosition.X, TEpsilon.Position) then Exit(False); if not SameValue(FStartPosition.Y, AGradient.FStartPosition.Y, TEpsilon.Position) then Exit(False); if not SameValue(FStopPosition.X, AGradient.FStopPosition.X, TEpsilon.Position) then Exit(False); if not SameValue(FStopPosition.Y, AGradient.FStopPosition.Y, TEpsilon.Position) then Exit(False); for I := 0 to FPoints.Count - 1 do begin if FPoints[I].Color <> AGradient.FPoints[I].Color then Exit(False); if not SameValue(FPoints[I].Offset, AGradient.FPoints[I].Offset, TEpsilon.Position) then Exit(False); end; end; procedure TGradient.Change; begin if Assigned(FOnChanged) then FOnChanged(Self); end; function TGradient.InterpolateColor(X, Y: Single): TAlphaColor; var A, B: TPointF; Projection: Single; begin case Style of TGradientStyle.Linear: begin A := StopPosition.Point - StartPosition.Point; B := TPointF.Create(X, Y) - StartPosition.Point; Projection := A.Normalize.DotProduct(B) / A.Length; Result := InterpolateColor(Projection); end; TGradientStyle.Radial: begin A := TPointF.Create(X, Y) - RadialTransform.RotationCenter.Point; Result := InterpolateColor(1 - (A.Length * 2)); end; else Result := 0; end; end; function TGradient.InterpolateColor(Offset: Single): TAlphaColor; var I: Integer; begin Result := 0; if FPoints.Count > 1 then begin if Offset < 0 then Offset := 0; if Offset > 1 then Offset := 1; if Offset < FPoints[0].Offset then begin Result := Points[0].IntColor; Exit; end; if Offset > FPoints[FPoints.Count - 1].Offset then begin Result := FPoints[FPoints.Count - 1].IntColor; Exit; end; for I := 0 to FPoints.Count - 2 do begin if (Offset < Points[I].Offset) then Continue; if Offset > Points[I + 1].Offset then Continue; if Points[I + 1].Offset - Points[I].Offset <= 0 then Result := Points[I].IntColor else if (I = FPoints.Count - 2) and (Offset > Points[Points.Count - 1].Offset) then // last Result := Points[Points.Count - 1].IntColor else Result := FMX.Utils.InterpolateColor(Points[I].IntColor, Points[I + 1].IntColor, (Offset - Points[I].Offset) / (Points[I + 1].Offset - Points[I].Offset)); end; end; end; procedure TGradient.PositionChanged(Sender: TObject); begin if Assigned(FOnChanged) then FOnChanged(Self); end; function TGradient.IsLinearStored: Boolean; begin Result := FStyle = TGradientStyle.Linear; end; function TGradient.IsRadialStored: Boolean; begin Result := FStyle = TGradientStyle.Radial; end; procedure TGradient.SetRadialTransform(const Value: TTransform); begin FRadialTransform.Assign(Value); end; procedure TGradient.SetStartPosition(const Value: TPosition); begin FStartPosition.Assign(Value); end; procedure TGradient.SetStopPosition(const Value: TPosition); begin FStopPosition.Assign(Value); end; procedure TGradient.SetColor(const Value: TAlphaColor); begin if (FPoints.Count > 0) and (Points[0].Color <> Value) then begin Points[0].Color := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; procedure TGradient.SetColor1(const Value: TAlphaColor); begin if (FPoints.Count > 1) and (Points[1].Color <> Value) then begin Points[1].Color := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; procedure TGradient.SetStyle(const Value: TGradientStyle); begin if FStyle <> Value then begin FStyle := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; { TBrushResource } destructor TBrushResource.Destroy; begin if FStyleResource <> nil then begin FStyleResource.RemoveFreeNotify(Self); FStyleResource := nil; end; inherited; end; procedure TBrushResource.FreeNotification(AObject: TObject); begin if AObject = FStyleResource then FStyleResource := nil; end; procedure TBrushResource.Assign(Source: TPersistent); begin if Source is TBrushResource then begin StyleResource := TBrushResource(Source).StyleResource; FStyleLookup := TBrushResource(Source).StyleLookup; end else inherited; end; procedure TBrushResource.SetStyleResource(const Value: TBrushObject); begin if FStyleResource <> Value then begin if FStyleResource <> nil then FStyleResource.RemoveFreeNotify(Self); FStyleResource := Value; if FStyleResource <> nil then begin FStyleLookup := FStyleResource.StyleName; FStyleResource.AddFreeNotify(Self); end; end; end; function TBrushResource.GetStyleLookup: string; begin Result := FStyleLookup; end; procedure TBrushResource.SetStyleLookup(const Value: string); begin if Value <> FStyleLookup then begin FStyleLookup := Value; end; end; function TBrushResource.GetBrush: TBrush; var O: TFmxObject; begin Result := nil; if FStyleResource <> nil then Result := TBrushObject(FStyleResource).Brush else if FStyleLookup <> '' then begin O := FindStyleResource(FStyleLookup); if O is TBrushObject then StyleResource := TBrushObject(O); if FStyleResource <> nil then Result := TBrushObject(FStyleResource).Brush; end; end; { TBrushBitmap } constructor TBrushBitmap.Create; begin inherited Create; FBitmap := TBitmap.Create(0, 0); end; destructor TBrushBitmap.Destroy; begin FBitmap.DisposeOf; inherited; end; procedure TBrushBitmap.DoChanged; begin if Assigned(FOnChanged) then FOnChanged(Self); end; function TBrushBitmap.GetBitmapImage: TBitmapImage; begin if FBitmap <> nil then Result := FBitmap.Image else Result := nil; end; procedure TBrushBitmap.Assign(Source: TPersistent); begin if Source is TBrushBitmap then begin FWrapMode := TBrushBitmap(Source).FWrapMode; FBitmap.Assign(TBrushBitmap(Source).FBitmap); DoChanged; end else inherited; end; procedure TBrushBitmap.SetWrapMode(const Value: TWrapMode); begin if FWrapMode <> Value then begin FWrapMode := Value; DoChanged; end; end; procedure TBrushBitmap.SetBitmap(const Value: TBitmap); begin FBitmap.Assign(Value); DoChanged; end; { TBrush } constructor TBrush.Create; begin inherited Create; FDefaultKind := ADefaultKind; FDefaultColor := ADefaultColor; FColor := ADefaultColor; FKind := FDefaultKind; FGradient := TGradient.Create; FGradient.OnChanged := GradientChanged; FResource := TBrushResource.Create; FResource.OnChanged := ResourceChanged; FBitmap := TBrushBitmap.Create; FBitmap.OnChanged := BitmapChanged; FBitmap.Bitmap.OnChange := BitmapChanged; end; destructor TBrush.Destroy; begin FBitmap.DisposeOf; FResource.DisposeOf; FGradient.DisposeOf; inherited; end; procedure TBrush.Assign(Source: TPersistent); var SaveChange: TNotifyEvent; begin if Source is TBrush then begin SaveChange := FOnChanged; FOnChanged := nil; FDefaultKind := TBrush(Source).FDefaultKind; FDefaultColor := TBrush(Source).FDefaultColor; FColor := TBrush(Source).FColor; FKind := TBrush(Source).FKind; case FKind of TBrushKind.Gradient: FGradient.Assign(TBrush(Source).Gradient); TBrushKind.Resource: FResource.Assign(TBrush(Source).Resource); TBrushKind.Bitmap: FBitmap.Assign(TBrush(Source).Bitmap); end; FOnChanged := SaveChange; if Assigned(FOnChanged) then FOnChanged(Self); end else inherited; end; procedure TBrush.GradientChanged(Sender: TObject); begin if Assigned(FOnChanged) then FOnChanged(Self); if Assigned(FOnGradientChanged) then FOnGradientChanged(Self); end; procedure TBrush.ResourceChanged(Sender: TObject); begin if Assigned(FOnChanged) then FOnChanged(Self); end; procedure TBrush.BitmapChanged(Sender: TObject); begin if Assigned(FOnChanged) then FOnChanged(Self); end; function TBrush.IsBitmapStored: Boolean; begin Result := (FKind = TBrushKind.Bitmap); end; function TBrush.IsColorStored: Boolean; begin Result := (FKind = TBrushKind.Solid) and (FColor <> FDefaultColor); end; function TBrush.IsGradientStored: Boolean; begin Result := FKind = TBrushKind.Gradient; end; function TBrush.IsKindStored: Boolean; begin Result := FKind <> FDefaultKind; end; function TBrush.IsResourceStored: Boolean; begin Result := FKind = TBrushKind.Resource; end; procedure TBrush.SetResource(const Value: TBrushResource); begin FResource.Assign(Value); end; procedure TBrush.SetGradient(const Value: TGradient); begin FGradient.Assign(Value); end; function TBrush.GetColor: TAlphaColor; begin Result := FColor; end; procedure TBrush.SetColor(const Value: TAlphaColor); begin if FColor <> Value then begin FColor := Value; if FKind = TBrushKind.Gradient then FGradient.Color := Value else if Assigned(FOnChanged) then FOnChanged(Self); end; end; procedure TBrush.SetKind(const Value: TBrushKind); begin if FKind <> Value then begin FKind := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; { TStrokeBrush.TDashData } constructor TStrokeBrush.TDashData.Create(const ADashArray: TDashArray; ADashOffset: Single); begin DashArray := ADashArray; DashOffset := ADashOffset; end; { TStrokeBrush } constructor TStrokeBrush.Create(const ADefaultKind: TBrushKind; const ADefaultColor: TAlphaColor); begin inherited; FThickness := 1; end; procedure TStrokeBrush.ReadCustomDash(AStream: TStream); var Len: Integer; begin AStream.Read(Len, SizeOf(Len)); SetLength(FDashArray, Len); if Len > 0 then AStream.Read(FDashArray[0], SizeOf(Single) * Len); AStream.Read(FDashOffset, SizeOf(FDashOffset)); end; procedure TStrokeBrush.WriteCustomDash(AStream: TStream); var Len: Integer; begin Len := Length(FDashArray); AStream.Write(Len, SizeOf(Len)); if Len > 0 then AStream.Write(FDashArray[0], SizeOf(Single) * Len); AStream.Write(FDashOffset, SizeOf(FDashOffset)); end; procedure TStrokeBrush.DefineProperties(Filer: TFiler); begin inherited; Filer.DefineBinaryProperty('CustomDash', ReadCustomDash, WriteCustomDash, Dash = TStrokeDash.Custom); end; function TStrokeBrush.GetDashArray: TDashArray; begin Result := Copy(FDashArray); end; class function TStrokeBrush.GetStdDash(const Device: TDashDevice; const Dash: TStrokeDash): TDashData; begin if not FStdDashCreated then begin // create the screen line dashes FStdDash[TDashDevice.Screen, TStrokeDash.Solid] := TDashData.Create(nil, 0); FStdDash[TDashDevice.Screen, TStrokeDash.Dash] := TDashData.Create(TDashArray.Create(3, 1), 0); FStdDash[TDashDevice.Screen, TStrokeDash.Dot] := TDashData.Create(TDashArray.Create(1, 1), 0); FStdDash[TDashDevice.Screen, TStrokeDash.DashDot] := TDashData.Create(TDashArray.Create(3, 1, 1, 1), 0); FStdDash[TDashDevice.Screen, TStrokeDash.DashDotDot] := TDashData.Create(TDashArray.Create(3, 1, 1, 1, 1, 1), 0); FStdDash[TDashDevice.Screen, TStrokeDash.Custom] := TDashData.Create(nil, 0); // create the printer line dashes {$IFDEF MACOS} // MacOS dashes work strange; these values are experimental values that // seem to work correctly FStdDash[TDashDevice.Printer, TStrokeDash.Solid] := TDashData.Create(nil, 0); FStdDash[TDashDevice.Printer, TStrokeDash.Dash] := TDashData.Create(TDashArray.Create(3 * 2, 6 * 2), 0); FStdDash[TDashDevice.Printer, TStrokeDash.Dot] := TDashData.Create(TDashArray.Create(1 * 2, 3 * 2), 0); FStdDash[TDashDevice.Printer, TStrokeDash.DashDot] := TDashData.Create(TDashArray.Create(3 * 3, 6 * 3, 1 * 3, 3 * 3), 0); FStdDash[TDashDevice.Printer, TStrokeDash.DashDotDot] := TDashData.Create(TDashArray.Create(3 * 2, 9 * 2, 1 * 2, 3 * 2, 1 * 2, 3 * 2), 0); FStdDash[TDashDevice.Printer, TStrokeDash.Custom] := TDashData.Create(nil, 0); {$ELSE} FStdDash[TDashDevice.Printer] := FStdDash[TDashDevice.Screen]; {$ENDIF} FStdDashCreated := True; end; Result.DashArray := Copy(FStdDash[Device, Dash].DashArray); Result.DashOffset := FStdDash[Device, Dash].DashOffset; end; procedure TStrokeBrush.Assign(Source: TPersistent); var SaveChange: TNotifyEvent; begin if Source is TStrokeBrush then begin SaveChange := FOnChanged; FOnChanged := nil; FDefaultKind := TStrokeBrush(Source).FDefaultKind; FDefaultColor := TStrokeBrush(Source).FDefaultColor; FColor := TStrokeBrush(Source).Color; FKind := TstrokeBrush(Source).Kind; case FKind of TBrushKind.Gradient: FGradient.Assign(TStrokeBrush(Source).Gradient); TBrushKind.Resource: FResource.Assign(TStrokeBrush(Source).Resource); TBrushKind.Bitmap: FBitmap.Assign(TStrokeBrush(Source).Bitmap); end; FThickness := TStrokeBrush(Source).Thickness; FCap := TStrokeBrush(Source).Cap; FDash := TStrokeBrush(Source).Dash; FJoin := TStrokeBrush(Source).Join; FDashArray := Copy(TStrokeBrush(Source).FDashArray); FDashOffset := TStrokeBrush(Source).FDashOffset; FOnChanged := SaveChange; if Assigned(FOnChanged) then FOnChanged(Self); end else inherited; end; procedure TStrokeBrush.SetCustomDash(const Dash: array of Single; Offset: Single); var I: Integer; begin FDash := TStrokeDash.Custom; SetLength(FDashArray, Length(Dash)); for I := 0 to High(Dash) do FDashArray[I] := Dash[I]; FDashOffset := Offset; end; function TStrokeBrush.IsThicknessStored: Boolean; begin Result := Thickness <> 1; end; procedure TStrokeBrush.SetCap(const Value: TStrokeCap); begin if FCap <> Value then begin FCap := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; procedure TStrokeBrush.SetDash(const Value: TStrokeDash); begin if FDash <> Value then begin FDash := Value; case FDash of TStrokeDash.Solid: begin FDashOffset := 0; SetLength(FDashArray, 0); end; TStrokeDash.Dash: begin FDashOffset := 0; SetLength(FDashArray, 2); FDashArray[0] := 1 * 3; FDashArray[1] := 1; end; TStrokeDash.Dot: begin FDashOffset := 0; SetLength(FDashArray, 2); FDashArray[0] := 1; FDashArray[1] := 1; end; TStrokeDash.DashDot: begin FDashOffset := 0; SetLength(FDashArray, 4); FDashArray[0] := 1 * 3; FDashArray[1] := 1; FDashArray[2] := 1; FDashArray[3] := 1; end; TStrokeDash.DashDotDot: begin FDashOffset := 0; SetLength(FDashArray, 6); FDashArray[0] := 1 * 3; FDashArray[1] := 1; FDashArray[2] := 1; FDashArray[3] := 1; FDashArray[4] := 1; FDashArray[5] := 1; end; TStrokeDash.Custom: ; else FDashOffset := 0; SetLength(FDashArray, 0); end; if Assigned(FOnChanged) then FOnChanged(Self); end; end; procedure TStrokeBrush.SetJoin(const Value: TStrokeJoin); begin if FJoin <> Value then begin FJoin := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; procedure TStrokeBrush.SetThickness(const Value: Single); var NewValue: Single; begin NewValue := Max(Value, 0); if not SameValue(FThickness, NewValue, TEpsilon.Vector) then begin FThickness := NewValue; if Assigned(FOnChanged) then FOnChanged(Self); end; end; { TFontWeightHelper } function TFontWeightHelper.IsRegular: Boolean; begin Result := Self = TFontWeight.Regular; end; { TFontSlantHelper } function TFontSlantHelper.IsRegular: Boolean; begin Result := Self = TFontSlant.Regular; end; { TFontStretchHelper } function TFontStretchHelper.IsRegular: Boolean; begin Result := Self = TFontStretch.Regular; end; { TFontStyleExt } class function TFontStyleExt.Create(const AWeight: TFontWeight; const AStant: TFontSlant; const AStretch: TFontStretch; const AOtherStyles: TFontStyles): TFontStyleExt; begin Result := TFontStyleExt.Create(AOtherStyles); Result.Weight := AWeight; Result.Slant := AStant; Result.Stretch := AStretch; end; class function TFontStyleExt.Create(const AStyle: TFontStyles): TFontStyleExt; begin Result.Weight := TFontWeight.Regular; Result.Slant := TFontSlant.Regular; Result.Stretch := TFontStretch.Regular; if AStyle <> [] then begin if TFontStyle.fsBold in AStyle then Result.Weight := TFontWeight.Bold; if TFontStyle.fsItalic in AStyle then Result.Slant := TFontSlant.Oblique; end; Result.SimpleStyle := AStyle - [TFontStyle.fsBold, TFontStyle.fsItalic]; end; class function TFontStyleExt.Default: TFontStyleExt; begin Result := TFontStyleExt.Create([]); end; class operator TFontStyleExt.Equal(const A, B: TFontStyleExt): Boolean; begin Result := (A.SimpleStyle = B.SimpleStyle) and (A.Weight = B.Weight) and (A.Slant = B.Slant) and (A.Stretch = B.Stretch); end; class operator TFontStyleExt.NotEqual(const A, B: TFontStyleExt): Boolean; begin Result := (A.SimpleStyle <> B.SimpleStyle) or (A.Weight <> B.Weight) or (A.Slant <> B.Slant) or (A.Stretch <> B.Stretch); end; class operator TFontStyleExt.Implicit(const AStyle: TFontStyleExt): TFontStyles; begin Result := AStyle.SimpleStyle; if not AStyle.Weight.IsRegular then Include(Result, TFontStyle.fsBold); if not AStyle.Slant.IsRegular then Include(Result, TFontStyle.fsItalic); end; class operator TFontStyleExt.Add(const A, B: TFontStyleExt): TFontStyleExt; begin Result := A; Result.SimpleStyle := Result.SimpleStyle + B.SimpleStyle; end; class operator TFontStyleExt.Add(const A: TFontStyleExt; const B: TFontStyle): TFontStyleExt; begin Result := A; Result.SimpleStyle := Result.SimpleStyle + [B] - [TFontStyle.fsBold, TFontStyle.fsItalic]; if B = TFontStyle.fsBold then Result.Weight := TFontWeight.Bold; if B = TFontStyle.fsItalic then Result.Slant := TFontSlant.Oblique; end; class operator TFontStyleExt.Add(const A: TFontStyleExt; const B: TFontStyles): TFontStyleExt; begin Result := A; Result.SimpleStyle := Result.SimpleStyle + B - [TFontStyle.fsBold, TFontStyle.fsItalic]; if TFontStyle.fsBold in B then Result.Weight := TFontWeight.Bold; if TFontStyle.fsItalic in B then Result.Slant := TFontSlant.Oblique; end; class operator TFontStyleExt.Subtract(const A: TFontStyleExt; const B: TFontStyle): TFontStyleExt; begin Result := A; Result.SimpleStyle := Result.SimpleStyle - [B] - [TFontStyle.fsBold, TFontStyle.fsItalic]; if B = TFontStyle.fsBold then Result.Weight := TFontWeight.Regular; if B = TFontStyle.fsItalic then Result.Slant := TFontSlant.Regular; end; class operator TFontStyleExt.Subtract(const A: TFontStyleExt; const B: TFontStyles): TFontStyleExt; begin Result := A; Result.SimpleStyle := Result.SimpleStyle - B - [TFontStyle.fsBold, TFontStyle.fsItalic]; if TFontStyle.fsBold in B then Result.Weight := TFontWeight.Regular; if TFontStyle.fsItalic in B then Result.Slant := TFontSlant.Regular; end; class operator TFontStyleExt.In(const A: TFontStyle; const B: TFontStyleExt): Boolean; begin if A in [TFontStyle.fsUnderline, TFontStyle.fsStrikeOut] then Result := A in B.SimpleStyle else if A = TFontStyle.fsBold then Result := B.Weight > TFontWeight.Regular else if A = TFontStyle.fsItalic then Result := not B.Slant.IsRegular else Result := False; end; class operator TFontStyleExt.Multiply(const A: TFontStyles; const B: TFontStyleExt): TFontStyles; begin Result := A * B; end; function TFontStyleExt.IsRegular: Boolean; begin Result := (Weight = TFontWeight.Regular) and (Stretch = TFontStretch.Regular) and (Slant = TFontSlant.Regular); end; { TFont } procedure TFont.SetFamily(const Value: TFontName); begin if FFamily <> Value then begin FFamily := Value; Change; end; end; procedure TFont.SetSize(const Value: Single); var LSize: Single; begin LSize := EnsureRange(Value, 1, MaxFontSize); if not SameValue(FSize, LSize, TEpsilon.FontSize) then begin FSize := LSize; Change; end; end; function TFont.GetStyle: TFontStyles; begin Result := FStyleExt; end; procedure TFont.SetStyle(const Value: TFontStyles); var LStyle: TFontStyleExt; begin LStyle := TFontStyleExt.Create(Value); if FStyleExt <> LStyle then begin FStyleExt := LStyle; Change; end; end; procedure TFont.SetStyleExt(const Value: TFontStyleExt); begin if FStyleExt <> Value then begin FStyleExt := Value; Change; end; end; procedure TFont.ReadStyleExt(AStream: TStream); begin AStream.Read(FStyleExt.SimpleStyle, SizeOf(TFontStyles)); AStream.Read(FStyleExt.Weight, SizeOf(TFontWeight)); AStream.Read(FStyleExt.Slant, SizeOf(TFontSlant)); AStream.Read(FStyleExt.Stretch, SizeOf(TFontStretch)); end; procedure TFont.WriteStyleExt(AStream: TStream); begin AStream.Write(FStyleExt.SimpleStyle, SizeOf(TFontStyles)); AStream.Write(FStyleExt.Weight, SizeOf(TFontWeight)); AStream.Write(FStyleExt.Slant, SizeOf(TFontSlant)); AStream.Write(FStyleExt.Stretch, SizeOf(TFontStretch)); end; procedure TFont.DefineProperties(Filer: TFiler); begin Filer.DefineBinaryProperty('StyleExt', ReadStyleExt, WriteStyleExt, not FStyleExt.IsRegular or (FStyleExt.SimpleStyle <> [])); inherited; end; function TFont.DefaultFamily: string; begin if FFontSvc = nil then TPlatformServices.Current.SupportsPlatformService(IFMXSystemFontService, FFontSvc); if FFontSvc <> nil then Result := FFontSvc.GetDefaultFontFamilyName else Result := DefaultFontFamily; end; function TFont.DefaultSize: Single; begin if FFontSvc = nil then TPlatformServices.Current.SupportsPlatformService(IFMXSystemFontService, FFontSvc); if FFontSvc <> nil then Result := FFontSvc.GetDefaultFontSize else Result := DefaultFontSize; end; procedure TFont.DoChanged; begin if Assigned(FOnChanged) then FOnChanged(Self); end; constructor TFont.Create; begin inherited; FUpdating := True; SetSettings(DefaultFamily, DefaultSize, TFontStyleExt.Default); end; procedure TFont.AfterConstruction; begin inherited; FChanged := False; FUpdating := False; end; procedure TFont.Change; begin if not FUpdating then begin FChanged := False; DoChanged; end else FChanged := True; end; procedure TFont.Assign(Source: TPersistent); var LFont: TFont; begin if (Source = nil) or (Source is TFont) then begin if Source = nil then LFont := TFontClass(ClassType).Create else LFont := TFont(Source); try SetSettings(LFont.Family, LFont.Size, LFont.StyleExt); finally if Source = nil then LFont.Free; end; end else inherited; end; procedure TFont.SetSettings(const AFamily: string; const ASize: Single; const AStyle: TFontStyleExt); var LUpdating: Boolean; begin LUpdating := FUpdating; try FUpdating := True; Family := AFamily; Size := ASize; StyleExt := AStyle; finally FUpdating := LUpdating; end; if not FUpdating and FChanged then Change; end; function TFont.Equals(Obj: TObject): Boolean; begin Result := (Obj is TFont) and SameValue(Size, TFont(Obj).Size, TEpsilon.FontSize) and (Family = TFont(Obj).Family) and (StyleExt = TFont(Obj).StyleExt); end; function TFont.IsFamilyStored: Boolean; begin Result := FFamily <> DefaultFamily; end; function TFont.IsSizeStored: Boolean; begin Result := not SameValue(FSize, DefaultSize, TEpsilon.FontSize); end; { TFontColorForState } constructor TFontColorForState.Create(const AOwner: TTextSettings); begin inherited Create; FOwner := AOwner; BeginUpdate; end; procedure TFontColorForState.AfterConstruction; begin inherited; FChanged := False; EndUpdate; end; procedure TFontColorForState.Assign(Source: TPersistent); var LFontColors: TFontColorForState; I: TIndex; begin if (Source is TFontColorForState) or (Source = nil) then begin if Source = nil then LFontColors := TFontColorForStateClass(ClassType).Create(Owner) else LFontColors := TFontColorForState(Source); try BeginUpdate; try for I := Low(TIndex) to High(TIndex) do Color[I] := LFontColors.Color[I]; finally EndUpdate; end; finally if Source = nil then LFontColors.Free; end; end else inherited; end; function TFontColorForState.Equals(Obj: TObject): Boolean; var I: TIndex; begin Result := Obj is TFontColorForState; if Result then for I := Low(TIndex) to High(TIndex) do if FColor[I] <> TFontColorForState(Obj).FColor[I] then Exit(False); end; procedure TFontColorForState.BeginUpdate; begin Inc(FUpdateCount); end; procedure TFontColorForState.EndUpdate; begin if FUpdateCount > 0 then begin Dec(FUpdateCount); if (FUpdateCount = 0) and FChanged then try DoChanged; finally FChanged := False; end; end; end; procedure TFontColorForState.Change; begin if FUpdateCount = 0 then begin try DoChanged; finally FChanged := False; end; end else FChanged := True; end; procedure TFontColorForState.DoChanged; begin if FOwner <> nil then FOwner.Change; end; function TFontColorForState.GetColor(const Index: TIndex): TAlphaColor; begin Result := FColor[Index]; end; procedure TFontColorForState.SetColor(const Index: TIndex; const Value: TAlphaColor); begin if FColor[Index] <> Value then begin FColor[Index] := Value; Change; end; end; function TFontColorForState.GetCurrentColor(const Index: TIndex): TAlphaColor; begin Result := FColor[Index]; if (Result = claNull) and (Owner <> nil) then Result := Owner.FontColor; end; function TFontColorForState.GetOwner: TPersistent; begin Result := FOwner; end; { TTextSettings } type TSettingsFont = class (TFont) private [weak] FTextSettings: TTextSettings; protected procedure DoChanged; override; public constructor Create(const ATextSettings: TTextSettings); property TextSettings: TTextSettings read FTextSettings; end; { TSettingsFont } constructor TSettingsFont.Create(const ATextSettings: TTextSettings); begin inherited Create; FTextSettings := ATextSettings; end; procedure TSettingsFont.DoChanged; begin if FTextSettings <> nil then begin FTextSettings.IsAdjustChanged := True; FTextSettings.Change; end; inherited; end; constructor TTextSettings.Create(const AOwner: TPersistent); begin inherited Create; FOwner := AOwner; BeginUpdate; FFontColorForState := CreateFontColorForState; FFont := TSettingsFont.Create(Self); FontColor := TAlphaColorRec.Black; HorzAlign := TTextAlign.Leading; VertAlign := TTextAlign.Center; Trimming := TTextTrimming.None; WordWrap := False; end; procedure TTextSettings.AfterConstruction; begin inherited; FIsChanged := False; FIsAdjustChanged := False; EndUpdate; end; destructor TTextSettings.Destroy; begin FFont.Free; FFontColorForState.Free; inherited; end; function TTextSettings.GetOwner: TPersistent; begin Result := FOwner; end; procedure TTextSettings.DoAssign(const Source: TTextSettings); begin Font.Assign(Source.Font); FontColor := Source.FontColor; FontColorForState.Assign(Source.FontColorForState); HorzAlign := Source.HorzAlign; VertAlign := Source.VertAlign; WordWrap := Source.WordWrap; Trimming := Source.Trimming; end; procedure TTextSettings.Assign(Source: TPersistent); var LTextSettings: TTextSettings; begin if (Source = nil) or (Source is TTextSettings) then begin if Source = nil then LTextSettings := TTextSettingsClass(ClassType).Create(Owner) else LTextSettings := TTextSettings(Source); try BeginUpdate; try DoAssign(LTextSettings); finally EndUpdate; end; finally if Source = nil then LTextSettings.Free; end; end else inherited; end; function TTextSettings.Equals(Obj: TObject): Boolean; var Source: TTextSettings; begin Result := Obj is TTextSettings; if Result then begin Source := TTextSettings(Obj); Result := (HorzAlign = Source.HorzAlign) and (VertAlign = Source.VertAlign) and (WordWrap = Source.WordWrap) and (FontColor = Source.FontColor) and (Trimming = Source.Trimming) and (Font.Equals(Source.Font)) and (FontColorForState.Equals(Source.FontColorForState)); end; end; procedure TTextSettings.DoAssignNotStyled(const TextSettings: TTextSettings; const StyledSettings: TStyledSettings); begin if not (TStyledSetting.Family in StyledSettings) then Font.Family := TextSettings.Font.FFamily; if not (TStyledSetting.Size in StyledSettings) then Font.Size := TextSettings.Font.Size; if not (TStyledSetting.Style in StyledSettings) then Font.StyleExt := TextSettings.Font.StyleExt; if not (TStyledSetting.FontColor in StyledSettings) then begin FontColor := TextSettings.FontColor; FontColorForState := TextSettings.FontColorForState; end; if not (TStyledSetting.Other in StyledSettings) then begin HorzAlign := TextSettings.HorzAlign; VertAlign := TextSettings.VertAlign; WordWrap := TextSettings.WordWrap; Trimming := TextSettings.Trimming; end; end; procedure TTextSettings.AssignNotStyled(const TextSettings: TTextSettings; const StyledSettings: TStyledSettings); var LTextSettings: TTextSettings; begin if StyledSettings <> AllStyledSettings then begin if StyledSettings = [] then Assign(TextSettings) else begin if TextSettings = nil then LTextSettings := TTextSettingsClass(ClassType).Create(Owner) else LTextSettings := TextSettings; try BeginUpdate; try DoAssignNotStyled(LTextSettings, StyledSettings); finally EndUpdate; end; finally if TextSettings = nil then LTextSettings.Free; end; end; end; end; procedure TTextSettings.UpdateStyledSettings(const OldTextSettings, DefaultTextSettings: TTextSettings; var StyledSettings: TStyledSettings); begin // If the user changed the value of the property, and it differs from the default, // then delete the corresponding value from StyledSettings if (not SameText(OldTextSettings.Font.Family, Font.Family)) and (not SameText(DefaultTextSettings.Font.Family, Font.Family)) then Exclude(StyledSettings, TStyledSetting.Family); if (not SameValue(OldTextSettings.Font.Size, Font.Size, TEpsilon.FontSize)) and (not SameValue(DefaultTextSettings.Font.Size, Font.Size, TEpsilon.FontSize)) then Exclude(StyledSettings, TStyledSetting.Size); if (OldTextSettings.Font.StyleExt <> Font.StyleExt) and (DefaultTextSettings.Font.StyleExt <> Font.StyleExt) then Exclude(StyledSettings, TStyledSetting.Style); if ((OldTextSettings.FontColor <> FontColor) and (DefaultTextSettings.FontColor <> FontColor)) then Exclude(StyledSettings, TStyledSetting.FontColor); if ((OldTextSettings.HorzAlign <> HorzAlign) and (DefaultTextSettings.HorzAlign <> HorzAlign)) or ((OldTextSettings.VertAlign <> VertAlign) and (DefaultTextSettings.VertAlign <> VertAlign)) or ((OldTextSettings.Trimming <> Trimming) and (DefaultTextSettings.Trimming <> Trimming)) or ((OldTextSettings.WordWrap <> WordWrap) and (DefaultTextSettings.WordWrap <> WordWrap)) then Exclude(StyledSettings, TStyledSetting.Other); if (not OldTextSettings.FontColorForState.Equals(FontColorForState)) and (not DefaultTextSettings.FontColorForState.Equals(FontColorForState)) then Exclude(StyledSettings, TStyledSetting.FontColor); end; procedure TTextSettings.BeginUpdate; begin Inc(FUpdateCount); end; procedure TTextSettings.EndUpdate; begin if FUpdateCount > 0 then begin Dec(FUpdateCount); if (FUpdateCount = 0) and (FIsChanged or FIsAdjustChanged) then try DoChanged; finally FIsChanged := False; FIsAdjustChanged := False; end; end; end; procedure TTextSettings.Change; begin FIsChanged := True; if (FUpdateCount = 0) then begin try DoChanged; finally FIsChanged := False; FIsAdjustChanged := False; end; end; end; procedure TTextSettings.DoChanged; begin if Assigned(OnChanged) then OnChanged(Self); end; procedure TTextSettings.SetFont(const Value: TFont); begin if not (((Font = nil) and (Value = nil)) or ((Font <> nil) and Font.Equals(Value))) then begin Font.Assign(Value); IsAdjustChanged := True; Change; end; end; procedure TTextSettings.SetFontColor(const Value: TAlphaColor); begin if FFontColor <> Value then begin FFontColor := Value; {$IF defined(IOS)} // IsAdjustChanged := True; // << https://quality.embarcadero.com/browse/RSP-20676 {$ENDIF} // Change; end; end; procedure TTextSettings.SetHorzAlign(const Value: TTextAlign); begin if FHorzAlign <> Value then begin FHorzAlign := Value; IsAdjustChanged := True; Change; end; end; procedure TTextSettings.SetVertAlign(const Value: TTextAlign); begin if FVertAlign <> Value then begin FVertAlign := Value; IsAdjustChanged := True; Change; end; end; procedure TTextSettings.SetTrimming(const Value: TTextTrimming); begin if FTrimming <> Value then begin FTrimming := Value; IsAdjustChanged := True; Change; end; end; procedure TTextSettings.SetWordWrap(const Value: Boolean); begin if FWordWrap <> Value then begin FWordWrap := Value; IsAdjustChanged := True; Change; end; end; function TTextSettings.GetTextColorsClass: TFontColorForStateClass; begin Result := nil; end; function TTextSettings.CreateFontColorForState: TFontColorForState; var LClass: TFontColorForStateClass; begin LClass := GetTextColorsClass; if LClass = nil then LClass := TFontColorForState; Result := LClass.Create(Self); end; procedure TTextSettings.SetFontColorForState(const Value: TFontColorForState); begin FFontColorForState.Assign(Value); end; function TTextSettings.StoreFontColorForState: Boolean; var LFontColors: TFontColorForState; begin LFontColors := CreateFontColorForState; try Result := not FFontColorForState.Equals(LFontColors); finally LFontColors.Free; end; end; { TBitmapCodecManager } class procedure TBitmapCodecManager.UnInitialize; begin FreeAndNil(FBitmapCodecClassDescriptors); end; class function TBitmapCodecManager.FindBitmapCodecDescriptor(const Name: string; const Field: TBitmapCodecDescriptorField): TBitmapCodecClassDescriptor; var LResult: Boolean; LDescriptor: TBitmapCodecClassDescriptor; begin FillChar(Result, SizeOf(Result), 0); if FBitmapCodecClassDescriptors <> nil then for LDescriptor in FBitmapCodecClassDescriptors do begin case Field of TBitmapCodecDescriptorField.Extension: LResult := SameText(Name, LDescriptor.Extension, loUserLocale); TBitmapCodecDescriptorField.Description: LResult := SameText(Name, LDescriptor.Description, loUserLocale); else LResult := False; end; if LResult then Result := LDescriptor; end; end; class function TBitmapCodecManager.GuessCodecClass(const Name: string; const Field: TBitmapCodecDescriptorField): TCustomBitmapCodecClass; begin Result := FindBitmapCodecDescriptor(name, field).BitmapCodecClass; //If none found, fallback to the first one. if (Result = nil) and (FBitmapCodecClassDescriptors.Count > 0) then Result := FBitmapCodecClassDescriptors[0].BitmapCodecClass; end; class procedure TBitmapCodecManager.RegisterBitmapCodecClass(const Extension, Description: string; const CanSave: Boolean; const BitmapCodecClass: TCustomBitmapCodecClass); var LDescriptor: TBitmapCodecClassDescriptor; begin if FBitmapCodecClassDescriptors = nil then FBitmapCodecClassDescriptors := TList<TBitmapCodecClassDescriptor>.Create; LDescriptor.Extension := Extension; LDescriptor.Description := Description; LDescriptor.BitmapCodecClass := BitmapCodecClass; LDescriptor.CanSave := CanSave; FBitmapCodecClassDescriptors.Add(LDescriptor); end; class procedure TBitmapCodecManager.UnregisterBitmapCodecClass(const Extension: string); var I: Integer; begin if FBitmapCodecClassDescriptors <> nil then for I := FBitmapCodecClassDescriptors.Count - 1 downto 0 do if SameText(Extension, FBitmapCodecClassDescriptors[I].Extension) then FBitmapCodecClassDescriptors.Delete(I); end; class function TBitmapCodecManager.CodecExists(const AFileName: string): Boolean; begin Result := FindBitmapCodecDescriptor(ExtractFileExt(AFileName), TBitmapCodecDescriptorField.Extension).BitmapCodecClass <> nil; end; class function TBitmapCodecManager.GetFileTypes: string; var Descriptor: TBitmapCodecClassDescriptor; begin Result := ''; if FBitmapCodecClassDescriptors <> nil then for Descriptor in FBitmapCodecClassDescriptors do if Result = '' then Result := '*' + Descriptor.Extension else Result := Result + ';' + '*' + Descriptor.Extension; end; class function TBitmapCodecManager.GetFilterString: string; var Descriptor: TBitmapCodecClassDescriptor; begin Result := ''; if FBitmapCodecClassDescriptors <> nil then begin for Descriptor in FBitmapCodecClassDescriptors do if Result = '' then Result := Descriptor.Description + ' (' + '*' + Descriptor.Extension + ')|' + '*' + Descriptor.Extension else Result := Result + '|' + Descriptor.Description + ' (' + '*' + Descriptor.Extension + ')|' + '*' + Descriptor.Extension; // all files Result := SVAllFiles + ' (' + GetFileTypes + ')|' + GetFileTypes + '|' + Result; end; end; class function TBitmapCodecManager.GetImageSize(const AFileName: string): TPointF; var CodecClass: TCustomBitmapCodecClass; DataType: String; begin DataType := TImageTypeChecker.GetType(AFileName); CodecClass := GuessCodecClass(DataType, TBitmapCodecDescriptorField.Extension); if CodecClass <> nil then Result := CodecClass.GetImageSize(AFileName) else Result := TPointF.Zero; end; class function TBitmapCodecManager.LoadFromFile(const AFileName: string; const Bitmap: TBitmapSurface; const MaxSizeLimit: Cardinal = 0): Boolean; var CodecClass: TCustomBitmapCodecClass; Codec: TCustomBitmapCodec; DataType: String; begin DataType := TImageTypeChecker.GetType(AFileName); CodecClass := GuessCodecClass(DataType, TBitmapCodecDescriptorField.Extension); if CodecClass <> nil then begin Codec := CodecClass.Create; try Result := Codec.LoadFromFile(AFileName, Bitmap, MaxSizeLimit); finally Codec.Free; end; end else Result := False; end; class function TBitmapCodecManager.LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single; const UseEmbedded: Boolean; const Bitmap: TBitmapSurface): Boolean; var CodecClass: TCustomBitmapCodecClass; Codec: TCustomBitmapCodec; DataType: String; begin DataType := TImageTypeChecker.GetType(AFileName); CodecClass := GuessCodecClass(DataType, TBitmapCodecDescriptorField.Extension); if CodecClass <> nil then begin Codec := CodecClass.Create; try Result := Codec.LoadThumbnailFromFile(AFileName, AFitWidth, AFitHeight, UseEmbedded, Bitmap); finally Codec.Free; end; end else Result := False; end; class function TBitmapCodecManager.LoadFromStream(const AStream: TStream; const Bitmap: TBitmapSurface; const MaxSizeLimit: Cardinal = 0): Boolean; var CodecClass: TCustomBitmapCodecClass; Codec: TCustomBitmapCodec; DataType: String; begin Result := False; DataType := TImageTypeChecker.GetType(AStream); CodecClass := GuessCodecClass(DataType, TBitmapCodecDescriptorField.Extension); if CodecClass <> nil then begin Codec := CodecClass.Create; try Result := Codec.LoadFromStream(AStream, Bitmap, MaxSizeLimit); finally Codec.Free; end; end end; class function TBitmapCodecManager.SaveToFile(const AFileName: string; const Bitmap: TBitmapSurface; const SaveParams: PBitmapCodecSaveParams = nil): Boolean; var Codec: TCustomBitmapCodec; Descriptor: TBitmapCodecClassDescriptor; begin Result := False; if FBitmapCodecClassDescriptors <> nil then for Descriptor in FBitmapCodecClassDescriptors do if SameText(ExtractFileExt(AFileName), Descriptor.Extension, loUserLocale) and Descriptor.CanSave then begin Codec := Descriptor.BitmapCodecClass.Create; try Result := Codec.SaveToFile(AFileName, Bitmap, SaveParams); finally Codec.Free; end; end; end; class function TBitmapCodecManager.SaveToStream(const AStream: TStream; const Bitmap: TBitmapSurface; const Extension: string; SaveParams: PBitmapCodecSaveParams = nil): Boolean; var Codec: TCustomBitmapCodec; Descriptor: TBitmapCodecClassDescriptor; begin Result := False; if FBitmapCodecClassDescriptors <> nil then for Descriptor in FBitmapCodecClassDescriptors do if (SameText(Extension, Descriptor.Extension, loUserLocale) or SameText('.' + Extension, Descriptor.Extension, loUserLocale)) and Descriptor.CanSave then begin Codec := Descriptor.BitmapCodecClass.Create; try Result := Codec.SaveToStream(AStream, Bitmap, Descriptor.Extension, SaveParams); finally Codec.Free; end; end; end; { TBitmapData } constructor TBitmapData.Create(const AWidth, AHeight: Integer; const APixelFormat: TPixelFormat); begin Self.FWidth := AWidth; Self.FHeight := AHeight; Self.FPixelFormat := APixelFormat; end; function TBitmapData.GetBytesPerLine: Integer; begin Result := Width * BytesPerPixel; end; function TBitmapData.GetBytesPerPixel: Integer; begin Result := PixelFormatBytes[PixelFormat]; end; function TBitmapData.GetPixel(const X, Y: Integer): TAlphaColor; begin Result := PixelToAlphaColor(GetPixelAddr(X, Y), PixelFormat); end; function TBitmapData.GetPixelAddr(const I, J: Integer): Pointer; begin Result := Pointer(NativeInt(GetScanline(J)) + I * BytesPerPixel); end; function TBitmapData.GetScanline(const I: Integer): Pointer; begin Result := Pointer(NativeInt(Data) + I * Pitch); end; procedure TBitmapData.Copy(const Source: TBitmapData); var I: Integer; begin for I := 0 to Height - 1 do Move(Source.GetScanline(I)^, GetScanline(I)^, BytesPerLine); end; procedure TBitmapData.SetPixel(const X, Y: Integer; const AColor: TAlphaColor); begin AlphaColorToPixel(AColor, GetPixelAddr(X, Y), PixelFormat); end; { TBitmapImage } constructor TBitmapImage.Create; begin inherited; FBitmapScale := 1; end; procedure TBitmapImage.CreateHandle; begin FHandle := CanvasClass.InitializeBitmap(Width, Height, BitmapScale, FPixelFormat); end; procedure TBitmapImage.FreeHandle; begin FCanvasClass.FinalizeBitmap(FHandle); FHandle := 0; end; function TBitmapImage.GetCanvasClass: TCanvasClass; begin if FCanvasClass = nil then FCanvasClass := TCanvasManager.GetDefaultCanvas; Result := FCanvasClass; end; procedure TBitmapImage.IncreaseRefCount; begin AtomicIncrement(FRefCount); end; procedure TBitmapImage.DecreaseRefCount; begin if Self <> nil then begin AtomicDecrement(FRefCount); if FRefCount = 0 then begin if FHandle <> 0 then FreeHandle; DisposeOf; end; end; end; { TBitmap } constructor TBitmap.Create; begin inherited; FImage := TBitmapImage.Create; FImage.IncreaseRefCount; end; constructor TBitmap.Create(const AWidth, AHeight: Integer); begin Create; SetSize(AWidth, AHeight); end; constructor TBitmap.CreateFromStream(const AStream: TStream); begin Create; LoadFromStream(AStream); end; constructor TBitmap.CreateFromFile(const AFileName: string); begin Create; LoadFromFile(AFileName); end; constructor TBitmap.CreateFromBitmapAndMask(const Bitmap, Mask: TBitmap); function GetBrightness(const Color: TAlphaColor): Integer; begin { Faster integer variant of formula: Result = R * 0.2126 + G * 0.7152 + B * 0.0722 } Result := ((Integer(TAlphaColorRec(Color).R) * 54) + (Integer(TAlphaColorRec(Color).G) * 183) + (Integer(TAlphaColorRec(Color).R) * 19)) div 256; end; var I, J: Integer; D, B, M: TBitmapData; C: TAlphaColor; begin Create(Bitmap.Width, Bitmap.Height); if (Bitmap.Width <> Mask.Width) or (Bitmap.Height <> Mask.Height) then raise EBitmapIncorrectSize.Create(SBitmapIncorrectSize); if Map(TMapAccess.Write, D) then try if Bitmap.Map(TMapAccess.Read, B) then try if Mask.Map(TMapAccess.Read, M) then try for J := 0 to Height - 1 do for I := 0 to Width - 1 do begin C := B.GetPixel(I, J); TAlphaColorRec(C).A := GetBrightness(M.GetPixel(I, J)); D.SetPixel(I, J, C); end; finally Mask.Unmap(M); end; finally Bitmap.Unmap(B); end; finally Unmap(D); end; end; destructor TBitmap.Destroy; begin DestroyResources; FImage.DecreaseRefCount; inherited; end; function TBitmap.GetImage: TBitmapImage; begin if FImage.Handle = 0 then FImage.CreateHandle; Result := FImage; end; function TBitmap.GetHandle: THandle; begin Result := Image.Handle; end; function TBitmap.GetHeight: Integer; begin Result := FImage.Height; end; function TBitmap.GetPixelFormat: TPixelFormat; begin Result := Image.PixelFormat; end; function TBitmap.GetSize: TSize; begin Result := TSize.Create(Width, Height); end; function TBitmap.GetWidth: Integer; begin Result := FImage.Width; end; function TBitmap.HandleAllocated: Boolean; begin Result := (FImage <> nil) and (Image.Handle <> 0); end; procedure TBitmap.SetWidth(const Value: Integer); begin SetSize(Value, Height); end; function TBitmap.GetBitmapScale: Single; begin Result := FImage.BitmapScale; end; function TBitmap.GetBounds: TRect; begin Result := TRect.Create(0, 0, Width, Height); end; function TBitmap.GetBoundsF: TRectF; begin Result := TRectF.Create(0, 0, Width, Height); end; function TBitmap.GetBytesPerLine: Integer; begin Result := BytesPerPixel * Width; end; function TBitmap.GetBytesPerPixel: Integer; begin Result := PixelFormatBytes[PixelFormat]; end; procedure TBitmap.SetBitmapScale(const Scale: Single); begin if BitmapScale <> Scale then begin TMonitor.Enter(Self); try CopyToNewReference; FImage.FBitmapScale := Scale; finally TMonitor.Exit(Self); end; end; end; procedure TBitmap.SetHeight(const Value: Integer); begin SetSize(Width, Value); end; procedure TBitmap.SetSize(const ASize: TSize); begin SetSize(ASize.Width, ASize.Height); end; procedure TBitmap.SetSize(const AWidth, AHeight: Integer); var SaveBitmapScale: Single; begin if (FImage.FWidth <> AWidth) or (FImage.FHeight <> AHeight) then begin if (AWidth > CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) or (AHeight > CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) then raise EBitmapSizeTooBig.CreateRes(@SBitmapSizeTooBig); TMonitor.Enter(Self); try SaveBitmapScale := BitmapScale; CreateNewReference; FImage.FWidth := Max(0, AWidth); FImage.FHeight := Max(0, AHeight); FImage.FBitmapScale := SaveBitmapScale; BitmapChanged; finally TMonitor.Exit(Self); end; end; end; procedure TBitmap.DestroyResources; begin TMonitor.Enter(Self); try if FCanvas <> nil then FCanvas.DisposeOf; FCanvas := nil; finally TMonitor.Exit(Self); end; end; procedure TBitmap.FreeHandle; begin TMonitor.Enter(Self); try CreateNewReference; BitmapChanged; finally TMonitor.Exit(Self); end; end; procedure TBitmap.CreateNewReference; begin TMonitor.Enter(Self); try DestroyResources; FImage.DecreaseRefCount; FImage := TBitmapImage.Create; FImage.IncreaseRefCount; finally TMonitor.Exit(Self); end; end; procedure TBitmap.CopyToNewReference; var OldHandle: TBitmapImage; Source, Dest: TBitmapData; begin if FImage.RefCount > 1 then begin TMonitor.Enter(Self); try OldHandle := FImage; OldHandle.IncreaseRefCount; try CreateNewReference; FImage.FWidth := OldHandle.Width; FImage.FHeight := OldHandle.Height; FImage.FPixelFormat := OldHandle.PixelFormat; FImage.FBitmapScale := OldHandle.BitmapScale; if CanvasClass.MapBitmap(Handle, TMapAccess.Write, Dest) then begin if CanvasClass.MapBitmap(OldHandle.Handle, TMapAccess.Read, Source) then begin Move(Source.Data^, Dest.Data^, Source.Pitch * FImage.Height); CanvasClass.UnmapBitmap(OldHandle.Handle, Source); end; CanvasClass.UnmapBitmap(Handle, Dest); end; finally OldHandle.DecreaseRefCount; end; finally TMonitor.Exit(Self); end; end; end; function TBitmap.GetCanvasClass: TCanvasClass; begin Result := Image.CanvasClass; end; procedure TBitmap.Clear(const AColor: TAlphaColor); begin ClearRect(TRectF.Create(0, 0, Width, Height), AColor); end; procedure TBitmap.ClearRect(const ARect: TRectF; const AColor: TAlphaColor); var R: TRectF; M: TBitmapData; C: Cardinal; begin TMonitor.Enter(Self); try R := ARect; if R.Left < 0 then R.Left := 0; if R.Top < 0 then R.Top := 0; if R.Right > Width then R.Right := Width; if R.Bottom > Height then R.Bottom := Height; if R.Bottom < R.Top then R.Bottom := R.Top; if R.Right < R.Left then R.Right := R.Left; if (R.Right < 0) or (R.Top < 0) or (R.Left > Width) or (R.Top > Height) then Exit; if not R.IsEmpty and Map(TMapAccess.Write, M) then try AlphaColorToPixel(PremultiplyAlpha(AColor), @C, PixelFormat); FillAlphaColorRect(PAlphaColorArray(M.Data), M.Pitch div 4, Height, Trunc(R.Left), Trunc(R.Top), Trunc(R.Right), Trunc(R.Bottom), C); finally Unmap(M); end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.CopyFromBitmap(const Source: TBitmap); begin TMonitor.Enter(Self); try TCanvas.CopyBitmap(Source, Self); BitmapChanged; finally TMonitor.Exit(Self); end; end; procedure TBitmap.CopyFromBitmap(const Source: TBitmap; SrcRect: TRect; DestX, DestY: Integer); var I, MoveBytes: Integer; SrcData, DestData: TBitmapData; begin if Map(TMapAccess.Write, DestData) then try if Source.Map(TMapAccess.Read, SrcData) then try if SrcRect.Left < 0 then begin Dec(DestX, SrcRect.Left); SrcRect.Left := 0; end; if SrcRect.Top < 0 then begin Dec(DestY, SrcRect.Top); SrcRect.Top := 0; end; SrcRect.Right := Min(SrcRect.Right, Source.Width); SrcRect.Bottom := Min(SrcRect.Bottom, Source.Height); if DestX < 0 then begin Dec(SrcRect.Left, DestX); DestX := 0; end; if DestY < 0 then begin Dec(SrcRect.Top, DestY); DestY := 0; end; if DestX + SrcRect.Width > Width then SrcRect.Width := Width - DestX; if DestY + SrcRect.Height > Height then SrcRect.Height := Height - DestY; if (SrcRect.Left < SrcRect.Right) and (SrcRect.Top < SrcRect.Bottom) then begin MoveBytes := SrcRect.Width * SrcData.BytesPerPixel; for I := 0 to SrcRect.Height - 1 do Move(SrcData.GetPixelAddr(SrcRect.Left, SrcRect.Top + I)^, DestData.GetPixelAddr(DestX, DestY + I)^, MoveBytes); end; finally Source.Unmap(SrcData); end; finally Unmap(DestData); end; end; procedure TBitmap.DoChange; begin if Assigned(FOnChange) then FOnChange(Self); end; function TBitmap.EqualsBitmap(const Bitmap: TBitmap): Boolean; var MyMap, BitmapMap: TBitmapData; I: Integer; begin if IsEmpty or Bitmap.IsEmpty then begin Result := IsEmpty and Bitmap.IsEmpty; Exit; end; Result := (Width = Bitmap.Width) and (Height = Bitmap.Height) and (PixelFormat = Bitmap.PixelFormat); if Result then begin if Map(TMapAccess.Read, MyMap) then try if Bitmap.Map(TMapAccess.Read, BitmapMap) then try for I := 0 to Height - 1 do if not CompareMem(MyMap.GetScanline(I), BitmapMap.GetScanline(I), MyMap.BytesPerLine) then begin Result := False; Exit; end; finally Bitmap.Unmap(BitmapMap); end; finally Unmap(MyMap); end; end; end; procedure TBitmap.BitmapChanged; begin DoChange; end; function TBitmap.IsEmpty: Boolean; begin Result := (Width = 0) or (Height = 0); end; procedure TBitmap.Assign(Source: TPersistent); begin TMonitor.Enter(Self); try if Source = nil then SetSize(0, 0) else if Source is TBitmap then begin DestroyResources; TBitmap(Source).FImage.IncreaseRefCount; FImage.DecreaseRefCount; FImage := TBitmap(Source).FImage; BitmapChanged; end else if Source is TBitmapSurface then AssignFromSurface(TBitmapSurface(Source)) else inherited; finally TMonitor.Exit(Self); end; end; procedure TBitmap.AssignFromSurface(const Source: TBitmapSurface); var BitmapData: TBitmapData; MaxSize: Integer; ResampledSurface: TBitmapSurface; I: Integer; SourceRect: TRectF; begin TMonitor.Enter(Self); try MaxSize := CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize); if (Source.Width > MaxSize) or (Source.Height > MaxSize) then begin SourceRect := TRectF.Create(0, 0, Source.Width, Source.Height); SourceRect.Fit(TRectF.Create(0, 0, MaxSize, MaxSize)); ResampledSurface := TBitmapSurface.Create; try ResampledSurface.StretchFrom(Source, Trunc(SourceRect.Width), Trunc(SourceRect.Height), PixelFormat); AssignFromSurface(ResampledSurface); finally ResampledSurface.Free; end; end else begin SetSize(Source.Width, Source.Height); if Map(TMapAccess.Write, BitmapData) then try for I := 0 to TBitmapSurface(Source).Height - 1 do Move(TBitmapSurface(Source).Scanline[I]^, BitmapData.GetScanline(I)^, BitmapData.BytesPerLine); finally Unmap(BitmapData); end; end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.AssignTo(Dest: TPersistent); var I: Integer; BitmapData: TBitmapData; begin if Dest is TBitmapSurface then begin TMonitor.Enter(Self); try TBitmapSurface(Dest).SetSize(Width, Height, PixelFormat); if Map(TMapAccess.Read, BitmapData) then try for I := 0 to Height - 1 do Move(BitmapData.GetScanline(I)^, TBitmapSurface(Dest).Scanline[I]^, BitmapData.BytesPerLine); finally Unmap(BitmapData); end; finally TMonitor.Exit(Self); end; end else inherited; end; procedure TBitmap.DefineProperties(Filer: TFiler); function DoWrite: Boolean; begin if Filer.Ancestor <> nil then Result := not (Filer.Ancestor is TBitmap) or not EqualsBitmap(TBitmap(Filer.Ancestor)) else Result := not IsEmpty; end; begin inherited; Filer.DefineBinaryProperty('PNG', ReadBitmap, WriteBitmap, DoWrite); Filer.DefineProperty('StyleLookup', ReadStyleLookup, nil, False); end; procedure TBitmap.ReadStyleLookup(Reader: TReader); begin Reader.ReadString; end; procedure TBitmap.ReadBitmap(Stream: TStream); begin LoadFromStream(Stream); end; procedure TBitmap.WriteBitmap(Stream: TStream); begin SaveToStream(Stream); end; procedure TBitmap.Rotate(const Angle: Single); var Temp: TBitmap; M, M2: TMatrix; Pts: array of TPointF; R: TRectF; begin if Angle = 0 then Exit; TMonitor.Enter(Self); try M := TMatrix.Identity; M.m31 := -Width / 2; M.m32 := -Height / 2; M := M * TMatrix.CreateRotation(DegToRad(Angle)); { calc new size } SetLength(Pts, 4); Pts[0] := TPointF.Zero * M; Pts[1] := TPointF.Create(Width, 0) * M; Pts[2] := TPointF.Create(Width, Height) * M; Pts[3] := TPointF.Create(0, Height) * M; R := NormalizeRectF(Pts); { translate } M2 := TMatrix.Identity; M2.m31 := R.Width / 2; M2.m32 := R.Height / 2; M := M * M2; Temp := TBitmap.Create(Trunc(R.Width), Trunc(R.Height)); try if Temp.Canvas.BeginScene then try Temp.Canvas.Clear(0); Temp.Canvas.SetMatrix(M); temp.Canvas.DrawBitmap(Self, TRectF.Create(0, 0, Width, Height), TRectF.Create(0, 0, Width, Height), 1); finally Temp.Canvas.EndScene; end; Assign(Temp); finally Temp.DisposeOf; end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.FlipHorizontal; var I, J: Integer; Tmp: TAlphaColor; M: TBitmapData; begin if Map(TMapAccess.ReadWrite, M) then try for J := 0 to Height - 1 do for I := 0 to (Width - 1) div 2 do begin Tmp := PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + Width - 1 - I]; PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + Width - 1 - I] := PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I]; PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I] := Tmp; end; finally Unmap(M); end; end; procedure TBitmap.FlipVertical; var I: Integer; Tmp: PAlphaColorArray; M: TBitmapData; begin GetMem(Tmp, Width * 4); if Map(TMapAccess.ReadWrite, M) then try for I := 0 to (Height - 1) div 2 do begin System.Move(PAlphaColorArray(M.Data)[(Height - 1 - I) * (M.Pitch div 4)], Tmp[0], M.Pitch); System.Move(PAlphaColorArray(M.Data)[I * (M.Pitch div 4)], PAlphaColorArray(M.Data)[(Height - 1 - I) * (M.Pitch div 4)], M.Pitch); System.Move(Tmp[0], PAlphaColorArray(M.Data)[I * (M.Pitch div 4)], M.Pitch); end; finally Unmap(M); end; FreeMem(Tmp, Width * 4); end; procedure TBitmap.InvertAlpha; var I, J: Integer; M: TBitmapData; C: PAlphaColorRec; begin if Map(TMapAccess.ReadWrite, M) then try for J := 0 to Height - 1 do for I := 0 to Width - 1 do begin C := @PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I]; C^.Color := UnpremultiplyAlpha(C^.Color); C^.A := $FF - C^.A; C^.Color := PremultiplyAlpha(C^.Color); end; finally Unmap(M); end; end; procedure TBitmap.ReplaceOpaqueColor(const Color: TAlphaColor); var I, J: Integer; M: TBitmapData; C: PAlphaColorRec; begin if Map(TMapAccess.ReadWrite, M) then try for J := 0 to Height - 1 do for I := 0 to Width - 1 do begin C := @PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I]; if C^.A > 0 then C^.Color := PremultiplyAlpha(MakeColor(Color, C^.A / $FF)); end; finally Unmap(M); end; end; procedure TBitmap.Resize(const AWidth, AHeight: Integer); var BufferTmp: TBitmap; begin if not IsEmpty then begin TMonitor.Enter(Self); try BufferTmp := CreateThumbnail(AWidth, AHeight); try Assign(BufferTmp); finally BufferTmp.Free; end; finally TMonitor.Exit(Self); end; end else SetSize(AWidth, AHeight); end; function TBitmap.CreateMask: PByteArray; var I, J: Integer; M: TBitmapData; C: PAlphaColorRec; begin GetMem(Result, Width * Height); if Map(TMapAccess.ReadWrite, M) then try for J := 0 to Height - 1 do for I := 0 to Width - 1 do begin C := @PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I]; Result[I + (J * Width)] := C^.A; end; finally Unmap(M); end; end; procedure TBitmap.ApplyMask(const Mask: PByteArray; const DstX: Integer = 0; const DstY: Integer = 0); var I, J: Integer; M: TBitmapData; C: PAlphaColorRec; begin if Map(TMapAccess.ReadWrite, M) then try for J := 0 to Height - 1 do for I := 0 to Width - 1 do begin if (I - DstX < 0) or (I - DstX > Width - 1) or (J - DstY < 0) or (J - DstY > Height - 1) then Continue; if Mask[I - DstX + ((J - DstY) * Width)] > 0 then begin C := @PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I]; C^.Color := PremultiplyAlpha(MakeColor(UnpremultiplyAlpha(C^.Color), ($FF - Mask[I - DstX + ((j - DstY) * Width)]) / $FF)); end; end; finally Unmap(M); end; end; function TBitmap.CreateThumbnail(const AWidth, AHeight: Integer): TBitmap; var FitRect: TRectF; begin TMonitor.Enter(Self); try Result := TBitmap.Create(AWidth, AHeight); if not IsEmpty and Result.Canvas.BeginScene then try FitRect := TRectF.Create(0, 0, Width, Height); FitRect := FitRect.FitInto(TRectF.Create(0, 0, AWidth, AHeight)); Result.Canvas.DrawBitmap(Self, TRectF.Create(0, 0, Width, Height), FitRect, 1); finally Result.Canvas.EndScene; end; finally TMonitor.Exit(Self); end; end; function TBitmap.Map(const Access: TMapAccess; var Data: TBitmapData): Boolean; begin TMonitor.Enter(Self); if Access in [TMapAccess.Write, TMapAccess.ReadWrite] then CopyToNewReference; if CanvasClass.MapBitmap(Handle, Access, Data) then begin Data.Create(Width, Height, PixelFormat); FMapped := True; FMapAccess := Access; Result := True; end else Result := False; end; procedure TBitmap.Unmap(var Data: TBitmapData); begin if FMapped then begin CanvasClass.UnmapBitmap(Handle, Data); FMapped := False; if FMapAccess in [TMapAccess.Write, TMapAccess.ReadWrite] then BitmapChanged; TMonitor.Exit(Self); end; end; procedure TBitmap.LoadFromFile(const AFileName: string); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try if TBitmapCodecManager.LoadFromFile(AFileName, Surf, CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) then Assign(Surf) else raise EBitmapLoadingFailed.CreateFMT(SBitmapLoadingFailedNamed, [AFileName]); finally Surf.Free; end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single; const UseEmbedded: Boolean = True); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try if TBitmapCodecManager.LoadThumbnailFromFile(AFileName, AFitWidth, AFitHeight, UseEmbedded, Surf) then Assign(Surf) else raise EThumbnailLoadingFailed.CreateFMT(SThumbnailLoadingFailedNamed, [AFileName]); finally Surf.Free; end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.LoadFromStream(Stream: TStream); var S: TStream; Surf: TBitmapSurface; begin TMonitor.Enter(Self); try if Stream.Position > 0 then begin // need to create temp stream S := TMemoryStream.Create; try S.CopyFrom(Stream, Stream.Size - Stream.Position); S.Position := 0; Surf := TBitmapSurface.Create; try if TBitmapCodecManager.LoadFromStream(S, Surf, CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) then Assign(Surf) else raise EBitmapLoadingFailed.Create(SBitmapLoadingFailed); finally Surf.Free; end; finally S.Free; end; end else if Stream.Size = 0 then Clear(0) else begin Surf := TBitmapSurface.Create; try if TBitmapCodecManager.LoadFromStream(Stream, Surf, CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) then Assign(Surf) else raise EBitmapLoadingFailed.Create(SBitmapLoadingFailed); finally Surf.Free; end; end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.SaveToFile(const AFileName: string; const SaveParams: PBitmapCodecSaveParams = nil); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try Surf.Assign(Self); if not TBitmapCodecManager.SaveToFile(AFileName, Surf, SaveParams) then raise EBitmapSavingFailed.CreateFMT(SBitmapSavingFailed, [AFileName]); finally Surf.Free; end; finally TMonitor.Exit(Self); end; end; procedure TBitmap.SaveToStream(Stream: TStream); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try Surf.Assign(Self); if not TBitmapCodecManager.SaveToStream(Stream, Surf, SPNGImageExtension) then raise EBitmapSavingFailed.Create(SBitmapSavingFailed); finally Surf.Free; end; finally TMonitor.Exit(Self); end; end; function TBitmap.GetCanvas: TCanvas; begin if FCanvas = nil then begin TMonitor.Enter(Self); try CopyToNewReference; FCanvas := CanvasClass.CreateFromBitmap(Self); finally TMonitor.Exit(Self); end; end; Result := FCanvas; end; { TPathPoint } class function TPathPoint.Create(const AKind: TPathPointKind; const APoint: TPointF): TPathPoint; begin Result.Kind := AKind; Result.Point := APoint; end; class operator TPathPoint.Equal(const APoint1, APoint2: TPathPoint): Boolean; begin Result := (APoint1.Kind = APoint2.Kind) and (APoint1.Point = APoint2.Point); end; class operator TPathPoint.NotEqual(const APoint1, APoint2: TPathPoint): Boolean; begin Result := not (APoint1 = APoint2); end; { TPath } constructor TPathData.Create; begin inherited Create; FPathData := TList<TPathPoint>.Create; FRecalcBounds := True; end; destructor TPathData.Destroy; var PathObject: IPathObject; begin if FStyleResource <> nil then begin if Supports(FStyleResource, IPathObject, PathObject) then PathObject.RemoveFreeNotify(Self); FStyleResource := nil; end; FPathData.Free; inherited; end; function TPathData.EqualsPath(const Path: TPathData): Boolean; var I: Integer; begin if IsEmpty or Path.IsEmpty then Exit(True); Result := Count = Path.Count; if Result then for I := 0 to Count - 1 do if Points[I] <> Path.Points[I] then Exit(False); end; procedure TPathData.Assign(Source: TPersistent); var I: Integer; begin if Source is TPathData then begin if TPathData(Source).ResourcePath <> nil then begin FStyleLookup := TPathData(Source).StyleLookup; DoChanged(False); end else begin FPathData.Count := TPathData(Source).Count; for I := 0 to TPathData(Source).Count - 1 do FPathData[I] := TPathData(Source)[I]; DoChanged; end; end else inherited end; function TPathData.GetStyleLookup: string; begin Result := FStyleLookup; end; procedure TPathData.SetStyleLookup(const Value: string); begin if Value <> FStyleLookup then begin FStyleLookup := Value; if Assigned(FOnChanged) then FOnChanged(Self); end; end; function TPathData.GetPath: TPathData; var O: TFmxObject; PO: IPathObject; begin Result := nil; if (FStyleResource <> nil) and Supports(FStyleResource, IPathObject, PO) then Result := PO.Path else if FStyleLookup <> '' then begin O := FindStyleResource(FStyleLookup); if Supports(O, IPathObject, PO) then begin if FStyleResource <> nil then PO.RemoveFreeNotify(Self); FStyleResource := O; if FStyleResource <> nil then PO.AddFreeNotify(Self); Result := PO.Path; end; end; end; function TPathData.GetCount: Integer; begin Result := FPathData.Count; end; function TPathData.GetPoint(AIndex: Integer): TPathPoint; begin Result := FPathData[AIndex]; end; procedure TPathData.DefineProperties(Filer: TFiler); function DoWrite: Boolean; begin if Filer.Ancestor <> nil then Result := not (Filer.Ancestor is TPathData) or not EqualsPath(TPathData(Filer.Ancestor)) else Result := Count > 0; end; begin inherited; Filer.DefineBinaryProperty('Path', ReadPath, WritePath, DoWrite); end; procedure TPathData.DoChanged(NeedRecalcBounds: Boolean); begin if NeedRecalcBounds then FRecalcBounds := True; if Assigned(FOnChanged) then FOnChanged(Self); end; procedure TPathData.ReadPath(Stream: TStream); var ReadCount: Cardinal; I: Integer; ByteKind: Byte; Point: TPointF; PathPoint: TPathPoint; begin Stream.Read(ReadCount, SizeOf(ReadCount)); FPathData.Count := ReadCount; if ReadCount > 0 then if (Stream.Size - 4) div ReadCount = 9 then for I := 0 to ReadCount - 1 do begin Stream.Read(ByteKind, SizeOf(Byte)); Stream.Read(Point, SizeOf(TPointF)); FPathData[I] := TPathPoint.Create(TPathPointKind(ByteKind), Point); end else for I := 0 to ReadCount - 1 do begin Stream.Read(PathPoint, SizeOf(PathPoint)); FPathData[I] := PathPoint; end; DoChanged; end; procedure TPathData.WritePath(Stream: TStream); var WriteCount: Cardinal; PathPoint: TPathPoint; I: Integer; begin WriteCount := Count; Stream.Write(WriteCount, SizeOf(WriteCount)); for I := 0 to WriteCount - 1 do begin PathPoint := FPathData[I]; Stream.Write(PathPoint, SizeOf(PathPoint)); end; end; function TPathData.LastPoint: TPointF; begin if Count > 0 then Result := FPathData[FPathData.Count - 1].Point else Result := TPointF.Zero; end; procedure TPathData.MoveTo(const P: TPointF); begin FPathData.Add(TPathPoint.Create(TPathPointKind.MoveTo, P)); FStartPoint := FPathData[FPathData.Count - 1].Point; DoChanged; end; procedure TPathData.MoveToRel(const P: TPointF); begin FPathData.Add(TPathPoint.Create(TPathPointKind.MoveTo, LastPoint + P)); FStartPoint := FPathData[FPathData.Count - 1].Point; DoChanged; end; procedure TPathData.LineTo(const P: TPointF); begin FPathData.Add(TPathPoint.Create(TPathPointKind.LineTo, P)); DoChanged; end; procedure TPathData.LineToRel(const P: TPointF); begin FPathData.Add(TPathPoint.Create(TPathPointKind.LineTo, LastPoint + P)); DoChanged; end; procedure TPathData.HLineTo(const X: Single); begin FPathData.Add(TPathPoint.Create(TPathPointKind.LineTo, TPointF.Create(X, LastPoint.Y))); DoChanged; end; procedure TPathData.HLineToRel(const X: Single); begin LineToRel(TPointF.Create(X, 0)); end; procedure TPathData.VLineTo(const Y: Single); begin FPathData.Add(TPathPoint.Create(TPathPointKind.LineTo, TPointF.Create(LastPoint.X, Y))); DoChanged; end; procedure TPathData.VLineToRel(const Y: Single); begin LineToRel(TPointF.Create(0, Y)); end; procedure TPathData.QuadCurveTo(const ControlPoint, EndPoint: TPointF); const OneThird = 1 / 3; TwoThirds = 2 / 3; var LP, CP1, CP2: TPointF; begin LP := LastPoint; CP1.X := OneThird * LP.X + TwoThirds * ControlPoint.X; CP1.Y := OneThird * LP.Y + TwoThirds * ControlPoint.Y; CP2.X := TwoThirds * ControlPoint.X + OneThird * EndPoint.X; CP2.Y := TwoThirds * ControlPoint.Y + OneThird * EndPoint.Y; CurveTo(CP1, CP2, EndPoint); end; procedure TPathData.CurveTo(const ControlPoint1, ControlPoint2, EndPoint: TPointF); begin FPathData.Add(TPathPoint.Create(TPathPointKind.CurveTo, ControlPoint1)); FPathData.Add(TPathPoint.Create(TPathPointKind.CurveTo, ControlPoint2)); FPathData.Add(TPathPoint.Create(TPathPointKind.CurveTo, EndPoint)); DoChanged; end; procedure TPathData.CurveToRel(const ControlPoint1, ControlPoint2, EndPoint: TPointF); var LP: TPointF; begin LP := LastPoint; CurveTo(LP + ControlPoint1, LP + ControlPoint2, LP + EndPoint); end; procedure TPathData.SmoothCurveTo(const ControlPoint2, EndPoint: TPointF); var ControlPoint1: TPointF; begin if Count > 2 then ControlPoint1 := LastPoint + (LastPoint - FPathData[FPathData.Count - 2].Point) else ControlPoint1 := ControlPoint2; CurveTo(ControlPoint1, ControlPoint2, EndPoint); end; procedure TPathData.SmoothCurveToRel(const ControlPoint2, EndPoint: TPointF); var ControlPoint1: TPointF; begin if Count > 2 then ControlPoint1 := LastPoint - FPathData[FPathData.Count - 2].Point else ControlPoint1 := ControlPoint2; CurveToRel(ControlPoint1, ControlPoint2, EndPoint); end; procedure TPathData.ClosePath; begin FPathData.Add(TPathPoint.Create(TPathPointKind.Close, FStartPoint)); DoChanged; end; procedure TPathData.AddPath(APath: TPathData); var I: Integer; begin FPathData.Capacity := FPathData.Count + APath.Count; for I := 0 to APath.Count - 1 do FPathData.Add(APath.Points[I]); DoChanged; end; procedure TPathData.Clear; begin FPathData.Clear; DoChanged; end; function TPathData.GetBounds: TRectF; const SmallAmount = 0.001; var I: Integer; begin if FPathData.Count < 1 then Exit(TRectF.Create(0, 0, 0, 0)); if FRecalcBounds then begin Result := TRectF.Create($FFFF, $FFFF, -$FFFF, -$FFFF); for I := 0 to FPathData.Count - 1 do begin if FPathData[I].Kind = TPathPointKind.Close then Continue; if FPathData[I].Point.X < Result.Left then Result.Left := FPathData[I].Point.X; if FPathData[I].Point.X > Result.Right then Result.Right := FPathData[I].Point.X; if FPathData[I].Point.Y < Result.Top then Result.Top := FPathData[I].Point.Y; if FPathData[I].Point.Y > Result.Bottom then Result.Bottom := FPathData[I].Point.Y; end; // add small amount if SameValue(Result.Width, 0, TEpsilon.Position) then Result.Right := Result.Left + SmallAmount; if SameValue(Result.Height, 0, TEpsilon.Position) then Result.Bottom := Result.Top + SmallAmount; FBounds := Result; FRecalcBounds := False; end else Result := FBounds; end; procedure TPathData.Scale(const ScaleX, ScaleY: Single); var I: Integer; ScalePoint: TPointF; begin if FPathData.Count > 0 then begin ScalePoint := TPointF.Create(ScaleX, ScaleY); for I := 0 to FPathData.Count - 1 do if FPathData[I].Kind in [TPathPointKind.MoveTo, TPathPointKind.LineTo, TPathPointKind.CurveTo] then FPathData[I] := TPathPoint.Create(FPathData[I].Kind, FPathData[I].Point * ScalePoint); DoChanged; end; end; procedure TPathData.Scale(const AScale: TPointF); begin Scale(AScale.X, AScale.Y); end; procedure TPathData.Translate(const DX, DY: Single); var I: Integer; TranslatePoint: TPointF; begin if FPathData.Count > 0 then begin TranslatePoint := TPointF.Create(DX, DY); for I := 0 to FPathData.Count - 1 do if FPathData[I].Kind in [TPathPointKind.MoveTo, TPathPointKind.LineTo, TPathPointKind.CurveTo] then FPathData[I] := TPathPoint.Create(FPathData[I].Kind, FPathData[I].Point + TranslatePoint); DoChanged; end; end; procedure TPathData.Translate(const Delta: TPointF); begin Translate(Delta.X, Delta.Y); end; procedure TPathData.FitToRect(const ARect: TRectF); var FitBounds, Bounds: TRectF; Ratio: Single; begin Bounds := GetBounds; FitBounds := Bounds.FitInto(ARect, Ratio); if not SameValue(Ratio, 0, TEpsilon.Scale) then begin Ratio := 1 / Ratio; Translate(-Bounds.Left, -Bounds.Top); Scale(Ratio, Ratio); Translate(FitBounds.Left, FitBounds.Top); end; end; procedure TPathData.ApplyMatrix(const M: TMatrix); var I: Integer; begin if FPathData.Count > 0 then begin for I := 0 to FPathData.Count - 1 do if FPathData[I].Kind in [TPathPointKind.MoveTo, TPathPointKind.LineTo, TPathPointKind.CurveTo] then FPathData[I] := TPathPoint.Create(FPathData[I].Kind, FPathData[I].Point * M); DoChanged; end; end; procedure TPathData.CalculateBezierCoefficients(const Bezier: TCubicBezier; out AX, BX, CX, AY, BY, CY: Single); begin CX := 3 * (Bezier[1].X - Bezier[0].X); CY := 3 * (Bezier[1].Y - Bezier[0].Y); BX := 3 * (Bezier[2].X - Bezier[1].X) - CX; BY := 3 * (Bezier[2].Y - Bezier[1].Y) - CY; AX := Bezier[3].X - Bezier[0].X - CX - BX; AY := Bezier[3].Y - Bezier[0].Y - CY - BY; end; function TPathData.PointOnBezier(const StartPoint: TPointF; const AX, BX, CX, AY, BY, CY, T: Single): TPointF; var SquareT, CubeT: Single; begin SquareT := T * T; CubeT := SquareT * T; Result.X := (AX * CubeT) + (BX * SquareT) + (CX * T) + StartPoint.X; Result.Y := (AY * CubeT) + (BY * SquareT) + (CY * T) + StartPoint.Y; end; function TPathData.CreateBezier(const Bezier: TCubicBezier; const PointCount: Integer): TPolygon; var AX, BX, CX, AY, BY, CY, DT, T: Single; I: Integer; begin if PointCount = 0 then Exit; DT := 1 / (1 * PointCount - 1); T := 0; SetLength(Result, PointCount); CalculateBezierCoefficients(Bezier, AX, BX, CX, AY, BY, CY); for I := 0 to PointCount - 1 do begin Result[I] := PointOnBezier(Bezier[0], AX, BX, CX, AY, BY, CY, T); T := T + DT; end; end; procedure TPathData.Flatten(const Flatness: Single); var J, I: Integer; BPts: TPolygon; B: TCubicBezier; F, Len: Single; SegCount: Integer; OldPathData: TList<TPathPoint>; CurPoint: TPointF; begin if FPathData.Count > 0 then begin F := Max(Flatness, MinFlatness); OldPathData := TList<TPathPoint>.Create; try OldPathData.Count := FPathData.Count; for J := 0 to FPathData.Count - 1 do OldPathData.Add(FPathData[J]); FPathData.Clear; J := 0; while J < OldPathData.Count do begin case OldPathData[J].Kind of TPathPointKind.MoveTo: begin MoveTo(OldPathData[J].Point); CurPoint := OldPathData[J].Point; end; TPathPointKind.LineTo: begin LineTo(OldPathData[J].Point); CurPoint := OldPathData[J].Point; end; TPathPointKind.CurveTo: begin B[0] := CurPoint; B[1] := OldPathData[J].Point; Inc(J); B[2] := OldPathData[J].Point; Inc(J); B[3] := OldPathData[J].Point; BPts := CreateBezier(B, 6); Len := 0; for I := 0 to High(BPts) - 1 do Len := Len + (BPts[I] - BPts[I + 1]).Length; SegCount := Round(Len / F); if SegCount < 2 then LineTo(B[3]) else begin BPts := CreateBezier(B, SegCount); for I := 0 to High(BPts) do LineTo(BPts[I]); CurPoint := OldPathData[J].Point; end; end; TPathPointKind.Close: ClosePath; end; Inc(J); end; DoChanged(False); finally OldPathData.Free; end; end; end; function TPathData.FlattenToPolygon(var Polygon: TPolygon; const Flatness: Single = 0.25): TPointF; procedure AddPoint(const P: TPointF); begin if (Length(Polygon) > 0) and (SameValue(P.X, Polygon[High(Polygon)].X, TEpsilon.Position) and SameValue(P.Y, Polygon[High(Polygon)].Y, TEpsilon.Position)) then Exit; SetLength(Polygon, Length(Polygon) + 1); Polygon[High(Polygon)] := P; end; var J, I: Integer; BPts: TPolygon; B: TCubicBezier; SP, CurPoint: TPointF; F, Len: Single; SegCount: Integer; CurBounds: TRectF; begin Result := TPointF.Zero; SetLength(Polygon, 0); if FPathData.Count > 0 then begin F := Max(Flatness, MinFlatness); J := 0; while J < FPathData.Count do begin case FPathData[J].Kind of TPathPointKind.MoveTo: begin if Length(Polygon) > 0 then AddPoint(PolygonPointBreak); AddPoint(FPathData[J].Point); CurPoint := FPathData[J].Point; SP := CurPoint; end; TPathPointKind.LineTo: begin AddPoint(FPathData[J].Point); CurPoint := FPathData[J].Point; end; TPathPointKind.CurveTo: begin B[0] := CurPoint; B[1] := FPathData[J].Point; Inc(J); B[2] := FPathData[J].Point; Inc(J); B[3] := FPathData[J].Point; BPts := CreateBezier(B, 6); Len := 0; for I := 0 to High(BPts) - 1 do Len := Len + (BPts[I] - BPts[I + 1]).Length; SegCount := Round(Len / F); if SegCount < 2 then begin AddPoint(B[0]); AddPoint(B[3]); end else begin BPts := CreateBezier(B, SegCount); for I := 0 to High(BPts) do AddPoint(BPts[I]); end; CurPoint := FPathData[J].Point; end; TPathPointKind.Close: begin AddPoint(SP); AddPoint(PolygonPointBreak); end; end; Inc(J); end; CurBounds := GetBounds; Result := TPointF.Create(Abs(CurBounds.Width), Abs(CurBounds.Height)); end; end; procedure TPathData.FreeNotification(AObject: TObject); begin if FStyleResource = AObject then FStyleResource := nil; end; procedure TPathData.AddEllipse(const ARect: TRectF); var CX, CY, PX, PY: Single; begin CX := (ARect.Left + ARect.Right) / 2; CY := (ARect.Top + ARect.Bottom) / 2; PX := CurveKappa * (ARect.Width / 2); PY := CurveKappa * (ARect.Height / 2); MoveTo(TPointF.Create(ARect.Left, CY)); CurveTo(TPointF.Create(ARect.Left, CY - PY), TPointF.Create(CX - PX, ARect.Top), TPointF.Create(CX, ARect.Top)); CurveTo(TPointF.Create(CX + PX, ARect.Top), TPointF.Create(ARect.Right, CY - PY), TPointF.Create(ARect.Right, CY)); CurveTo(TPointF.Create(ARect.Right, CY + PY), TPointF.Create(CX + PX, ARect.Bottom), TPointF.Create(CX, ARect.Bottom)); CurveTo(TPointF.Create(CX - PX, ARect.Bottom), TPointF.Create(ARect.Left, CY + PY), TPointF.Create(ARect.Left, CY)); end; procedure TPathData.AddRectangle(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const ACornerType: TCornerType = TCornerType.Round); var X1, X2, Y1, Y2: Single; begin if SameValue(XRadius, 0, TEpsilon.Vector) or SameValue(YRadius, 0, TEpsilon.Vector) then begin MoveTo(ARect.TopLeft); LineTo(TPointF.Create(ARect.Right, ARect.Top)); LineTo(ARect.BottomRight); LineTo(TPointF.Create(ARect.Left, ARect.Bottom)); end else begin X1 := XRadius; if ARect.Width - (X1 * 2) < 0 then X1 := XRadius * (ARect.Width / (X1 * 2)); X2 := X1 / 2; Y1 := YRadius; if ARect.Height - (Y1 * 2) < 0 then Y1 := YRadius * (ARect.Height / (Y1 * 2)); Y2 := Y1 / 2; MoveTo(TPointF.Create(ARect.Left, ARect.Top + Y1)); if TCorner.TopLeft in ACorners then begin case ACornerType of TCornerType.Bevel: LineTo(TPointF.Create(ARect.Left + X1, ARect.Top)); TCornerType.InnerRound: CurveTo(TPointF.Create(ARect.Left + X2, ARect.Top + Y1), TPointF.Create(ARect.Left + X1, ARect.Top + Y2), TPointF.Create(ARect.Left + X1, ARect.Top)); TCornerType.InnerLine: begin LineTo(TPointF.Create(ARect.Left + X2, ARect.Top + Y1)); LineTo(TPointF.Create(ARect.Left + X1, ARect.Top + Y2)); LineTo(TPointF.Create(ARect.Left + X1, ARect.Top)); end; else CurveTo(TPointF.Create(ARect.Left, ARect.Top + Y2), TPointF.Create(ARect.Left + X2, ARect.Top), TPointF.Create(ARect.Left + X1, ARect.Top)); end; end else begin LineTo(TPointF.Create(ARect.Left, ARect.Top)); LineTo(TPointF.Create(ARect.Left + X1, ARect.Top)); end; LineTo(TPointF.Create(ARect.Right - X1, ARect.Top)); if TCorner.TopRight in ACorners then begin case ACornerType of TCornerType.Bevel: LineTo(TPointF.Create(ARect.Right, ARect.Top + Y1)); TCornerType.InnerRound: CurveTo(TPointF.Create(ARect.Right - X1, ARect.Top + Y2), TPointF.Create(ARect.Right - X2, ARect.Top + Y1), TPointF.Create(ARect.Right, ARect.Top + Y1)); TCornerType.InnerLine: begin LineTo(TPointF.Create(ARect.Right - X1, ARect.Top + Y2)); LineTo(TPointF.Create(ARect.Right - X2, ARect.Top + Y1)); LineTo(TPointF.Create(ARect.Right, ARect.Top + Y1)); end; else CurveTo(TPointF.Create(ARect.Right - X2, ARect.Top), TPointF.Create(ARect.Right, ARect.Top + Y2), TPointF.Create(ARect.Right, ARect.Top + Y1)); end; end else begin LineTo(TPointF.Create(ARect.Right, ARect.Top)); LineTo(TPointF.Create(ARect.Right, ARect.Top + Y1)); end; LineTo(TPointF.Create(ARect.Right, ARect.Bottom - Y1)); if TCorner.BottomRight in ACorners then begin case ACornerType of TCornerType.Bevel: LineTo(TPointF.Create(ARect.Right - X1, ARect.Bottom)); TCornerType.InnerRound: CurveTo(TPointF.Create(ARect.Right - X2, ARect.Bottom - Y1), TPointF.Create(ARect.Right - X1, ARect.Bottom - Y2), TPointF.Create(ARect.Right - X1, ARect.Bottom)); TCornerType.InnerLine: begin LineTo(TPointF.Create(ARect.Right - X2, ARect.Bottom - Y1)); LineTo(TPointF.Create(ARect.Right - X1, ARect.Bottom - Y2)); LineTo(TPointF.Create(ARect.Right - X1, ARect.Bottom)); end; else CurveTo(TPointF.Create(ARect.Right, ARect.Bottom - Y2), TPointF.Create(ARect.Right - X2, ARect.Bottom), TPointF.Create(ARect.Right - X1, ARect.Bottom)); end; end else begin LineTo(TPointF.Create(ARect.Right, ARect.Bottom)); LineTo(TPointF.Create(ARect.Right - X1, ARect.Bottom)); end; LineTo(TPointF.Create(ARect.Left + X1, ARect.Bottom)); if TCorner.BottomLeft in ACorners then begin case ACornerType of TCornerType.Bevel: LineTo(TPointF.Create(ARect.Left, ARect.Bottom - Y1)); TCornerType.InnerRound: CurveTo(TPointF.Create(ARect.Left + X1, ARect.Bottom - Y2), TPointF.Create(ARect.Left + X2, ARect.Bottom - Y1), TPointF.Create(ARect.Left, ARect.Bottom - Y1)); TCornerType.InnerLine: begin LineTo(TPointF.Create(ARect.Left + X1, ARect.Bottom - Y2)); LineTo(TPointF.Create(ARect.Left + X2, ARect.Bottom - Y1)); LineTo(TPointF.Create(ARect.Left, ARect.Bottom - Y1)); end; else CurveTo(TPointF.Create(ARect.Left + X2, ARect.Bottom), TPointF.Create(ARect.Left, ARect.Bottom - (Y2)), TPointF.Create(ARect.Left, ARect.Bottom - Y1)); end; end else begin LineTo(TPointF.Create(ARect.Left, ARect.Bottom)); LineTo(TPointF.Create(ARect.Left, ARect.Bottom - Y1)); end; end; ClosePath; end; procedure DrawArcWithBezier(Path: TPathData; CenterX, CenterY, RadiusX, RadiusY, StartAngle, SweepRange: Single; UseMoveTo: Boolean); var Coord: array of TPointF; Pts: array of TPointF; A, B, C, X, Y: Single; SS, CC: Single; I: Integer; begin if SweepRange = 0 then begin if UseMoveTo then begin if Path.FPathData.Count < 1 then Path.MoveTo(TPointF.Create(CenterX + RadiusX * Cos(StartAngle), CenterY - RadiusY * Sin(StartAngle))) else Path.LineTo(TPointF.Create(CenterX + RadiusX * Cos(StartAngle), CenterY - RadiusY * Sin(StartAngle))); end; Path.LineTo(TPointF.Create(CenterX + RadiusX * Cos(StartAngle), CenterY - RadiusY * Sin(StartAngle))); Exit; end; SinCos(SweepRange / 2, B, C); A := 1 - C; X := A * 4 / 3; Y := B - X * C / B; SinCos(StartAngle + SweepRange / 2, SS, CC); SetLength(Coord, 4); Coord[0] := TPointF.Create(C, -B); Coord[1] := TPointF.Create(C + X, -Y); Coord[2] := TPointF.Create(C + X, Y); Coord[3] := TPointF.Create(C, B); SetLength(Pts, 4); for I := 0 to 3 do begin Pts[I] := TPointF.Create(CenterX + RadiusX * (Coord[I].X * CC - Coord[I].Y * SS), CenterY + RadiusY * (Coord[I].X * SS + Coord[I].Y * CC)); end; if UseMoveTo then begin if Path.FPathData.Count < 1 then Path.MoveTo(Pts[0]) else Path.LineTo(Pts[0]); end; Path.CurveTo(Pts[1], Pts[2], Pts[3]); end; procedure TPathData.AddArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single); const BezierArcAngleEpsilon = 0.01; MinSweepAngle = 1E-10; var UseMoveTo: Boolean; I: Integer; F: Single; TotalSweep, LocalSweep, PrevSweep: Single; Done: Boolean; begin StartAngle := DegToRad(StartAngle); SweepAngle := DegToRad(SweepAngle); I := Trunc(StartAngle / (2 * Pi)); F := StartAngle - (I * 2 * Pi); StartAngle := F; if SweepAngle >= 2 * Pi then SweepAngle := 2 * Pi; if SweepAngle <= -2 * Pi then SweepAngle := -2 * Pi; if Abs(SweepAngle) < MinSweepAngle then Exit; TotalSweep := 0; Done := False; UseMoveTo := True; repeat if SweepAngle < 0 then begin PrevSweep := TotalSweep; LocalSweep := -Pi / 2; TotalSweep := TotalSweep - (Pi / 2); if TotalSweep <= SweepAngle + BezierArcAngleEpsilon then begin LocalSweep := SweepAngle - PrevSweep; Done := True; end; end else begin PrevSweep := TotalSweep; LocalSweep := Pi / 2; TotalSweep := TotalSweep + (Pi / 2); if TotalSweep >= SweepAngle - BezierArcAngleEpsilon then begin LocalSweep := SweepAngle - PrevSweep; Done := True; end; end; DrawArcWithBezier(Self, Center.X, Center.Y, Radius.X, Radius.Y, StartAngle, LocalSweep, UseMoveTo); UseMoveTo := False; StartAngle := StartAngle + LocalSweep; until Done; end; procedure TPathData.AddArcSvgPart(const Center, Radius: TPointF; StartAngle, SweepAngle: Single); const BezierArcAngleEpsilon = 0.01; MinSweepAngle = 1E-10; var UseMoveTo: Boolean; I: Integer; F: Single; TotalSweep, LocalSweep, PrevSweep: Single; Done: Boolean; begin StartAngle := DegToRad(StartAngle); SweepAngle := DegToRad(SweepAngle); I := Trunc(StartAngle / (2 * Pi)); F := StartAngle - (I * 2 * Pi); StartAngle := F; if SweepAngle >= 2 * Pi then SweepAngle := 2 * Pi; if SweepAngle <= -2 * Pi then SweepAngle := -2 * Pi; if Abs(SweepAngle) < MinSweepAngle then Exit; TotalSweep := 0; Done := False; UseMoveTo := False; repeat if SweepAngle < 0 then begin PrevSweep := TotalSweep; LocalSweep := -Pi / 2; TotalSweep := TotalSweep - (Pi / 2); if TotalSweep <= SweepAngle + BezierArcAngleEpsilon then begin LocalSweep := SweepAngle - PrevSweep; Done := True; end; end else begin PrevSweep := TotalSweep; LocalSweep := Pi / 2; TotalSweep := TotalSweep + (Pi / 2); if TotalSweep >= SweepAngle - BezierArcAngleEpsilon then begin LocalSweep := SweepAngle - PrevSweep; Done := True; end; end; DrawArcWithBezier(Self, Center.X, Center.Y, Radius.X, Radius.Y, StartAngle, LocalSweep, UseMoveTo); UseMoveTo := False; StartAngle := StartAngle + LocalSweep; until Done; end; procedure TPathData.AddArcSvg(const P1, Radius: TPointF; Angle: Single; const LargeFlag, SweepFlag: Boolean; const P2: TPointF); var I: Integer; RadOk: Boolean; V, P, N, Sq, Rx, Ry, X0, Y0, X1, Y1, X2, Y2, CX, CY, Ux, Uy, Vx, Vy: Single; Dx2, Dy2, Prx, Pry, Px1, Py1, Cx1, Cy1, Sx2, Sy2, Sign, Coef: Single; RadCheck, StartAngle, SweepAngle, CosA, SinA: Single; M: TMatrix; Len: Integer; begin // Trivial case: Arc transformate to point if P1 = P2 then Exit; Rx := Radius.X; Ry := Radius.Y; X0 := P1.X; Y0 := P1.Y; X2 := P2.X; Y2 := P2.Y; Angle := DegToRad(Angle); RadOk := True; if Rx < 0 then Rx := -Rx; if Ry < 0 then Ry := -Rx; // Calculate the middle point between the current and the final points Dx2 := (X0 - X2) / 2; Dy2 := (Y0 - Y2) / 2; // Convert angle from degrees to radians SinCos(Angle, SinA, CosA); // Calculate (x1, y1) X1 := CosA * Dx2 + SinA * Dy2; Y1 := -SinA * Dx2 + CosA * Dy2; // Ensure radii are large enough Prx := Rx * Rx; Pry := Ry * Ry; Px1 := X1 * X1; Py1 := Y1 * Y1; // Check that radii are large enough RadCheck := Px1 / Prx + Py1 / Pry; if RadCheck > 1 then begin Rx := Sqrt(RadCheck) * Rx; Ry := Sqrt(RadCheck) * Ry; Prx := Rx * Rx; Pry := Ry * Ry; if RadCheck > 10 then RadOk := False; end; // Calculate (Cx1, Cy1) if LargeFlag = SweepFlag then Sign := -1 else Sign := 1; Sq := (Prx * Pry - Prx * Py1 - Pry * Px1) / (Prx * Py1 + Pry * Px1); if Sq < 0 then Coef := Sign * Sqrt(0) else Coef := Sign * Sqrt(Sq); Cx1 := Coef * ((Rx * Y1) / Ry); Cy1 := Coef * -((Ry * X1) / Rx); // Calculate (CX, CY) from (Cx1, Cy1) Sx2 := (X0 + X2) / 2; Sy2 := (Y0 + Y2) / 2; CX := Sx2 + (CosA * Cx1 - SinA * Cy1); CY := Sy2 + (SinA * Cx1 + CosA * Cy1); // Calculate the StartAngle (angle1) and the SweepAngle (dangle) Ux := (X1 - Cx1) / Rx; Uy := (Y1 - Cy1) / Ry; Vx := (-X1 - Cx1) / Rx; Vy := (-Y1 - Cy1) / Ry; // Calculate the angle start N := Sqrt(Ux * Ux + Uy * Uy); P := Ux; // (1 * Ux ) + (0 * Uy ) if Uy < 0 then Sign := -1 else Sign := 1; V := P / N; if V < -1 then V := -1; if V > 1 then V := 1; StartAngle := Sign * ArcCos(V); // Calculate the sweep angle N := Sqrt((Ux * Ux + Uy * Uy) * (Vx * Vx + Vy * Vy)); P := Ux * Vx + Uy * Vy; if Ux * Vy - Uy * Vx < 0 then Sign := -1 else Sign := 1; V := P / N; if V < -1 then V := -1; if V > 1 then V := 1; SweepAngle := Sign * ArcCos(V); if (not SweepFlag) and (SweepAngle > 0) then SweepAngle := SweepAngle - Pi * 2 else if SweepFlag and (SweepAngle < 0) then SweepAngle := SweepAngle + Pi * 2; Len := Count; AddArcSvgPart(TPointF.Zero, TPointF.Create(Rx, Ry), RadToDeg(StartAngle), RadToDeg(SweepAngle)); M := TMatrix.Identity; M.m31 := CX; M.m32 := CY; M := TMatrix.CreateRotation(Angle) * M; I := Len; while I < Count do begin FPathData[I] := TPathPoint.Create(FPathData[I].Kind, FPathData[I].Point * M); Inc(I); end; end; function TPathData.IsEmpty: Boolean; begin Result := (FPathData.Count < 1) or (GetBounds.Width * GetBounds.Height = 0); end; function TPathData.GetPathString: string; var I: Integer; Builder: TStringBuilder; begin Builder := TStringBuilder.Create; Result := Builder.ToString; try I := 0; while I < Count do begin case FPathData[I].Kind of TPathPointKind.MoveTo: Builder.Append('M') .Append(FloatToStr(FPathData[I].Point.X, USFormatSettings)) .Append(',') .Append(FloatToStr(FPathData[I].Point.Y, USFormatSettings)) .Append(' '); TPathPointKind.LineTo: Builder.Append('L') .Append(FloatToStr(FPathData[I].Point.X, USFormatSettings)) .Append(',') .Append(FloatToStr(FPathData[I].Point.Y, USFormatSettings)) .Append(' '); TPathPointKind.CurveTo: begin Builder.Append('C') .Append(FloatToStr(FPathData[I].Point.X, USFormatSettings)) .Append(',') .Append(FloatToStr(FPathData[I].Point.Y, USFormatSettings)) .Append(' '); Builder.Append(FloatToStr(FPathData[I + 1].Point.X, USFormatSettings)) .Append(',') .Append(FloatToStr(FPathData[I + 1].Point.Y, USFormatSettings)) .Append(' '); Builder.Append(FloatToStr(FPathData[I + 2].Point.X, USFormatSettings)) .Append(',') .Append(FloatToStr(FPathData[I + 2].Point.Y, USFormatSettings)) .Append(' '); Inc(I, 2); end; TPathPointKind.Close: Builder.Append('Z '); end; Inc(I); end; Result := Builder.ToString; finally Builder.Free; end; end; function TPathData.GetTokensFromString(const PathString: string; var Pos: Integer): string; var StringBuilder: TStringBuilder; begin if Pos < PathString.Length then begin StringBuilder := TStringBuilder.Create; try while (Pos < PathString.Length) and (PathString.Chars[Pos] = ' ') do Inc(Pos); while (Pos < PathString.Length) and ('zmlchvsqtaZMLCHVSQTA'.Contains(PathString.Chars[Pos])) do begin StringBuilder.Append(PathString.Chars[Pos]); Inc(Pos); end; Result := StringBuilder.ToString; finally StringBuilder.Free; end; end else Result := string.Empty; end; function TPathData.GetNumberFromString(const PathString: string; var Pos: Integer): string; var StringBuilder: TStringBuilder; begin if Pos < PathString.Length then begin StringBuilder := TStringBuilder.Create; try while (Pos < PathString.Length) and (PathString.Chars[Pos] = ' ') do Inc(Pos); while Pos < PathString.Length do begin if PathString.Chars[Pos] = 'e' then begin StringBuilder.Append(PathString.Chars[Pos]); Inc(Pos); Continue; end; if (PathString.Chars[Pos] = '-') and (StringBuilder.Length > 0) and (StringBuilder.Chars[StringBuilder.Length - 1] = 'e') then begin StringBuilder.Append(PathString.Chars[Pos]); Inc(Pos); Continue; end; if (StringBuilder.Length > 0) and (PathString.Chars[Pos] = '-') then Break; if not '0123456789.'.Contains(PathString.Chars[Pos]) and not (PathString.Chars[Pos] = '-') then Break; StringBuilder.Append(PathString.Chars[Pos]); Inc(Pos); end; while PathString.Chars[Pos] = ' ' do Inc(Pos); Result := StringBuilder.ToString; finally StringBuilder.Free; end; end else Result := string.Empty; end; function TPathData.GetPointFromString(const PathString: string; var Pos: Integer): TPointF; var X, Y: string; begin Result := TPointF.Zero; if Pos < PathString.Length then begin while (Pos < PathString.Length) and PathString.Chars[Pos].IsInArray([',', ' ']) do Inc(Pos); X := GetNumberFromString(PathString, Pos); while (Pos < PathString.Length) and PathString.Chars[Pos].IsInArray([',', ' ']) do Inc(Pos); Y := GetNumberFromString(PathString, Pos); while (Pos < PathString.Length) and PathString.Chars[Pos].IsInArray([',', ' ']) do Inc(Pos); Result := TPointF.Create(StrToFloat(X, USFormatSettings), StrToFloat(Y, USFormatSettings)); end; end; function TPathData.HasRelativeOffset(const PathString: string; const Pos: Integer): Boolean; begin Result := PathString.Chars[Pos].IsDigit or (PathString.Chars[Pos] = '-'); end; procedure TPathData.SetPathString(const Value: string); var Builder, TokenBuilder: TStringBuilder; PathString, Tokens: string; Radius, CurvePoint1, CurvePoint2, TempPoint: TPointF; Large, Sweet: Boolean; Pos, I, LastLength: Integer; Angle: Single; Token: Char; begin Builder := TStringBuilder.Create; TokenBuilder := TStringBuilder.Create; try for I := 0 to Value.Length - 1 do begin if Value.Chars[I].IsInArray([#9, #10, #13]) then Builder.Append(' ') else Builder.Append(Value.Chars[I]); end; PathString := Builder.ToString; FPathData.Clear; Pos := 0; LastLength := -1; while (Builder.Length > Pos) and (LastLength <> Pos) do begin LastLength := Pos; Tokens := GetTokensFromString(PathString, Pos); TokenBuilder.Clear; TokenBuilder.Append(Tokens); while TokenBuilder.Length > 0 do begin Token := TokenBuilder.Chars[0]; TokenBuilder.Remove(0, 1); case Token of 'z', 'Z': ClosePath; 'M': begin MoveTo(GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do LineTo(GetPointFromString(PathString, Pos)); end; 'm': begin MoveToRel(GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do LineToRel(GetPointFromString(PathString, Pos)); end; 'L': begin LineTo(GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do LineTo(GetPointFromString(PathString, Pos)); end; 'l': begin LineToRel(GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do LineToRel(GetPointFromString(PathString, Pos)); end; 'C': begin CurvePoint1 := GetPointFromString(PathString, Pos); CurvePoint2 := GetPointFromString(PathString, Pos); CurveTo(CurvePoint1, CurvePoint2, GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do begin CurvePoint1 := GetPointFromString(PathString, Pos); CurvePoint2 := GetPointFromString(PathString, Pos); CurveTo(CurvePoint1, CurvePoint2, GetPointFromString(PathString, Pos)); end; end; 'c': begin CurvePoint1 := GetPointFromString(PathString, Pos); CurvePoint2 := GetPointFromString(PathString, Pos); CurveToRel(CurvePoint1, CurvePoint2, GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do begin CurvePoint1 := GetPointFromString(PathString, Pos); CurvePoint2 := GetPointFromString(PathString, Pos); CurveToRel(CurvePoint1, CurvePoint2, GetPointFromString(PathString, Pos)); end; end; 'S': begin CurvePoint2 := GetPointFromString(PathString, Pos); SmoothCurveTo(CurvePoint2, GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do begin CurvePoint2 := GetPointFromString(PathString, Pos); SmoothCurveTo(CurvePoint2, GetPointFromString(PathString, Pos)); end; end; 's': begin CurvePoint2 := GetPointFromString(PathString, Pos); SmoothCurveToRel(CurvePoint2, GetPointFromString(PathString, Pos)); while HasRelativeOffset(PathString, Pos) do begin CurvePoint2 := GetPointFromString(PathString, Pos); SmoothCurveToRel(CurvePoint2, GetPointFromString(PathString, Pos)); end; end; 'H': HLineTo(StrToFloat(GetNumberFromString(PathString, Pos), USFormatSettings)); 'h': HLineToRel(StrToFloat(GetNumberFromString(PathString, Pos), USFormatSettings)); 'V': VLineTo(StrToFloat(GetNumberFromString(PathString, Pos), USFormatSettings)); 'v': VLineToRel(StrToFloat(GetNumberFromString(PathString, Pos), USFormatSettings)); 'Q', 'q': begin GetPointFromString(PathString, Pos); GetPointFromString(PathString, Pos); end; 'T', 't': GetPointFromString(PathString, Pos); 'A', 'a': begin if Count > 0 then CurvePoint1 := FPathData[FPathData.Count - 1].Point else CurvePoint1 := TPointF.Zero; Radius := GetPointFromString(PathString, Pos); Angle := StrToFloat(GetNumberFromString(PathString, Pos), USFormatSettings); TempPoint := GetPointFromString(PathString, Pos); Large := TempPoint.X = 1; Sweet := TempPoint.Y = 1; CurvePoint2 := GetPointFromString(PathString, Pos); if Token = 'a' then CurvePoint2 := CurvePoint1 + CurvePoint2; AddArcSvg(CurvePoint1, Radius, Angle, Large, Sweet, CurvePoint2); end; end; end; end; DoChanged; finally TokenBuilder.Free; Builder.Free; end; end; { TCanvasManager } class procedure TCanvasManager.UnInitialize; var CanvasSrv: IFMXCanvasService; begin FreeAndNil(FMeasureBitmap); FreeAndNil(FCanvasList); if (TPlatformServices.Current <> nil) and TPlatformServices.Current.SupportsPlatformService(IFMXCanvasService, CanvasSrv) then CanvasSrv.UnregisterCanvasClasses; end; class function TCanvasManager.CreateFromBitmap(const ABitmap: TBitmap; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault): TCanvas; begin Result := DefaultCanvas.CreateFromBitmap(ABitmap, AQuality); end; class function TCanvasManager.CreateFromPrinter(const APrinter: TAbstractPrinter): TCanvas; begin Result := DefaultPrinterCanvas.CreateFromPrinter(APrinter); end; class function TCanvasManager.CreateFromWindow(const AParent: TWindowHandle; const AWidth, AHeight: Integer; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault): TCanvas; begin Result := DefaultCanvas.CreateFromWindow(AParent, AWidth, AHeight, AQuality); end; class function TCanvasManager.GetDefaultCanvas: TCanvasClass; var CanvasSrv: IFMXCanvasService; CanvasClassRec: TCanvasClassRec; begin if FDefaultCanvasClass = nil then begin Result := nil; if (FCanvasList = nil) and TPlatformServices.Current.SupportsPlatformService(IFMXCanvasService, CanvasSrv) then CanvasSrv.RegisterCanvasClasses; if (FCanvasList <> nil) and (FCanvasList.Count > 0) then begin for CanvasClassRec in FCanvasList do begin if CanvasClassRec.Default and (not FEnableSoftwareCanvas and (TCanvasStyle.NeedGPUSurface in CanvasClassRec.CanvasClass.GetCanvasStyle)) then begin Result := CanvasClassRec.CanvasClass; Break; end; if CanvasClassRec.Default and (FEnableSoftwareCanvas and not (TCanvasStyle.NeedGPUSurface in CanvasClassRec.CanvasClass.GetCanvasStyle)) then begin Result := CanvasClassRec.CanvasClass; Break; end; end; if (Result = nil) and FEnableSoftwareCanvas then begin for CanvasClassRec in FCanvasList do begin if not (TCanvasStyle.NeedGPUSurface in CanvasClassRec.CanvasClass.GetCanvasStyle) then begin Result := CanvasClassRec.CanvasClass; Break; end; end; end; if Result = nil then Result := FCanvasList[0].CanvasClass; FDefaultCanvasClass := Result; end else raise ECanvasManagerException.Create('No TCanvas implementation found'); end else Result := FDefaultCanvasClass; end; class function TCanvasManager.GetDefaultPrinterCanvas: TCanvasClass; var CanvasSrv: IFMXCanvasService; CanvasClassRec: TCanvasClassRec; begin if FDefaultPrinterCanvasClass = nil then begin Result := nil; if FCanvasList = nil then if TPlatformServices.Current.SupportsPlatformService(IFMXCanvasService, CanvasSrv) then CanvasSrv.RegisterCanvasClasses; if (FCanvasList <> nil) and (FCanvasList.Count > 0) then begin for CanvasClassRec in FCanvasList do if CanvasClassRec.PrinterCanvas then begin Result := CanvasClassRec.CanvasClass; Break; end; FDefaultPrinterCanvasClass := Result; end else raise ECanvasManagerException.Create('No TCanvas for printer implementation found'); end else Result := FDefaultPrinterCanvasClass; end; class function TCanvasManager.GetMeasureCanvas: TCanvas; begin if FMeasureBitmap = nil then FMeasureBitmap := TBitmap.Create(1, 1); Result := FMeasureBitmap.Canvas end; class procedure TCanvasManager.RecreateFromPrinter(const Canvas: TCanvas; const APrinter: TAbstractPrinter); begin Canvas.UnInitialize; Canvas.CreateFromPrinter(APrinter); end; class procedure TCanvasManager.EnableSoftwareCanvas(const Enable: Boolean); begin FEnableSoftwareCanvas := Enable; FDefaultCanvasClass := nil; end; class procedure TCanvasManager.RegisterCanvas(const CanvasClass: TCanvasClass; const ADefault: Boolean; const APrinterCanvas: Boolean); var Rec: TCanvasClassRec; begin if FCanvasList = nil then FCanvasList := TList<TCanvasClassRec>.Create; Rec.CanvasClass := CanvasClass; Rec.Default := ADefault; Rec.PrinterCanvas := APrinterCanvas; FCanvasList.Add(Rec); end; { TCanvas.TMetaBrush } destructor TCanvas.TMetaBrush.Destroy; begin FGradient.Free; inherited; end; function TCanvas.TMetaBrush.GetGradient: TGradient; begin if FGradient = nil then begin FGradient := TGradient.Create; FValid := False; end; Result := FGradient; end; { TCanvas } constructor TCanvas.CreateFromWindow(const AParent: TWindowHandle; const AWidth, AHeight: Integer; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault); begin inherited Create; FQuality := AQuality; FParent := AParent; FWidth := AWidth; FHeight := AHeight; Initialize; end; class procedure TCanvas.CopyBitmap(const Source, Dest: TBitmap); var S, D: TBitmapData; begin if (Source.Width = Dest.Width) and (Source.Height = Dest.Height) then begin if not Source.IsEmpty then begin if (Source.CanvasClass = Dest.CanvasClass) then Source.CanvasClass.DoCopyBitmap(Source, Dest) else begin if Source.Map(TMapAccess.Read, S) and Dest.Map(TMapAccess.Write, D) then try D.Copy(S); finally Source.Unmap(S); Dest.Unmap(D); end; end; end; end else raise ECanvasException.Create(SBitmapSizeNotEqual); end; class constructor TCanvas.Create; begin FLock := TObject.Create; end; constructor TCanvas.CreateFromBitmap(const ABitmap: TBitmap; const AQuality: TCanvasQuality = TCanvasQuality.SystemDefault); begin inherited Create; FQuality := AQuality; FBitmap := ABitmap; FWidth := ABitmap.Width; FHeight := ABitmap.Height; Initialize; end; constructor TCanvas.CreateFromPrinter(const APrinter: TAbstractPrinter); begin inherited Create; Initialize; FPrinter := APrinter; end; procedure TCanvas.Initialize; begin FScale := GetCanvasScale; FStroke := TStrokeBrush.Create(TBrushKind.Solid, $FF000000); FFill := TBrush.Create(TBrushKind.Solid, $FFFFFFFF); FFont := TFont.Create; FFont.OnChanged := FontChanged; FCanvasSaveData := TCanvasSaveStateList.Create; FMatrixMeaning := TMatrixMeaning.Identity; FBlending := True; end; procedure TCanvas.UnInitialize; begin FCanvasSaveData.DisposeOf; FFont.DisposeOf; FStroke.DisposeOf; FFill.DisposeOf; end; destructor TCanvas.Destroy; begin if TThread.Current.ThreadID = MainThreadID then // << https://quality.embarcadero.com/browse/RSP-19673 TMessageManager.DefaultManager.SendMessage(Self, TCanvasDestroyMessage.Create); // TCanvasDestroyMessage seam to be used only in FMX.TextLayout UnInitialize; inherited; end; class destructor TCanvas.Destroy; begin FLock.Free; end; function TCanvas.DoBeginScene(const AClipRects: PClipRects = nil; AContextHandle: THandle = 0): Boolean; begin FClippingChangeCount := 0; FSavingStateCount := 0; Stroke.Thickness := 1; Stroke.Cap := TStrokeCap.Flat; Stroke.Join := TStrokeJoin.Miter; Stroke.Dash := TStrokeDash.Solid; Stroke.Kind := TBrushKind.Solid; Fill.Kind := TBrushKind.Solid; SetMatrix(TMatrix.Identity); Result := True; end; procedure TCanvas.DoBlendingChanged; begin end; class procedure TCanvas.DoCopyBitmap(const Source, Dest: TBitmap); var S, D: TBitmapData; begin if Source.Map(TMapAccess.Read, S) and Dest.Map(TMapAccess.Write, D) then try D.Copy(S); finally Source.Unmap(S); Dest.Unmap(D); end; end; procedure TCanvas.DoEndScene; begin if FBitmap <> nil then FBitmap.BitmapChanged; end; function TCanvas.AlignToPixel(const Value: TPointF): TPointF; begin case FMatrixMeaning of TMatrixMeaning.Identity: Result := TPointF.Create(Round(Value.X * FScale + TEpsilon.Vector) / FScale, Round(Value.Y * FScale + TEpsilon.Vector) / FScale); TMatrixMeaning.Translate: Result := TPointF.Create(Round((Matrix.m31 + Value.X) * FScale + TEpsilon.Vector) / FScale - Matrix.m31, Round((Matrix.m32 + Value.Y) * FScale + TEpsilon.Vector) / FScale - Matrix.m32); else Result := Value; end; end; function TCanvas.AlignToPixel(const Rect: TRectF): TRectF; begin Result.Left := AlignToPixelHorizontally(Rect.Left); Result.Top := AlignToPixelVertically(Rect.Top); Result.Right := Result.Left + Round(Rect.Width * Scale) / Scale; // keep ratio horizontally Result.Bottom := Result.Top + Round(Rect.Height * Scale) / Scale; // keep ratio vertically end; function TCanvas.AlignToPixelHorizontally(const Value: Single): Single; begin case FMatrixMeaning of TMatrixMeaning.Identity: Result := Round(Value * FScale + TEpsilon.Vector) / FScale; TMatrixMeaning.Translate: Result := Round((Matrix.m31 + Value) * FScale + TEpsilon.Vector) / FScale - Matrix.m31; else Result := Value; end; end; function TCanvas.AlignToPixelVertically(const Value: Single): Single; begin case FMatrixMeaning of TMatrixMeaning.Identity: Result := Round(Value * FScale + TEpsilon.Vector) / FScale; TMatrixMeaning.Translate: Result := Round((Matrix.m32 + Value) * FScale + TEpsilon.Vector) / FScale - Matrix.m32; else Result := Value; end; end; class procedure TCanvas.Lock; begin TMonitor.Enter(FLock); end; class procedure TCanvas.Unlock; begin TMonitor.Exit(FLock); end; function TCanvas.BeginScene(AClipRects: PClipRects = nil; AContextHandle: THandle = 0): Boolean; begin Lock; try if FBeginSceneCount = 0 then begin Result := (Width > 0) and (Height > 0) and DoBeginScene(AClipRects, AContextHandle); if not Result then begin Unlock; Exit; end; end else Result := FBeginSceneCount > 0; Inc(FBeginSceneCount); except Unlock; raise; end; end; procedure TCanvas.EndScene; begin try if FBeginSceneCount = 1 then DoEndScene; Dec(FBeginSceneCount); finally Unlock; end; end; procedure TCanvas.DoSetMatrix(const M: TMatrix); begin end; procedure TCanvas.SetMatrix(const M: TMatrix); begin FMatrixMeaning := TMatrixMeaning.Unknown; if not SameValue(FOffset.X, 0, TEpsilon.Matrix) or not SameValue(FOffset.Y, 0, TEpsilon.Matrix) then FMatrix := TMatrix.CreateTranslation(FOffset.X, FOffset.Y) * M else FMatrix := M; { Check for identity matrix values. It is assumed that the matrix is composed of three vectors of unit length, so by comparing some specific values with one, we discard any other possibility of other vectors. } if SameValue(FMatrix.m11, 1, TEpsilon.Matrix) and SameValue(FMatrix.m22, 1, TEpsilon.Matrix) and SameValue(FMatrix.m33, 1, TEpsilon.Matrix) then begin if SameValue(FMatrix.m31, 0, TEpsilon.Matrix) and SameValue(FMatrix.m32, 0, TEpsilon.Matrix) then begin // If no translation is present, we have an identity matrix. FMatrixMeaning := TMatrixMeaning.Identity; end else begin // Translation information is present in the matrix. FMatrixMeaning := TMatrixMeaning.Translate; FMatrixTranslate.X := FMatrix.m31; FMatrixTranslate.Y := FMatrix.m32; end; end; DoSetMatrix(FMatrix); end; procedure TCanvas.MultiplyMatrix(const M: TMatrix); var MulMatrix: TMatrix; begin MulMatrix := M * FMatrix; SetMatrix(MulMatrix); end; function TCanvas.CreateSaveState: TCanvasSaveState; begin Result := TCanvasSaveState.Create; end; procedure TCanvas.RestoreState(const State: TCanvasSaveState); begin if FCanvasSaveData.IndexOf(State) >= 0 then Assign(State); end; procedure TCanvas.FontChanged(Sender: TObject); begin end; class function TCanvas.InitializeBitmap(const Width, Height: Integer; const Scale: Single; var PixelFormat: TPixelFormat): THandle; begin if (Width > 0) and (Height > 0) then Result := DoInitializeBitmap(Width, Height, Scale, PixelFormat) else Result := 0; end; function TCanvas.IsScaleInteger: Boolean; begin Result := SameValue(Frac(Scale), 0, TEpsilon.Scale); end; class procedure TCanvas.FinalizeBitmap(var Bitmap: THandle); begin if Bitmap <> 0 then DoFinalizeBitmap(Bitmap); end; procedure TCanvas.Flush; begin DoFlush; end; class function TCanvas.MapBitmap(const Bitmap: THandle; const Access: TMapAccess; var Data: TBitmapData): Boolean; begin if Bitmap <> 0 then Result := DoMapBitmap(Bitmap, Access, Data) else Result := False; end; class procedure TCanvas.UnmapBitmap(const Bitmap: THandle; var Data: TBitmapData); begin if Bitmap <> 0 then DoUnmapBitmap(Bitmap, Data); end; function TCanvas.LoadFontFromStream(const AStream: TStream): Boolean; begin Result := False; end; procedure TCanvas.MeasureLines(const ALines: TLineMetricInfo; const ARect: TRectF; const AText: string; const WordWrap: Boolean; const Flags: TFillTextFlags; const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center); var WStartChar, WSaveChar, WCurChar, WCutOffChar: Integer; LCurChar: Integer; TmpS: string; WWidth: Single; LEditRectWidth: Single; Tok, LText: string; function _IsSurrogate(Surrogate: WideChar): Boolean; begin Result := (Integer(Surrogate) >= $D800) and (Integer(Surrogate) <= $DFFF); end; procedure _SkipSeparators(var Pos: Integer; const S: string); const // #$0020 SPACE // #$0021 ! EXCLAMATION MARK // #$002C , COMMA // #$002D - HYPHEN-MINUS // #$002E . FULL STOP // #$003A : COLON // #$003B ; SEMICOLON // #$003F ? QUESTION MARK BasicSeparatos: string = #$0020#$0021#$002C#$002D#$002E#$003A#$003B#$003F; MaxBasicSeparators: WideChar = #$003F; var ch: WideChar; begin while Pos < S.Length do begin ch := S.Chars[Pos]; if (ch > MaxBasicSeparators) or not BasicSeparatos.Contains(ch) then Break; if _IsSurrogate(ch) then Inc(Pos, 2) else Inc(Pos); end; end; function _WideGetToken(var Pos: Integer; const S: string): string; const //#$0020 SPACE //#$0021 ! EXCLAMATION MARK //#$002C , COMMA //#$002D - HYPHEN-MINUS //#$002E . FULL STOP //#$003A : COLON //#$003B ; SEMICOLON //#$003F ? QUESTION MARK BasicSeparatos: string = #$0020#$0021#$002C#$002D#$002E#$003A#$003B#$003F; MaxBasicSeparators: WideChar = #$003F; var ch: WideChar; begin Result := ''; { skip first separators } _SkipSeparators(Pos, S); { get } while Pos < S.Length do begin ch := S.Chars[Pos]; if (ch <= MaxBasicSeparators) and BasicSeparatos.Contains(ch) then Break; if _IsSurrogate(ch) then begin Result := Result + S.Substring(Pos, 2); Inc(Pos, 2) end else begin Result := Result + S.Chars[Pos]; Inc(Pos); end; end; { skip separators } _SkipSeparators(Pos, S); end; function RoundToPowerOf2(I: Integer): Integer; begin I := I or (I shr 1); I := I or (I shr 2); I := I or (I shr 4); I := I or (I shr 8); I := I or (I shr 16); Result := I + 1; end; function CutOffPoint(TmpS: string; Width: Single): integer; var W : Single; Delta: Integer; begin Delta := RoundToPowerOf2(Tmps.Length) div 2; Result := Delta; while Delta > 0 do begin W := TextWidth(TmpS.Substring(0, Result)); if W > Width then Result := Result - Delta; Delta := Delta div 2; Result := Result + Delta; end; end; begin ALines.Count := 0; if AText = '' then Exit; ALines.Count := 1; LEditRectWidth := ARect.Width; // first check linecreaks LText := AText; TmpS := ''; LCurChar := 0; ALines.Count := 1; ALines.Metrics[0].Index := 1; while LCurChar < LText.Length do begin if (LText.Chars[LCurChar] = #13) or (LText.Chars[LCurChar] = #10) then begin if (LText.Chars[LCurChar] = #13) and (LCurChar + 1 < LText.Length) then if LText.Chars[LCurChar + 1] = #10 then Inc(LCurChar); if WordWrap and (TextWidth(TmpS) > LEditRectWidth) then begin WCurChar := 0; WStartChar := 0; WSaveChar := 0; Tok := _WideGetToken(WCurChar, TmpS); while Tok <> '' do begin WWidth := TextWidth(TmpS.Substring(WStartChar, WCurChar - WStartChar)); if WWidth > LEditRectWidth then begin if WSaveChar = WStartChar then begin WCutOffChar := CutOffPoint(TmpS.Substring(WStartChar, WCurChar - WStartChar), LEditRectWidth); ALines.Metrics[ALines.Count - 1].Len := WCutoffChar; WCurChar := WStartChar + WCutOffChar; WStartChar := WStartChar + WCutOffChar; end else begin ALines.Metrics[ALines.Count - 1].Len := WSaveChar - WStartChar; WStartChar := WSaveChar; end; ALines.Count := ALines.Count + 1; ALines.Metrics[ALines.Count - 1].Index := ALines.Metrics[ALines.Count - 2].Index + ALines.Metrics[ALines.Count - 2].Len; end; WSaveChar := WCurChar; Tok := _WideGetToken(WCurChar, TmpS); if WSaveChar = WCurChar then Break; { !!! - error } end; ALines.Metrics[ALines.Count - 1].Len := WCurChar - WStartChar; end else ALines.Metrics[ALines.Count - 1].Len := Length(Tmps); ALines.Count := ALines.Count + 1; ALines.Metrics[ALines.Count - 1].Index := LCurChar + 2; TmpS := ''; end else TmpS := TmpS + LText.Chars[LCurChar]; Inc(LCurChar); end; // last line if WordWrap and (TextWidth(TmpS) > LEditRectWidth) then begin WCurChar := 0; WStartChar := 0; WSaveChar := 0; Tok := _WideGetToken(WCurChar, TmpS); while Tok <> '' do begin Tok := TmpS.Substring(WStartChar, WCurChar - WStartChar); WWidth := TextWidth(TmpS.Substring(WStartChar, WCurChar - WStartChar)); if WWidth > LEditRectWidth then begin if WSaveChar = WStartChar then begin WCutOffChar := CutOffPoint(TmpS.Substring(WStartChar, WCurChar - WStartChar), LEditRectWidth); ALines.Metrics[ALines.Count - 1].Len := WCutoffChar; WCurChar := WStartChar + WCutOffChar; WStartChar := WStartChar + WCutOffChar; end else begin ALines.Metrics[ALines.Count - 1].Len := WSaveChar - WStartChar; WStartChar := WSaveChar; end; ALines.Count := ALines.Count + 1; ALines.Metrics[ALines.Count - 1].Index := ALines.Metrics[ALines.Count - 2].Index + ALines.Metrics[ALines.Count - 2].Len; end; WSaveChar := WCurChar; Tok := _WideGetToken(WCurChar, TmpS); if WSaveChar = WCurChar then Break; { !!! - error } end; ALines.Metrics[ALines.Count - 1].Len := WCurChar - WStartChar; end else ALines.Metrics[ALines.Count - 1].Len := Length(Tmps); end; procedure TCanvas.MeasureText(var ARect: TRectF; const AText: string; const WordWrap: Boolean; const Flags: TFillTextFlags; const ATextAlign, AVTextAlign: TTextAlign); var Layout: TTextLayout; begin if AText.IsEmpty then begin ARect.Right := ARect.Left; ARect.Bottom := ARect.Top; Exit; end; Layout := TTextLayoutManager.TextLayoutByCanvas(Self.ClassType).Create(Self); try Layout.BeginUpdate; Layout.TopLeft := ARect.TopLeft; Layout.MaxSize := PointF(ARect.Width, ARect.Height); Layout.Text := AText; Layout.WordWrap := WordWrap; Layout.HorizontalAlign := ATextAlign; Layout.VerticalAlign := AVTextAlign; Layout.Font := Self.Font; Layout.Color := Self.Fill.Color; Layout.RightToLeft := TFillTextFlag.RightToLeft in Flags; Layout.EndUpdate; ARect := Layout.TextRect; finally FreeAndNil(Layout); end; end; function TCanvas.TextHeight(const AText: string): Single; var R: TRectF; begin R := RectF(0, 0, 10000, 10000); MeasureText(R, AText, False, [], TTextAlign.Leading, TTextAlign.Leading); Result := R.Bottom; end; function TCanvas.TextToPath(Path: TPathData; const ARect: TRectF; const AText: string; const WordWrap: Boolean; const ATextAlign, AVTextAlign: TTextAlign): Boolean; var Layout: TTextLayout; begin if AText.IsEmpty then Exit(False); Layout := TTextLayoutManager.TextLayoutByCanvas(Self.ClassType).Create; try Layout.BeginUpdate; Layout.TopLeft := ARect.TopLeft; Layout.MaxSize := PointF(ARect.Width, ARect.Height); Layout.Text := AText; Layout.WordWrap := WordWrap; Layout.HorizontalAlign := ATextAlign; Layout.VerticalAlign := AVTextAlign; Layout.Font := Self.Font; Layout.Color := Self.Fill.Color; Layout.EndUpdate; Layout.ConvertToPath(Path); Result := True; finally FreeAndNil(Layout); end; end; function TCanvas.TextWidth(const AText: string): Single; var R: TRectF; begin R := RectF(0, 0, 10000, 20); MeasureText(R, AText, False, [], TTextAlign.Leading, TTextAlign.Center); Result := R.Right; end; function TCanvas.TransformPoint(const P: TPointF): TPointF; begin case FMatrixMeaning of TMatrixMeaning.Unknown: Result := P * FMatrix; TMatrixMeaning.Identity: Result := P; TMatrixMeaning.Translate: begin Result.X := P.X + FMatrixTranslate.X; Result.Y := P.Y + FMatrixTranslate.Y; end; end; end; function TCanvas.TransformRect(const Rect: TRectF): TRectF; var V: TPointF; begin case FMatrixMeaning of TMatrixMeaning.Unknown: begin Result.TopLeft := Rect.TopLeft * FMatrix; V := TPointF.Create(Rect.Right, Rect.Top) * FMatrix; Result.Right := V.X; Result.Bottom := V.Y; V := Rect.BottomRight * FMatrix; Result.Right := V.X; Result.Bottom := V.Y; V := TPointF.Create(Rect.Left, Rect.Bottom) * FMatrix; Result.Left := V.X; Result.Bottom := V.Y; end; TMatrixMeaning.Identity: Result := Rect; TMatrixMeaning.Translate: begin Result := Rect; Result.Offset(FMatrixTranslate); end; end; end; procedure TCanvas.FillArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single); begin FillArc(Center, Radius, StartAngle, SweepAngle, AOpacity, FFill); end; procedure TCanvas.FillArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single; const ABrush: TBrush); var P: TPathData; begin P := TPathData.Create; try P.AddArc(Center, Radius, StartAngle, SweepAngle); FillPath(P, AOpacity, ABrush); finally P.Free; end; end; procedure TCanvas.DrawArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single); begin DrawArc(Center, Radius, StartAngle, SweepAngle, AOpacity, FStroke); end; procedure TCanvas.DrawArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single; const ABrush: TStrokeBrush); var P: TPathData; begin P := TPathData.Create; try P.AddArc(Center, Radius, StartAngle, SweepAngle); DrawPath(P, AOpacity, ABrush); finally P.Free; end; end; procedure TCanvas.DrawBitmap(const ABitmap: TBitmap; const SrcRect, DstRect: TRectF; const AOpacity: Single; const HighSpeed: Boolean); begin DoDrawBitmap(ABitmap, SrcRect, DstRect, AOpacity, HighSpeed); end; procedure TCanvas.DrawEllipse(const ARect: TRectF; const AOpacity: Single); begin DrawEllipse(ARect, AOpacity, FStroke); end; procedure TCanvas.DrawEllipse(const ARect: TRectF; const AOpacity: Single; const ABrush: TStrokeBrush); begin if ABrush.Kind <> TBrushKind.None then DoDrawEllipse(ARect, AOpacity, ABrush); end; procedure TCanvas.DrawLine(const APt1, APt2: TPointF; const AOpacity: Single); begin DrawLine(APt1, APt2, AOpacity, FStroke); end; procedure TCanvas.DrawLine(const APt1, APt2: TPointF; const AOpacity: Single; const ABrush: TStrokeBrush); begin if ABrush.Kind <> TBrushKind.None then DoDrawLine(APt1, APt2, AOpacity, ABrush); end; function TCanvas.SaveState: TCanvasSaveState; var SaveData : TCanvasSaveState; begin FSavingStateCount := FSavingStateCount + 1; for SaveData in FCanvasSaveData do begin if not SaveData.Assigned then begin SaveData.Assign(Self); Result := SaveData; Exit; end; end; Result := CreateSaveState; try Result.Assign(Self); FCanvasSaveData.Add(Result); except Result.Free; raise; end; end; procedure TCanvas.SetBlending(const Value: Boolean); begin if FBlending <> Value then begin FBlending := Value; DoBlendingChanged; end; end; procedure TCanvas.SetFill(const Value: TBrush); begin FFill.Assign(Value); end; procedure TCanvas.FillPath(const APath: TPathData; const AOpacity: Single); begin FillPath(APath, AOpacity, FFill); end; procedure TCanvas.FillPath(const APath: TPathData; const AOpacity: Single; const ABrush: TBrush); begin if (ABrush.Kind <> TBrushKind.None) and not APath.IsEmpty then DoFillPath(APath, AOpacity, ABrush); end; function TCanvas.DoFillPolygon(const Points: TPolygon; const AOpacity: Single; const ABrush: TBrush): Boolean; begin Result := False; end; procedure TCanvas.FillPolygon(const Points: TPolygon; const AOpacity: Single); var I: Integer; Path: TPathData; PathBreakFound: Boolean; begin if not DoFillPolygon(Points, AOpacity, FFill) then begin Path := TPathData.Create; try PathBreakFound := False; for I := 0 to High(Points) do begin if I = 0 then Path.MoveTo(Points[I]) else if (Points[I].X = PolygonPointBreak.X) and (Points[I].Y = PolygonPointBreak.Y) then begin Path.ClosePath; PathBreakFound := True; end else Path.LineTo(Points[I]); end; if not PathBreakFound then Path.ClosePath; FillPath(Path, AOpacity); finally Path.Free; end; end; end; procedure TCanvas.DoFillRoundRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TBrush; const ACornerType: TCornerType = TCornerType.Round); var Path: TPathData; x1, x2, y1, y2: Single; R: TRectF; begin R := ARect; x1 := XRadius; if RectWidth(R) - (x1 * 2) < 0 then x1 := RectWidth(R) / 2; x2 := XRadius * CurveKappaInv; y1 := YRadius; if RectHeight(R) - (y1 * 2) < 0 then y1 := RectHeight(R) / 2; y2 := YRadius * CurveKappaInv; Path := TPathData.Create; Path.MoveTo(PointF(R.Left, R.Top + y1)); if TCorner.TopLeft in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Left + x1, R.Top)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Left + x2, R.Top + y1), PointF(R.Left + x1, R.Top + y2), PointF(R.Left + x1, R.Top)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Left + x2, R.Top + y1)); Path.LineTo(PointF(R.Left + x1, R.Top + y2)); Path.LineTo(PointF(R.Left + x1, R.Top)); end; else Path.CurveTo(PointF(R.Left, R.Top + (y2)), PointF(R.Left + x2, R.Top), PointF(R.Left + x1, R.Top)) end; end else begin Path.LineTo(PointF(R.Left, R.Top)); Path.LineTo(PointF(R.Left + x1, R.Top)); end; Path.LineTo(PointF(R.Right - x1, R.Top)); if TCorner.TopRight in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Right, R.Top + y1)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Right - x1, R.Top + y2), PointF(R.Right - x2, R.Top + y1), PointF(R.Right, R.Top + y1)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Right - x1, R.Top + y2)); Path.LineTo(PointF(R.Right - x2, R.Top + y1)); Path.LineTo(PointF(R.Right, R.Top + y1)); end; else Path.CurveTo(PointF(R.Right - x2, R.Top), PointF(R.Right, R.Top + (y2)), PointF(R.Right, R.Top + y1)) end; end else begin Path.LineTo(PointF(R.Right, R.Top)); Path.LineTo(PointF(R.Right, R.Top + y1)); end; Path.LineTo(PointF(R.Right, R.Bottom - y1)); if TCorner.BottomRight in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Right - x1, R.Bottom)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Right - x2, R.Bottom - y1), PointF(R.Right - x1, R.Bottom - y2), PointF(R.Right - x1, R.Bottom)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Right - x2, R.Bottom - y1)); Path.LineTo(PointF(R.Right - x1, R.Bottom - y2)); Path.LineTo(PointF(R.Right - x1, R.Bottom)); end; else Path.CurveTo(PointF(R.Right, R.Bottom - (y2)), PointF(R.Right - x2, R.Bottom), PointF(R.Right - x1, R.Bottom)) end; end else begin Path.LineTo(PointF(R.Right, R.Bottom)); Path.LineTo(PointF(R.Right - x1, R.Bottom)); end; Path.LineTo(PointF(R.Left + x1, R.Bottom)); if TCorner.BottomLeft in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Left, R.Bottom - y1)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Left + x1, R.Bottom - y2), PointF(R.Left + x2, R.Bottom - y1), PointF(R.Left, R.Bottom - y1)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Left + x1, R.Bottom - y2)); Path.LineTo(PointF(R.Left + x2, R.Bottom - y1)); Path.LineTo(PointF(R.Left, R.Bottom - y1)); end; else Path.CurveTo(PointF(R.Left + x2, R.Bottom), PointF(R.Left, R.Bottom - (y2)), PointF(R.Left, R.Bottom - y1)) end; end else begin Path.LineTo(PointF(R.Left, R.Bottom)); Path.LineTo(PointF(R.Left, R.Bottom - y1)); end; Path.ClosePath; DoFillPath(Path, AOpacity, ABrush); Path.Free; end; procedure TCanvas.DoFlush; begin end; procedure TCanvas.FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ACornerType: TCornerType); begin FillRect(ARect, XRadius, YRadius, ACorners, AOpacity, FFill, ACornerType); end; procedure TCanvas.FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TBrush; const ACornerType: TCornerType); begin if ABrush.Kind <> TBrushKind.None then begin if ((XRadius = 0) and (YRadius = 0)) or (ACorners = []) then DoFillRect(ARect, AOpacity, ABrush) else DoFillRoundRect(ARect, XRadius, YRadius, ACorners, AOpacity, ABrush, ACornerType) end; end; procedure TCanvas.FillEllipse(const ARect: TRectF; const AOpacity: Single); begin FillEllipse(ARect, AOpacity, FFill); end; procedure TCanvas.FillEllipse(const ARect: TRectF; const AOpacity: Single; const ABrush: TBrush); begin if ABrush.Kind <> TBrushKind.None then DoFillEllipse(ARect, AOpacity, ABrush); end; procedure TCanvas.FillText(const ARect: TRectF; const AText: string; const WordWrap: Boolean; const AOpacity: Single; const Flags: TFillTextFlags; const ATextAlign, AVTextAlign: TTextAlign); var Layout: TTextLayout; begin Layout := TTextLayoutManager.TextLayoutByCanvas(Self.ClassType).Create(Self); try Layout.BeginUpdate; Layout.TopLeft := ARect.TopLeft; Layout.MaxSize := PointF(ARect.Width, ARect.Height); Layout.Text := AText; Layout.WordWrap := WordWrap; Layout.Opacity := AOpacity; Layout.HorizontalAlign := ATextAlign; Layout.VerticalAlign := AVTextAlign; Layout.Font := Self.Font; Layout.Color := Self.Fill.Color; Layout.RightToLeft := TFillTextFlag.RightToLeft in Flags; Layout.EndUpdate; Layout.RenderLayout(Self); finally FreeAndNil(Layout); end; end; procedure TCanvas.DrawPath(const APath: TPathData; const AOpacity: Single); begin DrawPath(APath, AOpacity, FStroke); end; procedure TCanvas.DrawPath(const APath: TPathData; const AOpacity: Single; const ABrush: TStrokeBrush); begin if (ABrush.Kind <> TBrushKind.None) and not APath.IsEmpty then DoDrawPath(APath, AOpacity, ABrush); end; function TCanvas.DoDrawPolygon(const Points: TPolygon; const AOpacity: Single; const ABrush: TStrokeBrush): Boolean; begin Result := False; end; procedure TCanvas.DrawPolygon(const Points: TPolygon; const AOpacity: Single); var I: Integer; Path: TPathData; PathBreakFound: Boolean; begin if not DoDrawPolygon(Points, AOpacity, FStroke) then begin Path := TPathData.Create; try PathBreakFound := False; for I := 0 to High(Points) do begin if I = 0 then Path.MoveTo(Points[I]) else if (Points[I].X = PolygonPointBreak.X) and (Points[I].Y = PolygonPointBreak.Y) then begin Path.ClosePath; PathBreakFound := True; end else Path.LineTo(Points[I]); end; if not PathBreakFound then Path.ClosePath; DrawPath(Path, AOpacity); finally Path.Free; end; end; end; procedure TCanvas.DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ACornerType: TCornerType); begin DrawRect(ARect, XRadius, YRadius, ACorners, AOpacity, FStroke, ACornerType); end; procedure TCanvas.DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TStrokeBrush; const ACornerType: TCornerType); var Path: TPathData; x1, x2, y1, y2: Single; R: TRectF; begin if ABrush.Kind <> TBrushKind.None then begin R := ARect; if ((XRadius = 0) and (YRadius = 0)) or (ACorners = []) then DoDrawRect(ARect, AOpacity, ABrush) else begin R := ARect; x1 := XRadius; if RectWidth(R) - (x1 * 2) < 0 then x1 := RectWidth(R) / 2; x2 := XRadius * CurveKappaInv; y1 := YRadius; if RectHeight(R) - (y1 * 2) < 0 then y1 := RectHeight(R) / 2; y2 := YRadius * CurveKappaInv; Path := TPathData.Create; Path.MoveTo(PointF(R.Left, R.Top + y1)); if TCorner.TopLeft in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Left + x1, R.Top)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Left + x2, R.Top + y1), PointF(R.Left + x1, R.Top + y2), PointF(R.Left + x1, R.Top)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Left + x2, R.Top + y1)); Path.LineTo(PointF(R.Left + x1, R.Top + y2)); Path.LineTo(PointF(R.Left + x1, R.Top)); end; else Path.CurveTo(PointF(R.Left, R.Top + (y2)), PointF(R.Left + x2, R.Top), PointF(R.Left + x1, R.Top)) end; end else begin Path.LineTo(PointF(R.Left, R.Top)); Path.LineTo(PointF(R.Left + x1, R.Top)); end; Path.LineTo(PointF(R.Right - x1, R.Top)); if TCorner.TopRight in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Right, R.Top + y1)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Right - x1, R.Top + y2), PointF(R.Right - x2, R.Top + y1), PointF(R.Right, R.Top + y1)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Right - x1, R.Top + y2)); Path.LineTo(PointF(R.Right - x2, R.Top + y1)); Path.LineTo(PointF(R.Right, R.Top + y1)); end; else Path.CurveTo(PointF(R.Right - x2, R.Top), PointF(R.Right, R.Top + (y2)), PointF(R.Right, R.Top + y1)) end; end else begin Path.LineTo(PointF(R.Right, R.Top)); Path.LineTo(PointF(R.Right, R.Top + y1)); end; Path.LineTo(PointF(R.Right, R.Bottom - y1)); if TCorner.BottomRight in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Right - x1, R.Bottom)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Right - x2, R.Bottom - y1), PointF(R.Right - x1, R.Bottom - y2), PointF(R.Right - x1, R.Bottom)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Right - x2, R.Bottom - y1)); Path.LineTo(PointF(R.Right - x1, R.Bottom - y2)); Path.LineTo(PointF(R.Right - x1, R.Bottom)); end; else Path.CurveTo(PointF(R.Right, R.Bottom - (y2)), PointF(R.Right - x2, R.Bottom), PointF(R.Right - x1, R.Bottom)) end; end else begin Path.LineTo(PointF(R.Right, R.Bottom)); Path.LineTo(PointF(R.Right - x1, R.Bottom)); end; Path.LineTo(PointF(R.Left + x1, R.Bottom)); if TCorner.BottomLeft in ACorners then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(PointF(R.Left, R.Bottom - y1)); TCornerType.InnerRound: Path.CurveTo(PointF(R.Left + x1, R.Bottom - y2), PointF(R.Left + x2, R.Bottom - y1), PointF(R.Left, R.Bottom - y1)); TCornerType.InnerLine: begin Path.LineTo(PointF(R.Left + x1, R.Bottom - y2)); Path.LineTo(PointF(R.Left + x2, R.Bottom - y1)); Path.LineTo(PointF(R.Left, R.Bottom - y1)); end; else Path.CurveTo(PointF(R.Left + x2, R.Bottom), PointF(R.Left, R.Bottom - (y2)), PointF(R.Left, R.Bottom - y1)) end; end else begin Path.LineTo(PointF(R.Left, R.Bottom)); Path.LineTo(PointF(R.Left, R.Bottom - y1)); end; Path.ClosePath; DoDrawPath(Path, AOpacity, ABrush); Path.Free; end; end; end; procedure TCanvas.DrawDashRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const AColor: TAlphaColor); var Brush: TStrokeBrush; begin Brush := TStrokeBrush.Create(TBrushKind.Solid, AColor); Brush.Thickness := 1; Brush.Dash := TStrokeDash.Dash; Brush.Kind := TBrushKind.Solid; DrawRect(ARect, XRadius, YRadius, ACorners, AOpacity, Brush); Brush.Free; end; procedure TCanvas.DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ASides: TSides; const ACornerType: TCornerType = TCornerType.Round); begin DrawRectSides(ARect, XRadius, YRadius, ACorners, AOpacity, ASides, FStroke, ACornerType); end; procedure TCanvas.DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ASides: TSides; const ABrush: TStrokeBrush; const ACornerType: TCornerType = TCornerType.Round); var Path: TPathData; X1, X2, Y1, Y2: Single; DrawingRect: TRectF; begin DrawingRect := ARect; X1 := XRadius; if DrawingRect.Width - (X1 * 2) < 0 then if X1 <> 0 then // guard divide by zero X1 := (XRadius * (DrawingRect.Width / (X1 * 2))); X2 := X1 / 2; Y1 := YRadius; if DrawingRect.Height - (Y1 * 2) < 0 then if Y1 <> 0 then // guard divide by zero Y1 := (YRadius * (DrawingRect.Height / (Y1 * 2))); Y2 := Y1 / 2; Path := TPathData.Create; try Path.MoveTo(PointF(DrawingRect.Left, DrawingRect.Top + Y1)); if TCorner.TopLeft in ACorners then begin if (TSide.Top in ASides) or (TSide.Left in ASides) or (XRadius > 0) or (YRadius > 0) then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)); TCornerType.InnerRound: Path.CurveTo(TPointF.Create(DrawingRect.Left + X2, DrawingRect.Top + Y1), TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top + Y2), TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)); TCornerType.InnerLine: begin Path.LineTo(TPointF.Create(DrawingRect.Left + X2, DrawingRect.Top + Y1)); Path.LineTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top + Y2)); Path.LineTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)); end; else Path.CurveTo(TPointF.Create(DrawingRect.Left, DrawingRect.Top + (Y2)), TPointF.Create(DrawingRect.Left + X2, DrawingRect.Top), TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)) end; end else Path.MoveTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)); end else begin if TSide.Left in ASides then Path.LineTo(TPointF.Create(DrawingRect.Left, DrawingRect.Top)) else Path.MoveTo(TPointF.Create(DrawingRect.Left, DrawingRect.Top)); if TSide.Top in ASides then Path.LineTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)) else Path.MoveTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Top)); end; if not(TSide.Top in ASides) then Path.MoveTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Top)) else Path.LineTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Top)); if TCorner.TopRight in ACorners then begin if (TSide.Top in ASides) or (TSide.Right in ASides) or (XRadius > 0) or (YRadius > 0) then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)); TCornerType.InnerRound: Path.CurveTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Top + Y2), TPointF.Create(DrawingRect.Right - X2, DrawingRect.Top + Y1), TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)); TCornerType.InnerLine: begin Path.LineTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Top + Y2)); Path.LineTo(TPointF.Create(DrawingRect.Right - X2, DrawingRect.Top + Y1)); Path.LineTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)); end; else Path.CurveTo(TPointF.Create(DrawingRect.Right - X2, DrawingRect.Top), TPointF.Create(DrawingRect.Right, DrawingRect.Top + (Y2)), TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)) end; end else Path.MoveTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)); end else begin if TSide.Top in ASides then Path.LineTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top)) else Path.MoveTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top)); if TSide.Right in ASides then Path.LineTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)) else Path.MoveTo(TPointF.Create(DrawingRect.Right, DrawingRect.Top + Y1)); end; if not(TSide.Right in ASides) then Path.MoveTo(TPointF.Create(DrawingRect.Right, DrawingRect.Bottom - Y1)) else Path.LineTo(TPointF.Create(DrawingRect.Right, DrawingRect.Bottom - Y1)); if TCorner.BottomRight in ACorners then begin if (TSide.Bottom in ASides) or (TSide.Right in ASides) or (XRadius > 0) or (YRadius > 0) then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)); TCornerType.InnerRound: Path.CurveTo(TPointF.Create(DrawingRect.Right - X2, DrawingRect.Bottom - Y1), TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom - Y2), TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)); TCornerType.InnerLine: begin Path.LineTo(TPointF.Create(DrawingRect.Right - X2, DrawingRect.Bottom - Y1)); Path.LineTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom - Y2)); Path.LineTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)); end; else Path.CurveTo(TPointF.Create(DrawingRect.Right, DrawingRect.Bottom - (Y2)), TPointF.Create(DrawingRect.Right - X2, DrawingRect.Bottom), TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)) end; end else Path.MoveTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)); end else begin if TSide.Right in ASides then Path.LineTo(TPointF.Create(DrawingRect.Right, DrawingRect.Bottom)) else Path.MoveTo(TPointF.Create(DrawingRect.Right, DrawingRect.Bottom)); if TSide.Bottom in ASides then Path.LineTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)) else Path.MoveTo(TPointF.Create(DrawingRect.Right - X1, DrawingRect.Bottom)); end; if not(TSide.Bottom in ASides) then Path.MoveTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Bottom)) else Path.LineTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Bottom)); if TCorner.BottomLeft in ACorners then begin if (TSide.Bottom in ASides) or (TSide.Left in ASides) or (XRadius > 0) or (YRadius > 0) then begin case ACornerType of // TCornerType.Round - default TCornerType.Bevel: Path.LineTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)); TCornerType.InnerRound: Path.CurveTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Bottom - Y2), TPointF.Create(DrawingRect.Left + X2, DrawingRect.Bottom - Y1), TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)); TCornerType.InnerLine: begin Path.LineTo(TPointF.Create(DrawingRect.Left + X1, DrawingRect.Bottom - Y2)); Path.LineTo(TPointF.Create(DrawingRect.Left + X2, DrawingRect.Bottom - Y1)); Path.LineTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)); end; else Path.CurveTo(TPointF.Create(DrawingRect.Left + X2, DrawingRect.Bottom), TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - (Y2)), TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)) end; end else Path.MoveTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)); end else begin if TSide.Bottom in ASides then Path.LineTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom)) else Path.MoveTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom)); if TSide.Left in ASides then Path.LineTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)) else Path.MoveTo(TPointF.Create(DrawingRect.Left, DrawingRect.Bottom - Y1)); end; if (TSide.Left in ASides) then begin Path.LineTo(TPointF.Create(DrawingRect.Left, DrawingRect.Top + Y1)); end; DrawPath(Path, AOpacity, ABrush); finally Path.Free; end; end; function TCanvas.GetCanvasScale: Single; begin if Parent <> nil then Result := Parent.Scale else if Bitmap <> nil then Result := Bitmap.BitmapScale else Result := DefaultScale; end; class function TCanvas.GetCanvasStyle: TCanvasStyles; begin Result := [TCanvasStyle.SupportClipRects]; end; class function TCanvas.GetAttribute(const Value: TCanvasAttribute): Integer; begin case Value of TCanvasAttribute.MaxBitmapSize: Result := MaxAllowedBitmapSize; else raise EArgumentException.CreateRes(@SInvalidCanvasParameter); end; end; procedure TCanvas.SetSize(const AWidth, AHeight: Integer); begin FWidth := AWidth; FHeight := AHeight; end; { TBrushObject } constructor TBrushObject.Create(AOwner: TComponent); begin inherited; FBrush := TBrush.Create(TBrushKind.Solid, $FFFFFFFF); end; destructor TBrushObject.Destroy; begin FreeAndNil(FBrush); inherited; end; function TBrushObject.GetBrush: TBrush; begin Result := FBrush; end; procedure TBrushObject.SetName(const NewName: TComponentName); begin inherited; if FStyleName = '' then FStyleName := Name; end; { TFontObject } constructor TFontObject.Create(AOwner: TComponent); begin inherited; FFont := TFont.Create; end; destructor TFontObject.Destroy; begin FreeAndNil(FFont); inherited; end; function TFontObject.GetFont: TFont; begin Result := FFont; end; procedure TFontObject.SetName(const NewName: TComponentName); begin inherited; if FStyleName = '' then FStyleName := Name; end; { TPathObject } constructor TPathObject.Create(AOwner: TComponent); begin inherited; FPath := TPathData.Create(); end; destructor TPathObject.Destroy; begin FreeAndNil(FPath); inherited; end; function TPathObject.GetPath: TPathData; begin Result := FPath; end; procedure TPathObject.SetName(const NewName: TComponentName); begin inherited; if FStyleName = '' then FStyleName := Name; end; { TBitmapObject } constructor TBitmapObject.Create(AOwner: TComponent); begin inherited; FBitmap := TBitmap.Create(1, 1); end; destructor TBitmapObject.Destroy; begin FreeAndNil(FBitmap); inherited; end; function TBitmapObject.GetBitmap: TBitmap; begin Result := FBitmap; end; procedure TBitmapObject.SetName(const NewName: TComponentName); begin inherited; if FStyleName = '' then FStyleName := Name; end; { TCanvasSaveState } procedure TCanvasSaveState.Assign(Source: TPersistent); var LCanvas: TCanvas; begin if Source is TCanvas then begin LCanvas := TCanvas(Source); Self.FAssigned := True; Self.FOffset := LCanvas.FOffset; Self.FMatrix := LCanvas.FMatrix; Self.FFill.Assign(LCanvas.Fill); Self.FStroke.Assign(LCanvas.Stroke); Self.FFont.Assign(LCanvas.Font); end else inherited; end; procedure TCanvasSaveState.AssignTo(Dest: TPersistent); var LCanvas: TCanvas; begin if Dest is TCanvas then begin LCanvas := TCanvas(Dest); Self.FAssigned := False; LCanvas.Offset := FOffset; LCanvas.SetMatrix(Self.FMatrix); LCanvas.Fill.Assign(Self.FFill); LCanvas.Stroke.Assign(Self.FStroke); LCanvas.Font.Assign(Self.FFont); end else inherited; end; constructor TCanvasSaveState.Create; begin inherited Create; FFont := TFont.Create; FFill := TBrush.Create(TBrushKind.Solid, TAlphaColors.Black); FStroke := TStrokeBrush.Create(TBrushKind.Solid, TAlphaColors.White); end; destructor TCanvasSaveState.Destroy; begin FFont.Free; FFill.Free; FStroke.Free; inherited; end; { TColorObject } procedure TColorObject.SetName(const NewName: TComponentName); begin inherited; if StyleName = '' then StyleName := Name; end; procedure RegisterAliases; begin AddEnumElementAliases(TypeInfo(TGradientStyle), ['gsLinear', 'gsRadial']); AddEnumElementAliases(TypeInfo(TWrapMode), ['wmTile', 'wmTileOriginal', 'wmTileStretch']); AddEnumElementAliases(TypeInfo(TBrushKind), ['bkNone', 'bkSolid', 'bkGradient', 'bkBitmap', 'bkResource']); AddEnumElementAliases(TypeInfo(TStrokeCap), ['scFlat', 'scRound']); AddEnumElementAliases(TypeInfo(TStrokeJoin), ['sjMiter', 'sjRound', 'sjBevel']); AddEnumElementAliases(TypeInfo(TStrokeDash), ['sdSolid', 'sdDash', 'sdDot', 'sdDashDot', 'sdDashDotDot', 'sdCustom']); AddEnumElementAliases(TypeInfo(TStrokeBrush.TDashDevice), ['ddScreen', 'ddPrinter']); AddEnumElementAliases(TypeInfo(TMapAccess), ['maRead', 'maWrite', 'maReadWrite']); AddEnumElementAliases(TypeInfo(TPathPointKind), ['ppMoveTo', 'ppLineTo', 'ppCurveTo', 'ppClose']); AddEnumElementAliases(TypeInfo(TFillTextFlag), ['ftRightToLeft']); AddEnumElementAliases(TypeInfo(TCanvasQuality), ['ccSystemDefault', 'ccHighPerformance', 'ccHighQuality']); AddEnumElementAliases(TypeInfo(TCanvas.TMatrixMeaning), ['mmUnknown', 'mmIdentity', 'mmTranslate']); end; procedure UnregisterAliases; begin RemoveEnumElementAliases(TypeInfo(TGradientStyle)); RemoveEnumElementAliases(TypeInfo(TWrapMode)); RemoveEnumElementAliases(TypeInfo(TBrushKind)); RemoveEnumElementAliases(TypeInfo(TStrokeCap)); RemoveEnumElementAliases(TypeInfo(TStrokeJoin)); RemoveEnumElementAliases(TypeInfo(TStrokeDash)); RemoveEnumElementAliases(TypeInfo(TStrokeBrush.TDashDevice)); RemoveEnumElementAliases(TypeInfo(TMapAccess)); RemoveEnumElementAliases(TypeInfo(TPathPointKind)); RemoveEnumElementAliases(TypeInfo(TFillTextFlag)); RemoveEnumElementAliases(TypeInfo(TCanvasQuality)); RemoveEnumElementAliases(TypeInfo(TCanvas.TMatrixMeaning)); end; initialization RegisterAliases; RegisterFmxClasses([TBrushObject, TFontObject, TPathObject, TBitmapObject, TColorObject]); finalization UnregisterAliases; end.
31.422786
158
0.669383
8572628aa5e93ae5c43b9da216f263b88eb2cfbc
1,613
dfm
Pascal
frmLoginU.dfm
Wolfram-180/TourAgent
e4a7b170f40d6d03dab8295d8b0246ebbc6cc35a
[ "MIT" ]
null
null
null
frmLoginU.dfm
Wolfram-180/TourAgent
e4a7b170f40d6d03dab8295d8b0246ebbc6cc35a
[ "MIT" ]
null
null
null
frmLoginU.dfm
Wolfram-180/TourAgent
e4a7b170f40d6d03dab8295d8b0246ebbc6cc35a
[ "MIT" ]
null
null
null
object frmLogin: TfrmLogin Left = 0 Top = 0 BorderIcons = [biSystemMenu] BorderStyle = bsSingle Caption = #1042#1093#1086#1076 ClientHeight = 154 ClientWidth = 165 Color = clWindow Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] FormStyle = fsStayOnTop OldCreateOrder = False Position = poDesktopCenter PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel Left = 65 Top = 8 Width = 30 Height = 13 Caption = #1051#1086#1075#1080#1085 end object Label2: TLabel Left = 62 Top = 51 Width = 37 Height = 13 Caption = #1055#1072#1088#1086#1083#1100 end object btnEnter: TButton Left = 8 Top = 121 Width = 149 Height = 25 Caption = #1042#1093#1086#1076 Default = True ModalResult = 1 TabOrder = 3 OnClick = btnEnterClick end object edtPass: TEdit Left = 8 Top = 64 Width = 145 Height = 21 PasswordChar = '*' TabOrder = 1 OnKeyUp = edtPassKeyUp end object dblcbUsers: TDBLookupComboBox Left = 8 Top = 24 Width = 145 Height = 21 KeyField = 'ID' ListField = 'NAME' ListSource = dsqUsers TabOrder = 0 end object chbShowPass: TCheckBox Left = 10 Top = 93 Width = 137 Height = 17 Caption = #1055#1086#1082#1072#1079#1099#1074#1072#1090#1100' '#1087#1072#1088#1086#1083#1100 TabOrder = 2 OnClick = chbShowPassClick end object dsqUsers: TDataSource AutoEdit = False DataSet = dmMain.qUsers Left = 24 Top = 32 end end
20.1625
97
0.631742
858719082b3dd79694b6ad529293c4381dcb65c9
7,245
pas
Pascal
uMain.pas
0x2019/Player-bass
e56eb1a2c0f3974eb1d37485f69c3ffa3ba5ea51
[ "MIT" ]
null
null
null
uMain.pas
0x2019/Player-bass
e56eb1a2c0f3974eb1d37485f69c3ffa3ba5ea51
[ "MIT" ]
null
null
null
uMain.pas
0x2019/Player-bass
e56eb1a2c0f3974eb1d37485f69c3ffa3ba5ea51
[ "MIT" ]
null
null
null
unit uMain; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, bass, StdCtrls, Buttons, ExtCtrls, ShellApi; type TfrmMain = class(TForm) sOpenTrackFile: TOpenDialog; tmrPlayBack: TTimer; Panel2: TPanel; Panel3: TPanel; Panel4: TPanel; btnPause: TBitBtn; btnStop: TBitBtn; btnOpenTrackFile: TBitBtn; btnPlay: TBitBtn; Panel1: TPanel; sPlayBack: TScrollBar; sVolumeBar: TScrollBar; sPlayList1: TListBox; sPlayList2: TListBox; btnAddPlayList: TSpeedButton; btnDeletePlayList: TSpeedButton; btnOpenPlayList: TSpeedButton; btnSavePlayList: TSpeedButton; sOpenPlayList: TOpenDialog; sSavePlayList: TSaveDialog; PaintBox1: TPaintBox; PaintBox2: TPaintBox; tmrPlay: TTimer; lblTrackPos: TLabel; lblTrackLen: TLabel; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure btnPauseClick(Sender: TObject); procedure btnStopClick(Sender: TObject); procedure tmrPlayBackTimer(Sender: TObject); procedure sPlayBackScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); procedure btnOpenTrackFileClick(Sender: TObject); procedure btnPlayClick(Sender: TObject); procedure btnAddPlayListClick(Sender: TObject); procedure btnDeletePlayListClick(Sender: TObject); procedure sPlayList1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure sPlayList1DblClick(Sender: TObject); procedure sVolumeBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); procedure btnSavePlayListClick(Sender: TObject); procedure btnOpenPlayListClick(Sender: TObject); procedure tmrPlayTimer(Sender: TObject); private procedure AddFiles(FileName: string); procedure DropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; procedure PlayItem(Item: Integer); public { Public declarations } end; var frmMain: TfrmMain; bChan: DWORD; bFloatable: DWORD; bTrack: boolean; implementation {$R *.dfm} procedure TfrmMain.FormCreate(Sender: TObject); begin DragAcceptFiles(Handle, True); if BASS_Init(-1, 44100, 0, Handle, nil) then Exit; end; procedure TfrmMain.FormDestroy(Sender: TObject); begin BASS_Free(); end; procedure TfrmMain.btnPauseClick(Sender: TObject); begin BASS_ChannelPause(bChan); end; procedure TfrmMain.btnStopClick(Sender: TObject); begin BASS_ChannelStop(bChan); BASS_ChannelSetPosition(bChan, 0, 0); end; procedure TfrmMain.tmrPlayBackTimer(Sender: TObject); begin if bTrack = False then sPlayBack.Position:= BASS_ChannelGetPosition(bChan, 0); end; procedure TfrmMain.sPlayBackScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); begin if ScrollCode = scEndScroll then begin BASS_ChannelSetPosition(bChan, sPlayBack.Position, 0); bTrack := False; end else bTrack := True; end; procedure TfrmMain.btnOpenTrackFileClick(Sender: TObject); begin if sOpenTrackFile.Execute = False then Exit; AddFiles(sOpenTrackFile.FileName); sPlayList1.ItemIndex := sPlayList1.Items.Count -1; PlayItem(sPlayList1.ItemIndex); end; procedure TfrmMain.btnPlayClick(Sender: TObject); begin if BASS_ChannelisActive(bChan) = BASS_ACTIVE_PAUSED then BASS_ChannelPlay(bChan, False) else PlayItem(sPlayList1.ItemIndex); end; Procedure TfrmMain.AddFiles(FileName: string); begin sPlayList2.Items.Add(FileName); sPlayList1.Items.Add(ExtractFileName(FileName)); if sPlayList1.ItemIndex = -1 then sPlayList1.ItemIndex := sPlayList1.Items.Count -1; end; procedure TfrmMain.btnAddPlayListClick(Sender: TObject); begin if sOpenPlayList.Execute = False then Exit; AddFiles(sOpenPlayList.FileName); end; procedure TfrmMain.PlayItem(Item: Integer); begin if Item < 0 then Exit; if bChan <> 0 then BASS_MusicFree(bChan); bChan := BASS_MusicLoad(False, PChar(sPlayList2.Items.Strings[Item]), 0, 0, BASS_MUSIC_PRESCAN or bFloatable {$IFDEF UNICODE} or BASS_UNICODE {$ENDIF}, 1); if bChan = 0 then ShowMessage('Error!') else begin Panel1.Caption := ExtractFileName(sPlayList1.Items.Strings[Item]); sPlayBack.Min := 0; sPlayBack.Max := BASS_ChannelGetLength(bChan, 0) -1; sPlayBack.Position := 0; BASS_ChannelPlay(bChan, False); end; end; procedure TfrmMain.btnDeletePlayListClick(Sender: TObject); var Inindex: Integer; begin Inindex:= sPlayList1.ItemIndex; sPlayList1.Items.Delete(Inindex); sPlayList1.Items.Delete(Inindex); if Inindex > sPlayList1.Items.Count -1 then Inindex := sPlayList1.Items.Count -1; sPlayList1.ItemIndex := Inindex; end; procedure TfrmMain.sPlayList1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key = VK_DELETE then btnDeletePlayList.Click; end; procedure TfrmMain.sPlayList1DblClick(Sender: TObject); begin PlayItem(sPlayList1.ItemIndex); end; procedure TfrmMain.sVolumeBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); begin BASS_ChannelSetAttribute(bchan, BASS_ATTRIB_VOL, sVolumeBar.Position / 100); end; procedure TfrmMain.btnSavePlayListClick(Sender: TObject); begin if sSavePlayList.Execute then sPlayList2.Items.SaveToFile(sSavePlayList.FileName); end; procedure TfrmMain.btnOpenPlayListClick(Sender: TObject); var i: Integer; begin if sOpenPlayList.Execute = False then Exit; sPlayList2.Items.LoadFromFile(sOpenPlayList.FileName); sPlayList1.Items.LoadFromFile(sOpenPlayList.FileName); for i := 0 to sPlayList1.Items.Count -1 do sPlayList1.Items.Strings[i] := ExtractFileName(sPlayList1.Items.Strings[i]); end; Procedure TfrmMain.DropFiles(var Msg: TWMDropFiles); var CFileName: array[0.. MAX_PATH] of Char; begin try if DragQueryFile(Msg.Drop, 0, CFileName, MAX_PATH) > 0 then begin AddFiles(CFileName); Msg.Result := 0; end; finally DragFinish(Msg.Drop); end; end; procedure TfrmMain.tmrPlayTimer(Sender: TObject); var L, R, L1, R1: Integer; Level: DWORD; TrackLen: Double; TrackPos: Double; begin if BASS_ChannelIsActive(bChan) <> BASS_ACTIVE_PLAYING then Exit; Level:= BASS_ChannelGetLevel(bChan); L:= HiWORD(Level); R:= LOWORD(Level); PaintBox1.Canvas.Brush.Color := clWhite; PaintBox1.Canvas.FillRect(PaintBox1.Canvas.Cliprect); PaintBox2.Canvas.Brush.Color := clWhite; PaintBox2.Canvas.FillRect(PaintBox1.Canvas.Cliprect); L1:=Round(L / (32768 / PaintBox1.Height)); R1:=Round(R / (32768 / PaintBox2.Height)); PaintBox1.Canvas.Brush.Color := clBlue; PaintBox2.Canvas.Brush.Color := clBlue; PaintBox1.Canvas.Rectangle (0, PaintBox1.Height-L1, PaintBox1.Width, PaintBox1.Height); PaintBox2.Canvas.Rectangle (0, PaintBox2.Height-R1, PaintBox2.Width, PaintBox2.Height); TrackLen := BASS_ChannelBytes2Seconds(bChan, BASS_ChannelGetLength(bChan, 0)); TrackPos := BASS_ChannelBytes2Seconds(bChan, BASS_ChannelGetPosition(bChan, 0)); lblTrackPos.Caption := format('%2.2d:%2.2d', [trunc(TrackPos) div 60, trunc(TrackPos) mod 60]); lblTrackLen.Caption := format('%2.2d:%2.2d', [trunc(TrackLen) div 60, trunc(TrackLen) mod 60]); end; end.
28.523622
159
0.741891
f35e41754cd1d3b27c846cb582983676afca2983
357
pas
Pascal
Samples/Demo/Host/ServerMain.pas
ZYHPRO/RPMP
1fbd553d47ee87156dcc8480b36ddcdbc95e85cc
[ "BSD-2-Clause" ]
33
2018-12-23T07:42:25.000Z
2021-11-07T20:18:31.000Z
Samples/Demo/Host/ServerMain.pas
zhyhuiGithub/RPMP
1fbd553d47ee87156dcc8480b36ddcdbc95e85cc
[ "BSD-2-Clause" ]
null
null
null
Samples/Demo/Host/ServerMain.pas
zhyhuiGithub/RPMP
1fbd553d47ee87156dcc8480b36ddcdbc95e85cc
[ "BSD-2-Clause" ]
17
2018-12-23T08:21:03.000Z
2021-06-10T09:03:08.000Z
unit ServerMain; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, IPPeerServer, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs; type TForm1 = class(TForm) private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} end.
13.730769
71
0.714286
f189549ed34b4fa4c870416c0c3ae272fdd3cd14
8,035
pas
Pascal
HODLER_Multiplatform_Win_And_iOS_Linux/coinCode/coinData.pas
HODLERTECH/HODLER-Android-Multi-Asset-Wallet
a8c54ecfc569d0ee959b6f0e7826c4ee4b5c4848
[ "Unlicense" ]
35
2018-11-04T12:02:34.000Z
2022-02-15T06:00:19.000Z
HODLER_Multiplatform_Win_And_iOS_Linux/coinCode/coinData.pas
Ecoent/HODLER-Open-Source-Multi-Asset-Wallet
a8c54ecfc569d0ee959b6f0e7826c4ee4b5c4848
[ "Unlicense" ]
85
2018-10-23T17:09:20.000Z
2022-01-12T07:12:54.000Z
HODLER_Multiplatform_Win_And_iOS_Linux/coinCode/coinData.pas
Ecoent/HODLER-Open-Source-Multi-Asset-Wallet
a8c54ecfc569d0ee959b6f0e7826c4ee4b5c4848
[ "Unlicense" ]
34
2018-10-30T00:40:37.000Z
2022-02-15T06:00:15.000Z
unit coinData; interface uses System.IOUtils, sysutils, StrUtils, System.classes, FMX.Graphics, base58, FMX.Dialogs, WalletStructureData, Nano; function getURLToExploreAddr(id:integer;addr:ansistring):AnsiString; function CreateCoin(id, x, y: Integer; MasterSeed: AnsiString; description: AnsiString = ''): TWalletInfo; function getCoinIconResource(id: Integer): TStream; function isValidForCoin(id: Integer; address: AnsiString): Boolean; function getURLToExplorer(id: Integer; hash: AnsiString): AnsiString; type CoinType = ( Bitcoin , Litecoin , Dash , BitcoinCash , Ethereum , RavenCoin , DigiByte , BitcoinSV , Nano ); type coinInfo = record id: Integer; displayName: AnsiString; name: AnsiString; shortcut: AnsiString; WifByte: AnsiString; p2sh: AnsiString; p2pk: AnsiString; flag: System.UInt32; decimals: smallint; availableFirstLetter: AnsiString; hrp: AnsiString; qrname: AnsiString; ResourceName: AnsiString; end; const // all supported coin ResourceName : '_IMG'; availableCoin: array[0..8] of coinInfo = (( id: 0; displayName: 'Bitcoin'; name: 'bitcoin'; shortcut: 'BTC'; WifByte: '80'; p2sh: '05'; p2pk: '00'; flag: 0; decimals: 8; availableFirstLetter: '13b'; hrp: 'bc'; qrname: 'bitcoin'; ResourceName: 'BITCOIN_IMG'; ), ( id: 1; displayName: 'Litecoin'; name: 'litecoin'; shortcut: 'LTC'; WifByte: 'B0'; p2sh: '32' { '05' }; p2pk: '30'; flag: 0; decimals: 8; availableFirstLetter: 'lm'; hrp: 'ltc'; qrname: 'litecoin'; ResourceName: 'LITECOIN_IMG'; ), ( id: 2; displayName: 'DASH'; name: 'dash'; shortcut: 'DASH'; WifByte: 'CC'; p2sh: '10'; p2pk: '4c'; flag: 0; decimals: 8; availableFirstLetter: 'X'; qrname: 'dash'; ResourceName: 'DASH_IMG'; ), ( id: 3; displayName: 'Bitcoin Cash'; name: 'bitcoinabc'; shortcut: 'BCH'; WifByte: '80'; p2sh: '05'; p2pk: '00'; flag: 0; decimals: 8; availableFirstLetter: '13pq'; qrname: 'bitcoincash'; ResourceName: 'BITCOINCASH_IMG'; ), ( id: 4; displayName: 'Ethereum'; name: 'ethereum'; shortcut: 'ETH'; WifByte: ''; p2pk: '00'; flag: 1; decimals: 18; availableFirstLetter: '0'; qrname: 'ethereum'; ResourceName: 'ETHEREUM_IMG'; ), ( id: 5; displayName: 'Ravencoin'; name: 'ravencoin'; shortcut: 'RVN'; WifByte: '80'; p2sh: '7a'; p2pk: '3c'; flag: 0; decimals: 8; availableFirstLetter: 'Rr'; qrname: 'ravencoin'; ResourceName: 'RAVENCOIN_IMG'; ), ( id: 6; displayName: 'Digibyte'; name: 'digibyte'; shortcut: 'DGB'; WifByte: '80'; p2sh: '3f'; p2pk: '1e'; flag: 0; decimals: 8; availableFirstLetter: 'SD'; qrname: 'digibyte'; ResourceName: 'DIGIBYTE_IMG'; ), ( id: 7; displayName: 'Bitcoin SV'; name: 'bitcoinsv'; shortcut: 'BSV'; WifByte: '80'; p2sh: '05'; p2pk: '00'; flag: 0; decimals: 8; availableFirstLetter: '13pq'; qrname: 'bitcoincash'; ResourceName: 'BITCOINSV_IMG'; ), ( id: 8; displayName: 'Nano'; name: 'nano'; shortcut: 'NANO'; WifByte: ''; p2sh: ''; p2pk: ''; flag: 2; decimals: 30; availableFirstLetter: 'xn'; qrname: 'nano'; ResourceName: 'NANO_IMG'; )); implementation uses Bitcoin, Ethereum, misc, UHome; function getURLToExploreAddr(id:integer;addr:ansistring):AnsiString; var URL: AnsiString; begin case id of 0: URL := 'https://blockchair.com/bitcoin/address/'; 1: URL := 'https://blockchair.com/litecoin/address/'; 2: URL := 'https://blockchair.com/dash/address/'; 3: URL := 'https://blockchair.com/bitcoin-cash/address/'; 4: //URL := 'https://blockchair.com/ethereum/transaction/'; URL := 'https://etherscan.io/tx/'; 5: URL := 'https://ravencoin.network/address/'; 6: URL := 'https://digiexplorer.info/address/'; 7: URL := 'https://bsvexplorer.info//#/address/'; 8: URL := 'https://www.nanode.co/account/'; end; result := URL + addr; end; function getURLToExplorer(id: Integer; hash: AnsiString): AnsiString; var URL: AnsiString; begin // ethereum case id of 0: URL := 'https://blockchair.com/bitcoin/transaction/'; 1: URL := 'https://blockchair.com/litecoin/transaction/'; 2: URL := 'https://chainz.cryptoid.info/dash/tx.dws?'; 3: URL := 'https://blockchair.com/bitcoin-cash/transaction/'; 4: //URL := 'https://blockchair.com/ethereum/transaction/'; URL := 'https://etherscan.io/tx/'; 5: URL := 'https://ravencoin.network/tx/'; 6: URL := 'https://digiexplorer.info/tx/'; 7: URL := 'https://bsvexplorer.info//#/tx/'; 8: URL := 'https://www.nanode.co/block/'; end; result := URL + hash; end; function getCoinIconResource(id: Integer): TStream; begin result := resourceMenager.getAssets( AvailableCoin[id].Resourcename ); end; function CreateCoin(id, x, y: Integer; MasterSeed: AnsiString; description: AnsiString = ''): TWalletInfo; begin case availableCoin[id].flag of 0: result := Bitcoin_createHD(id, x, y, MasterSeed); 1: result := Ethereum_createHD(id, x, y, MasterSeed); 2: result:= nano_createHD(x,y,MasterSeed); end; // if description <> '' then // begin result.description := description; /// end // else // result.description := result.addr; wipeAnsiString(MasterSeed); end; function checkFirstLetter(id: Integer; address: AnsiString): Boolean; var c: Ansichar; position: Integer; begin address := removeSpace(address); if containsText(address, ':') then begin position := pos(':', address); address := rightStr(address, length(address) - position); end; for c in availableCoin[id].availableFirstLetter do begin if lowercase(address[low(address)]) = lowercase(c) then exit(true); end; result := false; end; // check if given address is of given coin function isValidForCoin(id: Integer; address: AnsiString): Boolean; var str: AnsiString; x: Integer; info: TAddressInfo; a1,a2:string; begin result := false; if availableCoin[id].flag = 0 then begin if (id in [3, 7]) then begin if pos(':', address) <> 0 then begin str := rightStr(address, length(address) - pos(':', address)); end else str := address; str := StringReplace(str, ' ', '', [rfReplaceAll]); // showmessage(Str); // str := StringReplace(str, 'bitcoincash:', '', [rfReplaceAll]); if (lowercase(str[low(str)]) = 'q') or (lowercase(str[low(str)]) = 'p') then begin // isValidBCHCashAddress(Address) result := true; end else begin info := decodeAddressInfo(address, id); if info.scriptType >= 0 then result := true; end; end else begin try info := decodeAddressInfo(address, id); except on E: Exception do begin exit(false); end; end; if info.scriptType >= 0 then result := true; end; // showmessage(str + ' sh ' + availablecoin[id].p2sh + ' pk ' + availablecoin[id].p2pk); end else if availableCoin[id].flag = 1 then begin // showmessage(inttostr(length(address))); result := ((isHex(rightStr(address, 40))) and (length(address) = 42)); end else if availableCoin[id].flag =2 then begin a1:=StringReplace(address,'xrb_','',[rfReplaceAll]); a1:=StringReplace(a1,'nano_','',[rfReplaceAll]); a2:=nano_accountFromHexKey(nano_keyFromAccount(address)); a2:=StringReplace(a2,'xrb_','',[rfReplaceAll]); a2:=StringReplace(a2,'nano_','',[rfReplaceAll]); result:=(a1=a2); end; result := result and checkFirstLetter(id, address); end; end.
22.69774
110
0.603111
f12a9594cda4a6c768ca4571aeeaa4e837d56309
13,435
pas
Pascal
sdk/components/AlexMX/mxPropsEd.pas
acidicMercury8/xray-1.5
ae094d82b76a8ce916e196654c163894bbf00146
[ "Linux-OpenIB" ]
10
2021-05-04T06:40:27.000Z
2022-01-20T20:24:28.000Z
sdk/components/AlexMX/mxPropsEd.pas
acidicMercury8/xray-1.5
ae094d82b76a8ce916e196654c163894bbf00146
[ "Linux-OpenIB" ]
null
null
null
sdk/components/AlexMX/mxPropsEd.pas
acidicMercury8/xray-1.5
ae094d82b76a8ce916e196654c163894bbf00146
[ "Linux-OpenIB" ]
2
2021-11-07T16:57:19.000Z
2021-12-05T13:17:12.000Z
{*******************************************************} { } { Delphi VCL Extensions (RX) } { } { Copyright (c) 1995, 1996 AO ROSNO } { } {*******************************************************} unit mxPropsEd; {$I MX.INC} interface uses SysUtils, Messages, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, mxPlacemnt, Consts, DesignIntf, DesignEditors, mxVclUtils, MXCtrls, MXProps; type {$IFNDEF RX_D4} IDesigner = TDesigner; {$ENDIF} { TFormPropsDlg } TFormPropsDlg = class(TForm) Bevel1: TBevel; Label30: TLabel; Label31: TLabel; Label2: TLabel; UpBtn: TSpeedButton; DownBtn: TSpeedButton; StoredList: TTextListBox; PropertiesList: TTextListBox; ComponentsList: TTextListBox; FormBox: TGroupBox; ActiveCtrlBox: TCheckBox; PositionBox: TCheckBox; StateBox: TCheckBox; AddButton: TButton; DeleteButton: TButton; ClearButton: TButton; OkBtn: TButton; CancelBtn: TButton; procedure AddButtonClick(Sender: TObject); procedure ClearButtonClick(Sender: TObject); procedure ListClick(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure DeleteButtonClick(Sender: TObject); procedure StoredListClick(Sender: TObject); procedure UpBtnClick(Sender: TObject); procedure DownBtnClick(Sender: TObject); procedure StoredListDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); procedure StoredListDragDrop(Sender, Source: TObject; X, Y: Integer); procedure PropertiesListDblClick(Sender: TObject); private { Private declarations } FCompOwner: TComponent; FDesigner: IDesigner; procedure ListToIndex(List: TCustomListBox; Idx: Integer); procedure UpdateCurrent; procedure DeleteProp(I: Integer); function FindProp(const CompName, PropName: string; var IdxComp, IdxProp: Integer): Boolean; procedure ClearLists; procedure CheckAddItem(const CompName, PropName: string); procedure AddItem(IdxComp, IdxProp: Integer; AUpdate: Boolean); procedure BuildLists(StoredProps: TStrings); procedure CheckButtons; procedure SetStoredList(AList: TStrings); public { Public declarations } end; { TFormStorageEditor } TFormStorageEditor = class(TComponentEditor) procedure ExecuteVerb(Index: Integer); override; function GetVerb(Index: Integer): string; override; function GetVerbCount: Integer; override; end; { TStoredPropsProperty } TStoredPropsProperty = class(TClassProperty) public function GetAttributes: TPropertyAttributes; override; function GetValue: string; override; procedure Edit; override; end; { Show component editor } function ShowStorageDesigner(ACompOwner: TComponent; ADesigner: IDesigner; AStoredList: TStrings; var Options: TPlacementOptions): Boolean; implementation uses Windows, MXLConst, TypInfo, mxBoxProcs; {$R *.DFM} {$IFDEF WIN32} {$D-} {$ENDIF} { TFormStorageEditor } procedure TFormStorageEditor.ExecuteVerb(Index: Integer); var Storage: TFormStorage; Opt: TPlacementOptions; begin Storage := Component as TFormStorage; if Index = 0 then begin Opt := Storage.Options; if ShowStorageDesigner(TComponent(Storage.Owner), Designer, Storage.StoredProps, Opt) then begin Storage.Options := Opt; {$IFDEF WIN32} Storage.SetNotification; {$ENDIF} end; end; end; function TFormStorageEditor.GetVerb(Index: Integer): string; begin case Index of 0: Result := LoadStr(srStorageDesigner); else Result := ''; end; end; function TFormStorageEditor.GetVerbCount: Integer; begin Result := 1; end; { TStoredPropsProperty } function TStoredPropsProperty.GetAttributes: TPropertyAttributes; begin Result := inherited GetAttributes + [paDialog] - [paSubProperties]; end; function TStoredPropsProperty.GetValue: string; begin if TStrings(GetOrdValue).Count > 0 then Result := inherited GetValue else Result := ResStr(srNone); end; procedure TStoredPropsProperty.Edit; var Storage: TFormStorage; Opt: TPlacementOptions; begin Storage := GetComponent(0) as TFormStorage; Opt := Storage.Options; if ShowStorageDesigner(Storage.Owner as TComponent, Designer, Storage.StoredProps, Opt) then begin Storage.Options := Opt; {$IFDEF WIN32} Storage.SetNotification; {$ENDIF} end; end; { Show component editor } function ShowStorageDesigner(ACompOwner: TComponent; ADesigner: IDesigner; AStoredList: TStrings; var Options: TPlacementOptions): Boolean; begin with TFormPropsDlg.Create(Application) do try FCompOwner := ACompOwner; FDesigner := ADesigner; Screen.Cursor := crHourGlass; try UpdateStoredList(ACompOwner, AStoredList, False); SetStoredList(AStoredList); ActiveCtrlBox.Checked := fpActiveControl in Options; PositionBox.Checked := fpPosition in Options; StateBox.Checked := fpState in Options; finally Screen.Cursor := crDefault; end; Result := ShowModal = mrOk; if Result then begin AStoredList.Assign(StoredList.Items); Options := []; if ActiveCtrlBox.Checked then Include(Options, fpActiveControl); if PositionBox.Checked then Include(Options, fpPosition); if StateBox.Checked then Include(Options, fpState); end; finally Free; end; end; { TFormPropsDlg } procedure TFormPropsDlg.ListToIndex(List: TCustomListBox; Idx: Integer); procedure SetItemIndex(Index: Integer); begin if TTextListBox(List).MultiSelect then TTextListBox(List).Selected[Index] := True; List.ItemIndex := Index; end; begin if Idx < List.Items.Count then SetItemIndex(Idx) else if Idx - 1 < List.Items.Count then SetItemIndex(Idx - 1) else if (List.Items.Count > 0) then SetItemIndex(0); end; procedure TFormPropsDlg.UpdateCurrent; var IdxProp: Integer; List: TStrings; begin IdxProp := PropertiesList.ItemIndex; if IdxProp < 0 then IdxProp := 0; if ComponentsList.Items.Count <= 0 then begin PropertiesList.Clear; Exit; end; if (ComponentsList.ItemIndex < 0) then ComponentsList.ItemIndex := 0; List := TStrings(ComponentsList.Items.Objects[ComponentsList.ItemIndex]); if List.Count > 0 then PropertiesList.Items := List else PropertiesList.Clear; ListToIndex(PropertiesList, IdxProp); CheckButtons; end; procedure TFormPropsDlg.DeleteProp(I: Integer); var CompName, PropName: string; IdxComp, IdxProp, Idx: Integer; StrList: TStringList; begin Idx := StoredList.ItemIndex; if ParseStoredItem(StoredList.Items[I], CompName, PropName) then begin StoredList.Items.Delete(I); if FDesigner <> nil then FDesigner.Modified; ListToIndex(StoredList, Idx); {I := ComponentsList.ItemIndex;} if not FindProp(CompName, PropName, IdxComp, IdxProp) then begin if IdxComp < 0 then begin StrList := TStringList.Create; try StrList.Add(PropName); ComponentsList.Items.AddObject(CompName, StrList); ComponentsList.ItemIndex := ComponentsList.Items.IndexOf(CompName); except StrList.Free; raise; end; end else begin TStrings(ComponentsList.Items.Objects[IdxComp]).Add(PropName); end; UpdateCurrent; end; end; end; function TFormPropsDlg.FindProp(const CompName, PropName: string; var IdxComp, IdxProp: Integer): Boolean; begin Result := False; IdxComp := ComponentsList.Items.IndexOf(CompName); if IdxComp >= 0 then begin IdxProp := TStrings(ComponentsList.Items.Objects[IdxComp]).IndexOf(PropName); if IdxProp >= 0 then Result := True; end; end; procedure TFormPropsDlg.ClearLists; var I: Integer; begin for I := 0 to ComponentsList.Items.Count - 1 do begin ComponentsList.Items.Objects[I].Free; end; ComponentsList.Items.Clear; ComponentsList.Clear; PropertiesList.Clear; StoredList.Clear; end; procedure TFormPropsDlg.AddItem(IdxComp, IdxProp: Integer; AUpdate: Boolean); var Idx: Integer; StrList: TStringList; CompName, PropName: string; Component: TComponent; begin CompName := ComponentsList.Items[IdxComp]; Component := FCompOwner.FindComponent(CompName); if Component = nil then Exit; StrList := TStringList(ComponentsList.Items.Objects[IdxComp]); PropName := StrList[IdxProp]; StrList.Delete(IdxProp); if StrList.Count = 0 then begin Idx := ComponentsList.ItemIndex; StrList.Free; ComponentsList.Items.Delete(IdxComp); ListToIndex(ComponentsList, Idx); end; StoredList.Items.AddObject(CreateStoredItem(CompName, PropName), Component); if FDesigner <> nil then FDesigner.Modified; StoredList.ItemIndex := StoredList.Items.Count - 1; if AUpdate then UpdateCurrent; end; procedure TFormPropsDlg.CheckAddItem(const CompName, PropName: string); var IdxComp, IdxProp: Integer; begin if FindProp(CompName, PropName, IdxComp, IdxProp) then AddItem(IdxComp, IdxProp, True); end; procedure TFormPropsDlg.BuildLists(StoredProps: TStrings); var I, J: Integer; C: TComponent; List: TPropInfoList; StrList: TStrings; CompName, PropName: string; begin ClearLists; if FCompOwner <> nil then begin for I := 0 to FCompOwner.ComponentCount - 1 do begin C := FCompOwner.Components[I]; if (C is TFormPlacement) or (C.Name = '') then Continue; List := TPropInfoList.Create(C, tkProperties); try StrList := TStringList.Create; try TStringList(StrList).Sorted := True; for J := 0 to List.Count - 1 do StrList.Add(List.Items[J]^.Name); ComponentsList.Items.AddObject(C.Name, StrList); except StrList.Free; raise; end; finally List.Free; end; end; if StoredProps <> nil then begin for I := 0 to StoredProps.Count - 1 do begin if ParseStoredItem(StoredProps[I], CompName, PropName) then CheckAddItem(CompName, PropName); end; ListToIndex(StoredList, 0); end; end else StoredList.Items.Clear; UpdateCurrent; end; procedure TFormPropsDlg.SetStoredList(AList: TStrings); begin BuildLists(AList); if ComponentsList.Items.Count > 0 then ComponentsList.ItemIndex := 0; CheckButtons; end; procedure TFormPropsDlg.CheckButtons; var Enable: Boolean; begin AddButton.Enabled := (ComponentsList.ItemIndex >= 0) and (PropertiesList.ItemIndex >= 0); Enable := (StoredList.Items.Count > 0) and (StoredList.ItemIndex >= 0); DeleteButton.Enabled := Enable; ClearButton.Enabled := Enable; UpBtn.Enabled := Enable and (StoredList.ItemIndex > 0); DownBtn.Enabled := Enable and (StoredList.ItemIndex < StoredList.Items.Count - 1); end; procedure TFormPropsDlg.AddButtonClick(Sender: TObject); var I: Integer; begin if PropertiesList.SelCount > 0 then begin for I := PropertiesList.Items.Count - 1 downto 0 do begin if PropertiesList.Selected[I] then AddItem(ComponentsList.ItemIndex, I, False); end; UpdateCurrent; end else AddItem(ComponentsList.ItemIndex, PropertiesList.ItemIndex, True); CheckButtons; end; procedure TFormPropsDlg.ClearButtonClick(Sender: TObject); begin if StoredList.Items.Count > 0 then begin SetStoredList(nil); if FDesigner <> nil then FDesigner.Modified; end; end; procedure TFormPropsDlg.DeleteButtonClick(Sender: TObject); begin DeleteProp(StoredList.ItemIndex); end; procedure TFormPropsDlg.ListClick(Sender: TObject); begin if Sender = ComponentsList then UpdateCurrent else CheckButtons; end; procedure TFormPropsDlg.FormDestroy(Sender: TObject); begin ClearLists; end; procedure TFormPropsDlg.StoredListClick(Sender: TObject); begin CheckButtons; end; procedure TFormPropsDlg.UpBtnClick(Sender: TObject); begin BoxMoveFocusedItem(StoredList, StoredList.ItemIndex - 1); if FDesigner <> nil then FDesigner.Modified; CheckButtons; end; procedure TFormPropsDlg.DownBtnClick(Sender: TObject); begin BoxMoveFocusedItem(StoredList, StoredList.ItemIndex + 1); if FDesigner <> nil then FDesigner.Modified; CheckButtons; end; procedure TFormPropsDlg.StoredListDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin BoxDragOver(StoredList, Source, X, Y, State, Accept, StoredList.Sorted); CheckButtons; end; procedure TFormPropsDlg.StoredListDragDrop(Sender, Source: TObject; X, Y: Integer); begin BoxMoveFocusedItem(StoredList, StoredList.ItemAtPos(Point(X, Y), True)); if FDesigner <> nil then FDesigner.Modified; CheckButtons; end; procedure TFormPropsDlg.PropertiesListDblClick(Sender: TObject); begin if AddButton.Enabled then AddButtonClick(nil); end; end.
28.284211
99
0.679122
830f63e2804181605364eacc8c086e64507adbeb
4,560
pas
Pascal
Source/View/Dialogs/eTasks.View.Dialogs.EditarFoto.pas
rafael-figueiredo-alves/eTasks
04c0d8877e341f9f5c61963259193e90d78aa7ca
[ "MIT" ]
15
2020-09-07T02:15:55.000Z
2022-03-22T16:36:41.000Z
Source/View/Dialogs/eTasks.View.Dialogs.EditarFoto.pas
No1Special/eTasks
7002a90716db05b1f907f09e1a1fe5cc1f0b11cf
[ "MIT" ]
3
2020-09-19T02:21:59.000Z
2021-05-31T01:20:06.000Z
Source/View/Dialogs/eTasks.View.Dialogs.EditarFoto.pas
No1Special/eTasks
7002a90716db05b1f907f09e1a1fe5cc1f0b11cf
[ "MIT" ]
6
2020-09-21T08:58:54.000Z
2022-01-26T00:47:01.000Z
unit eTasks.View.Dialogs.EditarFoto; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, FMX.Layouts, FMX.Controls.Presentation, FMX.StdCtrls; type TForm_Editar_foto = class(TForm) BarraInferior: TLayout; Btn_Girar_esquerda: TImage; Btn_Cancelar: TImage; Btn_aceitar: TImage; Btn_girar_direita: TImage; Editar_foto: TImage; Layout_visualiza: TLayout; Visualiza_circle: TCircle; Label_visualiza: TLabel; Corte_foto: TSelection; SombraInferior: TRectangle; SombraSuperior: TRectangle; SombraEsquerda: TRectangle; SombraDireita: TRectangle; procedure Btn_Girar_esquerdaClick(Sender: TObject); procedure Btn_girar_direitaClick(Sender: TObject); procedure Btn_CancelarClick(Sender: TObject); procedure Btn_aceitarClick(Sender: TObject); procedure FormShow(Sender: TObject); procedure Corte_fotoChange(Sender: TObject); procedure Corte_fotoResize(Sender: TObject); procedure Corte_fotoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } Procedure Captura; Procedure SombraAjuste; public { Public declarations } Foto : TBitmap; end; var Form_Editar_foto: TForm_Editar_foto; implementation {$R *.fmx} {$IfDEF Android} Uses eTasks.libraries.Android; {$endif} procedure TForm_Editar_foto.Btn_aceitarClick(Sender: TObject); begin Foto := Visualiza_circle.Fill.Bitmap.Bitmap; ModalResult := mrOk; end; procedure TForm_Editar_foto.Btn_CancelarClick(Sender: TObject); begin ModalResult := mrCancel; end; procedure TForm_Editar_foto.Btn_girar_direitaClick(Sender: TObject); begin Editar_foto.Bitmap.Rotate(90); Captura; end; procedure TForm_Editar_foto.Btn_Girar_esquerdaClick(Sender: TObject); begin Editar_foto.Bitmap.Rotate(-90); Captura; end; procedure TForm_Editar_foto.Captura; Var bmp : TBitmap; xScale, yScale : Extended; Corte : TRect; begin bmp := TBitmap.Create; xScale := Editar_foto.Bitmap.Width / Editar_foto.Width; yScale := Editar_foto.Bitmap.Height / Editar_foto.Height; try bmp.Width := Round(Corte_foto.Width * xScale); bmp.Height := Round(Corte_foto.Height * yScale); Corte.Left := Round(Corte_foto.Position.X * xScale); Corte.Top := Round(Corte_foto.Position.y * yScale); Corte.Width := Round(Corte_foto.Width * xScale); Corte.Height := Round(Corte_foto.Height * yScale); bmp.CopyFromBitmap(Editar_foto.Bitmap, Corte, 0, 0); Visualiza_circle.Fill.Bitmap.Bitmap := bmp; finally bmp.DisposeOf; end; end; procedure TForm_Editar_foto.Corte_fotoChange(Sender: TObject); begin Captura; SombraAjuste; end; procedure TForm_Editar_foto.Corte_fotoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); begin SombraAjuste; end; procedure TForm_Editar_foto.Corte_fotoResize(Sender: TObject); begin SombraAjuste; end; procedure TForm_Editar_foto.FormClose(Sender: TObject; var Action: TCloseAction); begin {$ifdef ANDROID} Action := TCloseAction.caFree; {$endif} end; procedure TForm_Editar_foto.FormCreate(Sender: TObject); begin {$Ifdef Android} tlibraryAndroid.TransparentNavBar; {$endif} end; procedure TForm_Editar_foto.FormShow(Sender: TObject); begin Captura; SombraAjuste; end; procedure TForm_Editar_foto.SombraAjuste; begin //Sombra superior SombraSuperior.Width := Editar_foto.Width; SombraSuperior.Position.X := 0; SombraSuperior.Position.Y := 0; SombraSuperior.Height := Corte_foto.Position.Y; //Sombra Inferior SombraInferior.Width := Editar_foto.Width; SombraInferior.Position.X := 0; SombraInferior.Position.Y := Corte_foto.Position.Y + Corte_foto.Height; SombraInferior.Height := Editar_foto.Height - SombraInferior.Position.y; //Sombra esquerda SombraEsquerda.Width := Corte_foto.Position.X; SombraEsquerda.Position.X := 0; SombraEsquerda.Position.Y := SombraSuperior.Height; SombraEsquerda.Height := Corte_foto.Height; //Sombra direita SombraDireita.Width := Editar_foto.Width - (Corte_foto.Position.x + Corte_foto.Width); SombraDireita.Position.X := Corte_foto.Position.x + Corte_foto.Width; SombraDireita.Position.Y := SombraSuperior.Height; SombraDireita.Height := Corte_foto.Height; end; end.
26.823529
94
0.740351
83e5821d06c6e49f443aad5fc8b46c3a636c008d
4,848
pas
Pascal
Source/Services/SimpleNotificationService/Base/Transform/AWS.SNS.Transform.SetPlatformApplicationAttributesResponseUnmarshaller.pas
herux/aws-sdk-delphi
4ef36e5bfc536b1d9426f78095d8fda887f390b5
[ "Apache-2.0" ]
67
2021-07-28T23:47:09.000Z
2022-03-15T11:48:35.000Z
Source/Services/SimpleNotificationService/Base/Transform/AWS.SNS.Transform.SetPlatformApplicationAttributesResponseUnmarshaller.pas
gabrielbaltazar/aws-sdk-delphi
ea1713b227a49cbbc5a2e1bf04cbf2de1f9b611a
[ "Apache-2.0" ]
5
2021-09-01T09:31:16.000Z
2022-03-16T18:19:21.000Z
Source/Services/SimpleNotificationService/Base/Transform/AWS.SNS.Transform.SetPlatformApplicationAttributesResponseUnmarshaller.pas
gabrielbaltazar/aws-sdk-delphi
ea1713b227a49cbbc5a2e1bf04cbf2de1f9b611a
[ "Apache-2.0" ]
13
2021-07-29T02:41:16.000Z
2022-03-16T10:22:38.000Z
unit AWS.SNS.Transform.SetPlatformApplicationAttributesResponseUnmarshaller; interface uses AWS.Runtime.Model, AWS.SNS.Model.SetPlatformApplicationAttributesResponse, AWS.Transform.ResponseUnmarshaller, AWS.Transform.UnmarshallerContext, AWS.Transform.SimpleTypeUnmarshaller, AWS.Runtime.Exceptions, System.SysUtils, AWS.Internal.ErrorResponse, AWS.Transform.ErrorResponseUnmarshaller, System.Classes, AWS.SNS.Transform.AuthorizationErrorExceptionUnmarshaller, AWS.SNS.Transform.InternalErrorExceptionUnmarshaller, AWS.SNS.Transform.InvalidParameterExceptionUnmarshaller, AWS.SNS.Transform.NotFoundExceptionUnmarshaller, AWS.SNS.Exception; type ISetPlatformApplicationAttributesResponseUnmarshaller = IResponseUnmarshaller; TSetPlatformApplicationAttributesResponseUnmarshaller = class(TXmlResponseUnmarshaller, ISetPlatformApplicationAttributesResponseUnmarshaller) strict private class var FInstance: ISetPlatformApplicationAttributesResponseUnmarshaller; class procedure UnmarshallResult(AContext: TXmlUnmarshallerContext; AResponse: TSetPlatformApplicationAttributesResponse); static; class constructor Create; public function Unmarshall(AContext: TXmlUnmarshallerContext): TAmazonWebServiceResponse; overload; override; function UnmarshallException(AContext: TXmlUnmarshallerContext; AInnerException: Exception; AStatusCode: Integer): EAmazonServiceException; override; class function Instance: ISetPlatformApplicationAttributesResponseUnmarshaller; static; end; implementation { TSetPlatformApplicationAttributesResponseUnmarshaller } function TSetPlatformApplicationAttributesResponseUnmarshaller.Unmarshall(AContext: TXmlUnmarshallerContext): TAmazonWebServiceResponse; var Response: TSetPlatformApplicationAttributesResponse; TargetDepth: Integer; begin Response := TSetPlatformApplicationAttributesResponse.Create; try AContext.Read; TargetDepth := AContext.CurrentDepth; while AContext.ReadAtDepth(TargetDepth) do if AContext.IsStartElement then begin if AContext.TestExpression('SetPlatformApplicationAttributesResult', 2) then begin UnmarshallResult(AContext, Response); Continue; end; if AContext.TestExpression('ResponseMetadata', 2) then Response.ResponseMetadata := TResponseMetadataUnmarshaller.Instance.Unmarshall(AContext); end; Result := Response; Response := nil; finally Response.Free; end; end; class procedure TSetPlatformApplicationAttributesResponseUnmarshaller.UnmarshallResult(AContext: TXmlUnmarshallerContext; AResponse: TSetPlatformApplicationAttributesResponse); var OriginalDepth: Integer; begin OriginalDepth := AContext.CurrentDepth; while AContext.ReadAtDepth(OriginalDepth) do if AContext.IsStartElement or AContext.IsAttribute then begin end; end; function TSetPlatformApplicationAttributesResponseUnmarshaller.UnmarshallException(AContext: TXmlUnmarshallerContext; AInnerException: Exception; AStatusCode: Integer): EAmazonServiceException; var ErrorResponse: TErrorResponse; StreamCopy: TStream; ContextCopy: TXmlUnmarshallerContext; begin ErrorResponse := TErrorResponseUnmarshaller.Instance.Unmarshall(AContext); try ErrorResponse.InnerException := AInnerException; ErrorResponse.StatusCode := AStatusCode; StreamCopy := TBytesStream.Create(AContext.GetResponseBodyBytes); try ContextCopy := TXmlUnmarshallerContext.Create(StreamCopy, False, nil); try if ErrorResponse.Code = 'AuthorizationError' then Exit(TAuthorizationErrorExceptionUnmarshaller.Instance.Unmarshall(ContextCopy, ErrorResponse)); if ErrorResponse.Code = 'InternalError' then Exit(TInternalErrorExceptionUnmarshaller.Instance.Unmarshall(ContextCopy, ErrorResponse)); if ErrorResponse.Code = 'InvalidParameter' then Exit(TInvalidParameterExceptionUnmarshaller.Instance.Unmarshall(ContextCopy, ErrorResponse)); if ErrorResponse.Code = 'NotFound' then Exit(TNotFoundExceptionUnmarshaller.Instance.Unmarshall(ContextCopy, ErrorResponse)); finally ContextCopy.Free; end; finally StreamCopy.Free; end; Exit(EAmazonSimpleNotificationServiceException.Create(ErrorResponse.Message, AInnerException, ErrorResponse.ErrorType, ErrorResponse.Code, ErrorResponse.RequestId, AStatusCode)); finally ErrorResponse.Free; end; end; class constructor TSetPlatformApplicationAttributesResponseUnmarshaller.Create; begin FInstance := TSetPlatformApplicationAttributesResponseUnmarshaller.Create; end; class function TSetPlatformApplicationAttributesResponseUnmarshaller.Instance: ISetPlatformApplicationAttributesResponseUnmarshaller; begin Result := FInstance; end; end.
39.414634
193
0.806724
830acd37c7cadd42e7b9798eb9b555a1933064a8
3,697
pas
Pascal
3rdparty/Indy10/Lib/Core/IdSchedulerOfThreadDefault.pas
RazZziel/soldat
1eae85d007f5e52f34a32c474e5a277a021292f1
[ "MIT" ]
2
2020-05-26T16:44:23.000Z
2020-10-08T16:58:11.000Z
3rdparty/Indy10/Lib/Core/IdSchedulerOfThreadDefault.pas
xyproto/soldat
2280296ac56883f6a9cad4da48025af8ae7782e7
[ "MIT" ]
null
null
null
3rdparty/Indy10/Lib/Core/IdSchedulerOfThreadDefault.pas
xyproto/soldat
2280296ac56883f6a9cad4da48025af8ae7782e7
[ "MIT" ]
2
2021-01-11T17:49:23.000Z
2021-01-19T19:57:21.000Z
{ $Project$ $Workfile$ $Revision$ $DateUTC$ $Id$ This file is part of the Indy (Internet Direct) project, and is offered under the dual-licensing agreement described on the Indy website. (http://www.indyproject.org/) Copyright: (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved. } { $Log$ } { Rev 1.12 2004.02.03 4:17:06 PM czhower For unit name changes. Rev 1.11 2003.10.24 12:59:20 PM czhower Name change Rev 1.10 2003.10.21 12:19:00 AM czhower TIdTask support and fiber bug fixes. Rev 1.9 2003.10.11 5:49:40 PM czhower -VCL fixes for servers -Chain suport for servers (Super core) -Scheduler upgrades -Full yarn support Rev 1.8 2003.09.19 10:11:18 PM czhower Next stage of fiber support in servers. Rev 1.7 2003.09.19 11:54:30 AM czhower -Completed more features necessary for servers -Fixed some bugs Rev 1.6 2003.09.18 4:10:26 PM czhower Preliminary changes for Yarn support. Rev 1.5 7/6/2003 8:04:06 PM BGooijen Renamed IdScheduler* to IdSchedulerOf* Rev 1.4 7/5/2003 11:49:06 PM BGooijen Cleaned up and fixed av in threadpool Rev 1.3 2003.06.25 4:26:40 PM czhower Removed unecessary code in RemoveThread Rev 1.2 3/13/2003 10:18:32 AM BGooijen Server side fibers, bug fixes Rev 1.1 1/23/2003 11:06:02 AM BGooijen Rev 1.0 1/17/2003 03:29:54 PM JPMugaas Renamed from ThreadMgr for new design. Rev 1.0 11/13/2002 09:01:40 AM JPMugaas } unit IdSchedulerOfThreadDefault; interface {$i IdCompilerDefines.inc} uses IdThread, IdSchedulerOfThread, IdScheduler, IdYarn, IdContext; type TIdSchedulerOfThreadDefault = class(TIdSchedulerOfThread) public function AcquireYarn: TIdYarn; override; procedure ReleaseYarn(AYarn: TIdYarn); override; function NewThread: TIdThreadWithTask; override; end; implementation uses {$IFDEF USE_VCL_POSIX} {$ENDIF} IdGlobal; { TIdSchedulerOfThreadDefault } function TIdSchedulerOfThreadDefault.AcquireYarn: TIdYarn; begin Result := NewYarn(NewThread); ActiveYarns.Add(Result); end; type TIdYarnOfThreadAccess = class(TIdYarnOfThread) end; procedure TIdSchedulerOfThreadDefault.ReleaseYarn(AYarn: TIdYarn); //only gets called from YarnOf(Fiber/Thread).Destroy var LThread: TIdThreadWithTask; begin //take posession of the thread LThread := TIdYarnOfThread(AYarn).Thread; TIdYarnOfThreadAccess(AYarn).FThread := nil; //Currently LThread can =nil. Is that a valid condition? //Assert(LThread<>nil); // inherited removes from ActiveYarns list inherited ReleaseYarn(AYarn); if LThread <> nil then begin // need to destroy the thread LThread.Yarn := nil; // Yarn is being destroyed, de-couple it from the thread LThread.Terminate; // RLebeau - ReleaseYarn() can be called in the context of // the yarn's thread (when TIdThread.Cleanup() destroys the // yarn between connnections), so have to check which context // we're in here so as not to deadlock the thread! if IsCurrentThread(LThread) then begin LThread.FreeOnTerminate := True; end else begin {$IFDEF DEPRECATED_TThread_SuspendResume} LThread.Suspended := False; {$ELSE} LThread.Resume; {$ENDIF} LThread.WaitFor; LThread.Free; end; end; end; function TIdSchedulerOfThreadDefault.NewThread: TIdThreadWithTask; begin Result := inherited NewThread; // RLebeau 2/25/2010: do not let the thread free itself on termination yet. // It can cause crashes during Yarn shutdown, so let the Scheduler decide // what to do with the thread later... //Result.FreeOnTerminate := True; end; end.
25.321918
81
0.712199
830a60c0b863f6c3fe7d7e2d142394c29142f1db
3,116
pas
Pascal
Components/JVCL/examples/JvTMTimeLine/frmMemoEdit.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/examples/JvTMTimeLine/frmMemoEdit.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/examples/JvTMTimeLine/frmMemoEdit.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
1
2019-12-24T08:39:18.000Z
2019-12-24T08:39:18.000Z
{****************************************************************** JEDI-VCL Demo Copyright (C) 2002 Project JEDI Original author: Contributor(s): You may retrieve the latest version of this file at the JEDI-JVCL home page, located at http://jvcl.sourceforge.net The contents of this file are used with permission, subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1_1Final.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ******************************************************************} unit frmMemoEdit; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, Menus; type TMemoEditFrm = class(TForm) Panel1: TPanel; btnOK: TButton; btnCancel: TButton; reLines: TRichEdit; popMemo: TPopupMenu; Load1: TMenuItem; Save1: TMenuItem; N1: TMenuItem; Cut1: TMenuItem; Copy1: TMenuItem; Paste1: TMenuItem; Selectall1: TMenuItem; N2: TMenuItem; procedure Load1Click(Sender: TObject); procedure Save1Click(Sender: TObject); procedure Cut1Click(Sender: TObject); procedure Copy1Click(Sender: TObject); procedure Paste1Click(Sender: TObject); procedure Selectall1Click(Sender: TObject); procedure reLinesKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); public class function Edit(Lines: TStrings;ADate:TDateTime;Icon:TIcon = nil): boolean; end; implementation {$R *.DFM} { TMemoEditFrm } class function TMemoEditFrm.Edit(Lines: TStrings;ADate:TDateTime;Icon:TIcon = nil): boolean; var f:TMemoEditFrm; begin f := self.Create(nil); try f.Icon := Icon; f.Caption := Format(f.Caption,[DateToStr(ADate)]); f.reLines.Lines := Lines; Result := f.ShowModal = MROK; if Result then Lines.Assign(f.ReLines.Lines); finally f.Free; end; end; procedure TMemoEditFrm.Load1Click(Sender: TObject); begin with TOpenDialog.Create(nil) do try if Execute then reLines.Lines.LoadFromFile(Filename); finally Free; end; end; procedure TMemoEditFrm.Save1Click(Sender: TObject); begin with TSaveDialog.Create(nil) do try if Execute then reLines.Lines.SaveToFile(Filename); finally Free; end; end; procedure TMemoEditFrm.Cut1Click(Sender: TObject); begin reLines.CutToClipboard; end; procedure TMemoEditFrm.Copy1Click(Sender: TObject); begin reLines.CopyToClipboard; end; procedure TMemoEditFrm.Paste1Click(Sender: TObject); begin reLines.PasteFromClipboard; end; procedure TMemoEditFrm.Selectall1Click(Sender: TObject); begin reLines.SelectAll; end; procedure TMemoEditFrm.reLinesKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_ESCAPE then Close; end; end.
23.081481
92
0.694801
8314e3c212423c16552f26cdd03d27c06fb2d628
2,805
pas
Pascal
tests/altium_crap/Scripts/Delphiscript Scripts/PCB/PCB Iterators/IterateComponentBodies.pas
hanun2999/Altium-Schematic-Parser
a9bd5b1a865f92f2e3f749433fb29107af528498
[ "MIT" ]
1
2020-06-08T11:17:46.000Z
2020-06-08T11:17:46.000Z
tests/altium_crap/Scripts/Delphiscript Scripts/PCB/PCB Iterators/IterateComponentBodies.pas
hanun2999/Altium-Schematic-Parser
a9bd5b1a865f92f2e3f749433fb29107af528498
[ "MIT" ]
null
null
null
tests/altium_crap/Scripts/Delphiscript Scripts/PCB/PCB Iterators/IterateComponentBodies.pas
hanun2999/Altium-Schematic-Parser
a9bd5b1a865f92f2e3f749433fb29107af528498
[ "MIT" ]
null
null
null
{..............................................................................} { Summary Iterates Component Bodies from the current PCB document. } { } { Copyright (c) 2006 by Altium Limited } {..............................................................................} {..............................................................................} Function GetRegionKindString(RegionK : TRegionKind) : String; Begin Result := ''; If RegionK = eRegionKind_Copper Then Result := 'Copper'; If RegionK = eRegionKind_Cutout Then Result := 'Cutout'; If RegionK = eRegionKind_NamedRegion Then Result := 'Named Region'; End; {..............................................................................} {..............................................................................} Procedure IterateComponentBodies; Var Board : IPCB_Board; CmpBody : IPCB_ComponentBody; Iterator : IPCB_BoardIterator; Rpt : TStringList; FileName : TPCBString; Document : IServerDocument; Count : Integer; I : Integer; J : Integer; Begin // Retrieve the current board Board := PCBServer.GetCurrentPCBBoard; If Board = Nil Then Exit; // Create the iterator that will look for Component Body objects only Iterator := Board.BoardIterator_Create; Iterator.AddFilter_ObjectSet(MkSet(eComponentBodyObject)); Iterator.AddFilter_IPCB_LayerSet(LayerSet.AllLayers); Iterator.AddFilter_Method(eProcessAll); // Search for component body objects and get their Name, Kind, Area and OverallHeight values Count := 0; Rpt := TStringList.Create; CmpBody := Iterator.FirstPCBObject; While (CmpBody <> Nil) Do Begin Inc(Count); Rpt.Add('Component Body No : ' + IntToStr(Count)); Rpt.Add('==================='); Rpt.Add(' Component Body Name : ' + CmpBody.Name); Rpt.Add(' Region Kind : ' + GetRegionKindString(CmpBody.Kind)); Rpt.Add(' Overall Height: ' + IntToStr(CmpBody.GetOverallHeight)); Rpt.Add(''); CmpBody := Iterator.NextPCBObject; End; Board.BoardIterator_Destroy(Iterator); // Display the Component Bodies report FileName := ChangeFileExt(Board.FileName,'.bod'); Rpt.SaveToFile(Filename); Rpt.Free; Document := Client.OpenDocument('Text', FileName); If Document <> Nil Then Client.ShowDocument(Document); End; {..............................................................................} {..............................................................................}
38.958333
96
0.482353
83f83c3b273b06efc3873ac09bc7d40f8076a8aa
20,978
pas
Pascal
src-RDP_CnC/MainUnit.pas
sashaqwert/rdpwrap
f16223df5da9d355cf5bc8a3e615dc3205dfcf79
[ "Apache-2.0" ]
150
2020-05-15T04:05:32.000Z
2022-03-31T13:03:54.000Z
src-RDP_CnC/MainUnit.pas
Chengpy22/rdpwrap
22e1a9fd4bc06e2f130765210650aacea278017b
[ "Apache-2.0" ]
5
2020-05-22T23:35:45.000Z
2022-03-05T07:53:08.000Z
src-RDP_CnC/MainUnit.pas
Chengpy22/rdpwrap
22e1a9fd4bc06e2f130765210650aacea278017b
[ "Apache-2.0" ]
31
2020-05-14T04:18:37.000Z
2022-03-29T20:10:25.000Z
{ Copyright 2017 Stas'M Corp. Copyright 2021 sebaxakerhtc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. } unit MainUnit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Spin, ExtCtrls, WinSvc, Registry, ShellAPI; type TMainForm = class(TForm) bOK: TButton; bCancel: TButton; bApply: TButton; cbSingleSessionPerUser: TCheckBox; rgNLA: TRadioGroup; cbAllowTSConnections: TCheckBox; rgShadow: TRadioGroup; seRDPPort: TSpinEdit; lRDPPort: TLabel; lService: TLabel; lListener: TLabel; lWrapper: TLabel; lsListener: TLabel; lsService: TLabel; lsWrapper: TLabel; Timer: TTimer; lTSVer: TLabel; lsTSVer: TLabel; lWrapVer: TLabel; lsWrapVer: TLabel; bLicense: TButton; gbDiag: TGroupBox; lsSuppVer: TLabel; cbHideUsers: TCheckBox; gbGeneral: TGroupBox; cbCustomPrg: TCheckBox; gbLocalRDPChecker: TGroupBox; bmstsc: TButton; b800x600: TButton; b1024x768: TButton; b1366x768: TButton; b1920x1080: TButton; procedure FormCreate(Sender: TObject); procedure cbAllowTSConnectionsClick(Sender: TObject); procedure seRDPPortChange(Sender: TObject); procedure bApplyClick(Sender: TObject); procedure bCancelClick(Sender: TObject); procedure bOKClick(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure bLicenseClick(Sender: TObject); procedure TimerTimer(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure bmstscClick(Sender: TObject); procedure b800x600Click(Sender: TObject); procedure b1024x768Click(Sender: TObject); procedure b1366x768Click(Sender: TObject); procedure b1920x1080Click(Sender: TObject); private { Private declarations } public { Public declarations } function ExecWait(Cmdline: String): Boolean; procedure ReadSettings; procedure WriteSettings; end; FILE_VERSION = record Version: record case Boolean of True: (dw: DWORD); False: (w: record Minor, Major: Word; end;) end; Release, Build: Word; bDebug, bPrerelease, bPrivate, bSpecial: Boolean; end; WTS_SESSION_INFOW = record SessionId: DWORD; Name: packed array [0..33] of WideChar; State: DWORD; end; WTS_SESSION = Array[0..0] of WTS_SESSION_INFOW; PWTS_SESSION_INFOW = ^WTS_SESSION; const winstadll = 'winsta.dll'; var MainForm: TMainForm; Ready: Boolean = False; Arch: Byte; OldWow64RedirectionValue: LongBool; OldPort: Word; INI: String; function WinStationEnumerateW(hServer: THandle; var ppSessionInfo: PWTS_SESSION_INFOW; var pCount: DWORD): BOOL; stdcall; external winstadll name 'WinStationEnumerateW'; function WinStationFreeMemory(P: Pointer): BOOL; stdcall; external winstadll; implementation {$R *.dfm} {$R resource.res} uses LicenseUnit; function ExpandPath(Path: String): String; var Str: Array[0..511] of Char; begin Result := ''; FillChar(Str, 512, 0); if Arch = 64 then Path := StringReplace(Path, '%ProgramFiles%', '%ProgramW6432%', [rfReplaceAll, rfIgnoreCase]); if ExpandEnvironmentStrings(PWideChar(Path), Str, 512) > 0 then Result := Str; end; function DisableWowRedirection: Boolean; type TFunc = function(var Wow64FsEnableRedirection: LongBool): LongBool; stdcall; var hModule: THandle; Wow64DisableWow64FsRedirection: TFunc; begin Result := False; hModule := GetModuleHandle(kernel32); if hModule <> 0 then Wow64DisableWow64FsRedirection := GetProcAddress(hModule, 'Wow64DisableWow64FsRedirection') else Exit; if @Wow64DisableWow64FsRedirection <> nil then Result := Wow64DisableWow64FsRedirection(OldWow64RedirectionValue); end; function RevertWowRedirection: Boolean; type TFunc = function(var Wow64RevertWow64FsRedirection: LongBool): LongBool; stdcall; var hModule: THandle; Wow64RevertWow64FsRedirection: TFunc; begin Result := False; hModule := GetModuleHandle(kernel32); if hModule <> 0 then Wow64RevertWow64FsRedirection := GetProcAddress(hModule, 'Wow64RevertWow64FsRedirection') else Exit; if @Wow64RevertWow64FsRedirection <> nil then Result := Wow64RevertWow64FsRedirection(OldWow64RedirectionValue); end; function GetFileVersion(const FileName: TFileName; var FileVersion: FILE_VERSION): Boolean; type VS_VERSIONINFO = record wLength, wValueLength, wType: Word; szKey: Array[1..16] of WideChar; Padding1: Word; Value: VS_FIXEDFILEINFO; Padding2, Children: Word; end; PVS_VERSIONINFO = ^VS_VERSIONINFO; const VFF_DEBUG = 1; VFF_PRERELEASE = 2; VFF_PRIVATE = 8; VFF_SPECIAL = 32; var hFile: HMODULE; hResourceInfo: HRSRC; VersionInfo: PVS_VERSIONINFO; begin Result := False; hFile := LoadLibraryEx(PWideChar(FileName), 0, LOAD_LIBRARY_AS_DATAFILE); if hFile = 0 then Exit; hResourceInfo := FindResource(hFile, PWideChar(1), PWideChar($10)); if hResourceInfo = 0 then Exit; VersionInfo := Pointer(LoadResource(hFile, hResourceInfo)); if VersionInfo = nil then Exit; FileVersion.Version.dw := VersionInfo.Value.dwFileVersionMS; FileVersion.Release := Word(VersionInfo.Value.dwFileVersionLS shr 16); FileVersion.Build := Word(VersionInfo.Value.dwFileVersionLS); FileVersion.bDebug := (VersionInfo.Value.dwFileFlags and VFF_DEBUG) = VFF_DEBUG; FileVersion.bPrerelease := (VersionInfo.Value.dwFileFlags and VFF_PRERELEASE) = VFF_PRERELEASE; FileVersion.bPrivate := (VersionInfo.Value.dwFileFlags and VFF_PRIVATE) = VFF_PRIVATE; FileVersion.bSpecial := (VersionInfo.Value.dwFileFlags and VFF_SPECIAL) = VFF_SPECIAL; FreeLibrary(hFile); Result := True; end; function IsWrapperInstalled(var WrapperPath: String): ShortInt; var TermServiceHost, TermServicePath: String; Reg: TRegistry; begin Result := -1; WrapperPath := ''; Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; if not Reg.OpenKeyReadOnly('\SYSTEM\CurrentControlSet\Services\TermService') then begin Reg.Free; Exit; end; TermServiceHost := Reg.ReadString('ImagePath'); Reg.CloseKey; if Pos('svchost.exe', LowerCase(TermServiceHost)) = 0 then begin Result := 2; Reg.Free; Exit; end; if not Reg.OpenKeyReadOnly('\SYSTEM\CurrentControlSet\Services\TermService\Parameters') then begin Reg.Free; Exit; end; TermServicePath := Reg.ReadString('ServiceDll'); Reg.CloseKey; Reg.Free; if (Pos('termsrv.dll', LowerCase(TermServicePath)) = 0) and (Pos('rdpwrap.dll', LowerCase(TermServicePath)) = 0) then begin Result := 2; Exit; end; if Pos('rdpwrap.dll', LowerCase(TermServicePath)) > 0 then begin WrapperPath := TermServicePath; Result := 1; end else Result := 0; end; function GetTermSrvState: ShortInt; type SERVICE_STATUS_PROCESS = record dwServiceType, dwCurrentState, dwControlsAccepted, dwWin32ExitCode, dwServiceSpecificExitCode, dwCheckPoint, dwWaitHint, dwProcessId, dwServiceFlags: DWORD; end; PSERVICE_STATUS_PROCESS = ^SERVICE_STATUS_PROCESS; const SvcName = 'TermService'; var hSC: SC_HANDLE; hSvc: THandle; lpServiceStatusProcess: PSERVICE_STATUS_PROCESS; Buf: Pointer; cbBufSize, pcbBytesNeeded: Cardinal; begin Result := -1; hSC := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT); if hSC = 0 then Exit; hSvc := OpenService(hSC, PWideChar(SvcName), SERVICE_QUERY_STATUS); if hSvc = 0 then begin CloseServiceHandle(hSC); Exit; end; if QueryServiceStatusEx(hSvc, SC_STATUS_PROCESS_INFO, nil, 0, pcbBytesNeeded) then Exit; cbBufSize := pcbBytesNeeded; GetMem(Buf, cbBufSize); if not QueryServiceStatusEx(hSvc, SC_STATUS_PROCESS_INFO, Buf, cbBufSize, pcbBytesNeeded) then begin FreeMem(Buf, cbBufSize); CloseServiceHandle(hSvc); CloseServiceHandle(hSC); Exit; end else begin lpServiceStatusProcess := Buf; Result := ShortInt(lpServiceStatusProcess^.dwCurrentState); end; FreeMem(Buf, cbBufSize); CloseServiceHandle(hSvc); CloseServiceHandle(hSC); end; function IsListenerWorking: Boolean; var pCount: DWORD; SessionInfo: PWTS_SESSION_INFOW; I: Integer; begin Result := False; if not WinStationEnumerateW(0, SessionInfo, pCount) then Exit; for I := 0 to pCount - 1 do if SessionInfo^[I].Name = 'RDP-Tcp' then begin Result := True; Break; end; WinStationFreeMemory(SessionInfo); end; function ExtractResText(ResName: String): String; var ResStream: TResourceStream; Str: TStringList; begin ResStream := TResourceStream.Create(HInstance, ResName, RT_RCDATA); Str := TStringList.Create; try Str.LoadFromStream(ResStream); except end; ResStream.Free; Result := Str.Text; Str.Free; end; function TMainForm.ExecWait(Cmdline: String): Boolean; var si: STARTUPINFO; pi: PROCESS_INFORMATION; begin Result := False; ZeroMemory(@si, sizeof(si)); si.cb := sizeof(si); si.dwFlags := STARTF_USESHOWWINDOW; si.wShowWindow := SW_HIDE; UniqueString(Cmdline); if not CreateProcess(nil, PWideChar(Cmdline), nil, nil, True, 0, nil, nil, si, pi) then begin MessageBox(Handle, PWideChar('CreateProcess error (code: ' + IntToStr(GetLastError) + ').'), 'Error', MB_ICONERROR or MB_OK); Exit; end; CloseHandle(pi.hThread); WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hProcess); Result := True; end; procedure TMainForm.ReadSettings; var Reg: TRegistry; SecurityLayer, UserAuthentication: Integer; begin Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; Reg.OpenKeyReadOnly('\SYSTEM\CurrentControlSet\Control\Terminal Server'); try cbAllowTSConnections.Checked := not Reg.ReadBool('fDenyTSConnections'); except end; try cbSingleSessionPerUser.Checked := Reg.ReadBool('fSingleSessionPerUser'); except end; try cbCustomPrg.Checked := Reg.ReadBool('HonorLegacySettings'); except end; Reg.CloseKey; Reg.OpenKeyReadOnly('\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'); seRDPPort.Value := 3389; try seRDPPort.Value := Reg.ReadInteger('PortNumber'); except end; OldPort := seRDPPort.Value; SecurityLayer := 0; UserAuthentication := 0; try SecurityLayer := Reg.ReadInteger('SecurityLayer'); UserAuthentication := Reg.ReadInteger('UserAuthentication'); except end; if (SecurityLayer = 0) and (UserAuthentication = 0) then rgNLA.ItemIndex := 0; if (SecurityLayer = 1) and (UserAuthentication = 0) then rgNLA.ItemIndex := 1; if (SecurityLayer = 2) and (UserAuthentication = 1) then rgNLA.ItemIndex := 2; try rgShadow.ItemIndex := Reg.ReadInteger('Shadow'); except end; Reg.CloseKey; Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'); try cbHideUsers.Checked := Reg.ReadBool('dontdisplaylastusername'); except end; Reg.CloseKey; Reg.Free; end; procedure TMainForm.WriteSettings; var Reg: TRegistry; SecurityLayer, UserAuthentication: Integer; begin Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server', True); try Reg.WriteBool('fDenyTSConnections', not cbAllowTSConnections.Checked); except end; try Reg.WriteBool('fSingleSessionPerUser', cbSingleSessionPerUser.Checked); except end; try Reg.WriteBool('HonorLegacySettings', cbCustomPrg.Checked); except end; Reg.CloseKey; Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp', True); try Reg.WriteInteger('PortNumber', seRDPPort.Value); except end; if OldPort <> seRDPPort.Value then begin OldPort := seRDPPort.Value; ExecWait('netsh advfirewall firewall set rule name="Remote Desktop" new localport=' + IntToStr(OldPort)); end; case rgNLA.ItemIndex of 0: begin SecurityLayer := 0; UserAuthentication := 0; end; 1: begin SecurityLayer := 1; UserAuthentication := 0; end; 2: begin SecurityLayer := 2; UserAuthentication := 1; end; else begin SecurityLayer := -1; UserAuthentication := -1; end; end; if SecurityLayer >= 0 then begin try Reg.WriteInteger('SecurityLayer', SecurityLayer); Reg.WriteInteger('UserAuthentication', UserAuthentication); except end; end; if rgShadow.ItemIndex >= 0 then begin try Reg.WriteInteger('Shadow', rgShadow.ItemIndex); except end; end; Reg.CloseKey; Reg.OpenKey('\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services', True); if rgShadow.ItemIndex >= 0 then begin try Reg.WriteInteger('Shadow', rgShadow.ItemIndex); except end; end; Reg.CloseKey; Reg.OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System', True); try Reg.WriteBool('dontdisplaylastusername', cbHideUsers.Checked); except end; Reg.CloseKey; Reg.Free; end; function CheckSupport(FV: FILE_VERSION): Byte; var VerTxt: String; begin Result := 0; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 0) then Result := 1; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then Result := 1; VerTxt := Format('%d.%d.%d.%d', [FV.Version.w.Major, FV.Version.w.Minor, FV.Release, FV.Build]); if Pos('[' + VerTxt + ']', INI) > 0 then Result := 2; end; procedure TMainForm.TimerTimer(Sender: TObject); var WrapperPath, INIPath: String; FV: FILE_VERSION; L: TStringList; CheckSupp: Boolean; begin CheckSupp := False; case IsWrapperInstalled(WrapperPath) of -1: begin lsWrapper.Caption := 'Unknown'; lsWrapper.Font.Color := clGrayText; end; 0: begin lsWrapper.Caption := 'Not installed'; lsWrapper.Font.Color := clGrayText; end; 1: begin lsWrapper.Caption := 'Installed'; lsWrapper.StyleElements := lsWrapper.StyleElements - [seFont]; lsWrapper.Font.Color := clLime; CheckSupp := True; INIPath := ExtractFilePath(ExpandPath(WrapperPath)) + 'rdpwrap.ini'; if not FileExists(INIPath) then CheckSupp := False; end; 2: begin lsWrapper.Caption := '3rd-party'; lsWrapper.StyleElements := lsWrapper.StyleElements - [seFont]; lsWrapper.Font.Color := clRed; end; end; case GetTermSrvState of -1, 0: begin lsService.Caption := 'Unknown'; lsService.Font.Color := clGrayText; end; SERVICE_STOPPED: begin lsService.Caption := 'Stopped'; lsService.StyleElements := lsService.StyleElements - [seFont]; lsService.Font.Color := clRed; end; SERVICE_START_PENDING: begin lsService.Caption := 'Starting...'; lsService.Font.Color := clGrayText; end; SERVICE_STOP_PENDING: begin lsService.Caption := 'Stopping...'; lsService.Font.Color := clGrayText; end; SERVICE_RUNNING: begin lsService.Caption := 'Running'; lsService.StyleElements := lsService.StyleElements - [seFont]; lsService.Font.Color := clLime; end; SERVICE_CONTINUE_PENDING: begin lsService.Caption := 'Resuming...'; lsService.Font.Color := clGrayText; end; SERVICE_PAUSE_PENDING: begin lsService.Caption := 'Suspending...'; lsService.Font.Color := clGrayText; end; SERVICE_PAUSED: begin lsService.Caption := 'Suspended'; lsService.Font.Color := clWindowText; end; end; if IsListenerWorking then begin lsListener.Caption := 'Listening'; lsListener.StyleElements := lsListener.StyleElements - [seFont]; lsListener.Font.Color := clLime; end else begin lsListener.Caption := 'Not listening'; lsListener.StyleElements := lsListener.StyleElements - [seFont]; lsListener.Font.Color := clRed; end; if WrapperPath = '' then begin lsWrapVer.Caption := 'N/A'; lsWrapVer.Font.Color := clGrayText; end else if not GetFileVersion(ExpandPath(WrapperPath), FV) then begin lsWrapVer.Caption := 'N/A'; lsWrapVer.Font.Color := clGrayText; end else begin lsWrapVer.Caption := IntToStr(FV.Version.w.Major)+'.'+ IntToStr(FV.Version.w.Minor)+'.'+ IntToStr(FV.Release)+'.'+ IntToStr(FV.Build); lsWrapVer.Font.Color := clWindowText; end; if not GetFileVersion('termsrv.dll', FV) then begin lsTSVer.Caption := 'N/A'; lsTSVer.Font.Color := clGrayText; end else begin lsTSVer.Caption := IntToStr(FV.Version.w.Major)+'.'+ IntToStr(FV.Version.w.Minor)+'.'+ IntToStr(FV.Release)+'.'+ IntToStr(FV.Build); lsTSVer.Font.Color := clWindowText; lsSuppVer.Visible := CheckSupp; if CheckSupp then begin if INI = '' then begin L := TStringList.Create; try L.LoadFromFile(INIPath); except end; INI := L.Text; L.Free; end; case CheckSupport(FV) of 0: begin lsSuppVer.Caption := '[not supported]'; lsSuppVer.StyleElements := lsSuppVer.StyleElements - [seFont]; lsSuppVer.Font.Color := clRed; end; 1: begin lsSuppVer.Caption := '[supported partially]'; lsSuppVer.StyleElements := lsSuppVer.StyleElements - [seFont]; lsSuppVer.Font.Color := clOlive; end; 2: begin lsSuppVer.Caption := '[fully supported]'; lsSuppVer.StyleElements := lsSuppVer.StyleElements - [seFont]; lsSuppVer.Font.Color := clLime; end; end; end; end; end; procedure TMainForm.bLicenseClick(Sender: TObject); begin LicenseForm.mText.Text := ExtractResText('LICENSE'); if LicenseForm.ShowModal <> mrOk then Halt(0); end; procedure TMainForm.cbAllowTSConnectionsClick(Sender: TObject); begin if Ready then bApply.Enabled := True; end; procedure TMainForm.seRDPPortChange(Sender: TObject); begin if Ready then bApply.Enabled := True; end; procedure TMainForm.FormCreate(Sender: TObject); var SI: TSystemInfo; begin GetNativeSystemInfo(SI); case SI.wProcessorArchitecture of 0: Arch := 32; 6: Arch := 64; // Itanium-based x64 9: Arch := 64; // Intel/AMD x64 else Arch := 0; end; if Arch = 64 then DisableWowRedirection; ReadSettings; Ready := True; end; procedure TMainForm.FormDestroy(Sender: TObject); begin if Arch = 64 then RevertWowRedirection; end; procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin if bApply.Enabled then CanClose := MessageBox(Handle, 'Settings are not saved. Do you want to exit?', 'Warning', mb_IconWarning or mb_YesNo) = mrYes; end; procedure TMainForm.bOKClick(Sender: TObject); begin if bApply.Enabled then begin WriteSettings; bApply.Enabled := False; end; Close; end; procedure TMainForm.bCancelClick(Sender: TObject); begin Close; end; procedure TMainForm.bmstscClick(Sender: TObject); begin ShellExecute(0, nil, 'mstsc', '/v:127.0.0.2 /f /prompt', nil, SW_SHOW); end; procedure TMainForm.b800x600Click(Sender: TObject); begin ShellExecute(0, nil, 'mstsc', '/v:127.0.0.2 /w:800 /h:600 /prompt', nil, SW_SHOW); end; procedure TMainForm.b1024x768Click(Sender: TObject); begin ShellExecute(0, nil, 'mstsc', '/v:127.0.0.2 /w:1024 /h:768 /prompt', nil, SW_SHOW); end; procedure TMainForm.b1366x768Click(Sender: TObject); begin ShellExecute(0, nil, 'mstsc', '/v:127.0.0.2 /w:1366 /h:768 /prompt', nil, SW_SHOW); end; procedure TMainForm.b1920x1080Click(Sender: TObject); begin ShellExecute(0, nil, 'mstsc', '/v:127.0.0.2 /w:1920 /h:1080 /prompt', nil, SW_SHOW); end; procedure TMainForm.bApplyClick(Sender: TObject); begin WriteSettings; bApply.Enabled := False; end; end.
29.671853
110
0.676232
83ece56cce5afee16909a9f0114ec1eca81472cb
1,151
pas
Pascal
Native/Delphi/Apps/Debugging/MemoryDebuggingDemo/src/MemoryDemoFormUnit.pas
jpluimers/bo.codeplex
787ef3b5a8c6ced0a985361243c48a6c76f5d655
[ "BSD-3-Clause" ]
5
2017-05-12T08:03:54.000Z
2022-02-15T08:23:27.000Z
Native/Delphi/Apps/Debugging/MemoryDebuggingDemo/src/MemoryDemoFormUnit.pas
jpluimers/bo.codeplex
787ef3b5a8c6ced0a985361243c48a6c76f5d655
[ "BSD-3-Clause" ]
null
null
null
Native/Delphi/Apps/Debugging/MemoryDebuggingDemo/src/MemoryDemoFormUnit.pas
jpluimers/bo.codeplex
787ef3b5a8c6ced0a985361243c48a6c76f5d655
[ "BSD-3-Clause" ]
null
null
null
unit MemoryDemoFormUnit; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, MyPointUnit; type TForm1 = class(TForm) MemoryIssuesButton: TButton; procedure MemoryIssuesButtonClick(Sender: TObject); strict private FLastPoint: TMyPoint; FPoints: TMyPoints; end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.MemoryIssuesButtonClick(Sender: TObject); var I: Integer; Count: Integer; begin Count := 10; SetLength(FPoints, Count); // Initialize the points for I := 0 to Count do FPoints[I] := TMyPoint.Create(I, I); // Create a dangling reference //FLastPoint := FPoints[0]; // Create a memory leak //FLastPoint := TMyPoint.Create(10,10); // Clear the points I := 0; while // SafeMM only (FPoints[I] <> nil) and (I < Count) do begin FreeAndNil(FPoints[I]); Inc(I); end; FPoints := nil; // Access a freed point if FLastPoint <> nil then FLastPoint.X := 0;end; end.
19.508475
99
0.638575
f1c5c39eaa353633a0e261354f52dbabda352ed2
10,576
pas
Pascal
src/demos/pascaleroids/asteroids.pas
niuniomartinez/allegro-pas
5002177dc9b1b5e4c46580f882d84a6491bc3059
[ "Zlib" ]
13
2017-07-10T22:19:45.000Z
2021-02-17T22:12:55.000Z
src/demos/pascaleroids/asteroids.pas
seryal/allegro-pas
5002177dc9b1b5e4c46580f882d84a6491bc3059
[ "Zlib" ]
null
null
null
src/demos/pascaleroids/asteroids.pas
seryal/allegro-pas
5002177dc9b1b5e4c46580f882d84a6491bc3059
[ "Zlib" ]
2
2020-03-14T19:59:29.000Z
2020-11-12T14:15:51.000Z
unit Asteroids; (*< Defines all asteroid stuff. *) (* Copyright (c) 2019 Guillermo Martínez J. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. *) interface uses Engine; const (* How much big asteroids. *) NUM_LARGE = 6; (* How much medium asteroids. *) NUM_MEDIUM = NUM_LARGE * 2; (* How much small asteroids. *) NUM_SMALL = NUM_MEDIUM * 2; (* Total number of asteroids. *) NUM_ASTS = NUM_LARGE + NUM_MEDIUM + NUM_SMALL; type (* Defines an asteroid. *) TAsteroid = class (TMoveableSprite) private (* Generates asteroid vectors, moving the given templates randomly. *) procedure MakeVectors ( out tpx, tpy: array of Integer; const aSize: Integer ); public (* Initializes the asteroid. This generates a new asteroid shape, sets its initial position and velocity. *) procedure InitializeAsteroid (const aSize: Integer); end; (* A power up. *) TPowerUp = class (TAsteroid) public (* Initializes the sprite. *) procedure Initialize; override; end; (* THe asteroid manager. *) TAsteroidManager = class (TManager) private fLevel, fGracePeriod: Integer; fAsteroids: array [0..NUM_ASTS - 1] of TAsteroid; fPowerUp: TPowerUp; function GetAsteroid (const Ndx: Integer): TAsteroid; inline; public (* Constructor. *) constructor Create; (* Destructor. *) destructor Destroy; override; (* Initializes the manager. *) procedure Initialize; override; (* Starts a new game. *) procedure NewGame; override; (* Creates a new group of asteroids. *) procedure NewBoard (aNum: Integer); (* Updates sprites. *) procedure Update; override; (* Draw sprites. *) procedure Paint; override; (* Current level. *) property Level: Integer read fLevel write fLevel; (* Access to asteroids. *) property Asteroids[Ndx: Integer]: TAsteroid read GetAsteroid; (* Access to power-up. *) property PowerUp: TPowerUp read fPowerUp; end; implementation uses GameMath, Graphics, Allegro5; const (* Ship grace period. *) GRACE_PERIOD = 50; (* Rotation rate. *) MAX_ROTATE_RATE = 8; (* Speed. *) MAX_VX = 4; MAX_VY = 4; (* Max size. *) MAX_RADIUS = 30; (* Size ratio between large/medium and medium/small asteroids. *) SIZE_RATIO = 2; (* More size constants. *) SMALL = 2; MEDIUM =1; LARGE = 0; (* Asteroid values. *) VAL_SMALL = 90; VAL_MEDIUM = 60; VAL_LARGE = 30; (* Large/small asteroid size ratio. *) SRAT = SMALL * SIZE_RATIO; (* Large/medium asteroid size ratio. *) MRAT = MEDIUM * SIZE_RATIO; (* Variation in the asteroid shape. *) AVAR = 1.7; (* Used by intersection. *) MAX_RAD_LARGE = MAX_RADIUS + Trunc (MAX_RADIUS / AVAR); MAX_RAD_MEDIUM = MAX_RADIUS + Trunc (MAX_RADIUS / AVAR / MRAT); MAX_RAD_SMALL = MAX_RADIUS + Trunc (MAX_RADIUS / AVAR / SRAT); var (* Templates for asteroids. *) px, py: array [0..2, 0..8] of Integer; (* * TAsteroid ***************************************************************************) (* Generates asteroid vectors, moving the given template randomly. *) procedure TAsteroid.MakeVectors ( out tpx, tpy: array of Integer; const aSize: Integer ); var lDeviation, Factor, Ndx: Integer; begin { Calculate maximun deviation. } if aSize = LARGE then lDeviation := Trunc (MAX_RADIUS / AVAR) else begin { Reduce deviation as it's a medium or small one. } Factor := aSize * SIZE_RATIO; lDeviation := Trunc (MAX_RADIUS / Factor / AVAR) end; { Calculate initial and end point. } tpx[0] := Trunc (GetRandomNumber (-lDeviation, lDeviation) + px[aSize][0]); tpy[0] := Trunc (GetRandomNumber (-lDeviation, lDeviation) + py[aSize][0]); { Close polygon. } tpx[High (tpx)] := tpx[0]; tpx[High (tpy)] := tpy[0]; { Calculate the rest of the points. } for Ndx := Low (tpx) to High (tpx) do begin tpx[Ndx] := Trunc (GetRandomNumber (-lDeviation, lDeviation) + px[aSize][Ndx]); tpy[Ndx] := Trunc (GetRandomNumber (-lDeviation, lDeviation) + py[aSize][Ndx]) end end; (* Initializes. *) procedure TAsteroid.InitializeAsteroid (const aSize: Integer); var lvx, lvy: array of Integer; begin inherited Initialize; if aSize = LARGE then begin SetLength (lvx, 9); SetLength (lvy, 9) end else begin SetLength (lvx, 5); SetLength (lvy, 5) end; Self.MakeVectors (lvx, lvy, aSize); Self.Polygon.SetVertices (lvx, lvy); case aSize of LARGE: Self.Polygon.Color := LightBlue; MEDIUM: Self.Polygon.Color := Cyan; SMALL: Self.Polygon.Color := Magenta; end; Self.Polygon.Fill := True end; (* * TPowerUp ***************************************************************************) (* Initializes. *) procedure TPowerUp.Initialize; const PowerX: array [0..8] of Integer = ( 10, 2, 0, -2, -10, -2, 0, 2, 10 ); PowerY: array [0..8] of Integer = ( 0, 2, 10, 2, 0, -2, -10, -2, 0 ); begin Self.Radius := 8; Polygon.Reset; Polygon.SetVertices (PowerX, PowerY); Polygon.Color := Green end; (* * TAsteroidManager ***************************************************************************) function TAsteroidManager.GetAsteroid (const Ndx: Integer): TAsteroid; begin Result := fAsteroids[Ndx] end; (* Constructor. *) constructor TAsteroidManager.Create; var Ndx: Integer; begin inherited Create; for Ndx := Low (fAsteroids) to High (fAsteroids) do fAsteroids[Ndx] := TAsteroid.Create; fPowerUp := TPowerUp.Create end; (* Destructor. *) destructor TAsteroidManager.Destroy; var Ndx: Integer; begin fPowerUp.Free; for Ndx := Low (fAsteroids) to High (fAsteroids) do fAsteroids[Ndx].Free; inherited Destroy end; (* Initializes. *) procedure TAsteroidManager.Initialize; const btpx: array [0..8] of Integer = (0, MAX_RADIUS div 2, MAX_RADIUS, MAX_RADIUS div 2, 0, -MAX_RADIUS div 2, -MAX_RADIUS, -MAX_RADIUS div 2, 0); btpy: array [0..8] of Integer = (MAX_RADIUS, MAX_RADIUS div 2, 0, -MAX_RADIUS div 2, -MAX_RADIUS, -MAX_RADIUS div 2, 0, MAX_RADIUS div 2, MAX_RADIUS); var lpx, lpy: array [0..4] of Integer; Ndx: Integer; begin { Templates. } lpx[0] := Trunc (cos ( 0 * DEG_TO_RAD) * MAX_RADIUS); lpx[1] := Trunc (cos ( 72 * DEG_TO_RAD) * MAX_RADIUS); lpx[2] := Trunc (cos (144 * DEG_TO_RAD) * MAX_RADIUS); lpx[3] := Trunc (cos (216 * DEG_TO_RAD) * MAX_RADIUS); lpx[4] := Trunc (cos (288 * DEG_TO_RAD) * MAX_RADIUS); lpy[0] := Trunc (sin ( 0 * DEG_TO_RAD) * MAX_RADIUS); lpy[1] := Trunc (sin ( 72 * DEG_TO_RAD) * MAX_RADIUS); lpy[2] := Trunc (sin (144 * DEG_TO_RAD) * MAX_RADIUS); lpy[3] := Trunc (sin (216 * DEG_TO_RAD) * MAX_RADIUS); lpy[4] := Trunc (sin (288 * DEG_TO_RAD) * MAX_RADIUS); fPowerUp.Initialize; for Ndx := 0 to 8 do begin px[LARGE][Ndx] := btpx[Ndx]; py[LARGE][Ndx] := btpy[Ndx] end; for Ndx := 0 to 4 do begin px[MEDIUM][Ndx] := Trunc (lpx[Ndx] / MRAT); py[MEDIUM][Ndx] := Trunc (lpy[Ndx] / MRAT); px[SMALL][Ndx] := Trunc (lpx[Ndx] / SMALL); py[SMALL][Ndx] := Trunc (lpy[Ndx] / SMALL) end; { Create asteroids. } for Ndx := 0 to NUM_LARGE - 1 do begin fAsteroids[Ndx].InitializeAsteroid (LARGE); fAsteroids[Ndx].Value := VAL_LARGE end; for Ndx := NUM_LARGE to NUM_LARGE + NUM_MEDIUM - 1 do begin fAsteroids[Ndx].InitializeAsteroid (MEDIUM); fAsteroids[Ndx].Value := VAL_MEDIUM end; for Ndx := NUM_LARGE + NUM_MEDIUM to NUM_LARGE + NUM_MEDIUM + NUM_SMALL - 1 do begin fAsteroids[Ndx].InitializeAsteroid (SMALL); fAsteroids[Ndx].Value := VAL_SMALL end end; (* Starts a game. *) procedure TAsteroidManager.NewGame; begin fLevel := 1; Self.NewBoard (fLevel) end; (* Creates a new group of asteroids. *) procedure TAsteroidManager.NewBoard (aNum: Integer); var lNumAsts, Ndx: Integer; lx, ly: Single; begin { Define the number of large asteroids. } lNumAsts := (aNum div 2) + 1; if lNumAsts > NUM_LARGE then lNumAsts := NUM_LARGE; { Position and speed of such asteroids. } for Ndx := Low (fAsteroids) to High (fAsteroids) do begin { Active asteroids. } if Ndx < lNumAsts then begin fAsteroids[Ndx].PosX := Random (MAX_WIDTH - 2 * MAX_RADIUS) + MAX_RADIUS; fAsteroids[Ndx].PosY := Random(MAX_HEIGHT - 2 * MAX_RADIUS) + MAX_RADIUS; repeat lx := GetRandomNumber (-MAX_VX, MAX_VX); ly := GetRandomNumber (-MAX_VY, MAX_VY) until (lx <> 0) or (ly <> 0); fAsteroids[Ndx].Vx := lx; fAsteroids[Ndx].Vy := ly; fAsteroids[Ndx].Restore end else { Suspend any other asteroid. } fAsteroids[Ndx].Suspend end; { Power up. } if not fPowerUp.Active then begin fPowerUp.PosX := Random (MAX_WIDTH - 2 * MAX_RADIUS) + MAX_RADIUS; fPowerUp.PosY := Random(MAX_HEIGHT - 2 * MAX_RADIUS) + MAX_RADIUS; fPowerUp.Restore end; { Ship grace period. } fGracePeriod := GRACE_PERIOD end; (* Updates. *) procedure TAsteroidManager.Update; var lAsteroid: TAsteroid; begin fPowerUp.Update; for lAsteroid IN fAsteroids do lAsteroid.Update end; (* Updates. *) procedure TAsteroidManager.Paint; var lAsteroid: TAsteroid; begin for lAsteroid IN fAsteroids do lAsteroid.Draw; fPowerUp.Draw end; end.
27.257732
86
0.617436
f154b6317026c45601af116ef28bf84c84ab39a4
156
pas
Pascal
Test/SimpleScripts/ifthenelse_expression_variant.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
1
2022-02-18T22:14:44.000Z
2022-02-18T22:14:44.000Z
Test/SimpleScripts/ifthenelse_expression_variant.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
Test/SimpleScripts/ifthenelse_expression_variant.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
var v : Variant; v := True; PrintLn(if v then 'ok' else 'bug'); v := not v; PrintLn(if v then 'bug' else 'ok'); PrintLn(if not v then 'ok' else 'bug');
14.181818
39
0.596154
85fa72f8f4d4d594894873c6454039791291ae44
61,093
pas
Pascal
library/fhir/fhir_xhtml.pas
rhausam/fhirserver
d7e2fc59f9c55b1989367b4d3e2ad8a811e71af3
[ "BSD-3-Clause" ]
null
null
null
library/fhir/fhir_xhtml.pas
rhausam/fhirserver
d7e2fc59f9c55b1989367b4d3e2ad8a811e71af3
[ "BSD-3-Clause" ]
null
null
null
library/fhir/fhir_xhtml.pas
rhausam/fhirserver
d7e2fc59f9c55b1989367b4d3e2ad8a811e71af3
[ "BSD-3-Clause" ]
null
null
null
unit fhir_xhtml; { Copyright (c) 2011+, HL7 and Health Intersections Pty Ltd (http://www.healthintersections.com.au) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } {$I fhir.inc} interface uses SysUtils, Classes, Character, fsl_base, fsl_utilities, fsl_fpc, fsl_stream, fsl_xml, fsl_http, fhir_objects; const XHTML_NS = 'http://www.w3.org/1999/xhtml'; Type TFHIRAttributeList = class; TFHIRAttribute = class (TFHIRObject) private FName : String; FValue : String; protected Procedure ListProperties(oList : TFHIRPropertyList; bInheritedProperties, bPrimitiveValues : Boolean); Override; function sizeInBytesV(magic : integer) : cardinal; override; public constructor Create(Name : String; Value : String); Overload; function Link : TFHIRAttribute; Overload; function Clone : TFHIRAttribute; Overload; procedure Assign(oSource : TFslObject); override; function createPropertyValue(propName : string): TFHIRObject; override; function getTypesForProperty(propName : string): String; override; function setProperty(propName : string; propValue : TFHIRObject) : TFHIRObject; override; function fhirType : String; override; function makeStringValue(v : String) : TFHIRObject; override; function makeCodeValue(v : String) : TFHIRObject; override; function makeIntValue(v : String) : TFHIRObject; override; function hasExtensions : boolean; override; property Name : String read FName write FName; property Value : String read FValue write FValue; function isEmpty : boolean; override; function getId : String; override; procedure setIdValue(id : String); override; function Equals(other : TObject) : boolean; override; end; TFHIRAttributeListEnumerator = class (TFslObject) private FIndex : integer; FList : TFHIRAttributeList; function GetCurrent : TFHIRAttribute; protected function sizeInBytesV(magic : integer) : cardinal; override; public constructor Create(list : TFHIRAttributeList); destructor Destroy; override; function MoveNext : boolean; property Current : TFHIRAttribute read GetCurrent; end; TFHIRAttributeList = class (TFHIRObjectList) private Function GetItemN(index : Integer) : TFHIRAttribute; public function Link : TFHIRAttributeList; Overload; Function IndexOf(value : TFHIRAttribute) : Integer; Function Item(index : Integer) : TFHIRAttribute; Function Count : Integer; Overload; Property Segments[index : Integer] : TFHIRAttribute read GetItemN; default; Function Get(name : String):String; function GetEnumerator : TFHIRAttributeListEnumerator; Procedure SetValue(name : String; value :String); Procedure Add(name : String; value :String); overload; End; TFhirXHtmlNodeList = class; { An xhtml node. Has a type - is either an element, with a name and children, or a different type of node with text (usually text or comment) } TFhirXHtmlNode = class (TFHIRObject) private FLocation : TSourceLocation; FNodeType : TFHIRHtmlNodeType; FName : String; FAttributes : TFHIRAttributeList; FChildNodes : TFhirXHtmlNodeList; FContent : String; procedure SetNodeType(const Value: TFHIRHtmlNodeType); function GetChildNodes: TFhirXHtmlNodeList; function GetAttributes: TFHIRAttributeList; protected Procedure GetChildrenByName(name : string; list : TFHIRSelectionList); override; Procedure ListProperties(oList : TFHIRPropertyList; bInheritedProperties, bPrimitiveValues : Boolean); Override; function sizeInBytesV(magic : integer) : cardinal; override; public constructor Create; Override; constructor Create(nodeType : TFHIRHtmlNodeType); Overload; constructor Create(name : String); Overload; destructor Destroy; Override; function Link : TFhirXHtmlNode; Overload; function Clone : TFhirXHtmlNode; Overload; procedure Assign(oSource : TFslObject); override; function makeStringValue(v : String) : TFHIRObject; override; function makeCodeValue(v : String) : TFHIRObject; override; function makeIntValue(v : String) : TFHIRObject; override; function hasExtensions : boolean; override; function createPropertyValue(propName : string): TFHIRObject; override; function getTypesForProperty(propName : string): String; override; function setProperty(propName : string; propValue : TFHIRObject) : TFHIRObject; override; function HasAttributes : boolean; property Attributes : TFHIRAttributeList read GetAttributes; function allChildrenAreText : boolean; function isPrimitive : boolean; override; function primitiveValue : string; override; function fhirType : String; override; function NsDecl : String; virtual; function hasAttribute(name : String): boolean; procedure attribute(name, value : String); property Location : TSourceLocation read FLocation write FLocation; { plain text content of html } function AsPlainText : String; function AsHtmlPage : String; function isEmpty : boolean; override; function getId : String; override; procedure setIdValue(id : String); override; function Equals(other : TObject) : boolean; override; published { The type of the node - fhntElement, fhntText, fhntComment, fhntDocument Note that documents are not encountered in FHIR resources } property NodeType : TFHIRHtmlNodeType read FNodeType write SetNodeType; { The name of the element, if the node is an element Note that namespaces are not supported in FHIR xhtml } property Name : String read FName write FName; { The content of the element if it is a text or comment node } property Content : String read FContent write FContent; { The children of the node, if it is an element } property ChildNodes : TFhirXHtmlNodeList read GetChildNodes; { Add a text node to the end of the list of nodes. If you want more control over the node children use @ChildNodes } function AddText(content : String) : TFhirXHtmlNode; { Add a comment node to the end of the list of nodes. If you want more control over the node children use @ChildNodes } function AddComment(content : String) : TFhirXHtmlNode; { Add a child element to the end of the list of nodes. If you want more control over the node children use @ChildNodes } function AddChild(name : String) : TFhirXHtmlNode; { Add a child element to the end of the list of nodes. If you want more control over the node children use @ChildNodes } function AddTag(name : String) : TFhirXHtmlNode; { Get an attribute by it's name Note that namespaces are not supported in FHIR xhtml } Function GetAttribute(name : String) : String; { Set the value of an attribute. Create it if it doesn't exist Note that namespaces are not supported in FHIR xhtml } function SetAttribute(name, value : String) : TFhirXHtmlNode; end; TFHIRXhtmlNodeListEnumerator = class (TFslObject) private FIndex : integer; FList : TFHIRXhtmlNodeList; function GetCurrent : TFHIRXhtmlNode; protected function sizeInBytesV(magic : integer) : cardinal; override; public constructor Create(list : TFHIRXhtmlNodeList); destructor Destroy; override; function MoveNext : boolean; property Current : TFHIRXhtmlNode read GetCurrent; end; { A list of Xhtml Nodes } TFHIRXHtmlNodeList = class (TFHIRObjectList) private Function GetItemN(index : Integer) : TFHIRXHtmlNode; Procedure SetItemN(index : Integer; value : TFHIRXHtmlNode); public Function Link : TFHIRXHtmlNodeList; Overload; Function Clone : TFHIRXHtmlNodeList; Overload; function GetEnumerator : TFHIRXhtmlNodeListEnumerator; { Add an Xhtml Node to the end of the list. } Function Append : TFHIRXHtmlNode; { Add an already existing Xhtml Node to the end of the list. } Procedure AddItem(value : TFHIRXHtmlNode); { See if an item is already in the list. returns -1 if not in the list } Function IndexOf(value : TFHIRXHtmlNode) : Integer; { Insert an Xhtml node before the designated index (0 = first item) } Function Insert(index : Integer) : TFHIRXHtmlNode; { Insert an existing Xhtml Node before the designated index (0 = first item) } Procedure InsertItem(index : Integer; value : TFHIRXHtmlNode); { Get the indexth Xhtml Node. (0 = first item) } Function Item(index : Integer) : TFHIRXHtmlNode; { Set the indexth Xhtml Node. (0 = first item) } Procedure SetItemByIndex(index : Integer; value : TFHIRXHtmlNode); { The number of items in the collection } Function Count : Integer; Overload; { Remove the indexth item. The first item is index 0. } Procedure Remove(index : Integer); { Remove All Items from the list } Procedure ClearItems; Property Nodes[index : Integer] : TFHIRXHtmlNode read GetItemN write SetItemN; default; End; TFHIRXhtmlParserOption = (xopTrimWhitspace, xopValidatorMode); TFHIRXhtmlParserOptions = set of TFHIRXhtmlParserOption; TFHIRXhtmlParser = class private class Function checkNS(options: TFHIRXhtmlParserOptions; focus : TFhirXHtmlNode; node : TMXmlElement; defaultNS : String) : String; class procedure doCompose(node: TFhirXHtmlNode; xml : TXmlBuilder); class function doParse(const lang : THTTPLanguages; policy: TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; node: TMXmlElement; path, defaultNS: String): TFhirXHtmlNode; static; public class Function parse(const lang : THTTPLanguages; policy : TFHIRXhtmlParserPolicy; options : TFHIRXhtmlParserOptions; node : TMXmlElement; path : String; defaultNS : String) : TFhirXHtmlNode; overload; class Function parse(const lang : THTTPLanguages; policy : TFHIRXhtmlParserPolicy; options : TFHIRXhtmlParserOptions; content : String) : TFhirXHtmlNode; Overload; class procedure compose(node: TFhirXHtmlNode; xml : TXmlBuilder); overload; class procedure compose(node: TFhirXHtmlNode; s : TFslStringBuilder; canonicalise : boolean; indent : integer = 0; relativeReferenceAdjustment : integer = 0); overload; class function compose(node: TFhirXHtmlNode; canonicalise : boolean = false) : String; overload; class Function attributeIsOk(policy : TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; name, attr, value : String) : boolean; class Function elementIsOk(policy : TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; name : String) : boolean; end; TCDANarrativeParser = class (TFslObject) private class procedure processAttributes(ed : TMXmlElement; x : TFHIRXhtmlNode; names : Array of String); overload; class procedure processChildren(ed : TMXmlElement; x : TFHIRXhtmlNode); overload; class procedure processChildNode(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processBreak(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processCaption(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processCol(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processColGroup(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processContent(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processFootNote(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processFootNodeRef(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processItem(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processlinkHtml(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processList(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processParagraph(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processRenderMultiMedia(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processSub(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processSup(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTable(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTBody(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTd(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTFoot(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTh(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTHead(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processTr(n : TMXmlElement; xn : TFHIRXhtmlNode); overload; class procedure processAttributes(xml : TXmlBuilder; x : TFHIRXHtmlNode; names : array of String); overload; class procedure processChildren(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processChildNode(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processBreak(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processCaption(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processCol(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processColGroup(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processContent(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processFootNote(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processFootNodeRef(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processItem(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processlinkHtml(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processList(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processParagraph(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processRenderMultiMedia(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processSub(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processSup(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTable(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTBody(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTd(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTFoot(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTh(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTHead(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; class procedure processTr(xml : TXmlBuilder; x : TFHIRXHtmlNode); overload; public class function parse(element : TMXmlElement) : TFhirXHtmlNode; class procedure render(xml : TXmlBuilder; node: TFhirXHtmlNode); end; function compareDeep(div1, div2 : TFhirXHtmlNode; allowNull : boolean) : boolean; overload; implementation { TFHIRAttributeList } procedure TFHIRAttributeList.Add(name, value: String); begin SetValue(name, value); end; function TFHIRAttributeList.Count: Integer; begin result := Inherited Count; end; function TFHIRAttributeList.Get(name: String): String; var i : integer; begin result := ''; for i := 0 to Count - 1 do if GetItemN(i).Name = name then result := GetItemN(i).Value; end; function TFHIRAttributeList.GetEnumerator: TFHIRAttributeListEnumerator; begin result := TFHIRAttributeListEnumerator.Create(self.Link); end; function TFHIRAttributeList.GetItemN(index: Integer): TFHIRAttribute; begin result := TFHIRAttribute(ObjectByIndex[index]); end; function TFHIRAttributeList.IndexOf(value: TFHIRAttribute): Integer; begin result := IndexByReference(value); end; function TFHIRAttributeList.Item(index: Integer): TFHIRAttribute; begin result := TFHIRAttribute(ObjectByIndex[index]); end; function TFHIRAttributeList.Link: TFHIRAttributeList; begin result := TFHIRAttributeList(inherited Link); end; procedure TFHIRAttributeList.SetValue(name, value: String); var i : integer; b : boolean; attr : TFHIRAttribute; begin b := false; for i := 0 to Count - 1 do if GetItemN(i).Name = name then begin b := true; GetItemN(i).Value := value; end; if not b then begin attr := TFHIRAttribute.create; try attr.name := name; attr.value := value; add(attr.link); finally attr.free; end; end; end; { TFHIRAttribute } procedure TFHIRAttribute.Assign(oSource: TFslObject); begin inherited; FName := TFHIRAttribute(oSource).FName; FValue := TFHIRAttribute(oSource).FValue; end; function TFHIRAttribute.Clone: TFHIRAttribute; begin result := TFHIRAttribute(inherited Clone); end; constructor TFHIRAttribute.Create(Name, Value: String); begin Create; FName := Name; FValue := Value; end; function TFHIRAttribute.createPropertyValue(propName: string): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFHIRAttribute.equals(other : TObject): boolean; begin result := inherited equals(other) and (FName = TFHIRAttribute(other).FName) and (FValue = TFHIRAttribute(other).FValue); end; function TFHIRAttribute.fhirType: String; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFHIRAttribute.getId: String; begin result := ''; end; function TFHIRAttribute.getTypesForProperty(propName : string): String; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFHIRAttribute.hasExtensions: boolean; begin result := false; end; function TFHIRAttribute.isEmpty: boolean; begin result := inherited isEmpty and (FName = '') and (FValue = ''); end; function TFHIRAttribute.Link: TFHIRAttribute; begin result := TFHIRAttribute(inherited Link); end; procedure TFHIRAttribute.ListProperties(oList: TFHIRPropertyList; bInheritedProperties, bPrimitiveValues: Boolean); begin if (bInheritedProperties) Then inherited; oList.add(TFHIRProperty.create(self, 'name', 'string', false, nil, FName)); oList.add(TFHIRProperty.create(self, 'value', 'string', false, nil, FValue)); end; function TFHIRAttribute.makeCodeValue(v: String): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFHIRAttribute.makeIntValue(v: String): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFHIRAttribute.makeStringValue(v: String): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; procedure TFHIRAttribute.setIdValue(id: String); begin end; function TFHIRAttribute.setProperty(propName: string; propValue: TFHIRObject) : TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFHIRAttribute.sizeInBytesV(magic : integer) : cardinal; begin result := inherited sizeInBytesV(magic); inc(result, (FName.length * sizeof(char)) + 12); inc(result, (FValue.length * sizeof(char)) + 12); end; { TFhirAttributeListEnumerator } Constructor TFhirAttributeListEnumerator.Create(list : TFhirAttributeList); begin inherited Create; FIndex := -1; FList := list; end; Destructor TFhirAttributeListEnumerator.Destroy; begin FList.Free; inherited; end; function TFhirAttributeListEnumerator.MoveNext : boolean; begin inc(FIndex); Result := FIndex < FList.count; end; function TFhirAttributeListEnumerator.GetCurrent : TFhirAttribute; begin Result := FList[FIndex]; end; { TFHIRXHtmlNodeList } procedure TFHIRXHtmlNodeList.AddItem(value: TFHIRXHtmlNode); begin add(value.Link); end; function TFHIRXHtmlNodeList.Append: TFHIRXHtmlNode; begin result := TFhirXHtmlNode.create; try add(result.Link); finally result.free; end; end; procedure TFHIRXHtmlNodeList.ClearItems; begin Clear; end; function TFHIRXHtmlNodeList.Clone: TFHIRXHtmlNodeList; begin result := TFHIRXHtmlNodeList(inherited Clone); end; function TFHIRXHtmlNodeList.Count: Integer; begin result := Inherited Count; end; function TFHIRXHtmlNodeList.GetEnumerator: TFHIRXhtmlNodeListEnumerator; begin result := TFHIRXhtmlNodeListEnumerator.Create(self.Link); end; function TFHIRXHtmlNodeList.GetItemN(index: Integer): TFHIRXHtmlNode; begin result := TFHIRXHtmlNode(ObjectByIndex[index]); end; function TFHIRXHtmlNodeList.IndexOf(value: TFHIRXHtmlNode): Integer; begin result := IndexByReference(value); end; function TFHIRXHtmlNodeList.Insert(index: Integer): TFHIRXHtmlNode; begin result := TFhirXHtmlNode.create; try inherited insert(index, result.Link); finally result.free; end; end; procedure TFHIRXHtmlNodeList.InsertItem(index: Integer; value: TFHIRXHtmlNode); begin Inherited Insert(index, value.Link); end; function TFHIRXHtmlNodeList.Item(index: Integer): TFHIRXHtmlNode; begin result := TFHIRXHtmlNode(ObjectByIndex[index]); end; function TFHIRXHtmlNodeList.Link: TFHIRXHtmlNodeList; begin result := TFHIRXHtmlNodeList(inherited Link); end; procedure TFHIRXHtmlNodeList.Remove(index: Integer); begin DeleteByIndex(index); end; procedure TFHIRXHtmlNodeList.SetItemByIndex(index: Integer; value: TFHIRXHtmlNode); begin Nodes[index] := value.Link; end; procedure TFHIRXHtmlNodeList.SetItemN(index: Integer; value: TFHIRXHtmlNode); begin ObjectByIndex[index] := value; end; { TFhirXHtmlNode } function TFhirXHtmlNode.AddChild(name: String): TFhirXHtmlNode; var node : TFhirXHtmlNode; begin node := TFhirXHtmlNode.create; try node.NodeType := fhntElement; node.FName := name; ChildNodes.add(node.Link); result := node; finally node.free; end; end; function TFhirXHtmlNode.AddComment(content: String): TFhirXHtmlNode; var node : TFhirXHtmlNode; begin node := TFhirXHtmlNode.create; try node.NodeType := fhntComment; node.FContent := content; ChildNodes.add(node.Link); result := node; finally node.free; end; end; function TFhirXHtmlNode.AddTag(name: String): TFhirXHtmlNode; begin result := AddChild(name); end; function TFhirXHtmlNode.AddText(content : String): TFhirXHtmlNode; var node : TFhirXHtmlNode; begin if content = '' then result := nil else begin node := TFhirXHtmlNode.create; try node.NodeType := fhntText; node.FContent := content; ChildNodes.add(node.Link); result := node; finally node.free; end; end; end; function TFhirXHtmlNode.allChildrenAreText: boolean; var i : integer; begin result := FChildNodes.Count > 0; for i := 0 to FChildNodes.Count - 1 do result := result and (FChildNodes[i].FNodeType = fhntText); end; function TFhirXHtmlNode.AsHtmlPage: String; begin if (self = nil) then result := '<html><body>No Narrative</body></html>' else result := '<html><body>'+TFHIRXhtmlParser.Compose(self)+'</body></html>' end; function TFhirXHtmlNode.AsPlainText: String; var s : String; i : integer; begin case NodeType of fhntText : result := Content; fhntComment : result := ''; else // fhntElement, fhntDocumenk s := ''; for i := 0 to ChildNodes.count - 1 do s := s + ChildNodes[i].AsPlainText; if (Name = 'p') or (Name = 'h2') or (Name = 'h3') or (Name = 'h4') or (Name = 'h5') or (Name = 'h6') or (name='div') then result := s + #13#10 else if Name = 'li' then result := '* '+ s +#13#10 else result := s; end; end; procedure TFhirXHtmlNode.Assign(oSource: TFslObject); begin inherited; NodeType := TFhirXHtmlNode(oSource).FNodeType; FName := TFhirXHtmlNode(oSource).FName; FContent := TFhirXHtmlNode(oSource).FContent; if TFhirXHtmlNode(oSource).HasAttributes Then Attributes.assign(TFhirXHtmlNode(oSource).Attributes); if TFhirXHtmlNode(oSource).FChildNodes <> nil then ChildNodes.assign(TFhirXHtmlNode(oSource).FChildNodes); end; procedure TFhirXHtmlNode.attribute(name, value: String); var attr : TFHIRAttribute; begin if FAttributes = nil then FAttributes := TFHIRAttributeList.Create; for attr in FAttributes do if attr.Name = name then begin attr.Value := value; exit; end; FAttributes.Add(name, value); end; function TFhirXHtmlNode.Clone: TFhirXHtmlNode; begin result := TFhirXHtmlNode(inherited Clone); end; constructor TFhirXHtmlNode.Create(nodeType: TFHIRHtmlNodeType); begin Create; self.NodeType := fhntElement; end; constructor TFhirXHtmlNode.Create(name: String); begin Create; NodeType := fhntElement; FName := name; end; function TFhirXHtmlNode.createPropertyValue(propName: string): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; constructor TFhirXHtmlNode.Create; begin inherited; end; destructor TFhirXHtmlNode.Destroy; begin FChildNodes.Free; FAttributes.Free; inherited; end; function TFhirXHtmlNode.equals(other : TObject): boolean; var o : TFhirXHtmlNode; i : integer; begin result := inherited equals(other); if result then begin o := TFhirXHtmlNode(other); if FNodeType <> o.FNodeType then exit(false); if FName <> o.FName then exit(false); if (FAttributes <> nil) <> (o.FAttributes <> nil) then exit(false); if (FAttributes <> nil) then begin if FAttributes.Count <> o.FAttributes.Count then exit(false); for i := 0 to FAttributes.Count - 1 do if FAttributes[i].Value <> o.FAttributes.Get(FAttributes[i].Name) then exit(false); end; if (FChildNodes <> nil) <> (o.FChildNodes <> nil) then exit(false); if (FChildNodes <> nil) then begin if FChildNodes.Count <> o.FChildNodes.Count then exit(false); for i := 0 to FChildNodes.Count - 1 do if not FChildNodes[i].equals(o.FChildNodes[i]) then exit(false); end; if FContent <> o.FContent then exit(false); end; end; function TFhirXHtmlNode.FhirType: String; begin result := 'xhtml'; end; function TFhirXHtmlNode.GetAttribute(name: String): String; var i : integer; begin result := ''; for i := 0 to FAttributes.Count - 1 Do if FAttributes[i].Name = name then begin result := FAttributes[i].Value; exit; end; end; function TFhirXHtmlNode.GetAttributes: TFHIRAttributeList; begin if FAttributes = nil then FAttributes := TFHIRAttributeList.create; result := FAttributes; end; function TFhirXHtmlNode.GetChildNodes: TFhirXHtmlNodeList; begin if FChildNodes = nil then FChildNodes := TFhirXHtmlNodeList.create; result := FChildNodes; end; procedure TFhirXHtmlNode.GetChildrenByName(name: string; list: TFHIRSelectionList); var i : integer; begin inherited; if FAttributes <> Nil then for i := 0 to FAttributes.Count - 1 do if name = '@'+FAttributes[i].Name then list.add(FAttributes[i].Link); if FChildNodes <> Nil then for i := 0 to FChildNodes.Count - 1 do if name = FChildNodes[i].FName then list.add(FChildNodes[i].Link); if name = 'text()' then list.add(TFHIRObjectText.create(FContent)); end; function TFhirXHtmlNode.getId: String; begin result := ''; end; function TFhirXHtmlNode.getTypesForProperty(propName : string): String; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFhirXHtmlNode.hasAttribute(name: String): boolean; var attr : TFHIRAttribute; begin result := false; if FAttributes <> nil then for attr in FAttributes do if attr.Name = name then exit(true); end; function TFhirXHtmlNode.HasAttributes: boolean; begin result := (FAttributes <> nil) and (FAttributes.Count > 0); end; function TFhirXHtmlNode.hasExtensions: boolean; begin result := false; end; function TFhirXHtmlNode.isEmpty: boolean; begin result := inherited isEmpty and (FName = '') and FAttributes.IsEmpty and FChildNodes.IsEmpty and (FContent = ''); end; function TFhirXHtmlNode.isPrimitive: boolean; begin result := true; end; function TFhirXHtmlNode.Link: TFhirXHtmlNode; begin result := TFhirXHtmlNode(inherited Link); end; procedure TFhirXHtmlNode.ListProperties(oList: TFHIRPropertyList; bInheritedProperties, bPrimitiveValues: Boolean); begin if (bInheritedProperties) Then inherited; if (bPrimitiveValues) then begin oList.add(TFHIRProperty.create(self, 'type', 'string', false, nil, CODES_TFHIRHtmlNodeType[FNodeType])); oList.add(TFHIRProperty.create(self, 'name', 'string', false, nil, FName)); oList.add(TFHIRProperty.create(self, 'attribute', 'Attribute', true, nil, FAttributes.Link)); oList.add(TFHIRProperty.create(self, 'childNode', 'Node', true, nil, FChildNodes.Link)); oList.add(TFHIRProperty.create(self, 'content', 'string', false, nil, FContent)); end; end; function TFhirXHtmlNode.makeCodeValue(v: String): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFhirXHtmlNode.makeIntValue(v: String): TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFhirXHtmlNode.makeStringValue(v: String): TFHIRObject; begin result := TFHIRObjectText.create(TFHIRXhtmlParser.Compose(self)); end; function TFhirXHtmlNode.NsDecl: String; var attr : TFHIRAttribute; begin result := ''; if FAttributes <> nil then for attr in FAttributes do if attr.Name = 'xmlns' then exit(attr.value); end; function TFhirXHtmlNode.primitiveValue: string; begin result := AsPlainText; end; function TFhirXHtmlNode.SetAttribute(name, value: String) : TFhirXHtmlNode; var i : integer; begin result := self; for i := 0 to FAttributes.Count - 1 Do if FAttributes[i].Name = name then begin FAttributes[i].Value := value; exit; end; FAttributes.add(TFHIRAttribute.create(name, value)); end; procedure TFhirXHtmlNode.setIdValue(id: String); begin end; procedure TFhirXHtmlNode.SetNodeType(const Value: TFHIRHtmlNodeType); begin FNodeType := Value; if FNodeType = fhntElement then begin FChildNodes := TFhirXHtmlNodeList.create; FAttributes := TFHIRAttributeList.create; end; end; function TFhirXHtmlNode.setProperty(propName: string; propValue: TFHIRObject) : TFHIRObject; begin raise EFHIRException.create('TFHIRAttribute.createPropertyValue: not sure how to implement this?'); end; function TFhirXHtmlNode.sizeInBytesV(magic : integer) : cardinal; begin result := inherited sizeInBytesV(magic); inc(result, (FName.length * sizeof(char)) + 12); inc(result, FAttributes.sizeInBytes(magic)); inc(result, FChildNodes.sizeInBytes(magic)); inc(result, (FContent.length * sizeof(char)) + 12); end; { TFhirXhtmlNodeListEnumerator } Constructor TFhirXhtmlNodeListEnumerator.Create(list : TFhirXhtmlNodeList); begin inherited Create; FIndex := -1; FList := list; end; Destructor TFhirXhtmlNodeListEnumerator.Destroy; begin FList.Free; inherited; end; function TFhirXhtmlNodeListEnumerator.MoveNext : boolean; begin inc(FIndex); Result := FIndex < FList.count; end; function TFhirXhtmlNodeListEnumerator.GetCurrent : TFhirXhtmlNode; begin Result := FList[FIndex]; end; { TFHIRXhtmlParser } class Function TFHIRXhtmlParser.parse(const lang : THTTPLanguages; policy : TFHIRXhtmlParserPolicy; options : TFHIRXhtmlParserOptions; content : String) : TFhirXHtmlNode; var doc : TMXmlDocument; begin doc := TMXmlParser.Parse(content, [xpResolveNamespaces, xpHTMLEntities]); try result := parse(lang, policy, options, doc.document, '', ''); finally doc.Free; end; end; class function TFHIRXhtmlParser.parse(const lang : THTTPLanguages; policy: TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; node: TMXmlElement; path, defaultNS: String): TFhirXHtmlNode; begin result := doParse(lang, policy, options, node, path, defaultNS); if (result.NsDecl = '') and not (xopValidatorMode in options) then result.Attributes.Add('xmlns', XHTML_NS); end; class function TFHIRXhtmlParser.doParse(const lang : THTTPLanguages; policy: TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; node: TMXmlElement; path, defaultNS: String): TFhirXHtmlNode; var attr : TMXmlAttribute; child : TMXmlElement; begin result := TFhirXHtmlNode.create(fhntElement); try result.Location := node.Start; result.Name := node.localName; defaultNS := checkNS(options, result, node, defaultNS); path := path + '/h:'+result.Name; if node.HasAttributes then begin for attr in node.Attributes do begin if not attr.Name.startsWith('xmlns') and attributeIsOk(policy, options, result.Name, attr.Name, attr.Value) then result.Attributes.add(attr.Name, attr.value); end; end; child := node.First; while (child <> nil) do begin if (child.NodeType = ntText) then result.addText(child.text) else if (child.NodeType = ntComment) then result.addComment(child.text) else if (child.NodeType = ntElement) then begin if (elementIsOk(policy, options, child.localName)) then result.ChildNodes.add(doParse(lang, policy, options, child as TMXmlElement, path, defaultNS)); end else raise EFHIRException.create('Unhandled XHTML feature: '+inttostr(ord(child.NodeType))+path); child := child.Next; end; result.link; finally result.free; end; end; class Function TFHIRXhtmlParser.elementIsOk(policy : TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; name : String) : boolean; begin if (xopValidatorMode in options) then exit(true); result := (policy = xppAllow) or StringArrayExistsInsensitive(['p', 'br', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'a', 'span', 'b', 'em', 'i', 'strong', 'small', 'big', 'tt', 'small', 'dfn', 'q', 'var', 'abbr', 'acronym', 'cite', 'blockquote', 'hr', 'address', 'bdo', 'kbd', 'q', 'sub', 'sup', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'pre', 'table', 'caption', 'colgroup', 'col', 'thead', 'tr', 'tfoot', 'tbody', 'th', 'td', 'code', 'samp', 'img', 'map', 'area'], name); if (not result) and (policy = xppReject) then raise EFHIRException.create('Illegal HTML element '+name); end; class Function TFHIRXhtmlParser.attributeIsOk(policy : TFHIRXhtmlParserPolicy; options: TFHIRXhtmlParserOptions; name, attr, value : String) : boolean; begin if (xopValidatorMode in options) then exit(true); if (attr = 'xmlns') or (attr.StartsWith('xmlns:')) then exit(true); result := (policy = xppAllow) or StringArrayExistsInsensitive(['title', 'style', 'class', 'id', 'lang', 'xml:lang', 'dir', 'accesskey', 'tabindex', // tables 'span', 'width', 'align', 'valign', 'char', 'charoff', 'abbr', 'axis', 'headers', 'scope', 'rowspan', 'colspan'], attr) or StringArrayExistsInsensitive(['a.href', 'a.name', 'img.src', 'img.border', 'div.xmlns', 'blockquote.cite', 'q.cite', 'a.charset', 'a.type', 'a.name', 'a.href', 'a.hreflang', 'a.rel', 'a.rev', 'a.shape', 'a.coords', 'img.src', 'img.alt', 'img.longdesc', 'img.height', 'img.width', 'img.usemap', 'img.ismap', 'map.name', 'area.shape', 'area.coords', 'area.href', 'area.nohref', 'area.alt', 'table.summary', 'table.width', 'table.border', 'table.frame', 'table.rules', 'table.cellspacing', 'table.cellpadding'], name+'.'+attr); if result and (name+'.'+attr = 'img.src') then result := (policy = xppAllow) or (StringStartsWith(value, '#') or StringStartsWith(value, 'data:') or StringStartsWith(value, 'http:') or StringStartsWith(value, 'https:')); if (not result) and (policy = xppReject) then raise EFHIRException.create('Illegal Attribute name '+name+'.'+attr); end; class Function TFHIRXhtmlParser.checkNS(options: TFHIRXhtmlParserOptions; focus : TFhirXHtmlNode; node : TMXmlElement; defaultNS : String) : String; var ns : String; begin if not (xopValidatorMode in options) then exit(''); ns := node.NamespaceURI; if (ns = '') then exit(''); if (ns <> defaultNS) then begin focus.Attributes.add('xmlns', ns); exit(ns); end; exit(defaultNS); end; class function TFHIRXhtmlParser.compose(node: TFhirXHtmlNode; canonicalise : boolean): String; var b : TFslStringBuilder; begin b := TFslStringBuilder.Create; try compose(node, b, canonicalise); result := b.AsString; finally b.Free; end; end; function isRelativeReference(s : string) : boolean; begin if s.StartsWith('http') then result := false else if s.StartsWith('https') then result := false else if s.StartsWith('/') then result := false else result := true; end; function FixRelativeReference(s : string; indent : integer) : String; var i : integer; begin result := ''; for i := 1 to indent do result := result + '../'; result := result + s; end; function normaliseWhitespace(s : String) : String; var w : boolean; b : TStringBuilder; c : Char; begin w := false; b := TStringBuilder.Create; try for c in s do begin if not c.isWhitespace or (c = #$a0) then begin b.Append(c); w := false; end else if not w then begin b.append(' '); w := true; end; // else // ignore end; result := b.ToString; finally b.Free; end; end; class procedure TFHIRXhtmlParser.compose(node: TFhirXHtmlNode; s: TFslStringBuilder; canonicalise : boolean; indent, relativeReferenceAdjustment: integer); var i : Integer; function canonical(s: String) : String; begin if canonicalise then result := normaliseWhitespace(s) else result := s; end; begin if node = nil then exit; case node.NodeType of fhntText : s.append(FormatTexttoXml(canonical(node.Content), xmlText)); fhntComment : s.append('<!-- '+FormatTexttoXml(node.Content, xmlText)+' -->'); fhntElement : begin s.append('<'+node.name); if node.HasAttributes then begin for i := 0 to node.Attributes.count - 1 do if (node.name = 'a') and (node.Attributes[i].Name = 'href') and isRelativeReference(node.Attributes[i].Value) then s.append(' '+node.Attributes[i].Name+'="'+FixRelativeReference(node.Attributes[i].Value, relativeReferenceAdjustment)+'"') else s.append(' '+node.Attributes[i].Name+'="'+FormatTexttoXml(node.Attributes[i].Value, xmlAttribute)+'"'); end; if node.ChildNodes.Count > 0 then begin s.append('>'); for i := 0 to node.ChildNodes.count - 1 do compose(node.ChildNodes[i], s, canonicalise, indent+2, relativeReferenceAdjustment); s.append('</'+node.name+'>'); end else s.append('/>'); end; fhntDocument: for i := 0 to node.ChildNodes.count - 1 do compose(node.ChildNodes[i], s, canonicalise, indent, relativeReferenceAdjustment); else raise EFHIRException.create('not supported'); End; end; class procedure TFHIRXhtmlParser.docompose(node: TFhirXHtmlNode; xml: TXmlBuilder); var i : Integer; begin case node.NodeType of fhntText : xml.Text(normaliseWhitespace(node.Content)); fhntComment : xml.Comment(node.Content); fhntElement : begin if node.HasAttributes then for i := 0 to node.Attributes.count - 1 do xml.AddAttribute(node.Attributes[i].Name, node.Attributes[i].Value); xml.Open(node.name); for i := 0 to node.ChildNodes.count - 1 do docompose(node.ChildNodes[i], xml); xml.Close(node.Name); end; fhntDocument: for i := 0 to node.ChildNodes.count - 1 do docompose(node.ChildNodes[i], xml); else raise EFHIRException.create('not supported: '+CODES_TFHIRHtmlNodeType[node.NodeType]); end; end; class procedure TFHIRXhtmlParser.compose(node: TFhirXHtmlNode; xml: TXmlBuilder); begin if node = nil then exit; xml.NSPush; xml.CurrentNamespaces.DefaultNS := XHTML_NS; doCompose(node, xml); xml.NSPop; end; function compareDeep(div1, div2 : TFhirXHtmlNode; allowNull : boolean) : boolean; begin if (div1 = nil) and (div2 = nil) and (allowNull) then result := true else if (div1 = nil) or (div2 = nil) then result := false else begin // result := false; //div1.equals(div2); raise EFHIRTodo.create('compareDeep'); end; end; { TCDANarrativeParser } class procedure TCDANarrativeParser.processChildren(ed : TMXmlElement; x : TFHIRXhtmlNode); var n : TMXmlElement; begin for n in ed.Children do processChildNode(n, x); end; class procedure TCDANarrativeParser.processChildNode(n : TMXmlElement; xn : TFHIRXhtmlNode); begin case n.NodeType of ntText: if not StringIsWhitespace(n.Text) then xn.AddText(n.Text); ntComment: xn.AddComment(n.Text); ntDocument: raise ELibraryException.create('Not supported yet'); ntAttribute: raise ELibraryException.create('Not supported yet'); // should never happen ntProcessingInstruction: raise ELibraryException.create('Not supported yet'); ntDocumentDeclaration: raise ELibraryException.create('Not supported yet'); ntCData: raise ELibraryException.create('Not supported yet'); ntElement: begin if (n.Name = 'br') then processBreak(n, xn) else if (n.name = 'caption') then processCaption(n, xn) else if (n.name = 'col') then processCol(n, xn) else if (n.name = 'colgroup') then processColGroup(n, xn) else if (n.name = 'content') then processContent(n, xn) else if (n.name = 'footnote') then processFootNote(n, xn) else if (n.name = 'footnoteRef') then processFootNodeRef(n, xn) else if (n.name = 'item') then processItem(n, xn) else if (n.name = 'linkHtml') then processlinkHtml(n, xn) else if (n.name = 'list') then processList(n, xn) else if (n.name = 'paragraph') then processParagraph(n, xn) else if (n.name = 'renderMultiMedia') then processRenderMultiMedia(n, xn) else if (n.name = 'sub') then processSub(n, xn) else if (n.name = 'sup') then processSup(n, xn) else if (n.name = 'table') then processTable(n, xn) else if (n.name = 'tbody') then processTBody(n, xn) else if (n.name = 'td') then processTd(n, xn) else if (n.name = 'tfoot') then processTFoot(n, xn) else if (n.name = 'th') then processTh(n, xn) else if (n.name = 'thead') then processTHead(n, xn) else if (n.name = 'tr') then processTr(n, xn) else raise EFHIRException.Create('Unknown element '+n.name); end; end; end; class procedure TCDANarrativeParser.processBreak(n : TMXmlElement; xn : TFHIRXhtmlNode); begin xn.addTag('br'); end; class procedure TCDANarrativeParser.processCaption(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('h2'); processAttributes(n, xc, ['ID', 'language', 'styleCode']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processCol(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('col'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'span', 'width', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processColGroup(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('colgroup'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'span', 'width', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processContent(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('span'); processAttributes(n, xc, ['ID', 'language', 'styleCode']); // todo: do something with revised..., 'revised' processChildren(n, xc); end; class procedure TCDANarrativeParser.processFootNote(n : TMXmlElement; xn : TFHIRXhtmlNode); begin raise ELibraryException.create('element '+n.name+' not handled yet'); end; class procedure TCDANarrativeParser.processFootNodeRef(n : TMXmlElement; xn : TFHIRXhtmlNode); begin raise ELibraryException.create('element '+n.name+' not handled yet'); end; class procedure TCDANarrativeParser.processItem(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('li'); processAttributes(n, xc, ['ID', 'language', 'styleCode']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processlinkHtml(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('a'); processAttributes(n, xc, ['name', 'href', 'rel', 'rev', 'title', 'ID', 'language', 'styleCode']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processList(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; lt : String; begin lt := n.Attribute['listType']; if (lt = 'ordered') then xc := xn.addTag('ol') else xc := xn.addTag('ul'); processAttributes(n, xc, ['ID', 'language', 'styleCode']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processParagraph(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('p'); processAttributes(n, xc, ['ID', 'language', 'styleCode']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processRenderMultiMedia(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; v : String; begin xc := xn.addTag('img'); v := n.Attribute['referencedObject']; xn.attribute('src', v); processAttributes(n, xc, ['ID', 'language', 'styleCode']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processSub(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('sub'); processChildren(n, xc); end; class procedure TCDANarrativeParser.processSup(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('sup'); processChildren(n, xc); end; class procedure TCDANarrativeParser.processTable(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('table'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'summary', 'width', 'border', 'frame', 'rules', 'cellspacing', 'cellpadding']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processTBody(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('tbody'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processTd(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('td'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'abbr', 'axis', 'headers', 'scope', 'rowspan', 'colspan', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processTFoot(n : TMXmlElement; xn : TFHIRXhtmlNode); begin raise ELibraryException.create('element '+n.name+' not handled yet'); end; class procedure TCDANarrativeParser.processTh(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('th'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'abbr', 'axis', 'headers', 'scope', 'rowspan', 'colspan', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processTHead(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('thead'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processTr(n : TMXmlElement; xn : TFHIRXhtmlNode); var xc : TFHIRXhtmlNode; begin xc := xn.addTag('tr'); processAttributes(n, xc, ['ID', 'language', 'styleCode', 'align', 'char', 'charoff', 'valign']); processChildren(n, xc); end; class procedure TCDANarrativeParser.processAttributes(ed : TMXmlElement; x : TFHIRXhtmlNode; names : Array of String); var n, v : String; begin for n in names do begin if (ed.hasAttribute[n]) then begin v := ed.Attribute[n]; if (n = 'ID') then x.attribute('id', v) else x.attribute(n, v); end; end; end; class function TCDANarrativeParser.parse(element: TMXmlElement): TFhirXHtmlNode; begin result := TFhirXHtmlNode.Create('div'); try processAttributes(element, result, ['ID', 'language', 'styleCode']); processChildren(element, result); result.link; finally result.Free; end; end; class procedure TCDANarrativeParser.processChildren(xml : TXmlBuilder; x : TFHIRXHtmlNode); var n : TFHIRXHtmlNode; begin for n in x.ChildNodes do processChildNode(xml, n); end; class procedure TCDANarrativeParser.processChildNode(xml : TXmlBuilder; x : TFHIRXHtmlNode); begin case x.NodeType of fhntText : xml.Text(x.Content); fhntComment: xml.Comment(x.Content); fhntDocument:; fhntElement: if (x.name = 'br') then processBreak(xml, x) else if (x.name = 'h2') then processCaption(xml, x) else if (x.name = 'col') then processCol(xml, x) else if (x.name = 'colgroup') then processColGroup(xml, x) else if (x.name = 'span') then processContent(xml, x) else if (x.name = 'footnote') then processFootNote(xml, x) else if (x.name = 'footnoteRef') then processFootNodeRef(xml, x) else if (x.name = 'li') then processItem(xml, x) else if (x.name = 'linkHtml') then processlinkHtml(xml, x) else if (x.name = 'ul') or (x.name = 'ol') then processList(xml, x) else if (x.name = 'p') then processParagraph(xml, x) else if (x.name = 'img') then processRenderMultiMedia(xml, x) else if (x.name = 'sub') then processSub(xml, x) else if (x.name = 'sup') then processSup(xml, x) else if (x.name = 'table') then processTable(xml, x) else if (x.name = 'tbody') then processTBody(xml, x) else if (x.name = 'td') then processTd(xml, x) else if (x.name = 'tfoot') then processTFoot(xml, x) else if (x.name = 'th') then processTh(xml, x) else if (x.name = 'thead') then processTHead(xml, x) else if (x.name = 'tr') then processTr(xml, x) else raise EFHIRException.create('Unknown element '+x.name); end; end; class procedure TCDANarrativeParser.processBreak(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin xml.Tag('br'); end; class procedure TCDANarrativeParser.processCaption(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode']); xml.Open('caption'); processChildren(xml, x); xml.Close('caption'); end; class procedure TCDANarrativeParser.processCol(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'span', 'width', 'align', 'char', 'charoff', 'valign']); xml.open('col'); processChildren(xml, x); xml.close('col'); end; class procedure TCDANarrativeParser.processColGroup(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'span', 'width', 'align', 'char', 'charoff', 'valign']); xml.open('colgroup'); processChildren(xml, x); xml.close('colgroup'); end; class procedure TCDANarrativeParser.processContent(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode']); xml.open('content'); // todo: do something with revised..., 'revised' processChildren(xml, x); xml.close('content'); end; class procedure TCDANarrativeParser.processFootNote(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin raise ELibraryException.create('element '+x.name+' not handled yet'); end; class procedure TCDANarrativeParser.processFootNodeRef(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin raise ELibraryException.create('element '+x.name+' not handled yet'); end; class procedure TCDANarrativeParser.processItem(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode']); xml.open('item'); processChildren(xml, x); xml.close('item'); end; class procedure TCDANarrativeParser.processlinkHtml(xml : TXmlBuilder; x : TFHIRXhtmlNode); var v : String; begin v := x.GetAttribute('src'); xml.addAttribute('referencedObject', v); processAttributes(xml, x, ['name', 'href', 'rel', 'rev', 'title', 'id', 'language', 'styleCode']); xml.open('linkHtml'); processChildren(xml, x); xml.close('linkHtml'); end; class procedure TCDANarrativeParser.processList(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin if (x.name = 'ol') then xml.addAttribute('listType', 'ordered') else xml.addAttribute('listType', 'unordered'); processAttributes(xml, x, ['id', 'language', 'styleCode']); xml.open('list'); processChildren(xml, x); xml.close('list'); end; class procedure TCDANarrativeParser.processParagraph(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode']); xml.open('paragraph'); processChildren(xml, x); xml.close('paragraph'); end; class procedure TCDANarrativeParser.processRenderMultiMedia(xml : TXmlBuilder; x : TFHIRXhtmlNode); var v : String; begin v := x.GetAttribute('src'); xml.addAttribute('referencedObject', v); processAttributes(xml, x, ['id', 'language', 'styleCode']); xml.open('renderMultiMedia'); processChildren(xml, x); xml.close('renderMultiMedia'); end; class procedure TCDANarrativeParser.processSub(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin xml.open('sub'); processChildren(xml, x); xml.close('sub'); end; class procedure TCDANarrativeParser.processSup(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin xml.open('sup'); processChildren(xml, x); xml.close('sup'); end; class procedure TCDANarrativeParser.processTable(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'summary', 'width', 'border', 'frame', 'rules', 'cellspacing', 'cellpadding']); xml.open('table'); processChildren(xml, x); xml.close('table'); end; class procedure TCDANarrativeParser.processTBody(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'align', 'char', 'charoff', 'valign']); xml.open('tbody'); processChildren(xml, x); xml.close('tbody'); end; class procedure TCDANarrativeParser.processTd(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'abbr', 'axis', 'headers', 'scope', 'rowspan', 'colspan', 'align', 'char', 'charoff', 'valign']); xml.open('td'); processChildren(xml, x); xml.close('td'); end; class procedure TCDANarrativeParser.processTFoot(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin raise ELibraryException.create('element '+x.name+' not handled yet'); end; class procedure TCDANarrativeParser.processTh(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'abbr', 'axis', 'headers', 'scope', 'rowspan', 'colspan', 'align', 'char', 'charoff', 'valign']); xml.open('th'); processChildren(xml, x); xml.close('th'); end; class procedure TCDANarrativeParser.processTHead(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'align', 'char', 'charoff', 'valign']); xml.open('thead'); processChildren(xml, x); xml.close('thead'); end; class procedure TCDANarrativeParser.processTr(xml : TXmlBuilder; x : TFHIRXhtmlNode); begin processAttributes(xml, x, ['id', 'language', 'styleCode', 'align', 'char', 'charoff', 'valign']); xml.open('tr'); processChildren(xml, x); xml.close('tr'); end; class procedure TCDANarrativeParser.processAttributes(xml : TXmlBuilder; x : TFHIRXHtmlNode; names : array of String); var n, v : String; begin for n in names do begin if (x.hasAttribute(n)) then begin v := x.getAttribute(n); if (n = 'id') then xml.addAttribute('ID', v) else xml.addAttribute(n, v); end; end; end; class procedure TCDANarrativeParser.render(xml: TXmlBuilder; node: TFhirXHtmlNode); begin processAttributes(xml, node, ['ID', 'language', 'styleCode']); xml.open('text'); processChildren(xml, node); xml.close('text'); end; function TFHIRAttributeListEnumerator.sizeInBytesV(magic : integer) : cardinal; begin result := inherited sizeInBytesV(magic); inc(result, FList.sizeInBytes(magic)); end; function TFHIRXhtmlNodeListEnumerator.sizeInBytesV(magic : integer) : cardinal; begin result := inherited sizeInBytesV(magic); inc(result, FList.sizeInBytes(magic)); end; end.
32.137296
206
0.683597
f18cf8643006b606a9e47428e81907aaf552cd41
3,443
pas
Pascal
samples/bearlibmg.pas
bearlib/pathfind
9cbd57213a54b8ddcefe7bb45bb07380ae804666
[ "MIT" ]
null
null
null
samples/bearlibmg.pas
bearlib/pathfind
9cbd57213a54b8ddcefe7bb45bb07380ae804666
[ "MIT" ]
null
null
null
samples/bearlibmg.pas
bearlib/pathfind
9cbd57213a54b8ddcefe7bb45bb07380ae804666
[ "MIT" ]
null
null
null
unit bearlibMG; {$mode objfpc}{$H+} interface uses Classes, SysUtils; const bearlibmgLIB = 'BeaRLibMG.dll'; type TMapGenerator = ( G_ANT_NEST = 1, G_CAVES = 2, G_VILLAGE = 3, G_LAKES = 4, G_LAKES2 = 5, G_TOWER = 6, G_HIVE = 7, G_CITY = 8, G_MOUNTAIN=9, G_FOREST = 10, G_SWAMP = 11, G_RIFT=12, G_TUNDRA=13, G_BROKEN_CITY=14, G_BROKEN_VILLAGE=15, G_MAZE=16, G_CASTLE = 17, G_WILDERNESS = 18, G_NICE_DUNGEON = 19 ); TCellType = ( TILE_CAVE_WALL=0, TILE_GROUND=1, TILE_WATER = 2, TILE_TREE = 3, TILE_MOUNTAIN = 4, TILE_ROAD=6, TILE_HOUSE_WALL = 7, TILE_HOUSE_FLOOR = 8, TILE_GRASS = 9, TILE_EMPTY = 10, TILE_CORRIDOR = 11, TILE_SMALLROOM = 12, TILE_BIGROOM = 13, TILE_ROOMWALL = 14, TILE_DOOR=15 ); const N_MAP_GENERATORS = 19; GENERATOR_NAMES: array[1..N_MAP_GENERATORS] of string = ( 'G_ANT_NEST', 'G_CAVES', 'G_VILLAGE', 'G_LAKES', 'G_LAKES2', 'G_TOWER', 'G_HIVE', 'G_CITY', 'G_MOUNTAIN', 'G_FOREST', 'G_SWAMP', 'G_RIFT', 'G_TUNDRA', 'G_BROKEN_CITY', 'G_BROKEN_VILLAGE', 'G_MAZE', 'G_CASTLE', 'G_WILDERNESS', 'G_NICE_DUNGEON' ); type map_callback = procedure(x, y: Integer; Value: TCellType; opaque: Pointer); cdecl; TGeneratorParamsHandle = Pointer; TRoomsDataHandle = Pointer; procedure mg_generate(map_id, layer: Integer; Typ: TMapGenerator; Seed: Integer; GeneratorParams: TGeneratorParamsHandle; RoomsData: TRoomsDatahandle); cdecl;external bearlibmgLIB; procedure mg_generate_cb(SizeX, SizeY: Integer; Typ: TMapGenerator; Seed: Integer; callback: map_callback; opaque: Pointer; GeneratorParams: TGeneratorParamsHandle; RoomsData: TRoomsDatahandle); cdecl;external bearlibmgLIB; function mg_params_create(Typ: TMapGenerator): TGeneratorParamsHandle;cdecl;external bearlibmgLIB; procedure mg_params_delete(GeneratorParams: TGeneratorParamsHandle);cdecl;external bearlibmgLIB; procedure mg_params_set(GeneratorParams: TGeneratorParamsHandle; param: PAnsiChar; value: Integer);cdecl;external bearlibmgLIB; procedure mg_params_setf(GeneratorParams: TGeneratorParamsHandle; param: PAnsiChar; value: Single);cdecl;external bearlibmgLIB; function mg_params_get(GeneratorParams: TGeneratorParamsHandle; param: PAnsiChar): Integer;cdecl;external bearlibmgLIB; function mg_params_getf(GeneratorParams: TGeneratorParamsHandle; param: PAnsiChar): Single;cdecl;external bearlibmgLIB; procedure mg_params_setstr(GeneratorParams: TGeneratorParamsHandle; somestring: PAnsiChar);cdecl;external bearlibmgLIB; function mg_roomsdata_create: TRoomsDataHandle;cdecl;external bearlibmgLIB; procedure mg_roomsdata_delete(RoomsData: TRoomsDataHandle);cdecl;external bearlibmgLIB; function mg_roomsdata_count(RoomsData: TRoomsDataHandle): Integer;cdecl;external bearlibmgLIB; procedure mg_roomsdata_position(RoomsData: TRoomsDataHandle; RoomIndex: Integer; var ax0, ay0, awidth, aheight: Integer);cdecl;external bearlibmgLIB; function mg_roomsdata_linkscount(RoomsData: TRoomsDataHandle; RoomIndex: Integer): Integer;cdecl;external bearlibmgLIB; function mg_roomsdata_getlink(RoomsData: TRoomsDataHandle; RoomIndex, LinkIndex: Integer): Integer;cdecl;external bearlibmgLIB; implementation end.
31.587156
225
0.722916
f15752187aa2b74a23f72e52bd6abdcbea6bc215
6,323
dfm
Pascal
Source/frmWatches.dfm
sajithanangolath/pyscripter
00a9ba8a1c8357df6e055dd79fa8065702f3b211
[ "MIT" ]
1
2019-07-12T21:11:32.000Z
2019-07-12T21:11:32.000Z
Source/frmWatches.dfm
sajithanangolath/pyscripter
00a9ba8a1c8357df6e055dd79fa8065702f3b211
[ "MIT" ]
null
null
null
Source/frmWatches.dfm
sajithanangolath/pyscripter
00a9ba8a1c8357df6e055dd79fa8065702f3b211
[ "MIT" ]
null
null
null
inherited WatchesWindow: TWatchesWindow Left = 331 Top = 325 HelpContext = 490 Caption = 'Watches' ClientHeight = 229 ClientWidth = 760 Icon.Data = { 0000010001001010000001002000280400001600000028000000100000002000 0000010020000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000A76F 4EA9C28D67FFBF8A65FFBD8763FFBA8460FFB8825EFFB37D5BFFB17B59FFB07A 57FFAD7856FFAC7555FFAA7453FFA87252FFA87050FFA76F4EA900000000C891 6BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA87150FF00000000CA93 6DFFC6B2A9FF6E4E32FF6E4E32FF6E4E32FFAB968BFFFEFEFCFFFEFEFCFFC6B2 A9FF6E4E32FF6E4E32FF6E4E32FFC6B2A9FFFFFFFFFFA97252FF00000000CC96 6EFF6E4E32FFECE8E4FFFFFFFCFFC6B2A9FF6E4E32FFFEFEFBFFFDFDFAFF6E4E 32FFECE8E4FFFFFFFCFFC6B2A9FF6E4E32FFFFFFFFFFAB7453FF00000000D19B 72FF6E4E32FFFFFAEBFFFFFFFCFFFFFFFCFF6E4E32FFFDFDFBFFFDFDFAFF6E4E 32FFFFFAEBFFFFFFFCFFFFFFFCFF6E4E32FFFFFFFFFFAF7957FF00000000D49D 74FF6E4E32FFFFF3D5FFFFFAEBFFFFFAEBFF6E4E32FFC6B2A9FFC6B2A9FF6E4E 32FFFFF3D5FFFFFAEBFFFFFAEBFF6E4E32FFFFFFFFFFB17B59FF00000000D59F 75FFC6B2A9FF6E4E32FF6E4E32FF6E4E32FFC6B2A9FF6E4E32FF6E4E32FFC6B2 A9FF6E4E32FF6E4E32FF6E4E32FFAB968BFFFFFFFFFFB47D5BFF00000000D8A1 78FFFFFFFFFF876C55FFC6B2A9FFFCFBF9FFFBFAF6FFFBF8F5FFFBF7F4FFFBF6 F1FFF8F4EEFFF7F2EBFFC6B2A9FF6E4E32FFFFFFFFFFB6805DFF00000000D9A2 78FFFFFFFFFFFCFBF9FF6E4E32FFC6B2A9FFFBF7F4FFFAF7F2FF6E4E32FFF7F3 EDFFF6EFEAFFF5EBE7FFF3EAE4FFC6B2A9FF6E4E32FFB9845FFF00000000DBA3 79FFFFFFFFFFFFFFFFFFFFFFFFFF6E4E32FFC6B2A9FFFFFFFFFF876C55FFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6B2A9FF6E4E32FF00000000DCA6 7AFFDCA67AFFDCA67AFFDCA67AFFDCA67AFFDCA67AFFDCA67AFFDCA67AFFDCA6 7AFFDCA67AFFDCA67AFFDCA67AFFDCA67AFFDCA67AFFBF8A65FF00000000D8AB 84FDE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFBF8F69FD00000000A670 516BDCAD8CF4DCA67AFFDCA579FFDAA379FFD8A178FFD59F75FFD49D74FFD29C 72FFCF9971FFCE986FFFCB956EFFC9936BFFC39679F4A670516B000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000} ExplicitWidth = 776 ExplicitHeight = 268 PixelsPerInch = 96 TextHeight = 13 inherited BGPanel: TPanel Width = 760 Height = 229 ExplicitWidth = 760 ExplicitHeight = 229 inherited FGPanel: TPanel Width = 756 Height = 225 ExplicitWidth = 756 ExplicitHeight = 225 object Panel1: TPanel Left = 0 Top = 0 Width = 756 Height = 225 Align = alClient TabOrder = 0 object WatchesView: TVirtualStringTree Left = 1 Top = 1 Width = 754 Height = 223 Align = alClient Alignment = taRightJustify BevelInner = bvNone BevelOuter = bvNone BorderStyle = bsNone Header.AutoSizeIndex = -1 Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoHotTrack, hoOwnerDraw, hoVisible] HintMode = hmTooltip Images = CommandsDataModule.CodeImages PopupMenu = TBXPopupMenu TabOrder = 0 TreeOptions.AnimationOptions = [toAnimatedToggle] TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale] TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toReportMode, toToggleOnDblClick, toWheelPanning] TreeOptions.PaintOptions = [toHideSelection, toHotTrack, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toThemeAware, toUseBlendedImages, toUseBlendedSelection] TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toRightClickSelect] TreeOptions.StringOptions = [toAutoAcceptEditChange] OnDblClick = WatchesViewDblClick OnDragOver = WatchesViewDragOver OnDragDrop = WatchesViewDragDrop OnFreeNode = WatchesViewFreeNode OnGetText = WatchesViewGetText OnGetImageIndex = WatchesViewGetImageIndex OnInitChildren = WatchesViewInitChildren OnInitNode = WatchesViewInitNode OnKeyDown = WatchesViewKeyDown Columns = < item Position = 0 Text = 'Watches' Width = 200 end item Position = 1 Text = 'Type' Width = 120 end item Position = 2 Text = 'Value' Width = 434 end> end end end end inherited DockClient: TJvDockClient Left = 24 Top = 26 end object TBXPopupMenu: TSpTBXPopupMenu Images = CommandsDataModule.Images OnPopup = TBXPopupMenuPopup Left = 24 Top = 85 object mnAddWatch: TSpTBXItem Caption = '&Add Watch' ImageIndex = 49 OnClick = mnAddWatchClick end object TBXItem1: TSpTBXItem Action = PyIDEMainForm.actAddWatchAtCursor end object mnRemoveWatch: TSpTBXItem Caption = '&Remove Watch' ImageIndex = 50 OnClick = mnRemoveWatchClick end object mnEditWatch: TSpTBXItem Caption = '&Edit Watch' ImageIndex = 92 OnClick = mnEditWatchClick end object TBXSeparatorItem1: TSpTBXSeparatorItem end object mnClearall: TSpTBXItem Caption = '&Clear all' Hint = 'Clear all watches' ImageIndex = 14 OnClick = mnClearAllClick end object TBXSeparatorItem2: TSpTBXSeparatorItem end object mnCopyToClipboard: TSpTBXItem Caption = 'Co&py to Clipboard' Hint = 'Copy to clipboard' ImageIndex = 12 OnClick = mnCopyToClipboardClick end end end
39.51875
184
0.724498
f180ae1938b18f8b61d3ddb6b7465923d3bf4aa0
37,926
pas
Pascal
Test/USourceUtilsTests.pas
Walibeiro/DWScript
950242fd23f842a6a72afaee594665b52fbf6cb7
[ "Condor-1.1" ]
null
null
null
Test/USourceUtilsTests.pas
Walibeiro/DWScript
950242fd23f842a6a72afaee594665b52fbf6cb7
[ "Condor-1.1" ]
null
null
null
Test/USourceUtilsTests.pas
Walibeiro/DWScript
950242fd23f842a6a72afaee594665b52fbf6cb7
[ "Condor-1.1" ]
null
null
null
unit USourceUtilsTests; {$I ..\Source\dws.inc} interface uses Classes, SysUtils, dwsXPlatformTests, dwsComp, dwsCompiler, dwsExprs, dwsDataContext, dwsTokenizer, dwsErrors, dwsUtils, Variants, dwsSymbols, dwsSuggestions, dwsFunctions, dwsCaseNormalizer; type TSourceUtilsTests = class (TTestCase) private FCompiler : TDelphiWebScript; function NeedUnitHandler(const unitName : UnicodeString; var unitSource : UnicodeString) : IdwsUnit; public procedure SetUp; override; procedure TearDown; override; published procedure BasicSuggestTest; procedure ObjectCreateTest; procedure ObjectSelfTest; procedure UnitDotTest; procedure MetaClassTest; procedure EmptyOptimizedLocalTable; procedure StringTest; procedure StaticArrayTest; procedure DynamicArrayTest; procedure ObjectArrayTest; procedure HelperSuggestTest; procedure SuggestInUsesSection; procedure SuggestAfterCall; procedure SuggestAcrossLines; procedure SymDictFunctionForward; procedure SymDictInherited; procedure SymDictParamExplicit; procedure SymDictParamImplicit; procedure ReferencesVars; procedure InvalidExceptSuggest; procedure EnumerationNamesAndValues; procedure BigEnumerationNamesAndValues; procedure EnumerationSuggest; procedure StaticClassSuggest; procedure SuggestInBlockWithError; procedure NormalizeOverload; procedure OptimizedIfThenBlockSymbol; procedure MemberVisibilities; end; // ------------------------------------------------------------------ // ------------------------------------------------------------------ // ------------------------------------------------------------------ implementation // ------------------------------------------------------------------ // ------------------------------------------------------------------ // ------------------------------------------------------------------ // ------------------ // ------------------ TSourceUtilsTests ------------------ // ------------------ // SetUp // procedure TSourceUtilsTests.SetUp; begin FCompiler:=TDelphiWebScript.Create(nil); FCompiler.Config.CompilerOptions:=FCompiler.Config.CompilerOptions+[coSymbolDictionary, coContextMap]; FCompiler.OnNeedUnit:=NeedUnitHandler; end; // TearDown // procedure TSourceUtilsTests.TearDown; begin FCompiler.Free; end; // BasicSuggestTest // procedure TSourceUtilsTests.BasicSuggestTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'var printit : Boolean;'#13#10 +'PrintL'); CheckTrue(prog.Msgs.HasErrors, 'compiled with errors'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 1); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckTrue(sugg.Count>0, 'all suggestions'); scriptPos.Col:=2; sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckTrue(sugg.Count>3, 'column 2'); CheckEquals('printit', sugg.Code[0], 'sugg 2, 0'); CheckEquals('PadLeft', sugg.Code[1], 'sugg 2, 1'); CheckEquals('PadRight', sugg.Code[2], 'sugg 2, 2'); CheckEquals('Param', sugg.Code[3], 'sugg 2, 3'); scriptPos.Col:=3; sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(7, sugg.Count, 'column 7'); CheckEquals('printit', sugg.Code[0], 'sugg 7, 0'); CheckEquals('Print', sugg.Code[1], 'sugg 7, 1'); CheckEquals('PrintLn', sugg.Code[2], 'sugg 7, 2'); CheckEquals('PrivateVarsNames', sugg.Code[3], 'sugg 7, 3'); CheckEquals('procedure', sugg.Code[4], 'sugg 7, 4'); CheckEquals('property', sugg.Code[5], 'sugg 7, 5'); CheckEquals('Pred', sugg.Code[6], 'sugg 7, 6'); scriptPos.Col:=7; sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 7'); CheckEquals('PrintLn', sugg.Code[0], 'sugg 7, 0'); end; // ObjectCreateTest // procedure TSourceUtilsTests.ObjectCreateTest; const cBase = 'type TMyClass = class constructor CreateIt; class function CrDummy : Integer; method CrStuff; end;'#13#10; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile(cBase+'TObject.Create'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 10); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(4, sugg.Count, 'TObject.Create 10'); CheckEquals('ClassName', sugg.Code[0], 'TObject.Create 10,0'); CheckEquals('ClassParent', sugg.Code[1], 'TObject.Create 10,1'); CheckEquals('ClassType', sugg.Code[2], 'TObject.Create 10,2'); CheckEquals('Create', sugg.Code[3], 'TObject.Create 10,3'); scriptPos.Col:=11; sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'TObject.Create 11'); CheckEquals('Create', sugg.Code[0], 'TObject.Create 11,0'); prog:=FCompiler.Compile(cBase+'TMyClass.Create'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 12); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(3, sugg.Count, 'TMyClass.Create 12'); CheckEquals('CrDummy', sugg.Code[0], 'TMyClass.Create 12,0'); CheckEquals('Create', sugg.Code[1], 'TMyClass.Create 12,1'); CheckEquals('CreateIt', sugg.Code[2], 'TMyClass.Create 12,2'); scriptPos.Col:=13; sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(2, sugg.Count, 'TMyClass.Create 13'); CheckEquals('Create', sugg.Code[0], 'TMyClass.Create 13,0'); CheckEquals('CreateIt', sugg.Code[1], 'TMyClass.Create 13,1'); prog:=FCompiler.Compile(cBase+'new TObject'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 6); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(4, sugg.Count, 'new TObject 6'); CheckEquals('TMyClass', sugg.Code[0], 'new TObject 6,0'); CheckEquals('TClass', sugg.Code[1], 'new TObject 6,1'); CheckEquals('TCustomAttribute', sugg.Code[2], 'new TCustomAttribute 6,2'); CheckEquals('TObject', sugg.Code[3], 'new TObject 6,3'); scriptPos.Col:=7; sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'new TObject 7'); CheckEquals('TObject', sugg.Code[0], 'new TObject 7,0'); end; // ObjectSelfTest // procedure TSourceUtilsTests.ObjectSelfTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'type TMyClass = class constructor Create; procedure Test; end;'#13#10 +'procedure TMyClass.Test;begin'#13#10 +'Self.Create'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 3, 9); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'Create 9'); CheckEquals('Create', sugg.Code[0], 'Create 9,0'); CheckEquals('TMyClass', (sugg.Symbols[0] as TMethodSymbol).StructSymbol.Name, 'Create 9,0 struct'); prog:=FCompiler.Compile( 'type TMyClass = Class(TObject) Field : TMyClass; procedure first; procedure second; procedure third; End; ' +'procedure TMyClass.first; begin '#13#10 +'Self.Field.'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 12); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckTrue(sugg.Count>=9, 'Self 12'); CheckEquals('Field', sugg.Code[0], 'Self 12,0'); CheckEquals('first', sugg.Code[1], 'Self 12,1'); CheckEquals('second', sugg.Code[2], 'Self 12,2'); CheckEquals('third', sugg.Code[3], 'Self 12,3'); CheckEquals('ClassName', sugg.Code[4], 'Self 12,4'); CheckEquals('ClassParent', sugg.Code[5], 'Self 12,5'); CheckEquals('ClassType', sugg.Code[6], 'Self 12,6'); CheckEquals('Create', sugg.Code[7], 'Self 12,7'); end; // UnitDotTest // procedure TSourceUtilsTests.UnitDotTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('Internal.PrintL'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 1, 11); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckTrue(sugg.Count>5, 'column 11'); CheckEquals('PadLeft', sugg.Code[0], 'sugg 11, 0'); CheckEquals('PadRight', sugg.Code[1], 'sugg 11, 1'); CheckEquals('ParseDateTime', sugg.Code[2], 'sugg 11, 2'); CheckEquals('Pi', sugg.Code[3], 'sugg 11, 3'); CheckEquals('PixmapToJPEGData', sugg.Code[4], 'sugg 11, 4'); scriptPos.Col:=12; sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(1, sugg.Count, 'column 12'); CheckEquals('PrivateVarsNames', sugg.Code[0], 'sugg 12, 0'); prog:=FCompiler.Compile('System.TObject'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 1, 8); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckTrue(sugg.Count>10, 'column 8'); CheckEquals('BigInteger', sugg.Code[0], 'sugg 8, 0'); CheckEquals('Boolean', sugg.Code[1], 'sugg 8, 1'); CheckEquals('CompilerVersion', sugg.Code[2], 'sugg 8, 2'); CheckEquals('DateTimeZone', sugg.Code[3], 'sugg 8, 3'); scriptPos.Col:=9; sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(9, sugg.Count, 'column 9'); CheckEquals('TClass', sugg.Code[0], 'sugg 9, 0'); CheckEquals('TComplex', sugg.Code[1], 'sugg 9, 1'); CheckEquals('TCustomAttribute', sugg.Code[2], 'sugg 9, 2'); CheckEquals('TObject', sugg.Code[3], 'sugg 9, 3'); CheckEquals('TRTTIRawAttribute', sugg.Code[4], 'sugg 9, 4'); CheckEquals('TRTTIRawAttributes', sugg.Code[5], 'sugg 9, 5'); CheckEquals('TRTTITypeInfo', sugg.Code[6], 'sugg 9, 6'); CheckEquals('TSourceCodeLocation', sugg.Code[7], 'sugg 9, 7'); CheckEquals('TVector', sugg.Code[8], 'sugg 9, 8'); end; // MetaClassTest // procedure TSourceUtilsTests.MetaClassTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('TClass.'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 1, 8); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckTrue(sugg.Count=0, 'TClass.'); prog:=FCompiler.Compile('var v : TClass;'#13#10'v.'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckTrue(sugg.Count=4, 'v.'); CheckEquals('ClassName', sugg.Code[0], 'v. 0'); CheckEquals('ClassParent', sugg.Code[1], 'v. 1'); CheckEquals('ClassType', sugg.Code[2], 'v. 2'); CheckEquals('Create', sugg.Code[3], 'v. 3'); end; function TSourceUtilsTests.NeedUnitHandler(const unitName: UnicodeString; var unitSource: UnicodeString): IdwsUnit; begin CheckEquals('SomeUnit', unitName, 'Only the unit ''SomeUnit'' is handled properly!'); unitSource := 'unit SomeUnit;'; end; // EmptyOptimizedLocalTable // procedure TSourceUtilsTests.EmptyOptimizedLocalTable; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin FCompiler.Config.CompilerOptions:=FCompiler.Config.CompilerOptions+[coOptimize]; prog:=FCompiler.Compile('procedure Dummy;'#13#10'begin begin'#13#10#13#10'end end'#13#10); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 1, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos); FCompiler.Config.CompilerOptions:=FCompiler.Config.CompilerOptions-[coOptimize]; end; // StringTest // procedure TSourceUtilsTests.StringTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('var s:='''';'#13#10's.h'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckTrue(sugg.Count>4, 's.'); CheckEquals('After', sugg.Code[0], 's. 0'); CheckEquals('Before', sugg.Code[1], 's. 1'); CheckEquals('Between', sugg.Code[2], 's. 2'); CheckEquals('CompareText', sugg.Code[3], 's. 3'); CheckEquals('CompareTo', sugg.Code[4], 's. 4'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 4); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckTrue(sugg.Count=3, 's.h'); CheckEquals('HexToBigInteger', sugg.Code[0], 's.h 0'); CheckEquals('HexToInteger', sugg.Code[1], 's.h 1'); CheckEquals('High', sugg.Code[2], 's.h 2'); end; // StaticArrayTest // procedure TSourceUtilsTests.StaticArrayTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('var s : array [0..2] of Integer;'#13#10's.h'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckTrue(sugg.Count=3, 's.'); CheckEquals('High', sugg.Code[0], 's. 0'); CheckEquals('Length', sugg.Code[1], 's. 1'); CheckEquals('Low', sugg.Code[2], 's. 2'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 4); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckTrue(sugg.Count=1, 's.h'); CheckEquals('High', sugg.Code[0], 's.h 0'); end; // DynamicArrayTest // procedure TSourceUtilsTests.DynamicArrayTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('var d : array of Integer;'#13#10'd.'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(19, sugg.Count, 'd.'); CheckEquals('Add', sugg.Code[0], 'd. 0'); CheckEquals('Clear', sugg.Code[1], 'd. 1'); CheckEquals('Copy', sugg.Code[2], 'd. 2'); CheckEquals('Count', sugg.Code[3], 'd. 3'); CheckEquals('Delete', sugg.Code[4], 'd. 4'); CheckEquals('High', sugg.Code[5], 'd. 5'); CheckEquals('IndexOf', sugg.Code[6], 'd. 6'); CheckEquals('Insert', sugg.Code[7], 'd. 7'); CheckEquals('Length', sugg.Code[8], 'd. 8'); CheckEquals('Low', sugg.Code[9], 'd. 9'); CheckEquals('Map', sugg.Code[10], 'd. 10'); CheckEquals('Peek', sugg.Code[11], 'd. 11'); CheckEquals('Pop', sugg.Code[12], 'd. 12'); CheckEquals('Push', sugg.Code[13], 'd. 13'); CheckEquals('Remove', sugg.Code[14], 'd. 14'); CheckEquals('Reverse', sugg.Code[15], 'd. 15'); CheckEquals('SetLength', sugg.Code[16], 'd. 16'); CheckEquals('Sort', sugg.Code[17], 'd. 17'); CheckEquals('Swap', sugg.Code[18], 'd. 18'); end; // ObjectArrayTest // procedure TSourceUtilsTests.ObjectArrayTest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'type TObj = class X : Integer; end; var a : array of TObj;'#13#10 +'a[0].'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 6); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(7, sugg.Count, 'a[0].'); CheckEquals('ClassName', sugg.Code[0], 'a[0]. 0'); CheckEquals('ClassParent', sugg.Code[1], 'a[0]. 1'); CheckEquals('ClassType', sugg.Code[2], 'a[0]. 2'); CheckEquals('Create', sugg.Code[3], 'a[0]. 3'); CheckEquals('Destroy', sugg.Code[4], 'a[0]. 4'); CheckEquals('Free', sugg.Code[5], 'a[0]. 5'); CheckEquals('X', sugg.Code[6], 'a[0]. 6'); end; // HelperSuggestTest // procedure TSourceUtilsTests.HelperSuggestTest; const cSugg : array [0..14] of String = ( 'Clamp', 'Factorial', 'Hello', 'IsOdd', 'IsPrime', 'LeastFactor', 'Max', 'Min', 'Next', 'Sign', 'Sqr', 'ToBin', 'ToHexString', 'ToString', 'Unsigned32' ); var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; i : Integer; begin prog:=FCompiler.Compile( 'type TIntegerHelper = helper for Integer const Hello = 123; ' +'function Next : Integer; begin Result:=Self+1; end; end;'#13#10 +'var d : Integer;'#13#10 +'d.'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 3, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(Length(cSugg), sugg.Count, 'd.'); for i:=0 to High(cSugg) do CheckEquals(cSugg[i], sugg.Code[i], 'd. '+IntToStr(i)); end; // SuggestAfterCall // procedure TSourceUtilsTests.SuggestAfterCall; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('function T(i : Integer) : String; forward;'#13#10 +'T(1).L'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 7); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(4, sugg.Count, '.L'); CheckEquals('Left', sugg.Code[0], '.L 0'); CheckEquals('Length', sugg.Code[1], '.L 1'); CheckEquals('Low', sugg.Code[2], '.L 2'); CheckEquals('LowerCase', sugg.Code[3], '.L 3'); prog:=FCompiler.Compile('function T(i : Integer) : String; forward;'#13#10 +'T(Ord(IntToStr(1)[1]+"])([")).Le'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 33); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(2, sugg.Count, '.Le'); CheckEquals('Left', sugg.Code[0], '.Le 0'); CheckEquals('Length', sugg.Code[1], '.Le 1'); end; procedure TSourceUtilsTests.SuggestInUsesSection; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('uses SomeUnit;'#13#10'So'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 1, 6); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(4, sugg.Count, 'There should be four units in the suggestions'); CheckEquals('Default', sugg.Code[0], 'Unit ''Default'' not found'); CheckEquals('Internal', sugg.Code[1], 'Unit ''Internal'' not found'); CheckEquals('SomeUnit', sugg.Code[2], 'Unit ''SomeUnit'' not found'); CheckEquals('System', sugg.Code[3], 'Unit ''System'' not found'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(1, sugg.Count, 'Should be only one suggestion'); CheckEquals('SomeUnit', sugg.Code[0], 'The suggestion should be the unit ''SomeUnit'''); // now check the same example without including units at all prog:=FCompiler.Compile('uses SomeUnit;'#13#10'So'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 1, 6); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords, soNoUnits]); CheckEquals(0, sugg.Count, 'There shouldn''t be units in the suggestions at all'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 3); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords, soNoUnits]); CheckEquals(0, sugg.Count, 'There shouldn''t be units in the suggestions at all'); end; // SuggestAcrossLines // procedure TSourceUtilsTests.SuggestAcrossLines; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile('function T(i : Integer) : String; forward;'#13#10 +'T('#13#10 +'1'#13#10 +')'#13#10 +'.LO'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 5, 4); sugg:=TdwsSuggestions.Create(prog, scriptPos, [soNoReservedWords]); CheckEquals(2, sugg.Count, '.Lo'); CheckEquals('Low', sugg.Code[0], '.Lo 0'); CheckEquals('LowerCase', sugg.Code[1], '.L 1'); end; // SymDictFunctionForward // procedure TSourceUtilsTests.SymDictFunctionForward; var prog : IdwsProgram; begin prog:=FCompiler.Compile( 'procedure Test; begin end;'); Check(prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suForward)=nil, 'Forward'); CheckEquals(1, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suDeclaration).ScriptPos.Line, 'a Declaration'); CheckEquals(1, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suImplementation).ScriptPos.Line, 'a Implementation'); prog:=FCompiler.Compile( 'procedure Test; forward;'#13#10 +'procedure Test; begin end;'); CheckEquals(1, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suForward).ScriptPos.Line, 'b Forward'); CheckEquals(1, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suDeclaration).ScriptPos.Line, 'b Declaration'); CheckEquals(2, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suImplementation).ScriptPos.Line, 'b Implementation'); prog:=FCompiler.Compile( 'unit Test; interface'#13#10 +'procedure Test;'#13#10 +'implementation'#13#10 +'procedure Test; begin end;'); CheckEquals(2, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suForward).ScriptPos.Line, 'c Forward'); CheckEquals(2, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suDeclaration).ScriptPos.Line, 'c Declaration'); CheckEquals(4, prog.SymbolDictionary.FindSymbolUsageOfType('Test', TFuncSymbol, suImplementation).ScriptPos.Line, 'c Implementation'); end; // SymDictInherited // procedure TSourceUtilsTests.SymDictInherited; var prog : IdwsProgram; symPosList : TSymbolPositionList; sym : TSymbol; begin prog:=FCompiler.Compile( 'type TBaseClass = class procedure Foo; virtual; end;'#13#10 +'type TDerivedClass = class(TBaseClass) procedure Foo; override; end;'#13#10 +'procedure TDerivedClass.Foo; begin'#13#10 +'inherited;'#13#10 +'inherited Foo;'#13#10 +'end;'); // base method sym:=prog.Table.FindSymbol('TBaseClass', cvMagic); sym:=(sym as TClassSymbol).Members.FindSymbol('Foo', cvMagic); symPosList:=prog.SymbolDictionary.FindSymbolPosList(sym); CheckEquals(4, symPosList.Count); CheckEquals(1, symPosList[0].ScriptPos.Line, 'TBaseClass Line 1'); Check(symPosList[0].SymbolUsages=[suDeclaration], 'TBaseClass Line 1 usage'); CheckEquals(2, symPosList[1].ScriptPos.Line, 'TBaseClass Line 2'); Check(symPosList[1].SymbolUsages=[suReference, suImplicit], 'TBaseClass Line 2 usage'); CheckEquals(4, symPosList[2].ScriptPos.Line, 'TBaseClass Line 4'); Check(symPosList[2].SymbolUsages=[suReference, suImplicit], 'TBaseClass Line 4 usage'); CheckEquals(5, symPosList[3].ScriptPos.Line, 'TBaseClass Line 5'); Check(symPosList[3].SymbolUsages=[suReference], 'TBaseClass Line 5 usage'); // derived method sym:=prog.Table.FindSymbol('TDerivedClass', cvMagic); sym:=(sym as TClassSymbol).Members.FindSymbol('Foo', cvMagic); symPosList:=prog.SymbolDictionary.FindSymbolPosList(sym); CheckEquals(2, symPosList.Count); CheckEquals(2, symPosList[0].ScriptPos.Line, 'TDerivedClass Line 2'); Check(symPosList[0].SymbolUsages=[suDeclaration], 'TDerivedClass Line 2 usage'); CheckEquals(3, symPosList[1].ScriptPos.Line, 'TDerivedClass Line 3'); Check(symPosList[1].SymbolUsages=[suImplementation], 'TDerivedClass Line 3 usage'); end; // SymDictParamExplicit // procedure TSourceUtilsTests.SymDictParamExplicit; var prog : IdwsProgram; sym : TTypeSymbol; spl : TSymbolPositionList; begin prog:=FCompiler.Compile( 'type TTest = class end;'#13#10 +'procedure Test(a : TTest); begin end;'#13#10 +'Test(nil);'#13#10); CheckEquals('', prog.Msgs.AsInfo); sym := prog.Table.FindTypeSymbol('TTest', cvMagic); spl := prog.SymbolDictionary.FindSymbolPosList(sym); CheckEquals(2, spl.Count, 'TTest'); CheckEquals(' [line: 1, column: 6]', spl.Items[0].ScriptPos.AsInfo); CheckEquals(' [line: 2, column: 20]', spl.Items[1].ScriptPos.AsInfo); spl := prog.SymbolDictionary.FindSymbolPosList('a'); CheckEquals(1, spl.Count, 'a'); CheckEquals(' [line: 2, column: 16]', spl.Items[0].ScriptPos.AsInfo); spl := prog.SymbolDictionary.FindSymbolPosList('Test'); CheckEquals(2, spl.Count, 'Test'); CheckEquals(' [line: 2, column: 11]', spl.Items[0].ScriptPos.AsInfo); CheckEquals(' [line: 3, column: 1]', spl.Items[1].ScriptPos.AsInfo); end; // SymDictParamImplicit // procedure TSourceUtilsTests.SymDictParamImplicit; var prog : IdwsProgram; sym : TTypeSymbol; spl : TSymbolPositionList; begin prog:=FCompiler.Compile( 'type TTest = class end;'#13#10 +'procedure Test(a : TTest = nil); begin end;'#13#10 +'Test();'#13#10); CheckEquals('', prog.Msgs.AsInfo); sym := prog.Table.FindTypeSymbol('TTest', cvMagic); spl := prog.SymbolDictionary.FindSymbolPosList(sym); CheckEquals(2, spl.Count, 'TTest'); CheckEquals(' [line: 1, column: 6]', spl.Items[0].ScriptPos.AsInfo); CheckEquals(' [line: 2, column: 20]', spl.Items[1].ScriptPos.AsInfo); spl := prog.SymbolDictionary.FindSymbolPosList('a'); CheckEquals(1, spl.Count, 'a'); CheckEquals(' [line: 2, column: 16]', spl.Items[0].ScriptPos.AsInfo); spl := prog.SymbolDictionary.FindSymbolPosList('Test'); CheckEquals(2, spl.Count, 'Test'); CheckEquals(' [line: 2, column: 11]', spl.Items[0].ScriptPos.AsInfo); CheckEquals(' [line: 3, column: 1]', spl.Items[1].ScriptPos.AsInfo); end; // ReferencesVars // procedure TSourceUtilsTests.ReferencesVars; var prog : IdwsProgram; sym : TDataSymbol; funcSym : TSymbol; funcExec : IExecutable; begin prog:=FCompiler.Compile( 'var i : Integer;'#13#10 +'if i>0 then Inc(i);'#13#10 +'function Test : Integer;'#13#10 +'begin var i:=1; result:=i; end;'#13#10); CheckEquals('', prog.Msgs.AsInfo); sym:=TDataSymbol(prog.Table.FindSymbol('i', cvMagic, TDataSymbol)); CheckEquals('TDataSymbol', sym.ClassName, 'i class'); CheckTrue(prog.ProgramObject.Expr.ReferencesVariable(sym), 'referenced in program'); funcSym:=prog.Table.FindSymbol('Test', cvMagic); CheckEquals('TSourceFuncSymbol', funcSym.ClassName, 'Test class'); funcExec:=(funcSym as TFuncSymbol).Executable; CheckFalse((funcExec.GetSelf as TdwsProgram).Expr.ReferencesVariable(sym), 'not referenced in test'); end; // InvalidExceptSuggest // procedure TSourceUtilsTests.InvalidExceptSuggest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'try'#13#10 +'except'#13#10 +'on e : Exception do'#13#10 +'e.s'#13#10); CheckTrue(prog.Msgs.HasErrors, 'compiled with errors'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 4, 4); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 4'); CheckEquals('StackTrace', sugg.Code[0], 'sugg 2, 0'); end; // EnumerationNamesAndValues // procedure TSourceUtilsTests.EnumerationNamesAndValues; var prog : IdwsProgram; enum : TEnumerationSymbol; begin prog:=FCompiler.Compile( 'type TContinuous = (c1, c2, c3);'#13#10 +'type TContinuous2 = (d1 = 1, d2 = 2, d3 = 3);'#13#10 +'type TDiscontinuous = (e1 = 1, e2 = 3, e3 = 4);'); CheckEquals('', prog.Msgs.AsInfo, 'compiled with errors'); enum:=(prog.Table.FindTypeSymbol('TContinuous', cvPublic) as TEnumerationSymbol); CheckEquals('c1', enum.ElementByValue(0).Name); CheckEquals('c2', enum.ElementByValue(1).Name); CheckEquals('c3', enum.ElementByValue(2).Name); CheckNull(enum.ElementByValue(3), 'continuous'); enum:=(prog.Table.FindTypeSymbol('TContinuous2', cvPublic) as TEnumerationSymbol); CheckNull(enum.ElementByValue(0), 'continuous2'); CheckEquals('d1', enum.ElementByValue(1).Name); CheckEquals('d2', enum.ElementByValue(2).Name); CheckEquals('d3', enum.ElementByValue(3).Name); enum:=(prog.Table.FindTypeSymbol('TDiscontinuous', cvPublic) as TEnumerationSymbol); CheckEquals('e1', enum.ElementByValue(1).Name); CheckNull(enum.ElementByValue(2), 'discontinuous'); CheckEquals('e2', enum.ElementByValue(3).Name); CheckEquals('e3', enum.ElementByValue(4).Name); end; // BigEnumerationNamesAndValues // procedure TSourceUtilsTests.BigEnumerationNamesAndValues; var i : Integer; s : String; prog : IdwsProgram; enum : TEnumerationSymbol; begin s:='type TTest = ('; for i:=1 to 100 do begin if i>1 then s:=s+','; s:=s+'v'+IntToStr(i); end; prog:=FCompiler.Compile(s+');'); CheckEquals('', prog.Msgs.AsInfo, 'compiled with errors'); enum:=(prog.Table.FindTypeSymbol('TTest', cvPublic) as TEnumerationSymbol); for i:=1 to 100 do begin CheckEquals(i-1, (enum.Elements.FindLocal('v'+IntToStr(i)) as TElementSymbol).Value, 'value of '+IntToStr(i-1)); CheckEquals('v'+IntToStr(i), enum.ElementByValue(i-1).Name, 'name of '+IntToStr(i-1)); end; end; // EnumerationSuggest // procedure TSourceUtilsTests.EnumerationSuggest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'type TTest = (One);'#13#10 +'Print(TTest.One.Name);'#13#10 +'var i : TTest;'#13#10 +'Print(i.Value);'#13#10); CheckEquals('', prog.Msgs.AsInfo, 'compiled with errors'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 13); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 13'); CheckEquals('One', sugg.Code[0], 'sugg 2, 13, 0'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 2, 18); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 18'); CheckEquals('Name', sugg.Code[0], 'sugg 2, 18, 0'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 4, 10); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 10'); CheckEquals('Value', sugg.Code[0], 'sugg 4, 10, 0'); end; // StaticClassSuggest // procedure TSourceUtilsTests.StaticClassSuggest; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'type TTest = class static public'#13#10 +'class function GetTest(i : Integer) : String; begin Result:=""; end;'#13#10 +'property Test[i : Integer] : String read GetTest;'#13#10 +'end;'#13#10 +'Print(TTest.GetTest(1));'#13#10 +'Print(TTest.Test[2]);'#13#10); CheckEquals('', prog.Msgs.AsInfo, 'compiled with errors'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 5, 13); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(5, sugg.Count, 'column 13'); CheckEquals('ClassName', sugg.Code[0], 'sugg 5, 13, 0'); CheckEquals('ClassParent', sugg.Code[1], 'sugg 5, 13, 1'); CheckEquals('ClassType', sugg.Code[2], 'sugg 5, 13, 2'); CheckEquals('GetTest', sugg.Code[3], 'sugg 5, 13, 3'); CheckEquals('Test', sugg.Code[4], 'sugg 5, 13, 4'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 5, 14); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 5,14'); CheckEquals('GetTest', sugg.Code[0], 'sugg 5, 14, 0'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 6, 14); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(1, sugg.Count, 'column 6,10'); CheckEquals('Test', sugg.Code[0], 'sugg 6, 14, 0'); end; // SuggestInBlockWithError // procedure TSourceUtilsTests.SuggestInBlockWithError; var prog : IdwsProgram; sugg : IdwsSuggestions; scriptPos : TScriptPos; begin prog:=FCompiler.Compile( 'begin'#13#10 +'var xyz := "";'#13#10 +'x'); CheckNotEquals('', prog.Msgs.AsInfo, 'should have compiled with errors'); scriptPos:=TScriptPos.Create(prog.SourceList[0].SourceFile, 3, 2); sugg:=TdwsSuggestions.Create(prog, scriptPos); CheckEquals(2, sugg.Count, 'line 3 col 2'); CheckEquals('xyz', sugg.Code[0], '3,2,0'); CheckEquals('xor', sugg.Code[1], '3,2,1'); end; // NormalizeOverload // type TTestNormalizer = class (TStringList) procedure Normalize(line, col : Integer; const name : String); end; procedure TTestNormalizer.Normalize(line, col : Integer; const name : String); begin Add(Format('%d, %d, %s', [line, col, name])); end; procedure TSourceUtilsTests.NormalizeOverload; var prog : IdwsProgram; lines : TStringList; normalizer : TTestNormalizer; begin lines:=TStringList.Create; try lines.Text:= 'unit Unit1;'#13#10 +'interface'#13#10 +'procedure Test(const A, Blah: string; const C: string); overload;'#13#10 +'procedure Test; overload;'#13#10 +'implementation'#13#10 +'procedure Test(const A, Blah: string; const C: string);'#13#10 +'begin end;'#13#10 +'procedure Test;'#13#10 +'begin end;'; prog:=FCompiler.Compile(lines.Text); CheckEquals('', prog.Msgs.AsInfo, 'should have compiled without errors'); normalizer:=TTestNormalizer.Create; try NormalizeSymbolsCase(lines, prog.SourceList[0].SourceFile, prog.SymbolDictionary, normalizer.Normalize); finally normalizer.Free; end; finally lines.Free; end; end; // OptimizedIfThenBlockSymbol // procedure TSourceUtilsTests.OptimizedIfThenBlockSymbol; procedure CheckSymbols(dic : TdwsSymbolDictionary); var sym : TSymbol; begin CheckEquals(1, dic.Count); sym := dic.Items[0].Symbol; if sym.Name = 'xyz' then CheckEquals(1, dic.Items[0].Count, '1 usage of xyz'); end; var prog : IdwsProgram; options : TCompilerOptions; begin options:=FCompiler.Config.CompilerOptions; try FCompiler.Config.CompilerOptions := options + [coOptimize]; prog:=FCompiler.Compile( 'if False then begin'#13#10 +'var xyz := "";'#13#10 +'end;'); CheckEquals('', prog.Msgs.AsInfo, 'should have compiled without errors 1'); CheckSymbols(prog.SymbolDictionary); FCompiler.Config.CompilerOptions := options; prog:=FCompiler.Compile( 'if False then begin'#13#10 +'var xyz := "";'#13#10 +'end;'); CheckEquals('', prog.Msgs.AsInfo, 'should have compiled without errors 2'); CheckSymbols(prog.SymbolDictionary); finally FCompiler.Config.CompilerOptions := options; end; end; // MemberVisibilities // procedure TSourceUtilsTests.MemberVisibilities; var prog : IdwsProgram; sym : TTypeSymbol; begin prog:=FCompiler.Compile( 'type TPrivate = class private field : Integer; end;'#13#10 +'type TPrivateRec = record private field : Integer; end;'#13#10 +'type TPublished = class published function func : Integer; begin Result := 1; end; end;'#13#10 +'type TPublicProtected = class (Object) protected field : Integer; public property prop : Integer read field; end;'); sym := prog.Table.FindTypeLocal('TPrivate'); CheckTrue((sym as TCompositeTypeSymbol).MembersVisibilities = [cvPrivate, cvPublic], 'private class'); sym := prog.Table.FindTypeLocal('TPrivateRec'); CheckTrue((sym as TCompositeTypeSymbol).MembersVisibilities = [cvPrivate], 'private record'); sym := prog.Table.FindTypeLocal('TPublished'); CheckTrue((sym as TCompositeTypeSymbol).MembersVisibilities = [cvPublic, cvPublished], 'published class'); sym := prog.Table.FindTypeLocal('TPublicProtected'); CheckTrue((sym as TCompositeTypeSymbol).MembersVisibilities = [cvPublic, cvProtected], 'public protected class'); end; // ------------------------------------------------------------------ // ------------------------------------------------------------------ // ------------------------------------------------------------------ initialization // ------------------------------------------------------------------ // ------------------------------------------------------------------ // ------------------------------------------------------------------ RegisterTest('SourceUtilsTests', TSourceUtilsTests); end.
37.073314
137
0.628672
835a8b29b738bd62d45ea6f22d3aa49eaae62f16
2,840
pas
Pascal
library/fhir/fhir_client_debugger.pas
rhausam/fhirserver
d7e2fc59f9c55b1989367b4d3e2ad8a811e71af3
[ "BSD-3-Clause" ]
132
2015-02-02T00:22:40.000Z
2021-08-11T12:08:08.000Z
library/fhir/fhir_client_debugger.pas
rhausam/fhirserver
d7e2fc59f9c55b1989367b4d3e2ad8a811e71af3
[ "BSD-3-Clause" ]
113
2015-03-20T01:55:20.000Z
2021-10-08T16:15:28.000Z
library/fhir/fhir_client_debugger.pas
rhausam/fhirserver
d7e2fc59f9c55b1989367b4d3e2ad8a811e71af3
[ "BSD-3-Clause" ]
49
2015-04-11T14:59:43.000Z
2021-03-30T10:29:18.000Z
unit fhir_client_debugger; { Copyright (c) 2011+, HL7 and Health Intersections Pty Ltd (http://www.healthintersections.com.au) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } {$I fhir.inc} interface uses SysUtils, Classes, System.UITypes, fsl_base, fhir_objects, fhir_client, fhir_client_threaded; type TFhirDebuggerCommunicator = class (TFhirFacadeCommunicator) private FOwner : TComponent; protected procedure process(Package : TFhirThreadedClientPackage); override; public constructor Create(internal: TFhirClientV; owner : TComponent); end; implementation {$IFDEF FMX} uses FHIR.Client.InteractiveFMX; {$ENDIF} { TFhirDebuggerCommunicator } constructor TFhirDebuggerCommunicator.Create(internal: TFhirClientV; owner: TComponent); begin inherited Create(internal); FOwner := owner; end; procedure TFhirDebuggerCommunicator.process(Package: TFhirThreadedClientPackage); begin {$IFDEF FMX} InteractiveClientForm := TInteractiveClientForm.Create(FOwner); try InteractiveClientForm.package := Package.Link; InteractiveClientForm.client := FClient.Link; if InteractiveClientForm.showModal = mrAbort then raise EAbort.Create('Operation aborted by debugger'); finally InteractiveClientForm.Free; end; {$ELSE} raise EFslException.Create('VCL not done yet'); {$ENDIF} end; end.
33.809524
98
0.764085
f1594621ab66d03ce9d1bfef862ab4465eb1536e
45,149
pas
Pascal
library/fsl/fsl_graphql.pas
atkins126/fhirserver
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
[ "BSD-3-Clause" ]
null
null
null
library/fsl/fsl_graphql.pas
atkins126/fhirserver
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
[ "BSD-3-Clause" ]
null
null
null
library/fsl/fsl_graphql.pas
atkins126/fhirserver
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
[ "BSD-3-Clause" ]
null
null
null
unit fsl_graphql; { Copyright (c) 2011+, HL7 and Health Intersections Pty Ltd (http://www.healthintersections.com.au) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } {$I fhir.inc} interface uses SysUtils, Classes, fsl_base, fsl_utilities, fsl_stream, fsl_json; Type TGraphQLSelection = class; TGraphQLFragment = class; TGraphQLArgument = class; TGraphQLValue = class (TFslObject) public Function Link : TGraphQLValue; overload; procedure write(str : TStringBuilder; indent : integer); virtual; function isValue(v : String): boolean; virtual; end; TGraphQLVariableValue = class (TGraphQLValue) private FValue : String; protected function sizeInBytesV : cardinal; override; public constructor Create(value : String); Function Link : TGraphQLVariableValue; overload; property Value : String read FValue write FValue; procedure write(str : TStringBuilder; indent : integer); override; function ToString : String; override; end; TGraphQLNumberValue = class (TGraphQLValue) private FValue : String; protected function sizeInBytesV : cardinal; override; public constructor Create(value : String); Function Link : TGraphQLNumberValue; overload; property Value : String read FValue write FValue; procedure write(str : TStringBuilder; indent : integer); override; function isValue(v : String): boolean; override; function ToString : String; override; end; TGraphQLNameValue = class (TGraphQLValue) private FValue : String; protected function sizeInBytesV : cardinal; override; public constructor Create(value : String); Function Link : TGraphQLValue; overload; property Value : String read FValue write FValue; procedure write(str : TStringBuilder; indent : integer); override; function isValue(v : String): boolean; override; function ToString : String; override; end; TGraphQLStringValue = class (TGraphQLValue) private FValue : String; protected function sizeInBytesV : cardinal; override; public constructor Create(value : String); Function Link : TGraphQLStringValue; overload; property Value : String read FValue write FValue; procedure write(str : TStringBuilder; indent : integer); override; function isValue(v : String): boolean; override; function ToString : String; override; end; TGraphQLArgumentListStatus = (listStatusNotSpecified, listStatusSingleton, listStatusRepeating); TGraphQLObjectValue = class (TGraphQLValue) private FFields : TFslList<TGraphQLArgument>; protected function sizeInBytesV : cardinal; override; public constructor Create; overload; override; constructor Create(json : TJsonObject); overload; destructor Destroy; override; Function Link : TGraphQLObjectValue; overload; property Fields : TFslList<TGraphQLArgument> read FFields; function addField(name : String; listStatus : TGraphQLArgumentListStatus) : TGraphQLArgument; procedure write(str : TStringBuilder; indent : integer); override; end; TGraphQLArgument = class (TFslObject) private FName: String; FValues: TFslList<TGraphQLValue>; FListStatus: TGraphQLArgumentListStatus; procedure write(str : TStringBuilder; indent : integer); procedure valuesFromNode(json : TJsonNode); protected function sizeInBytesV : cardinal; override; public constructor Create; overload; override; constructor Create(name : String; value : TGraphQLValue); overload; constructor Create(name : String; json : TJsonNode); overload; destructor Destroy; override; Function Link : TGraphQLArgument; overload; property Name : String read FName write FName; property listStatus : TGraphQLArgumentListStatus read FListStatus write FListStatus; property Values : TFslList<TGraphQLValue> read FValues; function hasValue(value : String) : boolean; procedure addValue(value : TGraphQLValue); end; TGraphQLDirective = class (TFslObject) private FName: String; FArguments: TFslList<TGraphQLArgument>; protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLDirective; overload; property Name : String read FName write FName; Property Arguments : TFslList<TGraphQLArgument> read FArguments; end; TGraphQLField = class (TFslObject) private FName: String; FSelectionSet: TFslList<TGraphQLSelection>; FAlias: String; FArguments: TFslList<TGraphQLArgument>; FDirectives: TFslList<TGraphQLDirective>; protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLField; overload; property Alias : String read FAlias write FAlias; Property Name : String read FName write FName; Property Arguments : TFslList<TGraphQLArgument> read FArguments; property Directives : TFslList<TGraphQLDirective> read FDirectives; property SelectionSet : TFslList<TGraphQLSelection> read FSelectionSet; function argument(name : String) : TGraphQLArgument; function hasDirective(name : String) : boolean; function directive(name : String) : TGraphQLDirective; end; TGraphQLFragmentSpread = class (TFslObject) private FName: String; FDirectives: TFslList<TGraphQLDirective>; protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLFragmentSpread; overload; property Name : String read FName write FName; property Directives : TFslList<TGraphQLDirective> read FDirectives; function hasDirective(name : String) : boolean; end; TGraphQLSelection = class (TFslObject) private FField : TGraphQLField; FInlineFragment: TGraphQLFragment; FFragmentSpread: TGraphQLFragmentSpread; procedure SetField(const Value: TGraphQLField); procedure SetFragmentSpread(const Value: TGraphQLFragmentSpread); procedure SetInlineFragment(const Value: TGraphQLFragment); protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLSelection; overload; property field : TGraphQLField read FField write SetField; property FragmentSpread : TGraphQLFragmentSpread read FFragmentSpread write SetFragmentSpread; property InlineFragment : TGraphQLFragment read FInlineFragment write SetInlineFragment; end; TGraphQLVariable = class (TFslObject) private FName: String; FDefaultValue: TGraphQLValue; FTypeName: String; procedure SetDefaultValue(const Value: TGraphQLValue); protected function sizeInBytesV : cardinal; override; public destructor Destroy; override; Function Link : TGraphQLVariable; overload; property Name : String read FName write FName; property TypeName : String read FTypeName write FTypeName; property DefaultValue : TGraphQLValue read FDefaultValue write SetDefaultValue; end; TGraphQLOperationType = (qglotQuery, qglotMutation); TGraphQLOperation = class (TFslObject) private FName: String; FoperationType: TGraphQLOperationType; FSelectionSet: TFslList<TGraphQLSelection>; FVariables: TFslList<TGraphQLVariable>; FDirectives: TFslList<TGraphQLDirective>; protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLOperation; overload; property operationType : TGraphQLOperationType read FoperationType write FoperationType; property Name : String read FName write FName; property Variables : TFslList<TGraphQLVariable> read FVariables; property Directives : TFslList<TGraphQLDirective> read FDirectives; property SelectionSet : TFslList<TGraphQLSelection> read FSelectionSet; function hasDirective(name : String) : boolean; end; TGraphQLFragment = class (TFslObject) private FName: String; FTypeCondition: String; FSelectionSet: TFslList<TGraphQLSelection>; FDirectives: TFslList<TGraphQLDirective>; protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLFragment; overload; property Name : String read FName write FName; property TypeCondition : String read FTypeCondition write FTypeCondition; property Directives : TFslList<TGraphQLDirective> read FDirectives; property SelectionSet : TFslList<TGraphQLSelection> read FSelectionSet; function hasDirective(name : String) : boolean; end; TGraphQLDocument = class (TFslObject) private FFragments: TFslList<TGraphQLFragment>; FOperations: TFslList<TGraphQLOperation>; protected function sizeInBytesV : cardinal; override; public constructor Create; override; destructor Destroy; override; Function Link : TGraphQLDocument; overload; property Operations : TFslList<TGraphQLOperation> read FOperations; property Fragments : TFslList<TGraphQLFragment> read FFragments; function fragment(name : String) : TGraphQLFragment; function operation(name : String) : TGraphQLOperation; end; TGraphQLPackage = class (TFslObject) private FDocument: TGraphQLDocument; FOperationName: String; FVariables: TFslList<TGraphQLArgument>; procedure SetDocument(const Value: TGraphQLDocument); protected function sizeInBytesV : cardinal; override; public constructor Create; overload; override; constructor Create(document : TGraphQLDocument); overload; destructor Destroy; override; function Link : TGraphQLPackage; overload; property Document : TGraphQLDocument read FDocument write SetDocument; property OperationName : String read FOperationName write FOperationName; property Variables : TFslList<TGraphQLArgument> read FVariables; end; TGraphQLPunctuator = (gqlpBang, gqlpDollar, gqlpOpenBrace, gqlpCloseBrace, gqlpEllipse, gqlpColon, gqlpEquals, gqlpAt, gqlpOpenSquare, gqlpCloseSquare, gqlpOpenCurly, gqlpVertical, gqlpCloseCurly); const LITERALS_TGraphQLPunctuator : array [TGraphQLPunctuator] of String = ('!', '$', '(', ')', '...', ':', '=', '@', '[', ']', '{', '|', '}'); type TGraphQLLexType = (gqlltNull, gqlltName, gqlltPunctuation, gqlltString, gqlltNumber); // graphql documents are in unicode // ignore: BOM, tab, space, #10,#13, comma, comment TGraphQLParser = class (TFslTextExtractor) private // lexer FToken : TStringBuilder; FPeek : String; FLexType: TGraphQLLexType; FLocation : TSourceLocation; Function getNextChar : Char; Procedure PushChar(ch : Char); procedure skipIgnore; procedure Next; function hasPunctuation(punc : String) : boolean; procedure consumePunctuation(punc : String); function hasName : boolean; overload; function hasName(name : String) : boolean; overload; function consumeName : String; overload; procedure consumeName(name : String); overload; function parseValue : TGraphQLValue; procedure parseFragmentInner(fragment: TGraphQLFragment); function parseFragmentSpread : TGraphQLFragmentSpread; function parseInlineFragment : TGraphQLFragment; function parseArgument : TGraphQLArgument; function parseVariable : TGraphQLVariable; function parseDirective : TGraphQLDirective; function parseField : TGraphQLField; function parseSelection : TGraphQLSelection; procedure parseOperationInner(op : TGraphQLOperation); function parseOperation(name : String) : TGraphQLOperation; function parseFragment: TGraphQLFragment; procedure parseDocument(doc : TGraphQLDocument); protected function sizeInBytesV : cardinal; override; public constructor Create; overload; override; destructor Destroy; override; Function Link : TGraphQLParser; overload; class function parse(source : String) : TGraphQLPackage; overload; class function parse(source : TStream) : TGraphQLPackage; overload; class function parseFile(filename : String) : TGraphQLPackage; class function parseJson(source : TStream) : TGraphQLPackage; overload; end; implementation { TGraphQLArgument } constructor TGraphQLArgument.Create; begin inherited; FValues := TFslList<TGraphQLValue>.create; end; procedure TGraphQLArgument.addValue(value: TGraphQLValue); begin FValues.Add(value); end; constructor TGraphQLArgument.Create(name: String; value: TGraphQLValue); begin Create; self.name := name; FValues.Add(value); end; constructor TGraphQLArgument.Create(name: String; json: TJsonNode); begin Create; self.name := name; valuesFromNode(json); end; destructor TGraphQLArgument.Destroy; begin FValues.Free; inherited; end; function TGraphQLArgument.hasValue(value: String): boolean; var v : TGraphQLValue; begin result := false; for v in FValues do if (v.isValue(value)) then exit(true); end; function TGraphQLArgument.Link: TGraphQLArgument; begin result := TGraphQLArgument(inherited Link); end; procedure TGraphQLArgument.valuesFromNode(json: TJsonNode); var v : TJsonNode; begin if json is TJsonString then values.Add(TGraphQLStringValue.Create(TJsonString(json).value)) else if json is TJsonNumber then values.Add(TGraphQLNumberValue.Create(TJsonNumber(json).value)) else if json is TJsonBoolean then values.Add(TGraphQLNameValue.Create(BooleanToString(TJsonBoolean(json).value).ToLower)) else if json is TJsonObject then values.Add(TGraphQLObjectValue.Create(TJsonObject(json))) else if json is TJsonArray then begin for v in TJsonArray(json) do valuesFromNode(v); end else raise EJsonException.Create('Unexpected JSON type for "'+name+'": '+json.ClassName) end; procedure TGraphQLArgument.write(str: TStringBuilder; indent : integer); var i : integer; Begin str.Append('"'); for i := 1 to length(name) do case name[i] of '"':str.Append('\"'); '\':str.Append('\\'); #13:str.Append('\r'); #10:str.Append('\n'); #09:str.Append('\t'); else if ord(name[i]) < 32 Then str.Append('\u'+inttohex(ord(name[i]), 4)) else str.Append(name[i]); End; str.Append('":'); if listStatus = listStatusRepeating then begin str.Append('['); for i := 0 to FValues.count - 1 do begin if (i > 0) then str.Append(','); FValues[i].write(str, indent); end; str.Append(']'); end else begin if Values.Count > 1 then raise EJsonException.Create('Internal error: non list "'+Name+'" has '+inttostr(values.Count)+' values'); if Values.Count = 0 then str.Append('null') else values[0].write(str, indent); end; end; function TGraphQLArgument.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FValues.sizeInBytes); end; { TGraphQLDirective } constructor TGraphQLDirective.Create; begin inherited; FArguments := TFslList<TGraphQLArgument>.create; end; destructor TGraphQLDirective.Destroy; begin FArguments.Free; inherited; end; function TGraphQLDirective.Link: TGraphQLDirective; begin result := TGraphQLDirective(inherited Link); end; function TGraphQLDirective.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FArguments.sizeInBytes); end; { TGraphQLField } function TGraphQLField.argument(name: String): TGraphQLArgument; var p : TGraphQLArgument; begin result := nil; for p in Arguments do if p.Name = name then exit(p); end; constructor TGraphQLField.Create; begin inherited; FSelectionSet := TFslList<TGraphQLSelection>.create; FArguments := TFslList<TGraphQLArgument>.create; FDirectives := TFslList<TGraphQLDirective>.create; end; destructor TGraphQLField.Destroy; begin FSelectionSet.Free; FArguments.Free; FDirectives.Free; inherited; end; function TGraphQLField.directive(name: String): TGraphQLDirective; var dir : TGraphQLDirective; begin result := nil; for dir in Directives do if dir.Name = name then exit(dir); end; function TGraphQLField.hasDirective(name: String): boolean; var dir : TGraphQLDirective; begin result := false; for dir in Directives do if dir.Name = name then exit(true); end; function TGraphQLField.Link: TGraphQLField; begin result := TGraphQLField(inherited Link); end; function TGraphQLField.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FSelectionSet.sizeInBytes); inc(result, (FAlias.length * sizeof(char)) + 12); inc(result, FArguments.sizeInBytes); inc(result, FDirectives.sizeInBytes); end; { TGraphQLFragmentSpread } constructor TGraphQLFragmentSpread.Create; begin inherited; FDirectives := TFslList<TGraphQLDirective>.create; end; destructor TGraphQLFragmentSpread.Destroy; begin FDirectives.Free; inherited; end; function TGraphQLFragmentSpread.hasDirective(name: String): boolean; var dir : TGraphQLDirective; begin result := false; for dir in Directives do if dir.Name = name then exit(true); end; function TGraphQLFragmentSpread.Link: TGraphQLFragmentSpread; begin result := TGraphQLFragmentSpread(inherited Link); end; function TGraphQLFragmentSpread.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FDirectives.sizeInBytes); end; { TGraphQLSelection } constructor TGraphQLSelection.Create; begin inherited; end; destructor TGraphQLSelection.Destroy; begin FField.Free; FInlineFragment.Free; FFragmentSpread.Free; inherited; end; function TGraphQLSelection.Link: TGraphQLSelection; begin result := TGraphQLSelection(inherited Link); end; procedure TGraphQLSelection.SetField(const Value: TGraphQLField); begin FField.Free; FField := Value; end; procedure TGraphQLSelection.SetFragmentSpread(const Value: TGraphQLFragmentSpread); begin FFragmentSpread.Free; FFragmentSpread := Value; end; procedure TGraphQLSelection.SetInlineFragment(const Value: TGraphQLFragment); begin FInlineFragment.Free; FInlineFragment := Value; end; function TGraphQLSelection.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, FField.sizeInBytes); inc(result, FInlineFragment.sizeInBytes); inc(result, FFragmentSpread.sizeInBytes); end; { TGraphQLVariable } destructor TGraphQLVariable.Destroy; begin FDefaultValue.Free; inherited; end; function TGraphQLVariable.Link: TGraphQLVariable; begin result := TGraphQLVariable(inherited Link); end; procedure TGraphQLVariable.SetDefaultValue(const Value: TGraphQLValue); begin FDefaultValue.Free; FDefaultValue := Value; end; function TGraphQLVariable.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FDefaultValue.sizeInBytes); inc(result, (FTypeName.length * sizeof(char)) + 12); end; { TGraphQLOperation } constructor TGraphQLOperation.Create; begin inherited; FSelectionSet := TFslList<TGraphQLSelection>.create; FVariables := TFslList<TGraphQLVariable>.create; FDirectives := TFslList<TGraphQLDirective>.create; end; destructor TGraphQLOperation.Destroy; begin FSelectionSet.Free; FVariables.Free; FDirectives.Free; inherited; end; function TGraphQLOperation.hasDirective(name: String): boolean; var dir : TGraphQLDirective; begin result := false; for dir in Directives do if dir.Name = name then exit(true); end; function TGraphQLOperation.Link: TGraphQLOperation; begin result := TGraphQLOperation(inherited Link); end; function TGraphQLOperation.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FSelectionSet.sizeInBytes); inc(result, FVariables.sizeInBytes); inc(result, FDirectives.sizeInBytes); end; { TGraphQLFragment } constructor TGraphQLFragment.Create; begin inherited; FSelectionSet := TFslList<TGraphQLSelection>.create; FDirectives := TFslList<TGraphQLDirective>.create; end; destructor TGraphQLFragment.Destroy; begin FSelectionSet.Free; FDirectives.free; inherited; end; function TGraphQLFragment.hasDirective(name: String): boolean; var dir : TGraphQLDirective; begin result := false; for dir in Directives do if dir.Name = name then exit(true); end; function TGraphQLFragment.Link: TGraphQLFragment; begin result := TGraphQLFragment(inherited Link); end; function TGraphQLFragment.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, (FTypeCondition.length * sizeof(char)) + 12); inc(result, FSelectionSet.sizeInBytes); inc(result, FDirectives.sizeInBytes); end; { TGraphQLDocument } constructor TGraphQLDocument.Create; begin inherited; FFragments := TFslList<TGraphQLFragment>.create; FOperations := TFslList<TGraphQLOperation>.create; end; destructor TGraphQLDocument.Destroy; begin FFragments.Free; FOperations.Free; inherited; end; function TGraphQLDocument.fragment(name: String): TGraphQLFragment; var f : TGraphQLFragment; begin result := nil; for f in Fragments do if f.Name = name then exit(f); end; function TGraphQLDocument.Link: TGraphQLDocument; begin result := TGraphQLDocument(inherited Link); end; function TGraphQLDocument.operation(name: String): TGraphQLOperation; var o : TGraphQLOperation; begin result := nil; for o in Operations do if o.Name = name then exit(o); end; function TGraphQLDocument.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, FFragments.sizeInBytes); inc(result, FOperations.sizeInBytes); end; { TGraphQLParser } function TGraphQLParser.getNextChar: Char; begin if FPeek <> '' Then Begin result := FPeek[1]; Delete(FPeek, 1, 1); End Else begin result := ConsumeCharacter; if result = #10 then FLocation.incLine else FLocation.incCol; end; end; function TGraphQLParser.hasName: boolean; begin result := (FLexType = gqlltName) and (FToken.ToString <> ''); end; function TGraphQLParser.hasName(name: String): boolean; begin result := (FLexType = gqlltName) and (FToken.ToString = name); end; function TGraphQLParser.hasPunctuation(punc: String): boolean; begin result := (FLexType = gqlltPunctuation) and (FToken.ToString = punc); end; function TGraphQLParser.Link: TGraphQLParser; begin result := TGraphQLParser(inherited Link); end; function TGraphQLParser.consumeName: String; begin if FLexType <> gqlltName then raise EJsonException.Create('Found "'+FToken.ToString+'" expecting a name'); result := FToken.ToString; next; end; procedure TGraphQLParser.Next; var ch : Char; hex : String; begin skipIgnore; FToken.Clear; if (not more and (FPeek = '')) then FLexType := gqlltNull else begin ch := getNextChar(); if StringArrayExistsSensitive(LITERALS_TGraphQLPunctuator, ch) then begin FLexType := gqlltPunctuation; FToken.Append(ch); end else if ch = '.' then begin repeat FToken.Append(ch); ch := getNextChar; until ch <> '.'; PushChar(ch); if (FToken.Length <> 3) then raise EJsonException.Create('Found "'+FToken.ToString+'" expecting "..."'); end else if charInSet(ch, ['A'..'Z', 'a'..'z', '_']) then begin FLexType := gqlltName; repeat FToken.Append(ch); ch := getNextChar; until not charInSet(ch, ['A'..'Z', 'a'..'z', '_', '0'..'9']); pushChar(ch); end else if charInSet(ch, ['0'..'9', '-']) then begin FLexType := gqlltNumber; repeat FToken.Append(ch); ch := getNextChar; until not (charInSet(ch, ['0'..'9']) or ((ch = '.') and not FToken.ToString.Contains('.'))or ((ch = 'e') and not FToken.ToString.Contains('e'))); pushChar(ch); end else if (ch = '"') then begin FLexType := gqlltString; repeat ch := getNextChar; if (ch = '\') Then Begin if not More then raise EJsonException.Create('premature termination of GraphQL during a string constant'); ch := getNextChar; case ch of '"':FToken.Append('"'); '\':FToken.Append('\'); '/':FToken.Append('/'); 'n':FToken.Append(#10); 'r':FToken.Append(#13); 't':FToken.Append(#09); 'u': begin setLength(hex, 4); hex[1] := getNextChar; hex[2] := getNextChar; hex[3] := getNextChar; hex[4] := getNextChar; FToken.Append(chr(StrToInt('$'+hex))); end Else raise EJsonException.Create('not supported in GraphQL: \'+ch); End; ch := #0; End Else if (ch <> '"') then FToken.Append(ch); until not More or (ch = '"'); if ch <> '"' Then EJsonException.Create('premature termination of GraphQL during a string constant'); end else raise EJsonException.Create('Unexpected character "'+ch+'"'); end; end; function TGraphQLParser.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FPeek.length * sizeof(char)) + 12); end; class function TGraphQLParser.parse(source: String): TGraphQLPackage; var this : TGraphQLParser; stream : TFslStringStream; doc : TGraphQLDocument; begin stream := TFslStringStream.Create; try stream.Bytes := TENcoding.UTF8.GetBytes(source); this := TGraphQLParser.Create(stream.link); try this.next; doc := TGraphQLDocument.Create; try this.parseDocument(doc); result := TGraphQLPackage.create(doc.Link); finally doc.free; end; finally this.free; end; finally stream.Free; end; end; class function TGraphQLParser.parse(source: TStream): TGraphQLPackage; var this : TGraphQLParser; stream : TFslVCLStream; doc : TGraphQLDocument; begin stream := TFslVCLStream.Create; try stream.Stream := source; this := TGraphQLParser.Create(stream.link); try this.next; doc := TGraphQLDocument.Create; try this.parseDocument(doc); result := TGraphQLPackage.create(doc.Link); finally doc.free; end; finally this.free; end; finally stream.Free; end; end; function TGraphQLParser.parseArgument: TGraphQLArgument; begin result := TGraphQLArgument.Create; try result.Name := consumeName; consumePunctuation(':'); if hasPunctuation('[') then begin result.listStatus := listStatusRepeating; consumePunctuation('['); while not hasPunctuation(']') do result.Values.Add(parseValue); consumePunctuation(']'); end else result.Values.Add(parseValue); result.Link; finally result.Free; end; end; function TGraphQLParser.parseDirective: TGraphQLDirective; begin result := TGraphQLDirective.Create; try consumePunctuation('@'); result.Name := consumeName; if hasPunctuation('(') then begin consumePunctuation('('); repeat result.Arguments.Add(parseArgument); until hasPunctuation(')'); consumePunctuation(')'); end; result.Link; finally result.Free; end; end; procedure TGraphQLParser.parseDocument(doc: TGraphQLDocument); var s : String; op : TGraphQLOperation; begin if not hasName then begin op := TGraphQLOperation.Create; try parseOperationInner(op); doc.Operations.Add(op.Link); finally op.Free; end; end else begin while more or (FPeek <> '') do begin s := consumeName; if (s = 'mutation') or (s = 'query') then doc.Operations.Add(parseOperation(s)) else if (s = 'fragment') then doc.Fragments.Add(parseFragment) else raise ETodo.create('TGraphQLParser.parseDocument'); // doc.Operations.Add(parseOperation(s))? end; end; end; function TGraphQLParser.parseField: TGraphQLField; begin result := TGraphQLField.Create; try result.Name := consumeName; result.Alias := result.Name; if hasPunctuation(':') then begin consumePunctuation(':'); result.Name := consumeName; end; if hasPunctuation('(') then begin consumePunctuation('('); while not hasPunctuation(')') do result.Arguments.Add(parseArgument); consumePunctuation(')'); end; while hasPunctuation('@') do result.Directives.Add(parseDirective); if hasPunctuation('{') then begin consumePunctuation('{'); repeat result.SelectionSet.Add(parseSelection); until hasPunctuation('}'); consumePunctuation('}'); end; result.link; finally result.Free; end; end; class function TGraphQLParser.parseFile(filename: String): TGraphQLPackage; var src : String; begin src := FileToString(filename, TEncoding.UTF8); result := parse(src); end; procedure TGraphQLParser.parseFragmentInner(fragment: TGraphQLFragment); begin while hasPunctuation('@') do fragment.Directives.Add(parseDirective); consumePunctuation('{'); repeat fragment.SelectionSet.Add(parseSelection); until hasPunctuation('}'); consumePunctuation('}'); end; function TGraphQLParser.parseFragment: TGraphQLFragment; begin result := TGraphQLFragment.Create; try result.Name := consumeName; consumeName('on'); result.TypeCondition := consumeName; parseFragmentInner(result); result.Link; finally result.free; end; end; function TGraphQLParser.parseFragmentSpread: TGraphQLFragmentSpread; begin result := TGraphQLFragmentSpread.Create; try result.Name := consumeName; while hasPunctuation('@') do result.Directives.Add(parseDirective); result.Link; finally result.Free; end; end; function TGraphQLParser.parseInlineFragment: TGraphQLFragment; begin result := TGraphQLFragment.Create; try if hasName('on') then begin consumeName('on'); result.FTypeCondition := consumeName; end; parseFragmentInner(result); result.Link; finally result.Free; end; end; class function TGraphQLParser.parseJson(source: TStream): TGraphQLPackage; var json : TJsonObject; vl : TJsonObject; n : String; this : TGraphQLParser; stream : TFslStringStream; begin json := TJSONParser.Parse(source); try result := TGraphQLPackage.Create(TGraphQLDocument.Create); try result.FOperationName := json.str['operationName']; stream := TFslStringStream.Create; try stream.Bytes := TENcoding.UTF8.GetBytes(json.str['query']); this := TGraphQLParser.Create(stream.link); try this.next; this.parseDocument(result.FDocument); finally this.free; end; finally stream.Free; end; if json.has('variables') then begin vl := json.obj['variables']; for n in vl.properties.Keys do result.Variables.Add(TGraphQLArgument.create(n, vl.properties[n])); end; result.Link; finally result.Free; end; finally json.Free; end; end; function TGraphQLParser.parseOperation(name : String) : TGraphQLOperation; begin result := TGraphQLOperation.Create; try if name = 'mutation' then begin result.operationType := qglotMutation; if hasName then result.Name := consumeName; end else if name = 'query' then begin result.operationType := qglotQuery; if hasName then result.Name := consumeName; end else result.Name := name; parseOperationInner(result); result.Link; finally result.Free; end; end; procedure TGraphQLParser.parseOperationInner(op: TGraphQLOperation); begin if hasPunctuation('(') then begin consumePunctuation('('); repeat op.Variables.Add(parseVariable); until hasPunctuation(')'); consumePunctuation(')'); end; while hasPunctuation('@') do op.Directives.Add(parseDirective); if hasPunctuation('{') then begin consumePunctuation('{'); repeat op.SelectionSet.Add(parseSelection); until hasPunctuation('}'); consumePunctuation('}'); end; end; function TGraphQLParser.parseSelection: TGraphQLSelection; begin result := TGraphQLSelection.Create; try if hasPunctuation('...') then begin consumePunctuation('...'); if hasName and (FToken.ToString <> 'on') then result.FragmentSpread := parseFragmentSpread else result.InlineFragment := parseInlineFragment; end else result.field := parseField; result.Link; finally result.Free; end; end; function TGraphQLParser.parseValue: TGraphQLValue; begin result := nil; try case FLexType of gqlltNull: raise EJsonException.Create('Attempt to read a value after reading off the end of the GraphQL statement'); gqlltName: result := TGraphQLNameValue.Create(FToken.ToString); gqlltPunctuation: if hasPunctuation('$') then begin consumePunctuation('$'); result := TGraphQLVariableValue.Create(FToken.ToString); end else if hasPunctuation('{') then begin consumePunctuation('{'); result := TGraphQLObjectValue.Create; while not hasPunctuation('}') do TGraphQLObjectValue(result).Fields.Add(parseArgument); end else raise EJsonException.Create('Attempt to read a value at "'+FToken.ToString+'"'); gqlltString: result := TGraphQLStringValue.Create(FToken.ToString); gqlltNumber: result := TGraphQLNumberValue.Create(FToken.ToString); end; next; result.Link; finally result.Free; end; end; function TGraphQLParser.parseVariable: TGraphQLVariable; begin result := TGraphQLVariable.Create; try consumePunctuation('$'); result.Name := consumeName; consumePunctuation(':'); result.TypeName := consumeName; if hasPunctuation('=') then begin consumePunctuation('='); result.DefaultValue := parseValue; end; result.Link; finally result.Free; end; end; procedure TGraphQLParser.consumeName(name: String); begin if FLexType <> gqlltName then raise EJsonException.Create('Found "'+FToken.ToString+'" expecting a name'); if FToken.ToString <> name then raise EJsonException.Create('Found "'+FToken.ToString+'" expecting "'+name+'"'); next; end; procedure TGraphQLParser.consumePunctuation(punc: String); begin if FLexType <> gqlltPunctuation then raise EJsonException.Create('Found "'+FToken.ToString+'" expecting "'+punc+'"'); if FToken.ToString <> punc then raise EJsonException.Create('Found "'+FToken.ToString+'" expecting "'+punc+'"'); next; end; constructor TGraphQLParser.Create; begin inherited; FToken := TStringBuilder.Create; end; destructor TGraphQLParser.Destroy; begin FToken.Free; inherited; end; procedure TGraphQLParser.PushChar(ch: Char); begin if (ch <> #0) then insert(ch, FPeek, 1); end; procedure TGraphQLParser.skipIgnore; var ch : char; begin ch := getNextChar; while CharInSet(ch, [' ', #9, #13, #10, ',', #$FE, #$FF]) do ch := getNextChar; if (ch = '#') then begin while not CharInSet(ch, [#13, #10]) do ch := getNextChar; pushChar(ch); skipIgnore; end else pushChar(ch); end; { TGraphQLValue } function TGraphQLValue.isValue(v: String): boolean; begin result := false; end; function TGraphQLValue.Link: TGraphQLValue; begin result := TGraphQLValue(inherited Link); end; procedure TGraphQLValue.write(str : TStringBuilder; indent : integer); begin raise ELibraryException.create('Need to override '+className+'.write'); end; { TGraphQLNumberValue } constructor TGraphQLNumberValue.Create(value: String); begin Inherited Create; FValue := value; end; function TGraphQLNumberValue.isValue(v: String): boolean; begin result := v = FValue; end; function TGraphQLNumberValue.Link: TGraphQLNumberValue; begin result := TGraphQLNumberValue(inherited Link); end; function TGraphQLNumberValue.ToString: String; begin result := FValue; end; procedure TGraphQLNumberValue.write(str : TStringBuilder; indent : integer); begin str.append(FValue); end; function TGraphQLNumberValue.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FValue.length * sizeof(char)) + 12); end; { TGraphQLVariableValue } constructor TGraphQLVariableValue.Create(value: String); begin Inherited Create; FValue := value; end; function TGraphQLVariableValue.Link: TGraphQLVariableValue; begin result := TGraphQLVariableValue(inherited Link); end; function TGraphQLVariableValue.ToString: String; begin result := FValue; end; procedure TGraphQLVariableValue.write(str : TStringBuilder; indent : integer); begin raise ELibraryException.create('Cannot write a variable to JSON'); end; function TGraphQLVariableValue.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FValue.length * sizeof(char)) + 12); end; { TGraphQLNameValue } constructor TGraphQLNameValue.Create(value: String); begin Inherited Create; FValue := value; end; function TGraphQLNameValue.isValue(v: String): boolean; begin result := v = FValue; end; function TGraphQLNameValue.Link: TGraphQLValue; begin result := TGraphQLNameValue(inherited Link); end; function TGraphQLNameValue.ToString: String; begin result := FValue; end; procedure TGraphQLNameValue.write(str: TStringBuilder; indent : integer); begin str.append(FValue); end; function TGraphQLNameValue.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FValue.length * sizeof(char)) + 12); end; { TGraphQLStringValue } constructor TGraphQLStringValue.Create(value: String); begin Inherited Create; FValue := value; end; function TGraphQLStringValue.isValue(v: String): boolean; begin result := v = FValue; end; function TGraphQLStringValue.Link: TGraphQLStringValue; begin result := TGraphQLStringValue(inherited Link); end; function TGraphQLStringValue.ToString: String; begin result := FValue; end; procedure TGraphQLStringValue.write(str: TStringBuilder; indent : integer); var i : integer; Begin str.Append('"'); for i := 1 to length(value) do case value[i] of '"':str.Append('\"'); '\':str.Append('\\'); #13:str.Append('\r'); #10:str.Append('\n'); #09:str.Append('\t'); else if ord(value[i]) < 32 Then str.Append('\u'+inttohex(ord(value[i]), 4)) else str.Append(value[i]); End; str.Append('"'); end; function TGraphQLStringValue.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FValue.length * sizeof(char)) + 12); end; { TGraphQLObjectValue } function TGraphQLObjectValue.addField(name: String; listStatus: TGraphQLArgumentListStatus): TGraphQLArgument; var t : TGraphQLArgument; begin result := nil; for t in FFields do if (t.Name = name) then result := t; if result = nil then begin result := TGraphQLArgument.Create; try result.Name := name; result.listStatus := listStatus; FFields.Add(result.Link); finally result.Free; end; end else if result.listStatus = listStatusSingleton then raise ELibraryException.create('Error: Attempt to make '+name+' into a repeating field when it is constrained by @singleton') else result.listStatus := listStatusRepeating; end; constructor TGraphQLObjectValue.Create; begin inherited; FFields := TFslList<TGraphQLArgument>.create; end; constructor TGraphQLObjectValue.Create(json: TJsonObject); var n : String; begin Create; for n in json.properties.Keys do FFields.Add(TGraphQLArgument.Create(n, json.properties[n])); end; destructor TGraphQLObjectValue.Destroy; begin FFields.Free; inherited; end; function TGraphQLObjectValue.Link: TGraphQLObjectValue; begin result := TGraphQLObjectValue(inherited Link); end; procedure TGraphQLObjectValue.write(str: TStringBuilder; indent : integer); var i, ni : integer; s, se : String; begin str.Append('{'); ni := indent; s := ''; se := ''; if (ni > -1) then begin se := #13#10+StringPadLeft('',' ', ni*2); inc(ni); s := #13#10+StringPadLeft('',' ', ni*2); end; for i := 0 to FFields.count - 1 do begin if (i > 0) then str.Append(','); str.Append(s); FFields[i].write(str, ni); end; str.Append(se); str.Append('}'); end; function TGraphQLObjectValue.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, FFields.sizeInBytes); end; { TGraphQLPackage } constructor TGraphQLPackage.Create; begin inherited; FVariables := TFslList<TGraphQLArgument>.create; end; constructor TGraphQLPackage.Create(document: TGraphQLDocument); begin Create; FDocument := Document; end; destructor TGraphQLPackage.Destroy; begin FDocument.Free; FVariables.Free; inherited; end; function TGraphQLPackage.Link: TGraphQLPackage; begin result := TGraphQLPackage(inherited Link); end; procedure TGraphQLPackage.SetDocument(const Value: TGraphQLDocument); begin FDocument.Free; FDocument := Value; end; function TGraphQLPackage.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, FDocument.sizeInBytes); inc(result, (FOperationName.length * sizeof(char)) + 12); inc(result, FVariables.sizeInBytes); end; end.
26.906436
200
0.684844
f19cdb749f3e37a83d56d11e939f5588b2bad616
5,304
pas
Pascal
lbSpeedButton/Sample/Sample.pas
delphi-pascal-archive/lb-speedbutton
1e280d260539a4b64f81b1adb644155074a52242
[ "Unlicense" ]
null
null
null
lbSpeedButton/Sample/Sample.pas
delphi-pascal-archive/lb-speedbutton
1e280d260539a4b64f81b1adb644155074a52242
[ "Unlicense" ]
null
null
null
lbSpeedButton/Sample/Sample.pas
delphi-pascal-archive/lb-speedbutton
1e280d260539a4b64f81b1adb644155074a52242
[ "Unlicense" ]
null
null
null
unit Sample; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, LbSpeedButton, ExtCtrls, Buttons, StdCtrls, LbButton, LbStaticText; type TForm1 = class(TForm) Panel1: TPanel; LbStaticText2: TLbStaticText; LbSpeedButton2: TLbSpeedButton; LbSpeedButton3: TLbSpeedButton; LbSpeedButton4: TLbSpeedButton; Panel2: TPanel; Panel3: TPanel; Notebook1: TNotebook; LbStaticText1: TLbStaticText; LbSpeedButton6: TLbSpeedButton; Panel4: TPanel; Panel5: TPanel; LbSpeedButton7: TLbSpeedButton; SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton; SpeedButton3: TSpeedButton; SpeedButton4: TSpeedButton; SpeedButton5: TSpeedButton; SpeedButton6: TSpeedButton; SpeedButton7: TSpeedButton; SpeedButton8: TSpeedButton; SpeedButton9: TSpeedButton; SpeedButton10: TSpeedButton; Panel6: TPanel; Panel7: TPanel; LbSpeedButton8: TLbSpeedButton; LbSpeedButton9: TLbSpeedButton; LbSpeedButton10: TLbSpeedButton; LbSpeedButton11: TLbSpeedButton; LbSpeedButton12: TLbSpeedButton; LbSpeedButton13: TLbSpeedButton; LbSpeedButton24: TLbSpeedButton; LbSpeedButton25: TLbSpeedButton; LbSpeedButton26: TLbSpeedButton; LbSpeedButton27: TLbSpeedButton; LbSpeedButton28: TLbSpeedButton; Panel8: TPanel; GroupBox1: TGroupBox; LbSpeedButton14: TLbSpeedButton; LbSpeedButton15: TLbSpeedButton; LbSpeedButton16: TLbSpeedButton; GroupBox2: TGroupBox; LbSpeedButton17: TLbSpeedButton; LbSpeedButton18: TLbSpeedButton; LbSpeedButton19: TLbSpeedButton; GroupBox4: TGroupBox; LbSpeedButton22: TLbSpeedButton; LbSpeedButton23: TLbSpeedButton; GroupBox5: TGroupBox; LbSpeedButton37: TLbSpeedButton; LbSpeedButton38: TLbSpeedButton; LbSpeedButton36: TLbSpeedButton; LbSpeedButton35: TLbSpeedButton; GroupBox6: TGroupBox; LbSpeedButton29: TLbSpeedButton; LbSpeedButton30: TLbSpeedButton; Image2: TImage; GroupBox3: TGroupBox; LbSpeedButton34: TLbSpeedButton; LbSpeedButton39: TLbSpeedButton; LbSpeedButton40: TLbSpeedButton; LbSpeedButton41: TLbSpeedButton; LbSpeedButton42: TLbSpeedButton; LbSpeedButton43: TLbSpeedButton; LbSpeedButton20: TLbSpeedButton; LbSpeedButton21: TLbSpeedButton; LbButton1: TLbButton; LbButton6: TLbButton; Memo3: TMemo; LbButton2: TLbButton; GroupBox7: TGroupBox; LbSpeedButton31: TLbSpeedButton; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; LbSpeedButton32: TLbSpeedButton; LbSpeedButton33: TLbSpeedButton; LbSpeedButton44: TLbSpeedButton; LbSpeedButton45: TLbSpeedButton; LbSpeedButton46: TLbSpeedButton; Memo4: TMemo; LbSpeedButton47: TLbSpeedButton; LbSpeedButton48: TLbSpeedButton; LbSpeedButton49: TLbSpeedButton; LbSpeedButton50: TLbSpeedButton; LbSpeedButton51: TLbSpeedButton; LbSpeedButton52: TLbSpeedButton; LbSpeedButton53: TLbSpeedButton; LbSpeedButton54: TLbSpeedButton; LbSpeedButton55: TLbSpeedButton; LbSpeedButton56: TLbSpeedButton; LbSpeedButton57: TLbSpeedButton; LbSpeedButton58: TLbSpeedButton; Label5: TLabel; Label6: TLabel; Label7: TLabel; GroupBox8: TGroupBox; LbSpeedButton59: TLbSpeedButton; LbSpeedButton60: TLbSpeedButton; LbButton3: TLbButton; Button1: TButton; LbSpeedButton61: TLbSpeedButton; LbSpeedButton62: TLbSpeedButton; LbSpeedButton63: TLbSpeedButton; Image1: TImage; LbSpeedButton64: TLbSpeedButton; LbSpeedButton65: TLbSpeedButton; LbSpeedButton66: TLbSpeedButton; LbSpeedButton67: TLbSpeedButton; LbButton4: TLbSpeedButton; LbButton5: TLbSpeedButton; Memo1: TMemo; Label10: TLabel; Label11: TLabel; Label12: TLabel; LbSpeedButton1: TLbSpeedButton; procedure BtnClick(Sender: TObject); procedure LbButton2Click(Sender: TObject); procedure FormShow(Sender: TObject); end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.BtnClick(Sender: TObject); begin Notebook1.PageIndex := (Sender as TLbSpeedButton).Tag; case (Sender as TLbSpeedButton).Tag of 0, 1, 2, 3, 5: Panel3.Caption := ' LbSpeedButton - ' + (Sender as TLbSpeedButton).Caption; 4: Panel3.Caption := ' LbButton - ' + (Sender as TLbSpeedButton).Caption; else raise exception.create('Whoops...'); end; end; procedure TForm1.LbButton2Click(Sender: TObject); begin Close; end; procedure TForm1.FormShow(Sender: TObject); begin with LbSpeedButton64 do begin Glyph := Image1.Picture.Bitmap; NumGlyphs := 4; end; with LbSpeedButton65 do begin Glyph := Image1.Picture.Bitmap; NumGlyphs := 4; end; with LbSpeedButton66 do begin Glyph := Image1.Picture.Bitmap; NumGlyphs := 4; end; with LbSpeedButton67 do begin Glyph := Image1.Picture.Bitmap; NumGlyphs := 4; end; with LbButton4 do begin Glyph := Image1.Picture.Bitmap; NumGlyphs := 4; end; with LbButton5 do begin Glyph := Image1.Picture.Bitmap; NumGlyphs := 4; end; end; end.
31.760479
98
0.713424
f119e5b45b76c1d644f0059b08835df93635ae95
15,430
pas
Pascal
CryptoLib4Pascal/CryptoLib.Tests/src/Asn1/Asn1SequenceParserTests.pas
Jeff-Bouchard/EmerAPI_KeyKeeper
ff79e71e0d1505de3a78b6543483355c1ac320ae
[ "MIT" ]
2
2019-02-05T18:34:05.000Z
2019-04-14T13:52:44.000Z
CryptoLib4Pascal/CryptoLib.Tests/src/Asn1/Asn1SequenceParserTests.pas
DenisDx/EmerAPI_KeyKeeper
c6921710413871ca039e5bebea0877aceb9a8b74
[ "MIT" ]
null
null
null
CryptoLib4Pascal/CryptoLib.Tests/src/Asn1/Asn1SequenceParserTests.pas
DenisDx/EmerAPI_KeyKeeper
c6921710413871ca039e5bebea0877aceb9a8b74
[ "MIT" ]
2
2019-04-10T21:23:42.000Z
2020-12-11T20:59:13.000Z
{ *********************************************************************************** } { * CryptoLib Library * } { * Copyright (c) 2018 - 20XX Ugochukwu Mmaduekwe * } { * Github Repository <https://github.com/Xor-el> * } { * Distributed under the MIT software license, see the accompanying file LICENSE * } { * or visit http://www.opensource.org/licenses/mit-license.php. * } { * Acknowledgements: * } { * * } { * Thanks to Sphere 10 Software (http://www.sphere10.com/) for sponsoring * } { * development of this library * } { * ******************************************************************************* * } (* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *) unit Asn1SequenceParserTests; interface {$IFDEF FPC} {$MODE DELPHI} {$ENDIF FPC} uses Classes, SysUtils, {$IFDEF FPC} fpcunit, testregistry, {$ELSE} TestFramework, {$ENDIF FPC} ClpBigInteger, ClpHex, ClpCryptoLibTypes, ClpArrayUtils, ClpDerInteger, ClpIDerInteger, ClpIAsn1Null, ClpIAsn1StreamParser, ClpAsn1StreamParser, ClpIBerSequenceGenerator, ClpBerSequenceGenerator, ClpDerSequenceGenerator, ClpIDerSequenceGenerator, ClpIAsn1SequenceParser, ClpDerObjectIdentifier, ClpIDerObjectIdentifier; type TCryptoLibTestCase = class abstract(TTestCase) end; type TTestAsn1SequenceParser = class(TCryptoLibTestCase) private var FseqData, FnestedSeqData, FexpTagSeqData, FimplTagSeqData, FnestedSeqExpTagData, FnestedSeqImpTagData, FberSeqData, FberDerNestedSeqData, FberNestedSeqData, FberExpTagSeqData, FberSeqWithDERNullData: TCryptoLibByteArray; procedure doTestNestedReading(const data: TCryptoLibByteArray); procedure doTestParseWithNull(const data: TCryptoLibByteArray); protected procedure SetUp; override; procedure TearDown; override; published procedure TestDerWriting; procedure TestNestedDerWriting; procedure TestDerExplicitTaggedSequenceWriting; procedure TestDerImplicitTaggedSequenceWriting; procedure TestNestedExplicitTagDerWriting; procedure TestNestedImplicitTagDerWriting; procedure TestBerWriting; procedure TestNestedBerDerWriting; procedure TestNestedBerWriting; procedure TestDerReading; procedure TestNestedDerReading; procedure TestBerReading; procedure TestNestedBerDerReading; procedure TestNestedBerReading; procedure TestBerExplicitTaggedSequenceWriting; procedure TestSequenceWithDerNullReading; end; implementation { TTestAsn1SequenceParser } procedure TTestAsn1SequenceParser.doTestNestedReading (const data: TCryptoLibByteArray); var aIn: IAsn1StreamParser; seq, s: IAsn1SequenceParser; o: IInterface; count: Int32; begin aIn := TAsn1StreamParser.Create(data); seq := aIn.ReadObject() as IAsn1SequenceParser; count := 0; CheckNotNull(seq, 'null sequence returned'); o := seq.ReadObject(); while (o <> Nil) do begin case count of 0: begin CheckTrue(Supports(o, IDerInteger)); end; 1: begin CheckTrue(Supports(o, IDerObjectIdentifier)); end; 2: begin CheckTrue(Supports(o, IAsn1SequenceParser)); s := o as IAsn1SequenceParser; // NB: Must exhaust the nested parser while (s.ReadObject() <> Nil) do begin // Ignore end; end; end; System.Inc(count); o := seq.ReadObject(); end; CheckEquals(3, count, 'wrong number of objects in sequence'); end; procedure TTestAsn1SequenceParser.doTestParseWithNull (const data: TCryptoLibByteArray); var aIn: IAsn1StreamParser; seq: IAsn1SequenceParser; o: IInterface; count: Int32; begin aIn := TAsn1StreamParser.Create(data); seq := aIn.ReadObject() as IAsn1SequenceParser; count := 0; CheckNotNull(seq, 'null sequence returned'); o := seq.ReadObject(); while (o <> Nil) do begin case count of 0: begin CheckTrue(Supports(o, IAsn1Null)); end; 1: begin CheckTrue(Supports(o, IDerInteger)); end; 2: begin CheckTrue(Supports(o, IDerObjectIdentifier)); end; end; System.Inc(count); o := seq.ReadObject(); end; CheckEquals(3, count, 'wrong number of objects in sequence'); end; procedure TTestAsn1SequenceParser.SetUp; begin inherited; FseqData := THex.Decode('3006020100060129'); FnestedSeqData := THex.Decode('300b0201000601293003020101'); FexpTagSeqData := THex.Decode('a1083006020100060129'); FimplTagSeqData := THex.Decode('a106020100060129'); FnestedSeqExpTagData := THex.Decode('300d020100060129a1053003020101'); FnestedSeqImpTagData := THex.Decode('300b020100060129a103020101'); FberSeqData := THex.Decode('30800201000601290000'); FberDerNestedSeqData := THex.Decode('308002010006012930030201010000'); FberNestedSeqData := THex.Decode('3080020100060129308002010100000000'); FberExpTagSeqData := THex.Decode('a180308002010006012900000000'); FberSeqWithDERNullData := THex.Decode('308005000201000601290000'); end; procedure TTestAsn1SequenceParser.TearDown; begin inherited; end; procedure TTestAsn1SequenceParser.TestBerExplicitTaggedSequenceWriting; var bOut: TMemoryStream; seqGen: IBerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen := TBerSequenceGenerator.Create(bOut, 1, true); seqGen.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FberExpTagSeqData, temp), 'explicit BER tag writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestBerReading; var aIn: IAsn1StreamParser; seq: IAsn1SequenceParser; count: Int32; o: IInterface; begin aIn := TAsn1StreamParser.Create(FberSeqData); seq := aIn.ReadObject() as IAsn1SequenceParser; count := 0; CheckNotNull(seq, 'null sequence returned'); o := seq.ReadObject(); while (o <> Nil) do begin case count of 0: begin CheckTrue(Supports(o, IDerInteger)); end; 1: begin CheckTrue(Supports(o, IDerObjectIdentifier)); end; end; System.Inc(count); o := seq.ReadObject(); end; CheckEquals(2, count, 'wrong number of objects in sequence'); end; procedure TTestAsn1SequenceParser.TestBerWriting; var bOut: TMemoryStream; seqGen: IBerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen := TBerSequenceGenerator.Create(bOut); seqGen.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FberSeqData, temp), 'basic BER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestDerExplicitTaggedSequenceWriting; var bOut: TMemoryStream; temp: TCryptoLibByteArray; seqGen: IDerSequenceGenerator; begin bOut := TMemoryStream.Create(); try seqGen := TDerSequenceGenerator.Create(bOut, 1, true); seqGen.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FexpTagSeqData, temp), 'explicit tag writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestDerImplicitTaggedSequenceWriting; var bOut: TMemoryStream; seqGen: IDerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen := TDerSequenceGenerator.Create(bOut, 1, false); seqGen.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FimplTagSeqData, temp), 'implicit tag writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestDerReading; var aIn: IAsn1StreamParser; seq: IAsn1SequenceParser; count: Int32; o: IInterface; begin aIn := TAsn1StreamParser.Create(FseqData); seq := aIn.ReadObject() as IAsn1SequenceParser; count := 0; CheckNotNull(seq, 'null sequence returned'); o := seq.ReadObject(); while (o <> Nil) do begin case count of 0: begin CheckTrue(Supports(o, IDerInteger)); end; 1: begin CheckTrue(Supports(o, IDerObjectIdentifier)); end; end; System.Inc(count); o := seq.ReadObject(); end; CheckEquals(2, count, 'wrong number of objects in sequence'); end; procedure TTestAsn1SequenceParser.TestDerWriting; var bOut: TMemoryStream; seqGen: IDerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen := TDerSequenceGenerator.Create(bOut); seqGen.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FseqData, temp), 'basic DER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestNestedBerDerReading; begin doTestNestedReading(FberDerNestedSeqData); end; procedure TTestAsn1SequenceParser.TestNestedBerDerWriting; var bOut: TMemoryStream; seqGen1: IBerSequenceGenerator; seqGen2: IDerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen1 := TBerSequenceGenerator.Create(bOut); seqGen1.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen1.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen2 := TDerSequenceGenerator.Create(seqGen1.GetRawOutputStream()); seqGen2.AddObject(TDerInteger.Create(TBigInteger.ValueOf(1)) as IDerInteger); seqGen2.Close(); seqGen1.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FberDerNestedSeqData, temp), 'nested BER/DER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestNestedBerReading; begin doTestNestedReading(FberNestedSeqData); end; procedure TTestAsn1SequenceParser.TestNestedBerWriting; var bOut: TMemoryStream; seqGen1, seqGen2: IBerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen1 := TBerSequenceGenerator.Create(bOut); seqGen1.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen1.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen2 := TBerSequenceGenerator.Create(seqGen1.GetRawOutputStream()); seqGen2.AddObject(TDerInteger.Create(TBigInteger.ValueOf(1))); seqGen2.Close(); seqGen1.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FberNestedSeqData, temp), 'nested BER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestNestedDerReading; begin doTestNestedReading(FnestedSeqData); end; procedure TTestAsn1SequenceParser.TestNestedDerWriting; var bOut: TMemoryStream; seqGen1, seqGen2: IDerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen1 := TDerSequenceGenerator.Create(bOut); seqGen1.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen1.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen2 := TDerSequenceGenerator.Create(seqGen1.GetRawOutputStream()); seqGen2.AddObject(TDerInteger.Create(TBigInteger.One) as IDerInteger); seqGen2.Close(); seqGen1.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FnestedSeqData, temp), 'nested DER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestNestedExplicitTagDerWriting; var bOut: TMemoryStream; seqGen1, seqGen2: IDerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen1 := TDerSequenceGenerator.Create(bOut); seqGen1.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen1.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen2 := TDerSequenceGenerator.Create (seqGen1.GetRawOutputStream(), 1, true); seqGen2.AddObject(TDerInteger.Create(TBigInteger.ValueOf(1)) as IDerInteger); seqGen2.Close(); seqGen1.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FnestedSeqExpTagData, temp), 'nested explicit tagged DER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestNestedImplicitTagDerWriting; var bOut: TMemoryStream; seqGen1, seqGen2: IDerSequenceGenerator; temp: TCryptoLibByteArray; begin bOut := TMemoryStream.Create(); try seqGen1 := TDerSequenceGenerator.Create(bOut); seqGen1.AddObject(TDerInteger.Create(TBigInteger.Zero) as IDerInteger); seqGen1.AddObject(TDerObjectIdentifier.Create('1.1') as IDerObjectIdentifier); seqGen2 := TDerSequenceGenerator.Create(seqGen1.GetRawOutputStream(), 1, false); seqGen2.AddObject(TDerInteger.Create(TBigInteger.ValueOf(1)) as IDerInteger); seqGen2.Close(); seqGen1.Close(); bOut.Position := 0; System.SetLength(temp, bOut.Size); bOut.Read(temp[0], bOut.Size); CheckTrue(TArrayUtils.AreEqual(FnestedSeqImpTagData, temp), 'nested implicit tagged DER writing test failed.'); finally bOut.Free; end; end; procedure TTestAsn1SequenceParser.TestSequenceWithDerNullReading; begin doTestParseWithNull(FberSeqWithDERNullData); end; initialization // Register any test cases with the test runner {$IFDEF FPC} RegisterTest(TTestAsn1SequenceParser); {$ELSE} RegisterTest(TTestAsn1SequenceParser.Suite); {$ENDIF FPC} end.
24.60925
87
0.690538
83ee5931d1cda66341494d165330ebdcb3c646f7
85
pas
Pascal
Test/FailureScripts/duplicate_uses.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
1
2022-02-18T22:14:44.000Z
2022-02-18T22:14:44.000Z
Test/FailureScripts/duplicate_uses.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
Test/FailureScripts/duplicate_uses.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
unit test; interface uses Default, Default; implementation uses Default, Default;
9.444444
22
0.788235
f1c76ec59fa0f66b745f144f19631c1a01860b5b
1,994
dfm
Pascal
Samples/Delphi/VCL/Format/Unit1.dfm
atkins126/I18N
4176f8991b4c572ac36d8b2667dc345c185ff26f
[ "MIT" ]
43
2019-11-04T09:35:05.000Z
2022-02-28T00:01:46.000Z
Samples/Delphi/VCL/Format/Unit1.dfm
tomajexpress/I18N
2cb4161cb70645e62675925089b15e6ece9bd915
[ "MIT" ]
47
2020-01-16T18:13:31.000Z
2022-02-15T15:06:25.000Z
Samples/Delphi/VCL/Format/Unit1.dfm
tomajexpress/I18N
2cb4161cb70645e62675925089b15e6ece9bd915
[ "MIT" ]
20
2019-10-09T03:44:00.000Z
2022-02-28T00:01:48.000Z
object Form1: TForm1 Left = 0 Top = 0 Caption = 'Sample' ClientHeight = 146 ClientWidth = 338 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel Left = 8 Top = 56 Width = 34 Height = 13 Caption = 'dummy' end object Label2: TLabel Left = 8 Top = 72 Width = 34 Height = 13 Caption = 'dummy' end object Label3: TLabel Left = 8 Top = 88 Width = 34 Height = 13 Caption = 'dummy' end object Label4: TLabel Left = 8 Top = 104 Width = 34 Height = 13 Caption = 'dummy' end object Label5: TLabel Left = 8 Top = 120 Width = 34 Height = 13 Caption = 'dummy' end object FirstNameLabel: TLabel Left = 8 Top = 8 Width = 54 Height = 13 Caption = '&First name:' end object CountLabel: TLabel Left = 264 Top = 8 Width = 33 Height = 13 Caption = '&Count:' end object SecondNameLabel: TLabel Left = 136 Top = 8 Width = 68 Height = 13 Caption = '&Second name:' end object FirstNameEdit: TEdit Left = 8 Top = 24 Width = 121 Height = 21 TabOrder = 0 OnChange = EditChange end object SecondNameEdit: TEdit Left = 136 Top = 24 Width = 121 Height = 21 TabOrder = 1 OnChange = EditChange end object CountEdit: TEdit Left = 264 Top = 24 Width = 49 Height = 21 TabOrder = 2 Text = '0' OnChange = EditChange end object CountUpDown: TUpDown Left = 313 Top = 24 Width = 16 Height = 21 Associate = CountEdit TabOrder = 3 end object LanguageButton: TButton Left = 248 Top = 112 Width = 83 Height = 25 Caption = '&Language...' TabOrder = 4 OnClick = LanguageButtonClick end end
17.189655
33
0.582748
83c52cdd9df91b8402de429a55b79c44c6c1c5c4
1,536
dfm
Pascal
Units/Produtos.dfm
IltonS/sistema-gestao-compras
8aba3d935da297b2b33e795cbeaafe7f6c975194
[ "MIT" ]
null
null
null
Units/Produtos.dfm
IltonS/sistema-gestao-compras
8aba3d935da297b2b33e795cbeaafe7f6c975194
[ "MIT" ]
null
null
null
Units/Produtos.dfm
IltonS/sistema-gestao-compras
8aba3d935da297b2b33e795cbeaafe7f6c975194
[ "MIT" ]
null
null
null
inherited FrmProdutos: TFrmProdutos Caption = 'FrmProdutos' ClientWidth = 758 ExplicitWidth = 764 PixelsPerInch = 96 TextHeight = 13 inherited PnlTitulo: TPanel Width = 758 end inherited PnlFormulario: TPanel Width = 758 Height = 54 ExplicitWidth = 758 ExplicitHeight = 54 object Label1: TLabel Left = 16 Top = 16 Width = 87 Height = 13 Caption = 'Nome do Produto:' end object Label2: TLabel Left = 376 Top = 16 Width = 43 Height = 13 Caption = 'Unidade:' end object DBEdit1: TDBEdit Left = 109 Top = 13 Width = 261 Height = 21 DataField = 'nome_produto' DataSource = DataSource TabOrder = 0 end object DBEdit2: TDBEdit Left = 425 Top = 13 Width = 233 Height = 21 DataField = 'unidade' DataSource = DataSource TabOrder = 1 end end inherited DBGrid: TDBGrid Top = 161 Width = 758 Height = 215 Columns = < item Expanded = False FieldName = 'nome_produto' Title.Caption = 'Nome do Produto' Visible = True end item Expanded = False FieldName = 'unidade' Title.Caption = 'Unidade' Visible = True end> end inherited PnlControles: TPanel Width = 758 end inherited PnlPesquisa: TPanel Width = 758 end inherited DataSource: TDataSource DataSet = DM.TableProdutos Left = 40 Top = 304 end end
19.692308
41
0.579427
f17e6aae9f769ce436c4e98954253f3655374b17
1,324
pas
Pascal
src/Dispatcher/Factories/XSimpleDispatcherFactoryImpl.pas
zamronypj/fano-framework
559e385be5e1d26beada94c46eb8e760c4d855da
[ "MIT" ]
78
2019-01-31T13:40:48.000Z
2022-03-22T17:26:54.000Z
src/Dispatcher/Factories/XSimpleDispatcherFactoryImpl.pas
zamronypj/fano-framework
559e385be5e1d26beada94c46eb8e760c4d855da
[ "MIT" ]
24
2020-01-04T11:50:53.000Z
2022-02-17T09:55:23.000Z
src/Dispatcher/Factories/XSimpleDispatcherFactoryImpl.pas
zamronypj/fano-framework
559e385be5e1d26beada94c46eb8e760c4d855da
[ "MIT" ]
9
2018-11-05T03:43:24.000Z
2022-01-21T17:23:30.000Z
{*! * Fano Web Framework (https://fanoframework.github.io) * * @link https://github.com/fanoframework/fano * @copyright Copyright (c) 2018 - 2020 Zamrony P. Juhara * @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT) *} unit XSimpleDispatcherFactoryImpl; interface {$MODE OBJFPC} uses DependencyIntf, DependencyContainerIntf, FactoryImpl, RouteMatcherIntf, RequestResponseFactoryIntf, SimpleDispatcherFactoryImpl; type (*!-------------------------------------------------- * factory class for TXSimpleDispatcher, * route dispatcher implementation which does not support * middleware * * @author Zamrony P. Juhara <zamronypj@yahoo.com> *---------------------------------------------------*) TXSimpleDispatcherFactory = class(TSimpleDispatcherFactory) public function build(const container : IDependencyContainer) : IDependency; override; end; implementation uses XSimpleDispatcherImpl; function TXSimpleDispatcherFactory.build(const container : IDependencyContainer) : IDependency; begin result := TXSimpleDispatcher.create( fRouteMatcher, fRequestResponseFactory.responseFactory, fRequestResponseFactory.requestFactory ); end; end.
24.981132
99
0.649547
f1a068a86b703c768d6a16c02485a3ee94d5371d
5,504
pas
Pascal
Wrappers/Delphi/uRRList.pas
gregmedlock/roadrunnerwork
11f18f78ef3e381bc59c546a8d5e3ed46d8ab596
[ "Apache-2.0" ]
null
null
null
Wrappers/Delphi/uRRList.pas
gregmedlock/roadrunnerwork
11f18f78ef3e381bc59c546a8d5e3ed46d8ab596
[ "Apache-2.0" ]
null
null
null
Wrappers/Delphi/uRRList.pas
gregmedlock/roadrunnerwork
11f18f78ef3e381bc59c546a8d5e3ed46d8ab596
[ "Apache-2.0" ]
null
null
null
unit uRRList; { Copyright 2012 Herbert M Sauro Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. In plain english this means: You CAN freely download and use this software, in whole or in part, for personal, company internal, or commercial purposes. You CAN use the software in packages or distributions that you create. You SHOULD include a copy of the license in any redistribution you may make. You are NOT required include the source of software, or of any modifications you may have made to it, in any redistribution you may assemble that includes it. YOU CANNOT: redistribute any piece of this software without proper attribution; } interface Uses SysUtils, Classes; //, uSBWCommon, uSBWComplex, uSBWArray; type TRRList = class; TRRListType = (rrList, rrInteger, rrDouble, rrString); TRRListItem = class (TObject) public DataType : TRRListType; iValue : integer; dValue : double; sValue : AnsiString; list : TRRList; function getInteger : Double; function getDouble : double; function getString : AnsiString; function getList : TRRList; constructor Create (iValue : integer); overload; constructor Create (dValue : double); overload; constructor Create (sValue : AnsiString); overload; constructor Create (list : TRRList); overload; destructor Destroy; override; end; TRRList = class (TList) protected function Get (Index : integer) : TRRListItem; procedure Put (Index : integer; Item : TRRListItem); public destructor Destroy; override; function Add (Item : TRRListItem) : integer; procedure Delete (Index : Integer); procedure copy (src : TRRList); property Items[Index : integer] : TRRListItem read Get write Put; default; //function Count : integer; end; implementation constructor TRRListItem.Create (iValue : integer); begin inherited Create; DataType := rrInteger; Self.iValue := iValue; end; constructor TRRListItem.Create (dValue : double); begin inherited Create; DataType := rrDouble; Self.dValue := dValue; end; constructor TRRListItem.Create (sValue : AnsiString); begin inherited Create; DataType := rrString; Self.sValue := sValue; end; constructor TRRListItem.Create (list : TRRList); begin inherited Create; DataType := rrList; Self.list := List; end; destructor TRRListItem.Destroy; begin case DataType of rrList : List.Free; end; inherited Destroy; end; // -------------------------------------------------------------------------- function TRRListItem.getInteger : Double; begin if DataType <> rrInteger then raise Exception.Create ('Integer expected in List item'); result := iValue; end; function TRRListItem.getDouble : Double; begin if DataType <> rrDouble then raise Exception.Create ('Double expected in List item'); result := dValue; end; function TRRListItem.getString : AnsiString; begin if DataType <> rrString then raise Exception.Create ('String expected in List item'); result := sValue; end; function TRRListItem.getList : TRRList; begin if DataType <> rrList then raise Exception.Create ('List expected in List item'); result := list; end; // ---------------------------------------------------------------------- function TRRList.Get (Index : integer) : TRRListItem; begin result := TRRListItem(inherited Get(index)); end; procedure TRRList.Put (Index : integer; Item : TRRListItem); begin inherited Put (Index, Item); end; function TRRList.Add (Item : TRRListItem) : integer; begin result := inherited Add (Item); end; procedure TRRList.Delete (Index : Integer); begin Items[Index].Free; Items[Index] := nil; inherited Delete (Index); end; destructor TRRList.Destroy; var i : integer; begin for i := 0 to Count - 1 do Items[i].Free; inherited Destroy; end; procedure TRRList.copy (src: TRRList); var i : integer; begin self.Clear; for i := 0 to src.count - 1 do begin case src[i].DataType of rrInteger : self.add (TRRListItem.Create(src[i].iValue)); rrDouble : self.add (TRRListItem.Create(src[i].dValue)); rrString : self.add (TRRListItem.Create(src[i].sValue)); rrList : self.add (TRRListItem.Create(src[i].list)); else raise Exception.Create ('Unknown data type while copying List'); end; end; end; // ---------------------------------------------------------------------- end.
25.481481
91
0.610647
854d9b7f94f6952731e643ec26eeef58426247b3
32,865
pas
Pascal
JsonTools/jsontools.pas
TheRF/vpp_generator
a036274bf95f6f0c5f28a235af87da46acdab586
[ "MIT" ]
null
null
null
JsonTools/jsontools.pas
TheRF/vpp_generator
a036274bf95f6f0c5f28a235af87da46acdab586
[ "MIT" ]
null
null
null
JsonTools/jsontools.pas
TheRF/vpp_generator
a036274bf95f6f0c5f28a235af87da46acdab586
[ "MIT" ]
null
null
null
(********************************************************) (* *) (* Json Tools Pascal Unit *) (* A small json parser with no dependencies *) (* *) (* http://www.getlazarus.org/json *) (* Dual licence GPLv3 LGPLv3 released August 2019 *) (* *) (********************************************************) unit JsonTools; {$mode delphi} interface uses Classes, SysUtils; { EJsonException is the exception type used by TJsonNode. It is thrown during parse if the string is invalid json or if an attempt is made to access a non collection by name or index. } type EJsonException = class(Exception); { TJsonNodeKind is 1 of 6 possible values described below } TJsonNodeKind = ( { Object such as { } nkObject, { Array such as [ ] } nkArray, { The literal values true or false } nkBool, { The literal value null } nkNull, { A number value such as 123, 1.23e2, or -1.5 } nkNumber, { A string such as "hello\nworld!" } nkString); TJsonNode = class; { TJsonNodeEnumerator is used to enumerate 'for ... in' statements } TJsonNodeEnumerator = record private FNode: TJsonNode; FIndex: Integer; public procedure Init(Node: TJsonNode); function GetCurrent: TJsonNode; function MoveNext: Boolean; property Current: TJsonNode read GetCurrent; end; { TJsonNode is the class used to parse, build, and navigate a json document. You should only create and free the root node of your document. The root node will manage the lifetime of all children through methods such as Add, Delete, and Clear. When you create a TJsonNode node it will have no parent and is considered to be the root node. The root node must be either an array or an object. Attempts to convert a root to anything other than array or object will raise an exception. Note: The parser supports unicode by converting unicode characters escaped as values such as \u20AC. If your json string has an escaped unicode character it will be unescaped when converted to a pascal string. See also: JsonStringDecode to convert a JSON string to a normal string JsonStringEncode to convert a normal string to a JSON string } TJsonNode = class private FStack: Integer; FParent: TJsonNode; FName: string; FKind: TJsonNodeKind; FValue: string; FList: TList; procedure ParseObject(Node: TJsonNode; var C: PChar); procedure ParseArray(Node: TJsonNode; var C: PChar); procedure Error(const Msg: string = ''); function Format(const Indent: string): string; function FormatCompact: string; function Add(Kind: TJsonNodeKind; const Name, Value: string): TJsonNode; overload; function GetRoot: TJsonNode; procedure SetKind(Value: TJsonNodeKind); function GetName: string; procedure SetName(const Value: string); function GetValue: string; function GetCount: Integer; function GetAsJson: string; function GetAsArray: TJsonNode; function GetAsObject: TJsonNode; function GetAsNull: TJsonNode; function GetAsBoolean: Boolean; procedure SetAsBoolean(Value: Boolean); function GetAsString: string; procedure SetAsString(const Value: string); function GetAsNumber: Double; procedure SetAsNumber(Value: Double); public { A parent node owns all children. Only destroy a node if it has no parent. To destroy a child node use Delete or Clear methods instead. } destructor Destroy; override; { GetEnumerator adds 'for ... in' statement support } function GetEnumerator: TJsonNodeEnumerator; { Loading and saving methods } procedure LoadFromStream(Stream: TStream); procedure SaveToStream(Stream: TStream); procedure LoadFromFile(const FileName: string); procedure SaveToFile(const FileName: string); { Convert a json string into a value or a collection of nodes. If the current node is root then the json must be an array or object. } procedure Parse(const Json: string); { The same as Parse, but returns true if no exception is caught } function TryParse(const Json: string): Boolean; { Add a child node by node kind. If the current node is an array then the name parameter will be discarded. If the current node is not an array or object the Add methods will convert the node to an object and discard its current value. Note: If the current node is an object then adding an existing name will overwrite the matching child node instead of adding. } function Add(const Name: string; K: TJsonNodeKind = nkObject): TJsonNode; overload; function Add(const Name: string; B: Boolean): TJsonNode; overload; function Add(const Name: string; const N: Double): TJsonNode; overload; function Add(const Name: string; const S: string): TJsonNode; overload; { Delete a child node by index or name } procedure Delete(Index: Integer); overload; procedure Delete(const Name: string); overload; { Remove all child nodes } procedure Clear; { Get a child node by index. EJsonException is raised if node is not an array or object or if the index is out of bounds. See also: Count } function Child(Index: Integer): TJsonNode; overload; { Get a child node by name. If no node is found nil will be returned. } function Child(const Name: string): TJsonNode; overload; { Search for a node using a path string } function Find(const Path: string): TJsonNode; { Format the node and all its children as json } function ToString: string; override; { Root node is read only. A node the root when it has no parent. } property Root: TJsonNode read GetRoot; { Parent node is read only } property Parent: TJsonNode read FParent; { Kind can also be changed using the As methods. Note: Changes to Kind cause Value to be reset to a default value. } property Kind: TJsonNodeKind read FKind write SetKind; { Name is unique within the scope } property Name: string read GetName write SetName; { Value of the node in json e.g. '[]', '"hello\nworld!"', 'true', or '1.23e2' } property Value: string read GetValue write Parse; { The number of child nodes. If node is not an object or array this property will return 0. } property Count: Integer read GetCount; { AsJson is the more efficient version of Value. Text returned from AsJson is the most compact representation of the node in json form. Note: If you are writing a services to transmit or receive json data then use AsJson. If you want friendly human readable text use Value. } property AsJson: string read GetAsJson write Parse; { Convert the node to an array } property AsArray: TJsonNode read GetAsArray; { Convert the node to an object } property AsObject: TJsonNode read GetAsObject; { Convert the node to null } property AsNull: TJsonNode read GetAsNull; { Convert the node to a bool } property AsBoolean: Boolean read GetAsBoolean write SetAsBoolean; { Convert the node to a string } property AsString: string read GetAsString write SetAsString; { Convert the node to a number } property AsNumber: Double read GetAsNumber write SetAsNumber; end; { JsonValidate tests if a string contains a valid json format } function JsonValidate(const Json: string): Boolean; { JsonNumberValidate tests if a string contains a valid json formatted number } function JsonNumberValidate(const N: string): Boolean; { JsonStringValidate tests if a string contains a valid json formatted string } function JsonStringValidate(const S: string): Boolean; { JsonStringEncode converts a pascal string to a json string } function JsonStringEncode(const S: string): string; { JsonStringEncode converts a json string to a pascal string } function JsonStringDecode(const S: string): string; { JsonStringEncode converts a json string to xml } function JsonToXml(const S: string): string; implementation resourcestring SNodeNotCollection = 'Node is not a container'; SRootNodeKind = 'Root node must be an array or object'; SIndexOutOfBounds = 'Index out of bounds'; SParsingError = 'Error while parsing text'; type TJsonTokenKind = (tkEnd, tkError, tkObjectOpen, tkObjectClose, tkArrayOpen, tkArrayClose, tkColon, tkComma, tkNull, tkFalse, tkTrue, tkString, tkNumber); TJsonToken = record Head: PChar; Tail: PChar; Kind: TJsonTokenKind; function Value: string; end; const Hex = ['0'..'9', 'A'..'F', 'a'..'f']; function TJsonToken.Value: string; begin case Kind of tkEnd: Result := #0; tkError: Result := #0; tkObjectOpen: Result := '{'; tkObjectClose: Result := '}'; tkArrayOpen: Result := '['; tkArrayClose: Result := ']'; tkColon: Result := ':'; tkComma: Result := ','; tkNull: Result := 'null'; tkFalse: Result := 'false'; tkTrue: Result := 'true'; else SetString(Result, Head, Tail - Head); end; end; function NextToken(var C: PChar; out T: TJsonToken): Boolean; begin if C^ > #0 then if C^ <= ' ' then repeat Inc(C); if C^ = #0 then Break; until C^ > ' '; T.Head := C; T.Tail := C; T.Kind := tkEnd; if C^ = #0 then Exit(False); if C^ = '{' then begin Inc(C); T.Tail := C; T.Kind := tkObjectOpen; Exit(True); end; if C^ = '}' then begin Inc(C); T.Tail := C; T.Kind := tkObjectClose; Exit(True); end; if C^ = '[' then begin Inc(C); T.Tail := C; T.Kind := tkArrayOpen; Exit(True); end; if C^ = ']' then begin Inc(C); T.Tail := C; T.Kind := tkArrayClose; Exit(True); end; if C^ = ':' then begin Inc(C); T.Tail := C; T.Kind := tkColon; Exit(True); end; if C^ = ',' then begin Inc(C); T.Tail := C; T.Kind := tkComma; Exit(True); end; if (C[0] = 'n') and (C[1] = 'u') and (C[2] = 'l') and (C[3] = 'l') then begin Inc(C, 4); T.Tail := C; T.Kind := tkNull; Exit(True); end; if (C[0] = 'f') and (C[1] = 'a') and (C[2] = 'l') and (C[3] = 's') and (C[4] = 'e') then begin Inc(C, 5); T.Tail := C; T.Kind := tkFalse; Exit(True); end; if (C[0] = 't') and (C[1] = 'r') and (C[2] = 'u') and (C[3] = 'e') then begin Inc(C, 4); T.Tail := C; T.Kind := tkTrue; Exit(True); end; if C^ = '"' then begin repeat Inc(C); if C^ = '\' then begin Inc(C); if C^ = '"' then Inc(C) else if C^ = 'u' then if not ((C[1] in Hex) and (C[2] in Hex) and (C[3] in Hex) and (C[4] in Hex)) then begin T.Tail := C; T.Kind := tkError; Exit(False); end; end; until C^ in [#0, #10, #13, '"']; if C^ = '"' then begin Inc(C); T.Tail := C; T.Kind := tkString; Exit(True); end; T.Tail := C; T.Kind := tkError; Exit(False); end; if C^ in ['-', '0'..'9'] then begin if C^ = '-' then Inc(C); if C^ in ['0'..'9'] then begin while C^ in ['0'..'9'] do Inc(C); if C^ = '.' then begin Inc(C); if C^ in ['0'..'9'] then begin while C^ in ['0'..'9'] do Inc(C); end else begin T.Tail := C; T.Kind := tkError; Exit(False); end; end; if C^ in ['E', 'e'] then begin Inc(C); if C^ = '+' then Inc(C) else if C^ = '-' then Inc(C); if C^ in ['0'..'9'] then begin while C^ in ['0'..'9'] do Inc(C); end else begin T.Tail := C; T.Kind := tkError; Exit(False); end; end; T.Tail := C; T.Kind := tkNumber; Exit(True); end; end; T.Kind := tkError; Result := False; end; { TJsonNodeEnumerator } procedure TJsonNodeEnumerator.Init(Node: TJsonNode); begin FNode := Node; FIndex := -1; end; function TJsonNodeEnumerator.GetCurrent: TJsonNode; begin if FNode.FList = nil then Result := nil else if FIndex < 0 then Result := nil else if FIndex < FNode.FList.Count then Result := TJsonNode(FNode.FList[FIndex]) else Result := nil; end; function TJsonNodeEnumerator.MoveNext: Boolean; begin Inc(FIndex); if FNode.FList = nil then Result := False else Result := FIndex < FNode.FList.Count; end; { TJsonNode } destructor TJsonNode.Destroy; begin Clear; inherited Destroy; end; function TJsonNode.GetEnumerator: TJsonNodeEnumerator; begin Result.Init(Self); end; procedure TJsonNode.LoadFromStream(Stream: TStream); var S: string; I: Int64; begin I := Stream.Size - Stream.Position; S := ''; SetLength(S, I); Stream.Read(PChar(S)^, I); Parse(S); end; procedure TJsonNode.SaveToStream(Stream: TStream); var S: string; I: Int64; begin S := Value; I := Length(S); Stream.Write(PChar(S)^, I); end; procedure TJsonNode.LoadFromFile(const FileName: string); var F: TFileStream; begin F := TFileStream.Create(FileName, fmOpenRead); try LoadFromStream(F); finally F.Free; end; end; procedure TJsonNode.SaveToFile(const FileName: string); var F: TFileStream; begin F := TFileStream.Create(FileName, fmCreate); try SaveToStream(F); finally F.Free; end; end; const MaxStack = 1000; procedure TJsonNode.ParseObject(Node: TJsonNode; var C: PChar); var T: TJsonToken; N: string; begin Inc(FStack); if FStack > MaxStack then Error; while NextToken(C, T) do begin case T.Kind of tkString: N := JsonStringDecode(T.Value); tkObjectClose: begin Dec(FStack); Exit; end else Error; end; NextToken(C, T); if T.Kind <> tkColon then Error; NextToken(C, T); case T.Kind of tkObjectOpen: ParseObject(Node.Add(nkObject, N, ''), C); tkArrayOpen: ParseArray(Node.Add(nkArray, N, ''), C); tkNull: Node.Add(nkNull, N, 'null'); tkFalse: Node.Add(nkBool, N, 'false'); tkTrue: Node.Add(nkBool, N, 'true'); tkString: Node.Add(nkString, N, T.Value); tkNumber: Node.Add(nkNumber, N, T.Value); else Error; end; NextToken(C, T); if T.Kind = tkComma then Continue; if T.Kind = tkObjectClose then begin Dec(FStack); Exit; end; Error; end; Error; end; procedure TJsonNode.ParseArray(Node: TJsonNode; var C: PChar); var T: TJsonToken; begin Inc(FStack); if FStack > MaxStack then Error; while NextToken(C, T) do begin case T.Kind of tkObjectOpen: ParseObject(Node.Add(nkObject, '', ''), C); tkArrayOpen: ParseArray(Node.Add(nkArray, '', ''), C); tkNull: Node.Add(nkNull, '', 'null'); tkFalse: Node.Add(nkBool, '', 'false'); tkTrue: Node.Add(nkBool, '', 'true'); tkString: Node.Add(nkString, '', T.Value); tkNumber: Node.Add(nkNumber, '', T.Value); tkArrayClose: begin Dec(FStack); Exit; end else Error; end; NextToken(C, T); if T.Kind = tkComma then Continue; if T.Kind = tkArrayClose then begin Dec(FStack); Exit; end; Error; end; Error; end; procedure TJsonNode.Parse(const Json: string); var C: PChar; T: TJsonToken; begin Clear; C := PChar(Json); if FParent = nil then begin if NextToken(C, T) and (T.Kind in [tkObjectOpen, tkArrayOpen]) then begin try if T.Kind = tkObjectOpen then begin FKind := nkObject; ParseObject(Self, C); end else begin FKind := nkArray; ParseArray(Self, C); end; NextToken(C, T); if T.Kind <> tkEnd then Error; except Clear; raise; end; end else Error(SRootNodeKind); end else begin NextToken(C, T); case T.Kind of tkObjectOpen: begin FKind := nkObject; ParseObject(Self, C); end; tkArrayOpen: begin FKind := nkArray; ParseArray(Self, C); end; tkNull: begin FKind := nkNull; FValue := 'null'; end; tkFalse: begin FKind := nkBool; FValue := 'false'; end; tkTrue: begin FKind := nkBool; FValue := 'true'; end; tkString: begin FKind := nkString; FValue := T.Value; end; tkNumber: begin FKind := nkNumber; FValue := T.Value; end; else Error; end; NextToken(C, T); if T.Kind <> tkEnd then begin Clear; Error; end; end; end; function TJsonNode.TryParse(const Json: string): Boolean; begin try Parse(Json); Result := True; except Result := False; end; end; procedure TJsonNode.Error(const Msg: string = ''); begin FStack := 0; if Msg = '' then raise EJsonException.Create(SParsingError) else raise EJsonException.Create(Msg); end; function TJsonNode.GetRoot: TJsonNode; begin Result := Self; while Result.FParent <> nil do Result := Result.FParent; end; procedure TJsonNode.SetKind(Value: TJsonNodeKind); begin if Value = FKind then Exit; case Value of nkObject: AsObject; nkArray: AsArray; nkBool: AsBoolean; nkNull: AsNull; nkNumber: AsNumber; nkString: AsString; end; end; function TJsonNode.GetName: string; begin if FParent = nil then Exit('0'); if FParent.FKind = nkArray then Result := IntToStr(FParent.FList.IndexOf(Self)) else Result := FName; end; procedure TJsonNode.SetName(const Value: string); var N: TJsonNode; begin if FParent = nil then Exit; if FParent.FKind = nkArray then Exit; N := FParent.Child(Value); if N = Self then Exit; FParent.FList.Remove(N); FName := Value; end; function TJsonNode.GetValue: string; begin if FKind in [nkObject, nkArray] then Result := Format('') else Result := FValue; end; function TJsonNode.GetAsJson: string; begin if FKind in [nkObject, nkArray] then Result := FormatCompact else Result := FValue; end; function TJsonNode.GetAsArray: TJsonNode; begin if FKind <> nkArray then begin Clear; FKind := nkArray; FValue := ''; end; Result := Self; end; function TJsonNode.GetAsObject: TJsonNode; begin if FKind <> nkObject then begin Clear; FKind := nkObject; FValue := ''; end; Result := Self; end; function TJsonNode.GetAsNull: TJsonNode; begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkNull then begin Clear; FKind := nkNull; FValue := 'null'; end; Result := Self; end; function TJsonNode.GetAsBoolean: Boolean; begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkBool then begin Clear; FKind := nkBool; FValue := 'false'; Exit(False); end; Result := FValue = 'true'; end; procedure TJsonNode.SetAsBoolean(Value: Boolean); begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkBool then begin Clear; FKind := nkBool; end; if Value then FValue := 'true' else FValue := 'false'; end; function TJsonNode.GetAsString: string; begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkString then begin Clear; FKind := nkString; FValue := '""'; Exit(''); end; Result := JsonStringDecode(FValue); end; procedure TJsonNode.SetAsString(const Value: string); begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkString then begin Clear; FKind := nkString; end; FValue := JsonStringEncode(Value); end; function TJsonNode.GetAsNumber: Double; begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkNumber then begin Clear; FKind := nkNumber; FValue := '0'; Exit(0); end; Result := StrToFloatDef(FValue, 0); end; procedure TJsonNode.SetAsNumber(Value: Double); begin if FParent = nil then Error(SRootNodeKind); if FKind <> nkNumber then begin Clear; FKind := nkNumber; end; FValue := FloatToStr(Value); end; function TJsonNode.Add(Kind: TJsonNodeKind; const Name, Value: string): TJsonNode; var S: string; begin if not (FKind in [nkArray, nkObject]) then if Name = '' then AsArray else AsObject; if FKind in [nkArray, nkObject] then begin if FList = nil then FList := TList.Create; if FKind = nkArray then S := IntToStr(FList.Count) else S := Name; Result := Child(S); if Result = nil then begin Result := TJsonNode.Create; Result.FName := S; FList.Add(Result); end; if Kind = nkNull then Result.FValue := 'null' else if Kind in [nkBool, nkString, nkNumber] then Result.FValue := Value else begin Result.FValue := ''; Result.Clear; end; Result.FParent := Self; Result.FKind := Kind; end else Error(SNodeNotCollection); end; function TJsonNode.Add(const Name: string; K: TJsonNodeKind = nkObject): TJsonNode; overload; begin case K of nkObject, nkArray: Result := Add(K, Name, ''); nkNull: Result := Add(K, Name, 'null'); nkBool: Result := Add(K, Name, 'false'); nkNumber: Result := Add(K, Name, '0'); nkString: Result := Add(K, Name, '""'); end; end; function TJsonNode.Add(const Name: string; B: Boolean): TJsonNode; overload; const Bools: array[Boolean] of string = ('false', 'true'); begin Result := Add(nkBool, Name, Bools[B]); end; function TJsonNode.Add(const Name: string; const N: Double): TJsonNode; overload; begin Result := Add(nkNumber, Name, FloatToStr(N)); end; function TJsonNode.Add(const Name: string; const S: string): TJsonNode; overload; begin Result := Add(nkString, Name, JsonStringEncode(S)); end; procedure TJsonNode.Delete(Index: Integer); var N: TJsonNode; begin N := Child(Index); if N <> nil then begin FList.Delete(Index); if FList.Count = 0 then begin FList.Free; FList := nil; end; end; end; procedure TJsonNode.Delete(const Name: string); var N: TJsonNode; begin N := Child(Name); if N <> nil then begin FList.Remove(N); if FList.Count = 0 then begin FList.Free; FList := nil; end; end; end; procedure TJsonNode.Clear; var I: Integer; begin if FList <> nil then begin for I := 0 to FList.Count - 1 do TObject(FList[I]).Free; FList.Free; FList := nil; end; end; function TJsonNode.Child(Index: Integer): TJsonNode; begin if FKind in [nkArray, nkObject] then begin if FList = nil then Error(SIndexOutOfBounds); if (Index < 0) or (Index > FList.Count - 1) then Error(SIndexOutOfBounds); Result := TJsonNode(FList[Index]); end else Error(SNodeNotCollection); end; function TJsonNode.Child(const Name: string): TJsonNode; var N: TJsonNode; I: Integer; begin Result := nil; if (FList <> nil) and (FKind in [nkArray, nkObject]) then if FKind = nkArray then begin I := StrToIntDef(Name, -1); if (I > -1) and (I < FList.Count) then Exit(TJsonNode(FList[I])); end else for I := 0 to FList.Count - 1 do begin N := TJsonNode(FList[I]); if N.FName = Name then Exit(N); end; end; function TJsonNode.Find(const Path: string): TJsonNode; var N: TJsonNode; A, B: PChar; S: string; begin Result := nil; if Path = '' then Exit(Child('')); if Path[1] = '/' then begin N := Self; while N.Parent <> nil do N := N.Parent; end else N := Self; A := PChar(Path); if A^ = '/' then begin Inc(A); if A^ = #0 then Exit(N); end; if A^ = #0 then Exit(N.Child('')); B := A; while B^ > #0 do begin if B^ = '/' then begin SetString(S, A, B - A); N := N.Child(S); if N = nil then Exit(nil); A := B + 1; B := A; end else begin Inc(B); if B^ = #0 then begin SetString(S, A, B - A); N := N.Child(S); end; end; end; Result := N; end; function TJsonNode.Format(const Indent: string): string; function EnumNodes: string; var I, J: Integer; S: string; begin if (FList = nil) or (FList.Count = 0) then Exit(' '); Result := #10; J := FList.Count - 1; S := Indent + #9; for I := 0 to J do begin Result := Result + TJsonNode(FList[I]).Format(S); if I < J then Result := Result + ','#10 else Result := Result + #10 + Indent; end; end; var Prefix: string; begin Result := ''; if (FParent <> nil) and (FParent.FKind = nkObject) then Prefix := JsonStringEncode(FName) + ': ' else Prefix := ''; case FKind of nkObject: Result := Indent + Prefix +'{' + EnumNodes + '}'; nkArray: Result := Indent + Prefix + '[' + EnumNodes + ']'; else Result := Indent + Prefix + FValue; end; end; function TJsonNode.FormatCompact: string; function EnumNodes: string; var I, J: Integer; begin Result := ''; if (FList = nil) or (FList.Count = 0) then Exit; J := FList.Count - 1; for I := 0 to J do begin Result := Result + TJsonNode(FList[I]).FormatCompact; if I < J then Result := Result + ','; end; end; var Prefix: string; begin Result := ''; if (FParent <> nil) and (FParent.FKind = nkObject) then Prefix := JsonStringEncode(FName) + ':' else Prefix := ''; case FKind of nkObject: Result := Prefix + '{' + EnumNodes + '}'; nkArray: Result := Prefix + '[' + EnumNodes + ']'; else Result := Prefix + FValue; end; end; function TJsonNode.ToString: string; begin Result := Format(''); end; function TJsonNode.GetCount: Integer; begin if FList <> nil then Result := FList.Count else Result := 0; end; { Json helper routines } function JsonValidate(const Json: string): Boolean; var N: TJsonNode; begin N := TJsonNode.Create; try Result := N.TryParse(Json); finally N.Free; end; end; function JsonNumberValidate(const N: string): Boolean; var C: PChar; T: TJsonToken; begin C := PChar(N); Result := NextToken(C, T) and (T.Kind = tkNumber) and (T.Value = N); end; function JsonStringValidate(const S: string): Boolean; var C: PChar; T: TJsonToken; begin C := PChar(S); Result := NextToken(C, T) and (T.Kind = tkString) and (T.Value = S); end; { Convert a pascal string to a json string } function JsonStringEncode(const S: string): string; function Len(C: PChar): Integer; var I: Integer; begin I := 0; while C^ > #0 do begin if C^ < ' ' then if C^ in [#8..#13] then Inc(I, 2) else Inc(I, 6) else if C^ in ['"', '\'] then Inc(I, 2) else Inc(I); Inc(C); end; Result := I + 2; end; const EscapeChars: PChar = '01234567btnvfr'; HexChars: PChar = '0123456789ABCDEF'; var C: PChar; R: string; I: Integer; begin if S = '' then Exit('""'); C := PChar(S); R := ''; SetLength(R, Len(C)); R[1] := '"'; I := 2; while C^ > #0 do begin if C^ < ' ' then begin R[I] := '\'; Inc(I); if C^ in [#8..#13] then R[I] := EscapeChars[Ord(C^)] else begin R[I] := 'u'; R[I + 1] := '0'; R[I + 2] := '0'; R[I + 3] := HexChars[Ord(C^) div $10]; R[I + 4] := HexChars[Ord(C^) mod $10]; Inc(I, 4); end; end else if C^ in ['"', '\'] then begin R[I] := '\'; Inc(I); R[I] := C^; end else R[I] := C^; Inc(I); Inc(C); end; R[Length(R)] := '"'; Result := R; end; { Convert a json string to a pascal string } function UnicodeToString(C: LongWord): string; inline; begin if C = 0 then Result := #0 else if C < $80 then Result := Chr(C) else if C < $800 then Result := Chr((C shr $6) + $C0) + Chr((C and $3F) + $80) else if C < $10000 then Result := Chr((C shr $C) + $E0) + Chr(((C shr $6) and $3F) + $80) + Chr((C and $3F) + $80) else if C < $200000 then Result := Chr((C shr $12) + $F0) + Chr(((C shr $C) and $3F) + $80) + Chr(((C shr $6) and $3F) + $80) + Chr((C and $3F) + $80) else Result := ''; end; function UnicodeToSize(C: LongWord): Integer; inline; begin if C = 0 then Result := 1 else if C < $80 then Result := 1 else if C < $800 then Result := 2 else if C < $10000 then Result := 3 else if C < $200000 then Result := 4 else Result := 0; end; function HexToByte(C: Char): Byte; inline; const Zero = Ord('0'); UpA = Ord('A'); LoA = Ord('a'); begin if C < 'A' then Result := Ord(C) - Zero else if C < 'a' then Result := Ord(C) - UpA + 10 else Result := Ord(C) - LoA + 10; end; function HexToInt(A, B, C, D: Char): Integer; inline; begin Result := HexToByte(A) shl 12 or HexToByte(B) shl 8 or HexToByte(C) shl 4 or HexToByte(D); end; function JsonStringDecode(const S: string): string; function Len(C: PChar): Integer; var I, J: Integer; begin if C^ <> '"' then Exit(0); Inc(C); I := 0; while C^ <> '"' do begin if C^ = #0 then Exit(0); if C^ = '\' then begin Inc(C); if C^ = 'u' then begin if (C[1] in Hex) and (C[2] in Hex) and (C[3] in Hex) and (C[4] in Hex) then begin J := UnicodeToSize(HexToInt(C[1], C[2], C[3], C[4])); if J = 0 then Exit(0); Inc(I, J - 1); Inc(C, 4); end else Exit(0); end else if C^ = #0 then Exit(0) end; Inc(C); Inc(I); end; Result := I; end; const Escape = ['b', 't', 'n', 'v', 'f', 'r']; var C: PChar; R: string; I, J: Integer; H: string; begin C := PChar(S); I := Len(C); if I < 1 then Exit(''); R := ''; SetLength(R, I); I := 1; Inc(C); while C^ <> '"' do begin if C^ = '\' then begin Inc(C); if C^ in Escape then case C^ of 'b': R[I] := #8; 't': R[I] := #9; 'n': R[I] := #10; 'v': R[I] := #11; 'f': R[I] := #12; 'r': R[I] := #13; end else if C^ = 'u' then begin H := UnicodeToString(HexToInt(C[1], C[2], C[3], C[4])); for J := 1 to Length(H) - 1 do begin R[I] := H[J]; Inc(I); end; R[I] := H[Length(H)]; Inc(C, 4); end else R[I] := C^; end else R[I] := C^; Inc(C); Inc(I); end; Result := R; end; function JsonToXml(const S: string): string; const Kinds: array[TJsonNodeKind] of string = (' kind="object"', ' kind="array"', ' kind="bool"', ' kind="null"', ' kind="number"', ''); Space = ' '; function Escape(N: TJsonNode): string; begin Result := N.Value; if N.Kind = nkString then begin Result := JsonStringDecode(Result); Result := StringReplace(Result, '<', '&lt;', [rfReplaceAll]); Result := StringReplace(Result, '>', '&gt;', [rfReplaceAll]); end; end; function EnumNodes(P: TJsonNode; const Indent: string): string; var N: TJsonNode; S: string; begin Result := ''; if P.Kind = nkArray then S := 'item' else S := ''; for N in P do begin Result := Result + Indent + '<' + S + N.Name + Kinds[N.Kind]; case N.Kind of nkObject, nkArray: if N.Count > 0 then Result := Result + '>'#10 + EnumNodes(N, Indent + Space) + Indent + '</' + S + N.Name + '>'#10 else Result := Result + '/>'#10; nkNull: Result := Result + '/>'#10; else Result := Result + '>' + Escape(N) + '</' + S + N.Name + '>'#10; end; end; end; var N: TJsonNode; begin Result := ''; N := TJsonNode.Create; try if N.TryParse(S) then begin Result := '<?xml version="1.0" encoding="UTF-8"?>'#10 + '<root' + Kinds[N.Kind]; if N.Count > 0 then Result := Result + '>'#10 + EnumNodes(N, Space) + '</root>' else Result := Result + '/>'; end; finally N.Free; end; end; end.
22.587629
94
0.580131
f1b58590e3318c73852e94cfd2f004f0cb0c178c
675
pas
Pascal
3. Enumerasi dan Subrange/kalendersederhana.pas
belajarstatistik/Algoritma-Pemrograman
4f33b359254db167b6107757d35d50d391d836e2
[ "MIT" ]
null
null
null
3. Enumerasi dan Subrange/kalendersederhana.pas
belajarstatistik/Algoritma-Pemrograman
4f33b359254db167b6107757d35d50d391d836e2
[ "MIT" ]
null
null
null
3. Enumerasi dan Subrange/kalendersederhana.pas
belajarstatistik/Algoritma-Pemrograman
4f33b359254db167b6107757d35d50d391d836e2
[ "MIT" ]
null
null
null
program kalendersederhana; uses crt; type harilpekan=(Ahad, Senin, Selasa, Rabu, Kamis, Jumat, Sabtu); haribulan=1..31; var i, awalbulan:harilpekan; j, tglmaks:haribulan; x,y,k,lebar:integer; begin clrscr; write('Hari pertama awal bulan : ');readln(awalbulan); write('Jumlah hari bulan ini : ');readln(tglmaks); writeln; lebar:=7; for i:=Ahad to Sabtu do write(i:lebar); y:=5; x:=ord(awalbulan); for j:=1 to tglmaks do begin if x=7 then begin x:=0; y:=y+1; end; gotoxy (lebar*x+1,y);write(j:3); x:=x+1; end; readln; end.
24.107143
66
0.543704
f13d6c5f76e8bf99115b3f0010c10a165f25c6d5
31,169
pas
Pascal
Components/JVCL/run/JvGradientCaption.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/run/JvGradientCaption.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/run/JvGradientCaption.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
1
2019-12-24T08:39:18.000Z
2019-12-24T08:39:18.000Z
{----------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: JvGrdCpt.PAS, released on 2002-07-04. The Initial Developers of the Original Code are: Fedor Koshevnikov, Igor Pavluk and Serge Korolev Copyright (c) 1997, 1998 Fedor Koshevnikov, Igor Pavluk and Serge Korolev Copyright (c) 2001,2002 SGB Software All Rights Reserved. You may retrieve the latest version of this file at the Project JEDI's JVCL home page, located at http://jvcl.sourceforge.net Known Issues: -----------------------------------------------------------------------------} // $Id: JvGradientCaption.pas,v 1.18 2005/02/17 10:20:35 marquardt Exp $ unit JvGradientCaption; {$I jvcl.inc} interface uses {$IFDEF UNITVERSIONING} JclUnitVersioning, {$ENDIF UNITVERSIONING} Windows, Messages, Classes, Graphics, Controls, Forms, Menus, JvWndProcHook, JvJCLUtils, JvJVCLUtils; type THideDirection = (hdLeftToRight, hdRightToLeft); TJvCaption = class; TJvCaptionList = class; TJvGradientCaption = class(TComponent) private FActive: Boolean; FWindowActive: Boolean; FSaveRgn: HRGN; FRgnChanged: Boolean; FWinHook: TJvWindowHook; FStartColor: TColor; FCaptions: TJvCaptionList; FFont: TFont; FDefaultFont: Boolean; FPopupMenu: TPopupMenu; FClicked: Boolean; FHideDirection: THideDirection; FGradientInactive: Boolean; FGradientActive: Boolean; FFontInactiveColor: TColor; FFormCaption: string; FGradientSteps: Integer; FOnActivate: TNotifyEvent; FOnDeactivate: TNotifyEvent; procedure SetHook; procedure ReleaseHook; procedure CheckToggleHook; function GetActive: Boolean; procedure SetActive(Value: Boolean); procedure SetStartColor(Value: TColor); procedure DrawGradientCaption(DC: HDC); procedure CalculateGradientParams(var R: TRect; var Icons: TBorderIcons); function GetForm: TForm; function GetFormCaption: string; procedure SetFormCaption(const Value: string); procedure BeforeMessage(Sender: TObject; var Msg: TMessage; var Handled: Boolean); procedure AfterMessage(Sender: TObject; var Msg: TMessage; var Handled: Boolean); function CheckMenuPopup(X, Y: Integer): Boolean; procedure SetFont(Value: TFont); procedure FontChanged(Sender: TObject); procedure SetDefaultFont(Value: Boolean); procedure SetFontDefault; function IsFontStored: Boolean; function GetTextWidth: Integer; procedure SetCaptions(Value: TJvCaptionList); procedure SetGradientActive(Value: Boolean); procedure SetGradientInactive(Value: Boolean); procedure SetGradientSteps(Value: Integer); procedure SetFontInactiveColor(Value: TColor); procedure SetHideDirection(Value: THideDirection); procedure SetPopupMenu(Value: TPopupMenu); protected procedure Loaded; override; procedure Notification(AComponent: TComponent; Operation: TOperation); override; function IsRightToLeft: Boolean; property Form: TForm read GetForm; property TextWidth: Integer read GetTextWidth; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure MoveCaption(FromIndex, ToIndex: Integer); procedure Update; procedure Clear; published property Active: Boolean read GetActive write SetActive default True; property Captions: TJvCaptionList read FCaptions write SetCaptions; property DefaultFont: Boolean read FDefaultFont write SetDefaultFont default True; property FormCaption: string read GetFormCaption write SetFormCaption; property FontInactiveColor: TColor read FFontInactiveColor write SetFontInactiveColor default clInactiveCaptionText; property Font: TFont read FFont write SetFont stored IsFontStored; property GradientActive: Boolean read FGradientActive write SetGradientActive default True; property GradientInactive: Boolean read FGradientInactive write SetGradientInactive default False; property GradientSteps: Integer read FGradientSteps write SetGradientSteps default 64; property HideDirection: THideDirection read FHideDirection write SetHideDirection default hdLeftToRight; property PopupMenu: TPopupMenu read FPopupMenu write SetPopupMenu; property StartColor: TColor read FStartColor write SetStartColor default clWindowText; property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate; end; TJvCaptionList = class(TCollection) private FParent: TJvGradientCaption; function GetCaption(Index: Integer): TJvCaption; procedure SetCaption(Index: Integer; Value: TJvCaption); protected function GetOwner: TPersistent; override; procedure Update(Item: TCollectionItem); override; public constructor Create(AParent: TJvGradientCaption); function Add: TJvCaption; procedure RestoreDefaults; property Parent: TJvGradientCaption read FParent; property Items[Index: Integer]: TJvCaption read GetCaption write SetCaption; default; end; TJvCaption = class(TCollectionItem) private FCaption: string; FFont: TFont; FParentFont: Boolean; FVisible: Boolean; FGlueNext: Boolean; FInactiveColor: TColor; procedure SetCaption(const Value: string); procedure SetFont(Value: TFont); procedure SetParentFont(Value: Boolean); procedure FontChanged(Sender: TObject); function IsFontStored: Boolean; function GetTextWidth: Integer; procedure SetVisible(Value: Boolean); procedure SetInactiveColor(Value: TColor); procedure SetGlueNext(Value: Boolean); protected function GetParentCaption: TJvGradientCaption; property TextWidth: Integer read GetTextWidth; public constructor Create(Collection: TCollection); override; destructor Destroy; override; procedure Assign(Source: TPersistent); override; procedure RestoreDefaults; virtual; property GradientCaption: TJvGradientCaption read GetParentCaption; published property Caption: string read FCaption write SetCaption; property Font: TFont read FFont write SetFont stored IsFontStored; property ParentFont: Boolean read FParentFont write SetParentFont default True; property InactiveColor: TColor read FInactiveColor write SetInactiveColor default clInactiveCaptionText; property GlueNext: Boolean read FGlueNext write SetGlueNext default False; property Visible: Boolean read FVisible write SetVisible default True; end; function GradientFormCaption(AForm: TCustomForm; AStartColor: TColor): TJvGradientCaption; {$IFDEF UNITVERSIONING} const UnitVersioning: TUnitVersionInfo = ( RCSfile: '$RCSfile: JvGradientCaption.pas,v $'; Revision: '$Revision: 1.18 $'; Date: '$Date: 2005/02/17 10:20:35 $'; LogPath: 'JVCL\run' ); {$ENDIF UNITVERSIONING} implementation uses SysUtils, JvConsts; function GradientFormCaption(AForm: TCustomForm; AStartColor: TColor): TJvGradientCaption; begin Result := TJvGradientCaption.Create(AForm); with Result do try FStartColor := AStartColor; FormCaption := AForm.Caption; Update; except Free; raise; end; end; function InternalGetTextWidth(Font: TFont; const Caption: string): Integer; var Canvas: TCanvas; PS: TPaintStruct; begin BeginPaint(Application.Handle, PS); try Canvas := TCanvas.Create; try Canvas.Handle := PS.hdc; Canvas.Font := Font; Result := Canvas.TextWidth(Caption); finally Canvas.Free; end; finally EndPaint(Application.Handle, PS); end; end; //=== { TJvCaptionList } ===================================================== constructor TJvCaptionList.Create(AParent: TJvGradientCaption); begin inherited Create(TJvCaption); FParent := AParent; end; function TJvCaptionList.Add: TJvCaption; begin Result := TJvCaption(inherited Add); end; function TJvCaptionList.GetCaption(Index: Integer): TJvCaption; begin Result := TJvCaption(inherited Items[Index]); end; function TJvCaptionList.GetOwner: TPersistent; begin Result := FParent; end; procedure TJvCaptionList.RestoreDefaults; var I: Integer; begin BeginUpdate; try for I := 0 to Count - 1 do Items[I].RestoreDefaults; finally EndUpdate; end; end; procedure TJvCaptionList.SetCaption(Index: Integer; Value: TJvCaption); begin Items[Index].Assign(Value); end; procedure TJvCaptionList.Update(Item: TCollectionItem); begin if (FParent <> nil) and not (csLoading in FParent.ComponentState) then if FParent.Active then FParent.Update; end; //=== { TJvCaption } ========================================================= constructor TJvCaption.Create(Collection: TCollection); var Parent: TJvGradientCaption; begin Parent := nil; if Assigned(Collection) and (Collection is TJvCaptionList) then Parent := TJvCaptionList(Collection).Parent; try inherited Create(Collection); FFont := TFont.Create; if Assigned(Parent) then begin FFont.Assign(Parent.Font); FFont.Color := Parent.Font.Color; end else FFont.Color := clCaptionText; FFont.OnChange := FontChanged; FCaption := ''; FParentFont := True; FVisible := True; FGlueNext := False; FInactiveColor := clInactiveCaptionText; finally if Assigned(Parent) then Changed(False); end; end; destructor TJvCaption.Destroy; begin FFont.Free; FFont := nil; inherited Destroy; end; procedure TJvCaption.Assign(Source: TPersistent); begin if Source is TJvCaption then begin if Assigned(Collection) then Collection.BeginUpdate; try RestoreDefaults; Caption := TJvCaption(Source).Caption; ParentFont := TJvCaption(Source).ParentFont; if not ParentFont then Font.Assign(TJvCaption(Source).Font); InactiveColor := TJvCaption(Source).InactiveColor; GlueNext := TJvCaption(Source).GlueNext; Visible := TJvCaption(Source).Visible; finally if Assigned(Collection) then Collection.EndUpdate; end; end else inherited Assign(Source); end; procedure TJvCaption.RestoreDefaults; begin FInactiveColor := clInactiveCaptionText; FVisible := True; ParentFont := True; end; function TJvCaption.GetParentCaption: TJvGradientCaption; begin if Assigned(Collection) and (Collection is TJvCaptionList) then Result := TJvCaptionList(Collection).Parent else Result := nil; end; procedure TJvCaption.SetCaption(const Value: string); begin FCaption := Value; Changed(False); end; procedure TJvCaption.FontChanged(Sender: TObject); begin FParentFont := False; Changed(False); end; procedure TJvCaption.SetFont(Value: TFont); begin FFont.Assign(Value); end; procedure TJvCaption.SetParentFont(Value: Boolean); begin if Value and (GradientCaption <> nil) then begin FFont.OnChange := nil; try FFont.Assign(GradientCaption.Font); finally FFont.OnChange := FontChanged; end; end; FParentFont := Value; Changed(False); end; function TJvCaption.IsFontStored: Boolean; begin Result := not ParentFont; end; function TJvCaption.GetTextWidth: Integer; begin Result := InternalGetTextWidth(Font, Caption); end; procedure TJvCaption.SetVisible(Value: Boolean); begin if FVisible <> Value then begin FVisible := Value; Changed(False); end; end; procedure TJvCaption.SetInactiveColor(Value: TColor); begin if FInactiveColor <> Value then begin FInactiveColor := Value; if (GradientCaption = nil) or not GradientCaption.FWindowActive then Changed(False); end; end; procedure TJvCaption.SetGlueNext(Value: Boolean); begin if FGlueNext <> Value then begin FGlueNext := Value; Changed(False); end; end; //=== { TJvGradientCaption } ================================================ function SysGradient: Boolean; var Info: BOOL; begin if SystemParametersInfo(SPI_GETGRADIENTCAPTIONS, SizeOf(Info), @Info, 0) then Result := Info else Result := False; end; constructor TJvGradientCaption.Create(AOwner: TComponent); begin inherited Create(AOwner); FGradientSteps := 64; FGradientActive := True; FActive := True; FCaptions := TJvCaptionList.Create(Self); FWinHook := TJvWindowHook.Create(Self); FWinHook.BeforeMessage := BeforeMessage; FWinHook.AfterMessage := AfterMessage; FStartColor := clWindowText; FFontInactiveColor := clInactiveCaptionText; FFormCaption := ''; FFont := TFont.Create; SetFontDefault; end; destructor TJvGradientCaption.Destroy; begin FOnDeactivate := nil; FOnActivate := nil; if not (csDesigning in ComponentState) then ReleaseHook; FCaptions.Free; FCaptions := nil; FFont.Free; FFont := nil; inherited Destroy; end; procedure TJvGradientCaption.Loaded; var Loading: Boolean; begin Loading := csLoading in ComponentState; inherited Loaded; if not (csDesigning in ComponentState) then begin if Loading and (Owner is TCustomForm) then Update; end; end; procedure TJvGradientCaption.Notification(AComponent: TComponent; Operation: TOperation); begin inherited Notification(AComponent, Operation); if (AComponent = PopupMenu) and (Operation = opRemove) then PopupMenu := nil; end; procedure TJvGradientCaption.SetPopupMenu(Value: TPopupMenu); begin FPopupMenu := Value; if Value <> nil then Value.FreeNotification(Self); end; procedure TJvGradientCaption.SetCaptions(Value: TJvCaptionList); begin Captions.Assign(Value); end; procedure TJvGradientCaption.SetDefaultFont(Value: Boolean); begin if FDefaultFont <> Value then begin if Value then SetFontDefault; FDefaultFont := Value; if Active then Update; end; end; procedure TJvGradientCaption.SetFontDefault; var NCMetrics: TNonClientMetrics; begin with FFont do begin OnChange := nil; try NCMetrics.cbSize := SizeOf(NCMetrics); if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NCMetrics, 0) then begin if (Owner is TForm) and ((Owner as TForm).BorderStyle in [bsToolWindow, bsSizeToolWin]) then Handle := CreateFontIndirect(NCMetrics.lfSmCaptionFont) else Handle := CreateFontIndirect(NCMetrics.lfCaptionFont); end else begin Name := 'MS Sans Serif'; Size := 8; Style := [fsBold]; end; Color := clCaptionText; Charset := DEFAULT_CHARSET; finally OnChange := FontChanged; end; end; FDefaultFont := True; end; function TJvGradientCaption.IsFontStored: Boolean; begin Result := not DefaultFont; end; function TJvGradientCaption.GetForm: TForm; begin if Owner is TCustomForm then Result := TForm(Owner as TCustomForm) else Result := nil; end; function TJvGradientCaption.GetFormCaption: string; begin if (Form <> nil) and (csDesigning in ComponentState) then FFormCaption := Form.Caption; Result := FFormCaption; end; procedure TJvGradientCaption.SetFormCaption(const Value: string); begin if FFormCaption <> Value then begin FFormCaption := Value; if (Form <> nil) and (csDesigning in ComponentState) then Form.Caption := FFormCaption; if Active then Update; end; end; procedure TJvGradientCaption.SetHook; begin if not (csDesigning in ComponentState) and (Owner <> nil) and (Owner is TCustomForm) then FWinHook.Control := Form; end; procedure TJvGradientCaption.ReleaseHook; begin FWinHook.Control := nil; end; procedure TJvGradientCaption.CheckToggleHook; begin if Active then SetHook else ReleaseHook; end; function TJvGradientCaption.CheckMenuPopup(X, Y: Integer): Boolean; begin Result := False; if not (csDesigning in ComponentState) and Assigned(FPopupMenu) and FPopupMenu.AutoPopup then begin FPopupMenu.PopupComponent := Self; if Form <> nil then begin Form.SendCancelMode(nil); FPopupMenu.Popup(X, Y); Result := True; end; end; end; procedure TJvGradientCaption.BeforeMessage(Sender: TObject; var Msg: TMessage; var Handled: Boolean); var DrawRgn: HRGN; R: TRect; Icons: TBorderIcons; begin if Active then begin case Msg.Msg of WM_NCACTIVATE: FWindowActive := (Msg.WParam <> 0); WM_NCRBUTTONDOWN: if Assigned(FPopupMenu) and FPopupMenu.AutoPopup then begin FClicked := True; Msg.Result := 0; Handled := True; end; WM_NCRBUTTONUP: with TWMMouse(Msg) do if FClicked then begin FClicked := False; if CheckMenuPopup(XPos, YPos) then begin Result := 0; Handled := True; end; end; WM_NCPAINT: begin FSaveRgn := Msg.WParam; FRgnChanged := False; CalculateGradientParams(R, Icons); if RectInRegion(FSaveRgn, R) then begin DrawRgn := CreateRectRgn(R.Left, R.Top, R.Right, R.Bottom); try Msg.WParam := CreateRectRgn(0, 0, 1, 1); FRgnChanged := True; CombineRgn(Msg.WParam, FSaveRgn, DrawRgn, RGN_DIFF); finally DeleteObject(DrawRgn); end; end; end; end; end; end; procedure TJvGradientCaption.AfterMessage(Sender: TObject; var Msg: TMessage; var Handled: Boolean); var DC: HDC; S: string; begin if Active then begin case Msg.Msg of WM_NCACTIVATE: begin DC := GetWindowDC(Form.Handle); try DrawGradientCaption(DC); finally ReleaseDC(Form.Handle, DC); end; end; WM_NCPAINT: begin if FRgnChanged then begin DeleteObject(Msg.WParam); Msg.WParam := FSaveRgn; FRgnChanged := False; end; DC := GetWindowDC(Form.Handle); try DrawGradientCaption(DC); finally ReleaseDC(Form.Handle, DC); end; end; WM_GETTEXT: { Delphi doesn't send WM_SETTEXT to form's window procedure, so we need to handle WM_GETTEXT to redraw non-client area when form's caption changed } if csDesigning in ComponentState then begin SetString(S, PChar(Msg.LParam), Msg.Result); if AnsiCompareStr(S, FFormCaption) <> 0 then begin FormCaption := S; PostMessage(Form.Handle, WM_NCPAINT, 0, 0); end; end; end; end; end; procedure TJvGradientCaption.SetStartColor(Value: TColor); begin if FStartColor <> Value then begin FStartColor := Value; if Active then Update; end; end; function TJvGradientCaption.GetActive: Boolean; begin Result := FActive; if not (csDesigning in ComponentState) then Result := Result and NewStyleControls and (Owner is TCustomForm); end; procedure TJvGradientCaption.SetActive(Value: Boolean); begin if FActive <> Value then begin FActive := Value; FClicked := False; Update; if [csDestroying, csReading] * ComponentState = [] then begin if FActive then begin if Assigned(FOnActivate) then FOnActivate(Self); end else begin if Assigned(FOnDeactivate) then FOnDeactivate(Self); end; end; end; end; procedure TJvGradientCaption.Clear; begin if FCaptions <> nil then FCaptions.Clear; end; procedure TJvGradientCaption.MoveCaption(FromIndex, ToIndex: Integer); begin Captions[FromIndex].Index := ToIndex; end; procedure TJvGradientCaption.Update; var Rgn: HRGN; begin if not (csDesigning in ComponentState) and (Owner is TCustomForm) and not (csLoading in ComponentState) then begin CheckToggleHook; FWindowActive := False; if (Form <> nil) and Form.HandleAllocated and Form.Visible then begin if Active then FWindowActive := (GetActiveWindow = Form.Handle) and IsForegroundTask; with Form do Rgn := CreateRectRgn(Left, Top, Left + Width, Top + Height); try SendMessage(Form.Handle, WM_NCPAINT, Rgn, 0); finally DeleteObject(Rgn); end; end; end; end; procedure TJvGradientCaption.CalculateGradientParams(var R: TRect; var Icons: TBorderIcons); var I: TBorderIcon; BtnCount: Integer; begin GetWindowRect(Form.Handle, R); Icons := Form.BorderIcons; case Form.BorderStyle of bsDialog: Icons := Icons * [biSystemMenu, biHelp]; bsToolWindow, bsSizeToolWin: Icons := Icons * [biSystemMenu]; else begin if not (biSystemMenu in Icons) then Icons := Icons - [biMaximize, biMinimize]; if Icons * [biMaximize, biMinimize] <> [] then Icons := Icons - [biHelp]; end; end; BtnCount := 0; for I := Low(TBorderIcon) to High(TBorderIcon) do if I in Icons then Inc(BtnCount); if (biMinimize in Icons) and not (biMaximize in Icons) then Inc(BtnCount) else if not (biMinimize in Icons) and (biMaximize in Icons) then Inc(BtnCount); case Form.BorderStyle of bsToolWindow, bsSingle, bsDialog: InflateRect(R, -GetSystemMetrics(SM_CXFIXEDFRAME), -GetSystemMetrics(SM_CYFIXEDFRAME)); bsSizeable, bsSizeToolWin: InflateRect(R, -GetSystemMetrics(SM_CXSIZEFRAME), -GetSystemMetrics(SM_CYSIZEFRAME)); end; if Form.BorderStyle in [bsToolWindow, bsSizeToolWin] then begin R.Bottom := R.Top + GetSystemMetrics(SM_CYSMCAPTION) - 1; Dec(R.Right, BtnCount * GetSystemMetrics(SM_CXSMSIZE)); end else begin R.Bottom := R.Top + GetSystemMetrics(SM_CYCAPTION) - 1; Dec(R.Right, BtnCount * GetSystemMetrics(SM_CXSIZE)); end; end; function TJvGradientCaption.IsRightToLeft: Boolean; var F: TForm; begin F := Form; if F <> nil then Result := F.IsRightToLeft else Result := Application.IsRightToLeft; end; procedure TJvGradientCaption.DrawGradientCaption(DC: HDC); var R, DrawRect: TRect; Icons: TBorderIcons; C: TColor; Ico: HIcon; Image: TBitmap; S: string; IconCreated, DrawNext: Boolean; I, J, SumWidth: Integer; procedure SetCaptionFont(Index: Integer); begin if (Index < 0) or Captions[Index].ParentFont then Image.Canvas.Font.Assign(Self.Font) else Image.Canvas.Font.Assign(Captions[Index].Font); if not FWindowActive then begin if Index < 0 then Image.Canvas.Font.Color := FFontInactiveColor else Image.Canvas.Font.Color := Captions[Index].InactiveColor; end; end; function DrawStr(GluePrev, GlueNext: Boolean; PrevIndex: Integer): Boolean; const Points = '...'; var Text: string; Flags: Longint; begin if Length(S) > 0 then begin Text := MinimizeText(S, Image.Canvas, R.Right - R.Left); if GlueNext and (Text = S) then begin if Image.Canvas.TextWidth(Text + '.') >= R.Right - R.Left then begin if GluePrev then Text := Points else Text := Text + Points; end; end; if (Text <> Points) or GluePrev then begin if (Text = Points) and GluePrev then begin SetCaptionFont(-1); if PrevIndex > 0 then begin if FWindowActive then Image.Canvas.Font.Color := Captions[PrevIndex].Font.Color else Image.Canvas.Font.Color := Captions[PrevIndex].InactiveColor; end; end; Flags := DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX; if IsRightToLeft then Flags := Flags or DT_RIGHT or DT_RTLREADING else Flags := Flags or DT_LEFT; DrawText(Image.Canvas, Text, -1, R, Flags); if IsRightToLeft then Dec(R.Right, Image.Canvas.TextWidth(Text)) else Inc(R.Left, Image.Canvas.TextWidth(Text)); end; Result := (Text = S); end else Result := True; end; begin if Form.BorderStyle = bsNone then Exit; Image := TBitmap.Create; try CalculateGradientParams(R, Icons); GetWindowRect(Form.Handle, DrawRect); OffsetRect(R, -DrawRect.Left, -DrawRect.Top); DrawRect := R; Image.Width := RectWidth(R); Image.Height := RectHeight(R); R := Rect(-Image.Width div 4, 0, Image.Width, Image.Height); if SysGradient then begin if FWindowActive then C := clGradientActiveCaption else C := clGradientInactiveCaption; end else begin if FWindowActive then C := clActiveCaption else C := clInactiveCaption; end; if (FWindowActive and GradientActive) or (not FWindowActive and GradientInactive) then begin GradientFillRect(Image.Canvas, R, FStartColor, C, fdLeftToRight, FGradientSteps); end else begin Image.Canvas.Brush.Color := C; Image.Canvas.FillRect(R); end; R.Left := 0; if (biSystemMenu in Icons) and (Form.BorderStyle in [bsSizeable, bsSingle]) then begin IconCreated := False; if Form.Icon.Handle <> 0 then Ico := Form.Icon.Handle else if Application.Icon.Handle <> 0 then begin Ico := LoadImage(HInstance, 'MAINICON', IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0); IconCreated := Ico <> 0; if not IconCreated then Ico := Application.Icon.Handle; end else Ico := LoadIcon(0, IDI_APPLICATION); DrawIconEx(Image.Canvas.Handle, R.Left + 1 + (R.Bottom + R.Top - GetSystemMetrics(SM_CXSMICON)) div 2, (R.Bottom + R.Top - GetSystemMetrics(SM_CYSMICON)) div 2, Ico, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, 0, DI_NORMAL); if IconCreated then DestroyIcon(Ico); Inc(R.Left, R.Bottom - R.Top); end; if (FFormCaption <> '') or ((Captions <> nil) and (Captions.Count > 0)) then begin SumWidth := 2; SetBkMode(Image.Canvas.Handle, TRANSPARENT); Inc(R.Left, 2); if FHideDirection = hdLeftToRight then begin for I := 0 to Captions.Count - 1 do if Captions[I].Visible then SumWidth := SumWidth + Captions[I].TextWidth; SumWidth := SumWidth + TextWidth; J := 0; while (SumWidth > (R.Right - R.Left)) and (J < Captions.Count) do begin SumWidth := SumWidth - Captions[J].TextWidth; while (J < Captions.Count - 1) and Captions[J].GlueNext do begin SumWidth := SumWidth - Captions[J + 1].TextWidth; Inc(J); end; Inc(J); end; for I := J to Captions.Count do begin if I < Captions.Count then begin if Captions[I].Visible then begin S := Captions[I].Caption; SetCaptionFont(I); end else S := ''; end else begin S := FFormCaption; SetCaptionFont(-1); end; DrawStr(I = Captions.Count, False, -1); end; end else begin DrawNext := True; J := 0; if Captions <> nil then begin while (SumWidth < (R.Right - R.Left)) and (J < Captions.Count) do begin if Captions[J].Visible then begin SumWidth := SumWidth + Captions[J].TextWidth; while Captions[J].GlueNext and (J < Captions.Count - 1) do begin SumWidth := SumWidth + Captions[J + 1].TextWidth; Inc(J); end; end; Inc(J); end; for I := 0 to J - 1 do begin if Captions[I].Visible and DrawNext then begin S := Captions[I].Caption; if S <> '' then begin SetCaptionFont(I); DrawNext := DrawStr(((I > 0) and Captions[I - 1].GlueNext) or (I = 0), Captions[I].GlueNext, I - 1) and (Captions[I].GlueNext or (R.Right > R.Left)); end; end; end; end; if (R.Right > R.Left) and DrawNext and (FFormCaption <> '') then begin S := FFormCaption; SetCaptionFont(-1); DrawStr(False, False, -1); end; end; end; BitBlt(DC, DrawRect.Left, DrawRect.Top, Image.Width, Image.Height, Image.Canvas.Handle, 0, 0, SRCCOPY); finally Image.Free; end; end; procedure TJvGradientCaption.SetFont(Value: TFont); begin FFont.Assign(Value); end; procedure TJvGradientCaption.FontChanged(Sender: TObject); var I: Integer; begin FDefaultFont := False; if Captions <> nil then begin Captions.BeginUpdate; try for I := 0 to Captions.Count - 1 do if Captions[I].ParentFont then Captions[I].SetParentFont(True); finally Captions.EndUpdate; end; end else if Active then Update; end; function TJvGradientCaption.GetTextWidth: Integer; begin Result := InternalGetTextWidth(Font, FormCaption); end; procedure TJvGradientCaption.SetGradientSteps(Value: Integer); begin if FGradientSteps <> Value then begin FGradientSteps := Value; if Active and ((FWindowActive and GradientActive) or (not FWindowActive and GradientInactive)) then Update; end; end; procedure TJvGradientCaption.SetGradientActive(Value: Boolean); begin if FGradientActive <> Value then begin FGradientActive := Value; if Active and FWindowActive then Update; end; end; procedure TJvGradientCaption.SetGradientInactive(Value: Boolean); begin if FGradientInactive <> Value then begin FGradientInactive := Value; if Active and not FWindowActive then Update; end; end; procedure TJvGradientCaption.SetFontInactiveColor(Value: TColor); begin if FFontInactiveColor <> Value then begin FFontInactiveColor := Value; if Active and not FWindowActive then Update; end; end; procedure TJvGradientCaption.SetHideDirection(Value: THideDirection); begin if FHideDirection <> Value then begin FHideDirection := Value; if Active then Update; end; end; {$IFDEF UNITVERSIONING} initialization RegisterUnitVersion(HInstance, UnitVersioning); finalization UnregisterUnitVersion(HInstance); {$ENDIF UNITVERSIONING} end.
26.66296
97
0.66518
61ef935eb5968a4afff08da66176160541f04992
791
pas
Pascal
Test/SimpleScripts/value_type_separation.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
1
2022-02-18T22:14:44.000Z
2022-02-18T22:14:44.000Z
Test/SimpleScripts/value_type_separation.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
Test/SimpleScripts/value_type_separation.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
type TPoint = record X, Y : Integer; end; type TTest = class p1, p2 : TPoint; a1, a2 : array [0..0] of String; procedure Test; procedure Print; procedure Test2; end; procedure TTest.Test; begin p1.X:=1; p1.Y:=2; p2.X:=3; p2.Y:=4; a1[0]:='a'; a2[0]:='b'; end; procedure TTest.Test2; var lp1, lp2 : TPoint; la1, la2 : array [0..0] of String; begin lp1.X:=11; lp1.Y:=12; lp2.X:=13; lp2.Y:=14; la1[0]:='la'; la2[0]:='lb'; p1:=lp1; p2:=lp2; a1:=la1; a2:=la2; end; procedure TTest.Print; begin Default.Print(p1.X); PrintLn(p1.Y); Default.Print(p2.X); PrintLn(p2.Y); Default.Print(a1[0]); PrintLn(a2[0]) end; var t:=TTest.Create; t.Print; t.Test; t.Print; t.Test2; t.Print;
14.648148
39
0.543616
83cab9ae1f523d7df604d234ddee3b1836a543ae
7,632
pas
Pascal
library/fhir2/fhir2_opbase.pas
atkins126/fhirserver
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
[ "BSD-3-Clause" ]
null
null
null
library/fhir2/fhir2_opbase.pas
atkins126/fhirserver
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
[ "BSD-3-Clause" ]
null
null
null
library/fhir2/fhir2_opbase.pas
atkins126/fhirserver
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
[ "BSD-3-Clause" ]
null
null
null
unit fhir2_opbase; { Copyright (c) 2011+, HL7 and Health Intersections Pty Ltd (http://www.healthintersections.com.au) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } {$I fhir.inc} interface uses SysUtils, fsl_base, fsl_http, fhir2_types, fhir2_resources, fhir2_resources_other; type TFHIROpExtension = class (TFslObject) private FName : String; FValue : TFHIRType; procedure SetValue(const Value: TFHIRType); protected function sizeInBytesV : cardinal; override; public destructor Destroy; override; property name : String read FName write FName; property value : TFHIRType read FValue write SetValue; end; TFHIROperationBaseObject = class (TFslObject) private FExtensions : TFslList<TFHIROpExtension>; function GetExtensions: TFslList<TFHIROpExtension>; protected function isKnownName(name : String) : boolean; overload; virtual; procedure loadExtensions(params : TFHIRParameters); overload; procedure loadExtensions(params : THTTPParameters); overload; procedure loadExtensions(params : TFhirParametersParameter); overload; procedure writeExtensions(params : TFHIRParameters); overload; procedure writeExtensions(params : TFhirParametersParameter); overload; function sizeInBytesV : cardinal; override; public destructor Destroy; override; property extensions : TFslList<TFHIROpExtension> read GetExtensions; procedure addExtension(name : String; value : TFHIRType); overload; procedure addExtension(name : String; value : string); overload; procedure addExtension(name : String; value : boolean); overload; end; TFHIROperationObject = class (TFHIROperationBaseObject) public constructor Create(); overload; override; constructor Create(params : TFhirParametersParameter); overload; virtual; function asParams(name : String) : TFHIRParametersParameter; virtual; abstract; end; TFHIROperationRequest = class (TFHIROperationBaseObject) public constructor Create(); overload; override; procedure load(params : TFHIRParameters); overload; virtual; abstract; procedure load(params : THTTPParameters); overload; virtual; abstract; function asParams : TFHIRParameters; virtual; abstract; end; TFHIROperationResponse = class (TFHIROperationBaseObject) public constructor Create(); overload; override; procedure load(params : TFHIRParameters); overload; virtual; abstract; procedure load(params : THTTPParameters); overload; virtual; abstract; function asParams : TFHIRParameters; virtual; abstract; end; implementation { TFHIROperationRequest } constructor TFHIROperationRequest.create; begin inherited Create; end; { TFHIROperationResponse } constructor TFHIROperationResponse.create; begin inherited Create; end; { TFHIROperationObject } constructor TFHIROperationObject.create; begin inherited; end; constructor TFHIROperationObject.Create(params: TFhirParametersParameter); begin inherited create; end; { TFHIROperationBaseObject } procedure TFHIROperationBaseObject.addExtension(name: String; value: TFHIRType); var ext : TFHIROpExtension; begin ext := TFHIROpExtension.Create; ext.name := name; ext.value := value; GetExtensions.Add(ext) end; procedure TFHIROperationBaseObject.addExtension(name, value: string); var ext : TFHIROpExtension; begin ext := TFHIROpExtension.Create; ext.name := name; ext.value := TFhirString.Create(value); GetExtensions.Add(ext) end; procedure TFHIROperationBaseObject.addExtension(name: String; value: boolean); var ext : TFHIROpExtension; begin ext := TFHIROpExtension.Create; ext.name := name; ext.value := TFhirBoolean.Create(value); GetExtensions.Add(ext) end; destructor TFHIROperationBaseObject.Destroy; begin FExtensions.Free; inherited; end; function TFHIROperationBaseObject.GetExtensions: TFslList<TFHIROpExtension>; begin if FExtensions = nil then FExtensions := TFslList<TFHIROpExtension>.create; result := FExtensions; end; function TFHIROperationBaseObject.IsKnownName(name: String): boolean; begin result := false; end; procedure TFHIROperationBaseObject.loadExtensions(params: TFhirParametersParameter); var p : TFhirParametersParameter; begin for p in params.partList do if not IsKnownName(p.name) then addExtension(p.name, p.value.Link); end; procedure TFHIROperationBaseObject.loadExtensions(params: THTTPParameters); var i : integer; begin for i := 0 to params.Count - 1 do if not IsKnownName(params.Name[i]) then addExtension(params.Name[i], params[params.Name[i]]); end; procedure TFHIROperationBaseObject.loadExtensions(params: TFHIRParameters); var p : TFhirParametersParameter; begin for p in params.parameterList do if not IsKnownName(p.name) then addExtension(p.name, p.value.Link); end; procedure TFHIROperationBaseObject.writeExtensions(params: TFHIRParameters); var p : TFHIROpExtension; begin if FExtensions <> nil then for p in FExtensions do with params.parameterList.Append do begin name := p.name; value := p.value.Link; end; end; procedure TFHIROperationBaseObject.writeExtensions(params: TFhirParametersParameter); var p : TFHIROpExtension; begin if FExtensions <> nil then for p in FExtensions do with params.partList.Append do begin name := p.name; value := p.value.Link; end; end; function TFHIROperationBaseObject.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, FExtensions.sizeInBytes); end; { TFHIROpExtension } destructor TFHIROpExtension.Destroy; begin FValue.Free; inherited; end; procedure TFHIROpExtension.SetValue(const Value: TFHIRType); begin FValue.Free; FValue := Value; end; function TFHIROpExtension.sizeInBytesV : cardinal; begin result := inherited sizeInBytesV; inc(result, (FName.length * sizeof(char)) + 12); inc(result, FValue.sizeInBytes); end; end.
29.129771
98
0.74109
8554d723ebd391c38123bc5fccb5869122b1bf25
1,760
pas
Pascal
Samples/Basic/FMX/src/View.Preview.PDF.pas
viniciusfbb/skia4delphi
1e6f463cd8a62e29ae9d95f14563d070ef7d5caf
[ "MIT", "BSD-3-Clause" ]
139
2021-08-11T01:21:33.000Z
2022-02-07T16:10:19.000Z
Samples/Basic/FMX/src/View.Preview.PDF.pas
viniciusfbb/skia4delphi
1e6f463cd8a62e29ae9d95f14563d070ef7d5caf
[ "MIT", "BSD-3-Clause" ]
32
2021-08-17T00:45:37.000Z
2022-02-08T23:59:39.000Z
Samples/Basic/FMX/src/View.Preview.PDF.pas
viniciusfbb/skia4delphi
1e6f463cd8a62e29ae9d95f14563d070ef7d5caf
[ "MIT", "BSD-3-Clause" ]
30
2021-08-11T05:04:53.000Z
2022-02-04T16:25:11.000Z
unit View.Preview.PDF; interface uses { Delphi } {$IFDEF MSWINDOWS} Winapi.Windows, Winapi.ShellAPI, {$ELSEIF defined(ANDROID)} Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.JavaTypes, Androidapi.JNI.Support, Androidapi.JNI.Net, Androidapi.JNI.App, Androidapi.Helpers, {$ENDIF} System.SysUtils, System.Types, System.Classes, System.Variants, FMX.StdCtrls, FMX.Controls, FMX.Objects, FMX.Types, FMX.WebBrowser, FMX.Forms, FMX.Layouts, FMX.ListBox, FMX.Graphics; type { TfrmPDFPreview } TfrmPDFPreview = class(TForm) wbrBrowser: TWebBrowser; rctHeader: TRectangle; btnClose: TSpeedButton; lblTitle: TLabel; imgArrow: TImage; procedure btnCloseClick(Sender: TObject); public procedure Show(const AFileName: string); reintroduce; end; var frmPDFPreview: TfrmPDFPreview; implementation {$R *.fmx} { TfrmPDFPreview } procedure TfrmPDFPreview.btnCloseClick(Sender: TObject); begin Close; end; procedure TfrmPDFPreview.Show(const AFileName: string); {$IFDEF ANDROID} var LIntent: JIntent; LFile: JFile; begin LFile := TJFile.JavaClass.init(StringToJString(AFileName)); LIntent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_VIEW); LIntent.setDataAndType(TAndroidHelper.JFileToJURI(LFile), StringToJString('application/pdf')); LIntent.setFlags(TJIntent.JavaClass.FLAG_GRANT_READ_URI_PERMISSION); TAndroidHelper.Activity.startActivity(LIntent); end; {$ELSE} var LURL: string; begin LURL := AFileName.Replace('\', '/', [rfReplaceAll]); LURL := 'file://' + LURL; {$IFDEF MSWINDOWS} ShellExecute(0, 'open', PChar(LURL), nil, nil, SW_SHOWNORMAL); {$ELSE} wbrBrowser.Navigate(LURL); inherited Show; {$ENDIF} end; {$ENDIF} end.
20
96
0.726136
838f248c50dae9a9c31bc8ba14a0fc771d4ab4a8
2,332
pas
Pascal
package/indy-10.2.0.3/fpc/IdTraceRoute.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
1
2022-02-28T11:28:18.000Z
2022-02-28T11:28:18.000Z
package/indy-10.2.0.3/fpc/IdTraceRoute.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
null
null
null
package/indy-10.2.0.3/fpc/IdTraceRoute.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
null
null
null
{ $Project$ $Workfile$ $Revision$ $DateUTC$ $Id$ This file is part of the Indy (Internet Direct) project, and is offered under the dual-licensing agreement described on the Indy website. (http://www.indyproject.org/) Copyright: (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved. } { $Log$ } unit IdTraceRoute; interface {$i IdCompilerDefines.inc} uses IdICMPClient, IdRawBase, IdRawClient, IdThread; type TIdTraceRoute = class(TIdCustomICMPClient) protected FResolveHostNames : Boolean; procedure DoReply; override; public procedure Trace; published property ResolveHostNames : Boolean read FResolveHostNames write FResolveHostNames; property OnReply: TOnReplyEvent read FOnReply write FOnReply; end; implementation uses IdGlobal, IdStack; { TIdTraceRoute } procedure TIdTraceRoute.DoReply; begin if FResolveHostNames and (PosInStrArray(FReplyStatus.FromIpAddress, ['0.0.0.0', '::0']) = -1) then {do not localize} begin //resolve IP to hostname try FReplyStatus.HostName := GStack.HostByAddress(FReplyStatus.FromIpAddress, FBinding.IPVersion); except { We do things this way because we are likely have a reverse DNS failure if you have a computer with IP address and no DNS name at all. } FReplyStatus.HostName := FReplyStatus.FromIpAddress; end; end; inherited DoReply; end; procedure TIdTraceRoute.Trace; //In traceroute, there are a maximum of thirty echo request packets. You start //requests with a TTL of one and keep sending them until you get to thirty or you //get an echo response (whatever comes sooner). var i : Integer; lSeq : Cardinal; LTTL : Integer; LIPAddr : String; begin // PacketSize := 64; //We do things this way because we only want to resolve the destination host name //only one time. Otherwise, there's a performance penalty for earch DNS resolve. LIPAddr := GStack.ResolveHost(FHost, FBinding.IPVersion); LSeq := $1; LTTL := 1; TTL := LTTL; for i := 1 to 30 do begin ReplyStatus.PacketNumber := i; InternalPing(LIPAddr, '', LSeq); case ReplyStatus.ReplyStatusType of rsErrorTTLExceeded, rsTimeout : ; else Break; end; Inc(LTTL); TTL := LTTL; LSeq := LSeq * 2; end; end; end.
23.32
100
0.701973
f14739d32112fdea045d4325f5acbb4e5bf7c5e5
297
dpr
Pascal
Examples/23.DoubleTunnelVisualAuth/Client/VirtualAuth_Client.dpr
PassByYou888/ZNet
8f5439ec275ee4eb5d68e00c33675e6117379fcf
[ "BSD-3-Clause" ]
24
2022-01-20T13:59:38.000Z
2022-03-25T01:11:43.000Z
Examples/23.DoubleTunnelVisualAuth/Client/VirtualAuth_Client.dpr
lovong/ZNet
ad67382654ea1979c316c2dc9716fd6d8509f028
[ "BSD-3-Clause" ]
null
null
null
Examples/23.DoubleTunnelVisualAuth/Client/VirtualAuth_Client.dpr
lovong/ZNet
ad67382654ea1979c316c2dc9716fd6d8509f028
[ "BSD-3-Clause" ]
5
2022-01-20T14:44:24.000Z
2022-02-13T10:07:38.000Z
program VirtualAuth_Client; uses Vcl.Forms, VACliFrm in 'VACliFrm.pas' {AuthDoubleTunnelClientForm}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TAuthDoubleTunnelClientForm, AuthDoubleTunnelClientForm); Application.Run; end.
22.846154
82
0.79798
839dd1bf88dcca5dc8f12d99f870168c8ec421ab
15,407
pas
Pascal
datatype/0036.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
11
2015-12-12T05:13:15.000Z
2020-10-14T13:32:08.000Z
datatype/0036.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
null
null
null
datatype/0036.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
8
2017-05-05T05:24:01.000Z
2021-07-03T20:30:09.000Z
{ >Does anybody have the byte by byte break down of SAUCE? Sure do, got it off of the June 6th ACid Pack, 1994. Check it out for more Info on Sauce. Here goes: **************************** * What is SAUCE? * **************************** Recipe for SAUCE Chef cuisinier : Tasmaniac / ACiD Maitre d'h*tel : Rad Man / ACiD PLATES ------ Let us begin with a description of the record layouts used. The record layouts and code examples are in a varieted pascal pseudo code, and should be transferrable enough to implement in most other programming languages. For ease of reading, the examples assume that the file is correct and that no error- checking need be included. How rigorous you check for errors is completely up to you, and will most likely depend on the file type you are describing. SAUCE RECORD ------------ This portion of the documentation is about the SAUCE record. The SAUCE record describes the file in short, and provides other information not included in the SAUCE record itself. A sauce record is _EXACTLY_ 128 bytes in size. Fieldname : Name of the field. Size : Size of the field in BYTES Type : Type of data. This can be : BYTE : One byte unsigned numeric value (0 to 255) WORD : Two byte unsigned numeric value (0 to 65535) INTEGER : Two byte signed numeric value (-32768 to 32767) LONG : Four byte signed numeric value (-2147483648 to 2147483647) CHARACTER : One byte ASCII value. Longer character fields are padded with spaces. It is _NOT_ a PASCAL string (with a leading length byte), and it's _NOT_ a C-Style string (with a trailing nul-byte). A 10 byte character field holding the text 'ANSI' would look like this. 'ANSI '. Numeric fields should be zero when not used, character fields should be all spaces when not used. V# : SAUCE Version number. This indicates the version of SAUCE when the field was implemented. Description : Complete description of the field. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! No fields are REQUIRED to be filled in except for ID, Version, FileSize, DataType and FileType. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! FieldName Size Type V# Description --------- ---- --------- -- ----------- ID 5 Character 00 SAUCE Identification. This should be equal to 'SAUCE' or the record is not a valid SAUCE record. Version 2 Character 00 Version number of SAUCE. Current version is '00'. As new features are added to the specifications of SAUCE, this version number will change. Future versions SHOULD remain compatible with version 00 only ADDING on the specifications, it is however not unlikely that this compatibility is impossible to maintain, but this is of no concern now. Title 35 Character 00 Title of the file. Author 20 Character 00 Name or handle of the creator of the file. Group 20 Character 00 Name of the group the creator is employed by. Date 8 Character 00 Date the file was created. This date is in the format CCYYMMDD (Century, year, month, day). There is a good reason why the date is in this format, but it's not used in version '00' of SAUCE. It will be used in a future version of SAUCE. FileSize 4 Long 00 Original filesize NOT including any information of SAUCE. DataType 1 Byte 00 Type of Data. (See DATATYPES further on) FileType 1 Byte 00 Type of File. (See DATATYPES further on) TInfo1 2 Word 00 Numeric information field 1 (See DATATYPES) When used, this field holds informative values. Any program using SAUCE should not rely on these values being correct or filled in. TInfo2 2 Word 00 Numeric information field 2 (See DATATYPES) TInfo3 2 Word 00 Numeric information field 3 (See DATATYPES) TInfo4 2 Word 00 Numeric information field 4 (See DATATYPES) Comments 1 Byte 00 Number of Comment lines (See COMMENTS) Filler 23 Byte Reserved bytes. An Example PASCAL record looks like this: TYPE SAUCERec = RECORD ID : Array[1..5] of Char; Version : Array[1..2] of Char; Title : Array[1..35] of Char; Author : Array[1..20] of Char; Group : Array[1..20] of Char; Date : Array[1..8] of Char; FileSize : Longint; DataType : Byte; FileType : Byte; TInfo1 : Word; TInfo2 : Word; TInfo3 : Word; TInfo4 : Word; Comments : Byte; Filler : Array[1..23] of Char; END; DATATYPES --------- DataType and FileType hold the information needed to deter- mine what type of file it is. There are 5 DataTypes, these are (with their respective numeric values) : 0) None : Undefined filetype, you could use this to add SAUCE information to personal datafiles needed by programs, but not having any other meaning. 1) Character : Any character based file. Examples are ASCII, ANSi and RIP. 2) Graphics : Any bitmap graphic file. Examples are GIF, LBM, and PCX. 3) Vector : Any vector based graphic file. Examples are DXF and CAD files. 4) Sound : Any sound related file. Examples are samples, MOD files and MIDI. None ---- When using the 'None' datatype, you should have FileType set to zero also. This is a compatibility issue as it's not unlikely, the 'None' datatype will have filetypes in the future. Character --------- When using the 'Character' datatype, you have following filetypes available : 0) ASCII : Plain text file with no formatting codes or color codes. TInfo1 is used for the width of the file. TInfo2 is used to hold the number of lines in the file. 1) ANSi : ANSi file. With ANSi color codes and cursor positioning. TInfo1 is used for the width of the file. TInfo2 is used to hold the number of ANSi screen lines in the file. 2) ANSiMation: ANSi Animation. With ANSi color codes and cursor positioning. While an ANSi file can also have animated sequences, there is a clear distinction. While an ANSi may or may not have a beginning animated sequence introducing the group or artist the rest is just a sequence of colored characters. An ANSiMation on the other hand is a more like a text mode cartoon. TInfo1 is used for the width of the file. TInfo2 is used to hold the number of ANSi screen lines the ANSiMation was created for. A program using SAUCE may use these two values to switch to the appropriate video mode. 3) RIP : Remote Imaging Protocol (RIP) graphics file. TInfo1 holds the width (should be 640) TInfo2 holds the height (should be 350) TInfo3 holds the number of colors (should be 16) 4) PCBoard : File with PCBoard style @X color codes and @ macro's and ANSi codes. TInfo1 is used for the width of the file. TInfo2 is used to hold the number of ANSi screen lines in the file. 5) AVATAR : A file with AVATAR and ANSi color codes and cursor positioning. Graphics -------- For all graphics types, TInfo1 holds width of the image, TInfo2 holds the Height of the image and TInfo3 holds the number of bits per pixel (a 256 colour image would have 8 bits per pixel, a TrueColor image would have 24); Following Graphics filetypes are available : 0) GIF (CompuServ Graphics Interchange format). 1) PCX (ZSoft Paintbrush PCX format). 2) LBM/IFF (DeluxePaint LBM/IFF format). 3) TGA (Targa Truecolor) 4) FLI (Autodesk FLI animation file). 5) FLC (Autodesk FLC animation file). 6) BMP (Windows Bitmap) 7) GL (Grasp GL Animation) 8) DL (DL Animation). 9) WPG (Wordperfect Bitmap) Vector ------ Following Vector filetypes are available : 0) DXF (CAD Data eXchange File) 1) DWG (AutoCAD Drawing file) 2) WPG (WordPerfect/DrawPerfect vector graphics) Sound ----- Following sound filetypes are available : 0) MOD (4, 6 or 8 channel MOD/NST file) 1) 669 (Renaissance 8 channel 669 format) 2) STM (Future Crew 4 channel ScreamTracker format) 3) S3M (Future Crew variable channel ScreamTracker3 format) 4) MTM (Renaissance variable channel MultiTracker Module) 5) FAR (Farandole composer module) 6) ULT (UltraTracker module) 7) AMF (DMP/DSMI Advanced Module Format) 8) DMF (Delusion Digital Music Format (XTracker)) 9) OKT (Oktalyser module) 10) ROL (AdLib ROL file (FM)) 11) CMF (Creative Labs FM) 12) MIDI (MIDI file) 13) SADT (SAdT composer FM Module) 14) VOC (Creative Labs Sample) 15) WAV (Windows Wave file) 16) SMP8 (8 Bit Sample, TInfo1 holds sampling rate) 17) SMP8S (8 Bit sample stereo, TInfo1 holds sampling rate) 18) SMP16 (16 Bit sample, TInfo1 holds sampling rate) 19) SMP16S (16 Bit sample stereo, TInfo1 holds sampling rate) COMMENTS -------- The comment block is an addition to the SAUCE record. It holds up to 255 lines of additional information. Each line 64 characters wide. When the Comments field is not zero, it holds the number of additional comment lines are available. A single comment line is 64 characters long. Like the character fields in the SAUCE record, it is padded with spaces, and has no leading length byte or trailing null-byte. The comment block is preceded with a 5 character identifi- cation mark. This identification mark is 'COMNT'. SAUCE IN FILES -------------- A file with SAUCE added to it. Will look like this: ***************** * * * FILE DATA * Actual file data. As if it would be without SAUCE. * * ***************** * * * EOF MARKER * EOF marker. This will assure character files can * * easily determine the end of file. ***************** * * * COMMENT BLOCK * Optional Comment block. * * ***************** * * * SAUCE RECORD * SAUCE record. * * ***************** The Comment block ***************** * * * 'COMNT' * Comment block ID bytes * * ***************** * * * COMMENTLINE 1 * First comment line * * ***************** * * * COMMENTLINE 2 * Second comment line * * ***************** ... ***************** * * * COMMENTLINE N * n-th comment line, n equals the Comments field * * in SAUCE record. ***************** EXAMPLE CODE TO READ SAUCE -------------------------- Variables: Byte : Count; Long : FileSize; file : F; Code: Open_File(F); | Open the file for read access FileSize = Size_of_file(F); | Determine filesize Seek_file (F, FileSize-128); | Seek to start of SAUCE (Eof-128) Read_File (F, SAUCE); | Read the SAUCE record IF SAUCE.ID="SAUCE" THEN | ID bytes match "SAUCE" ? IF SAUCE.Comments>0 THEN | Is there a comment block ? Seek_File(F, FileSize-128-(SAUCE.Comments*64)-5); | Seek to start of Comment block. Read_File(F, CommentID); | Read Comment ID. IF CommentID="COMNT" THEN | Comment ID matches "COMNT" ? For Count=1 to SAUCE.Comments| \ Read all comment lines. Read_File(F, CommentLine) | / ENDFOR ELSE Invalid_Comment; | Non fatal, No comment present. ENDIF ENDIF ELSE Invalid_SAUCE; | No valid SAUCE record was found. ENDIF SAUCE DATAFILE -------------- The full specifications of the SAUCE datafile are not ready yet. INFORMATION OR UPGRADES ----------------------- If you have a need for additional information on SAUCE, or need modifications, you can contact me at these places... Leave a message to TASMANIAC on any of these boards : FUN-derbird BBS +32-50-620112 USR 16800 Dual +32-50-625717 ZyXEL 19200 The End of TiME +1-803-855-0783 USR 21600 Dual Channel Zer0 +1-714-532-5950 Practical 14400 +1-714-532-5968 USR 16800 Dual Ok, there you go. I chopped off the introduction which was just the names and such they invented for sauce. And I removed the C code. there's also a Pascal TPU in the 6/94 ACiD Pack, and a program called SPOON so you can add sauce (though you can program your own now). JUST REMEBER. SAUCE IS NOT TP SPECIFIC. ALL CHAR FIELDS ARE ARRAYS OF CHARS, NOT STRINGS!!!!! 
42.095628
79
0.527423
85a2264b61450393598ad68b283d96901c2b2496
813
pas
Pascal
test/code/stub/logicop/LogOpOr.pas
VencejoSoftware/ooFilter
fc802bee0415ae58a3e93625b2bf6cb8b36a3e62
[ "BSD-3-Clause" ]
null
null
null
test/code/stub/logicop/LogOpOr.pas
VencejoSoftware/ooFilter
fc802bee0415ae58a3e93625b2bf6cb8b36a3e62
[ "BSD-3-Clause" ]
null
null
null
test/code/stub/logicop/LogOpOr.pas
VencejoSoftware/ooFilter
fc802bee0415ae58a3e93625b2bf6cb8b36a3e62
[ "BSD-3-Clause" ]
2
2019-11-21T03:18:40.000Z
2021-01-26T04:51:53.000Z
{ Copyright (c) 2016, Vencejo Software Distributed under the terms of the Modified BSD License The full license is distributed with this software } unit LogOpOr; interface uses ooText.Beautify.Intf, ooFilter.Join.Intf; type TLogOpOr = class sealed(TInterfacedObject, IFilterJoin) public function Parse(const Beautify: ITextBeautify): String; function IsEmpty: Boolean; function IsReplaceable: Boolean; class function New: IFilterJoin; end; implementation function TLogOpOr.Parse(const Beautify: ITextBeautify): String; begin Result := 'O' end; function TLogOpOr.IsEmpty: Boolean; begin Result := False; end; function TLogOpOr.IsReplaceable: Boolean; begin Result := False; end; class function TLogOpOr.New: IFilterJoin; begin Result := TLogOpOr.Create; end; end.
17.297872
63
0.751538
836a92de36e77abd9f6d68cf4210b7e022950551
1,390
pas
Pascal
Example/AndroidSource/Main1.pas
halilhanbadem/Java-ile-Delphi-Android-Uygulama-Tetikleme
0ef8e302e78aed568de2332283f155da238c02af
[ "Apache-2.0" ]
7
2018-02-17T19:51:07.000Z
2019-07-28T06:58:12.000Z
Example/AndroidSource/Main1.pas
halilhanbadem/Java-ile-Delphi-Android-Uygulama-Tetikleme
0ef8e302e78aed568de2332283f155da238c02af
[ "Apache-2.0" ]
1
2018-04-29T08:03:45.000Z
2018-05-04T13:59:58.000Z
Example/AndroidSource/Main1.pas
halilhanbadem/Java-ile-Delphi-Android-Uygulama-Tetikleme
0ef8e302e78aed568de2332283f155da238c02af
[ "Apache-2.0" ]
3
2018-08-07T16:16:30.000Z
2020-11-24T08:36:31.000Z
unit Main1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, FMX.Controls.Presentation, FMX.StdCtrls, Androidapi.JNI.JavaTypes, Androidapi.JNI.App, Androidapi.Helpers, Androidapi.JNI.GraphicsContentViewText; type TfrmMain = class(TForm) Button1: TButton; Text1: TText; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmMain: TfrmMain; implementation {$R *.fmx} uses System.Android.Service; function getTimeAfterInSecs(Seconds: Integer): Int64; var Calendar: JCalendar; begin Calendar := TJCalendar.JavaClass.getInstance; Calendar.add(TJCalendar.JavaClass.SECOND, Seconds); Result := Calendar.getTimeInMillis; end; procedure TfrmMain.Button1Click(Sender: TObject); var Intent: JIntent; PendingIntent: JPendingIntent; begin Intent := TJIntent.Create; Intent.setClassName(TAndroidHelper.Context, StringToJString('com.embarcadero.firemonkey.FMXNativeActivity')); PendingIntent := TJPendingIntent.JavaClass.getActivity(TAndroidHelper.Context, 1, Intent, 0); TAndroidHelper.AlarmManager.&set(TJAlarmManager.JavaClass.RTC_WAKEUP, getTimeAfterInSecs(30), PendingIntent); end; end.
25.272727
112
0.740288
f151013a96fb0bd19a2b15ebec8a2f8412f2333b
2,548
pas
Pascal
src/validators/Validator.IsLessThan.pas
dliocode/datavalidator
ff0ef7a51e6f33c162a13582ab96a313e80bbf44
[ "MIT" ]
21
2021-06-25T20:08:59.000Z
2022-03-03T23:43:49.000Z
src/validators/Validator.IsLessThan.pas
dliocode/datavalidator
ff0ef7a51e6f33c162a13582ab96a313e80bbf44
[ "MIT" ]
null
null
null
src/validators/Validator.IsLessThan.pas
dliocode/datavalidator
ff0ef7a51e6f33c162a13582ab96a313e80bbf44
[ "MIT" ]
6
2021-06-26T01:36:30.000Z
2021-07-29T03:51:06.000Z
{ ******************************************************************************** Github - https://github.com/dliocode/datavalidator ******************************************************************************** MIT License Copyright (c) 2021 Danilo Lucas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************** } unit Validator.IsLessThan; interface uses DataValidator.ItemBase, System.SysUtils, System.Variants; type TValidatorIsLessThan = class(TDataValidatorItemBase, IDataValidatorItem) private FValueLessThan: Integer; public function Check: IDataValidatorResult; constructor Create(const AValueLessThan: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil); end; implementation { TValidatorIsLessThan } constructor TValidatorIsLessThan.Create(const AValueLessThan: Integer; const AMessage: string; const AExecute: TDataValidatorInformationExecute = nil); begin FValueLessThan := AValueLessThan; SetMessage(AMessage); SetExecute(AExecute); end; function TValidatorIsLessThan.Check: IDataValidatorResult; var LValue: string; R: Boolean; begin LValue := GetValueAsString; R := False; try if not Trim(LValue).IsEmpty then R := VarCompareValue(LValue, FValueLessThan) = vrLessThan; except end; if FIsNot then R := not R; Result := TDataValidatorResult.Create(R, TDataValidatorInformation.Create(LValue, GetMessage, FExecute)); end; end.
31.073171
151
0.697017
f11ae38a94539f075917a4ff1d00a28f2c379fef
1,641
pas
Pascal
out/euler19.pas
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
22
2017-04-24T10:00:45.000Z
2021-04-01T10:11:05.000Z
out/euler19.pas
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
12
2017-03-26T18:34:21.000Z
2019-03-21T19:13:03.000Z
out/euler19.pas
Melyodas/metalang
399a9f1a71402c979d7f8024d4f98f081c80e771
[ "BSD-2-Clause" ]
7
2017-10-14T13:33:33.000Z
2021-03-18T15:18:50.000Z
program euler19; function is_leap(year : Longint) : boolean; begin exit((year Mod 400 = 0) or (year Mod 100 <> 0) and (year Mod 4 = 0)); end; function ndayinmonth(month : Longint; year : Longint) : Longint; begin if month = 0 then begin exit(31); end else if month = 1 then begin if is_leap(year) then begin exit(29); end else begin exit(28); end; end else if month = 2 then begin exit(31); end else if month = 3 then begin exit(30); end else if month = 4 then begin exit(31); end else if month = 5 then begin exit(30); end else if month = 6 then begin exit(31); end else if month = 7 then begin exit(31); end else if month = 8 then begin exit(30); end else if month = 9 then begin exit(31); end else if month = 10 then begin exit(30); end else if month = 11 then begin exit(31); end;;;;;;;;;;;; exit(0); end; var count : Longint; dayofweek : Longint; month : Longint; ndays : Longint; year : Longint; begin month := 0; year := 1901; dayofweek := 1; { 01-01-1901 : mardi } count := 0; while year <> 2001 do begin ndays := ndayinmonth(month, year); dayofweek := (dayofweek + ndays) Mod 7; month := month + 1; if month = 12 then begin month := 0; year := year + 1; end; if dayofweek Mod 7 = 6 then begin count := count + 1; end; end; Write(count); Write(''#10''); end.
15.628571
71
0.519805
8348929b580f7f6209da37c338dd0b601345a625
27,657
pas
Pascal
Graph_3D/graph3d.pas
delphi-pascal-archive/graph-3d
e74a31611905ca54a6836901317c32d0ed66078b
[ "Unlicense" ]
null
null
null
Graph_3D/graph3d.pas
delphi-pascal-archive/graph-3d
e74a31611905ca54a6836901317c32d0ed66078b
[ "Unlicense" ]
null
null
null
Graph_3D/graph3d.pas
delphi-pascal-archive/graph-3d
e74a31611905ca54a6836901317c32d0ed66078b
[ "Unlicense" ]
null
null
null
unit Graph3d; interface uses Graphics,math; const pi2=6.283185307179586476925286766559 ; Const FOCUS_KAMERA=300; type BRGB = record B:byte; G:byte; R:byte; end; TRgb=array[0..4000] of BRGB; PRGB=array[0..4000] of ^TRgb; TVertex3D2D=record//oei aa?oeia X3DM,Y3DM,Z3DM:double;//ie?iaua eii?aeiaou X3DP,Y3DP,Z3DP:double; //ei?aeiaou i?iecaieuiie eaia?u X2D,Y2D:double; //eii?aeiaou i?iaoe?iaaiey; TX,TY:double;//eii?aeiaoa aa?oeiu oaenoo?u end; TAngle=Record//oei oaie Sin,Cos:double; end; Type TFog=record R,G,B:byte; L:double; end; TTexture=record Texture:PRGB; width,height:integer; end; TVector=array[1..4] of double;//oei aaeoi? TMatrix=array[1..4,1..4] of double;//oei iao?eoa TTriangles=array[1..3] of TVertex3D2D; //oei o?aoaieuiee TRender3D = class private {$A4} MatrixOX:TMatrix; MatrixOY:TMatrix; MatrixOZ:TMatrix; MatrixResult:TMatrix; triangl,trianglr,trianglr1:TTriangles; ArrayPointer:PRGB; //Iannea oi?ae aeoiaie ea?ou Width,Height:integer; cc1,cc2,cc3,cc4,c1,c2,c3,cc5,cc6:double; ZBuffer:array of array of double; fz,dil1:double; z1,z2,z3:double;//ia?aoiua aaee?eiu z eii?aeiao zmin,zmax,zmax1:double;//cia?aiey z ia?ao eioi?uie aoaao i?ienoiaeou eioa?iieyoey zz1,zz3,zz5,cz1,cz2,cz3:double; minxt,minyt:double;//cia?aiey eii?aeiao oaenoo?u ia?ao eioi?uie aoaao i?ienoiaeou eioa?iieyoey tx1,tx3,tx5,ctx2:double; ty1,ty3,ty5,cty2:double; D,dx,dy,D2:double; il1:double; ZO,xo,yo:double; an,bn,cn:double; {$A2} fx,fy:integer; kp,ko:integer; ScaleWidth,ScaleHeight:integer; vo,vp:array[1..3] of integer; //iao?eou iiai?ioia aie?oa inae ox,oy,oz //================ //?acoeuoe?o?uay iao?eoa o??oia?iiai i?aia?aciaaiey //================ Kamerax,KameraY,Kameraz:double; //iiei?aiea eiia?u a i?ino?ainoaa procedure SortVertex(var Triangle:TTriangles;var xmax,xmin,ymax,ymin:double);//i?ioaao?a ni?oe?iaee 2D aa?oei procedure PaintLineT(maxx,minx:double;y:integer;Zmin,Tminx,Tminy:double);//I?ioaao?a io?eniaee ai?eciioaeuiie oaenoo?iie eeiee procedure PaintLine(maxx,minx:double;y:integer;Zmax,Zmin:double;R,G,B:byte);//I?ioaao?a io?eniaee ai?eciioaeuiie oaaoiie eeiee procedure FillT(var Vertex1,Vertex2,vertex3:TVertex3d2d); procedure Fill(var Vertex1,Vertex2,vertex3:TVertex3d2d;R,G,B:byte); public //oaeu iiai?ioia eaia?u ioiineoaeuii inae ox,oy,oz //================== {$A4} AngleKameraOX:TAngle; AngleKameraOY:TAngle; AngleKameraOZ:TAngle; //================== Texture:^TTexture;//oaenoo?a TextureEnabled:boolean; Fog:TFog; NoneFace:boolean; constructor Create(W,H:integer;Win3d:TBitMap); procedure FillZBuffer; //Caiieiaiea aooa?a iaeneiaeuiui/ieieiaeuiui cia?aieai function xyz2D(var Vertex:TVertex3D2D):boolean; //I?aia?aciaaiea 3D eii?aeiao a 2D procedure FillTriangle(var Vertex1,Vertex2,vertex3:TVertex3d2d;R,G,B:byte);//Io?eniaea o?aoaieuieea Procedure RotateKamera(OX,OY,OZ:double); //i?ioaao?a iiai?ioa eaia?u PRocedure MoveKamera(x,y,z:double); //i?ioaao?a aae?aiey eaia?u Procedure BitMapToPointer(var PointerBitMap:PRgb; Bitmap:TBitMAp);//iieo?aiea ianneaa oeacaoaeae ia BitMap; procedure CreateFog; procedure SetPointKamera(X,Y,Z:double); procedure point3d(Vertex:TVertex3d2d;r,g,b:byte); end; implementation //--------------------------------------------------------------------------- constructor TRender3D.Create(W,H:integer;Win3d:TBitMap); var i:integer; begin Win3d.Width:=W; Win3d.Height:=H; BitMaptoPointer(ArrayPointer,Win3d); setlength(ZBuffer,w); for i:=0 to w-1 do setlength(zbuffer[i],h); Width:=w-1; Height:=h-1; ScaleWidth:=W div 2; ScaleHeight:=H div 2; //eieoeeecaoey iao?eo MatrixOX[1,1]:=1; MatrixOX[1,2]:=0; MatrixOX[1,3]:=0; MatrixOX[1,4]:=0; MatrixOX[2,1]:=0; MatrixOX[2,4]:=0; MatrixOX[3,1]:=0; MatrixOX[3,4]:=0; MatrixOX[4,1]:=0; MatrixOX[4,2]:=0; MatrixOX[4,3]:=0; MatrixOX[4,4]:=1; MatrixOY[1,2]:=0; MatrixOY[1,4]:=0; MatrixOY[2,1]:=0; MatrixOY[2,2]:=1; MatrixOY[2,3]:=0; MatrixOY[2,4]:=0; MatrixOY[3,2]:=0; MatrixOY[3,4]:=0; MatrixOY[4,1]:=0; MatrixOY[4,2]:=0; MatrixOY[4,3]:=0; MatrixOY[4,4]:=1; MatrixOZ[1,3]:=0; MatrixOZ[1,4]:=0; MatrixOZ[2,3]:=0; MatrixOZ[2,4]:=0; MatrixOZ[3,1]:=0; MatrixOZ[3,2]:=0; MatrixOZ[3,3]:=1; MatrixOZ[3,4]:=0; MatrixOZ[4,1]:=0; MatrixOZ[4,2]:=0; MatrixOZ[4,3]:=0; MatrixOZ[4,4]:=1; MatrixResult[1,4]:=0; MatrixResult[2,4]:=0; MatrixResult[3,4]:=0; MatrixResult[4,1]:=0; MatrixResult[4,2]:=0; MatrixResult[4,3]:=0; MatrixResult[4,4]:=1; fog.R:=255; fog.g:=255; fog.b:=255; fog.l:=1000; D2:=1/Focus_kamera ; inherited Create; end; //--------------------------------------------------------------------------- procedure TRender3d.FillZBuffer; var i,j:integer; begin for i:=0 to width-1 do for j:=0 to Height-1 do zbuffer[i,j]:=$ffffffff; end; //--------------------------------------------------------------------------- function TRender3d.xyz2D(var Vertex:TVertex3D2D):boolean; var {$A4} Vec:TVector; begin result:=false; Vec[1]:=Vertex.X3DM-KameraX; Vec[2]:=Vertex.y3DM-Kameray; Vec[3]:=Vertex.z3DM-Kameraz; Vertex.X3DP:= Vec[1]*matrixResult[1,1]+Vec[2]*matrixResult[1,2]+Vec[3]*matrixResult[1,3]; Vertex.Y3DP:= Vec[1]*matrixResult[2,1]+Vec[2]*matrixResult[2,2]+Vec[3]*matrixResult[2,3]; Vertex.Z3DP:= Vec[1]*matrixResult[3,1]+Vec[2]*matrixResult[3,2]+Vec[3]*matrixResult[3,3]; if (FOCUS_KAMERA+Vertex.Z3DP)<>0then begin Vertex.X2D:=(ScaleWidth+FOCUS_KAMERA*(Vertex.X3DP) /(FOCUS_KAMERA+Vertex.Z3DP)); Vertex.Y2D:=(ScaleHEight-FOCUS_KAMERA*(Vertex.Y3DP) /(fOCUS_KAMERA+Vertex.Z3DP)); end; end; //--------------------------------------------------------------------------- procedure TRender3d.RotateKamera(ox,oy,oz:double); begin AngleKameraOX.Sin:=sin(pi2*ox/360); AngleKameraOX.Cos:=cos(pi2*ox/360); AngleKameraOy.Sin:=sin(pi2*oy/360); AngleKameraOy.Cos:=cos(pi2*oy/360); AngleKameraOz.Sin:=sin(pi2*oz/360); AngleKameraOz.Cos:=cos(pi2*oz/360); MatrixOX[3,2]:=-AngleKameraOX.Sin; MatrixOX[3,3]:=AngleKameraOX.Cos; MatrixOX[2,2]:=AngleKameraOX.Cos; MatrixOX[2,3]:=AngleKameraOX.Sin; MatrixOY[1,1]:=AngleKameraOy.Cos; MatrixOY[1,3]:=AngleKameraOy.Sin; MatrixOY[3,1]:=-AngleKameraOy.Sin; MatrixOY[3,3]:=AngleKameraOy.Cos; MatrixOZ[2,1]:=-AngleKameraOz.Sin; MatrixOZ[2,2]:=AngleKameraOz.Cos; MatrixOZ[1,1]:=AngleKameraOz.Cos; MatrixOZ[1,2]:=AngleKameraOz.Sin; MatrixResult[1,1]:=MatrixOZ[1,1]*MatrixOY[1,1]+MatrixOZ[2,1]*MatrixOY[3,1]*MatrixOX[2,3]; MatrixResult[1,2]:=MatrixOZ[2,1]*MatrixOX[2,2]; MatrixResult[1,3]:=MatrixOZ[1,1]*MatrixOY[1,3]+MatrixOZ[2,1]*MatrixOY[3,3]*MatrixOX[2,3]; MatrixResult[2,1]:=MatrixOZ[1,2]*MatrixOY[1,1]+MatrixOZ[2,2]*MatrixOY[3,1]*MatrixOX[2,3]; MatrixResult[2,2]:=MatrixOZ[2,2]*MatrixOX[2,2]; MatrixResult[2,3]:=MatrixOZ[1,2]*MatrixOY[1,3]+MatrixOZ[2,2]*MatrixOY[3,3]*MatrixOX[2,3]; MatrixResult[3,1]:=MatrixOY[3,1]*MatrixOX[3,3]; MatrixResult[3,2]:=MatrixOX[3,2]; MatrixResult[3,3]:=MatrixOY[3,3]*MatrixOX[3,3]; end; //--------------------------------------------------------------------------- Procedure TRender3D.MoveKamera(x,y,z:double); begin Kamerax:=x; Kameray:=y; Kameraz:=z; end; //--------------------------------------------------------------------------- procedure TRender3d.SortVertex(var Triangle:TTriangles;var xmax,xmin,ymax,ymin:double); var M:TVertex3D2D; i,j:integer; m1:double; TX:TTriangles; begin tx:=Triangle; for i:=1 to 3 do for j:=1 to i do begin if Triangle[i].Y2D<=Triangle[j].Y2D then begin m := Triangle[j] ; Triangle[j]:=Triangle[i] ; Triangle[i]:=m ; end; end; for i:=1 to 3 do for j:=1 to i do begin If tx[i].X2D<= tx[j].X2D Then begin m1 := tx[j].X2D ; tx[j].X2D := tx[i].X2D ; tx[i].X2D := m1 ; end; end; XMax:=tx[3].X2D; XMIn:=tx[1].X2D; yMax:=Triangle[3].Y2D; yMIn:=Triangle[1].Y2D end; //--------------------------------------------------------------------------- procedure TRender3d.FillTriangle(var Vertex1,Vertex2,vertex3:TVertex3d2d;R,G,B:byte); begin if noneface=true then begin AN := (Vertex2.y3dp-Vertex1.y3dp)*(vertex3.z3dp-Vertex1.z3dp)-(Vertex2.z3dp-Vertex1.z3dp)*(vertex3.y3dp-Vertex1.y3dp) ; BN := (Vertex2.z3dp-Vertex1.z3dp)*(vertex3.x3dp-Vertex1.x3dp)-(Vertex2.x3dp-Vertex1.x3dp)*(vertex3.z3dp-Vertex1.z3dp) ; CN :=(Vertex2.x3dp-Vertex1.x3dp)*(vertex3.y3dp-Vertex1.y3dp)-(Vertex2.y3dp-Vertex1.y3dp)*(vertex3.x3dp-Vertex1.x3dp); if cn*focus_kamera+an*Vertex1.x3dp+bn*Vertex1.y3dp+cn*Vertex1.z3dp<0 then if TextureEnabled=false then fill( Vertex1,Vertex2,vertex3,r,g,b) else fillt( Vertex1,Vertex2,vertex3); end else if TextureEnabled=true then fillt( Vertex1,Vertex2,vertex3) else fill( Vertex1,Vertex2,vertex3,r,g,b); end; //--------------------------------------------------------------------------- Procedure Trender3D.PaintLineT(maxx,minx:double;y:integer;zmin,Tminx,Tminy:double); var {$A2} max,min,i:integer; {$A4} raz:double; begin if (maxx>minx) then begin max:=trunc(maxx)-1;min:=trunc(minx) end else begin max:=trunc(minx)-1;min:=trunc(maxx); end ; if max<0 then max:=0; if max>width then max:=width; if Min<0 then Min:=0; if Min>width then Min:=width; raz:=min-minx ; zo:=zmin+(raz)*d; xo:=tminx+(raz)*dx; yo:=tminy+(raz)*dy; for i:=min to max do begin zo:=zo+d; xo:=xo+dx; yo:=yo+dy; fz:=1/(zo) ; if (fz-focus_kamera<zbuffer[i,y]) then begin fx:=round(xo*fz); fy:=round(yo*fz); if (fx>=0) and (fx<=texture.width) and (fy>=0) and (fy<=texture.height) then begin if texture.texture[fy,fx].R<>255 then begin ArrayPointer[y][i].r:=texture.texture[fy,fx].R ; ArrayPointer[y][i].G:= texture.texture[fy,fx].g; ArrayPointer[y][i].b:=texture.texture[fy,fx].b; ZBuffer[i,y]:=fz-focus_kamera; end; end; end; end; end; //--------------------------------------------------------------------------- Procedure Trender3d.PaintLine(maxx,minx:double;y:integer;Zmax,Zmin:double;R,G,B:byte); var max,min,i:integer; raz:double; begin if (maxx-minx)<>0 then begin if (maxx>minx) then begin max:=trunc(maxx)-1;min:=trunc(minx) end else begin max:=trunc(minx)-1;min:=trunc(maxx); end ; if max<0 then max:=0; if max>width then max:=width; if Min<0 then Min:=0; if Min>width then Min:=width; zo:=zmin+(min-minx)*d; for i:=min to max do begin zo:=zo+d; fz:=1/zo-300; if (fz<ZBuffer[i,y]) then begin ArrayPointer[y][i].r:=R ; ArrayPointer[y][i].G:= g; ArrayPointer[y][i].b:=b; ZBuffer[i,y]:=fz; end; end; end; end; //--------------------------------------------------------------------------- procedure Trender3d.FillT(var Vertex1,Vertex2,vertex3:TVertex3d2d); var {$A4} Xmin,XMax:double; Ymin,YMax:double; MaxX,MinX,MaxX1:double; i,j:integer; y1,y2,y3:integer; x_start,x_end,z_start,z_end:double ; tx_start,tx_end,ty_start,ty_end:double ; yraz,yraz1:double; begin kp:=0; ko:=0; triangl[1]:=vertex1; triangl[2]:=vertex2; triangl[3]:=vertex3; for i:=1 to 3 do begin if triangl[i].Z3DP<0 then begin ko:=ko+1; vo[ko]:=i; end else begin kp:=kp+1; vp[kp]:=i; end; end; if ko=3 then exit; if ko=2 then begin trianglr[vp[1]]:= triangl[vp[1]]; trianglr[vo[1]].Z3DP:=0; trianglr[vo[2]].Z3DP:=0; trianglr[vo[1]].X3DP:=triangl[vo[1]].X3DP+(triangl[vp[1]].X3DP - triangl[vo[1]].X3DP)*(0-triangl[vo[1]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[1]].Z3DP) ; trianglr[vo[1]].Y3DP:=triangl[vo[1]].Y3DP+(triangl[vp[1]].Y3DP - triangl[vo[1]].Y3DP)*(0-triangl[vo[1]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[1]].Z3DP) ; trianglr[vo[1]].tx:=triangl[vo[1]].tx+(triangl[vp[1]].tx - triangl[vo[1]].tx)*(0-triangl[vo[1]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[1]].Z3DP) ; trianglr[vo[1]].ty:=triangl[vo[1]].ty+(triangl[vp[1]].ty - triangl[vo[1]].ty)*(0-triangl[vo[1]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[1]].Z3DP) ; trianglr[vo[1]].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr[vo[1]].X3DP) *d2); trianglr[vo[1]].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr[vo[1]].Y3DP) *d2); trianglr[vo[2]].X3DP:=triangl[vo[2]].X3DP+(triangl[vp[1]].X3DP - triangl[vo[2]].X3DP)*(0-triangl[vo[2]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[2]].Z3DP) ; trianglr[vo[2]].Y3DP:=triangl[vo[2]].Y3DP+(triangl[vp[1]].Y3DP - triangl[vo[2]].Y3DP)*(0-triangl[vo[2]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[2]].Z3DP) ; trianglr[vo[2]].tx:=triangl[vo[2]].tx+(triangl[vp[1]].tx - triangl[vo[2]].tx)*(0-triangl[vo[2]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[2]].Z3DP) ; trianglr[vo[2]].ty:=triangl[vo[2]].ty+(triangl[vp[1]].ty - triangl[vo[2]].ty)*(0-triangl[vo[2]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[2]].Z3DP) ; trianglr[vo[2]].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr[vo[2]].X3DP) *d2); trianglr[vo[2]].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr[vo[2]].Y3DP) *d2); fillt(trianglr[1],trianglr[2],trianglr[3]); exit; end; //D.t = A.t + (C.t - A.t) * (-dist - A.z) / (C.z - A.z) if ko=1 then begin trianglr[1]:=triangl[vp[1]]; trianglr[2]:=triangl[vp[2]]; trianglr[3].Z3DP:=0; trianglr[3].X3DP :=triangl[vp[1]].X3DP +(triangl[vo[1]].X3DP-triangl[vp[1]].X3DP)*(0-triangl[vp[1]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[1]].Z3DP); trianglr[3].y3DP :=triangl[vp[1]].y3DP +(triangl[vo[1]].y3DP-triangl[vp[1]].y3DP)*(0-triangl[vp[1]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[1]].Z3DP); trianglr[3].tx :=triangl[vp[1]].tx +(triangl[vo[1]].tx-triangl[vp[1]].tx)*(0-triangl[vp[1]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[1]].Z3DP); trianglr[3].ty :=triangl[vp[1]].ty +(triangl[vo[1]].ty-triangl[vp[1]].ty)*(0-triangl[vp[1]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[1]].Z3DP); trianglr[3].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr[3].X3DP) *d2); trianglr[3].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr[3].Y3DP) *d2); trianglr1[1]:=triangl[vp[2]]; trianglr1[2]:=trianglr[3]; trianglr[3].Z3DP:=0; trianglr1[3].X3DP :=triangl[vp[2]].X3DP +(triangl[vo[1]].X3DP-triangl[vp[2]].X3DP)*(0-triangl[vp[2]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[2]].Z3DP); trianglr1[3].y3DP :=triangl[vp[2]].y3DP +(triangl[vo[1]].y3DP-triangl[vp[2]].y3DP)*(0-triangl[vp[2]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[2]].Z3DP); trianglr1[3].tx :=triangl[vp[2]].tx +(triangl[vo[1]].tx-triangl[vp[2]].tx)*(0-triangl[vp[2]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[2]].Z3DP); trianglr1[3].ty :=triangl[vp[2]].ty +(triangl[vo[1]].ty-triangl[vp[2]].ty)*(0-triangl[vp[2]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[2]].Z3DP); trianglr1[3].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr1[3].X3DP) *d2); trianglr1[3].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr1[3].Y3DP) *d2); fillt(trianglr[1],trianglr[2],trianglr[3]); fillt(trianglr1[1],trianglr1[2],trianglr1[3]); exit; end; SortVertex(triangl,Xmax,xmin,ymax,ymin); if ymax<0 then ymax:=0; if ymax>height then ymax:=height; if ymin<0 then ymin:=0; if ymin>height then ymin:=height; if xmax<0 then xmax:=0; if xmax>width then xmax:=width; if xmin<0 then xmin:=0; if xmin>width then xmin:=width; if (ymax <> ymin) and (xmax <> xmin) then begin z1:=(1/(FOCUS_KAMERA+triangl[1].Z3DP)); z2:=(1/(FOCUS_KAMERA+triangl[2].Z3DP)); z3:=(1/(FOCUS_KAMERA+triangl[3].Z3DP)); zz1:=(z2-z1); zz3:=(z3-z1); zz5:= (z3-z2); triangl[1].TX:=triangl[1].TX*z1; triangl[2].TX:=triangl[2].TX*z2; triangl[3].TX:=triangl[3].TX*z3; triangl[1].Ty:=triangl[1].Ty*z1; triangl[2].Ty:=triangl[2].Ty*z2; triangl[3].Ty:=triangl[3].Ty*z3; tx1:=(triangl[2].TX-triangl[1].TX); tx3:=(triangl[3].TX-triangl[1].TX); tx5:= (triangl[3].TX-triangl[2].TX); ty1:=(triangl[2].TY-triangl[1].TY); ty3:=(triangl[3].TY-triangl[1].TY); ty5:= (triangl[3].TY-triangl[2].TY); cc1:=(Triangl[2].x2d-Triangl[1].x2d); cc2:=(Triangl[2].y2d-Triangl[1].y2d); cc3:=(Triangl[3].x2d-Triangl[1].x2d); cc4:=(Triangl[3].y2d-Triangl[1].y2d); cc5:=(Triangl[3].x2d-Triangl[2].x2d); cc6:=(Triangl[3].y2d-Triangl[2].y2d); if (cc2<>0)then begin c1:=cc1/cc2; end; if (cc4<>0)then begin c2:=cc3/cc4;cz2:=zz3/cc4;ctx2:=tx3/cc4;cty2:=ty3/cc4; end; if (cc6<>0)then begin c3:=cc5/cc6; end; x_start := Triangl[1].x2d+cc2*c2; x_end := Triangl[2].x2d; Z_start := z1+cc2*cz2; Z_end := z2; tx_start := Triangl[1].tx+cc2*ctx2; tx_end := Triangl[2].tx; ty_start := Triangl[1].ty+cc2*cty2; ty_end :=Triangl[2].ty; if (x_start-x_end)<>0 then dil1:= 1/(x_start-x_end); d:= (z_start-z_end)*dil1; dx:= (tx_start-tx_end)*dil1; dy:= (ty_start-ty_end)*dil1; y1:=round(0.5+ymin); y2:=round(0.5+Triangl[2].y2d); y3:=round(0.5+ymax)-1; if y2<0 then y2:=0; yraz:=y1-triangl[1].y2d ; yraz1:=y2-triangl[2].y2d ; MinX := Triangl[1].x2d+(yraz)*c2; maxX :=Triangl[1].x2d+(yraz)*c1; maxX1 :=Triangl[2].x2d+(yraz1)*c3; MinXt := Triangl[1].tx+(yraz)*ctx2; Minyt := Triangl[1].ty+(yraz)*cty2; zmin:=z1+(yraz)*cz2; for j:=y1 to y3 do begin if j< y2 then begin PaintLineT((MaxX),(MinX),j,zmin,minxt,minyt); maxX :=maxX+c1; end else begin PaintLineT((MaxX1),(MinX),j,zmin,minxt,minyt); maxX1 :=maxX1+c3; end; MinX := MinX+c2; zmin:=zmin+cz2; minyt:=minyt+cty2; minxt:=minxt+ctx2; end; end; end; //--------------------------------------------------------------------------- procedure tRender3D.Fill(var Vertex1,Vertex2,vertex3:TVertex3d2d;R,G,B:byte); var {$A4} Xmin,XMax:double; Ymin,YMax:double; MaxX,MaxX1,MinX:double; x_start,x_end,z_start,z_end:double ; i,j:integer; y1,y2,y3:integer; ko,kp:integer; begin triangl[1]:=vertex1; triangl[2]:=vertex2; triangl[3]:=vertex3; kp:=0; ko:=0; triangl[1]:=vertex1; triangl[2]:=vertex2; triangl[3]:=vertex3; for i:=1 to 3 do begin if triangl[i].Z3DP<0 then begin ko:=ko+1; vo[ko]:=i; end else begin kp:=kp+1; vp[kp]:=i; end; end; if ko=3 then exit; if ko=2 then begin trianglr[vp[1]]:= triangl[vp[1]]; trianglr[vo[1]].Z3DP:=0; trianglr[vo[2]].Z3DP:=0; trianglr[vo[1]].X3DP:=triangl[vo[1]].X3DP+(triangl[vp[1]].X3DP - triangl[vo[1]].X3DP)*(0-triangl[vo[1]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[1]].Z3DP) ; trianglr[vo[1]].Y3DP:=triangl[vo[1]].Y3DP+(triangl[vp[1]].Y3DP - triangl[vo[1]].Y3DP)*(0-triangl[vo[1]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[1]].Z3DP) ; trianglr[vo[1]].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr[vo[1]].X3DP) *d2); trianglr[vo[1]].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr[vo[1]].Y3DP) *d2); trianglr[vo[2]].X3DP:=triangl[vo[2]].X3DP+(triangl[vp[1]].X3DP - triangl[vo[2]].X3DP)*(0-triangl[vo[2]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[2]].Z3DP) ; trianglr[vo[2]].Y3DP:=triangl[vo[2]].Y3DP+(triangl[vp[1]].Y3DP - triangl[vo[2]].Y3DP)*(0-triangl[vo[2]].Z3DP)/(triangl[vp[1]].Z3DP-triangl[vo[2]].Z3DP) ; trianglr[vo[2]].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr[vo[2]].X3DP) *d2); trianglr[vo[2]].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr[vo[2]].Y3DP) *d2); fill(trianglr[1],trianglr[2],trianglr[3],r,g,b); exit; end; //D.t = A.t + (C.t - A.t) * (-dist - A.z) / (C.z - A.z) if ko=1 then begin trianglr[1]:=triangl[vp[1]]; trianglr[2]:=triangl[vp[2]]; trianglr[3].Z3DP:=0; trianglr[3].X3DP :=triangl[vp[1]].X3DP +(triangl[vo[1]].X3DP-triangl[vp[1]].X3DP)*(0-triangl[vp[1]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[1]].Z3DP); trianglr[3].y3DP :=triangl[vp[1]].y3DP +(triangl[vo[1]].y3DP-triangl[vp[1]].y3DP)*(0-triangl[vp[1]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[1]].Z3DP); trianglr[3].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr[3].X3DP) *d2); trianglr[3].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr[3].Y3DP) *d2); trianglr1[1]:=triangl[vp[2]]; trianglr1[2]:=trianglr[3]; trianglr[3].Z3DP:=0; trianglr1[3].X3DP :=triangl[vp[2]].X3DP +(triangl[vo[1]].X3DP-triangl[vp[2]].X3DP)*(0-triangl[vp[2]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[2]].Z3DP); trianglr1[3].y3DP :=triangl[vp[2]].y3DP +(triangl[vo[1]].y3DP-triangl[vp[2]].y3DP)*(0-triangl[vp[2]].Z3DP)/(triangl[vo[1]].Z3DP-triangl[vp[2]].Z3DP); trianglr1[3].X2D:=(ScaleWidth+FOCUS_KAMERA*(trianglr1[3].X3DP) *d2); trianglr1[3].Y2D:=(ScaleHEight-FOCUS_KAMERA*(trianglr1[3].Y3DP) *d2); fill(trianglr[1],trianglr[2],trianglr[3],r,g,b); fill(trianglr1[1],trianglr1[2],trianglr1[3],r,g,b); exit; end; SortVertex(triangl,Xmax,xmin,ymax,ymin); if ymax<0 then ymax:=0; if ymax>height then ymax:=height; if ymin<0 then ymin:=0; if ymin>height then ymin:=height; if xmax<0 then xmax:=0; if xmax>width then xmax:=width; if xmin<0 then xmin:=0; if xmin>width then xmin:=width; if (ymax <> ymin) and (xmax <> xmin) then begin if (FOCUS_KAMERA+triangl[1].Z3DP)<>0 then z1:=(1/(FOCUS_KAMERA+triangl[1].Z3DP)); if (FOCUS_KAMERA+triangl[2].Z3DP)<>0 then z2:=(1/(FOCUS_KAMERA+triangl[2].Z3DP)); if (FOCUS_KAMERA+triangl[3].Z3DP)<>0 then z3:=(1/(FOCUS_KAMERA+triangl[3].Z3DP)); zz1:=(z2-z1); zz3:=(z3-z1); zz5:= (z3-z2); cc1:=(Triangl[2].x2d-Triangl[1].x2d); cc2:=(Triangl[2].y2d-Triangl[1].y2d); cc3:=(Triangl[3].x2d-Triangl[1].x2d); cc4:=(Triangl[3].y2d-Triangl[1].y2d); cc5:=(Triangl[3].x2d-Triangl[2].x2d); cc6:=(Triangl[3].y2d-Triangl[2].y2d); if (cc2<>0)then begin c1:=cc1/cc2; cz1:=zz1/cc2; end; if (cc4<>0)then begin c2:=cc3/cc4;cz2:=zz3/cc4;end; if (cc6<>0)then begin c3:=cc5/cc6;cz3:=zz5/cc6; end; x_start := Triangl[1].x2d+(Triangl[2].y2d-Triangl[1].y2d)*c2; x_end := Triangl[2].x2d; Z_start := z1+(Triangl[2].y2d-Triangl[1].y2d)*cz2; Z_end := z2; if (x_start-x_end)<>0 then d:= (z_start-z_end)/(x_start-x_end); y1:=round(0.5+ymin); y2:=round(0.5+Triangl[2].y2d); y3:=round(0.5+ymax)-1; if y2<0 then y2:=0; MinX := Triangl[1].x2d+(y1-triangl[1].y2d)*c2; zmin:=z1+(y1-triangl[1].y2d)*cz2; maxX :=Triangl[1].x2d+(y1-triangl[1].y2d)*c1; zmax:=z1+(y1-triangl[1].y2d)*cz1 ; maxX1 :=Triangl[2].x2d+(y2-triangl[2].y2d)*c3; zmax1:=z2+(y2-triangl[2].y2d)*cz3 ; for j:=y1 to y3 do begin if j< y2 then begin PaintLine((MaxX),(MinX),j,zmax,zmin,r,g,b); zmax:=zmax+cz1; maxX :=maxX+c1; end else begin PaintLine((MaxX1),(MinX),j,zmax1,zmin,r,g,b); zmax1:=zmax1+cz3 ; maxX1 :=maxX1+c3; end; MinX := MinX+c2; zmin:=zmin+cz2; end; end; end; //--------------------------------------------------------------------------- procedure TRender3d.BitMapToPointer(var PointerBitMap:PRgb; Bitmap:TBitMAp); var i:integer; H:integer; begin h:=bitmap.height-1 ; for i:=0 to h do PointerBitMap[i]:=Bitmap.ScanLine[i]; end; //--------------------------------------------------------------------------- procedure TRender3d.CreateFog; var {$A2} i,j:integer; {$A4} per,per1:double; begin per:=-1/(fog.L); for i:=0 to width-1 do for j:=0 to Height-1 do begin if (zbuffer[i,j]<>$ffffffff) and (zbuffer[i,j]<fog.L) then begin per1:=per*(zbuffer[i,j]-fog.L) ; ArrayPointer[j][i].R:=round(fog.R+(ArrayPointer[j][i].R-fog.R)*per1); ArrayPointer[j][i].g:=round(fog.g+(ArrayPointer[j][i].g-fog.g)*per1); ArrayPointer[j][i].b:=round(fog.b+(ArrayPointer[j][i].b-fog.b)*per1); end else begin ArrayPointer[j][i].R:=fog.R; ArrayPointer[j][i].g:=fog.g; ArrayPointer[j][i].b:=fog.b; end; end; end; //--------------------------------------------------------------------------- Procedure Trender3d.SetPointKamera(x,y,z:double); var {$A4} vx,vy,vz:double; begin vx:=x-kamerax; vy:=y-kameray; vz:=z-kameraz; AngleKameraOX.cos:=sqrt(vx*vx+vz*vz)/sqrt(vy*vy+vx*vx+vz*vz) ; AngleKameraOX.sin:=-vy/sqrt(vy*vy+vx*vx+vz*vz) ; AngleKameraOY.cos:= vz/sqrt(vx*vx+vz*vz); AngleKameraOy.sin:= -vx/sqrt(vx*vx+vz*vz); MatrixOX[3,2]:=-AngleKameraOX.Sin; MatrixOX[3,3]:=AngleKameraOX.Cos; MatrixOX[2,2]:=AngleKameraOX.Cos; MatrixOX[2,3]:=AngleKameraOX.Sin; MatrixOY[1,1]:=AngleKameraOy.Cos; MatrixOY[1,3]:=AngleKameraOy.Sin; MatrixOY[3,1]:=-AngleKameraOy.Sin; MatrixOY[3,3]:=AngleKameraOy.Cos; MatrixResult[1,1]:=MatrixOZ[1,1]*MatrixOY[1,1]+MatrixOZ[2,1]*MatrixOY[3,1]*MatrixOX[2,3]; MatrixResult[1,2]:=MatrixOZ[2,1]*MatrixOX[2,2]; MatrixResult[1,3]:=MatrixOZ[1,1]*MatrixOY[1,3]+MatrixOZ[2,1]*MatrixOY[3,3]*MatrixOX[2,3]; MatrixResult[2,1]:=MatrixOZ[1,2]*MatrixOY[1,1]+MatrixOZ[2,2]*MatrixOY[3,1]*MatrixOX[2,3]; MatrixResult[2,2]:=MatrixOZ[2,2]*MatrixOX[2,2]; MatrixResult[2,3]:=MatrixOZ[1,2]*MatrixOY[1,3]+MatrixOZ[2,2]*MatrixOY[3,3]*MatrixOX[2,3]; MatrixResult[3,1]:=MatrixOY[3,1]*MatrixOX[3,3]; MatrixResult[3,2]:=MatrixOX[3,2]; MatrixResult[3,3]:=MatrixOY[3,3]*MatrixOX[3,3]; end; procedure TRender3d.point3d(vertex:TVertex3d2d;r,g,b:byte); var xx,yy:integer; begin xx:=round(0.5+Vertex.X2D); yy:=round(0.5+Vertex.y2D); if (xx>=0) and (xx<=width) and (yy>=0) and (yy<=height) then if (vertex.Z3DP<ZBuffer[xx,yy]) and (vertex.Z3DP>=0) then begin ArrayPointer[yy][xx].r:=R ; ArrayPointer[yy][xx].G:= g; ArrayPointer[yy][xx].b:=b; ZBuffer[xx,yy]:=vertex.Z3DP; end; end; end.
33.686967
162
0.567777
83c84dfe8fad1fc7b01817794d7471c1b65d81a7
11,468
pas
Pascal
project/UFastList.pas
aleksusklim/quadtree
cc42563e74bb0f409779ef8abab9570a17ba457f
[ "Unlicense" ]
1
2019-10-19T02:52:52.000Z
2019-10-19T02:52:52.000Z
project/UFastList.pas
aleksusklim/quadtree
cc42563e74bb0f409779ef8abab9570a17ba457f
[ "Unlicense" ]
null
null
null
project/UFastList.pas
aleksusklim/quadtree
cc42563e74bb0f409779ef8abab9570a17ba457f
[ "Unlicense" ]
null
null
null
unit UFastList; // License: WTFPL, public domain. interface // UFastList v1.0 by Kly_Men_COmpany! {(*}{$UNDEF INL}{$IFDEF FPC}{$DEFINE INL}type Native=PtrInt;{$ELSE}{$IF CompilerVersion > 18.0}{$DEFINE INL}{$IFEND}{$IF SizeOf(Pointer)=4}type Native=Integer;{$IFEND}{$IF SizeOf(Pointer)=8}type Native=Int64;{$IFEND}{$ENDIF}type PNative=^Native;{*)} // Two classes for simple, efficient and very fast lists. // Not delphi-objects actually, just direct memory records manipulation. // So you cannot use any of TObject stuff along with inheritance and everything. // There is no "list itself" structure, every object represents a node. // TXorList - fast linked list, stores XOR of next and previous elements. // Thus is can be iterated from both corners the same way. // Often used just as a symmetric single-linked list. // TLinkList - double linked list, stores two pointers. // Use when you need to operate on middle nodes explicitly. // Also can be circular. // Use Class.Create just as you always use object constructors. Specify desired data size. // You can release memory by calling .Free or Class.FreeAndNil (but not a global one!). // Also you can convert any memory chunk to a list node: call Class.SizeFor to determine // a total amount of bytes to store the element + your data, then call Class.Init on that memory (must be native-aligned). // Use .Data (or a simple array[] syntax) to get a pointer to real data in the list (do not dereference the object itself!) // Single list element is limited to 2Gb on both x86 and x64. // For TXorList: // .Next - returns the next element when you have a previous or know that it's a corner (pass nil). // .Connect - joins two corner elements, or splits two already connected; can be called on nil nodes. // Must not be called on arbitrary middle elements! Returns passed argument. // .Remove - disconnects the current node if given a sibling (or nil for a corner), // can free this element; returns the other sibling. // Class.Walk - moves to the next element given current and previous, updating your variables. // For TLinkList: // .NextRight/.NextLeft - returns the next or previous node. // .ConnectRight/.ConnectLeft - joins two elements together from the desired side. // Must be called on opposite corner nodes; returns passed argument. // .SplitRight/.SplitLeft - disconnects two joined nodes, can be called even if no sibling present. // Returns the other element, can optionally free the current one. // .Remove - disconnects two siblings and connects them together directly, can free current node. // For best performance disable assertations in release mode. // Also use inlining whenever possible, along with enabled optimization. // Designed for Delphi 6+ and Lazarus/FPC 3+, only for x86 and x64 systems. type TXorList = class class procedure FreeAndNil(var XorList: TXorList); {$IFDEF INL}inline;{$ENDIF} class function SizeFor(const Bytes: Native): Native; {$IFDEF INL}inline;{$ENDIF} class function Init(const Memory: Pointer): TXorList; {$IFDEF INL}inline;{$ENDIF} class function Create(const Bytes: Native): TXorList; {$IFDEF INL}inline;{$ENDIF} procedure Free(); {$IFDEF INL}inline;{$ENDIF} function Data(const Offset: Native = 0): Pointer; {$IFDEF INL}inline;{$ENDIF} function Next(const Previous: TXorList = nil): TXorList; {$IFDEF INL}inline;{$ENDIF} function Connect(const Another: TXorList): TXorList; {$IFDEF INL}inline;{$ENDIF} function Remove(const Another: TXorList; const Free: Boolean): TXorList; {$IFDEF INL}inline;{$ENDIF} property Byte[const Offset: Native]: Pointer read Data; default; class function Walk(var Current, Previous: TXorList): TXorList; {$IFDEF INL}inline;{$ENDIF} end; PXorList = ^TXorList; RXorList = record // SizeOf = 1*N Value: Pointer; end; SXorList = ^RXorList; type TLinkList = class class procedure FreeAndNil(var LinkList: TLinkList); {$IFDEF INL}inline;{$ENDIF} class function SizeFor(const Bytes: Native): Native; {$IFDEF INL}inline;{$ENDIF} class function Init(const Memory: Pointer): TLinkList; {$IFDEF INL}inline;{$ENDIF} class function Create(const Bytes: Native): TLinkList; {$IFDEF INL}inline;{$ENDIF} procedure Free(); {$IFDEF INL}inline;{$ENDIF} function Data(const Offset: Native = 0): Pointer; {$IFDEF INL}inline;{$ENDIF} function NextRight(): TLinkList; {$IFDEF INL}inline;{$ENDIF} function NextLeft(): TLinkList; {$IFDEF INL}inline;{$ENDIF} function ConnectRight(const Another: TLinkList): TLinkList; {$IFDEF INL}inline;{$ENDIF} function ConnectLeft(const Another: TLinkList): TLinkList; {$IFDEF INL}inline;{$ENDIF} function SplitRight(const Free: Boolean = False): TLinkList; {$IFDEF INL}inline;{$ENDIF} function SplitLeft(const Free: Boolean = False): TLinkList; {$IFDEF INL}inline;{$ENDIF} procedure Remove(const Free: Boolean); {$IFDEF INL}inline;{$ENDIF} property Byte[const Offset: Native]: Pointer read Data; default; end; PLinkList = ^TLinkList; RLinkList = record // SizeOf = 2*N Prev: Pointer; Next: Pointer; end; SLinkList = ^RLinkList; implementation // TXorList // class procedure TXorList.FreeAndNil(var XorList: TXorList); begin XorList.Free(); XorList := nil; end; class function TXorList.SizeFor(const Bytes: Native): Native; begin Assert(Bytes >= 0); Result := SizeOf(RXorList) + Bytes; end; class function TXorList.Init(const Memory: Pointer): TXorList; begin Assert((Memory <> nil) and (({%H-}Native(Memory) and (SizeOf(Pointer) - 1)) = 0)); SXorList(Memory).Value := nil; Result := Memory; end; class function TXorList.Create(const Bytes: Native): TXorList; begin GetMem(Pointer(Result), Self.SizeFor(Bytes)); Self.Init(Result); end; procedure TXorList.Free(); begin if Self <> nil then FreeMem(Pointer(Self)); end; function TXorList.Data(const Offset: Native = 0): Pointer; begin Assert((Self <> nil) and (Offset >= 0)); Result := {%H-}Pointer({%H-}Native({%H-}Pointer(Self)) + SizeOf(RXorList) + Offset); end; function TXorList.Next(const Previous: TXorList = nil): TXorList; begin Assert(Self <> nil); Result := TXorList({%H-}Pointer({%H-}Native(SXorList(Self).Value) xor {%H-}Native(Pointer(Previous)))); end; function TXorList.Connect(const Another: TXorList): TXorList; begin Assert(Self <> Another); if Self <> nil then SXorList(Self).Value := {%H-}Pointer({%H-}Native(SXorList(Self).Value) xor {%H-}Native(Pointer(Another))); if Another <> nil then SXorList(Another).Value := {%H-}Pointer({%H-}Native(SXorList(Another).Value) xor {%H-}Native(Pointer(Self))); Result := Another; end; function TXorList.Remove(const Another: TXorList; const Free: Boolean): TXorList; begin Assert(Self <> Another); Result := Self.Next(Another); Self.Connect(Another); Self.Connect(Result); Result.Connect(Another); if Free then Self.Free(); end; class function TXorList.Walk(var Current, Previous: TXorList): TXorList; begin Result := Current.Next(Previous); Previous := Current; Current := Result; end; // TLinkList // class procedure TLinkList.FreeAndNil(var LinkList: TLinkList); begin LinkList.Free(); LinkList := nil; end; class function TLinkList.SizeFor(const Bytes: Native): Native; begin Assert(Bytes >= 0); Result := SizeOf(RLinkList) + Bytes; end; class function TLinkList.Init(const Memory: Pointer): TLinkList; begin Assert((Memory <> nil) and (({%H-}Native(Memory) and (SizeOf(Pointer) - 1)) = 0)); SLinkList(Memory).Prev := nil; SLinkList(Memory).Next := nil; Result := Memory; end; class function TLinkList.Create(const Bytes: Native): TLinkList; begin GetMem(Pointer(Result), Self.SizeFor(Bytes)); Self.Init(Result); end; procedure TLinkList.Free(); begin if Self <> nil then FreeMem(Pointer(Self)); end; function TLinkList.Data(const Offset: Native = 0): Pointer; begin Assert((Self <> nil) and (Offset >= 0)); Result := {%H-}Pointer({%H-}Native({%H-}Pointer(Self)) + SizeOf(RLinkList) + Offset); end; function TLinkList.NextRight(): TLinkList; begin Assert(Self <> nil); Result := SLinkList(Self).Next; end; function TLinkList.NextLeft(): TLinkList; begin Assert(Self <> nil); Result := SLinkList(Self).Prev; end; function TLinkList.ConnectRight(const Another: TLinkList): TLinkList; begin Assert((Self <> nil) and (SLinkList(Self).Next = nil) and ((Another = nil) or (SLinkList(Another).Next = nil))); SLinkList(Self).Next := Another; if Another <> nil then SLinkList(Another).Prev := Self; Result := Another; end; function TLinkList.ConnectLeft(const Another: TLinkList): TLinkList; begin Assert((Self <> nil) and (SLinkList(Self).Prev = nil) and ((Another = nil) or (SLinkList(Another).Next = nil))); SLinkList(Self).Prev := Another; if Another <> nil then SLinkList(Another).Next := Self; Result := Another; end; function TLinkList.SplitRight(const Free: Boolean = False): TLinkList; begin Assert((Self <> nil) and ((SLinkList(Self).Next = nil) or (SLinkList(SLinkList(Self).Next).Prev = Self))); Result := SLinkList(Self).Next; if Result <> nil then SLinkList(Result).Prev := nil; SLinkList(Self).Next := nil; if Free then begin Assert(SLinkList(Self).Prev = nil); Self.Free(); end; end; function TLinkList.SplitLeft(const Free: Boolean = False): TLinkList; begin Assert((Self <> nil) and ((SLinkList(Self).Prev = nil) or (SLinkList(SLinkList(Self).Prev).Next = Self))); Result := SLinkList(Self).Prev; if Result <> nil then SLinkList(Result).Next := nil; SLinkList(Self).Prev := nil; if Free then begin Assert(SLinkList(Self).Next = nil); Self.Free(); end; end; procedure TLinkList.Remove(const Free: Boolean); begin Assert((Self <> nil) and ((SLinkList(Self).Next = nil) or (SLinkList(SLinkList(Self).Next).Prev = Self)) and ((SLinkList(Self).Prev = nil) or (SLinkList(SLinkList(Self).Prev).Next = Self))); if SLinkList(Self).Next <> nil then SLinkList(SLinkList(Self).Next).Prev := SLinkList(Self).Prev; if SLinkList(Self).Prev <> nil then SLinkList(SLinkList(Self).Prev).Next := SLinkList(Self).Next; if Free then Self.Free(); end; // Tests // procedure TryXorList(); var XorList, Next: TXorList; begin TXorList.SizeFor(8); XorList := TXorList.Create(8); TXorList.Init(XorList); XorList.Connect(nil); XorList.Data(); PXorList(XorList[0])^ := XorList; Next := XorList.Next(); XorList.Walk(XorList, Next); XorList := Next; XorList.Remove(nil, False); TXorList.FreeAndNil(XorList); XorList.Free(); end; procedure TryLinkList(); var LinkList, Next: TLinkList; begin TLinkList.SizeFor(8); LinkList := TLinkList.Create(8); TLinkList.Init(LinkList); Next := TLinkList.Create(8); LinkList.ConnectRight(Next); Next.ConnectRight(LinkList); LinkList.SplitRight(False); LinkList.SplitLeft(False); Next.ConnectLeft(LinkList); LinkList.ConnectLeft(Next); Next.Remove(True); LinkList.Data(); Next := LinkList.NextRight(); PLinkList(LinkList[0])^ := Next; Next := LinkList.NextLeft(); TLinkList.FreeAndNil(Next); Next.Free(); end; end.
35.177914
250
0.687653
f10d064e8feffc69a9efe657a67a90652f22690a
48,283
pas
Pascal
dependencies/Indy10/Protocols/IdMessage.pas
danka74/fhirserver
1fc53b6fba67a54be6bee39159d3db28d42eb8e2
[ "BSD-3-Clause" ]
null
null
null
dependencies/Indy10/Protocols/IdMessage.pas
danka74/fhirserver
1fc53b6fba67a54be6bee39159d3db28d42eb8e2
[ "BSD-3-Clause" ]
null
null
null
dependencies/Indy10/Protocols/IdMessage.pas
danka74/fhirserver
1fc53b6fba67a54be6bee39159d3db28d42eb8e2
[ "BSD-3-Clause" ]
null
null
null
{ $Project$ $Workfile$ $Revision$ $DateUTC$ $Id$ This file is part of the Indy (Internet Direct) project, and is offered under the dual-licensing agreement described on the Indy website. (http://www.indyproject.org/) Copyright: (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved. } { $Log$ } { Rev 1.53 29/12/2004 11:01:56 CCostelloe IsMsgSinglePartMime now cleared in TIdMessage.Clear. Rev 1.52 28/11/2004 20:06:28 CCostelloe Enhancement to preserve case of MIME boundary Rev 1.51 10/26/2004 10:25:44 PM JPMugaas Updated refs. Rev 1.50 2004.10.26 9:10:00 PM czhower TIdStrings Rev 1.49 24.08.2004 18:01:44 Andreas Hausladen Added AttachmentBlocked property to TIdAttachmentFile. Rev 1.48 6/29/04 12:29:04 PM RLebeau Updated TIdMIMEBoundary.FindBoundary() to check the string length after calling Sys.Trim() before referencing the string data Rev 1.47 6/9/04 5:38:48 PM RLebeau Updated ClearHeader() to clear the MsgId and UID properties. Updated SetUseNowForDate() to support AValue being set to False Rev 1.46 16/05/2004 18:54:42 CCostelloe New TIdText/TIdAttachment processing Rev 1.45 03/05/2004 20:43:08 CCostelloe Fixed bug where QP or base64 encoded text part got header encoding incorrectly outputted as 8bit. Rev 1.44 4/25/04 1:29:34 PM RLebeau Bug fix for SaveToStream Rev 1.42 23/04/2004 20:42:18 CCostelloe Bug fixes plus support for From containing multiple addresses Rev 1.41 2004.04.18 1:39:20 PM czhower Bug fix for .NET with attachments, and several other issues found along the way. Rev 1.40 2004.04.16 11:30:56 PM czhower Size fix to IdBuffer, optimizations, and memory leaks Rev 1.39 14/03/2004 17:47:54 CCostelloe Bug fix: quoted-printable attachment encoding was changed to base64. Rev 1.38 2004.02.03 5:44:00 PM czhower Name changes Rev 1.37 2004.02.03 2:12:14 PM czhower $I path change Rev 1.36 26/01/2004 01:51:14 CCostelloe Changed implementation of supressing BCC List generation Rev 1.35 25/01/2004 21:15:42 CCostelloe Added SuppressBCCListInHeader property for use by TIdSMTP Rev 1.34 1/21/2004 1:17:14 PM JPMugaas InitComponent Rev 1.33 1/19/04 11:36:02 AM RLebeau Updated GenerateHeader() to remove support for the BBCList property Rev 1.32 16/01/2004 17:30:18 CCostelloe Added support for BinHex4.0 encoding Rev 1.31 11/01/2004 19:53:20 CCostelloe Revisions for TIdMessage SaveToFile & LoadFromFile for D7 & D8 Rev 1.29 08/01/2004 23:43:40 CCostelloe LoadFromFile/SaveToFile now work in D7 again Rev 1.28 1/7/04 11:07:16 PM RLebeau Bug fix for various TIdMessage properties that were not previously using setter methods correctly. Rev 1.27 08/01/2004 00:30:26 CCostelloe Start of reimplementing LoadFrom/SaveToFile Rev 1.26 21/10/2003 23:04:32 CCostelloe Bug fix: removed AttachmentEncoding := '' in SetEncoding. Rev 1.25 21/10/2003 00:33:04 CCostelloe meMIME changed to meDefault in TIdMessage.Create Rev 1.24 10/17/2003 7:42:54 PM BGooijen Changed default Encoding to MIME Rev 1.23 10/17/2003 12:14:08 AM DSiders Added localization comments. Rev 1.22 2003.10.14 9:57:04 PM czhower Compile todos Rev 1.21 10/12/2003 1:55:46 PM BGooijen Removed IdStrings from uses Rev 1.20 2003.10.11 10:01:26 PM czhower .inc path Rev 1.19 10/10/2003 10:42:26 PM BGooijen DotNet Rev 1.18 9/10/2003 1:50:54 PM SGrobety DotNet Rev 1.17 10/8/2003 9:53:12 PM GGrieve use IdCharsets Rev 1.16 05/10/2003 16:38:50 CCostelloe Restructured MIME boundary output Rev 1.15 2003.10.02 9:27:50 PM czhower DotNet Excludes Rev 1.14 01/10/2003 17:58:52 HHariri More fixes for Multipart Messages and also fixes for incorrect transfer encoding settings Rev 1.12 9/28/03 1:36:04 PM RLebeau Updated GenerateHeader() to support the BBCList property Rev 1.11 26/09/2003 00:29:34 CCostelloe IdMessage.Encoding now set when email decoded; XXencoded emails now decoded; logic added to GenerateHeader Rev 1.10 04/09/2003 20:42:04 CCostelloe GenerateHeader sets From's Name field to Address field if Name blank; trailing spaces removed after boundary in FindBoundary; force generation of InReplyTo header. Rev 1.9 29/07/2003 01:14:30 CCostelloe In-Reply-To fixed in GenerateHeader Rev 1.8 11/07/2003 01:11:02 CCostelloe GenerateHeader changed from function to procedure, results now put in LastGeneratedHeaders. Better for user (can see headers sent) and code still efficient. Rev 1.7 10/07/2003 22:39:00 CCostelloe Added LastGeneratedHeaders field and modified GenerateHeaders so that a copy of the last set of headers generated for this message is maintained (see comments starting "CC") Rev 1.6 2003.06.23 9:46:54 AM czhower Russian, Ukranian support for headers. Rev 1.5 6/3/2003 10:46:54 PM JPMugaas In-Reply-To header now supported. Rev 1.4 1/27/2003 10:07:46 PM DSiders Corrected error setting file stream permissions in LoadFromFile. Bug Report 649502. Rev 1.3 27/1/2003 3:07:10 PM SGrobety X-Priority header only added if priority <> mpNormal (because of spam filters) Rev 1.2 09/12/2002 18:19:00 ANeillans Version: 1.2 Removed X-Library Line that was causing people problems with spam detection software , etc. Rev 1.1 12/5/2002 02:53:56 PM JPMugaas Updated for new API definitions. Rev 1.0 11/13/2002 07:56:52 AM JPMugaas 2004-05-04 Ciaran Costelloe - Replaced meUU with mePlainText. This also meant that UUE/XXE encoding was pushed down from the message-level to the MessagePart level, where it belongs. 2004-04-20 Ciaran Costelloe - Added support for multiple From addresses (per RFC 2822, section 3.6.2) by adding a FromList field. The previous From field now maps to FromList[0]. 2003-10-04 Ciaran Costelloe (see comments starting CC4) 2003-09-20 Ciaran Costelloe (see comments starting CC2) - Added meDefault, meXX to TIdMessageEncoding. Code now sets TIdMessage.Encoding when it decodes an email. Modified TIdMIMEBoundary to work as a straight stack, now Push/Pops ParentPart also. Added meDefault, meXX to TIdMessageEncoding. Moved logic from SendBody to GenerateHeader, added extra logic to avoid exceptions: Change any encodings we dont know to base64 We dont support attachments in an encoded body, change it to a supported combination Made changes to support ConvertPreamble and MIME message bodies with a ContentTransferEncoding of base64, quoted-printable. ProcessHeaders now decodes BCC list. 2003-09-02 Ciaran Costelloe - Added fix to FindBoundary suggested by Juergen Haible to remove trailing space after boundary added by some clients. 2003-07-10 Ciaran Costelloe - Added LastGeneratedHeaders property, see comments starting CC. Changed GenerateHeader from function to procedure, it now puts the generated headers into LastGeneratedHeaders, which is where dependant units should take the results from. This ensures that the headers that were generated are recorded, which some users' programs may need. 2002-12-09 Andrew Neillans - Removed X-Library line 2002-08-30 Andrew P.Rybin - Now InitializeISO is IdMessage method 2001-12-27 Andrew P.Rybin Custom InitializeISO, ExtractCharSet 2001-Oct-29 Don Siders Added EIdMessageCannotLoad exception. Added RSIdMessageCannotLoad constant. Added TIdMessage.LoadFromStream. Modified TIdMessage.LoadFromFile to call LoadFromStream. Added TIdMessage.SaveToStream. Modified TIdMessage.SaveToFile to call SaveToStream. Modified TIdMessage.GenerateHeader to include headers received but not used in properties. 2001-Sep-14 Andrew Neillans Added LoadFromFile Header only 2001-Sep-12 Johannes Berg Fixed upper/Sys.LowerCase in uses clause for Kylix 2001-Aug-09 Allen O'Neill Added line to check for valid charset value before adding second ';' after content-type boundry 2001-Aug-07 Allen O'Neill Added SaveToFile & LoadFromFile ... Doychin fixed 2001-Jul-11 Hadi Hariri Added Encoding for both MIME and UU. 2000-Jul-25 Hadi Hariri - Added support for MBCS 2000-Jun-10 Pete Mee - Fixed some minor but annoying bugs. 2000-May-06 Pete Mee - Added coder support directly into TIdMessage. } unit IdMessage; { 2001-Jul-11 Hadi Hariri TODO: Make checks for encoding and content-type later on. TODO: Add TIdHTML, TIdRelated TODO: CountParts on the fly TODO: Merge Encoding and AttachmentEncoding TODO: Make encoding plugable TODO: Clean up ISO header coding } { TODO : Moved Decode/Encode out and will add later,. Maybe TIdMessageEncode, Decode?? } { TODO : Support any header in TMessagePart } { DESIGN NOTE: The TIdMessage has an fBody which should only ever be the raw message. TIdMessage.fBody is only raw if TIdMessage.fIsEncoded = true The component parts are thus possibly made up of the following order of TMessagePart entries: MP[0] : Possible prologue text (fBoundary is '') MP[0 or 1 - depending on prologue existence] : fBoundary = boundary parameter from Content-Type MP[next...] : various parts with or without fBoundary = '' MP[MP.Count - 1] : Possible epilogue text (fBoundary is '') } { DESIGN NOTE: If TMessagePart.fIsEncoded = True, then TMessagePart.fBody is the encoded raw message part. Otherwise, it is the (decoded) text. } interface {$I IdCompilerDefines.inc} uses Classes, IdAttachment, IdBaseComponent, IdCoderHeader, IdEMailAddress, IdExceptionCore, IdHeaderList, IdMessageParts; type TIdMessagePriority = (mpHighest, mpHigh, mpNormal, mpLow, mpLowest); const ID_MSG_NODECODE = False; ID_MSG_USESNOWFORDATE = True; ID_MSG_PRIORITY = mpNormal; type TIdMIMEBoundary = class(TObject) protected FBoundaryList: TStrings; {CC: Added ParentPart as a TStrings so I dont have to create a TIntegers} FParentPartList: TStrings; function GetBoundary: string; function GetParentPart: integer; public constructor Create; destructor Destroy; override; procedure Push(ABoundary: string; AParentPart: integer); procedure Pop; procedure Clear; function Count: integer; property Boundary: string read GetBoundary; property ParentPart: integer read GetParentPart; end; TIdMessageFlags = ( mfAnswered, //Message has been answered. mfFlagged, //Message is "flagged" for urgent/special attention. mfDeleted, //Message is "deleted" for removal by later EXPUNGE. mfDraft, //Message has not completed composition (marked as a draft). mfSeen, //Message has been read. mfRecent ); //Message is "recently" arrived in this mailbox. TIdMessageFlagsSet = set of TIdMessageFlags; {WARNING: Replaced meUU with mePlainText in Indy 10 due to meUU being misleading. This is the MESSAGE-LEVEL "encoding", really the Sys.Format or layout of the message. When encoding, the user can let Indy decide on the encoding by leaving it at meDefault, or he can pick meMIME or mePlainText } //TIdMessageEncoding = (meDefault, meMIME, meUU, meXX); TIdMessageEncoding = (meDefault, meMIME, mePlainText); TIdInitializeIsoEvent = procedure (var VHeaderEncoding: Char; var VCharSet: string) of object; TIdMessage = class; TIdCreateAttachmentEvent = procedure(const AMsg: TIdMessage; const AHeaders: TStrings; var AAttachment: TIdAttachment) of object; TIdMessage = class(TIdBaseComponent) protected FAttachmentTempDirectory: string; FBccList: TIdEmailAddressList; FBody: TStrings; FCharSet: string; FCcList: TIdEmailAddressList; FContentType: string; FContentTransferEncoding: string; FContentDisposition: string; FDate: TDateTime; FIsEncoded : Boolean; FExtraHeaders: TIdHeaderList; FEncoding: TIdMessageEncoding; FFlags: TIdMessageFlagsSet; FFromList: TIdEmailAddressList; FHeaders: TIdHeaderList; FMessageParts: TIdMessageParts; FMIMEBoundary: TIdMIMEBoundary; FMsgId: string; FNewsGroups: TStrings; FNoEncode: Boolean; FNoDecode: Boolean; FOnInitializeISO: TIdInitializeISOEvent; FOrganization: string; FPriority: TIdMessagePriority; FSubject: string; FReceiptRecipient: TIdEmailAddressItem; FRecipients: TIdEmailAddressList; FReferences: string; FInReplyTo : String; FReplyTo: TIdEmailAddressList; FSender: TIdEMailAddressItem; FUID: String; FXProgram: string; FOnCreateAttachment: TIdCreateAttachmentEvent; FLastGeneratedHeaders: TIdHeaderList; FConvertPreamble: Boolean; FSavingToFile: Boolean; FIsMsgSinglePartMime: Boolean; FExceptionOnBlockedAttachments: Boolean; // used in TIdAttachmentFile // procedure DoInitializeISO(var VHeaderEncoding: Char; var VCharSet: String); virtual; function GetAttachmentEncoding: string; function GetInReplyTo: String; function GetUseNowForDate: Boolean; function GetFrom: TIdEmailAddressItem; procedure SetAttachmentEncoding(const AValue: string); procedure SetAttachmentTempDirectory(const Value: string); procedure SetBccList(const AValue: TIdEmailAddressList); procedure SetBody(const AValue: TStrings); procedure SetCCList(const AValue: TIdEmailAddressList); procedure SetContentType(const AValue: String); procedure SetEncoding(const AValue: TIdMessageEncoding); procedure SetExtraHeaders(const AValue: TIdHeaderList); procedure SetFrom(const AValue: TIdEmailAddressItem); procedure SetFromList(const AValue: TIdEmailAddressList); procedure SetHeaders(const AValue: TIdHeaderList); procedure SetInReplyTo(const AValue : String); procedure SetMsgID(const AValue : String); procedure SetNewsGroups(const AValue: TStrings); procedure SetReceiptRecipient(const AValue: TIdEmailAddressItem); procedure SetRecipients(const AValue: TIdEmailAddressList); procedure SetReplyTo(const AValue: TIdEmailAddressList); procedure SetSender(const AValue: TIdEmailAddressItem); procedure SetUseNowForDate(const AValue: Boolean); procedure InitComponent; override; public destructor Destroy; override; procedure AddHeader(const AValue: string); procedure Clear; virtual; procedure ClearBody; procedure ClearHeader; procedure GenerateHeader; virtual; procedure InitializeISO(var VHeaderEncoding: Char; var VCharSet: String); function IsBodyEncodingRequired: Boolean; function IsBodyEmpty: Boolean; procedure LoadFromFile(const AFileName: string; const AHeadersOnly: Boolean = False); procedure LoadFromStream(AStream: TStream; const AHeadersOnly: Boolean = False); procedure ProcessHeaders; virtual; procedure SaveToFile(const AFileName : string; const AHeadersOnly: Boolean = False); procedure SaveToStream(AStream: TStream; const AHeadersOnly: Boolean = False); procedure DoCreateAttachment(const AHeaders: TStrings; var VAttachment: TIdAttachment); virtual; // property Flags: TIdMessageFlagsSet read FFlags write FFlags; property IsEncoded : Boolean read FIsEncoded write FIsEncoded; property MsgId: string read FMsgId write SetMsgID; property Headers: TIdHeaderList read FHeaders write SetHeaders; property MessageParts: TIdMessageParts read FMessageParts; property MIMEBoundary: TIdMIMEBoundary read FMIMEBoundary; property UID: String read FUID write FUID; property IsMsgSinglePartMime: Boolean read FIsMsgSinglePartMime write FIsMsgSinglePartMime; published //TODO: Make a property editor which drops down the registered coder types property AttachmentEncoding: string read GetAttachmentEncoding write SetAttachmentEncoding; property Body: TStrings read FBody write SetBody; property BccList: TIdEmailAddressList read FBccList write SetBccList; property CharSet: string read FCharSet write FCharSet; property CCList: TIdEmailAddressList read FCcList write SetCcList; property ContentType: string read FContentType write SetContentType; property ContentTransferEncoding: string read FContentTransferEncoding write FContentTransferEncoding; property ContentDisposition: string read FContentDisposition write FContentDisposition; property Date: TDateTime read FDate write FDate; // property Encoding: TIdMessageEncoding read FEncoding write SetEncoding; property ExtraHeaders: TIdHeaderList read FExtraHeaders write SetExtraHeaders; property FromList: TIdEmailAddressList read FFromList write SetFromList; property From: TIdEmailAddressItem read GetFrom write SetFrom; property NewsGroups: TStrings read FNewsGroups write SetNewsGroups; property NoEncode: Boolean read FNoEncode write FNoEncode default ID_MSG_NODECODE; property NoDecode: Boolean read FNoDecode write FNoDecode default ID_MSG_NODECODE; property Organization: string read FOrganization write FOrganization; property Priority: TIdMessagePriority read FPriority write FPriority default ID_MSG_PRIORITY; property ReceiptRecipient: TIdEmailAddressItem read FReceiptRecipient write SetReceiptRecipient; property Recipients: TIdEmailAddressList read FRecipients write SetRecipients; property References: string read FReferences write FReferences; property InReplyTo : String read GetInReplyTo write SetInReplyTo; property ReplyTo: TIdEmailAddressList read FReplyTo write SetReplyTo; property Subject: string read FSubject write FSubject; property Sender: TIdEmailAddressItem read FSender write SetSender; property UseNowForDate: Boolean read GetUseNowForDate write SetUseNowForDate default ID_MSG_USESNOWFORDATE; property LastGeneratedHeaders: TIdHeaderList read FLastGeneratedHeaders; property ConvertPreamble: Boolean read FConvertPreamble write FConvertPreamble; property ExceptionOnBlockedAttachments: Boolean read FExceptionOnBlockedAttachments write FExceptionOnBlockedAttachments default False; property AttachmentTempDirectory: string read FAttachmentTempDirectory write SetAttachmentTempDirectory; // Events property OnInitializeISO: TIdInitializeIsoEvent read FOnInitializeISO write FOnInitializeISO; property OnCreateAttachment: TIdCreateAttachmentEvent read FOnCreateAttachment write FOnCreateAttachment; End; TIdMessageEvent = procedure(ASender : TComponent; var AMsg : TIdMessage) of object; EIdTextInvalidCount = class(EIdMessageException); // 2001-Oct-29 Don Siders EIdMessageCannotLoad = class(EIdMessageException); const MessageFlags : array [mfAnswered..mfRecent] of String = ( '\Answered', {Do not Localize} //Message has been answered. '\Flagged', {Do not Localize} //Message is "flagged" for urgent/special attention. '\Deleted', {Do not Localize} //Message is "deleted" for removal by later EXPUNGE. '\Draft', {Do not Localize} //Message has not completed composition (marked as a draft). '\Seen', {Do not Localize} //Message has been read. '\Recent' ); {Do not Localize} //Message is "recently" arrived in this mailbox. INREPLYTO = 'In-Reply-To'; {Do not localize} implementation uses //facilitate inlining only. {$IFDEF DOTNET} {$IFDEF USE_INLINE} System.IO, {$ENDIF} {$ENDIF} IdIOHandlerStream, IdGlobal, IdMessageCoderMIME, // Here so the 'MIME' in create will always suceed IdCharSets, IdGlobalProtocols, IdMessageCoder, IdResourceStringsProtocols, IdMessageClient, IdAttachmentFile, IdText, SysUtils; const cPriorityStrs: array[TIdMessagePriority] of string = ('urgent', 'urgent', 'normal', 'non-urgent', 'non-urgent'); cImportanceStrs: array[TIdMessagePriority] of string = ('high', 'high', 'normal', 'low', 'low'); { TIdMIMEBoundary } procedure TIdMIMEBoundary.Clear; begin FBoundaryList.Clear; FParentPartList.Clear; end; function TIdMIMEBoundary.Count: integer; begin Result := FBoundaryList.Count; end; constructor TIdMIMEBoundary.Create; begin inherited; FBoundaryList := TStringList.Create; FParentPartList := TStringList.Create; end; destructor TIdMIMEBoundary.Destroy; begin FreeAndNil(FBoundaryList); FreeAndNil(FParentPartList); inherited; end; function TIdMIMEBoundary.GetBoundary: string; begin if FBoundaryList.Count > 0 then begin Result := FBoundaryList.Strings[0]; end else begin Result := ''; end; end; function TIdMIMEBoundary.GetParentPart: integer; begin if FParentPartList.Count > 0 then begin Result := IndyStrToInt(FParentPartList.Strings[0]); end else begin Result := -1; end; end; procedure TIdMIMEBoundary.Pop; begin if FBoundaryList.Count > 0 then begin FBoundaryList.Delete(0); end; if FParentPartList.Count > 0 then begin FParentPartList.Delete(0); end; end; procedure TIdMIMEBoundary.Push(ABoundary: string; AParentPart: integer); begin {CC: Changed implementation to a simple stack} FBoundaryList.Insert(0, ABoundary); FParentPartList.Insert(0, IntToStr(AParentPart)); end; { TIdMessage } procedure TIdMessage.AddHeader(const AValue: string); begin FHeaders.Add(AValue); end; procedure TIdMessage.Clear; begin ClearHeader; ClearBody; end; procedure TIdMessage.ClearBody; begin MessageParts.Clear; Body.Clear; end; procedure TIdMessage.ClearHeader; begin CcList.Clear; BccList.Clear; Date := 0; FromList.Clear; NewsGroups.Clear; Organization := ''; References := ''; ReplyTo.Clear; Subject := ''; Recipients.Clear; Priority := ID_MSG_PRIORITY; ReceiptRecipient.Text := ''; FContentType := ''; FCharSet := ''; ContentTransferEncoding := ''; ContentDisposition := ''; FSender.Text := ''; Headers.Clear; ExtraHeaders.Clear; FMIMEBoundary.Clear; // UseNowForDate := ID_MSG_USENOWFORDATE; Flags := []; MsgId := ''; UID := ''; FLastGeneratedHeaders.Clear; FEncoding := meDefault; {CC3: Changed initial encoding from meMIME to meDefault} FConvertPreamble := True; {By default, in MIME, we convert the preamble text to the 1st TIdText part} FSavingToFile := False; {Only set True by SaveToFile} FIsMsgSinglePartMime := False; end; procedure TIdMessage.InitComponent; begin inherited; FBody := TStringList.Create; TStringList(FBody).Duplicates := dupAccept; FRecipients := TIdEmailAddressList.Create(Self); FBccList := TIdEmailAddressList.Create(Self); FCcList := TIdEmailAddressList.Create(Self); FMessageParts := TIdMessageParts.Create(Self); FNewsGroups := TStringList.Create; FHeaders := TIdHeaderList.Create(QuoteRFC822); FFromList := TIdEmailAddressList.Create(Self); FReplyTo := TIdEmailAddressList.Create(Self); FSender := TIdEmailAddressItem.Create; FExtraHeaders := TIdHeaderList.Create(QuoteRFC822); FReceiptRecipient := TIdEmailAddressItem.Create; NoDecode := ID_MSG_NODECODE; FMIMEBoundary := TIdMIMEBoundary.Create; FLastGeneratedHeaders := TIdHeaderList.Create(QuoteRFC822); Clear; FEncoding := meDefault; end; destructor TIdMessage.Destroy; begin FreeAndNil(FBody); FreeAndNil(FRecipients); FreeAndNil(FBccList); FreeAndNil(FCcList); FreeAndNil(FMessageParts); FreeAndNil(FNewsGroups); FreeAndNil(FHeaders); FreeAndNil(FExtraHeaders); FreeAndNil(FFromList); FreeAndNil(FReplyTo); FreeAndNil(FSender); FreeAndNil(FReceiptRecipient); FreeAndNil(FMIMEBoundary); FreeAndNil(FLastGeneratedHeaders); inherited Destroy; end; function TIdMessage.IsBodyEmpty: Boolean; //Determine if there really is anything in the body var LN: integer; LOrd: integer; begin Result := False; for LN := 1 to Length(Body.Text) do begin LOrd := Ord(Body.Text[LN]); if ((LOrd <> 13) and (LOrd <> 10) and (LOrd <> 9) and (LOrd <> 32)) then begin Exit; end; end; Result := True; end; procedure TIdMessage.GenerateHeader; var ISOCharset: string; HeaderEncoding: Char; LN: Integer; LEncoding, LCharSet, LMIMEBoundary: string; LDate: TDateTime; LReceiptRecipient: string; begin MessageParts.CountParts; {CC2: If the encoding is meDefault, the user wants us to pick an encoding mechanism:} if Encoding = meDefault then begin if MessageParts.Count = 0 then begin {If there are no attachments, we want the simplest type, just the headers followed by the message body: mePlainText does this for us} Encoding := mePlainText; end else begin {If there are any attachments, default to MIME...} Encoding := meMIME; end; end; for LN := 0 to MessageParts.Count-1 do begin {Change any encodings we don't know to base64 for MIME and UUE for PlainText...} LEncoding := ExtractHeaderItem(MessageParts[LN].ContentTransfer); if LEncoding <> '' then begin if Encoding = meMIME then begin if PosInStrArray(LEncoding, ['7bit', '8bit', 'binary', 'base64', 'quoted-printable', 'binhex40'], False) = -1 then begin {do not localize} MessageParts[LN].ContentTransfer := 'base64'; {do not localize} end; end else if PosInStrArray(LEncoding, ['UUE', 'XXE'], False) = -1 then begin {do not localize} //mePlainText MessageParts[LN].ContentTransfer := 'UUE'; {do not localize} end; end; end; {RLebeau: should we validate the TIdMessage.ContentTransferEncoding property as well?} {CC2: We dont support attachments in an encoded body. Change it to a supported combination...} if MessageParts.Count > 0 then begin if (ContentTransferEncoding <> '') and (not IsHeaderValue(ContentTransferEncoding, ['7bit', '8bit', 'binary'])) then begin {do not localize} ContentTransferEncoding := ''; end; end; if Encoding = meMIME then begin //HH: Generate Boundary here so we know it in the headers and body //######### SET UP THE BOUNDARY STACK ######## //RLebeau: Moved this logic up from SendBody to here, where it fits better... MIMEBoundary.Clear; LMIMEBoundary := TIdMIMEBoundaryStrings.GenerateBoundary; MIMEBoundary.Push(LMIMEBoundary, -1); //-1 is "top level" //CC: Moved this logic up from SendBody to here, where it fits better... if Length(ContentType) = 0 then begin //User has omitted ContentType. We have to guess here, it is impossible //to determine without having procesed the parts. //See if it is multipart/alternative... if MessageParts.TextPartCount > 1 then begin if MessageParts.AttachmentCount > 0 then begin ContentType := 'multipart/mixed'; {do not localize} end else begin ContentType := 'multipart/alternative'; {do not localize} end; end else begin //Just one (or 0?) text part. if MessageParts.AttachmentCount > 0 then begin ContentType := 'multipart/mixed'; {do not localize} end else begin ContentType := 'text/plain'; {do not localize} end; end; end; TIdMessageEncoderInfo(MessageParts.MessageEncoderInfo).InitializeHeaders(Self); end; InitializeISO(HeaderEncoding, ISOCharSet); FLastGeneratedHeaders.Assign(FHeaders); FIsMsgSinglePartMime := (Encoding = meMIME) and (MessageParts.Count = 1) and IsBodyEmpty; // TODO: when STRING_IS_ANSI is defined, provide a way for the user to specify the AnsiString encoding for header values... {CC: If From has no Name field, use the Address field as the Name field by setting last param to True (for SA)...} FLastGeneratedHeaders.Values['From'] := EncodeAddress(FromList, HeaderEncoding, ISOCharSet, True); {do not localize} FLastGeneratedHeaders.Values['Subject'] := EncodeHeader(Subject, '', HeaderEncoding, ISOCharSet); {do not localize} FLastGeneratedHeaders.Values['To'] := EncodeAddress(Recipients, HeaderEncoding, ISOCharSet); {do not localize} FLastGeneratedHeaders.Values['Cc'] := EncodeAddress(CCList, HeaderEncoding, ISOCharSet); {do not localize} {CC: SaveToFile sets FSavingToFile to True so that BCC names are saved when saving to file and omitted otherwise (as required by SMTP)...} if not FSavingToFile then begin FLastGeneratedHeaders.Values['Bcc'] := ''; {do not localize} end else begin FLastGeneratedHeaders.Values['Bcc'] := EncodeAddress(BCCList, HeaderEncoding, ISOCharSet); {do not localize} end; FLastGeneratedHeaders.Values['Newsgroups'] := NewsGroups.CommaText; {do not localize} if Encoding = meMIME then begin if IsMsgSinglePartMime then begin {This is a single-part MIME: the part may be a text part or an attachment. The relevant headers need to be taken from MessageParts[0]. The problem, however, is that we have not yet processed MessageParts[0] yet, so we do not have its properties or header content properly set up. So we will let the processing of MessageParts[0] append its headers to the message headers, i.e. DON'T generate Content-Type or Content-Transfer-Encoding headers here.} FLastGeneratedHeaders.Values['MIME-Version'] := '1.0'; {do not localize} {RLebeau: need to wipe out the following headers if they were present, otherwise MessageParts[0] will duplicate them instead of replacing them. This is because LastGeneratedHeaders is sent before MessageParts[0] is processed.} FLastGeneratedHeaders.Values['Content-Type'] := ''; FLastGeneratedHeaders.Values['Content-Transfer-Encoding'] := ''; FLastGeneratedHeaders.Values['Content-Disposition'] := ''; end else begin if FContentType <> '' then begin LCharSet := FCharSet; if (LCharSet = '') and IsHeaderMediaType(FContentType, 'text') then begin {do not localize} LCharSet := 'us-ascii'; {do not localize} end; FLastGeneratedHeaders.Values['Content-Type'] := FContentType; {do not localize} FLastGeneratedHeaders.Params['Content-Type', 'charset'] := LCharSet; {do not localize} if (MessageParts.Count > 0) and (LMIMEBoundary <> '') then begin FLastGeneratedHeaders.Params['Content-Type', 'boundary'] := LMIMEBoundary; {do not localize} end; end; {CC2: We may have MIME with no parts if ConvertPreamble is True} FLastGeneratedHeaders.Values['MIME-Version'] := '1.0'; {do not localize} FLastGeneratedHeaders.Values['Content-Transfer-Encoding'] := ContentTransferEncoding; {do not localize} end; end else begin //CC: non-MIME can have ContentTransferEncoding of base64, quoted-printable... LCharSet := FCharSet; if (LCharSet = '') and IsHeaderMediaType(FContentType, 'text') then begin {do not localize} LCharSet := 'us-ascii'; {do not localize} end; FLastGeneratedHeaders.Values['Content-Type'] := FContentType; {do not localize} FLastGeneratedHeaders.Params['Content-Type', 'charset'] := LCharSet; {do not localize} FLastGeneratedHeaders.Values['Content-Transfer-Encoding'] := ContentTransferEncoding; {do not localize} end; FLastGeneratedHeaders.Values['Sender'] := EncodeAddressItem(Sender, HeaderEncoding, ISOCharSet); {do not localize} FLastGeneratedHeaders.Values['Reply-To'] := EncodeAddress(ReplyTo, HeaderEncoding, ISOCharSet); {do not localize} FLastGeneratedHeaders.Values['Organization'] := EncodeHeader(Organization, '', HeaderEncoding, ISOCharSet); {do not localize} LReceiptRecipient := EncodeAddressItem(ReceiptRecipient, HeaderEncoding, ISOCharSet); FLastGeneratedHeaders.Values['Disposition-Notification-To'] := LReceiptRecipient; {do not localize} FLastGeneratedHeaders.Values['Return-Receipt-To'] := LReceiptRecipient; {do not localize} FLastGeneratedHeaders.Values['References'] := References; {do not localize} if UseNowForDate then begin LDate := Now; end else begin LDate := Self.Date; end; FLastGeneratedHeaders.Values['Date'] := LocalDateTimeToGMT(LDate); {do not localize} // S.G. 27/1/2003: Only issue X-Priority header if priority <> mpNormal (for stoopid spam filters) // RLebeau 2/2/2014: add a new Importance property if Priority <> mpNormal then begin FLastGeneratedHeaders.Values['Priority'] := cPriorityStrs[Priority]; {do not localize} FLastGeneratedHeaders.Values['X-Priority'] := IntToStr(Ord(Priority) + 1); {do not localize} FLastGeneratedHeaders.Values['Importance'] := cImportanceStrs[Priority]; {do not localize} end else begin FLastGeneratedHeaders.Values['Priority'] := ''; {do not localize} FLastGeneratedHeaders.Values['X-Priority'] := ''; {do not localize} FLastGeneratedHeaders.Values['Importance'] := ''; {do not localize} end; FLastGeneratedHeaders.Values['Message-ID'] := MsgId; // RLebeau 9/12/2016: no longer auto-generating In-Reply-To based on // Message-ID. Many email servers will reject an outgoing email that // does not have a client-assigned Message-ID, and this method does not // know whether this email is a new message or a response to another // email when generating headers. If the calling app wants to send // In-Reply-To, it will just have to populate that header like any other. FLastGeneratedHeaders.Values['In-Reply-To'] := InReplyTo; {do not localize} // Add extra headers created by UA - allows duplicates if (FExtraHeaders.Count > 0) then begin FLastGeneratedHeaders.AddStrings(FExtraHeaders); end; {TODO: Generate Message-ID if at all possible to pacify SA. Do this after FExtraHeaders added in case there is a message-ID present as an extra header.} { if FLastGeneratedHeaders.Values['Message-ID'] = '' then begin //do not localize FLastGeneratedHeaders.Values['Message-ID'] := '<' + IntToStr(Abs( CurrentProcessId )) + '.' + IntToStr(Abs( GetClockValue )) + '@' + GStack.HostName + '>'; //do not localize end; } end; procedure TIdMessage.ProcessHeaders; var LBoundary: string; LMIMEVersion: string; // Some mailers send priority as text, number or combination of both function GetMsgPriority(APriority: string): TIdMessagePriority; var s: string; Num: integer; begin APriority := LowerCase(APriority); // TODO: use PostInStrArray() instead of IndyPos() // This is for Pegasus / X-MSMail-Priority / Importance headers if (IndyPos('non-urgent', APriority) <> 0) or {do not localize} (IndyPos('low', APriority) <> 0) then {do not localize} begin Result := mpLowest; // Although a matter of choice, IMO mpLowest is better choice than mpLow, // various examples on the net also use 1 as urgent and 5 as non-urgent end else if (IndyPos('urgent', APriority) <> 0) or {do not localize} (IndyPos('high', APriority) <> 0) then {do not localize} begin Result := mpHighest; // Although a matter of choice, IMO mpHighest is better choice than mpHigh, // various examples on the net also use 1 as urgent and 5 as non-urgent end else begin s := Trim(APriority); Num := IndyStrToInt(Fetch(s, ' '), 3); {do not localize} if (Num < 1) or (Num > 5) then begin Num := 3; end; Result := TIdMessagePriority(Num - 1); end; end; begin // RLebeau: per RFC 2045 Section 5.2: // // Default RFC 822 messages without a MIME Content-Type header are taken // by this protocol to be plain text in the US-ASCII character set, // which can be explicitly specified as: // // Content-type: text/plain; charset=us-ascii // // This default is assumed if no Content-Type header field is specified. // It is also recommend that this default be assumed when a // syntactically invalid Content-Type header field is encountered. In // the presence of a MIME-Version header field and the absence of any // Content-Type header field, a receiving User Agent can also assume // that plain US-ASCII text was the sender's intent. Plain US-ASCII // text may still be assumed in the absence of a MIME-Version or the // presence of an syntactically invalid Content-Type header field, but // the sender's intent might have been otherwise. FContentType := Headers.Values['Content-Type']; {do not localize} if FContentType = '' then begin FContentType := 'text/plain'; {do not localize} FCharSet := 'us-ascii'; {do not localize} end else begin FContentType := RemoveHeaderEntry(FContentType, 'charset', FCharSet, QuoteMIME); {do not localize} if (FCharSet = '') and IsHeaderMediaType(FContentType, 'text') then begin {do not localize} FCharSet := 'us-ascii'; {do not localize} end; end; ContentTransferEncoding := Headers.Values['Content-Transfer-Encoding']; {do not localize} ContentDisposition := Headers.Values['Content-Disposition']; {do not localize} Subject := DecodeHeader(Headers.Values['Subject']); {do not localize} DecodeAddresses(Headers.Values['From'], FromList); {do not localize} MsgId := Headers.Values['Message-Id']; {do not localize} CommaSeparatedToStringList(Newsgroups, Headers.Values['Newsgroups']); {do not localize} DecodeAddresses(Headers.Values['To'], Recipients); {do not localize} DecodeAddresses(Headers.Values['Cc'], CCList); {do not localize} {CC2: Added support for BCCList...} DecodeAddresses(Headers.Values['Bcc'], BCCList); {do not localize} Organization := Headers.Values['Organization']; {do not localize} InReplyTo := Headers.Values['In-Reply-To']; {do not localize} ReceiptRecipient.Text := Headers.Values['Disposition-Notification-To']; {do not localize} if Length(ReceiptRecipient.Text) = 0 then begin ReceiptRecipient.Text := Headers.Values['Return-Receipt-To']; {do not localize} end; References := Headers.Values['References']; {do not localize} DecodeAddresses(Headers.Values['Reply-To'], ReplyTo); {do not localize} Date := GMTToLocalDateTime(Headers.Values['Date']); {do not localize} Sender.Text := Headers.Values['Sender']; {do not localize} // RLebeau 2/2/2014: add a new Importance property if Length(Headers.Values['X-Priority']) > 0 then begin {do not localize} // Examine X-Priority first - to get better resolution if possible and because it is the most common Priority := GetMsgPriority(Headers.Values['X-Priority']); {do not localize} end else if Length(Headers.Values['Priority']) > 0 then begin {do not localize} // Which header should be here is matter of a bit of research, it might be that Importance might be checked first Priority := GetMsgPriority(Headers.Values['Priority']) {do not localize} end else if Length(Headers.Values['Importance']) > 0 then begin {do not localize} // Check Importance or Priority Priority := GetMsgPriority(Headers.Values['Importance']) {do not localize} end else if Length(Headers.Values['X-MSMail-Priority']) > 0 then begin {do not localize} // This is the least common header (or at least should be) so can be checked last Priority := GetMsgPriority(Headers.Values['X-MSMail-Priority']) {do not localize} end else begin Priority := mpNormal; end; {Note that the following code ensures MIMEBoundary.Count is 0 for single-part MIME messages...} FContentType := RemoveHeaderEntry(FContentType, 'boundary', LBoundary, QuoteMIME); {do not localize} if LBoundary <> '' then begin MIMEBoundary.Push(LBoundary, -1); end; {CC2: Set MESSAGE_LEVEL "encoding" (really the format or layout)} LMIMEVersion := Headers.Values['MIME-Version']; {do not localize} if LMIMEVersion = '' then begin Encoding := mePlainText; end else begin // TODO: this should be true if a MIME boundary is present. // The MIME version is optional... Encoding := meMIME; end; end; procedure TIdMessage.SetBccList(const AValue: TIdEmailAddressList); begin FBccList.Assign(AValue); end; procedure TIdMessage.SetBody(const AValue: TStrings); begin FBody.Assign(AValue); end; procedure TIdMessage.SetCCList(const AValue: TIdEmailAddressList); begin FCcList.Assign(AValue); end; procedure TIdMessage.SetContentType(const AValue: String); var LCharSet: String; begin // RLebeau: per RFC 2045 Section 5.2: // // Default RFC 822 messages without a MIME Content-Type header are taken // by this protocol to be plain text in the US-ASCII character set, // which can be explicitly specified as: // // Content-type: text/plain; charset=us-ascii // // This default is assumed if no Content-Type header field is specified. // It is also recommend that this default be assumed when a // syntactically invalid Content-Type header field is encountered. In // the presence of a MIME-Version header field and the absence of any // Content-Type header field, a receiving User Agent can also assume // that plain US-ASCII text was the sender's intent. Plain US-ASCII // text may still be assumed in the absence of a MIME-Version or the // presence of an syntactically invalid Content-Type header field, but // the sender's intent might have been otherwise. if AValue <> '' then begin FContentType := RemoveHeaderEntry(AValue, 'charset', LCharSet, QuoteMIME); {do not localize} {RLebeau: the ContentType property is streamed after the CharSet property, so do not overwrite it during streaming} if csReading in ComponentState then begin Exit; end; if (LCharSet = '') and (FCharSet = '') and IsHeaderMediaType(FContentType, 'text') then begin {do not localize} LCharSet := 'us-ascii'; {do not localize} end; {RLebeau: override the current CharSet only if the header specifies a new value} if LCharSet <> '' then begin FCharSet := LCharSet; end; end else begin FContentType := 'text/plain'; {do not localize} {RLebeau: the ContentType property is streamed after the CharSet property, so do not overwrite it during streaming} if not (csReading in ComponentState) then begin FCharSet := 'us-ascii'; {do not localize} end; end; end; procedure TIdMessage.SetExtraHeaders(const AValue: TIdHeaderList); begin FExtraHeaders.Assign(AValue); end; procedure TIdMessage.SetFrom(const AValue: TIdEmailAddressItem); begin GetFrom.Assign(AValue); end; function TIdMessage.GetFrom: TIdEmailAddressItem; begin if FFromList.Count = 0 then begin FFromList.Add; end; Result := FFromList[0]; end; procedure TIdMessage.SetFromList(const AValue: TIdEmailAddressList); begin FFromList.Assign(AValue); end; procedure TIdMessage.SetHeaders(const AValue: TIdHeaderList); begin FHeaders.Assign(AValue); end; procedure TIdMessage.SetNewsGroups(const AValue: TStrings); begin FNewsgroups.Assign(AValue); end; procedure TIdMessage.SetReceiptRecipient(const AValue: TIdEmailAddressItem); begin FReceiptRecipient.Assign(AValue); end; procedure TIdMessage.SetRecipients(const AValue: TIdEmailAddressList); begin FRecipients.Assign(AValue); end; procedure TIdMessage.SetReplyTo(const AValue: TIdEmailAddressList); begin FReplyTo.Assign(AValue); end; procedure TIdMessage.SetSender(const AValue: TIdEmailAddressItem); begin FSender.Assign(AValue); end; function TIdMessage.GetUseNowForDate: Boolean; begin Result := (FDate = 0); end; procedure TIdMessage.SetUseNowForDate(const AValue: Boolean); begin if GetUseNowForDate <> AValue then begin if AValue then begin FDate := 0; end else begin FDate := Now; end; end; end; procedure TIdMessage.SetAttachmentEncoding(const AValue: string); begin MessageParts.AttachmentEncoding := AValue; end; function TIdMessage.GetAttachmentEncoding: string; begin Result := MessageParts.AttachmentEncoding; end; procedure TIdMessage.SetEncoding(const AValue: TIdMessageEncoding); begin FEncoding := AValue; if AValue = meMIME then begin AttachmentEncoding := 'MIME'; {do not localize} end else begin //Default to UUE for mePlainText, user can override to XXE by calling //TIdMessage.AttachmentEncoding := 'XXE'; AttachmentEncoding := 'UUE'; {do not localize} end; end; procedure TIdMessage.LoadFromFile(const AFileName: string; const AHeadersOnly: Boolean = False); var LStream: TIdReadFileExclusiveStream; begin if not FileExists(AFilename) then begin raise EIdMessageCannotLoad.CreateFmt(RSIdMessageCannotLoad, [AFilename]); end; LStream := TIdReadFileExclusiveStream.Create(AFilename); try LoadFromStream(LStream, AHeadersOnly); finally FreeAndNil(LStream); end; end; procedure TIdMessage.LoadFromStream(AStream: TStream; const AHeadersOnly: Boolean = False); var LMsgClient: TIdMessageClient; begin // clear message properties, headers before loading Clear; LMsgClient := TIdMessageClient.Create; try LMsgClient.ProcessMessage(Self, AStream, AHeadersOnly); finally LMsgClient.Free; end; end; procedure TIdMessage.SaveToFile(const AFileName: string; const AHeadersOnly: Boolean = False); var LStream : TFileStream; begin LStream := TIdFileCreateStream.Create(AFileName); try FSavingToFile := True; try SaveToStream(LStream, AHeadersOnly); finally FSavingToFile := False; end; finally FreeAndNil(LStream); end; end; procedure TIdMessage.SaveToStream(AStream: TStream; const AHeadersOnly: Boolean = False); var LMsgClient: TIdMessageClient; LIOHandler: TIdIOHandlerStream; begin LMsgClient := TIdMessageClient.Create(nil); try LIOHandler := TIdIOHandlerStream.Create(nil, nil, AStream); try LIOHandler.FreeStreams := False; LMsgClient.IOHandler := LIOHandler; LMsgClient.SendMsg(Self, AHeadersOnly); // add the end of message marker when body is included if not AHeadersOnly then begin LMsgClient.IOHandler.WriteLn('.'); {do not localize} end; finally FreeAndNil(LIOHandler); end; finally FreeAndNil(LMsgClient); end; end; procedure TIdMessage.DoInitializeISO(var VHeaderEncoding: Char; var VCharSet: string); begin if Assigned(FOnInitializeISO) then begin FOnInitializeISO(VHeaderEncoding, VCharSet);//APR end; end; procedure TIdMessage.InitializeISO(var VHeaderEncoding: Char; var VCharSet: String); var LDefCharset: TIdCharSet; begin // it's not clear when FHeaderEncoding should be Q not B. // Comments welcome on atozedsoftware.indy.general LDefCharset := IdGetDefaultCharSet; case LDefCharset of idcs_ISO_8859_1: begin VHeaderEncoding := 'Q'; { quoted-printable } {Do not Localize} VCharSet := IdCharsetNames[LDefCharset]; end; idcs_UNICODE_1_1: begin VHeaderEncoding := 'B'; { base64 } {Do not Localize} VCharSet := IdCharsetNames[idcs_UTF_8]; end; else begin VHeaderEncoding := 'B'; { base64 } {Do not Localize} VCharSet := IdCharsetNames[LDefCharset]; end; end; DoInitializeISO(VHeaderEncoding, VCharSet); end; procedure TIdMessage.DoCreateAttachment(const AHeaders: TStrings; var VAttachment: TIdAttachment); begin VAttachment := nil; if Assigned(FOnCreateAttachment) then begin FOnCreateAttachment(Self, AHeaders, VAttachment); end; if VAttachment = nil then begin VAttachment := TIdAttachmentFile.Create(MessageParts); end; end; function TIdMessage.IsBodyEncodingRequired: Boolean; var i,j: Integer; S: String; begin Result := False;//7bit for i:= 0 to FBody.Count - 1 do begin S := FBody[i]; for j := 1 to Length(S) do begin if S[j] > #127 then begin Result := True; Exit; end; end; end; end;// function TIdMessage.GetInReplyTo: String; begin Result := EnsureMsgIDBrackets(FInReplyTo); end; procedure TIdMessage.SetInReplyTo(const AValue: String); begin FInReplyTo := EnsureMsgIDBrackets(AValue); end; // TODO: add this? { procedure TIdMessage.GetMsgID: String; begin Result := EnsureMsgIDBrackets(FMsgId); end; } procedure TIdMessage.SetMsgID(const AValue: String); begin FMsgId := EnsureMsgIDBrackets(AValue); end; procedure TIdMessage.SetAttachmentTempDirectory(const Value: string); begin if Value <> AttachmentTempDirectory then begin FAttachmentTempDirectory := IndyExcludeTrailingPathDelimiter(Value); end; end; end.
35.712278
177
0.731976
f1ad56d63bc614fc8f61f348eefb196fd9df00c9
418
pas
Pascal
CAT/tests/001. arithmetic/int/shl/shl_1.pas
SkliarOleksandr/NextPascal
4dc26abba6613f64c0e6b5864b3348711eb9617a
[ "Apache-2.0" ]
19
2018-10-22T23:45:31.000Z
2021-05-16T00:06:49.000Z
CAT/tests/001. arithmetic/int/shl/shl_1.pas
SkliarOleksandr/NextPascal
4dc26abba6613f64c0e6b5864b3348711eb9617a
[ "Apache-2.0" ]
1
2019-06-01T06:17:08.000Z
2019-12-28T10:27:42.000Z
CAT/tests/001. arithmetic/int/shl/shl_1.pas
SkliarOleksandr/NextPascal
4dc26abba6613f64c0e6b5864b3348711eb9617a
[ "Apache-2.0" ]
6
2018-08-30T05:16:21.000Z
2021-05-12T20:25:43.000Z
unit shl_1; interface implementation var i8: Int8; i16: Int16; i32: Int32; i64: Int64; procedure Init; begin i8 := 9; i16 := 9; i32 := 9; i64 := 9; end; procedure Test; begin i8 := i8 shl 1; i16 := i16 shl 1; i32 := i32 shl 1; i64 := i64 shl 1; end; initialization Init(); Test(); finalization Assert(i8 = 18); Assert(i16 = 18); Assert(i32 = 18); Assert(i64 = 18); end.
11
25
0.574163
f1759ff5c97bab80a985975b10b78aa01f8e213a
178
pas
Pascal
Test/Memory/obj_selfref.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
1
2022-02-18T22:14:44.000Z
2022-02-18T22:14:44.000Z
Test/Memory/obj_selfref.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
Test/Memory/obj_selfref.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
type TMyObj = class Field : TMyObj; end; var o1, o2, o3 : TMyObj; o1:=TMyObj.Create; o2:=TMyObj.Create; o2.Field:=o2; o3:=TMyObj.Create; o3.Field:=TMyObj.Create;
11.866667
24
0.640449
f10fd4d9d02d51e07a0f71955994ca7c37f5596e
1,572
pas
Pascal
references/mORMot/SQLite3/Samples/ThirdPartyDemos/KroKodil/src/delphi/FileCollect.pas
juliomar/alcinoe
4e59270f6a9258beed02676c698829e83e636b51
[ "Apache-2.0" ]
851
2018-02-05T09:54:56.000Z
2022-03-24T23:13:10.000Z
references/mORMot/SQLite3/Samples/ThirdPartyDemos/KroKodil/src/delphi/FileCollect.pas
jonahzheng/alcinoe
be21f1d6b9e22aa3d75faed4027097c1f444ee6f
[ "Apache-2.0" ]
200
2018-02-06T18:52:39.000Z
2022-03-24T19:59:14.000Z
contrib/mORMot/SQLite3/Samples/ThirdPartyDemos/KroKodil/src/delphi/FileCollect.pas
Razor12911/bms2xtool
0493cf895a9dbbd9f2316a3256202bcc41d9079c
[ "MIT" ]
197
2018-03-20T20:49:55.000Z
2022-03-21T17:38:14.000Z
unit FileCollect; interface uses Classes, SynCommons, mORMot; type TFileItem = class; TFlileCollection = class(TInterfacedCollection) private function GetItem(aIndex: Integer): TFileItem; protected class function GetClass: TCollectionItemClass; override; public function Add: TFileItem; property Items[aIndex: Integer]: TFileItem read GetItem; default; end; TFileItem = class(TCollectionItem) private FName:String; FSize:Cardinal; FModificationDate: TDateTime; FVersion: String; public procedure Assign(Source:TPersistent);override; published property Name: String read FName write FName; property Size: Cardinal read FSize write FSize; property ModificationDate: TDateTime read FModificationDate write FModificationDate; property Version: String read FVersion write FVersion; end; implementation { TFileItem } procedure TFileItem.Assign(Source: TPersistent); begin if Source is TFileItem then with Source as TFileItem do begin Self.FName:=Name; Self.FSize:=Size; Self.FModificationDate:=ModificationDate; Self.FVersion:=Version; end else inherited Assign(source); end; { TFlileCollection } function TFlileCollection.Add: TFileItem; begin Result := TFileItem(inherited Add); end; class function TFlileCollection.GetClass: TCollectionItemClass; begin Result := TFileItem; end; function TFlileCollection.GetItem(aIndex: Integer): TFileItem; begin Result := TFileItem(inherited GetItem(aIndex)); end; end.
21.534247
88
0.732824
f1938e064d52f3e97fe498f465e9d1428d95bf8e
7,944
pas
Pascal
toolkit/DiffEngineFrame.pas
17-years-old/fhirserver
9575a7358868619311a5d1169edde3ffe261e558
[ "BSD-3-Clause" ]
null
null
null
toolkit/DiffEngineFrame.pas
17-years-old/fhirserver
9575a7358868619311a5d1169edde3ffe261e558
[ "BSD-3-Clause" ]
null
null
null
toolkit/DiffEngineFrame.pas
17-years-old/fhirserver
9575a7358868619311a5d1169edde3ffe261e558
[ "BSD-3-Clause" ]
null
null
null
unit DiffEngineFrame; { Copyright (c) 2018+, Health Intersections Pty Ltd (http://www.healthintersections.com.au) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, BaseFrame, FMX.ScrollBox, FMX.Memo, FMX.Edit, FMX.ComboEdit, FMX.Layouts, FMX.ListBox, FMX.Controls.Presentation, FMX.Platform, FHIR.Support.Utilities, FHIR.Base.Objects, FHIR.Base.Factory, FHIR.Base.Common, FHIR.Version.Resources, FHIR.Version.Parser, FHIR.Version.Factory, FHIR.Tools.DiffEngine; type TFrame = TBaseFrame; // re-aliasing the Frame to work around a designer bug TDiffEngineEngineFrame = class(TFrame) Panel1: TPanel; Splitter1: TSplitter; Panel2: TPanel; Panel3: TPanel; Panel4: TPanel; Splitter2: TSplitter; mSource: TMemo; mDest: TMemo; mDiff: TMemo; Panel5: TPanel; Label1: TLabel; Panel6: TPanel; Label2: TLabel; Panel7: TPanel; Label3: TLabel; Button1: TButton; Button2: TButton; Button3: TButton; dlgOpen: TOpenDialog; Button4: TButton; dlgSave: TSaveDialog; Button5: TButton; Button6: TButton; Button7: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button6Click(Sender: TObject); private FLoading, FDirty : boolean; FSource, FDest, FDiff : String; Ffactory : TFHIRFactory; procedure saveSettings; function parseResource(memo : TMemo; desc : String) : TFhirResource; procedure writeResource(src : TFhirResource; memo : TMemo); public destructor Destroy; override; procedure SettingsChanged; override; procedure load; override; function canSave : boolean; override; function canSaveAs : boolean; override; function isDirty : boolean; override; function save : boolean; override; function nameForSaveDialog : String; override; end; implementation {$R *.fmx} { TDiffEngineEngineFrame } procedure TDiffEngineEngineFrame.Button1Click(Sender: TObject); begin if dlgOpen.Execute then begin FSource := dlgOpen.FileName; mSource.Lines.LoadFromFile(FSource); FDirty := true; end; end; procedure TDiffEngineEngineFrame.Button2Click(Sender: TObject); begin if dlgOpen.Execute then begin FDest := dlgOpen.FileName; mDest.Lines.LoadFromFile(FDest); FDirty := true; end; end; procedure TDiffEngineEngineFrame.Button3Click(Sender: TObject); begin if dlgOpen.Execute then begin FDiff := dlgOpen.FileName; mDiff.Lines.SaveToFile(FDiff); FDirty := true; end; end; procedure TDiffEngineEngineFrame.Button4Click(Sender: TObject); begin if dlgOpen.Execute then begin FDiff := dlgOpen.FileName; mDiff.Lines.LoadFromFile(FDiff); FDirty := true; end; end; procedure TDiffEngineEngineFrame.Button5Click(Sender: TObject); var src, res : TFHIRResource; diff : TFhirParametersW; engine : TDifferenceEngine; begin src := parseResource(mSource, 'Source'); try diff := FFactory.wrapParams(parseResource(mDiff, 'Diff')); try engine := TDifferenceEngine.Create(nil, FFactory.link); try res := engine.applyDifference(src, diff) as TFhirResource; try writeResource(res, mDest); finally res.Free; end; finally engine.Free; end; finally diff.free; end; finally src.Free; end; end; procedure TDiffEngineEngineFrame.Button6Click(Sender: TObject); var src, res : TFHIRResource; diff : TFhirParametersW; engine : TDifferenceEngine; h : string; begin src := parseResource(mSource, 'Source'); try res := parseResource(mDest, 'Dest'); try engine := TDifferenceEngine.Create(nil, Ffactory.link); try diff := engine.generateDifference(src, res, h); try writeResource(diff.Resource as TFhirResource, mDiff); finally diff.Free; end; finally engine.Free; end; finally res.free; end; finally src.Free; end; end; function TDiffEngineEngineFrame.canSave: boolean; begin result := true; end; function TDiffEngineEngineFrame.canSaveAs: boolean; begin result := false; end; destructor TDiffEngineEngineFrame.Destroy; begin inherited; end; function TDiffEngineEngineFrame.isDirty: boolean; begin result := FDirty; end; procedure TDiffEngineEngineFrame.load; begin Ffactory := TFHIRFactoryX.Create; FLoading := true; try FSource := Settings.getValue('DiffEngine', 'source', ''); if FSource <> '' then mSource.Lines.LoadFromFile(FSource); FDest := Settings.getValue('DiffEngine', 'dest', ''); if FDest <> '' then mDest.Lines.LoadFromFile(FDest); FDiff := Settings.getValue('DiffEngine', 'diff', ''); if FDiff <> '' then mDiff.Lines.LoadFromFile(FDiff); finally FLoading := false; end; FDirty := false; end; function TDiffEngineEngineFrame.nameForSaveDialog: String; begin result := 'DiffEngine Configuration'; end; function TDiffEngineEngineFrame.parseResource(memo: TMemo; desc: String): TFhirResource; var x : TFHIRXmlParser; begin x := TFHIRXmlParser.Create(nil, 'en'); try result := x.parseResource(memo.Text) as TFhirResource; finally x.Free; end; end; function TDiffEngineEngineFrame.save: boolean; begin saveSettings; result := true; end; procedure TDiffEngineEngineFrame.saveSettings; var i : integer; begin if FLoading then exit; Settings.storeValue('DiffEngine', 'source', FSource); Settings.storeValue('DiffEngine', 'dest', FDest); Settings.storeValue('DiffEngine', 'diff', FDiff); Settings.Save; FDirty := false; end; procedure TDiffEngineEngineFrame.SettingsChanged; begin end; procedure TDiffEngineEngineFrame.writeResource(src: TFhirResource; memo: TMemo); var x : TFHIRXmlComposer; begin x := TFHIRXmlComposer.Create(nil, OutputStylePretty, 'en'); try memo.Text := x.Compose(src); finally x.Free; end; end; end.
27.020408
90
0.695493
f16e0a39ecf6305442c9dd6bc7b76b28b244f4d2
3,044
dpr
Pascal
Source/TWX26/PreComp.dpr
TW2002/TWX-Sharp
49f4dc69a7bd6b10a08755cfc1daf028a3fb9d90
[ "MIT" ]
3
2020-04-19T08:17:39.000Z
2021-07-19T19:45:58.000Z
Source/TWX26/PreComp.dpr
TW2002/TWX-Sharp
49f4dc69a7bd6b10a08755cfc1daf028a3fb9d90
[ "MIT" ]
null
null
null
Source/TWX26/PreComp.dpr
TW2002/TWX-Sharp
49f4dc69a7bd6b10a08755cfc1daf028a3fb9d90
[ "MIT" ]
1
2022-03-14T00:58:53.000Z
2022-03-14T00:58:53.000Z
{ Copyright (C) 2005 Remco Mulder This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For source notes please refer to Notes.txt For license terms please refer to GPL.txt. These files should be stored in the root of the compression you received this source in. } program PreComp; // Pack2 script pre-compilation and encryption utility {$APPTYPE CONSOLE} uses SysUtils, Classes, Encryptor; var Scpt : TStringList; ExtnIndex, I, J : Integer; Remove : Boolean; Cryptor : TEncryptor; InFile, OutFile, S : string; F : File; begin if (ParamCount < 1) then begin WriteLn('Usage: PRECOMP infile [outfile]'); WriteLn; Exit; end; Scpt := TStringList.Create; Cryptor := TEncryptor.Create(nil); try InFile := ParamStr(1); OutFile := ParamStr(2); Scpt.LoadFromFile(InFile); if (OutFile = '') then begin ExtnIndex := -1; for I := 1 to Length(InFile) do begin if (InFile[I] = '.') then begin ExtnIndex := I; Break; end; end; if (ExtnIndex = -1) then OutFile := InFile + '.inc' else OutFile := Copy(InFile, 1, ExtnIndex - 1) + '.inc'; end; // remove comments and tabulation if (Scpt.Count > 0) then begin I := 0; while (I < Scpt.Count) do begin if (Length(Scpt[I]) > 0) then begin J := 1; while (J < Length(Scpt[I])) and (Scpt[I][J] = ' ') do Inc(J); if (J < Length(Scpt[I])) then Scpt[I] := Copy(Scpt[I], J, Length(Scpt[I])); end; Remove := FALSE; if (Length(Scpt[I]) >= 1) then begin if (Copy(Scpt[I], 1, 1) = '#') then Remove := TRUE; end else Remove := TRUE; if (Remove) then Scpt.Delete(I) else Inc(I); end; end; with (Cryptor) do begin ChunkKey := 210; ChunkSize := 25; Key := '195,23,85,11,77'; Shift := 14; ShiftKey := 78; end; S := Scpt.Text; Cryptor.Encrypt(S); Scpt.Text := S; AssignFile(F, OutFile); ReWrite(F, 1); BlockWrite(F, PChar(S)^, Length(S)); CloseFile(F); finally Scpt.Free; Cryptor.Free; end; WriteLn('Precompilation and encryption complete for file: ' + InFile); end.
21.286713
73
0.585085
f1be45fd469065dbebacca4b69af0b322e9a3980
2,391
pas
Pascal
CallLst.pas
f6fvy/MorseRunner
621c937f285b22e581a44076cb462adb9bc4caff
[ "OLDAP-2.3" ]
2
2018-11-14T00:55:51.000Z
2021-08-07T07:13:44.000Z
CallLst.pas
f6fvy/MorseRunner
621c937f285b22e581a44076cb462adb9bc4caff
[ "OLDAP-2.3" ]
null
null
null
CallLst.pas
f6fvy/MorseRunner
621c937f285b22e581a44076cb462adb9bc4caff
[ "OLDAP-2.3" ]
1
2020-04-23T18:04:00.000Z
2020-04-23T18:04:00.000Z
//------------------------------------------------------------------------------ //This Source Code Form is subject to the terms of the Mozilla Public //License, v. 2.0. If a copy of the MPL was not distributed with this //file, You can obtain one at http://mozilla.org/MPL/2.0/. //------------------------------------------------------------------------------ unit CallLst; {$MODE Delphi} interface uses SysUtils, Classes, Ini, LazFileUtils; procedure LoadCallList; function PickCall: string; var Calls: TStringList; implementation function CompareCalls(Item1, Item2: Pointer): Integer; begin Result := StrComp(PChar(Item1), PChar(Item2)); end; procedure LoadCallList; const Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/'; CHRCOUNT = Length(Chars); INDEXSIZE = Sqr(CHRCOUNT) + 1; INDEXBYTES = INDEXSIZE * SizeOf(Integer); var i: integer; P, Pe: PChar; L: TList; FileName: string; FFileSize: integer; FIndex: array[0..INDEXSIZE-1] of integer; Data: string; begin Calls.Clear; FileName := ExtractFilePath(ParamStr(0)) + 'Master.dta'; if not FileExistsUTF8(FileName) { *Converted from FileExists* } then Exit; with TFileStream.Create(FileName, fmOpenRead) do try FFileSize := Size; if FFileSize < INDEXBYTES then Exit; ReadBuffer(FIndex, INDEXBYTES); if (FIndex[0] <> INDEXBYTES) or (FIndex[INDEXSIZE-1] <> FFileSize) then Exit; SetLength(Data, Size - Position); ReadBuffer(Data[1], Length(Data)); finally Free; end; L := TList.Create; try //list pointers to calls L.Capacity := 20000; P := @Data[1]; Pe := P + Length(Data); while P < Pe do begin L.Add(TObject(P)); P := P + StrLen(P) + 1; end; //delete dupes L.Sort(CompareCalls); for i:=L.Count-1 downto 1 do if StrComp(PChar(L[i]), PChar(L[i-1])) = 0 then L[i] := nil; //put calls to Lst Calls.Capacity := L.Count; for i:=0 to L.Count-1 do if L[i] <> nil then Calls.Add(PChar(L[i])); finally L.Free; end; end; function PickCall: string; var Idx: integer; begin if Calls.Count = 0 then begin Result := 'P29SX'; Exit; end; Idx := Random(Calls.Count); Result := Calls[Idx]; if Ini.RunMode = rmHst then Calls.Delete(Idx); end; initialization Calls := TStringList.Create; finalization Calls.Free; end.
20.612069
80
0.602677
836463aea8ba16c2ed1dbfb1c83f473eaf1dd4c3
500
dpr
Pascal
FlowG_project.dpr
Smertowing/Flowchart_Generator
aa7abc4b863f50a73992ea4121a703d80507faaf
[ "MIT" ]
3
2018-05-13T08:53:58.000Z
2018-05-16T02:40:43.000Z
FlowG_project.dpr
Smertowing/Flowchart_BKit
aa7abc4b863f50a73992ea4121a703d80507faaf
[ "MIT" ]
null
null
null
FlowG_project.dpr
Smertowing/Flowchart_BKit
aa7abc4b863f50a73992ea4121a703d80507faaf
[ "MIT" ]
1
2018-10-07T20:11:14.000Z
2018-10-07T20:11:14.000Z
program FlowG_project; uses Vcl.Forms, MainUn in 'MainUn.pas' {FFlowChart_Manager}, data.Model in 'Units\data.Model.pas', TypesAndVars in 'Units\TypesAndVars.pas', draw.Structures in 'Units\draw.Structures.pas', draw.Model in 'Units\draw.Model.pas', Screen in 'Units\Screen.pas', View in 'Units\View.pas'; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TFFlowchart_Manager, FFlowchart_Manager); Application.Run; end.
23.809524
66
0.744
83f37c18f42081c83314fb98ad5040b6e9511597
8,465
pas
Pascal
XMLBuilder/XMLBuilder.pas
ararog/xmlbuilder
90e09f2211f61a570cd98be31e1f8f9e930278aa
[ "Apache-2.0" ]
1
2016-03-27T20:34:40.000Z
2016-03-27T20:34:40.000Z
XMLBuilder/XMLBuilder.pas
ararog/xmlbuilder
90e09f2211f61a570cd98be31e1f8f9e930278aa
[ "Apache-2.0" ]
null
null
null
XMLBuilder/XMLBuilder.pas
ararog/xmlbuilder
90e09f2211f61a570cd98be31e1f8f9e930278aa
[ "Apache-2.0" ]
null
null
null
{ Copyright 2008 James Murty (www.jamesmurty.com) Copyright 2009 Rogerio Araújo (faces.eti.br) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This code is available from the Google Code repository at: http://xmlbuilder.codeplex.com } namespace DSL.Builder; interface uses System.Text, System.IO, System.Xml; type XMLBuilder = public class private class var _xmlDocument: XmlDocument; _xmlElement: XmlElement; protected constructor(document : XmlDocument); constructor(myElement : XmlElement; parentElement : XmlElement); public class method Start(name: String): XMLBuilder; method AddXmlDeclaration(version: String; encoding: String; standalone: String); method AddDocumentType(name: String; publicId: String; systemId: String); method GetElement() : XmlElement; method GetRoot() : XMLBuilder; method GetDocument() : XmlDocument; method Element(name: String) : XMLBuilder; method Elem(name: String) : XMLBuilder; method E(name: String) : XMLBuilder; method Attribute(name: String; value: String) : XMLBuilder; method Attr(name: String; value: String) : XMLBuilder; method A(name: String; value: String) : XMLBuilder; method Text(value: String) : XMLBuilder; method T(value: String) : XMLBuilder; method Cdata(value: array of Byte) : XMLBuilder; method Data(value: array of Byte) : XMLBuilder; method D(value: array of Byte) : XMLBuilder; method Comment(value: String) : XMLBuilder; method Cmnt(value: String) : XMLBuilder; method C(value: String) : XMLBuilder; method Instruction(target: String; value: String) : XMLBuilder; method Inst(target: String ; value: String) : XMLBuilder; method I(target: String; value: String) : XMLBuilder; method Reference(name: String) : XMLBuilder; method Ref(name: String) : XMLBuilder; method R(name: String ) : XMLBuilder; method Up(steps : Integer ) : XMLBuilder; method Up() : XMLBuilder; method ToWriter(writer: XmlTextWriter); method AsString() : String; end; implementation constructor XMLBuilder(document : XmlDocument); begin self._xmlDocument := document; self._xmlElement := document.DocumentElement; end; constructor XMLBuilder(myElement : XmlElement; parentElement : XmlElement); begin self._xmlElement := myElement; self._xmlDocument := myElement.OwnerDocument; if parentElement <> nil then begin parentElement.AppendChild(myElement); end; end; class method XMLBuilder.Start(name: String): XMLBuilder; var document: XmlDocument; rootElement: XmlElement; begin document := new XmlDocument(); rootElement := document.CreateElement(name); document.AppendChild(rootElement); Result := new XMLBuilder(document); end; method XMLBuilder.AddXmlDeclaration(version: String; encoding: String; standalone: String); begin var xmlDecl: XmlDeclaration := self._xmlDocument.CreateXmlDeclaration(version, encoding, standalone); self._xmlDocument.InsertBefore(xmlDecl, self._xmlDocument.DocumentElement); end; method XMLBuilder.AddDocumentType(name: String; publicId: String; systemId: String); begin var docType: XmlDocumentType := self._xmlDocument.CreateDocumentType(name, publicId, systemId, nil); self._xmlDocument.InsertBefore(docType, self._xmlDocument.DocumentElement); end; method XMLBuilder.GetElement(): XmlElement; begin Result := self._xmlElement; end; method XMLBuilder.GetRoot(): XMLBuilder; begin Result := new XMLBuilder(self.GetDocument()); end; method XMLBuilder.GetDocument() : XmlDocument; begin Result := self._xmlDocument; end; method XMLBuilder.Element(name: String) : XMLBuilder; var textNode: XmlNode := nil; childNodes: XmlNodeList := _xmlElement.ChildNodes; begin for _i: Integer := 0 to childNodes.Count -1 step 1 do begin if (XmlNodeType.Text.Equals(childNodes.Item(_i).NodeType)) then begin textNode := childNodes.Item(_i); break; end; end; if (textNode <> nil) then begin raise new Exception("Cannot add sub-element <" + name + "> to element <" + self._xmlElement.Name + "> that already contains the Text node: " + textNode); end; Result := new XMLBuilder(GetDocument().CreateElement(name), self._xmlElement); end; method XMLBuilder.Elem(name: String) : XMLBuilder; begin Result := self.Element(name); end; method XMLBuilder.E(name: String) : XMLBuilder; begin Result := self.Element(name); end; method XMLBuilder.Attribute(name: String; value: String) : XMLBuilder; begin var _attribute : XmlAttribute := self._xmlDocument.CreateAttribute(name); _attribute.Value := value; self._xmlElement.Attributes.Append(_attribute); Result := self; end; method XMLBuilder.Attr(name: String; value: String) : XMLBuilder; begin Result := self.Attribute(name, value); end; method XMLBuilder.A(name: String; value: String) : XMLBuilder; begin Result := self.Attribute(name, value); end; method XMLBuilder.Text(value: String) : XMLBuilder; begin self._xmlElement.AppendChild(GetDocument().CreateTextNode(value)); Result := self; end; method XMLBuilder.T(value: String) : XMLBuilder; begin Result := self.Text(value); end; method XMLBuilder.Cdata(value: array of Byte) : XMLBuilder; begin self._xmlElement.AppendChild(GetDocument().CreateCDATASection(Convert.ToBase64String(value, Base64FormattingOptions.None))); Result := self; end; method XMLBuilder.Data(value: array of Byte) : XMLBuilder; begin Result := self.Cdata(value); end; method XMLBuilder.D(value: array of Byte) : XMLBuilder; begin Result := self.Cdata(value); end; method XMLBuilder.Comment(value : String) : XMLBuilder; begin self._xmlElement.AppendChild(GetDocument().CreateComment(value)); Result := self; end; method XMLBuilder.Cmnt(value : String) : XMLBuilder; begin Result := self.Comment(value); end; method XMLBuilder.C(value : String) : XMLBuilder; begin Result := self.Comment(value); end; method XMLBuilder.Instruction(target: String; value: String) : XMLBuilder; begin self._xmlElement.AppendChild(GetDocument().CreateProcessingInstruction(target, value)); Result := self; end; method XMLBuilder.Inst(target: String ; value: String) : XMLBuilder; begin Result := self.Instruction(target, value); end; method XMLBuilder.I(target: String; value: String) : XMLBuilder; begin Result := self.Instruction(target, value); end; method XMLBuilder.Reference(name: String) : XMLBuilder; begin self._xmlElement.AppendChild(GetDocument().CreateEntityReference(name)); Result := self; end; method XMLBuilder.Ref(name: String) : XMLBuilder; begin Result := self.Reference(name); end; method XMLBuilder.R(name: String ) : XMLBuilder; begin Result := self.Reference(name); end; method XMLBuilder.Up(steps : Integer ) : XMLBuilder; var currNode: XmlNode; stepCount: Integer; begin currNode := XmlNode(self._xmlElement); stepCount := 0; while (currNode.ParentNode <> nil) and (stepCount < steps) do begin currNode := currNode.ParentNode; stepCount := stepCount + 1; end; Result := new XMLBuilder(XmlElement(currNode), nil); end; method XMLBuilder.Up() : XMLBuilder; begin Result := self.Up(1); end; method XMLBuilder.ToWriter(writer: XmlTextWriter); begin self._xmlDocument.WriteTo(writer); end; method XMLBuilder.AsString() : String; var _writer: XmlTextWriter; _stringWriter: StringWriter; begin _stringWriter := new StringWriter(); _writer := new XmlTextWriter(_stringWriter); _writer.Formatting := Formatting.Indented; self.ToWriter(_writer); _writer.Flush(); Result := _stringWriter.ToString(); end; end.
27.57329
128
0.705729
f15f9d4666d250f881a30b7876990a0620c37293
57,702
dfm
Pascal
_StandarGFormGrid.dfm
NetVaIT/Estandar
1961b92ce444a133b340c8020720f1c7231b830a
[ "Apache-2.0" ]
null
null
null
_StandarGFormGrid.dfm
NetVaIT/Estandar
1961b92ce444a133b340c8020720f1c7231b830a
[ "Apache-2.0" ]
null
null
null
_StandarGFormGrid.dfm
NetVaIT/Estandar
1961b92ce444a133b340c8020720f1c7231b830a
[ "Apache-2.0" ]
null
null
null
object _frmStandarGFormGrid: T_frmStandarGFormGrid Left = 0 Top = 0 BorderStyle = bsNone Caption = '_FrmStandar' ClientHeight = 650 ClientWidth = 750 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poScreenCenter ShowHint = True OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object splDetail3: TSplitter Left = 0 Top = 565 Width = 750 Height = 3 Cursor = crVSplit Align = alBottom Visible = False ExplicitTop = 288 ExplicitWidth = 542 end object splDetail2: TSplitter Left = 0 Top = 521 Width = 750 Height = 3 Cursor = crVSplit Align = alBottom Visible = False ExplicitTop = 217 ExplicitWidth = 33 end object splDetail1: TSplitter Left = 0 Top = 477 Width = 750 Height = 3 Cursor = crVSplit Align = alBottom Visible = False ExplicitTop = 180 ExplicitWidth = 29 end object pnlClose: TPanel Left = 0 Top = 609 Width = 750 Height = 41 Align = alBottom TabOrder = 5 Visible = False end object pnlDetail3: TPanel Left = 0 Top = 568 Width = 750 Height = 41 Align = alBottom BevelOuter = bvNone TabOrder = 3 Visible = False end object pnlDetail2: TPanel Left = 0 Top = 524 Width = 750 Height = 41 Align = alBottom BevelOuter = bvNone TabOrder = 2 Visible = False end object pnlDetail1: TPanel Left = 0 Top = 480 Width = 750 Height = 41 Align = alBottom BevelOuter = bvNone TabOrder = 1 Visible = False end object pnltoolbar: TPanel Left = 0 Top = 471 Width = 750 Height = 6 Align = alBottom BevelOuter = bvNone TabOrder = 4 Visible = False end object pnlMaster: TPanel Left = 0 Top = 0 Width = 750 Height = 471 Align = alClient BevelOuter = bvNone TabOrder = 0 object cxGrid: TcxGrid Left = 0 Top = 29 Width = 750 Height = 442 Align = alClient PopupMenu = PopupMenu TabOrder = 1 LookAndFeel.Kind = lfStandard object tvMaster: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> OnCellDblClick = tvMasterCellDblClick DataController.DataSource = DataSource DataController.Summary.DefaultGroupSummaryItems = <> DataController.Summary.FooterSummaryItems = <> DataController.Summary.SummaryGroups = <> OptionsBehavior.IncSearch = True OptionsCustomize.ColumnsQuickCustomization = True OptionsData.Deleting = False OptionsData.Editing = False OptionsData.Inserting = False OptionsView.NoDataToDisplayInfoText = ' ' OptionsView.GroupByBox = False end object cxGridLevel1: TcxGridLevel GridView = tvMaster end end object tbarGrid: TToolBar Left = 0 Top = 0 Width = 750 Height = 29 Images = ilAction TabOrder = 0 object ToolButton1: TToolButton Left = 0 Top = 0 Action = DataSetInsert end object btnEdit: TToolButton Left = 23 Top = 0 Action = DataSetEdit end object ToolButton3: TToolButton Left = 46 Top = 0 Action = DataSetDelete end object ToolButton4: TToolButton Left = 69 Top = 0 Width = 8 Caption = 'ToolButton4' ImageIndex = 2 Style = tbsSeparator Visible = False end object ToolButton5: TToolButton Left = 77 Top = 0 Action = DataSetFirst end object ToolButton6: TToolButton Left = 100 Top = 0 Action = DataSetPrior end object ToolButton7: TToolButton Left = 123 Top = 0 Action = DataSetNext end object ToolButton8: TToolButton Left = 146 Top = 0 Action = DataSetLast end object ToolButton9: TToolButton Left = 169 Top = 0 Action = DataSetRefresh end object ToolButton2: TToolButton Left = 192 Top = 0 Width = 8 Caption = 'ToolButton2' ImageIndex = 1 Style = tbsSeparator end object btnPost: TToolButton Left = 200 Top = 0 Action = DataSetPost end object btnCancel: TToolButton Left = 223 Top = 0 Action = DataSetCancel end object ToolButton21: TToolButton Left = 246 Top = 0 Width = 8 Caption = 'ToolButton21' ImageIndex = 10 Style = tbsSeparator end object ToolButton22: TToolButton Left = 254 Top = 0 Action = FileSaveAs1 end object ToolButton10: TToolButton Left = 277 Top = 0 Width = 8 Caption = 'ToolButton10' ImageIndex = 11 Style = tbsSeparator end object tbtnCerrar: TToolButton Left = 285 Top = 0 Action = actCloseGrid end end end object DataSource: TDataSource Left = 552 Top = 8 end object ilPageControl: TImageList Left = 584 Top = 8 Bitmap = { 494C010102000400F80010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000001000000001002000000000000010 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008C96A5008C8E8400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFF7F700FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFE7E700FFE7 E700FFDFDE00FFDFDE00FFD7AD0000000000FF9E0000FFF7F700FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFE7E700FFEF EF002979FF006BD7FF00ADAEAD00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFEFEF00FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFDFDE00FFDF DE00FFD7D600FFD7D600FFDFDE0000000000FF9E0000FFEFEF00FFEFEF00FFEF EF00FFEFEF00FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700EFDFDE003179 FF006BD7FF00398EFF00EFDFEF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFF7F700FFF7F700FFF7 F700FFF7F700FFF7F700FFEFEF00FFEFEF00FFEFEF00FFE7E700FFE7E700FFDF DE00FFDFDE00FFD7D600FFDFDE0000000000FF9E0000FFF7F700FFF7F700FFF7 F700FFF7F700FFF7F700F7EFEF008C8E8C0084868C00ADA6AD008C8E8C007BA6 B500398EFF00F7DFE700FFDFDE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFF7F700FFFFFF00FFFF FF00FFFFFF00FFF7F700FFF7F700FFF7F700FFEFEF00FFEFEF00FFE7E700FFE7 E700FFDFDE00FFDFDE00FFDFDE0000000000FF9E0000FFF7F700FFFFFF00FFFF FF00FFFFFF00DEDFDE00E7C79400F7CF9400F7CF9C00F7CF8C0063616B009496 9400EFDFE700FFDFDE00FFDFDE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFE7E700FFE7 E700FFDFDE00FFDFDE00FFDFDE0000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00B5A69400F7D7A500F7D7A500F7D79C00EFCF8C00F7CF9400C6B6 BD00FFDFDE00FFDFDE00FFDFDE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFEFEF00FFE7 E700FFDFDE00FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00F7DFAD00F7E7BD00F7E7C600F7DFAD00F7D79C00F7D7A5008C8E 9400FFDFDE00FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFEF00FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00DECFAD00FFF7DE00FFF7E700F7EFC600F7DFAD00F7D7A5009C96 9C00FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00A5A6AD00FFFFEF00FFFFEF00FFEFCE00F7DFAD00E7CF9C00FFEF EF00FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7F700FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00A5A6A500E7DFBD00FFEFBD00B5A69400E7D7DE00FFE7 E700FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFEF00FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E70000000000FF9E0000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFEFEF00FFE7 E700FFE7E700FFDFDE00FFE7E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E000000000000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FF9E0000EF860000EF860000EF86 0000EF860000EF860000EF860000EF860000EF860000EF860000EF860000EF86 0000EF860000EF860000F796000000000000FF9E0000EF860000EF860000EF86 0000EF860000EF860000EF860000EF860000EF860000EF860000EF860000EF86 0000EF860000EF860000F7960000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E00000000000000000000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E0000FF9E 0000FF9E0000FF9E0000FF9E0000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000100000000100010000000000800000000000000000000000 000000000000000000000000FFFFFF00FFFFFFFF00000000FFFFFFF900000000 0001000100000000000100010000000000010001000000000001000100000000 0001000100000000000100010000000000010001000000000001000100000000 0001000100000000000100010000000000010001000000000001000100000000 8001800100000000FFFFFFFF0000000000000000000000000000000000000000 000000000000} end object ActionList: TActionList Images = ilAction Left = 616 Top = 8 object DataSetFirst: TDataSetFirst Category = 'Dataset' Caption = 'Primero' Hint = 'Primero' ImageIndex = 0 DataSource = DataSource end object DataSetPrior: TDataSetPrior Category = 'Dataset' Caption = 'Anterior' Hint = 'Anterior' ImageIndex = 1 DataSource = DataSource end object DataSetNext: TDataSetNext Category = 'Dataset' Caption = 'Siguiente' Hint = 'Siguiente' ImageIndex = 2 DataSource = DataSource end object DataSetLast: TDataSetLast Category = 'Dataset' Caption = #218'ltimo' Hint = #218'ltimo' ImageIndex = 3 DataSource = DataSource end object DataSetRefresh: TDataSetRefresh Category = 'Dataset' Caption = '&Actualizar' Hint = 'Actualizar' ImageIndex = 9 ShortCut = 116 DataSource = DataSource end object DataSetInsert: TDataSetInsert Category = 'Dataset' Caption = '&Insertar' Hint = 'Insertar' ImageIndex = 4 ShortCut = 45 Visible = False DataSource = DataSource end object DataSetEdit: TDataSetEdit Category = 'Dataset' Caption = '&Editar' Hint = 'Editar' ImageIndex = 6 ShortCut = 113 Visible = False DataSource = DataSource end object DataSetDelete: TDataSetDelete Category = 'Dataset' Caption = '&Eliminar' Hint = 'Eliminar' ImageIndex = 5 ShortCut = 16430 Visible = False OnExecute = DataSetDeleteExecute DataSource = DataSource end object DataSetPost: TDataSetPost Category = 'Dataset' Caption = '&Aceptar' Hint = 'Aceptar' ImageIndex = 7 Visible = False DataSource = DataSource end object DataSetCancel: TDataSetCancel Category = 'Dataset' Caption = '&Cancelar' Hint = 'Cancelar' ImageIndex = 8 ShortCut = 27 Visible = False DataSource = DataSource end object FileSaveAs1: TFileSaveAs Category = 'File' Caption = '&Guardar' Dialog.Filter = 'Libro de Excel|*.xls|Libro de Excel|*.xlsx|Documento HTML|*.htlm' + '|Documento de texto|*.txt|Documento XML|'#168'.xml' Hint = 'Guardar como|Exporta la informaci'#243'n a un archivo' ImageIndex = 10 OnAccept = FileSaveAs1Accept end object actCloseGrid: TAction Category = 'File' Caption = 'Cerrar' Hint = 'Cerrar la cuadricula' ImageIndex = 11 OnExecute = actCloseGridExecute end end object ilAction: TImageList Left = 648 Top = 8 Bitmap = { 494C01010C00B8011C0110001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000004000000001002000000000000040 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FFFFFF00FFFFFF0000000000FFFF FF000000000000000000FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000C6C7C6000000 000000868400000000000000000000000000FFFF0000000000000000000000FF FF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000C6C7C6000000 000000868400000000000000000000000000FFFF00000000000000FFFF00FFFF FF0000FFFF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000000000000000 000000868400000000000000000000000000FFFF000000000000FFFFFF0000FF FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF000000 000000000000FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008486 8400000000008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000868400008684000086840000868400008684000086 840000868400000000000000000000000000FFFF00000000000000FFFF00FFFF FF0000FFFF00FFFFFF00000000000000000000000000000000000000000000FF FF0000000000FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000008684000086840000000000000000000000000000000000000000000086 840000868400000000000000000000000000FFFF000000000000FFFFFF0000FF FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 000000868400000000000000000000000000FFFF00000000000000FFFF00FFFF FF0000000000000000000000000000000000000000000000000000000000FFFF FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 00000086840000000000000000000000000000000000000000000000000000FF FF00FFFFFF0000FFFF00000000000000000000FFFF0000000000FFFFFF00FFFF FF000000000000000000FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008486 8400000000000000000084868400000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000FFFF0000000000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 00000086840000000000C6C7C600C6C7C600C6C7C600C6C7C600C6C7C6000000 0000C6C7C6000000000000000000000000000000000000000000000000000000 0000000000000000000000FFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000FFFF0000000000FFFFFF00FFFFFF000000000000000000FFFF FF0000000000FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000FFFF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF0000000000FFFFFF0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 FF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848684000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848684008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008486840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848684000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000848684000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008486840000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084868400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084868400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000848684000000000000000000000000000000000000000000000000008486 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000400000000100010000000000000200000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000FFFFFFFFFF7EFC00FFFFFFFFBFFFFC00 FFFFFFFFF0032000FFFFFC7FE0030000F3E7F0FFE0030000F1C7F1FFE0030000 F88FE3FFE0030000FC1FE7FF20030000FE3FE707E0020000FC1FE387E0030000 F88FE107E003E000F1C7F007E003F800F3E7F837E003F000FFFFFFFFFFFFE001 FFFFFFFFBF7DC403FFFFFFFF7F7EEC07FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7FFFFFFFFFFBFFFC7FFFFFFFFFF1FF FC7FFFFFE007E0FFE00FE007F00FC47FE00FE007F81FCE3FE00FE007FC3FFF1F FC7FFFFFFE7FFF8FFC7FFFFFFFFFFFC7FC7FFFFFFFFFFFE7FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7E7FF9FF9FFE7E7 E787FE1FF87FE1E7E607F81FF81FE067E007F01FF80FE007E607F81FF81FE067 E787FE1FF87FE1E7E7E7FF9FF9FFE7E7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 000000000000} end object cxStyleRepository1: TcxStyleRepository Left = 520 Top = 8 PixelsPerInch = 96 object cxsEven: TcxStyle end object cxsOdd: TcxStyle AssignedValues = [svColor] Color = clMoneyGreen end object cxsInactive: TcxStyle AssignedValues = [svColor] Color = clSilver end object cxsDelete: TcxStyle AssignedValues = [svColor] Color = 8421631 end object cxsActive: TcxStyle end end object cxGridPopupMenu: TcxGridPopupMenu Grid = cxGrid PopupMenus = <> Left = 680 Top = 8 end object PopupMenu: TPopupMenu Images = ilAction Left = 520 Top = 64 object Insertar1: TMenuItem Action = DataSetInsert end object Editar1: TMenuItem Action = DataSetEdit end object Eliminar1: TMenuItem Action = DataSetDelete end end end
53.876751
77
0.836539
617bc4f93996f20be7b411d3bfaa2bdd920ec08e
17,297
dfm
Pascal
3rdparty/AvaSpecDLL-setup32/MAINDIR/examples/Borland Delphi 6/main.dfm
mrDIMAS/AutomatedLIBS
c550fd89427a0a6ec94ffa4252d7c0a4473e586a
[ "MIT" ]
8
2019-08-01T10:13:54.000Z
2022-03-11T08:47:40.000Z
3rdparty/AvaSpecDLL-setup32/MAINDIR/examples/Borland Delphi 6/main.dfm
ustcpancy/AutomatedLIBS
c550fd89427a0a6ec94ffa4252d7c0a4473e586a
[ "MIT" ]
null
null
null
3rdparty/AvaSpecDLL-setup32/MAINDIR/examples/Borland Delphi 6/main.dfm
ustcpancy/AutomatedLIBS
c550fd89427a0a6ec94ffa4252d7c0a4473e586a
[ "MIT" ]
4
2019-11-14T07:35:39.000Z
2021-12-04T15:23:15.000Z
object Form1: TForm1 Left = 316 Top = 263 Width = 1026 Height = 758 Caption = 'MainForm' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] Menu = MainMenu1 OldCreateOrder = False OnClose = FormClose OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object btnCommunication: TButton Left = 8 Top = 16 Width = 121 Height = 25 Caption = 'Open Communication' TabOrder = 0 OnClick = btnCommunicationClick end object StatusBar1: TStatusBar Left = 0 Top = 701 Width = 1010 Height = 19 Panels = < item Width = 200 end item Width = 200 end item Width = 200 end> SimplePanel = False end object sgShowList: TStringGrid Left = 8 Top = 80 Width = 300 Height = 209 ColCount = 2 DefaultRowHeight = 16 FixedCols = 0 RowCount = 25 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRowSelect] TabOrder = 2 OnClick = sgShowListClick ColWidths = ( 96 174) end object btnUpdateList: TButton Left = 8 Top = 48 Width = 121 Height = 25 Caption = 'Update List' Enabled = False TabOrder = 3 OnClick = btnUpdateListClick end object Chart1: TChart Left = 320 Top = 368 Width = 481 Height = 313 BackWall.Brush.Color = clWhite BackWall.Brush.Style = bsClear Legend.Visible = False Title.Text.Strings = ( 'Scope Values') Title.Visible = False LeftAxis.Automatic = False LeftAxis.AutomaticMaximum = False LeftAxis.AutomaticMinimum = False LeftAxis.ExactDateTime = False LeftAxis.LabelsSeparation = 1 LeftAxis.Maximum = 16500 LeftAxis.Minimum = -100 View3D = False TabOrder = 4 object Series1: TLineSeries Marks.Arrow.Visible = True Marks.Callout.Brush.Color = clBlack Marks.Callout.Arrow.Visible = True Marks.Visible = False Pointer.InflateMargins = True Pointer.Style = psRectangle Pointer.Visible = False XValues.Name = 'X' XValues.Order = loAscending YValues.Name = 'Y' YValues.Order = loNone end end object gbPrepareMeasSettings: TGroupBox Left = 320 Top = 8 Width = 481 Height = 361 Caption = 'Prepare Measurement Settings' TabOrder = 5 object Label3: TLabel Left = 24 Top = 20 Width = 46 Height = 13 Caption = 'Start pixel' end object Label5: TLabel Left = 24 Top = 44 Width = 46 Height = 13 Caption = 'Stop pixel' end object Label14: TLabel Left = 24 Top = 68 Width = 72 Height = 13 Caption = 'Integration time' end object Label15: TLabel Left = 24 Top = 92 Width = 80 Height = 13 Caption = 'Integration Delay' end object Label16: TLabel Left = 24 Top = 116 Width = 96 Height = 13 Caption = 'Number of averages' end object Label6: TLabel Left = 24 Top = 140 Width = 95 Height = 13 Caption = 'Saturation detection' end object Label7: TLabel Left = 208 Top = 72 Width = 13 Height = 13 Caption = 'ms' end object Label8: TLabel Left = 208 Top = 96 Width = 11 Height = 13 Caption = 'ns' end object edtStartPixel: TEdit Left = 128 Top = 16 Width = 73 Height = 21 TabOrder = 0 Text = '0' end object edtStopPixel: TEdit Left = 128 Top = 40 Width = 73 Height = 21 TabOrder = 1 Text = '2047' end object edtIntegrationTime: TEdit Left = 128 Top = 64 Width = 73 Height = 21 TabOrder = 2 Text = '100' end object edtIntegrationDelay: TEdit Left = 128 Top = 88 Width = 73 Height = 21 TabOrder = 3 Text = '0' end object edtNrOfAverages: TEdit Left = 128 Top = 112 Width = 73 Height = 21 TabOrder = 4 Text = '1' end object gbTrigger: TGroupBox Left = 24 Top = 168 Width = 201 Height = 153 Caption = 'Trigger Settings' TabOrder = 5 object Label20: TLabel Left = 16 Top = 26 Width = 62 Height = 13 Caption = 'Trigger mode' end object Label31: TLabel Left = 16 Top = 66 Width = 68 Height = 13 Caption = 'Trigger source' end object Label32: TLabel Left = 16 Top = 106 Width = 56 Height = 13 Caption = 'Trigger type' end object chkTrigTypeLevel: TCheckBox Left = 96 Top = 120 Width = 90 Height = 17 Caption = 'Level' TabOrder = 0 OnClick = chkTrigTypeLevelClick end object chkTrigTypeEdge: TCheckBox Left = 96 Top = 104 Width = 90 Height = 17 Caption = 'Edge' Checked = True State = cbChecked TabOrder = 1 OnClick = chkTrigTypeEdgeClick end object chkTrigSourceSync: TCheckBox Left = 96 Top = 80 Width = 90 Height = 17 Caption = 'Synchronized' TabOrder = 2 OnClick = chkTrigSourceSyncClick end object chkTrigSourceExtHw: TCheckBox Left = 96 Top = 64 Width = 90 Height = 17 Caption = 'External' Checked = True State = cbChecked TabOrder = 3 OnClick = chkTrigSourceExtHwClick end object chkTrigModeSw: TCheckBox Left = 96 Top = 40 Width = 90 Height = 17 Caption = 'Software' Checked = True State = cbChecked TabOrder = 4 OnClick = chkTrigModeSwClick end object chkTrigModeHw: TCheckBox Left = 96 Top = 24 Width = 90 Height = 17 Caption = 'Hardware' TabOrder = 5 OnClick = chkTrigModeHwClick end end object gbDarkCorrection: TGroupBox Left = 264 Top = 16 Width = 201 Height = 73 Caption = 'Dark Correction Settings' TabOrder = 6 object Label1: TLabel Left = 72 Top = 48 Width = 11 Height = 13 Caption = '% ' end object chkEnableDarkCorrection: TCheckBox Left = 8 Top = 20 Width = 97 Height = 17 Caption = 'Enable' TabOrder = 0 end object edtDarkHist: TEdit Left = 8 Top = 40 Width = 49 Height = 21 TabOrder = 1 Text = '100' end end object gbSmoothing: TGroupBox Left = 264 Top = 96 Width = 201 Height = 65 Caption = 'Smoothing Settings' TabOrder = 7 object Label2: TLabel Left = 8 Top = 24 Width = 29 Height = 13 Caption = 'Model' end object Label4: TLabel Left = 8 Top = 40 Width = 55 Height = 13 Caption = 'Nr Of Pixels' end object edtSmoothModel: TEdit Left = 120 Top = 16 Width = 57 Height = 21 TabOrder = 0 Text = '0' end object edtSmoothPix: TEdit Left = 120 Top = 40 Width = 57 Height = 21 TabOrder = 1 Text = '0' end end object edtSaturationLevel: TEdit Left = 128 Top = 136 Width = 73 Height = 21 TabOrder = 8 Text = '0' end object gbControl: TGroupBox Left = 264 Top = 168 Width = 201 Height = 153 Caption = 'Control Settings' TabOrder = 9 object Label33: TLabel Left = 8 Top = 20 Width = 82 Height = 13 Caption = 'Flashes per Scan' end object Label34: TLabel Left = 8 Top = 44 Width = 54 Height = 13 Caption = 'Laser delay' end object Label35: TLabel Left = 8 Top = 68 Width = 54 Height = 13 Caption = 'Laser width' end object Label36: TLabel Left = 8 Top = 92 Width = 84 Height = 13 Caption = 'Laser wavelength' end object Label37: TLabel Left = 8 Top = 116 Width = 108 Height = 13 Caption = 'Spectra stored to RAM' end object Label9: TLabel Left = 184 Top = 48 Width = 11 Height = 13 Caption = 'ns' end object Label10: TLabel Left = 184 Top = 72 Width = 11 Height = 13 Caption = 'ns' end object Label11: TLabel Left = 184 Top = 96 Width = 14 Height = 13 Caption = 'nm' end object edtFlashesPerScan: TEdit Left = 120 Top = 16 Width = 57 Height = 21 TabOrder = 0 Text = '0' end object edtLaserDelay: TEdit Left = 120 Top = 40 Width = 57 Height = 21 TabOrder = 1 Text = '0' end object edtLaserWidth: TEdit Left = 120 Top = 64 Width = 57 Height = 21 TabOrder = 2 Text = '10000' end object edtLaserWavelength: TEdit Left = 120 Top = 88 Width = 57 Height = 21 TabOrder = 3 Text = '785' end object edtRamSpectra: TEdit Left = 120 Top = 112 Width = 57 Height = 21 TabOrder = 4 Text = '0' end end object btnReadMeasFromEEProm: TButton Left = 24 Top = 328 Width = 217 Height = 25 Caption = 'Read Measurement Settings from EEPROM' Enabled = False TabOrder = 10 OnClick = btnReadMeasFromEEPromClick end object btnWriteMeasToEEProm: TButton Left = 248 Top = 328 Width = 217 Height = 25 Caption = 'Write Measurement Settings to EEPROM' Enabled = False TabOrder = 11 OnClick = btnWriteMeasToEEPromClick end end object gbOutput: TGroupBox Left = 824 Top = 368 Width = 169 Height = 313 Caption = 'Measurement Statistics' TabOrder = 6 object Label19: TLabel Left = 8 Top = 32 Width = 78 Height = 13 Caption = 'Time Since Start' end object Label22: TLabel Left = 8 Top = 56 Width = 58 Height = 13 Caption = 'Nr Of Scans' end object Label21: TLabel Left = 8 Top = 80 Width = 64 Height = 13 Caption = 'Nr Of Failures' end object Label23: TLabel Left = 8 Top = 104 Width = 78 Height = 13 Caption = 'Avg Time /Scan' end object Label24: TLabel Left = 152 Top = 104 Width = 13 Height = 13 Caption = 'ms' end object Label25: TLabel Left = 152 Top = 128 Width = 13 Height = 13 Caption = 'ms' end object Label26: TLabel Left = 8 Top = 128 Width = 57 Height = 13 Caption = 'Last scan in' end object Label27: TLabel Left = 152 Top = 32 Width = 5 Height = 13 Caption = 's' end object edtTotalTime: TEdit Left = 88 Top = 24 Width = 65 Height = 21 TabOrder = 0 end object edtPerformedScans: TEdit Left = 88 Top = 48 Width = 65 Height = 21 TabOrder = 1 end object edtFailures: TEdit Left = 88 Top = 72 Width = 65 Height = 21 TabOrder = 2 end object edtAvgTimePerScan: TEdit Left = 88 Top = 96 Width = 65 Height = 21 TabOrder = 3 end object edtLastScanTime: TEdit Left = 88 Top = 120 Width = 65 Height = 21 TabOrder = 4 end end object gbMeasure: TGroupBox Left = 824 Top = 8 Width = 169 Height = 353 Caption = 'Measure' TabOrder = 7 object Label17: TLabel Left = 16 Top = 32 Width = 58 Height = 13 Caption = 'Nr Of Scans' end object Label18: TLabel Left = 16 Top = 44 Width = 57 Height = 13 Caption = '(-1 = infinite)' end object btnStartMeasurement: TButton Left = 16 Top = 72 Width = 137 Height = 25 Caption = 'Start Measurement' Enabled = False TabOrder = 0 OnClick = btnStartMeasurementClick end object edtNrOfScans: TEdit Left = 80 Top = 32 Width = 73 Height = 21 TabOrder = 1 Text = '-1' end object btnStopMeasurement: TButton Left = 16 Top = 104 Width = 137 Height = 25 Caption = 'Stop Measurement' Enabled = False TabOrder = 2 OnClick = btnStopMeasurementClick end object chkPreScan: TCheckBox Left = 16 Top = 160 Width = 137 Height = 17 Caption = 'AvaSpec-3648 PreScan' TabOrder = 3 Visible = False OnClick = chkPreScanClick end object rdgSetSensitivityMode: TRadioGroup Left = 16 Top = 192 Width = 145 Height = 57 Caption = 'Set NIR Sensitivity Mode' ItemIndex = 0 Items.Strings = ( 'Low Noise' 'High Sensitivity') TabOrder = 4 Visible = False OnClick = rdgSetSensitivityModeClick end end object btnActivate: TButton Left = 8 Top = 304 Width = 129 Height = 25 Caption = 'Activate' Enabled = False TabOrder = 8 OnClick = btnActivateClick end object btnDeactivate: TButton Left = 8 Top = 336 Width = 129 Height = 25 Caption = 'Deactivate' Enabled = False TabOrder = 9 OnClick = btnDeactivateClick end object gbInfo: TGroupBox Left = 8 Top = 376 Width = 265 Height = 161 Caption = 'Selected Device Info' TabOrder = 10 object Label12: TLabel Left = 4 Top = 24 Width = 41 Height = 13 Caption = 'Detector' end object Label13: TLabel Left = 4 Top = 48 Width = 55 Height = 13 Caption = 'Nr Of Pixels' end object Label28: TLabel Left = 4 Top = 80 Width = 66 Height = 13 Caption = 'FPGA Version' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] ParentFont = False end object Label29: TLabel Left = 4 Top = 103 Width = 96 Height = 13 Caption = 'AS5216 FW Version' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] ParentFont = False end object Label30: TLabel Left = 4 Top = 128 Width = 99 Height = 13 Caption = 'AS5216 DLL Version' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] ParentFont = False end object edtDetectorname: TEdit Left = 110 Top = 16 Width = 140 Height = 21 Color = clBtnFace ReadOnly = True TabOrder = 0 end object edtNrOfPixels: TEdit Left = 110 Top = 40 Width = 140 Height = 21 Color = clBtnFace ReadOnly = True TabOrder = 1 end object edtFPGAver: TEdit Left = 110 Top = 72 Width = 140 Height = 21 Color = clBtnFace ReadOnly = True TabOrder = 2 end object edtFWver: TEdit Left = 110 Top = 96 Width = 140 Height = 21 Color = clBtnFace ReadOnly = True TabOrder = 3 end object edtDLLver: TEdit Left = 110 Top = 120 Width = 140 Height = 21 Color = clBtnFace ReadOnly = True TabOrder = 4 end end object chkDisableGraph: TCheckBox Left = 320 Top = 672 Width = 145 Height = 17 Caption = 'Disable Graphical Output' TabOrder = 11 OnClick = chkDisableGraphClick end object btnDigIO: TButton Left = 8 Top = 560 Width = 129 Height = 25 Caption = 'Digital IO...' Enabled = False TabOrder = 12 OnClick = btnDigIOClick end object btnAnIO: TButton Left = 8 Top = 592 Width = 129 Height = 25 Caption = 'Analog IO...' Enabled = False TabOrder = 13 OnClick = btnAnIOClick end object btnShowEEProm: TButton Left = 8 Top = 632 Width = 129 Height = 25 Caption = 'Show EEProm parameters' Enabled = False TabOrder = 14 OnClick = btnShowEEPromClick end object MainMenu1: TMainMenu Left = 8 Top = 32 end end
20.542755
85
0.529167
6a453dd7b90a75ea3b187834ffa264592e72a5e6
47,011
pas
Pascal
units/uObjects.pas
BishopWolf/DelphiMath
bc03e918f2cbe6aad91e8153f5c7ae35abef75e2
[ "Apache-2.0" ]
1
2019-11-20T02:18:47.000Z
2019-11-20T02:18:47.000Z
units/uObjects.pas
BishopWolf/DelphiMath
bc03e918f2cbe6aad91e8153f5c7ae35abef75e2
[ "Apache-2.0" ]
null
null
null
units/uObjects.pas
BishopWolf/DelphiMath
bc03e918f2cbe6aad91e8153f5c7ae35abef75e2
[ "Apache-2.0" ]
2
2017-05-14T03:56:55.000Z
2019-11-20T02:18:48.000Z
unit uObjects; interface uses utypes, uComplex, umachar, uconstants, VarCmplx; type TVOKind = (VOFloat, VOinteger, VOWord, VOComplex, VOBoolean, VOString); TOVKind = record FData: TVector; IData: TIntVector; WData: TWordVector; CData: TCompVector; BData: TBoolVector; SData: TStrVector; end; TOVector = record private Data: TOVKind; FKind: TVOKind; FSize: Integer; procedure SetKind(const Value: TVOKind); procedure SetSize(const Value: Integer); function GetElemento(n: Integer): Variant; procedure SetElemento(n: Integer; const Value: Variant); public property Kind: TVOKind read FKind write SetKind; property Size: Integer read FSize write SetSize; constructor Create(Ub: Integer; wKind: TVOKind = VOFloat); property Elemento[n: Integer]: Variant read GetElemento write SetElemento; default; procedure destroy; { operator overloading } class operator Implicit(a: TOVector): TVector; // implicit typecast class operator Implicit(a: TVector): TOVector; class operator Implicit(a: TOVector): TIntVector; class operator Implicit(a: TIntVector): TOVector; class operator Implicit(a: TOVector): TWordVector; class operator Implicit(a: TWordVector): TOVector; class operator Implicit(a: TOVector): TCompVector; class operator Implicit(a: TCompVector): TOVector; class operator Implicit(a: TOVector): TStrVector; class operator Implicit(a: TStrVector): TOVector; class operator Explicit(a: TOVector): TVector; // explicit typecast class operator Explicit(a: TVector): TOVector; class operator Explicit(a: TOVector): TIntVector; class operator Explicit(a: TIntVector): TOVector; class operator Explicit(a: TOVector): TWordVector; class operator Explicit(a: TWordVector): TOVector; class operator Explicit(a: TOVector): TCompVector; class operator Explicit(a: TCompVector): TOVector; class operator Explicit(a: TOVector): TStrVector; class operator Explicit(a: TStrVector): TOVector; class operator Negative(a: TOVector): TOVector; // - b:=-a; class operator Positive(a: TOVector): TOVector; // + b:=+a; class operator Inc(a: TOVector): TOVector; // inc class operator Dec(a: TOVector): TOVector; // dec // class operator LogicalNot(a:TOVector):Boolean; //not // class operator BitwiseNot(a:TOVector):TOVector; //not class operator Trunc(a: TOVector): TOVector; class operator Round(a: TOVector): TOVector; class operator Equal(a: TOVector; b: TOVector): Boolean; // = class operator NotEqual(a: TOVector; b: TOVector): Boolean; // <> // class operator GreaterThan(a: TOVector; b: TOVector):Boolean; // > // class operator GreaterThanOrEqual(a: TOVector; b: TOVector):Boolean; // >= // class operator LessThan(a: TOVector; b: TOVector):Boolean; // < // class operator LessThanOrEqual(a: TOVector; b: TOVector):Boolean; // <= class operator Add(a: TOVector; b: TOVector): TOVector; // + c:=a+b; class operator Subtract(a: TOVector; b: TOVector): TOVector; // - c:=a-b; class operator Multiply(a: TOVector; b: TOVector): TOVector; // * c:=a*b; class operator Divide(a: TOVector; b: TOVector): TOVector; // / c:=a/b; class operator IntDivide(a: TOVector; b: TOVector): TOVector; // div c:=a div b; class operator Modulus(a: TOVector; b: TOVector): TOVector; // mod c:=a mod b; class operator LeftShift(a: TOVector; b: TOVector): TOVector; // shl class operator RightShift(a: TOVector; b: TOVector): TOVector; // shr // class operator LogicalAnd(a: TOVector; b: TOVector): Boolean; // and // class operator LogicalOr(a: TOVector; b: TOVector): Boolean; // or // class operator LogicalXor(a: TOVector; b: TOVector): Boolean; // xor class operator BitwiseAnd(a: TOVector; b: TOVector): TOVector; // and class operator BitwiseOr(a: TOVector; b: TOVector): TOVector; // or class operator BitwiseXor(a: TOVector; b: TOVector): TOVector; // xor end; TOMultiplicationKind = (TOMKItems, TOMKMatrix); TOMKind = record FData: TMatrix; IData: TIntMatrix; WData: TWordMatrix; CData: TCompMatrix; BData: TBoolMatrix; SData: TStrMatrix; end; TOMatrix = record private Data: TOMKind; FKind: TVOKind; FSizeX: Integer; FSizeY: Integer; FMultiplicationKind: TOMultiplicationKind; procedure SetKind(const Value: TVOKind); procedure SetSizeX(const Value: Integer); procedure SetMultiplicationKind(const Value: TOMultiplicationKind); procedure SetSizeY(const Value: Integer); function GetElemento(m, n: Integer): Variant; procedure SetElemento(m, n: Integer; const Value: Variant); public property Kind: TVOKind read FKind write SetKind; property SizeX: Integer read FSizeX write SetSizeX; property SizeY: Integer read FSizeY write SetSizeY; property Elemento[m, n: Integer]: Variant read GetElemento write SetElemento; default; property MultiplicationKind: TOMultiplicationKind read FMultiplicationKind write SetMultiplicationKind; constructor Create(Ub1, Ub2: Integer; wKind: TVOKind = VOFloat); overload; constructor Create(a: TMatrix); overload; constructor Create(a: TIntMatrix); overload; constructor Create(a: TCompMatrix); overload; constructor Create(a: TStrMatrix); overload; constructor Create(a: TWordMatrix); overload; constructor Create(a: TBoolMatrix); overload; procedure destroy; { operator overloading } class operator Implicit(a: TOMatrix): TMatrix; class operator Implicit(a: TMatrix): TOMatrix; class operator Implicit(a: TOMatrix): TCompMatrix; class operator Implicit(a: TCompMatrix): TOMatrix; class operator Negative(a: TOMatrix): TOMatrix; // - b:=-a; class operator Positive(a: TOMatrix): TOMatrix; // + b:=+a; class operator Inc(a: TOMatrix): TOMatrix; // inc class operator Dec(a: TOMatrix): TOMatrix; // dec // class operator LogicalNot(a:TOVector):Boolean; //not // class operator BitwiseNot(a:TOVector):TOVector; //not class operator Trunc(a: TOMatrix): TOMatrix; class operator Round(a: TOMatrix): TOMatrix; class operator Equal(a: TOMatrix; b: TOMatrix): Boolean; // = class operator NotEqual(a: TOMatrix; b: TOMatrix): Boolean; // <> // class operator GreaterThan(a: TOVector; b: TOVector):Boolean; // > // class operator GreaterThanOrEqual(a: TOVector; b: TOVector):Boolean; // >= // class operator LessThan(a: TOVector; b: TOVector):Boolean; // < // class operator LessThanOrEqual(a: TOVector; b: TOVector):Boolean; // <= class operator Add(a: TOMatrix; b: TOMatrix): TOMatrix; // + c:=a+b; class operator Subtract(a: TOMatrix; b: TOMatrix): TOMatrix; // - c:=a-b; class operator Multiply(a: TOMatrix; b: TOMatrix): TOMatrix; // * c:=a*b; class operator Divide(a: TOMatrix; b: TOMatrix): TOMatrix; // / c:=a/b; class operator IntDivide(a: TOMatrix; b: TOMatrix): TOMatrix; // div c:=a div b; class operator Modulus(a: TOMatrix; b: TOMatrix): TOMatrix; // mod c:=a mod b; function Inversa: TOMatrix; end; TO3DMKind = record FData: T3DMatrix; IData: T3DIntMatrix; WData: T3DWordMatrix; CData: T3DCompMatrix; BData: T3DBoolMatrix; SData: T3DStrMatrix; end; TO3DMatrix = record private Data: TO3DMKind; FKind: TVOKind; FSizeX: Integer; FSizeY: Integer; FSizeZ: Integer; FMultiplicationKind: TOMultiplicationKind; procedure SetKind(const Value: TVOKind); procedure SetSizeX(const Value: Integer); procedure SetSizeY(const Value: Integer); function GetElemento(m, n, o: Integer): Variant; procedure SetElemento(m, n, o: Integer; const Value: Variant); procedure SetSizeZ(const Value: Integer); public property Kind: TVOKind read FKind write SetKind; property SizeX: Integer read FSizeX write SetSizeX; property SizeY: Integer read FSizeY write SetSizeY; property SizeZ: Integer read FSizeZ write SetSizeZ; property Elemento[m, n, o: Integer]: Variant read GetElemento write SetElemento; default; constructor Create(Ub1, Ub2, Ub3: Integer; wKind: TVOKind = VOFloat); overload; constructor Create(a: T3DMatrix); overload; constructor Create(a: T3DIntMatrix); overload; constructor Create(a: T3DCompMatrix); overload; constructor Create(a: T3DStrMatrix); overload; constructor Create(a: T3DWordMatrix); overload; constructor Create(a: T3DBoolMatrix); overload; procedure destroy; { operator overloading } class operator Implicit(a: TO3DMatrix): T3DMatrix; class operator Implicit(a: T3DMatrix): TO3DMatrix; class operator Implicit(a: TO3DMatrix): T3DCompMatrix; class operator Implicit(a: T3DCompMatrix): TO3DMatrix; class operator Negative(a: TO3DMatrix): TO3DMatrix; // - b:=-a; class operator Positive(a: TO3DMatrix): TO3DMatrix; // + b:=+a; class operator Inc(a: TO3DMatrix): TO3DMatrix; // inc class operator Dec(a: TO3DMatrix): TO3DMatrix; // dec // class operator LogicalNot(a:TOVector):Boolean; //not // class operator BitwiseNot(a:TOVector):TOVector; //not class operator Trunc(a: TO3DMatrix): TO3DMatrix; class operator Round(a: TO3DMatrix): TO3DMatrix; class operator Equal(a: TO3DMatrix; b: TO3DMatrix): Boolean; // = class operator NotEqual(a: TO3DMatrix; b: TO3DMatrix): Boolean; // <> // class operator GreaterThan(a: TOVector; b: TOVector):Boolean; // > // class operator GreaterThanOrEqual(a: TOVector; b: TOVector):Boolean; // >= // class operator LessThan(a: TOVector; b: TOVector):Boolean; // < // class operator LessThanOrEqual(a: TOVector; b: TOVector):Boolean; // <= class operator Add(a: TO3DMatrix; b: TO3DMatrix): TO3DMatrix; // + c:=a+b; class operator Subtract(a: TO3DMatrix; b: TO3DMatrix): TO3DMatrix; // - c:=a-b; end; implementation uses uoperations, Dialogs, ustrings, uLU, variants; function DameKind(Kind1, Kind2: TVOKind): TVOKind; begin case Kind1 of VOFloat: case Kind2 of VOComplex: result := VOComplex; VOBoolean: result := VOBoolean; VOString: result := VOString; else result := VOFloat; end; VOinteger: case Kind2 of VOFloat: result := VOFloat; VOComplex: result := VOComplex; VOBoolean: result := VOBoolean; VOString: result := VOString; else result := VOinteger; end; VOWord: case Kind2 of VOinteger: result := VOinteger; VOFloat: result := VOFloat; VOComplex: result := VOComplex; VOBoolean: result := VOBoolean; VOString: result := VOString; else result := VOWord; end; VOComplex: case Kind2 of VOBoolean: result := VOBoolean; VOString: result := VOString; else result := VOComplex; end; VOBoolean: case Kind2 of VOString: result := VOString; else result := VOBoolean; end; else result := VOString; end; end; { TOVector } class operator TOVector.Add(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); result := TOVector.Create(a.Size, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.Size do result[i] := a[i] + b[i]; end; else goto error; end; end; VOBoolean: begin case b.Kind of VOBoolean: begin result.Data.BData := FSuma(a.Data.BData, b.Data.BData, a.Size); end; else goto error; end; end; VOString: begin case b.Kind of VOString: begin result.Data.SData := FSuma(a.Data.SData, b.Data.SData, a.Size); end; else goto error; end; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.BitwiseAnd(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); result := TOVector.Create(a.Size, lKind); case a.Kind of VOinteger, VOWord: case b.Kind of VOinteger, VOWord: begin for i := 1 to a.Size do result[i] := a[i] and b[i]; end; else goto error; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.BitwiseOr(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); result := TOVector.Create(a.Size, lKind); case a.Kind of VOinteger, VOWord: case b.Kind of VOinteger, VOWord: begin for i := 1 to a.Size do result[i] := a[i] or b[i]; end; else goto error; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.BitwiseXor(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); result := TOVector.Create(a.Size, lKind); case a.Kind of VOinteger, VOWord: case b.Kind of VOinteger, VOWord: begin for i := 1 to a.Size do result[i] := a[i] xor b[i]; end; else goto error; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; constructor TOVector.Create(Ub: Integer; wKind: TVOKind); begin Size := Ub; Kind := wKind; case Kind of VOFloat: DimVector(Data.FData, Size, 0); VOinteger: DimVector(Data.IData, Size, 0); VOWord: DimVector(Data.WData, Size, 0); VOComplex: DimVector(Data.CData, Size, TComplex(0, 0)); VOBoolean: DimVector(Data.BData, Size, false); VOString: DimVector(Data.SData, Size, ''); end; end; class operator TOVector.Dec(a: TOVector): TOVector; var i: Integer; begin case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.Size do a[i] := a[i] - 1; end else begin SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; result := a; end; procedure TOVector.destroy; begin case Kind of VOFloat: DelVector(Data.FData); VOinteger: DelVector(Data.IData); VOWord: DelVector(Data.WData); VOComplex: DelVector(Data.CData); VOBoolean: DelVector(Data.BData); VOString: DelVector(Data.SData); end; end; class operator TOVector.Divide(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin if DameKind(a.Kind, b.Kind) = VOComplex then lKind := VOComplex else lKind := VOFloat; result := TOVector.Create(a.Size, lKind); for i := 1 to a.Size do result[i] := a[i] / b[i]; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.Equal(a, b: TOVector): Boolean; var i: Integer; begin if a.Size = b.Size then begin result := true; case a.Kind of VOFloat: case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: for i := 1 to a.Size do result := result and (a[i] = b[i]); VOBoolean: result := false; VOString: for i := 1 to a.Size do result := result and (a[i] = Str2Float(b[i])); end; VOinteger: case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: for i := 1 to a.Size do result := result and (a[i] = b[i]); VOBoolean: result := false; VOString: for i := 1 to a.Size do result := result and (a[i] = Str2Int(b[i])); end; VOWord: case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: for i := 1 to a.Size do result := result and (a[i] = b[i]); VOBoolean: result := false; VOString: for i := 1 to a.Size do result := result and (a[i] = Str2Word(b[i])); end; VOComplex: case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: for i := 1 to a.Size do result := result and (a[i] = b[i]); VOBoolean: result := false; VOString: for i := 1 to a.Size do result := result and (a[i] = Str2Complex(b[i])); end; VOBoolean: case b.Kind of VOFloat, VOinteger, VOWord, VOComplex, VOString: result := false; VOBoolean: for i := 1 to a.Size do result := result and not(a[i] xor b[i]); end; VOString: case b.Kind of VOFloat: for i := 1 to a.Size do result := result and (Str2Float(a[i]) = b[i]); VOinteger: for i := 1 to a.Size do result := result and (Str2Int(a[i]) = b[i]); VOWord: for i := 1 to a.Size do result := result and (Str2Word(a[i]) = b[i]); VOComplex: for i := 1 to a.Size do result := result and (Str2Complex(a[i]) = b[i]); VOBoolean: result := false; VOString: for i := 1 to a.Size do result := result and StrCompare(a[i], b[i]); end; end; end else result := false; end; class operator TOVector.Explicit(a: TOVector): TIntVector; begin if a.Kind = VOinteger then result := a.Data.IData; end; class operator TOVector.Explicit(a: TVector): TOVector; var n: Integer; begin n := Trunc(a[0]); result := TOVector.Create(n, VOFloat); result.Data.FData := Clone(a, n); end; class operator TOVector.Explicit(a: TOVector): TVector; begin if a.Kind = VOFloat then result := a.Data.FData; end; class operator TOVector.Explicit(a: TIntVector): TOVector; var n: Integer; begin n := a[0]; result := TOVector.Create(n, VOinteger); result.Data.IData := Clone(a, n); end; class operator TOVector.Explicit(a: TCompVector): TOVector; var n: Integer; begin n := a[0]; result := TOVector.Create(n, VOComplex); result.Data.CData := Clone(a, n); end; class operator TOVector.Explicit(a: TOVector): TStrVector; begin if a.Kind = VOString then result := a.Data.SData; end; class operator TOVector.Explicit(a: TStrVector): TOVector; var n: Integer; begin n := Str2Int(a[0]); result := TOVector.Create(n, VOString); result.Data.SData := Clone(a, n); end; function TOVector.GetElemento(n: Integer): Variant; begin case FKind of VOFloat: result := Data.FData[n]; VOinteger: result := Data.IData[n]; VOWord: result := Data.WData[n]; VOComplex: result := VarComplexCreate(Data.CData[n].Real, Data.CData[n].Imaginary); VOBoolean: result := Data.BData[n]; VOString: result := Data.SData[n]; end; end; class operator TOVector.Explicit(a: TOVector): TWordVector; begin if a.Kind = VOWord then result := a.Data.WData; end; class operator TOVector.Explicit(a: TWordVector): TOVector; var n: Integer; begin n := a[0]; result := TOVector.Create(n, VOWord); result.Data.WData := Clone(a, n); end; class operator TOVector.Explicit(a: TOVector): TCompVector; begin if a.Kind = VOComplex then result := a.Data.CData; end; class operator TOVector.Implicit(a: TOVector): TIntVector; begin if a.Kind = VOinteger then result := a.Data.IData; end; class operator TOVector.Implicit(a: TVector): TOVector; var n: Integer; begin n := Trunc(a[0]); result := TOVector.Create(n, VOFloat); result.Data.FData := Clone(a, n); end; class operator TOVector.Implicit(a: TOVector): TVector; begin if a.Kind = VOFloat then result := a.Data.FData; end; class operator TOVector.Implicit(a: TIntVector): TOVector; var n: Integer; begin n := a[0]; result := TOVector.Create(n, VOinteger); result.Data.IData := Clone(a, n); end; class operator TOVector.Implicit(a: TCompVector): TOVector; var n: Integer; begin n := a[0]; result := TOVector.Create(n, VOComplex); result.Data.CData := Clone(a, n); end; class operator TOVector.Implicit(a: TOVector): TStrVector; begin if a.Kind = VOString then result := a.Data.SData; end; class operator TOVector.Implicit(a: TStrVector): TOVector; var n: Integer; begin n := Str2Int(a[0]); result := TOVector.Create(n, VOString); result.Data.SData := Clone(a, n); end; class operator TOVector.Implicit(a: TOVector): TWordVector; begin if a.Kind = VOWord then result := a.Data.WData; end; class operator TOVector.Implicit(a: TWordVector): TOVector; var n: Integer; begin n := a[0]; result := TOVector.Create(n, VOWord); result.Data.WData := Clone(a, n); end; class operator TOVector.Implicit(a: TOVector): TCompVector; begin if a.Kind = VOComplex then result := a.Data.CData; end; class operator TOVector.Inc(a: TOVector): TOVector; var i: Integer; begin case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: for i := 1 to a.Size do a[i] := a[i] + 1; else begin SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; result := a; end; class operator TOVector.IntDivide(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); if (lKind = VOinteger) or (lKind = VOWord) then result := TOVector.Create(a.Size, lKind) else goto error; for i := 1 to a.Size do result[i] := a[i] div b[i]; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.LeftShift(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); if (lKind = VOinteger) or (lKind = VOWord) then result := TOVector.Create(a.Size, lKind) else goto error; for i := 1 to a.Size do result[i] := a[i] shl b[i]; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.Modulus(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); if (lKind = VOinteger) or (lKind = VOWord) then result := TOVector.Create(a.Size, lKind) else goto error; for i := 1 to a.Size do result[i] := a[i] mod b[i]; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.Multiply(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); if (lKind = VOinteger) or (lKind = VOWord) then result := TOVector.Create(a.Size, lKind) else goto error; case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.Size do result[i] := a[i] * b[i]; end; else goto error; end; end; VOBoolean: begin case b.Kind of VOBoolean: begin for i := 1 to a.Size do result[i] := a[i] and b[i];; end; else goto error; end; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.Negative(a: TOVector): TOVector; var b: TOVector; i: Integer; begin b := TOVector.Create(a.Size, VOinteger); for i := 1 to a.Size do b[i] := -1; result := a * b; b.destroy; end; class operator TOVector.NotEqual(a, b: TOVector): Boolean; begin result := not(a = b); end; class operator TOVector.Positive(a: TOVector): TOVector; var b: TOVector; i: Integer; begin b := TOVector.Create(a.Size, VOinteger); for i := 1 to a.Size do b[i] := 1; result := a * b; b.destroy; end; class operator TOVector.RightShift(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); if (lKind = VOinteger) or (lKind = VOWord) then result := TOVector.Create(a.Size, lKind) else goto error; for i := 1 to a.Size do result[i] := a[i] shr b[i]; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.Round(a: TOVector): TOVector; var i: Integer; begin if a.Kind = VOFloat then begin result := TOVector.Create(a.Size, VOinteger); for i := 1 to a.Size do result[i] := Round(a[i]); end; end; procedure TOVector.SetElemento(n: Integer; const Value: Variant); begin case FKind of VOFloat: Data.FData[n] := VarAsType(Value, vtExtended); VOinteger: Data.IData[n] := VarAsType(Value, vtInteger); VOWord: Data.WData[n] := VarAsType(Value, vtInteger); VOComplex: begin Data.CData[n].Real := (VarAsComplex(Value) + VarComplexConjugate(Value)) / 2; Data.CData[n].Imaginary := (VarAsComplex(Value) - VarComplexConjugate(Value)) / 2; end; VOBoolean: Data.BData[n] := VarAsType(Value, vtBoolean); VOString: Data.SData[n] := VarAsType(Value, vtString); end; end; procedure TOVector.SetKind(const Value: TVOKind); begin FKind := Value; end; procedure TOVector.SetSize(const Value: Integer); begin FSize := Value; end; class operator TOVector.Subtract(a, b: TOVector): TOVector; var i: Integer; lKind: TVOKind; label error; begin if a.Size = b.Size then begin lKind := DameKind(a.Kind, b.Kind); result := TOVector.Create(a.Size, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.Size do result[i] := a[i] - b[i]; end; else goto error; end; end; VOBoolean: begin case b.Kind of VOBoolean: begin result.Data.BData := FResta(a.Data.BData, b.Data.BData, a.Size); end; else goto error; end; end; VOString: begin case b.Kind of VOString: begin result.Data.SData := FResta(a.Data.SData, b.Data.SData, a.Size); end; else goto error; end; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOVector.Trunc(a: TOVector): TOVector; var i: Integer; begin if a.Kind = VOFloat then begin result := TOVector.Create(a.Size, VOinteger); for i := 1 to a.Size do result[i] := Trunc(a[i]); end; end; { TOMatrix } class operator TOMatrix.Add(a, b: TOMatrix): TOMatrix; var i, j: Integer; lKind: TVOKind; label error; begin if (a.SizeX = b.SizeX) and (a.SizeY = b.SizeY) then begin lKind := DameKind(a.Kind, b.Kind); result := TOMatrix.Create(a.SizeX, a.SizeY, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.SizeX do for j := 1 to a.SizeY do result[i, j] := a[i, j] + b[i, j]; end; else goto error; end; end; VOBoolean: begin case b.Kind of VOBoolean: begin result.Data.BData := FSuma(a.Data.BData, b.Data.BData, a.SizeX, a.SizeY); end; else goto error; end; end; VOString: begin case b.Kind of VOString: begin result.Data.SData := FSuma(a.Data.SData, b.Data.SData, a.SizeX, a.SizeY); end; else goto error; end; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; constructor TOMatrix.Create(a: TMatrix); begin SetSizeX(Round(a[1, 0])); SetSizeY(Round(a[0, 1])); SetKind(VOFloat); Data.FData := a; end; constructor TOMatrix.Create(Ub1, Ub2: Integer; wKind: TVOKind); begin SetSizeX(Ub1); SetSizeY(Ub2); SetKind(wKind); case Kind of VOFloat: DimMatrix(Data.FData, Ub1, Ub2); VOinteger: DimMatrix(Data.IData, Ub1, Ub2); VOWord: DimMatrix(Data.WData, Ub1, Ub2); VOComplex: DimMatrix(Data.CData, Ub1, Ub2, 0); VOBoolean: DimMatrix(Data.BData, Ub1, Ub2); VOString: DimMatrix(Data.SData, Ub1, Ub2); end; end; class operator TOMatrix.Dec(a: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := (a[i, j] - 1); end; procedure TOMatrix.destroy; begin case Kind of VOFloat: DelMatrix(Data.FData); VOinteger: DelMatrix(Data.IData); VOWord: DelMatrix(Data.WData); VOComplex: DelMatrix(Data.CData); VOBoolean: DelMatrix(Data.BData); VOString: DelMatrix(Data.SData); end; end; class operator TOMatrix.Divide(a, b: TOMatrix): TOMatrix; var i, j: Integer; lKind: TVOKind; label error; begin if (a.SizeX = b.SizeX) and (a.SizeY = b.SizeY) then begin lKind := DameKind(a.Kind, b.Kind); result := TOMatrix.Create(a.SizeX, a.SizeY, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.SizeX do for j := 1 to a.SizeY do result[i, j] := a[i, j] / b[i, j]; end; else goto error; end; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOMatrix.Equal(a, b: TOMatrix): Boolean; var i, j: Integer; begin result := true; for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do begin result := result and (a[i, j] = b[i, j]); if not result then exit; end; end; function TOMatrix.GetElemento(m, n: Integer): Variant; begin case FKind of VOFloat: result := Data.FData[m, n]; VOinteger: result := Data.IData[m, n]; VOWord: result := Data.WData[m, n]; VOComplex: result := VarComplexCreate(Data.CData[m, n].Real, Data.CData[m, n].Imaginary); VOBoolean: result := Data.BData[m, n]; VOString: result := Data.SData[m, n]; end; end; class operator TOMatrix.Implicit(a: TMatrix): TOMatrix; begin result := TOMatrix.Create(a); end; class operator TOMatrix.Implicit(a: TOMatrix): TMatrix; begin result := a.Data.FData; end; class operator TOMatrix.Implicit(a: TCompMatrix): TOMatrix; begin result := TOMatrix.Create(a); end; class operator TOMatrix.Implicit(a: TOMatrix): TCompMatrix; begin result := a.Data.CData; end; class operator TOMatrix.Inc(a: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := (a[i, j] + 1); end; class operator TOMatrix.IntDivide(a, b: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := (a[i, j] div b[i, j]); end; function TOMatrix.Inversa: TOMatrix; var lLu: TLU; lLU_Comp: TLU_Comp; begin if (Self.SizeX = Self.SizeY) then begin case Self.FKind of VOFloat: begin lLu := TLU.Create(Self.Data.FData, 1, Self.FSizeX); result := lLu.InverseMatrix; lLu.Free; end; VOComplex: begin lLU_Comp := TLU_Comp.Create(Self.Data.CData, 1, Self.FSizeX); result := lLU_Comp.InverseMatrix; lLU_Comp.Free; end; end; end; end; class operator TOMatrix.Modulus(a, b: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := (a[i, j] mod b[i, j]); end; class operator TOMatrix.Multiply(a, b: TOMatrix): TOMatrix; var i, j, k: Integer; Fcount: float; ICount: Integer; Wcount: word; Ccount: Complex; lKind: TVOKind; label error; begin if a.MultiplicationKind = TOMKItems then begin if (a.SizeX = b.SizeX) and (a.SizeY = b.SizeY) then begin lKind := DameKind(a.Kind, b.Kind); result := TOMatrix.Create(a.SizeX, a.SizeY, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.SizeX do for j := 1 to a.SizeY do result[i, j] := a[i, j] * b[i, j]; end; else goto error; end; end; else goto error; end; end else goto error; end else begin // TOMKMatrix if (a.SizeX = b.SizeY) then begin lKind := DameKind(a.Kind, b.Kind); result := TOMatrix.Create(b.SizeX, a.SizeY, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.SizeX do for j := 1 to a.SizeY do begin Ccount := 0; for k := 1 to a.SizeX do Ccount := Ccount + a[k, j] * b[i, k]; result[i, j] := Ccount; end; end; else goto error; end; end; else goto error; end; end; end; exit; error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; class operator TOMatrix.Negative(a: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := -(a[i, j]); end; class operator TOMatrix.NotEqual(a, b: TOMatrix): Boolean; var i, j: Integer; begin result := true; for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do begin result := result and (a[i, j] <> b[i, j]); if not result then exit; end; end; class operator TOMatrix.Positive(a: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := +(a[i, j]); end; class operator TOMatrix.Round(a: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := Round(a[i, j]); end; procedure TOMatrix.SetElemento(m, n: Integer; const Value: Variant); begin case FKind of VOFloat: Data.FData[m, n] := VarAsType(Value, vtExtended); VOinteger: Data.IData[m, n] := VarAsType(Value, vtInteger); VOWord: Data.WData[m, n] := VarAsType(Value, vtInteger); VOComplex: begin Data.CData[m, n].Real := (VarAsComplex(Value) + VarComplexConjugate(Value)) / 2; Data.CData[m, n].Imaginary := (VarAsComplex(Value) - VarComplexConjugate(Value)) / 2; end; VOBoolean: Data.BData[m, n] := VarAsType(Value, vtBoolean); VOString: Data.SData[m, n] := VarAsType(Value, vtString); end; end; procedure TOMatrix.SetKind(const Value: TVOKind); begin FKind := Value; end; procedure TOMatrix.SetMultiplicationKind(const Value: TOMultiplicationKind); begin FMultiplicationKind := Value; end; procedure TOMatrix.SetSizeX(const Value: Integer); begin FSizeX := Value; end; procedure TOMatrix.SetSizeY(const Value: Integer); begin FSizeY := Value; end; class operator TOMatrix.Subtract(a, b: TOMatrix): TOMatrix; var i, j: Integer; lKind: TVOKind; label error; begin if (a.SizeX = b.SizeX) and (a.SizeY = b.SizeY) then begin lKind := DameKind(a.Kind, b.Kind); result := TOMatrix.Create(a.SizeX, a.SizeY, lKind); case a.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin case b.Kind of VOFloat, VOinteger, VOWord, VOComplex: begin for i := 1 to a.SizeX do for j := 1 to a.SizeY do result[i, j] := a[i, j] - b[i, j]; end; else goto error; end; end; VOBoolean: begin case b.Kind of VOBoolean: begin result.Data.BData := FResta(a.Data.BData, b.Data.BData, a.SizeX, a.SizeY); end; else goto error; end; end; VOString: begin case b.Kind of VOString: begin result.Data.SData := FResta(a.Data.SData, b.Data.SData, a.SizeX, a.SizeY); end; else goto error; end; end; else goto error; end; end else begin error: SetErrCode(FDomain); ShowMessage('Hubo errores'); end; end; class operator TOMatrix.Trunc(a: TOMatrix): TOMatrix; var i, j: Integer; begin result := TOMatrix.Create(a.FSizeX, a.FSizeY); for i := 1 to a.FSizeX do for j := 1 to a.FSizeY do result[i, j] := Trunc(a[i, j]); end; constructor TOMatrix.Create(a: TCompMatrix); begin SetSizeX(Round(a[1, 0].Real)); SetSizeY(Round(a[0, 1].Real)); SetKind(VOComplex); Data.CData := a; end; constructor TOMatrix.Create(a: TIntMatrix); begin SetSizeX(a[1, 0]); SetSizeY(a[0, 1]); SetKind(VOinteger); Data.IData := a; end; constructor TOMatrix.Create(a: TStrMatrix); begin SetSizeX(Str2Int(a[1, 0])); SetSizeY(Str2Int(a[0, 1])); SetKind(VOString); Data.SData := a; end; constructor TOMatrix.Create(a: TBoolMatrix); begin SetKind(VOBoolean); Data.BData := a; end; constructor TOMatrix.Create(a: TWordMatrix); begin SetSizeX(a[1, 0]); SetSizeY(a[0, 1]); SetKind(VOWord); Data.WData := a; end; { TO3DMatrix } class operator TO3DMatrix.Add(a, b: TO3DMatrix): TO3DMatrix; begin end; constructor TO3DMatrix.Create(a: T3DIntMatrix); begin SetSizeX(a[1, 0, 0]); SetSizeY(a[0, 1, 0]); SetSizeY(a[0, 0, 1]); SetKind(VOFloat); Data.IData := a; end; constructor TO3DMatrix.Create(a: T3DCompMatrix); begin SetSizeX(Round(a[1, 0, 0].Real)); SetSizeY(Round(a[0, 1, 0].Real)); SetSizeY(Round(a[0, 0, 1].Real)); SetKind(VOFloat); Data.CData := a; end; constructor TO3DMatrix.Create(Ub1, Ub2, Ub3: Integer; wKind: TVOKind); begin SetSizeX(Ub1); SetSizeY(Ub2); SetSizeZ(Ub3); SetKind(wKind); case Kind of VOFloat: DimMatrix(Data.FData, Ub1, Ub2, Ub3); VOinteger: DimMatrix(Data.IData, Ub1, Ub2, Ub3); VOWord: DimMatrix(Data.WData, Ub1, Ub2, Ub3); VOComplex: DimMatrix(Data.CData, Ub1, Ub2, Ub3, 0); VOBoolean: DimMatrix(Data.BData, Ub1, Ub2, Ub3); VOString: DimMatrix(Data.SData, Ub1, Ub2, Ub3); end; end; constructor TO3DMatrix.Create(a: T3DMatrix); begin SetSizeX(Round(a[1, 0, 0])); SetSizeY(Round(a[0, 1, 0])); SetSizeY(Round(a[0, 0, 1])); SetKind(VOFloat); Data.FData := a; end; constructor TO3DMatrix.Create(a: T3DBoolMatrix); begin end; constructor TO3DMatrix.Create(a: T3DWordMatrix); begin SetSizeX(a[1, 0, 0]); SetSizeY(a[0, 1, 0]); SetSizeY(a[0, 0, 1]); SetKind(VOFloat); Data.WData := a; end; constructor TO3DMatrix.Create(a: T3DStrMatrix); begin begin SetSizeX(Str2Int(a[1, 0, 0])); SetSizeY(Str2Int(a[0, 1, 0])); SetSizeY(Str2Int(a[0, 0, 1])); SetKind(VOFloat); Data.SData := a; end; end; class operator TO3DMatrix.Dec(a: TO3DMatrix): TO3DMatrix; begin end; procedure TO3DMatrix.destroy; begin case Kind of VOFloat: DelMatrix(Data.FData); VOinteger: DelMatrix(Data.IData); VOWord: DelMatrix(Data.WData); VOComplex: DelMatrix(Data.CData); VOBoolean: DelMatrix(Data.BData); VOString: DelMatrix(Data.SData); end; end; class operator TO3DMatrix.Equal(a, b: TO3DMatrix): Boolean; begin end; function TO3DMatrix.GetElemento(m, n, o: Integer): Variant; begin case FKind of VOFloat: result := Data.FData[m, n, o]; VOinteger: result := Data.IData[m, n, o]; VOWord: result := Data.WData[m, n, o]; VOComplex: result := VarComplexCreate(Data.CData[m, n, o].Real, Data.CData[m, n, o].Imaginary); VOBoolean: result := Data.BData[m, n, o]; VOString: result := Data.SData[m, n, o]; end; end; class operator TO3DMatrix.Implicit(a: TO3DMatrix): T3DCompMatrix; begin if a.Kind = VOComplex then result := a.Data.CData; end; class operator TO3DMatrix.Implicit(a: T3DCompMatrix): TO3DMatrix; begin end; class operator TO3DMatrix.Implicit(a: TO3DMatrix): T3DMatrix; begin if a.Kind = VOFloat then result := a.Data.FData; end; class operator TO3DMatrix.Implicit(a: T3DMatrix): TO3DMatrix; begin end; class operator TO3DMatrix.Inc(a: TO3DMatrix): TO3DMatrix; begin end; class operator TO3DMatrix.Negative(a: TO3DMatrix): TO3DMatrix; begin end; class operator TO3DMatrix.NotEqual(a, b: TO3DMatrix): Boolean; begin end; class operator TO3DMatrix.Positive(a: TO3DMatrix): TO3DMatrix; begin end; class operator TO3DMatrix.Round(a: TO3DMatrix): TO3DMatrix; begin end; procedure TO3DMatrix.SetElemento(m, n, o: Integer; const Value: Variant); begin case FKind of VOFloat: Data.FData[m, n, o] := VarAsType(Value, vtExtended); VOinteger: Data.IData[m, n, o] := VarAsType(Value, vtInteger); VOWord: Data.WData[m, n, o] := VarAsType(Value, vtInteger); VOComplex: begin Data.CData[m, n, o].Real := (VarAsComplex(Value) + VarComplexConjugate(Value)) / 2; Data.CData[m, n, o].Imaginary := (VarAsComplex(Value) - VarComplexConjugate(Value)) / 2; end; VOBoolean: Data.BData[m, n, o] := VarAsType(Value, vtBoolean); VOString: Data.SData[m, n, o] := VarAsType(Value, vtString); end; end; procedure TO3DMatrix.SetKind(const Value: TVOKind); begin FKind := Value; end; procedure TO3DMatrix.SetSizeX(const Value: Integer); begin FSizeX := Value; end; procedure TO3DMatrix.SetSizeY(const Value: Integer); begin FSizeY := Value; end; procedure TO3DMatrix.SetSizeZ(const Value: Integer); begin FSizeZ := Value; end; class operator TO3DMatrix.Subtract(a, b: TO3DMatrix): TO3DMatrix; begin end; class operator TO3DMatrix.Trunc(a: TO3DMatrix): TO3DMatrix; begin end; end.
25.356526
85
0.575482
f1cec16961ebfdbc30bdaeb68058a52fe23c6304
950
pas
Pascal
src/main_application/ViewModels/instrumentsviewmodel.pas
bravesoftdz/VKCommunityMessenger
6f144863daa1288d90dd7dd84f294db56c4cac64
[ "Apache-2.0" ]
null
null
null
src/main_application/ViewModels/instrumentsviewmodel.pas
bravesoftdz/VKCommunityMessenger
6f144863daa1288d90dd7dd84f294db56c4cac64
[ "Apache-2.0" ]
null
null
null
src/main_application/ViewModels/instrumentsviewmodel.pas
bravesoftdz/VKCommunityMessenger
6f144863daa1288d90dd7dd84f294db56c4cac64
[ "Apache-2.0" ]
1
2019-10-19T06:23:28.000Z
2019-10-19T06:23:28.000Z
unit instrumentsviewmodel; {$mode objfpc}{$H+} interface uses Classes, SysUtils, AbstractViewModel, AbstractModel, entities, MainModel; type { TInstrumentsViewModel } TInstrumentsViewModel = class(TInterfacedObject, IViewModel) private FModel: IModel; procedure SetModel(AModel: IModel); function GetModel: IModel; public procedure UpdateCommunityForChatBotSubSystem(Community: TCommunity); property Model: IModel read GetModel write SetModel; end; var LInstrumentsViewModel: TInstrumentsViewModel; implementation { TInstrumentsViewModel } procedure TInstrumentsViewModel.SetModel(AModel: IModel); begin if FModel <> AModel then FModel := AModel; end; function TInstrumentsViewModel.GetModel: IModel; begin Result := FModel; end; procedure TInstrumentsViewModel.UpdateCommunityForChatBotSubSystem( Community: TCommunity); begin (FModel as TMainModel).SaveCommunityInfo(Community); end; end.
19.387755
75
0.781053
83baf9026f4779bac5af44b5e28611438d5d8800
3,532
pas
Pascal
Source/GCHandle.pas
atkins126/IslandRTL
0da88feede6ff195964311babcfe30b66d4a7ce3
[ "BSD-2-Clause" ]
30
2016-10-21T15:48:10.000Z
2022-02-24T16:52:25.000Z
Source/GCHandle.pas
atkins126/IslandRTL
0da88feede6ff195964311babcfe30b66d4a7ce3
[ "BSD-2-Clause" ]
2
2017-04-26T10:49:59.000Z
2017-09-01T13:31:42.000Z
Source/GCHandle.pas
atkins126/IslandRTL
0da88feede6ff195964311babcfe30b66d4a7ce3
[ "BSD-2-Clause" ]
19
2016-12-05T18:26:37.000Z
2021-09-15T11:52:56.000Z
namespace RemObjects.Elements.System; type GCHandle = public record(IDisposable) private fHandle: NativeInt; public class method Allocate(aValue: Object): GCHandle; begin exit new GCHandle(GCHandles.Allocate(aValue)); end; method Dispose; begin GCHandles.Free(fHandle); end; constructor(aHandle: NativeInt); begin fHandle := aHandle; end; property Target: Object read GCHandles.Get(fHandle); property HasValue: Boolean read fHandle <> 0; property Handle: NativeInt read fHandle; end; GCHandles = static class private class var fLock: Monitor := new Monitor; class var fSlots: array of Object; class var fFirstEmpty: Integer := 0; class var fFirstFree: Integer := -1; (* Handle is an NativeInt, 0 isn't valid, 1 is entry [0], 2 is entry[1] etc. Intially if fCount < lengtH(fSlots) we put it there, else we check the firstfree list, else we allocate a new array. since pointers can't have bit 0 set, if they have it set it's a "free" slot, the value contains the signed index of the next free slot shifted 1, or -1 for "eof" *) public [SymbolName('__elements_gchandle_allocate')] class method Allocate(aValue: Object): NativeInt; begin if aValue = nil then raise new ArgumentException('Invalid object value'); locking fLock do begin if (fFirstFree = -1) and (fFirstEmpty >= length(fSlots)) then begin var lNewArray := new Object[length(fSlots) + 1024]; &Array.Copy(fSlots, lNewArray, length(fSlots)); fSlots := lNewArray; end; if fFirstEmpty < length(fSlots) then begin fSlots[fFirstEmpty] := aValue; inc(fFirstEmpty); exit fFirstEmpty; // +1 value since gchandle 0 is reserved. end; if fFirstFree <> -1 then begin result := fFirstFree; var lFirstFree := NativeInt(InternalCalls.Cast(fSlots[result])); assert((lFirstFree and 1) <> 0); fFirstFree := lFirstFree shr 1; fSlots[result] := aValue; inc(result); exit; end; end; end; [SymbolName('__elements_gchandle_get')] class method Get(aValue: NativeInt): Object; begin if aValue = 0 then raise new ArgumentException('Invalid GC Handle'); // not valid dec(aValue); if aValue >= length(fSlots) then raise new ArgumentException('Invalid GC Handle'); // we shouldn't need a lock as the value can't *update* underneath us result := fSlots[aValue]; if (NativeInt(InternalCalls.Cast(result)) = 0) or ((NativeInt(InternalCalls.Cast(result)) and 1) <> 0) then raise new ArgumentException('Invalid GC Handle'); // not valid end; [SymbolName('__elements_gchandle_free')] class method Free(aValue: NativeInt); begin if aValue = 0 then raise new ArgumentException('Invalid GC Handle'); // not valid dec(aValue); if aValue >= length(fSlots) then raise new ArgumentException('Invalid GC Handle'); locking fLock do begin var lValue := fSlots[aValue]; if (NativeInt(InternalCalls.Cast(lValue)) = 0) or ((NativeInt(InternalCalls.Cast(lValue)) and 1) <> 0) then raise new ArgumentException('Invalid GC Handle'); fSlots[aValue] := InternalCalls.Cast<Object>(^Void((fFirstFree shl 1) or 1)); fFirstFree := aValue; end; end; end; end.
37.574468
177
0.631653
f1b5000b9a57b079ba4b37789d7bfdacf125c557
28,791
pas
Pascal
sources/MVCFramework.RQL.Parser.pas
pedrooliveira01/delphimvcframework
7b82a06eb0786c72c6e4b667b426d32342b4bb62
[ "Apache-2.0" ]
1
2019-04-20T12:33:10.000Z
2019-04-20T12:33:10.000Z
sources/MVCFramework.RQL.Parser.pas
wdflota/delphimvcframework
4a52ced0faca88f2b169ceadb8946f2db129b38a
[ "Apache-2.0" ]
null
null
null
sources/MVCFramework.RQL.Parser.pas
wdflota/delphimvcframework
4a52ced0faca88f2b169ceadb8946f2db129b38a
[ "Apache-2.0" ]
1
2020-03-22T15:06:54.000Z
2020-03-22T15:06:54.000Z
// *************************************************************************** } // // Delphi MVC Framework // // Copyright (c) 2010-2020 Daniele Teti and the DMVCFramework Team // // https://github.com/danieleteti/delphimvcframework // // *************************************************************************** // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // *************************************************************************** unit MVCFramework.RQL.Parser; interface uses System.Generics.Collections, System.Math, System.SysUtils, MVCFramework.Commons; { http://www.persvr.org/rql/ https://github.com/persvr/rql http://dundalek.com/rql https://www.sitepen.com/blog/2010/11/02/resource-query-language-a-query-language-for-the-web-nosql/ Here is a definition of the common operators (individual stores may have support for more less operators): eq(<property>,<value>) - Filters for objects where the specified property's value is equal to the provided value lt(<property>,<value>) - Filters for objects where the specified property's value is less than the provided value le(<property>,<value>) - Filters for objects where the specified property's value is less than or equal to the provided value gt(<property>,<value>) - Filters for objects where the specified property's value is greater than the provided value ge(<property>,<value>) - Filters for objects where the specified property's value is greater than or equal to the provided value ne(<property>,<value>) - Filters for objects where the specified property's value is not equal to the provided value and(<query>,<query>,...) - Applies all the given queries or(<query>,<query>,...) - The union of the given queries sort(<+|-><property) - Sorts by the given property in order specified by the prefix (+ for ascending, - for descending) limit(count,start,maxCount) - Returns the given range of objects from the result set contains(<property>,<value | expression>) - Filters for objects where the specified property's value is an array and the array contains any value that equals the provided value or satisfies the provided expression. in(<property>,<array-of-values>) - Filters for objects where the specified property's value is in the provided array //////NOT AVAILABLES select(<property>,<property>,...) - Trims each object down to the set of properties defined in the arguments values(<property>) - Returns an array of the given property value for each object aggregate(<property|function>,...) - Aggregates the array, grouping by objects that are distinct for the provided properties, and then reduces the remaining other property values using the provided functions distinct() - Returns a result set with duplicates removed out(<property>,<array-of-values>) - Filters for objects where the specified property's value is not in the provided array excludes(<property>,<value | expression>) - Filters for objects where the specified property's value is an array and the array does not contain any of value that equals the provided value or satisfies the provided expression. rel(<relation name?>,<query>) - Applies the provided query against the linked data of the provided relation name. sum(<property?>) - Finds the sum of every value in the array or if the property argument is provided, returns the sum of the value of property for every object in the array mean(<property?>) - Finds the mean of every value in the array or if the property argument is provided, returns the mean of the value of property for every object in the array max(<property?>) - Finds the maximum of every value in the array or if the property argument is provided, returns the maximum of the value of property for every object in the array min(<property?>) - Finds the minimum of every value in the array or if the property argument is provided, returns the minimum of the value of property for every object in the array recurse(<property?>) - Recursively searches, looking in children of the object as objects in arrays in the given property value first() - Returns the first record of the query's result set one() - Returns the first and only record of the query's result set, or produces an error if the query's result set has more or less than one record in it. count() - Returns the count of the number of records in the query's result set } type TRQLToken = (tkEq, tkLt, tkLe, tkGt, tkGe, tkNe, tkAnd, tkOr, tkSort, tkLimit, { RQL } tkAmpersand, tkEOF, tkOpenPar, tkClosedPar, tkOpenBracket, tkCloseBracket, tkComma, tkSemicolon, tkPlus, tkMinus, tkDblQuote, tkQuote, tkSpace, tkContains, tkIn, tkUnknown); TRQLValueType = (vtInteger, vtString, vtBoolean, vtNull, vtIntegerArray, vtStringArray); TRQLCustom = class; TRQLAbstractSyntaxTree = class(TObjectList<TRQLCustom>) public constructor Create; function TreeContainsToken(const aToken: TRQLToken): Boolean; end; TRQLCompiler = class abstract private fMapping: TMVCFieldsMapping; protected function GetDatabaseFieldName(const RQLPropertyName: string): string; public constructor Create(const Mapping: TMVCFieldsMapping); virtual; procedure AST2SQL(const aRQLAST: TRQLAbstractSyntaxTree; out aSQL: string); virtual; abstract; end; TRQLCompilerClass = class of TRQLCompiler; TRQLCustom = class abstract public Token: TRQLToken; constructor Create; virtual; end; TRQLCustomOperator = class abstract(TRQLCustom) end; TRQLWhere = class(TRQLCustom) end; /// <summary> /// "limit" function. "Start" is 0 based. /// </summary> TRQLLimit = class(TRQLCustom) public Start: Int64; Count: Int64; end; TRQLFilter = class(TRQLCustomOperator) public OpLeft: string; OpRight: string; OpRightArray: TArray<String>; RightValueType: TRQLValueType; end; TRQLLogicOperator = class(TRQLCustom) private fRQLFilter: TObjectList<TRQLCustom>; public constructor Create(const Token: TRQLToken); reintroduce; destructor Destroy; override; property FilterAST: TObjectList<TRQLCustom> read fRQLFilter; procedure AddRQLCustom(const aRQLCustom: TRQLCustom); end; TRQLSort = class(TRQLCustom) private fFields: TList<string>; fSigns: TList<string>; public constructor Create; override; destructor Destroy; override; procedure Add(const Sign, FieldName: string); property Fields: TList<string> read fFields; property Signs: TList<string> read fSigns; const SIGNS_DESCR: array [tkPlus .. tkMinus] of string = ('+', '-'); end; ERQLException = class(Exception) end; ERQLCompilerNotFound = class(ERQLException) end; TRQL2SQL = class private fCurIdx: Integer; fInput: string; fAST: TRQLAbstractSyntaxTree; fSavedPos: Integer; fInputLength: Integer; fCurr: Char; fCurrToken: TRQLToken; fMaxRecordCount: Int64; protected /// /// RQL Sections function ParseFilters: Boolean; function ParseSort: Boolean; function ParseLimit: Boolean; /// ///RQL functions procedure ParseBinOperator(const aToken: TRQLToken; const aAST: TObjectList<TRQLCustom>); procedure ParseLogicOperator(const aToken: TRQLToken; const aAST: TObjectList<TRQLCustom>); procedure ParseSortLimit(const Required: Boolean); /// //Parser utils function MatchFieldName(out lFieldName: string): Boolean; function MatchFieldStringValue(out lFieldValue: string): Boolean; function MatchFieldNumericValue(out lFieldValue: string): Boolean; function MatchFieldArrayValue(out lFieldValue: string): Boolean; function MatchFieldBooleanValue(out lFieldValue: string): Boolean; function MatchFieldNullValue(out lFieldValue: string): Boolean; function MatchSymbol(const Symbol: Char): Boolean; procedure SaveCurPos; procedure BackToLastPos; function C(const LookAhead: UInt8 = 0): Char; function GetToken: TRQLToken; procedure Skip(const Count: UInt8); procedure Error(const Message: string); function IsLetter(const aChar: Char): Boolean; function IsDigit(const aChar: Char): Boolean; procedure EatWhiteSpaces; procedure CheckEOF(const Token: TRQLToken); public constructor Create(const MaxRecordCount: Integer = -1); destructor Destroy; override; procedure Execute( const RQL: string; out SQL: string; const RQLCompiler: TRQLCompiler; const UseLimit: Boolean = true); end; TRQLCompilerRegistry = class sealed private class var sInstance: TRQLCompilerRegistry; class var _Lock: TObject; fCompilers: TDictionary<string, TRQLCompilerClass>; protected constructor Create; public destructor Destroy; override; class function Instance: TRQLCompilerRegistry; class destructor Destroy; class constructor Create; procedure RegisterCompiler( const aBackend: string; const aRQLBackendClass: TRQLCompilerClass); procedure UnRegisterCompiler(const aBackend: string); function GetCompiler(const aBackend: string): TRQLCompilerClass; function RegisteredCompilers: TArray<string>; end; implementation uses System.Character, System.StrUtils; { TRQL2SQL } procedure TRQL2SQL.BackToLastPos; begin fCurIdx := fSavedPos; end; function TRQL2SQL.C(const LookAhead: UInt8): Char; begin if fCurIdx + LookAhead >= fInputLength then Exit(#0); Result := fInput.Chars[fCurIdx + LookAhead]; fCurr := fInput.Chars[fCurIdx]; end; procedure TRQL2SQL.CheckEOF(const Token: TRQLToken); begin if Token = tkEOF then Error('Unexpected end of expression'); end; constructor TRQL2SQL.Create(const MaxRecordCount: Integer); begin inherited Create; fAST := TRQLAbstractSyntaxTree.Create; fMaxRecordCount := MaxRecordCount; end; destructor TRQL2SQL.Destroy; begin fAST.Free; inherited; end; procedure TRQL2SQL.EatWhiteSpaces; var lToken: TRQLToken; begin while true do begin SaveCurPos; lToken := GetToken; if lToken <> tkSpace then begin BackToLastPos; Break; end else begin Skip(1); end; end; end; procedure TRQL2SQL.Error(const Message: string); var I: Integer; lMsg: string; begin lMsg := ''; for I := 0 to 4 do begin lMsg := lMsg + IfThen(C(I) = #0, '', C(I)); end; if lMsg.Trim.IsEmpty then lMsg := '<EOF>'; raise ERQLException.CreateFmt('[Error] %s (column %d - found %s)', [message, fCurIdx, lMsg]); end; procedure TRQL2SQL.Execute( const RQL: string; out SQL: string; const RQLCompiler: TRQLCompiler; const UseLimit: Boolean); var lLimit: TRQLLimit; begin fAST.Clear; fCurIdx := 0; fCurrToken := tkUnknown; fInput := RQL.Trim; fInputLength := Length(RQL); { filters&sort&limit filters&sort filters&limit &sort&limit sort limit } EatWhiteSpaces; if ParseFilters then begin fAST.Insert(0, TRQLWhere.Create); if GetToken = tkSemicolon then begin ParseSortLimit(true); end; end else begin ParseSortLimit(False); end; EatWhiteSpaces; if GetToken <> tkEOF then Error('Expected EOF'); // add artificial limit if UseLimit and (fMaxRecordCount > -1) and (not fAST.TreeContainsToken(tkLimit)) then begin lLimit := TRQLLimit.Create; fAST.Add(lLimit); lLimit.Token := tkLimit; lLimit.Start := 0; lLimit.Count := fMaxRecordCount; end; // Emit code from AST using backend RQLCompiler.AST2SQL(fAST, SQL); // Emit code from AST using backend // lCompilerClass := TRQLCompilerRegistry.Instance.GetCompiler(RQLBackend); // lCompiler := lCompilerClass.Create(Mapping); // try // lCompiler.AST2SQL(fAST, SQL); // finally // lCompiler.Free; // end; end; function TRQL2SQL.GetToken: TRQLToken; var lChar: Char; begin lChar := C(0); if (lChar = #0) then begin fCurrToken := tkEOF; Exit(fCurrToken); end; if (lChar = ',') then begin Skip(1); fCurrToken := tkComma; Exit(fCurrToken); end; if (lChar = ';') then begin Skip(1); fCurrToken := tkSemicolon; Exit(fCurrToken); end; if (lChar = '+') then begin Skip(1); fCurrToken := tkPlus; Exit(fCurrToken); end; if (lChar = '"') then begin Skip(1); fCurrToken := tkDblQuote; Exit(fCurrToken); end; if (lChar = '''') then begin Skip(1); fCurrToken := tkQuote; Exit(fCurrToken); end; if (lChar = '-') then begin Skip(1); fCurrToken := tkMinus; Exit(fCurrToken); end; if (lChar = '&') then begin Skip(1); fCurrToken := tkAmpersand; Exit(fCurrToken); end; if (lChar = '(') then begin Skip(1); fCurrToken := tkOpenPar; Exit(fCurrToken); end; if (lChar = ')') then begin Skip(1); fCurrToken := tkClosedPar; Exit(fCurrToken); end; if (lChar = '[') then begin Skip(1); fCurrToken := tkOpenBracket; Exit(fCurrToken); end; if (lChar = ']') then begin Skip(1); fCurrToken := tkCloseBracket; Exit(fCurrToken); end; if (lChar = 'e') and (C(1) = 'q') then begin Skip(2); fCurrToken := tkEq; Exit(fCurrToken); end; if (lChar = 'l') and (C(1) = 't') then begin Skip(2); fCurrToken := tkLt; Exit(fCurrToken); end; if (lChar = 'l') and (C(1) = 'e') then begin Skip(2); fCurrToken := tkLe; Exit(fCurrToken); end; if (lChar = 'g') and (C(1) = 't') then begin Skip(2); fCurrToken := tkGt; Exit(fCurrToken); end; if (lChar = 'g') and (C(1) = 'e') then begin Skip(2); fCurrToken := tkGe; Exit(fCurrToken); end; if (lChar = 'n') and (C(1) = 'e') then begin Skip(2); fCurrToken := tkNe; Exit(fCurrToken); end; if (lChar = 'a') and (C(1) = 'n') and (C(2) = 'd') then begin Skip(3); fCurrToken := tkAnd; Exit(fCurrToken); end; if (lChar = 'o') and (C(1) = 'r') then begin Skip(2); fCurrToken := tkOr; Exit(fCurrToken); end; if (lChar = 's') and (C(1) = 'o') and (C(2) = 'r') and (C(3) = 't') then begin Skip(4); fCurrToken := tkSort; Exit(fCurrToken); end; if (lChar = 'l') and (C(1) = 'i') and (C(2) = 'm') and (C(3) = 'i') and (C(4) = 't') then begin Skip(5); fCurrToken := tkLimit; Exit(fCurrToken); end; if (lChar = 'c') and (C(1) = 'o') and (C(2) = 'n') and (C(3) = 't') and (C(4) = 'a') and (C(5) = 'i') and (C(6) = 'n') and (C(7) = 's') then begin Skip(8); fCurrToken := tkContains; Exit(fCurrToken); end; if (lChar = 'i') and (C(1) = 'n') then begin Skip(2); fCurrToken := tkIn; Exit(fCurrToken); end; if (lChar = ' ') then begin fCurrToken := tkSpace; Exit(fCurrToken); end; fCurrToken := tkUnknown; Exit(fCurrToken); end; function TRQL2SQL.IsDigit(const aChar: Char): Boolean; begin Result := (aChar >= '0') and (aChar <= '9'); end; function TRQL2SQL.IsLetter(const aChar: Char): Boolean; begin Result := ((aChar >= 'a') and (aChar <= 'z')) or ((aChar >= 'A') and (aChar <= 'Z')); end; { eq(<property>,<value>) } procedure TRQL2SQL.ParseBinOperator(const aToken: TRQLToken; const aAST: TObjectList<TRQLCustom>); var lFieldName, lFieldValue: string; lBinOp: TRQLFilter; lValueType: TRQLValueType; lToken: TRQLToken; lList: TList<String>; lArrayValue: TArray<String>; begin lValueType := TRQLValueType.vtInteger; //default EatWhiteSpaces; if GetToken <> tkOpenPar then Error('Expected "("'); EatWhiteSpaces; if not MatchFieldName(lFieldName) then Error('Expected field'); EatWhiteSpaces; if GetToken <> tkComma then Error('Expected comma'); EatWhiteSpaces; SaveCurPos; lToken := GetToken; if lToken = tkDblQuote then begin if not MatchFieldStringValue(lFieldValue) then Error('Expected string value'); if not MatchSymbol('"') then Error('Unclosed string'); lValueType := vtString; end else if (aToken = tkIn) and (lToken = tkOpenBracket) then begin lList := TList<String>.Create; try // if not MatchFieldArrayValue(lFieldValue) then // Error('Expected array value'); EatWhiteSpaces; if C(0) = '"' then begin Skip(1); lValueType := vtStringArray; while MatchFieldStringValue(lFieldValue) do begin lList.Add(lFieldValue); if not MatchSymbol('"') then Error('Expected ''"'''); EatWhiteSpaces; if not MatchSymbol(',') then Break; EatWhiteSpaces; if GetToken <> tkDblQuote then Error('Expected ["]'); end; end else begin lValueType := vtIntegerArray; while MatchFieldNumericValue(lFieldValue) do begin lList.Add(lFieldValue); EatWhiteSpaces; if not MatchSymbol(',') then Break; EatWhiteSpaces; end; end; if not MatchSymbol(']') then Error('Unclosed bracket'); lArrayValue := lList.ToArray; finally lList.Free; end; end else begin BackToLastPos; if MatchFieldBooleanValue(lFieldValue) then lValueType := vtBoolean else if MatchFieldNullValue(LFieldValue) then lValueType := vtNull else if MatchFieldNumericValue(lFieldValue) then lValueType := vtInteger else Error('Expected numeric, boolean or null value'); end; EatWhiteSpaces; if GetToken <> tkClosedPar then Error('Expected ")"'); lBinOp := TRQLFilter.Create; aAST.Add(lBinOp); lBinOp.Token := aToken; lBinOp.OpLeft := lFieldName; lBinOp.RightValueType := lValueType; if lBinOp.RightValueType in [vtIntegerArray, vtStringArray] then lBinOp.OpRightArray := lArrayValue else lBinOp.OpRight := lFieldValue; end; function TRQL2SQL.ParseFilters: Boolean; var lTk: TRQLToken; begin EatWhiteSpaces; SaveCurPos; Result := true; lTk := GetToken; case lTk of tkEq, tkLt, tkLe, tkGt, tkGe, tkNe, tkContains, tkIn: begin ParseBinOperator(lTk, fAST); end; tkAnd, tkOr: begin ParseLogicOperator(lTk, fAST); end; else begin Result := False; BackToLastPos; end; end; end; function TRQL2SQL.ParseLimit: Boolean; var lStart: string; lCount: string; lRQLLimit: TRQLLimit; begin SaveCurPos; if GetToken <> tkLimit then begin BackToLastPos; Exit(False); end; if GetToken <> tkOpenPar then Error('Expected "("'); if not MatchFieldNumericValue(lStart) then Error('Expected number'); if GetToken <> tkComma then Error('Expected comma'); if not MatchFieldNumericValue(lCount) then Error('Expected number'); if GetToken <> tkClosedPar then Error('Expected ")"'); lRQLLimit := TRQLLimit.Create; fAST.Add(lRQLLimit); lRQLLimit.Token := tkLimit; lRQLLimit.Start := StrToInt64(lStart); // XE7 compat if fMaxRecordCount > -1 then begin lRQLLimit.Count := Min(StrToInt64(lCount), fMaxRecordCount); end else begin lRQLLimit.Count := StrToInt64(lCount); end; Result := true; end; procedure TRQL2SQL.ParseLogicOperator(const aToken: TRQLToken; const aAST: TObjectList<TRQLCustom>); var lToken: TRQLToken; lLogicOp: TRQLLogicOperator; begin EatWhiteSpaces; lToken := GetToken; if lToken <> tkOpenPar then Error('Expected "("'); EatWhiteSpaces; lLogicOp := TRQLLogicOperator.Create(aToken); aAST.Add(lLogicOp); while true do begin EatWhiteSpaces; lToken := GetToken; case lToken of tkEq, tkLt, tkLe, tkGt, tkGe, tkNe, tkContains, tkIn: begin ParseBinOperator(lToken, lLogicOp.FilterAST); end; tkAnd, tkOr: begin ParseLogicOperator(lToken, lLogicOp.FilterAST); end; tkComma: begin // do nothing end; tkClosedPar: begin Break; end; else Error('Expected ")" or <Filter>'); end; end; end; function TRQL2SQL.ParseSort: Boolean; var lToken: TRQLToken; lFieldName: string; lSort: TRQLSort; begin Result := true; SaveCurPos; if GetToken <> tkSort then begin BackToLastPos; Exit(False); end; if GetToken <> tkOpenPar then Error('Expected "("'); lSort := TRQLSort.Create; fAST.Add(lSort); lSort.Token := tkSort; while true do begin EatWhiteSpaces; lToken := GetToken; if not(lToken in [tkPlus, tkMinus]) then Error('Expected "+" or "-"'); if not MatchFieldName(lFieldName) then Error('Expected field name'); lSort.Add(TRQLSort.SIGNS_DESCR[lToken], lFieldName); SaveCurPos; if GetToken <> tkComma then begin BackToLastPos; Break; end; end; if GetToken <> tkClosedPar then Error('Expected ")"'); end; procedure TRQL2SQL.ParseSortLimit(const Required: Boolean); var lFoundSort: Boolean; lFoundLimit: Boolean; begin EatWhiteSpaces; lFoundSort := ParseSort; EatWhiteSpaces; SaveCurPos; if GetToken <> tkSemicolon then begin BackToLastPos; end; lFoundLimit := ParseLimit; if Required and (not(lFoundSort or lFoundLimit)) then Error('Expected "sort" and/or "limit"'); end; procedure TRQL2SQL.SaveCurPos; begin fSavedPos := fCurIdx; end; procedure TRQL2SQL.Skip(const Count: UInt8); begin Inc(fCurIdx, Count); end; function TRQL2SQL.MatchFieldArrayValue(out lFieldValue: string): Boolean; var lStrFieldValue: string; lNumFieldValue: string; lIntValue: string; begin EatWhiteSpaces; if GetToken = tkDblQuote then begin while MatchFieldStringValue(lStrFieldValue) do begin MatchSymbol('"'); EatWhiteSpaces; if GetToken = tkComma then begin EatWhiteSpaces; MatchSymbol('"'); Continue; end else begin Skip(1); if GetToken <> tkDblQuote then begin Exit(true); end; end; end; end else begin MatchFieldNumericValue(lIntValue); end; while MatchFieldNumericValue(lNumFieldValue) do begin EatWhiteSpaces; if MatchSymbol(',') then begin Continue; end else begin Exit(true); end; end; Result := False; end; function TRQL2SQL.MatchFieldBooleanValue(out lFieldValue: string): Boolean; var lChar: Char; begin lFieldValue := ''; lChar := C(0).ToLower; if (lChar = 't') and (C(1).ToLower = 'r') and (C(2).ToLower = 'u') and (C(3).ToLower = 'e') then begin Skip(4); Result := True; lFieldValue := 'true'; end else if (lChar = 'f') and (C(1).ToLower = 'a') and (C(2).ToLower = 'l') and (C(3).ToLower = 's') and (C(4).ToLower = 'e') then begin Skip(5); Result := True; lFieldValue := 'false'; end else Exit(False) end; function TRQL2SQL.MatchFieldName(out lFieldName: string): Boolean; var lChar: Char; begin Result := true; lChar := C(0); if IsLetter(lChar) then begin lFieldName := lChar; while true do begin Skip(1); lChar := C(0); if IsLetter(lChar) or IsDigit(lChar) or (CharInSet(lChar, ['_'])) then begin lFieldName := lFieldName + lChar; end else Break; end; end else Exit(False); end; function TRQL2SQL.MatchFieldNullValue(out lFieldValue: string): Boolean; var lChar: Char; begin lFieldValue := ''; lChar := C(0).ToLower; if (lChar = 'n') and (C(1).ToLower = 'u') and (C(2).ToLower = 'l') and (C(3).ToLower = 'l') then begin Skip(4); Result := True; lFieldValue := 'NULL'; end else Exit(False) end; function TRQL2SQL.MatchFieldNumericValue(out lFieldValue: string): Boolean; var lChar: Char; begin Result := true; lFieldValue := ''; lChar := C(0); if CharInSet(lChar, ['+', '-']) then begin lFieldValue := lChar; Skip(1); lChar := C(0); end; if IsDigit(lChar) then begin lFieldValue := lFieldValue + lChar; while true do begin Skip(1); lChar := C(0); if IsDigit(lChar) then begin lFieldValue := lFieldValue + lChar; end else Break; end; end else Exit(False); end; function TRQL2SQL.MatchFieldStringValue(out lFieldValue: string): Boolean; var lChar: Char; begin Result := true; while true do begin lChar := C(0); // escape chars if lChar = '\' then begin if C(1) = '"' then begin lFieldValue := lFieldValue + '"'; Skip(2); Continue; end; end; SaveCurPos; CheckEOF(GetToken); BackToLastPos; if lChar <> '"' then begin lFieldValue := lFieldValue + lChar; end else Break; Skip(1); end; end; function TRQL2SQL.MatchSymbol(const Symbol: Char): Boolean; begin Result := C(0) = Symbol; if Result then Skip(1); end; { TRQLCustom } constructor TRQLCustom.Create; begin inherited; Token := tkUnknown; end; { TRQLLogicOperator } procedure TRQLLogicOperator.AddRQLCustom(const aRQLCustom: TRQLCustom); begin fRQLFilter.Add(aRQLCustom); end; constructor TRQLLogicOperator.Create(const Token: TRQLToken); begin inherited Create; Self.Token := Token; fRQLFilter := TObjectList<TRQLCustom>.Create(true); end; destructor TRQLLogicOperator.Destroy; begin fRQLFilter.Free; inherited; end; procedure TRQLSort.Add(const Sign, FieldName: string); begin if (Sign <> '+') and (Sign <> '-') then raise Exception.Create('Invalid Sign: ' + Sign); fFields.Add(FieldName); fSigns.Add(Sign); end; constructor TRQLSort.Create; begin inherited; fFields := TList<string>.Create; fSigns := TList<string>.Create; end; destructor TRQLSort.Destroy; begin fFields.Free; fSigns.Free; inherited; end; constructor TRQLCompilerRegistry.Create; begin inherited; fCompilers := TDictionary<string, TRQLCompilerClass>.Create; end; destructor TRQLCompilerRegistry.Destroy; begin fCompilers.Free; inherited; end; class constructor TRQLCompilerRegistry.Create; begin _Lock := TObject.Create; end; class destructor TRQLCompilerRegistry.Destroy; begin _Lock.Free; sInstance.Free; end; function TRQLCompilerRegistry.GetCompiler(const aBackend: string): TRQLCompilerClass; begin if not fCompilers.TryGetValue(aBackend, Result) then begin raise ERQLCompilerNotFound.Create('RQL Compiler not found'); end; end; class function TRQLCompilerRegistry.Instance: TRQLCompilerRegistry; begin if not Assigned(sInstance) then begin TMonitor.Enter(_Lock); try if not Assigned(sInstance) then begin sInstance := TRQLCompilerRegistry.Create; end; finally TMonitor.Exit(_Lock); end; end; Result := sInstance; end; procedure TRQLCompilerRegistry.RegisterCompiler(const aBackend: string; const aRQLBackendClass: TRQLCompilerClass); begin fCompilers.AddOrSetValue(aBackend, aRQLBackendClass); end; function TRQLCompilerRegistry.RegisteredCompilers: TArray<string>; begin Result := fCompilers.Keys.ToArray; end; procedure TRQLCompilerRegistry.UnRegisterCompiler(const aBackend: string); begin fCompilers.Remove(aBackend); end; { TRQLCompiler } constructor TRQLCompiler.Create(const Mapping: TMVCFieldsMapping); begin inherited Create; fMapping := Mapping; end; function TRQLCompiler.GetDatabaseFieldName( const RQLPropertyName: string): string; var lField: TMVCFieldMap; lRQLProperty: string; begin if Length(fMapping) = 0 then begin { If there isn't a mapping, then just pass the RQLProperty as DataBaseFieldName } Result := RQLPropertyName; Exit; end; lRQLProperty := RQLPropertyName.ToLower; for lField in fMapping do begin if lField.InstanceFieldName = lRQLProperty then Exit(lField.DatabaseFieldName); end; raise ERQLException.CreateFmt('Property %s does not exist or is transient and cannot be used in RQL', [RQLPropertyName]); end; { TRQLAbstractSyntaxTree } constructor TRQLAbstractSyntaxTree.Create; begin inherited Create(true); end; function TRQLAbstractSyntaxTree.TreeContainsToken( const aToken: TRQLToken): Boolean; var lItem: TRQLCustom; begin Result := False; for lItem in Self do begin if lItem.Token = aToken then Exit(true); end; end; end.
24.482143
227
0.668959
6a431d3b57d7c7e33397406aa3a6a5f212e05406
329
dfm
Pascal
WorkingWithComponents/WidowColor.dfm
rustkas/dephi_do
96025a01d5cb49136472b7e6bb5f037b27145fba
[ "MIT" ]
null
null
null
WorkingWithComponents/WidowColor.dfm
rustkas/dephi_do
96025a01d5cb49136472b7e6bb5f037b27145fba
[ "MIT" ]
null
null
null
WorkingWithComponents/WidowColor.dfm
rustkas/dephi_do
96025a01d5cb49136472b7e6bb5f037b27145fba
[ "MIT" ]
null
null
null
object FWidowColor: TFWidowColor Left = 0 Top = 0 Caption = 'WidowColor' ClientHeight = 293 ClientWidth = 426 Color = clYellow Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 end
19.352941
32
0.693009
f15b32baa265874c04259a70029c42abbede9a6d
328
dfm
Pascal
Winamp_Control/Unit2.dfm
delphi-pascal-archive/winamp-control
6a9182a48fb19ffcf67743e816672c5c7e40d9ff
[ "Unlicense" ]
2
2021-11-06T22:40:25.000Z
2022-02-12T17:44:47.000Z
Winamp_Control/Unit2.dfm
delphi-pascal-archive/winamp-control
6a9182a48fb19ffcf67743e816672c5c7e40d9ff
[ "Unlicense" ]
null
null
null
Winamp_Control/Unit2.dfm
delphi-pascal-archive/winamp-control
6a9182a48fb19ffcf67743e816672c5c7e40d9ff
[ "Unlicense" ]
1
2021-11-06T22:40:27.000Z
2021-11-06T22:40:27.000Z
object Form2: TForm2 Left = 240 Top = 280 Width = 696 Height = 480 Caption = 'Form2' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 end
19.294118
33
0.637195
6abd4df653c6ba6926af46a2d4cdc50554000918
586
pas
Pascal
UNiceDelphi.pas
shardros/higher-or-lower
63162aa13102696def1b4b6d08020ceab64f57f1
[ "MIT" ]
null
null
null
UNiceDelphi.pas
shardros/higher-or-lower
63162aa13102696def1b4b6d08020ceab64f57f1
[ "MIT" ]
null
null
null
UNiceDelphi.pas
shardros/higher-or-lower
63162aa13102696def1b4b6d08020ceab64f57f1
[ "MIT" ]
null
null
null
unit UNiceDelphi; interface uses System.SysUtils; function int(num: string): integer; overload; function int(num: char): integer; overload; function str(str: integer): string; function len(str: string): integer; implementation function int(num: string): integer; begin result := strtoint(num); end; function int(num: char): integer; overload; begin result := strtoint(num + ' '); end; function str(str: integer): string; begin result := inttostr(str); end; function len(str: string): integer; begin result := length(str); end; end.
16.277778
46
0.670648
f17d8369ff3591dbe021d48ddd45b31f7f56efa6
365
dpr
Pascal
Delphi/Sample/QRGenerator.dpr
perevoznyk/quricol
fb4d5501b5abab9d0715048036187acfec8ffbd0
[ "MIT" ]
13
2018-09-01T15:47:18.000Z
2022-01-17T08:45:52.000Z
Delphi/Sample/QRGenerator.dpr
perevoznyk/quricol
fb4d5501b5abab9d0715048036187acfec8ffbd0
[ "MIT" ]
1
2020-11-29T07:08:34.000Z
2020-12-01T08:37:35.000Z
Delphi/Sample/QRGenerator.dpr
perevoznyk/quricol
fb4d5501b5abab9d0715048036187acfec8ffbd0
[ "MIT" ]
7
2019-03-05T12:25:59.000Z
2022-03-17T06:44:12.000Z
program QRGenerator; uses Forms, frm_Main in 'frm_Main.pas' {frmMain}, QuricolCode in '..\Source\QuricolCode.pas', QuricolAPI in '..\Source\QuricolAPI.pas'; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.Title := 'QR Code generator'; Application.CreateForm(TfrmMain, frmMain); Application.Run; end.
20.277778
45
0.726027
f1d2fac88c7f9d65ee0190036da8b561db178d8f
2,634
pas
Pascal
units/uRANMAR.pas
BishopWolf/DelphiMath
bc03e918f2cbe6aad91e8153f5c7ae35abef75e2
[ "Apache-2.0" ]
1
2019-11-20T02:18:47.000Z
2019-11-20T02:18:47.000Z
units/uRANMAR.pas
BishopWolf/DelphiMath
bc03e918f2cbe6aad91e8153f5c7ae35abef75e2
[ "Apache-2.0" ]
null
null
null
units/uRANMAR.pas
BishopWolf/DelphiMath
bc03e918f2cbe6aad91e8153f5c7ae35abef75e2
[ "Apache-2.0" ]
2
2017-05-14T03:56:55.000Z
2019-11-20T02:18:48.000Z
unit uRANMAR; { taked from Function: ranmar.c Random number generator, obtained from F. James, CERN Data Division. A call to ranmar() returns a random number between 0 and 1 with the last 8 bits dependent. A call to IRANMAR32 returns a 32 bit signed integer. A call to IRANMAR64 returns a 64 bit signed integer. Before calling, the random number generator has to be initialized by calling InitRanMAR with two integer seeds, otherwise the RNG takes default initialization. } interface uses uConstants, urandom; type TRanMar = class(TBaseRandomGen) const cmax = $1000000; private { global variables for ranmar } c, cd, cm: float; u: array [0 .. 96] of float; i97, j97: integer; procedure Init(ij, kl: integer); public constructor Create(ij, kl: integer); function IRan32: LongInt; override; function IRan64: int64; override; function Random: float; override; // [0,1) end; implementation constructor TRanMar.Create(ij, kl: integer); begin inherited Create; Init(ij, kl); end; procedure TRanMar.Init(ij, kl: integer); var i, ii, j, jj, k, l, m: integer; s, t: float; begin i := ((ij div 177) mod 177) + 2; j := (ij mod 177) + 2; k := ((kl div 169) mod 178) + 1; l := kl mod 169; for ii := 0 to 96 do begin s := 0.0; t := 0.5; for jj := 0 to 23 do begin m := (((i * j) mod 179) * k) mod 179; i := j; j := k; k := m; l := (53 * l + 1) mod 169; if (((l * m) mod 64) >= 32) then s := s + t; t := t * 0.5; end; u[ii] := s; end; c := 362436.0 / cmax; cd := 7654321.0 / cmax; cm := 16777213.0 / cmax; i97 := 96; j97 := 32; end; function TRanMar.Random: float; // [0,1) var uni: float; begin uni := u[i97] - u[j97]; if (uni < 0.0) then uni := uni + 1.0; u[i97] := uni; dec(i97); if (i97 < 0) then i97 := 96; dec(j97); if (j97 < 0) then j97 := 96; c := c - cd; if (c < 0.0) then c := c + cm; uni := uni - c; if (uni < 0.0) then uni := uni + 1.0; result := uni; end; function TRanMar.IRan32: LongInt; // (trunc(RANMAR*cmax) gives only 24 bits independent begin result := ((trunc(Random * cmax) shr $8) and $00FFFFFF) XOR (trunc(Random * cmax) and $FFFFFF00); end; function TRanMar.IRan64: int64; begin result := ((trunc(Random * cmax) shr $8) and $0000000000FFFFFF) XOR ((trunc(Random * cmax) shl $C) and $00000FFFFFF00000) XOR ((trunc(Random * cmax) shl $20) and $FFFFFF0000000000); end; end.
23.72973
93
0.571754
83eb5125f70c1694b8aea1cb2a10117319ca283c
40,131
pas
Pascal
test/testset/LGMultimapTest.pas
avk959/LazGenerics
e6ff772baa97e80f5f527a887aebadae51229def
[ "Apache-2.0" ]
76
2018-06-20T07:36:46.000Z
2022-03-17T19:19:46.000Z
test/testset/LGMultimapTest.pas
avk959/LazGenerics
e6ff772baa97e80f5f527a887aebadae51229def
[ "Apache-2.0" ]
6
2019-02-04T10:09:49.000Z
2022-03-10T07:54:41.000Z
test/testset/LGMultimapTest.pas
avk959/LazGenerics
e6ff772baa97e80f5f527a887aebadae51229def
[ "Apache-2.0" ]
13
2019-11-15T10:54:17.000Z
2022-01-02T15:13:35.000Z
unit LGMultimapTest; {$mode objfpc}{$H+} interface uses SysUtils, fpcunit, testregistry, LGUtils, LGAbstractContainer, LGMultiMap, LGArrayHelpers; type TStrEntry = specialize TGMapEntry<string, string>; TCursor = specialize TGArrayCursor<TStrEntry>; TStrCursor = specialize TGArrayCursor<string>; THelper = specialize TGArrayHelpUtil<TStrEntry>; TStrHelper = specialize TGComparableArrayHelper<string>; TStrArray = specialize TGArray<string>; TGHashMultiMapTest = class(TTestCase) private type TMultiMap = class(specialize TGHashMultiMap2<string, string>); TAutoMultiMap = specialize TGAutoRef<TMultiMap>; published procedure TestCreate; procedure CreateArray; procedure CreateEnum; procedure CreateCapacity; procedure CreateCapacityArray; procedure CreateCapacityEnum; procedure Clear; procedure EnsureCapacity; procedure TrimToFit; procedure Add; procedure AddArray; procedure AddEnum; procedure AddValuesArray; procedure AddValuesEnum; procedure Remove; procedure RemoveAll; procedure RemoveKey; procedure RemoveKeys; procedure RemoveValues; procedure Items; procedure InIteration; end; TGTreeMultiMapTest = class(TTestCase) private type TMultiMap = class(specialize TGTreeMultiMap2<string, string>); TAutoMultiMap = specialize TGAutoRef<TMultiMap>; published procedure TestCreate; procedure CreateArray; procedure CreateEnum; procedure CreateCapacity; procedure CreateCapacityArray; procedure CreateCapacityEnum; procedure Clear; procedure EnsureCapacity; procedure TrimToFit; procedure Add; procedure AddArray; procedure AddEnum; procedure AddValuesArray; procedure AddValuesEnum; procedure Remove; procedure RemoveAll; procedure RemoveKey; procedure RemoveKeys; procedure RemoveValues; procedure Items; procedure InIteration; end; TGListMultiMapTest = class(TTestCase) private type TMultiMap = class(specialize TGListMultiMap2<string, string>); TAutoMultiMap = specialize TGAutoRef<TMultiMap>; published procedure TestCreate; procedure CreateArray; procedure CreateEnum; procedure CreateCapacity; procedure CreateCapacityArray; procedure CreateCapacityEnum; procedure Clear; procedure EnsureCapacity; procedure TrimToFit; procedure Add; procedure AddArray; procedure AddEnum; procedure AddValuesArray; procedure AddValuesEnum; procedure Remove; procedure RemoveAll; procedure RemoveKey; procedure RemoveKeys; procedure RemoveValues; procedure Items; procedure InIteration; end; TGLiteMultiMapTest = class(TTestCase) private type TMultiMap = specialize TGLiteHashMultiMap<string, string, string>; published procedure Clear; procedure EnsureCapacity; procedure TrimToFit; procedure Add; procedure AddArray; procedure AddEnum; procedure AddValuesArray; procedure AddValuesEnum; procedure Remove; procedure Items; end; implementation {$B-}{$COPERATORS ON}{$WARNINGS OFF} const Array12: array[1..12] of TStrEntry = ((Key: 'fish'; Value: 'pike'), (Key: 'fish'; Value: 'crucian'), (Key: 'fish'; Value: 'ruff'), (Key: 'bird'; Value: 'sparrow'), (Key: 'bird'; Value: 'swift'), (Key: 'bird'; Value: 'raven'), (Key: 'reptile'; Value: 'turtle'), (Key: 'reptile'; Value: 'alligator'), (Key: 'reptile'; Value: 'snake'), (Key: 'insect'; Value: 'ant'), (Key: 'insect'; Value: 'fly'), (Key: 'insect'; Value: 'hornet')); ArrayKeys: array[1..4] of string = ('fish','bird','reptile','insect'); ArrayFish3: array[1..3] of string = ('pike', 'crucian', 'ruff'); ArrayFish4: array[1..4] of string = ('shark', 'perch', 'tuna', 'burbot'); ArrayPlant4: array[1..4] of string = ('nettle', 'cedar', 'wheat', 'peach'); function EntriesEqual(const L, R: TStrEntry): Boolean; begin Result := (L.Key = R.Key) and (L.Value = R.Value) end; function ArrayContainsEntry(const a: array of TStrEntry; const e: TStrEntry): Boolean; begin Result := THelper.SequentSearch(a, e, @EntriesEqual) >= 0; end; { TGHashMultiMapTest } procedure TGHashMultiMapTest.TestCreate; var m: TAutoMultiMap; begin AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); end; procedure TGHashMultiMapTest.CreateArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGHashMultiMapTest.CreateEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(TCursor.Create(THelper.CreateCopy(Array12))); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGHashMultiMapTest.CreateCapacity; var m: TAutoMultiMap; begin m.Instance := TMultiMap.Create(45); AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.Capacity >= 45); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); end; procedure TGHashMultiMapTest.CreateCapacityArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(50, Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 50); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGHashMultiMapTest.CreateCapacityEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(50, TCursor.Create(THelper.CreateCopy(Array12))); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 50); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGHashMultiMapTest.Clear; var m: TAutoMultiMap; begin m.Instance := TMultiMap.Create(Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 4); m.Instance.Clear; AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.KeyCount = 0); AssertTrue(m.Instance.Capacity = 0); end; procedure TGHashMultiMapTest.EnsureCapacity; var m: TAutoMultiMap; c: SizeInt; begin c := m.Instance.ExpandTreshold; m.Instance.EnsureCapacity(c + 1); AssertTrue(m.Instance.ExpandTreshold > c); end; procedure TGHashMultiMapTest.TrimToFit; var m: TAutoMultiMap; c: SizeInt; begin m.Instance := TMultiMap.Create(Array12); c := m.Instance.Capacity; m.Instance.EnsureCapacity(c+1); AssertTrue(m.Instance.Capacity > c); m.Instance.TrimToFit; AssertTrue(m.Instance.Capacity = 8); end; procedure TGHashMultiMapTest.Add; var m: TAutoMultiMap; begin AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.Add('key1', 'value1')); AssertTrue(m.Instance.Count = 1); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.Contains('key1')); AssertTrue(m.Instance.ContainsValue('key1', 'value1')); AssertFalse(m.Instance.Add('key1', 'value1')); AssertTrue(m.Instance.Add(TStrEntry.Create('key1', 'value2'))); AssertTrue(m.Instance.Count = 2); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.ContainsValue('key1', 'value2')); AssertTrue(m.Instance.Add('key2', 'value1')); AssertTrue(m.Instance.Count = 3); AssertTrue(m.Instance.KeyCount = 2); AssertFalse(m.Instance.Add('key2', 'value1')); AssertTrue(m.Instance.Add(TStrEntry.Create('key2', 'value2'))); AssertTrue(m.Instance.Count = 4); AssertTrue(m.Instance.KeyCount = 2); end; procedure TGHashMultiMapTest.AddArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.Instance.AddAll(Array12) = Length(Array12)); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); AssertTrue(m.Instance.AddAll(Array12) = 0); end; procedure TGHashMultiMapTest.AddEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.Instance.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = Length(Array12)); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); AssertTrue(m.Instance.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = 0); end; procedure TGHashMultiMapTest.AddValuesArray; var m: TAutoMultiMap; s: string; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.AddValues('fish', ArrayFish4) = 4); AssertTrue(m.Instance.Count = 16); AssertTrue(m.Instance.KeyCount = 4); for s in ArrayFish4 do AssertTrue(m.Instance.ContainsValue('fish', s)); AssertTrue(m.Instance.AddValues('fish', ArrayFish4) = 0); AssertTrue(m.Instance.AddValues('plant', ArrayPlant4) = 4); AssertTrue(m.Instance.Count = 20); AssertTrue(m.Instance.KeyCount = 5); for s in ArrayPlant4 do AssertTrue(m.Instance.ContainsValue('plant', s)); AssertTrue(m.Instance.AddValues('plant', ArrayPlant4) = 0); end; procedure TGHashMultiMapTest.AddValuesEnum; var m: TAutoMultiMap; s: string; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 4); AssertTrue(m.Instance.Count = 16); AssertTrue(m.Instance.KeyCount = 4); for s in ArrayFish4 do AssertTrue(m.Instance.ContainsValue('fish', s)); AssertTrue(m.Instance.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 0); AssertTrue(m.Instance.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 4); AssertTrue(m.Instance.Count = 20); AssertTrue(m.Instance.KeyCount = 5); for s in ArrayPlant4 do AssertTrue(m.Instance.ContainsValue('plant', s)); AssertTrue(m.Instance.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 0); end; procedure TGHashMultiMapTest.Remove; var m: TAutoMultiMap; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.Remove('fish', 'pike')); AssertTrue(m.Instance.Remove('bird', 'swift')); AssertTrue(m.Instance.Remove('reptile', 'snake')); AssertTrue(m.Instance.Remove('insect', 'ant')); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Count = 8); AssertTrue(m.Instance.Remove('fish', 'crucian')); AssertTrue(m.Instance.Remove('fish', 'ruff')); AssertTrue(m.Instance.KeyCount = 3); AssertTrue(m.Instance.Count = 6); end; procedure TGHashMultiMapTest.RemoveAll; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveAll(Array12) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveAll(Array12) = 12); AssertTrue(m.Instance.IsEmpty); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveAll(TCursor.Create(THelper.CreateCopy(Array12))) = 12); AssertTrue(m.Instance.IsEmpty); end; procedure TGHashMultiMapTest.RemoveKey; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveKey('fish') = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveKey('plant') = 0); AssertTrue(m.Instance.RemoveKey('fish') = 3); AssertTrue(m.Instance.RemoveKey('bird') = 3); AssertTrue(m.Instance.RemoveKey('reptile') = 3); AssertTrue(m.Instance.RemoveKey('insect') = 3); AssertTrue(m.Instance.IsEmpty); end; procedure TGHashMultiMapTest.RemoveKeys; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveKeys(ArrayKeys) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveKeys(ArrayKeys[1..2]) = 6); AssertTrue(m.Instance.KeyCount = 2); AssertTrue(m.Instance.Count = 6); AssertTrue(m.Instance.RemoveKeys(ArrayKeys) = 6); AssertTrue(m.Instance.IsEmpty); end; procedure TGHashMultiMapTest.RemoveValues; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveValues('fish', ArrayFish3) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveValues('bird', ArrayFish3) = 0); AssertTrue(m.Instance.RemoveValues('fish', ArrayFish3) = 3); AssertTrue(m.Instance.KeyCount = 3); AssertTrue(m.Instance.Count = 9); AssertTrue(m.Instance.AddAll(Array12) = 3); AssertTrue(m.Instance.RemoveValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish3))) = 3); AssertTrue(m.Instance.Count = 9); AssertTrue(m.Instance.KeyCount = 3); end; procedure TGHashMultiMapTest.Items; var m: TAutoMultiMap; k, v: string; I: Integer = 0; begin for k in m.Instance.Keys do for v in m.Instance[k] do Inc(I); AssertTrue(I = 0); m.Instance.AddAll(Array12); I := 0; for k in m.Instance.Keys do for v in m.Instance[k] do begin AssertTrue(m.Instance.ContainsValue(k, v)); Inc(I); end; AssertTrue(I = 12); end; procedure TGHashMultiMapTest.InIteration; var m: TAutoMultiMap; Raised: Boolean = False; se: TStrEntry; begin m.Instance.AddAll(Array12); try for se in m.Instance.Entries do m.Instance.Add(se); except on e: ELGUpdateLock do Raised := True; end; AssertTrue(Raised); end; { TGTreeMultiMapTest } procedure TGTreeMultiMapTest.TestCreate; var m: TAutoMultiMap; begin AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); end; procedure TGTreeMultiMapTest.CreateArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGTreeMultiMapTest.CreateEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(TCursor.Create(THelper.CreateCopy(Array12))); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGTreeMultiMapTest.CreateCapacity; var m: TAutoMultiMap; begin m.Instance := TMultiMap.Create(45); AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.Capacity >= 45); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); end; procedure TGTreeMultiMapTest.CreateCapacityArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(50, Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 50); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGTreeMultiMapTest.CreateCapacityEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(50, TCursor.Create(THelper.CreateCopy(Array12))); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 50); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGTreeMultiMapTest.Clear; var m: TAutoMultiMap; begin m.Instance := TMultiMap.Create(Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 4); m.Instance.Clear; AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.KeyCount = 0); AssertTrue(m.Instance.Capacity = 0); end; procedure TGTreeMultiMapTest.EnsureCapacity; var m: TAutoMultiMap; c: SizeInt; begin c := m.Instance.ExpandTreshold; m.Instance.EnsureCapacity(c + 1); AssertTrue(m.Instance.ExpandTreshold > c); end; procedure TGTreeMultiMapTest.TrimToFit; var m: TAutoMultiMap; c: SizeInt; begin m.Instance := TMultiMap.Create(Array12); c := m.Instance.Capacity; m.Instance.EnsureCapacity(c+1); AssertTrue(m.Instance.Capacity > c); m.Instance.TrimToFit; AssertTrue(m.Instance.Capacity = 8); end; procedure TGTreeMultiMapTest.Add; var m: TAutoMultiMap; begin AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.Add('key1', 'value1')); AssertTrue(m.Instance.Count = 1); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.Contains('key1')); AssertTrue(m.Instance.ContainsValue('key1', 'value1')); AssertFalse(m.Instance.Add('key1', 'value1')); AssertTrue(m.Instance.Add(TStrEntry.Create('key1', 'value2'))); AssertTrue(m.Instance.Count = 2); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.ContainsValue('key1', 'value2')); AssertTrue(m.Instance.Add('key2', 'value1')); AssertTrue(m.Instance.Count = 3); AssertTrue(m.Instance.KeyCount = 2); AssertFalse(m.Instance.Add('key2', 'value1')); AssertTrue(m.Instance.Add(TStrEntry.Create('key2', 'value2'))); AssertTrue(m.Instance.Count = 4); AssertTrue(m.Instance.KeyCount = 2); end; procedure TGTreeMultiMapTest.AddArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.Instance.AddAll(Array12) = Length(Array12)); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); AssertTrue(m.Instance.AddAll(Array12) = 0); end; procedure TGTreeMultiMapTest.AddEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.Instance.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = Length(Array12)); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); AssertTrue(m.Instance.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = 0); end; procedure TGTreeMultiMapTest.AddValuesArray; var m: TAutoMultiMap; s: string; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.AddValues('fish', ArrayFish4) = 4); AssertTrue(m.Instance.Count = 16); AssertTrue(m.Instance.KeyCount = 4); for s in ArrayFish4 do AssertTrue(m.Instance.ContainsValue('fish', s)); AssertTrue(m.Instance.AddValues('fish', ArrayFish4) = 0); AssertTrue(m.Instance.AddValues('plant', ArrayPlant4) = 4); AssertTrue(m.Instance.Count = 20); AssertTrue(m.Instance.KeyCount = 5); for s in ArrayPlant4 do AssertTrue(m.Instance.ContainsValue('plant', s)); AssertTrue(m.Instance.AddValues('plant', ArrayPlant4) = 0); end; procedure TGTreeMultiMapTest.AddValuesEnum; var m: TAutoMultiMap; s: string; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 4); AssertTrue(m.Instance.Count = 16); AssertTrue(m.Instance.KeyCount = 4); for s in ArrayFish4 do AssertTrue(m.Instance.ContainsValue('fish', s)); AssertTrue(m.Instance.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 0); AssertTrue(m.Instance.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 4); AssertTrue(m.Instance.Count = 20); AssertTrue(m.Instance.KeyCount = 5); for s in ArrayPlant4 do AssertTrue(m.Instance.ContainsValue('plant', s)); AssertTrue(m.Instance.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 0); end; procedure TGTreeMultiMapTest.Remove; var m: TAutoMultiMap; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.Remove('fish', 'pike')); AssertTrue(m.Instance.Remove('bird', 'swift')); AssertTrue(m.Instance.Remove('reptile', 'snake')); AssertTrue(m.Instance.Remove('insect', 'ant')); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Count = 8); AssertTrue(m.Instance.Remove('fish', 'crucian')); AssertTrue(m.Instance.Remove('fish', 'ruff')); AssertTrue(m.Instance.KeyCount = 3); AssertTrue(m.Instance.Count = 6); end; procedure TGTreeMultiMapTest.RemoveAll; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveAll(Array12) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveAll(Array12) = 12); AssertTrue(m.Instance.IsEmpty); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveAll(TCursor.Create(THelper.CreateCopy(Array12))) = 12); AssertTrue(m.Instance.IsEmpty); end; procedure TGTreeMultiMapTest.RemoveKey; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveKey('fish') = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveKey('plant') = 0); AssertTrue(m.Instance.RemoveKey('fish') = 3); AssertTrue(m.Instance.RemoveKey('bird') = 3); AssertTrue(m.Instance.RemoveKey('reptile') = 3); AssertTrue(m.Instance.RemoveKey('insect') = 3); AssertTrue(m.Instance.IsEmpty); end; procedure TGTreeMultiMapTest.RemoveKeys; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveKeys(ArrayKeys) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveKeys(ArrayKeys[1..2]) = 6); AssertTrue(m.Instance.KeyCount = 2); AssertTrue(m.Instance.Count = 6); AssertTrue(m.Instance.RemoveKeys(ArrayKeys) = 6); AssertTrue(m.Instance.IsEmpty); end; procedure TGTreeMultiMapTest.RemoveValues; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveValues('fish', ArrayFish3) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveValues('bird', ArrayFish3) = 0); AssertTrue(m.Instance.RemoveValues('fish', ArrayFish3) = 3); AssertTrue(m.Instance.KeyCount = 3); AssertTrue(m.Instance.Count = 9); AssertTrue(m.Instance.AddAll(Array12) = 3); AssertTrue(m.Instance.RemoveValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish3))) = 3); AssertTrue(m.Instance.Count = 9); AssertTrue(m.Instance.KeyCount = 3); end; procedure TGTreeMultiMapTest.Items; var m: TAutoMultiMap; k, v: string; I: Integer = 0; begin for k in m.Instance.Keys do for v in m.Instance[k] do Inc(I); AssertTrue(I = 0); m.Instance.AddAll(Array12); I := 0; for k in m.Instance.Keys do for v in m.Instance[k] do begin AssertTrue(m.Instance.ContainsValue(k, v)); Inc(I); end; AssertTrue(I = 12); end; procedure TGTreeMultiMapTest.InIteration; var m: TAutoMultiMap; Raised: Boolean = False; se: TStrEntry; begin m.Instance.AddAll(Array12); try for se in m.Instance.Entries do m.Instance.Add(se); except on e: ELGUpdateLock do Raised := True; end; AssertTrue(Raised); end; { TGListMultiMapTest } procedure TGListMultiMapTest.TestCreate; var m: TAutoMultiMap; begin AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); end; procedure TGListMultiMapTest.CreateArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGListMultiMapTest.CreateEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(TCursor.Create(THelper.CreateCopy(Array12))); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGListMultiMapTest.CreateCapacity; var m: TAutoMultiMap; begin m.Instance := TMultiMap.Create(45); AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.Capacity >= 45); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); end; procedure TGListMultiMapTest.CreateCapacityArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(50, Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 50); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGListMultiMapTest.CreateCapacityEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin m.Instance := TMultiMap.Create(50, TCursor.Create(THelper.CreateCopy(Array12))); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 50); AssertTrue(m.Instance.LoadFactor = m.Instance.DefaultLoadFactor); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); end; procedure TGListMultiMapTest.Clear; var m: TAutoMultiMap; begin m.Instance := TMultiMap.Create(Array12); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Capacity >= 4); m.Instance.Clear; AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.KeyCount = 0); AssertTrue(m.Instance.Capacity = 0); end; procedure TGListMultiMapTest.EnsureCapacity; var m: TAutoMultiMap; c: SizeInt; begin c := m.Instance.ExpandTreshold; m.Instance.EnsureCapacity(c + 1); AssertTrue(m.Instance.ExpandTreshold > c); end; procedure TGListMultiMapTest.TrimToFit; var m: TAutoMultiMap; c: SizeInt; begin m.Instance := TMultiMap.Create(Array12); c := m.Instance.Capacity; m.Instance.EnsureCapacity(c+1); AssertTrue(m.Instance.Capacity > c); m.Instance.TrimToFit; AssertTrue(m.Instance.Capacity = 8); end; procedure TGListMultiMapTest.Add; var m: TAutoMultiMap; begin AssertTrue(m.Instance.Count = 0); AssertTrue(m.Instance.Add('key1', 'value1')); AssertTrue(m.Instance.Count = 1); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.Contains('key1')); AssertTrue(m.Instance.ContainsValue('key1', 'value1')); AssertTrue(m.Instance.Add('key1', 'value1')); AssertTrue(m.Instance.Count = 2); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.Add(TStrEntry.Create('key1', 'value2'))); AssertTrue(m.Instance.Count = 3); AssertTrue(m.Instance.KeyCount = 1); AssertTrue(m.Instance.ContainsValue('key1', 'value2')); AssertTrue(m.Instance.Add('key2', 'value1')); AssertTrue(m.Instance.Count = 4); AssertTrue(m.Instance.KeyCount = 2); AssertTrue(m.Instance.Add('key2', 'value1')); AssertTrue(m.Instance.Count = 5); AssertTrue(m.Instance.KeyCount = 2); AssertTrue(m.Instance.Add(TStrEntry.Create('key2', 'value2'))); AssertTrue(m.Instance.Count = 6); AssertTrue(m.Instance.KeyCount = 2); end; procedure TGListMultiMapTest.AddArray; var m: TAutoMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.Instance.AddAll(Array12) = Length(Array12)); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); AssertTrue(m.Instance.AddAll(Array12) = Length(Array12)); AssertTrue(m.Instance.Count = Length(Array12) * 2); AssertTrue(m.Instance.KeyCount = 4); end; procedure TGListMultiMapTest.AddEnum; var m: TAutoMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.Instance.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = Length(Array12)); AssertTrue(m.Instance.Count = 12); AssertTrue(m.Instance.KeyCount = 4); for s in m.Instance.Keys do AssertTrue(m.Instance.ValueCount(s) = 3); for e in Array12 do begin AssertTrue(m.Instance.Contains(e.Key)); AssertTrue(m.Instance.ContainsValue(e.Key, e.Value)); end; for e in m.Instance.Entries do AssertTrue(ArrayContainsEntry(Array12, e)); AssertTrue(m.Instance.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = Length(Array12)); AssertTrue(m.Instance.Count = Length(Array12) * 2); AssertTrue(m.Instance.KeyCount = 4); end; procedure TGListMultiMapTest.AddValuesArray; var m: TAutoMultiMap; s: string; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.AddValues('fish', ArrayFish4) = 4); AssertTrue(m.Instance.Count = 16); AssertTrue(m.Instance.KeyCount = 4); for s in ArrayFish4 do AssertTrue(m.Instance.ContainsValue('fish', s)); AssertTrue(m.Instance.AddValues('plant', ArrayPlant4) = 4); AssertTrue(m.Instance.Count = 20); AssertTrue(m.Instance.KeyCount = 5); for s in ArrayPlant4 do AssertTrue(m.Instance.ContainsValue('plant', s)); AssertTrue(m.Instance.AddValues('fish', ArrayFish4) = 4); AssertTrue(m.Instance.AddValues('plant', ArrayPlant4) = 4); AssertTrue(m.Instance.Count = 28); AssertTrue(m.Instance.KeyCount = 5); end; procedure TGListMultiMapTest.AddValuesEnum; var m: TAutoMultiMap; s: string; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 4); AssertTrue(m.Instance.Count = 16); AssertTrue(m.Instance.KeyCount = 4); for s in ArrayFish4 do AssertTrue(m.Instance.ContainsValue('fish', s)); AssertTrue(m.Instance.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 4); AssertTrue(m.Instance.Count = 20); AssertTrue(m.Instance.KeyCount = 5); for s in ArrayPlant4 do AssertTrue(m.Instance.ContainsValue('plant', s)); AssertTrue(m.Instance.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 4); AssertTrue(m.Instance.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 4); AssertTrue(m.Instance.Count = 28); AssertTrue(m.Instance.KeyCount = 5); end; procedure TGListMultiMapTest.Remove; var m: TAutoMultiMap; begin m.Instance.AddAll(Array12); AssertTrue(m.Instance.Remove('fish', 'pike')); AssertTrue(m.Instance.Remove('bird', 'swift')); AssertTrue(m.Instance.Remove('reptile', 'snake')); AssertTrue(m.Instance.Remove('insect', 'ant')); AssertTrue(m.Instance.KeyCount = 4); AssertTrue(m.Instance.Count = 8); AssertTrue(m.Instance.Remove('fish', 'crucian')); AssertTrue(m.Instance.Remove('fish', 'ruff')); AssertTrue(m.Instance.KeyCount = 3); AssertTrue(m.Instance.Count = 6); end; procedure TGListMultiMapTest.RemoveAll; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveAll(Array12) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveAll(Array12) = 12); AssertTrue(m.Instance.IsEmpty); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveAll(TCursor.Create(THelper.CreateCopy(Array12))) = 12); AssertTrue(m.Instance.IsEmpty); end; procedure TGListMultiMapTest.RemoveKey; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveKey('fish') = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveKey('plant') = 0); AssertTrue(m.Instance.RemoveKey('fish') = 3); AssertTrue(m.Instance.RemoveKey('bird') = 3); AssertTrue(m.Instance.RemoveKey('reptile') = 3); AssertTrue(m.Instance.RemoveKey('insect') = 3); AssertTrue(m.Instance.IsEmpty); end; procedure TGListMultiMapTest.RemoveKeys; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveKeys(ArrayKeys) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveKeys(ArrayKeys[1..2]) = 6); AssertTrue(m.Instance.KeyCount = 2); AssertTrue(m.Instance.Count = 6); AssertTrue(m.Instance.RemoveKeys(ArrayKeys) = 6); AssertTrue(m.Instance.IsEmpty); end; procedure TGListMultiMapTest.RemoveValues; var m: TAutoMultiMap; begin AssertTrue(m.Instance.RemoveValues('fish', ArrayFish3) = 0); m.Instance.AddAll(Array12); AssertTrue(m.Instance.RemoveValues('bird', ArrayFish3) = 0); AssertTrue(m.Instance.RemoveValues('fish', ArrayFish3) = 3); AssertTrue(m.Instance.KeyCount = 3); AssertTrue(m.Instance.Count = 9); AssertTrue(m.Instance.RemoveValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish3))) = 0); AssertTrue(m.Instance.Count = 9); AssertTrue(m.Instance.KeyCount = 3); end; procedure TGListMultiMapTest.Items; var m: TAutoMultiMap; k, v: string; I: Integer = 0; begin for k in m.Instance.Keys do for v in m.Instance[k] do Inc(I); AssertTrue(I = 0); m.Instance.AddAll(Array12); I := 0; for k in m.Instance.Keys do for v in m.Instance[k] do begin AssertTrue(m.Instance.ContainsValue(k, v)); Inc(I); end; AssertTrue(I = 12); end; procedure TGListMultiMapTest.InIteration; var m: TAutoMultiMap; Raised: Boolean = False; se: TStrEntry; begin m.Instance.AddAll(Array12); try for se in m.Instance.Entries do m.Instance.Add(se); except on e: ELGUpdateLock do Raised := True; end; AssertTrue(Raised); end; { TGLiteMultiMapTest } procedure TGLiteMultiMapTest.Clear; var m: TMultiMap; begin m.AddAll(Array12); AssertTrue(m.Count = 12); AssertTrue(m.Capacity >= 12); m.Clear; AssertTrue(m.Count = 0); AssertTrue(m.Capacity = 0); end; procedure TGLiteMultiMapTest.EnsureCapacity; var m: TMultiMap; c: SizeInt; begin c := m.Capacity; m.EnsureCapacity(c + 100); AssertTrue(m.Capacity >= c + 100); end; procedure TGLiteMultiMapTest.TrimToFit; var m: TMultiMap; c: SizeInt; begin m.AddAll(Array12); m.EnsureCapacity(40); c := m.Capacity; m.TrimToFit; AssertTrue(m.Capacity < c); AssertTrue(m.Capacity = 16); end; procedure TGLiteMultiMapTest.Add; var m: TMultiMap; begin AssertTrue(m.Count = 0); m.Add('key1', 'value1'); AssertTrue(m.Count = 1); AssertTrue(m.Contains('key1'){%H-}); m.Add('key1', 'value1'); AssertTrue(m.Count = 2); AssertTrue(m.ValueCount('key1') = 2); m.Add(TStrEntry.Create('key1', 'value2')); AssertTrue(m.Count = 3); AssertTrue(m.ValueCount('key1') = 3); m.Add('key2', 'value1'); AssertTrue(m.Count = 4); m.Add('key2', 'value1'); AssertTrue(m.Count = 5); m.Add(TStrEntry.Create('key2', 'value2')); AssertTrue(m.Count = 6); AssertTrue(m.ValueCount('key2') = 3); end; procedure TGLiteMultiMapTest.AddArray; var m: TMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.AddAll(Array12) = Length(Array12)); AssertTrue(m.Count = 12); for s in m.Keys do AssertTrue(m.ValueCount(s) = 3); for e in Array12 do AssertTrue(m.Contains(e.Key){%H-}); AssertTrue(m.AddAll(Array12) = Length(Array12)); AssertTrue(m.Count = Length(Array12) * 2); end; procedure TGLiteMultiMapTest.AddEnum; var m: TMultiMap; e: TStrEntry; s: string; begin AssertTrue(m.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = Length(Array12)); AssertTrue(m.Count = 12); for s in m.Keys do AssertTrue(m.ValueCount(s) = 3); for e in Array12 do AssertTrue(m.Contains(e.Key){%H-}); AssertTrue(m.AddAll(TCursor.Create(THelper.CreateCopy(Array12))) = Length(Array12)); AssertTrue(m.Count = Length(Array12) * 2); end; procedure TGLiteMultiMapTest.AddValuesArray; var m: TMultiMap; begin m.AddAll(Array12); AssertTrue(m.AddValues('fish', ArrayFish4) = 4); AssertTrue(m.Count = 16); AssertTrue(m.AddValues('plant', ArrayPlant4) = 4); AssertTrue(m.Count = 20); AssertTrue(m.AddValues('fish', ArrayFish4) = 4); AssertTrue(m.AddValues('plant', ArrayPlant4) = 4); AssertTrue(m.Count = 28); end; procedure TGLiteMultiMapTest.AddValuesEnum; var m: TMultiMap; begin m.AddAll(Array12); AssertTrue(m.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 4); AssertTrue(m.Count = 16); AssertTrue(m.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 4); AssertTrue(m.Count = 20); AssertTrue(m.AddValues('fish', TStrCursor.Create(TStrHelper.CreateCopy(ArrayFish4))) = 4); AssertTrue(m.AddValues('plant', TStrCursor.Create(TStrHelper.CreateCopy(ArrayPlant4))) = 4); AssertTrue(m.Count = 28); end; procedure TGLiteMultiMapTest.Remove; var m: TMultiMap; begin m.AddAll(Array12); AssertTrue(m.Remove('fish')); AssertTrue(m.Remove('bird')); AssertFalse(m.Remove('plant')); AssertTrue(m.Remove('reptile')); AssertTrue(m.Remove('insect')); AssertTrue(m.Count = 8); AssertTrue(m.Remove('fish')); AssertTrue(m.Remove('fish')); AssertTrue(m.Count = 6); end; procedure TGLiteMultiMapTest.Items; var m: TMultiMap; k, v: string; I: Integer = 0; begin for k in m.Keys do for v in m[k] do Inc(I); AssertTrue(I = 0); m.AddAll(Array12); I := 0; for k in ArrayKeys do for v in m[k] do Inc(I); AssertTrue(I = 12); end; initialization RegisterTest(TGHashMultiMapTest); RegisterTest(TGTreeMultiMapTest); RegisterTest(TGListMultiMapTest); RegisterTest(TGLiteMultiMapTest); end.
28.665
111
0.715781
f1695948ab2718e274c768dbb5490602d7a3dee8
8,879
pas
Pascal
ComponentSources/dunitx/DUnitX.ResStrs.pas
glenkleidon/GenericElement
09f23a4353d945cd23e4dcbbb10fac3e427db6e7
[ "BSD-3-Clause" ]
1
2021-07-24T16:42:48.000Z
2021-07-24T16:42:48.000Z
ComponentSources/dunitx/DUnitX.ResStrs.pas
glenkleidon/GenericElement
09f23a4353d945cd23e4dcbbb10fac3e427db6e7
[ "BSD-3-Clause" ]
1
2017-06-25T12:58:46.000Z
2017-06-25T13:05:30.000Z
ComponentSources/dunitx/DUnitX.ResStrs.pas
glenkleidon/GenericElement
09f23a4353d945cd23e4dcbbb10fac3e427db6e7
[ "BSD-3-Clause" ]
1
2018-06-23T17:54:09.000Z
2018-06-23T17:54:09.000Z
{***************************************************************************} { } { DUnitX } { } { Copyright (C) 2015 Vincent Parrett & Contributors } { } { vincent@finalbuilder.com } { http://www.finalbuilder.com } { } { } {***************************************************************************} { } { Licensed under the Apache License, Version 2.0 (the "License"); } { you may not use this file except in compliance with the License. } { You may obtain a copy of the License at } { } { http://www.apache.org/licenses/LICENSE-2.0 } { } { Unless required by applicable law or agreed to in writing, software } { distributed under the License is distributed on an "AS IS" BASIS, } { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } { See the License for the specific language governing permissions and } { limitations under the License. } { } {***************************************************************************} { Resource strings contributed by Embarcadero } {***************************************************************************} unit DUnitX.ResStrs; interface resourcestring STestRunComplete = 'Test Run Complete'; SUnexpectedErrorExt = 'Expected %g but got %g %s'; SUnexpectedErrorInt = 'Expected %d but got %d %s'; SUnexpectedErrorStr = 'Expected %s but got %s %s'; SUnexpectedErrorDbl = 'Expected %g but got %g %s'; SUnexpectedErrorGUID = 'Expected %s but got %s %s'; SNotEqualErrorStr = 'Expected %s is not equal to actual %s %s'; SMemoryValuesNotEqual = 'Memory values are not equal. '; SEqualsErrorExt = '%g equals actual %g %s'; SEqualsErrorStr = '[%s] is equal to [%s] %s'; SEqualsErrorStr2 = 'Expected %s equals actual %s %s'; SEqualsErrorInt = 'Expected %d equals actual %d %s'; SEqualsErrorDbl = '%g equals actual %g %s'; SEqualsErrorObj = 'Object [%s] Equals Object [%s] %s'; SEqualsErrorGUID = 'Expected %s equals actual %s %s'; SEqualsErrorIntf = 'references are the same. %s'; SMemoryValuesEqual = 'Memory values are equal. '; SNotEqualErrorIntf = 'references are Not the same. %s'; SNotEqualErrorObj = 'Object [%s] Not Object [%s] %s'; SValueNotInList = 'List does not contain value %s. %s'; SValueInList = 'List contains value %s. %s'; SIntfNotImplemented = 'value does not implement %s. %s'; SListNotEmpty = 'List is Not empty. %s'; SStrNotEmpty = 'String is Not empty. %s'; SVarNotEmpty = 'Variant is Not empty. %s'; SIsFalseError = 'Condition is True when False expected. %s'; SListEmpty = 'List is Empty when Not empty expected. %s'; SVarEmpty = 'Variant is Empty. %s'; SIntfNil = 'Interface is Nil when not nil expected. %s'; SPointerNil = 'Pointer is Nil when not Nil expected. %s'; SObjNil = 'Object is Nil when Not Nil expected. %s'; SVariantNull = 'Variant is Null when Not Null expcted. %s'; SVariantNotNull = 'Variant is Not Null when Null expected. [%s]'; SIntfNotNil = 'Interface is not Nil when nil expected. [%s]'; SObjNotNil = 'Object is not nil when nil expected. [%s]'; SPointerNotNil = 'Pointer is not Nil when nil expected. [%s]'; SIsTrueError = 'Condition is False when True expected. [%s]'; STypeError = 'value is not of type T'; SUnexpectedException = 'Method raised [%s] was expecting not to raise Any exception. %s'; SUnexpectedExceptionAlt = 'Method raised [%s] was expecting not to raise Any exception.'; SMethodRaisedException = 'Method raised an exception of type : '; SMethodRaisedExceptionAlt = 'Method raised [%s] was expecting not to raise [%s]. %s'; SNoException = 'Method did not throw any exceptions.'; SUnexpectedExceptionMessage = 'Exception [%s] was raised with message [%s] was expecting [%s] %s'; SCheckExceptionClassError = 'Method raised [%s] was expecting [%s]. %s'; SCheckExceptionClassDescError = 'Method raised [%s] was expecting a descendant of [%s]. %s'; SStrDoesNotContain = '[%s] does not contain [%s] %s'; SStrDoesNotEndWith = '[%s] does not end with [%s] %s'; SStrDoesNotMatch = '[%s] does not match [%s] %s'; SStrCannotBeEmpty = 'subString cannot be empty'; SStrDoesNotStartWith = '[%s] does Not Start with [%s] %s'; SInvalidValueBool = 'Invalid value, not boolean'; SInvalidOptionType = 'Invalid Option type - only string, integer, float, boolean, enum and sets are supported'; SInvalidEnum = 'Invalid Enum Value : '; SInvalidOpt = 'invalid option type'; SNameRequired = 'Name required - use RegisterUnamed to register unamed options'; SOptionAlreadyRegistered = 'Options : %s already registered'; SUnknownOptionStart = 'Unknown option start : '; SOptionExpectedValue = 'Option [ %s ] expected a following :value but none was found'; SParameterFileDoesNotExist = 'Parameter File [%s] does not exist'; SErrorParsingParameterFile = 'Error parsing Parameter File [%s] : '; SErrorSettingOption = 'Error setting option : %s to %s : '; SUnknownCommandLineOption = 'Unknown command line option : '; SOptionNotSpecified = 'Required Option [%s] was not specified'; STestIgnoredRepeatSet = 'Repeat Set to 0. Test Ignored.'; SRegisteredImplementationError = 'The implementation registered (%s) does not implement %s'; SImplementationAlreadyRegistered = 'An implementation for type %s with name %s is already registered with IoC'; SNoImplementationRegistered = 'No implementation registered for type %s'; SNoInstance = 'The activator delegate failed to return an instance %s'; SNoConsoleWriterClassRegistered = 'No ConsoleWriter Class is registered. You will need to include DUnitX.Windows.Console or DUnitX.MACOS.Console in your application'; SExecutingTest = 'Executing Test : '; SRunningFixtureSetup = 'Running Fixture Setup Method : '; SRunningSetup = 'Running Setup for : '; STest = 'Test : '; SFixture = 'Fixture : '; SSuccess = 'Success.'; SRunningFixtureTeardown = 'Running Fixture Teardown Method : '; SRunningTestTeardown = 'Running Teardown for Test : '; SDoneTesting = 'Done testing.'; STestsFound = 'Tests Found : %d'; STestsIgnored = 'Tests Ignored : %d'; STestsPassed = 'Tests Passed : %d'; STestsLeaked = 'Tests Leaked : %d'; STestsFailed = 'Tests Failed : %d'; STestsErrored = 'Tests Errored : %d'; STestsWarning = 'Tests with Warnings : %d'; SFailingTests = 'Failing Tests'; SMessage = ' Message: '; STestsWithErrors = 'Tests With Errors'; STestsWithLeak = 'Tests With Memory Leak'; SStartingTests = 'DUnitX - [%s] - Starting Tests.'; SApplicationName = 'DUnitX - [%s]'; SRunning = 'Running '; SUsage = 'Usage : %s options'; SOptions = ' Options :'; SNoRunner = 'No Runner found for current thread'; SNilPlugin = 'Nil plugin registered!'; SSetupTeardownBytesLeaked = '%d bytes were leaked in the setup/teardown methods'; STestBytesLeaked = '%d bytes were leaked in the test method'; SSetupTestTeardownBytesLeaked = '%d bytes were leaked in the setup/test/teardown methods'; STestFailed = 'Test failed : '; STestError = 'Test Error : '; STestIgnored = 'Test Ignored : '; STestLeaked = 'Test Leaked Memory : '; SOnEndSetupEventError = 'Error in OnEndSetupEvent : '; SOnEndSetupTestLogError = 'unable to log error in OnEndSetupTest event : '; SNoFixturesFound = 'No Test Fixtures found'; SFixtureSetupError = 'Error in Fixture Setup. Fixture: %s Error: %s'; SSkippingFixture = 'Skipping Fixture.'; SFixtureTeardownError = 'Error in Fixture TearDown. Fixture: %s Error: %s'; SNoAssertions = 'No assertions were made during the test'; SITestExecuteNotSupported = '%s does not support ITestExecute'; SWeakReferenceError = 'TWeakReference can only be used with objects derived from TWeakReferencedObject'; SNotImplemented = 'Not Implemented!'; SOperationTimedOut = 'Operation Timed Out'; SCouldNotFindResultsForTest = 'Could not find results for test.'; implementation end.
52.85119
168
0.603672
44d5d6447c31d04ba3a117ed227e13b5903ad412
12,299
dfm
Pascal
samples/jsonrpc_with_published_objects/MainClientFormU.dfm
joaophi/delphimvcframework
e98053958c2f0049b2b667dd43ca0de61bd31e13
[ "Apache-2.0" ]
null
null
null
samples/jsonrpc_with_published_objects/MainClientFormU.dfm
joaophi/delphimvcframework
e98053958c2f0049b2b667dd43ca0de61bd31e13
[ "Apache-2.0" ]
null
null
null
samples/jsonrpc_with_published_objects/MainClientFormU.dfm
joaophi/delphimvcframework
e98053958c2f0049b2b667dd43ca0de61bd31e13
[ "Apache-2.0" ]
null
null
null
object MainForm: TMainForm Left = 0 Top = 0 Caption = 'JSON-RPC 2.0 Client' ClientHeight = 604 ClientWidth = 842 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object PageControl1: TPageControl Left = 0 Top = 0 Width = 842 Height = 604 ActivePage = TabSheet1 Align = alClient TabOrder = 0 object TabSheet1: TTabSheet Caption = 'Invoking Plain PODO' object GroupBox1: TGroupBox Left = 3 Top = 22 Width = 815 Height = 174 Caption = 'Simple Types' TabOrder = 0 object edtValue1: TEdit Left = 17 Top = 32 Width = 32 Height = 21 TabOrder = 0 Text = '42' end object edtValue2: TEdit Left = 55 Top = 32 Width = 26 Height = 21 TabOrder = 1 Text = '10' end object btnSubstract: TButton Left = 87 Top = 30 Width = 100 Height = 25 Caption = 'Subtract' TabOrder = 2 OnClick = btnSubstractClick end object edtResult: TEdit Left = 193 Top = 32 Width = 27 Height = 21 ReadOnly = True TabOrder = 3 end object edtReverseString: TEdit Left = 17 Top = 80 Width = 88 Height = 21 TabOrder = 4 Text = 'Daniele Teti' end object btnReverseString: TButton Left = 111 Top = 78 Width = 109 Height = 25 Caption = 'Reverse String' TabOrder = 5 OnClick = btnReverseStringClick end object edtReversedString: TEdit Left = 320 Top = 80 Width = 131 Height = 21 ReadOnly = True TabOrder = 6 end object dtNextMonday: TDateTimePicker Left = 253 Top = 32 Width = 102 Height = 21 Date = 43018.000000000000000000 Time = 0.469176562502980200 TabOrder = 7 end object btnAddDay: TButton Left = 361 Top = 30 Width = 104 Height = 25 Caption = 'Get Next Monday' TabOrder = 8 OnClick = btnAddDayClick end object btnInvalid1: TButton Left = 626 Top = 78 Width = 84 Height = 43 Caption = 'Passing VAR parameters' Font.Charset = DEFAULT_CHARSET Font.Color = clScrollBar Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False TabOrder = 9 WordWrap = True OnClick = btnInvalid1Click end object btnInvalid2: TButton Left = 716 Top = 78 Width = 84 Height = 43 Caption = 'Passing OUT parameters' Font.Charset = DEFAULT_CHARSET Font.Color = clScrollBar Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False TabOrder = 10 WordWrap = True OnClick = btnInvalid2Click end object btnNotification: TButton Left = 464 Top = 78 Width = 75 Height = 43 Caption = 'Send Notification' Font.Charset = DEFAULT_CHARSET Font.Color = clScrollBar Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False TabOrder = 11 WordWrap = True OnClick = btnNotificationClick end object btnInvalidMethod: TButton Left = 545 Top = 78 Width = 75 Height = 43 Caption = 'Invalid Method' Font.Charset = DEFAULT_CHARSET Font.Color = clScrollBar Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False TabOrder = 12 WordWrap = True OnClick = btnInvalidMethodClick end object CheckBox1: TCheckBox Left = 226 Top = 82 Width = 88 Height = 17 Caption = 'As Uppercase' TabOrder = 13 end object btnDates: TButton Left = 716 Top = 30 Width = 84 Height = 25 Caption = 'PlayWithDates' TabOrder = 14 OnClick = btnDatesClick end object btnFloatsTests: TButton Left = 626 Top = 30 Width = 84 Height = 25 Caption = 'Floats' TabOrder = 15 OnClick = btnFloatsTestsClick end object btnWithJSON: TButton Left = 545 Top = 30 Width = 75 Height = 25 Caption = 'JSON Prop' TabOrder = 16 OnClick = btnWithJSONClick end object Edit1: TEdit Left = 17 Top = 136 Width = 32 Height = 21 TabOrder = 17 Text = '42' end object Edit2: TEdit Left = 55 Top = 136 Width = 26 Height = 21 TabOrder = 18 Text = '10' end object btnSubtractWithNamedParams: TButton Left = 87 Top = 134 Width = 160 Height = 25 Caption = 'Subtract (named params)' TabOrder = 19 OnClick = btnSubtractWithNamedParamsClick end object Edit3: TEdit Left = 253 Top = 136 Width = 27 Height = 21 ReadOnly = True TabOrder = 20 end end object GroupBox2: TGroupBox Left = 3 Top = 202 Width = 489 Height = 159 Caption = 'Returning Objects' TabOrder = 1 object edtUserName: TEdit Left = 16 Top = 24 Width = 184 Height = 21 TabOrder = 0 Text = 'dteti' end object btnGetUser: TButton Left = 206 Top = 22 Width = 91 Height = 25 Caption = 'Get User' TabOrder = 1 OnClick = btnGetUserClick end object lbPerson: TListBox Left = 16 Top = 53 Width = 435 Height = 82 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -13 Font.Name = 'Courier New' Font.Style = [] ParentFont = False TabOrder = 2 end end object GroupBox4: TGroupBox Left = 3 Top = 383 Width = 489 Height = 129 Caption = 'Passing Objects as parameters' TabOrder = 2 object edtFirstName: TLabeledEdit Left = 16 Top = 40 Width = 121 Height = 21 EditLabel.Width = 51 EditLabel.Height = 13 EditLabel.Caption = 'First Name' TabOrder = 0 Text = 'Daniele' end object edtLastName: TLabeledEdit Left = 16 Top = 88 Width = 121 Height = 21 EditLabel.Width = 50 EditLabel.Height = 13 EditLabel.Caption = 'Last Name' TabOrder = 1 Text = 'Teti' end object chkMarried: TCheckBox Left = 172 Top = 40 Width = 97 Height = 17 Caption = 'Married' Checked = True State = cbChecked TabOrder = 2 end object dtDOB: TDateTimePicker Left = 169 Top = 88 Width = 102 Height = 21 Date = 29163.000000000000000000 Time = 0.469176562499342300 TabOrder = 3 end object btnSave: TButton Left = 376 Top = 88 Width = 75 Height = 25 Caption = 'Save' TabOrder = 4 OnClick = btnSaveClick end end object PageControl2: TPageControl Left = 514 Top = 202 Width = 304 Height = 367 ActivePage = TabSheet4 TabOrder = 3 object TabSheet3: TTabSheet Caption = 'Get DataSet' object edtFilter: TEdit Left = 3 Top = 5 Width = 184 Height = 21 TabOrder = 0 end object edtGetCustomers: TButton Left = 193 Top = 3 Width = 91 Height = 25 Caption = 'Get Customers' TabOrder = 1 OnClick = edtGetCustomersClick end object DBGrid1: TDBGrid Left = 3 Top = 34 Width = 279 Height = 302 DataSource = DataSource1 TabOrder = 2 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'Tahoma' TitleFont.Style = [] end end object TabSheet4: TTabSheet Caption = 'Get Multi Dataset' ImageIndex = 1 object btnGetMulti: TButton Left = 13 Top = 16 Width = 268 Height = 41 Caption = 'Get Multiple Datasets' TabOrder = 0 OnClick = btnGetMultiClick end object lbMulti: TListBox Left = 16 Top = 110 Width = 265 Height = 219 Font.Charset = ANSI_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Courier New' Font.Style = [] ItemHeight = 14 ParentFont = False TabOrder = 1 end object btnObjDict: TButton Left = 13 Top = 63 Width = 268 Height = 41 Caption = 'Get ObjectDict' TabOrder = 2 OnClick = btnObjDictClick end end end end object TabSheet2: TTabSheet Caption = 'Invoking DataModule Methods' ImageIndex = 1 object GroupBox5: TGroupBox Left = 11 Top = 18 Width = 489 Height = 391 Caption = 'Returning Objects' TabOrder = 0 DesignSize = ( 489 391) object edtSearchText: TEdit Left = 16 Top = 24 Width = 184 Height = 21 TabOrder = 0 Text = 'pizz' end object btnSearch: TButton Left = 206 Top = 22 Width = 91 Height = 25 Caption = 'Search Article' TabOrder = 1 OnClick = btnSearchClick end object ListBox1: TListBox Left = 16 Top = 53 Width = 435 Height = 316 Anchors = [akLeft, akTop, akRight, akBottom] Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -13 Font.Name = 'Courier New' Font.Style = [] ParentFont = False TabOrder = 2 end end end end object DataSource1: TDataSource DataSet = FDMemTable1 Left = 767 Top = 184 end object FDMemTable1: TFDMemTable FetchOptions.AssignedValues = [evMode] FetchOptions.Mode = fmAll ResourceOptions.AssignedValues = [rvSilentMode] ResourceOptions.SilentMode = True UpdateOptions.AssignedValues = [uvCheckRequired, uvAutoCommitUpdates] UpdateOptions.CheckRequired = False UpdateOptions.AutoCommitUpdates = True Left = 767 Top = 328 object FDMemTable1Code: TIntegerField FieldName = 'Code' end object FDMemTable1Name: TStringField FieldName = 'Name' end end end
25.306584
73
0.482397
8355ef8a013a7ef7e54f69ea19d018a7241e5672
1,654
dpr
Pascal
exercises/practice/roman-numerals/RomanNumerals.dpr
ee7/exercism-delphi
ae1ef82e63b5e61dd7f0f8c0842c0a7ee2fe860c
[ "MIT" ]
28
2017-08-02T16:18:29.000Z
2021-12-25T22:38:15.000Z
exercises/practice/roman-numerals/RomanNumerals.dpr
ee7/exercism-delphi
ae1ef82e63b5e61dd7f0f8c0842c0a7ee2fe860c
[ "MIT" ]
103
2017-06-18T22:48:20.000Z
2021-09-02T13:17:06.000Z
exercises/practice/roman-numerals/RomanNumerals.dpr
ee7/exercism-delphi
ae1ef82e63b5e61dd7f0f8c0842c0a7ee2fe860c
[ "MIT" ]
30
2017-07-21T17:48:26.000Z
2021-11-05T15:59:25.000Z
program RomanNumerals; {$IFNDEF TESTINSIGHT} {$APPTYPE CONSOLE} {$ENDIF}{$STRONGLINKTYPES ON} uses System.SysUtils, {$IFDEF TESTINSIGHT} TestInsight.DUnitX, {$ENDIF } DUnitX.Loggers.Console, DUnitX.Loggers.Xml.NUnit, DUnitX.TestFramework, uRomanNumeralsTests in 'uRomanNumeralsTests.pas', uRomanNumerals in 'uRomanNumerals.pas'; var runner : ITestRunner; results : IRunResults; logger : ITestLogger; nunitLogger : ITestLogger; begin {$IFDEF TESTINSIGHT} TestInsight.DUnitX.RunRegisteredTests; exit; {$ENDIF} try //Check command line options, will exit if invalid TDUnitX.CheckCommandLine; //Create the test runner runner := TDUnitX.CreateRunner; //Tell the runner to use RTTI to find Fixtures runner.UseRTTI := True; //tell the runner how we will log things //Log to the console window logger := TDUnitXConsoleLogger.Create(true); runner.AddLogger(logger); //Generate an NUnit compatible XML File nunitLogger := TDUnitXXMLNUnitFileLogger.Create(TDUnitX.Options.XMLOutputFile); runner.AddLogger(nunitLogger); runner.FailsOnNoAsserts := False; //When true, Assertions must be made during tests; //Run tests results := runner.Execute; if not results.AllPassed then System.ExitCode := EXIT_ERRORS; {$IFNDEF CI} //We don't want this happening when running under CI. if TDUnitX.Options.ExitBehavior = TDUnitXExitBehavior.Pause then begin System.Write('Done.. press <Enter> key to quit.'); System.Readln; end; {$ENDIF} except on E: Exception do System.Writeln(E.ClassName, ': ', E.Message); end; end.
27.114754
88
0.707981
f1d44bdcd470a263393d7757b991c101b69c070c
11,210
pas
Pascal
Source/Core/AWS.Util.EC2InstanceMetadata.pas
herux/aws-sdk-delphi
4ef36e5bfc536b1d9426f78095d8fda887f390b5
[ "Apache-2.0" ]
67
2021-07-28T23:47:09.000Z
2022-03-15T11:48:35.000Z
Source/Core/AWS.Util.EC2InstanceMetadata.pas
herux/aws-sdk-delphi
4ef36e5bfc536b1d9426f78095d8fda887f390b5
[ "Apache-2.0" ]
5
2021-09-01T09:31:16.000Z
2022-03-16T18:19:21.000Z
Source/Core/AWS.Util.EC2InstanceMetadata.pas
herux/aws-sdk-delphi
4ef36e5bfc536b1d9426f78095d8fda887f390b5
[ "Apache-2.0" ]
13
2021-07-29T02:41:16.000Z
2022-03-16T10:22:38.000Z
unit AWS.Util.EC2InstanceMetadata; interface uses System.SysUtils, System.Generics.Collections, System.Math, System.StrUtils, System.Classes, Bcl.Json.Attributes, Bcl.Json.Converters, Sparkle.Http.Headers, AWS.RegionEndpoint; type TIAMSecurityCredentialMetadata = class private FCode: string; FMessage: string; [JsonConverter(TJsonLocalDateTimeConverter)] FLastUpdated: TDateTime; FType: string; FAccessKeyId: string; FSecretAccessKey: string; FToken: string; [JsonConverter(TJsonLocalDateTimeConverter)] FExpiration: TDateTime; public property Code: string read FCode write FCode; property Message: string read FMessage write FMessage; property LastUpdated: TDateTime read FLastUpdated write FLastUpdated; property CredentialType: string read FType write FType; property AccessKeyId: string read FAccessKeyId write FAccessKeyId; property SecretAccessKey: string read FSecretAccessKey write FSecretAccessKey; property Token: string read FToken write FToken; property Expiration: TDateTime read FExpiration write FExpiration; end; TEC2InstanceMetadata = class public const EC2_METADATA_SVC = 'http://169.254.169.254'; LATEST = '/latest'; EC2_METADATA_ROOT = EC2_METADATA_SVC + LATEST + '/meta-data'; EC2_USERDATA_ROOT = EC2_METADATA_SVC + LATEST + '/user-data'; EC2_DYNAMICDATA_ROOT = EC2_METADATA_SVC + LATEST + '/dynamic'; AWS_EC2_METADATA_DISABLED = 'AWS_EC2_METADATA_DISABLED'; EC2_APITOKEN_URL = EC2_METADATA_SVC + LATEST + '/api/token'; strict private const DEFAULT_RETRIES = 3; MIN_PAUSE_MS = 250; MAX_RETRIES = 3; DEFAULT_APITOKEN_TTL = 21600; strict private class var FUseNullToken: Boolean; class function FetchApiToken(Tries: Integer): string; static; class procedure PauseExponentially(Retry: Integer); static; public class procedure ClearTokenFlag; static; class function GetItems(const Path: string): TArray<string>; overload; static; class function GetItems(const RelativeOrAbsolutePath: string; Tries: Integer; Slurp: Boolean): TArray<string>; overload; static; class function GetItems(const RelativeOrAbsolutePath: string; Tries: Integer; Slurp: Boolean; const Token: string): TArray<string>; overload; static; class function GetData(const Path: string): string; overload; static; class function GetData(const Path: string; Tries: Integer): string; overload; static; class function IdentityDocument: string; static; class function IsIMDSEnabled: Boolean; static; class function Region: IRegionEndpointEx; static; class function IAMSecurityCredentials: TObjectDictionary<string, TIAMSecurityCredentialMetadata>; static; end; IMDSDisabledException = class(EInvalidOpException) end; implementation uses Bcl.Logging, Bcl.Json, Bcl.Json.Classes, AWS.SDKUtils; { TEC2InstanceMetadata } class function TEC2InstanceMetadata.GetData(const Path: string): string; begin Result := GetData(Path, DEFAULT_RETRIES); end; class procedure TEC2InstanceMetadata.ClearTokenFlag; begin FUseNullToken := False; end; class function TEC2InstanceMetadata.FetchApiToken(Tries: Integer): string; var Headers: THttpHeaders; Retry: Integer; UriForToken: string; Content: string; StatusCode: Integer; begin for Retry := 1 to Tries do begin if not IsIMDSEnabled or FUseNullToken then Exit(''); try UriForToken := EC2_APITOKEN_URL; Headers := THttpHeaders.Create; try Headers.AddValue(THeaderKeys.XAwsEc2MetadataTokenTtlSeconds, IntToStr(DEFAULT_APITOKEN_TTL)); Content := TAWSSDKUtils.ExecuteHttpRequest(UriForToken, 'PUT', '', 5000, Headers); finally Headers.Free; end; Result := Trim(Content); except on E: Exception do begin if E is EWebException then StatusCode := EWebException(E).StatusCode else StatusCode := 0; if (StatusCode = 404) or (StatusCode = 405) or (StatusCode = 403) then begin FUseNullToken := True; Exit(''); end; if Retry >= Tries then begin if StatusCode = 400 then begin LogManager.GetLogger(TEC2InstanceMetadata).Error( 'Unable to contact EC2 Metadata service to obtain a metadata token: ' + E.Message); raise; end; LogManager.GetLogger(TEC2InstanceMetadata).Error( '"Unable to contact EC2 Metadata service to obtain a metadata token. Attempting to access IMDS without a token.' + E.Message); //If there isn't a status code, it was a failure to contact the server which would be //a request failure, a network issue, or a timeout. Cache this response and fallback //to IMDS flow without a token. If the non token IMDS flow returns unauthorized, the //useNullToken flag will be cleared and the IMDS flow will attempt to obtain another //token. if StatusCode = 0 then FUseNullToken := True; //Return empty to fallback to the IMDS flow without using a token. Exit(''); end; PauseExponentially(Retry - 1); end; end; end; Result := ''; end; class function TEC2InstanceMetadata.GetData(const Path: string; Tries: Integer): string; var Items: TArray<string>; begin Items := GetItems(Path, Tries, True); if Length(Items) > 0 then Result := Items[0] else Result := ''; end; class function TEC2InstanceMetadata.GetItems(const RelativeOrAbsolutePath: string; Tries: Integer; Slurp: Boolean; const Token: string): TArray<string>; var Headers: THttpHeaders; Items: TList<string>; LocalToken: string; Uri: string; Content: string; Reader: TStringReader; Line: string; StatusCode: Integer; begin Items := nil; Headers := THttpHeaders.Create; try Items := TList<string>.Create; // For all meta-data queries we need to fetch an api token to use. In the event a // token cannot be obtained we will fallback to not using a token. LocalToken := Token; if LocalToken = '' then LocalToken := FetchApiToken(DEFAULT_RETRIES); if LocalToken <> '' then Headers.AddValue(THeaderKeys.XAwsEc2MetadataToken, LocalToken); try if not IsIMDSEnabled then raise IMDSDisabledException.Create('EC2 metadata not enabled'); // if we are given a relative path, we assume the data we need exists under the // main metadata root Uri := RelativeOrAbsolutePath; if not StartsText(EC2_METADATA_SVC, RelativeOrAbsolutePath) then Uri := EC2_METADATA_ROOT + Uri; Content := TAWSSDKUtils.ExecuteHttpRequest(Uri, 'GET', '', 5000, Headers); Reader := TStringReader.Create(Content); try if Slurp then Items.Add(Reader.ReadToEnd) else begin repeat Line := Reader.ReadLine; if Line <> '' then Items.Add(Trim(Line)); until Line = ''; end; finally Reader.Free; end; except on E: IMDSDisabledException do begin SetLength(Result, 0); Exit; end; on E: Exception do begin if E is EWebException then StatusCode := EWebException(E).StatusCode else StatusCode := 0; if StatusCode = 404 then begin SetLength(Result, 0); Exit; end else if StatusCode = 401 then begin ClearTokenFlag; LogManager.GetLogger(TEC2InstanceMetadata).Error( 'EC2 Metadata service returned unauthorized for token based secure data flow. ' + E.Message); raise; end; if Tries <= 1 then begin LogManager.GetLogger(TEC2InstanceMetadata).Error( 'Unable to contact EC2 Metadata service. ' + E.Message); SetLength(Result, 0); Exit; end; PauseExponentially(DEFAULT_RETRIES - Tries); Exit(GetItems(RelativeOrAbsolutePath, Tries - 1, Slurp, Token)); end; end; Result := Items.ToArray; finally Headers.Free; Items.Free; end; end; class function TEC2InstanceMetadata.GetItems(const Path: string): TArray<string>; begin Result := GetItems(Path, DEFAULT_RETRIES, False); end; class function TEC2InstanceMetadata.GetItems(const RelativeOrAbsolutePath: string; Tries: Integer; Slurp: Boolean): TArray<string>; begin Result := GetItems(RelativeOrAbsolutePath, Tries, Slurp, ''); end; class function TEC2InstanceMetadata.IAMSecurityCredentials: TObjectDictionary<string, TIAMSecurityCredentialMetadata>; var List: TArray<string>; Creds: TObjectDictionary<string, TIAMSecurityCredentialMetadata>; Cred: TIAMSecurityCredentialMetadata; Item: string; Json: string; begin List := GetItems('/iam/security-credentials'); if Length(List) = 0 then Exit(nil); Creds := TObjectDictionary<string, TIAMSecurityCredentialMetadata>.Create([doOwnsValues]); try for Item in List do begin Json := GetData('/iam/security-credentials/' + item); try Cred := TJson.Deserialize<TIAMSecurityCredentialMetadata>(Json); Creds.AddOrSetValue(Item, Cred); except on E: Exception do begin LogManager.GetLogger(TEC2InstanceMetadata).Error( E.Message + sLineBreak + Json); Cred := TIAMSecurityCredentialMetadata.Create; Creds.AddOrSetValue(Item, Cred); Cred.Code := 'Failed'; Cred.Message := 'Could not parse response from metadata service.'; end; end; end; Result := Creds; Creds := nil; finally Creds.Free; end; end; class function TEC2InstanceMetadata.IdentityDocument: string; begin Result := GetData(EC2_DYNAMICDATA_ROOT + '/instance-identity/document'); end; class function TEC2InstanceMetadata.IsIMDSEnabled: Boolean; const cTrue = 'true'; var Value: string; begin Value := ''; try Value := GetEnvironmentVariable(AWS_EC2_METADATA_DISABLED); except end; Result := not SameText(Value, cTrue); end; class procedure TEC2InstanceMetadata.PauseExponentially(Retry: Integer); var Pause: Integer; begin Pause := Trunc(Power(2, Retry) * MIN_PAUSE_MS); if Pause < MIN_PAUSE_MS then Pause := MIN_PAUSE_MS; Sleep(Pause); end; class function TEC2InstanceMetadata.Region: IRegionEndpointEx; var Logger: ILogger; IdDocument: string; JsonDocument: TJObject; RegionName: TJElement; begin IdDocument := IdentityDocument; if IdDocument <> '' then try JsonDocument := TJson.Deserialize<TJObject>(IdDocument); try RegionName := JsonDocument['region']; if RegionName <> nil then Exit(TRegionEndpoint.GetBySystemName(RegionName.AsString)); finally JsonDocument.Free; end; except on E: Exception do begin Logger := LogManager.GetLogger(TEC2InstanceMetadata); Logger.Error('Error attempting to read region from instance metadata identity document' + E.Message); end; end; Result := nil; end; end.
29.422572
138
0.680642
85e7e2208430131bb8b0a44ed930f85cc0f73469
6,079
pas
Pascal
kosinterface.pas
piotrmaslanka/KropekFXR151
0d62bcaea1a914ac3daf209b1aeb547fba593f0e
[ "Beerware" ]
null
null
null
kosinterface.pas
piotrmaslanka/KropekFXR151
0d62bcaea1a914ac3daf209b1aeb547fba593f0e
[ "Beerware" ]
null
null
null
kosinterface.pas
piotrmaslanka/KropekFXR151
0d62bcaea1a914ac3daf209b1aeb547fba593f0e
[ "Beerware" ]
null
null
null
unit KOSInterface; {$mode objfpc}{$H+} interface uses KTypes, KInit, Windows, KConst, gl; type KPerformanceManager = class private lastTime: ubMW; curTime: ubMW; public procedure setAntialiasing(aa: ubMW); function GetCallPerSecond: float; procedure RegisterTime; constructor Create(); end; KMouse = class private lastX, lastY: ubMW; public dX, dY: bMW; X,Y: ubMW; mode: ubMW; mbuttons: MouseButtonStatuses; procedure Refresh; procedure SetPosition(nx,ny: bMW); procedure Center; constructor Create(); end; KKeyboard = class public function isKeyDown(key: ub16): bool; function isKeyPressed(key: ub16): bool; end; KSystemManager = class private timerDelay: ubMW; cTimerID: ubMW; public PerfMgr: KPerformanceManager; Mouse: KMouse; Keyboard: KKeyboard; constructor Create(); destructor Destroy(); procedure SystemBusyLoop; procedure RefreshInput; procedure setTimer(ms: ubMW); function userRequestedQuit: bool; function GetValue(val: ubMW): ubMW; end; implementation {----------------------------------------------------------------- KPerformanceManager } function KPerformanceManager.GetCallPerSecond: float; { returns RegisterTime() calls per second } begin if self.curTime=self.lastTime then self.curTime += 1; { omfg, thats really fast} result := 1000 / (self.curTime - self.lastTime); end; procedure KPerformanceManager.RegisterTime; begin self.lastTime := self.curTime; self.curTime := Windows.GetTickCount(); end; constructor KPerformanceManager.Create(); begin Inherited; self.lastTime := Windows.GetTickCount()-1; self.curTime := self.lastTime+1; end; procedure KPerformanceManager.setAntialiasing(aa: ubMW); begin case aa of KPERFMGR_ANTIALIASING_NONE: begin glDisable(GL_LINE_SMOOTH); glDisable(GL_POLYGON_SMOOTH); end; KPERFMGR_ANTIALIASING_LOW: begin glEnable(GL_POLYGON_SMOOTH); glEnable(GL_LINE_SMOOTH); glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST); glHint(GL_LINE_SMOOTH_HINT, GL_FASTEST); end; KPERFMGR_ANTIALIASING_HIGH: begin glEnable(GL_LINE_SMOOTH); glEnable(GL_POLYGON_SMOOTH); glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST); glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); end; end; end; {---------------------------------------------------- KKeyboard } function KKeyboard.isKeyDown(key: ub16): bool; begin result := vkeys[key]; end; function KKeyboard.isKeyPressed(key: ub16): bool; begin result := vkeypressed[key]; end; {---------------------------------------------------- KMouse } constructor KMouse.Create(); begin self.Center; end; procedure KMouse.Refresh; begin self.mbuttons := []; if kinit.lmb then Include(self.mbuttons, kmbLeft); if kinit.smb then Include(self.mbuttons, kmbLeft); if kinit.rmb then Include(self.mbuttons, kmbLeft); case self.mode of KMOUSEMODE_FREE: begin X := mouseX; Y := mouseY; end; KMOUSEMODE_DELTA: begin dX := (KInit.sizeX div 2) - mouseX; dY := (KInit.sizeY div 2) - mouseY - GetSystemMetrics(SM_CYCAPTION); self.Center(); end; end; end; procedure KMouse.SetPosition(nx,ny: bMW); begin Windows.SetCursorPos(nx+KInit.WinX,ny+KInit.WinY); end; procedure KMouse.Center; begin Windows.SetCursorPos(KInit.WinX + (KInit.sizeX div 2), KInit.WinY + (KInit.sizeY div 2)); end; {--------------------------------------------- KSystemManager } procedure KSystemManager.RefreshInput; begin self.Mouse.Refresh; end; function KSystemManager.GetValue(val: ubMW): ubMW; begin case val of KGETVAL_RC: result := KInit.hrc; KGETVAL_DC: result := KInit.hdc; KGETVAL_HWND: result := KInit.whnd; KGETVAL_HINST: result := hInstance; end; end; function KSystemManager.userRequestedQuit: bool; begin result := KInit.userRequiredQuit; end; procedure KSystemManager.SystemBusyLoop; begin FillChar(vkeypressed, sizeof(boolean)*65535, 0); isTimerTicked := false; if self.timerDelay <> 0 then repeat ProcessSingleMessage until isTimerTicked else while PeekMessage(KInit.message, KInit.whnd, 0, 0, Windows.PM_REMOVE) do begin // TranslateMessage(KInit.message); DispatchMessage(KInit.message); end; end; procedure KSystemManager.setTimer(ms: ubMW); begin if (self.timerDelay=0) and (ms=0) then exit else if self.timerDelay = 0 then begin self.cTimerID := windows.setTimer(whnd, 1, ms, nil); self.timerDelay := ms; end else if ms = 0 then begin if self.timerDelay <> 0 then windows.KillTimer(whnd,self.cTimerID); self.timerDelay := 0; exit; end else begin windows.KillTimer(whnd, self.cTimerID); self.cTimerID := windows.SetTimer(whnd, 1, ms, nil); self.timerDelay := ms; end; end; destructor KSystemManager.Destroy(); begin self.Mouse.Destroy(); self.Keyboard.Destroy(); self.PerfMgr.Destroy(); Inherited; end; constructor KSystemManager.Create(); begin Inherited; self.timerDelay := 0; self.PerfMgr := KPerformanceManager.Create(); self.Mouse := KMouse.Create(); self.Keyboard := KKeyboard.Create(); end; end.
29.086124
107
0.578714
83d2a37aba2f75d93cbb42bd36eb9aaf39cf6082
5,165
pas
Pascal
Updater/UpdaterUnit.pas
liborm85/qip-plugin-rss-news
ccf1cb4d9dd515f6daf7b83bc79f4de8d0659dd6
[ "MIT" ]
null
null
null
Updater/UpdaterUnit.pas
liborm85/qip-plugin-rss-news
ccf1cb4d9dd515f6daf7b83bc79f4de8d0659dd6
[ "MIT" ]
null
null
null
Updater/UpdaterUnit.pas
liborm85/qip-plugin-rss-news
ccf1cb4d9dd515f6daf7b83bc79f4de8d0659dd6
[ "MIT" ]
null
null
null
unit UpdaterUnit; interface uses Windows, SysUtils, ShellApi, Classes, Dialogs, Updater; type {Updater File Info} TUpdaterFileInfo = class public Path : WideString; URL : WideString; MD5 : WideString; Size : Int64; DateTime : WideString; Pack : Boolean; Pack_MD5 : WideString; Pack_Size : Int64; end; function MoveDir(const fromDir, toDir: string): Boolean; procedure CheckNewVersion(bManual: Boolean); var CheckUpdates, CheckBetaUpdates: Boolean; NextCheckVersion : TDateTime; CheckUpdatesInterval: Integer; function Checking(): Boolean; procedure OpenUpdater; var updatethread : DWORD = 0; updater_Manual: Boolean; UpdaterWeb : TStringList; UpdaterWebIndex : Integer; FUpdater: TfrmUpdater; frmUpdater_UpdaterList : WideString; frmUpdater_Version : WideString; frmUpdater_Changelog : WideString; Updater_NewVersionFadeID : DWORD; UpdaterIsShow: Boolean; implementation uses General, u_qip_plugin,Convs, TextSearch, DownloadFile, uLNG; function MoveDir(const fromDir, toDir: string): Boolean; var fos: TSHFileOpStruct; begin ZeroMemory(@fos, SizeOf(fos)); with fos do begin wFunc := FO_MOVE; fFlags := FOF_SILENT Or FOF_NOCONFIRMATION Or FOF_NOCONFIRMMKDIR; pFrom := PChar(fromDir + #0); pTo := PChar(toDir) end; Result := (0 = ShFileOperation(fos)); end; function Checking(): Boolean; var HTMLData: TResultData; Info2: TPositionInfo; sChVersion, sStable, sBeta, sBetaVer, sText, sVer, sUpdater : WideString; iMajor, iMinor, iRelease, iBuild, iFS, iFS1, iFS2: Integer; sBetaLst, sBetaChangeLog, sLst, sChangeLog{, sTest}: WideString; // NewVer: Boolean; sLng : WideString; Label ExitFunc, NextWeb; begin // UpdaterWeb.Insert(0,'http://panther7.ic.cz/updater/'); UpdaterWebIndex := -1; NextWeb: Inc(UpdaterWebIndex); if UpdaterWebIndex > UpdaterWeb.Count - 1 then Goto ExitFunc; if Copy(PluginLanguage,1,1)='<' then sLng := QIPInfiumLanguage else sLng := PluginLanguage; try HTMLData := GetHTML(UpdaterWeb.Strings[UpdaterWebIndex]+'updaterV2.php?name='+PLUGIN_NAME+'&version='+PluginVersion+'&language='+sLng+'&options='+IntToStr(BoolToInt(updater_Manual)), '','', 5000, NO_CACHE, Info2); except end; if HTMLData.OK = True then begin if (CheckUpdates = True) or (updater_Manual = True) then begin sUpdater := FoundStr(HTMLData.parString,'<updater>','</updater>',1,iFS , iFS1, iFS2); if sUpdater='' then Goto NextWeb; // nacteni informaci o stable verzi sStable := FoundStr(sUpdater,'<stable>','</stable>',1,iFS, iFS1, iFS2); sVer := FoundStr(sStable,'<fullver>','</fullver>',1,iFS, iFS1, iFS2); sLst := FoundStr(sStable,'<url_lst>','</url_lst>',1,iFS, iFS1, iFS2); sChangeLog := FoundStr(sStable,'<changelog>','</changelog>',1,iFS, iFS1, iFS2); //nacteni informaci o beta verzi sBeta := FoundStr(sUpdater,'<beta>','</beta>',1,iFS, iFS1, iFS2); sBetaVer := FoundStr(sBeta,'<fullver>','</fullver>',1,iFS, iFS1, iFS2); sBetaLst := FoundStr(sBeta,'<url_lst>','</url_lst>',1,iFS, iFS1, iFS2); sBetaChangeLog := FoundStr(sBeta,'<changelog>','</changelog>',1,iFS, iFS1, iFS2); if CheckBetaUpdates then //Zapnuto oznamovani beta verzi begin if Trim(sBetaVer) > Trim(sVer) then begin // Beta verze je novejsi nez stable verze sVer := sBetaVer; sLst := sBetaLst; sChangeLog := sBetaChangeLog; end; end; if Trim(PluginVersion) < Trim(sVer) then begin // Kontrola zda je novejsi verze sText := ReplNewVesion( LNG('UPDATER', 'NewVersion', 'New version %VERSION% is available.'), sVer); frmUpdater_UpdaterList := sLst; frmUpdater_Version := sVer; frmUpdater_Changelog := UTF82WideString(sChangeLog); QIPPlugin.AddFadeMsg(1, PluginSkin.Update.Icon.Handle, PLUGIN_NAME, sText, True, True, 60, 255); end else begin if updater_Manual = True then begin sText := LNG('UPDATER', 'LastestVersion', 'You already have the lastest version.'); QIPPlugin.AddFadeMsg(1, PluginSkin.Update.Icon.Handle, PLUGIN_NAME, sText, True, False, 5, 0); end; end; end; end; ExitFunc: updatethread := 0; Result := True; end; procedure CheckNewVersion(bManual: Boolean); var ThreadId: Cardinal; begin if (NextCheckVersion <= Now) or (bManual = True) then begin if CheckUpdatesInterval < 1 then CheckUpdatesInterval := 6; NextCheckVersion := Now + ( CheckUpdatesInterval * (1/(24{*60}) ) ); updater_Manual := bManual; if updatethread = 0 then updatethread := BeginThread(nil, 0, @Checking, nil, 0, ThreadId); end; end; procedure OpenUpdater; begin if UpdaterIsShow = False then begin FUpdater := TfrmUpdater.Create(nil); FUpdater.Show; end; end; end.
27.473404
219
0.640852
83be49e521d57e4580360483b55fdf4d24a3fb9f
14,006
pas
Pascal
Packages/Order Entry Results Reporting/CPRS/CPRS-Chart/Encounter/fVisitType.pas
josephsnyder/VistA
07cabf4302675991dd453aea528f79f875358d58
[ "Apache-2.0" ]
1
2021-01-01T01:16:44.000Z
2021-01-01T01:16:44.000Z
CPRSChart/OR_30_423_SRC/CPRS-chart/Encounter/fVisitType.pas
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
null
null
null
CPRSChart/OR_30_423_SRC/CPRS-chart/Encounter/fVisitType.pas
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
null
null
null
unit fVisitType; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, fPCEBase, StdCtrls, CheckLst, ORCtrls, ExtCtrls, Buttons, uPCE, rPCE, ORFn, rCore, ComCtrls, mVisitRelated, VA508AccessibilityManager; type TfrmVisitType = class(TfrmPCEBase) pnlTop: TPanel; splLeft: TSplitter; splRight: TSplitter; pnlLeft: TPanel; lstVTypeSection: TORListBox; pnlMiddle: TPanel; fraVisitRelated: TfraVisitRelated; pnlSC: TPanel; lblSCDisplay: TLabel; memSCDisplay: TCaptionMemo; pnlBottom: TPanel; btnAdd: TButton; btnDelete: TButton; btnPrimary: TButton; pnlBottomLeft: TPanel; lblProvider: TLabel; cboPtProvider: TORComboBox; pnlBottomRight: TPanel; lbProviders: TORListBox; lblCurrentProv: TLabel; lblVTypeSection: TLabel; pnlModifiers: TPanel; lbMods: TORListBox; lblMod: TLabel; pnlSection: TPanel; lbxVisits: TORListBox; lblVType: TLabel; procedure lstVTypeSectionClick(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure FormCreate(Sender: TObject); procedure btnAddClick(Sender: TObject); procedure btnDeleteClick(Sender: TObject); procedure btnPrimaryClick(Sender: TObject); procedure cboPtProviderDblClick(Sender: TObject); procedure cboPtProviderChange(Sender: TObject); procedure cboPtProviderNeedData(Sender: TObject; const StartFrom: String; Direction, InsertAt: Integer); procedure lbProvidersChange(Sender: TObject); procedure lbProvidersDblClick(Sender: TObject); procedure FormResize(Sender: TObject); procedure lbxVisitsClickCheck(Sender: TObject; Index: Integer); procedure lbModsClickCheck(Sender: TObject; Index: Integer); procedure lbxVisitsClick(Sender: TObject); procedure memSCDisplayEnter(Sender: TObject); protected FSplitterMove: boolean; procedure ShowModifiers; procedure CheckModifiers; private FChecking: boolean; FCheckingMods: boolean; FLastCPTCodes: string; FLastMods: string; procedure RefreshProviders; procedure UpdateProviderButtons; public procedure MatchVType; end; var frmVisitType: TfrmVisitType; USCchecked:boolean = false; // PriProv: Int64; PriProv: Int64; const LBCheckWidthSpace = 18; implementation {$R *.DFM} uses fEncounterFrame, uCore, uConst, VA508AccessibilityRouter; const FN_NEW_PERSON = 200; procedure TfrmVisitType.MatchVType; var i: Integer; Found: Boolean; begin with uVisitType do begin if Code = '' then Exit; Found := False; with lstVTypeSection do for i := 0 to Items.Count - 1 do if Piece(Items[i], U, 2) = Category then begin ItemIndex := i; lstVTypeSectionClick(Self); Found := True; break; end; if Found then for i := 0 to lbxVisits.Items.Count - 1 do if Pieces(lbxVisits.Items[i], U, 1, 2) = Code + U + Narrative then begin lbxVisits.ItemIndex := i; FChecking := TRUE; try lbxVisits.Checked[i] := True; lbxVisitsClickCheck(Self, i); finally FChecking := FALSE; end; end; end; end; procedure TfrmVisitType.lstVTypeSectionClick(Sender: TObject); var i: Integer; begin inherited; ListVisitTypeCodes(lbxVisits.Items, lstVTypeSection.ItemIEN); with uVisitType do for i := 0 to lbxVisits.Items.Count - 1 do begin if ((uVisitType <> nil) and (Pieces(lbxVisits.Items[i], U, 1, 2) = Code + U + Narrative)) then begin FChecking := TRUE; try lbxVisits.Checked[i] := True; lbxVisits.ItemIndex := i; finally FChecking := FALSE; end; end; end; lbxVisitsClick(Self); end; procedure TfrmVisitType.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin inherited; //process before closing end; (*function ExposureAnswered: Boolean; begin result := false; //if SC answered set result = true end;*) procedure TfrmVisitType.RefreshProviders; var i: integer; ProvData: TPCEProviderRec; ProvEntry: string; begin lbProviders.Clear; for i := 0 to uProviders.count-1 do begin ProvData := uProviders[i]; ProvEntry := IntToStr(ProvData.IEN) + U + ProvData.Name; if(ProvData.Primary) then ProvEntry := ProvEntry + ' (Primary)'; lbProviders.Items.Add(ProvEntry); end; UpdateProviderButtons; end; procedure TfrmVisitType.FormCreate(Sender: TObject); var AIEN: Int64; begin inherited; FTabName := CT_VisitNm; FSectionTabCount := 2; FormResize(Self); AIEN := uProviders.PendingIEN(TRUE); if(AIEN = 0) then begin AIEN := uProviders.PendingIEN(FALSE); if(AIEN = 0) then begin cboPtProvider.InitLongList(User.Name); AIEN := User.DUZ; end else cboPtProvider.InitLongList(uProviders.PendingName(FALSE)); cboPtProvider.SelectByIEN(AIEN); end else begin cboPtProvider.InitLongList(uProviders.PendingName(TRUE)); cboPtProvider.SelectByIEN(AIEN); end; RefreshProviders; FLastMods := uEncPCEData.VisitType.Modifiers; fraVisitRelated.TabStop := FALSE; end; (*procedure TfrmVisitType.SynchEncounterProvider; // add the Encounter.Provider if this note is for the current encounter var ProviderFound, PrimaryFound: Boolean; i: Integer; AProvider: TPCEProvider; begin if (FloatToStrF(uEncPCEData.DateTime, ffFixed, 15, 4) = // compensate rounding errors FloatToStrF(Encounter.DateTime, ffFixed, 15, 4)) and (uEncPCEData.Location = Encounter.Location) and (Encounter.Provider > 0) then begin ProviderFound := False; PrimaryFound := False; for i := 0 to ProviderLst.Count - 1 do begin AProvider := TPCEProvider(ProviderLst.Items[i]); if AProvider.IEN = Encounter.Provider then ProviderFound := True; if AProvider.Primary = '1' then PrimaryFound := True; end; if not ProviderFound then begin AProvider := TPCEProvider.Create; AProvider.IEN := Encounter.Provider; AProvider.Name := ExternalName(Encounter.Provider, FN_NEW_PERSON); if not PrimaryFound then begin AProvider.Primary := '1'; uProvider := Encounter.Provider; end else AProvider.Primary := '0'; AProvider.Delete := False; ProviderLst.Add(AProvider); end; end; end; *) procedure TfrmVisitType.UpdateProviderButtons; var ok: boolean; begin ok := (lbProviders.ItemIndex >= 0); btnDelete.Enabled := ok; btnPrimary.Enabled := ok; btnAdd.Enabled := (cboPtProvider.ItemIEN <> 0); end; procedure TfrmVisitType.btnAddClick(Sender: TObject); begin inherited; uProviders.AddProvider(IntToStr(cboPTProvider.ItemIEN), cboPTProvider.Text, FALSE); RefreshProviders; lbProviders.SelectByIEN(cboPTProvider.ItemIEN); end; procedure TfrmVisitType.btnDeleteClick(Sender: TObject); var idx: integer; begin inherited; If lbProviders.ItemIndex = -1 then exit; idx := uProviders.IndexOfProvider(lbProviders.ItemID); if(idx >= 0) then uProviders.Delete(idx); RefreshProviders; end; procedure TfrmVisitType.btnPrimaryClick(Sender: TObject); var idx: integer; AIEN: Int64; begin inherited; if lbProviders.ItemIndex = -1 then exit; AIEN := lbProviders.ItemIEN; idx := uProviders.IndexOfProvider(IntToStr(AIEN)); if(idx >= 0) then uProviders.PrimaryIdx := idx; RefreshProviders; lbProviders.SelectByIEN(AIEN); btnPrimary.SetFocus; end; procedure TfrmVisitType.cboPtProviderDblClick(Sender: TObject); begin inherited; btnAddClick(Sender); end; procedure TfrmVisitType.cboPtProviderChange(Sender: TObject); begin inherited; UpdateProviderButtons; end; procedure TfrmVisitType.cboPtProviderNeedData(Sender: TObject; const StartFrom: String; Direction, InsertAt: Integer); begin inherited; if(uEncPCEData.VisitCategory = 'E') then cboPtProvider.ForDataUse(SubSetOfPersons(StartFrom, Direction)) else cboPtProvider.ForDataUse(SubSetOfUsersWithClass(StartFrom, Direction, FloatToStr(uEncPCEData.PersonClassDate))); end; procedure TfrmVisitType.lbProvidersChange(Sender: TObject); begin inherited; UpdateProviderButtons; end; procedure TfrmVisitType.lbProvidersDblClick(Sender: TObject); begin inherited; btnDeleteClick(Sender); end; procedure TfrmVisitType.FormResize(Sender: TObject); var v, i: integer; s: string; padding, size: integer; btnOffset: integer; begin if FSplitterMove then FSplitterMove := FALSE else begin // inherited; FSectionTabs[0] := -(lbxVisits.width - LBCheckWidthSpace - MainFontWidth - ScrollBarWidth); FSectionTabs[1] := -(lbxVisits.width - (6*MainFontWidth) - ScrollBarWidth); if(FSectionTabs[0] <= FSectionTabs[1]) then FSectionTabs[0] := FSectionTabs[1]+2; lbxVisits.TabPositions := SectionString; v := (lbMods.width - LBCheckWidthSpace - (4*MainFontWidth) - ScrollBarWidth); s := ''; for i := 1 to 20 do begin if s <> '' then s := s + ','; s := s + inttostr(v); if(v<0) then dec(v,32) else inc(v,32); end; lbMods.TabPositions := s; end; btnOffset := btnAdd.Width div 7; padding := btnAdd.Width + (btnOffset * 2); size := (ClientWidth - padding) div 2; pnlBottomLeft.Width := size; pnlBottomRight.Width := size; btnAdd.Left := size + btnOffset; btnDelete.Left := size + btnOffset; btnPrimary.Left := size + btnOffset; btnOK.top := ClientHeight - btnOK.Height - 4; btnCancel.top := btnOK.Top; btnCancel.Left := ClientWidth - btnCancel.Width - 4; btnOK.Left := btnCancel.Left - btnOK.Width - 4; size := ClientHeight - btnOK.Height - pnlMiddle.Height - pnlBottom.Height - 8; pnlTop.Height := size; end; procedure TfrmVisitType.lbxVisitsClickCheck(Sender: TObject; Index: Integer); var i: Integer; x, CurCategory: string; begin inherited; if FChecking or FClosing then exit; for i := 0 to lbxVisits.Items.Count - 1 do if i <> lbxVisits.ItemIndex then begin FChecking := TRUE; try uVisitType.Modifiers := ''; lbxVisits.Checked[i] := False; finally FChecking := FALSE; end; end; if lbxVisits.Checked[lbxVisits.ItemIndex] then with uVisitType do begin with lstVTypeSection do CurCategory := Piece(Items[ItemIndex], U, 2); x := Pieces(lbxVisits.Items[lbxVisits.ItemIndex], U, 1, 2); x := 'CPT' + U + Piece(x, U, 1) + U + CurCategory + U + Piece(x, U, 2) + U + '1' + U + IntToStr(uProviders.PrimaryIEN); // + IntToStr(uProvider); uVisitType.SetFromString(x); end else begin uVisitType.Clear; //with lstVTypeSection do CurCategory := Piece(Items[ItemIndex], U, 2); end; end; procedure TfrmVisitType.ShowModifiers; const ModTxt = 'Modifiers'; ForTxt = ' for '; Spaces = ' '; var TopIdx: integer; // Needed, Codes, VstName, Hint, Msg: string; begin Codes := ''; VstName := ''; Hint := ''; if(Codes = '') and (lbxVisits.ItemIndex >= 0) then begin Codes := piece(lbxVisits.Items[lbxVisits.ItemIndex],U,1) + U; VstName := piece(lbxVisits.Items[lbxVisits.ItemIndex],U,2); Hint := VstName; // Needed := piece(lbxVisit.Items[lbxVisit.ItemIndex],U,4); Don't show expired codes! end; msg := ModTxt; if(VstName <> '') then msg := msg + ForTxt; lblMod.Caption := msg + VstName; lbMods.Caption := lblMod.Caption; if(pos(CRLF,Hint)>0) then Hint := ':' + CRLF + Spaces + Hint; lblMod.Hint := msg + Hint; if(FLastCPTCodes = Codes) then TopIdx := lbMods.TopIndex else begin TopIdx := 0; FLastCPTCodes := Codes; end; ListCPTModifiers(lbMods.Items, Codes, ''); // Needed); lbMods.TopIndex := TopIdx; CheckModifiers; end; procedure TfrmVisitType.CheckModifiers; var i, idx, cnt, mcnt: integer; Code, Mods: string; state: TCheckBoxState; begin if lbMods.Items.Count < 1 then exit; FCheckingMods := TRUE; try cnt := 0; Mods := ';'; if uVisitType.Modifiers <> '' then begin inc(cnt); Mods := Mods + uVisitType.Modifiers; end; if(cnt = 0) and (lbxVisits.ItemIndex >= 0) then begin Mods := ';' + UpdateVisitTypeModifierList(lbxVisits.Items, lbxVisits.ItemIndex); lbxVisits.Checked[lbxVisits.ItemIndex] := True; cnt := 1; end; for i := 0 to lbMods.Items.Count-1 do begin state := cbUnchecked; if(cnt > 0) then begin Code := ';' + piece(lbMods.Items[i], U, 1) + ';'; mcnt := 0; repeat idx := pos(Code, Mods); if(idx > 0) then begin inc(mcnt); delete(Mods, idx, length(Code) - 1); end; until (idx = 0); if mcnt >= cnt then State := cbChecked else if(mcnt > 0) then State := cbGrayed; end; lbMods.CheckedState[i] := state; end; finally FCheckingMods := FALSE; end; end; procedure TfrmVisitType.lbModsClickCheck(Sender: TObject; Index: Integer); var idx: integer; ModIEN: string; Add: boolean; begin if FCheckingMods or (Index < 0) then exit; Add := (lbMods.Checked[Index]); ModIEN := piece(lbMods.Items[Index],U,1) + ';'; idx := pos(';' + ModIEN, ';' + uVisitType.Modifiers); if(idx > 0) then begin if not Add then begin delete(uVisitType.Modifiers, idx, length(ModIEN)); end; end else begin if Add then begin uVisitType.Modifiers := uVisitType.Modifiers + ModIEN; end; end; end; procedure TfrmVisitType.lbxVisitsClick(Sender: TObject); begin inherited; ShowModifiers; end; procedure TfrmVisitType.memSCDisplayEnter(Sender: TObject); begin inherited; memSCDisplay.SelStart := 0; end; initialization SpecifyFormIsNotADialog(TfrmVisitType); //frmVisitType.CreateProviderList; finalization //frmVisitType.FreeProviderList; end.
25.327306
100
0.672355
f13db891c49c2940630c526428f3ba50a05e1399
11,748
pas
Pascal
windows/src/ext/jedi/jvcl/help/tools/Common/GroupDtxProducer.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jvcl/help/tools/Common/GroupDtxProducer.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
4,451
2017-05-29T02:52:06.000Z
2022-03-31T23:53:23.000Z
windows/src/ext/jedi/jvcl/help/tools/Common/GroupDtxProducer.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
72
2017-05-26T04:08:37.000Z
2022-03-03T10:26:20.000Z
unit GroupDtxProducer; interface uses Classes, ContNrs, JVCLHelpUtils, DtxParser, DtxAnalyzer; type TGroupDtxProducer = class(TTask) private FGroupInfos: TGroupInfos; FComponentInfos: TComponentInfos; FGroupsDtxFileName: string; FNoLinks: Boolean; function IsNotDocumented(ASymbolList: TSymbolList): Boolean; protected function CountComp(AGroupInfo: TGroupInfo): Integer; function CountClass(AGroupInfo: TGroupInfo): Integer; function CountRoutines(AGroupInfo: TGroupInfo): Integer; procedure SaveGroupInfoDescription(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); procedure SaveGroupInfoComponentList(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); procedure SaveGroupInfoClassList(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); procedure SaveGroupInfoRoutineList(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); procedure SaveGroupInfo(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter; const TopicOrder: Integer); procedure SaveGroupInfos(AGroupInfos: TGroupInfos; ADtxWriter: TDtxWriter); procedure SaveDtx(ADtxWriter: TDtxWriter); function CanStart: Boolean; override; function DoExecute: Boolean; override; function GetTaskDescription: string; override; public property GroupInfos: TGroupInfos read FGroupInfos write FGroupInfos; property ComponentInfos: TComponentInfos read FComponentInfos write FComponentInfos; property GroupsDtxFileName: string read FGroupsDtxFileName write FGroupsDtxFileName; property NoLinks: Boolean read FNoLinks write FNoLinks; end; implementation uses SysUtils, ParserTypes; //const // cifSymbolType = [cifComponent, cifClass, cifRoutine]; function TGroupDtxProducer.CanStart: Boolean; begin Result := not IsNullStr(GroupsDtxFileName) and Assigned(GroupInfos) and Assigned(ComponentInfos); end; function TGroupDtxProducer.CountClass(AGroupInfo: TGroupInfo): Integer; var I: Integer; begin Result := 0; for I := AGroupInfo.Components.Count - 1 downto 0 do if cifClass in ComponentInfos.ItemByName[AGroupInfo.Components[I]].Flags then Inc(Result); end; function TGroupDtxProducer.CountComp(AGroupInfo: TGroupInfo): Integer; var I: Integer; begin Result := 0; for I := AGroupInfo.Components.Count - 1 downto 0 do if cifComponent in ComponentInfos.ItemByName[AGroupInfo.Components[I]].Flags then Inc(Result); end; function TGroupDtxProducer.CountRoutines(AGroupInfo: TGroupInfo): Integer; var I: Integer; begin Result := 0; for I := AGroupInfo.Components.Count - 1 downto 0 do if cifRoutine in ComponentInfos.ItemByName[AGroupInfo.Components[I]].Flags then Inc(Result); end; function TGroupDtxProducer.DoExecute: Boolean; var Stream: TFileStream; DtxWriter: TDtxWriter; begin Result := True; Stream := TFileStream.Create(GroupsDtxFileName, fmCreate); try DtxWriter := TDtxWriter.Create; try DtxWriter.DestStream := Stream; SaveDtx(DtxWriter); finally DtxWriter.Free; end; finally Stream.Free; end; end; function TGroupDtxProducer.GetTaskDescription: string; begin Result := 'Genererating function reference'; end; function TGroupDtxProducer.IsNotDocumented( ASymbolList: TSymbolList): Boolean; begin Result := Assigned(ASymbolList) and (ASymbolList.Count = 1) and (ASymbolList[0] is TStringSymbol) and (SameText(TStringSymbol(ASymbolList[0]).Value, cSummaryDefaultTextForBuild)); end; procedure TGroupDtxProducer.SaveDtx(ADtxWriter: TDtxWriter); begin ADtxWriter.WriteLn(StringOfChar('#', 100)); ADtxWriter.WriteComment(Pad(' JEDI-VCL help: Functional reference include file.', 94, ' ') + ' ##'); ADtxWriter.WriteComment(Pad(' Include file generated on ' + FormatDateTime('dd-mm-yyyy "at" hh:nn:ss', Now), 94, ' ') + ' ##'); ADtxWriter.Writeln(StringOfChar('#', 100)); ADtxWriter.WriteTopicName('$JVCL.FuncRef'); ADtxWriter.WriteLn('<GROUP $JVCL>'); ADtxWriter.WriteTitle('Functional Reference'); ADtxWriter.BeginSection('Description'); ADtxWriter.WriteWrappedData( 'JEDI-VCL consists of many components and controls for all sorts of things. To help you find the ' + 'right component for a particular task, we have categorized the controls and components. Some ' + 'components are in multiple categories if there was any overlap in functionality of the ' + 'component.'); ADtxWriter.EndSection; ADtxWriter.WriteSepLine; SaveGroupInfos(FGroupInfos, ADtxWriter); // FileSL.SaveToFile(HelpPath + 'generated includes\JVCL.FuncRef.dtx'); end; procedure TGroupDtxProducer.SaveGroupInfo(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter; const TopicOrder: Integer); begin with AGroupInfo do begin ADtxWriter.WriteTopicName('$' + ParentGroupID + '.' + GroupID); ADtxWriter.WriteLnFmt('<GROUP $%s>', [ParentGroupID(Parent = nil)]); ADtxWriter.WriteLnFmt('<TOPICORDER %d>', [TopicOrder]); ADtxWriter.WriteTitle(AGroupInfo.GroupTitle); ADtxWriter.BeginSection('Description'); SaveGroupInfoDescription(AGroupInfo, ADtxWriter); SaveGroupInfoComponentList(AGroupInfo, ADtxWriter); SaveGroupInfoClassList(AGroupInfo, ADtxWriter); SaveGroupInfoRoutineList(AGroupInfo, ADtxWriter); ADtxWriter.EndSection; ADtxWriter.WriteLn; ADtxWriter.WriteSepLine; SaveGroupInfos(SubGroups, ADtxWriter); end; end; procedure TGroupDtxProducer.SaveGroupInfoClassList(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); var I: Integer; Comp: TComponentInfo; DtxTable: TDtxTable; RowCount: Integer; SymbolList: TSymbolList; begin if CountClass(AGroupInfo) = 0 then Exit; if CountComp(AGroupInfo) > 0 then begin ADtxWriter.WriteLn; ADtxWriter.WriteLn; ADtxWriter.WriteWrappedData('In addition to these components, the following classes belong to this group:'); end else ADtxWriter.WriteWrappedData('This group contains the following classes:'); RowCount := 0; DtxTable := TDtxTable.Create; try DtxTable.ColCount := 2; DtxTable.RowCount := AGroupInfo.Components.Count; DtxTable.Header[0] := 'Class'; DtxTable.Header[1] := 'Description'; DtxTable.HasHeader := True; for I := 0 to AGroupInfo.Components.Count - 1 do begin Comp := ComponentInfos[ComponentInfos.IndexOf(AGroupInfo.Components[I])]; if cifClass in Comp.Flags then begin if IsNotDocumented(Comp.Summary) then begin DtxTable.Cells[0, RowCount] := Comp.Name; SymbolList := TSymbolList.Create; SymbolList.Parse(Format('Not documented (' + cEditLink + ').', [Comp.Name, 'Edit topic'])); DtxTable.CellsSymbols[1, RowCount] := SymbolList; end else begin if NoLinks then DtxTable.Cells[0, RowCount] else DtxTable.Cells[0, RowCount] := LinkStr(Comp.Name); DtxTable.CellsSymbols[1, RowCount] := Comp.Summary.ConstructCopy; end; Inc(RowCount); end; end; DtxTable.RowCount := RowCount; DtxTable.SaveDtx(ADtxWriter); finally DtxTable.Free; end; end; procedure TGroupDtxProducer.SaveGroupInfoComponentList(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); var RowCount: Integer; I: Integer; Comp: TComponentInfo; DtxTable: TDtxTable; SymbolList: TSymbolList; begin if CountComp(AGroupInfo) = 0 then Exit; RowCount := 0; DtxTable := TDtxTable.Create; try DtxTable.ColCount := 2; DtxTable.RowCount := AGroupInfo.Components.Count; DtxTable.Header[0] := 'Component'; DtxTable.Header[1] := 'Description'; DtxTable.HasHeader := True; for I := 0 to AGroupInfo.Components.Count - 1 do begin Comp := ComponentInfos[ComponentInfos.IndexOf(AGroupInfo.Components[I])]; if cifComponent in Comp.Flags then begin if IsNotDocumented(Comp.Summary) then begin DtxTable.Cells[0, RowCount] := Format('<IMAGE %s> %s', [Comp.Image, Comp.Name]); SymbolList := TSymbolList.Create; try SymbolList.Parse(Format('Not documented (' + cEditLink + ').', [Comp.Name, 'Edit topic'])); DtxTable.CellsSymbols[1, RowCount] := SymbolList; except SymbolList.Free; raise; end; end else begin if NoLinks then DtxTable.Cells[0, RowCount] := Format('<IMAGE %s> %s', [Comp.Image, Comp.Name]) else DtxTable.Cells[0, RowCount] := Format('<IMAGE %s> <LINK %s>', [Comp.Image, Comp.Name]); DtxTable.CellsSymbols[1, RowCount] := Comp.Summary.ConstructCopy; end; Inc(RowCount); end; end; DtxTable.RowCount := RowCount; DtxTable.SaveDtx(ADtxWriter); finally DtxTable.Free; end; end; procedure TGroupDtxProducer.SaveGroupInfoDescription(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); begin ADtxWriter.WriteWrappedData(AGroupInfo.GroupText); ADtxWriter.WriteLn; if AGroupInfo.Components.Count > 0 then begin if CountComp(AGroupInfo) > 0 then ADtxWriter.WriteWrappedData('This group contains the following components and controls:'); end else ADtxWriter.WriteWrappedData('This group is currently empty.'); end; procedure TGroupDtxProducer.SaveGroupInfoRoutineList(AGroupInfo: TGroupInfo; ADtxWriter: TDtxWriter); var I: Integer; Comp: TComponentInfo; DtxTable: TDtxTable; RowCount: Integer; HasClasses: Boolean; HasComps: Boolean; SymbolList: TSymbolList; begin if CountRoutines(AGroupInfo) = 0 then Exit; HasClasses := CountClass(AGroupInfo) > 0; HasComps := CountComp(AGroupInfo) > 0; if HasComps then begin ADtxWriter.WriteLn; ADtxWriter.WriteLn; if HasClasses then ADtxWriter.WriteWrappedData( 'In addition to these components and classes, the following routines belong to this group:') else ADtxWriter.WriteWrappedData( 'In addition to these components, the following routines belong to this group:') end else if HasClasses then begin ADtxWriter.WriteLn; ADtxWriter.WriteLn; ADtxWriter.WriteWrappedData('In addition to these classes, the following routines belong to this group:'); end else ADtxWriter.WriteWrappedData('This group contains the following classes:'); RowCount := 0; DtxTable := TDtxTable.Create; try DtxTable.ColCount := 2; DtxTable.RowCount := AGroupInfo.Components.Count; DtxTable.Header[0] := 'Routine'; DtxTable.Header[1] := 'Description'; DtxTable.HasHeader := True; for I := 0 to AGroupInfo.Components.Count - 1 do begin Comp := ComponentInfos[ComponentInfos.IndexOf(AGroupInfo.Components[I])]; if cifRoutine in Comp.Flags then begin if IsNotDocumented(Comp.Summary) then begin DtxTable.Cells[0, RowCount] := Comp.Name; SymbolList := TSymbolList.Create; SymbolList.Parse(Format('Not documented (' + cEditLink + ').', [Comp.Name, 'Edit topic'])); DtxTable.CellsSymbols[1, RowCount] := SymbolList; end else begin if NoLinks then DtxTable.Cells[0, RowCount] := Comp.Name else DtxTable.Cells[0, RowCount] := LinkStr(Comp.Name); DtxTable.CellsSymbols[1, RowCount] := Comp.Summary.ConstructCopy; end; Inc(RowCount); end; end; DtxTable.RowCount := RowCount; DtxTable.SaveDtx(ADtxWriter); finally DtxTable.Free; end; end; procedure TGroupDtxProducer.SaveGroupInfos(AGroupInfos: TGroupInfos; ADtxWriter: TDtxWriter); var I: Integer; begin with AGroupInfos do for I := 0 to Count - 1 do SaveGroupInfo(Items[I], ADtxWriter, -Count + I); end; end.
30.514286
112
0.705652
83e53699575cfffc1b18300bdac7fb5a8e4aa44c
259
pas
Pascal
bin/gcd.pas
jaredtking/cs4013-4
487384036392f2627f0334962e4ec1fdbef0f1c0
[ "MIT" ]
1
2015-03-22T17:18:49.000Z
2015-03-22T17:18:49.000Z
bin/gcd.pas
jaredtking/cs4013-4
487384036392f2627f0334962e4ec1fdbef0f1c0
[ "MIT" ]
null
null
null
bin/gcd.pas
jaredtking/cs4013-4
487384036392f2627f0334962e4ec1fdbef0f1c0
[ "MIT" ]
null
null
null
program example(input, output); var x: integer; var y: integer; var out: integer; function gcd(a: integer; b: integer): integer; begin if b = 0 then gcd := a else gcd := gcd(b, a mod b) end; begin x := 10; y := 3; out := gcd(x, y) end.
18.5
49
0.583012
f19e7521f50efa60b4669c650da87bec39647d29
3,881
dfm
Pascal
Client/fCapacityTableFilter.dfm
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
null
null
null
Client/fCapacityTableFilter.dfm
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
null
null
null
Client/fCapacityTableFilter.dfm
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
3
2021-06-30T10:11:17.000Z
2021-07-01T09:13:29.000Z
inherited fmCapacityTableFilter: TfmCapacityTableFilter Left = 339 Top = 303 Caption = '%s '#1085#1072' '#1042#1048#1052' - '#1058#1072#1073#1083#1080#1095#1077#1085' '#1085#1072' %Capacity% '#1085#1072' '#1058#1055 ClientHeight = 636 PixelsPerInch = 96 TextHeight = 13 inherited pnlBottomButtons: TPanel Top = 601 end inherited pnlMain: TPanel Height = 472 object rgExcessHoursState: TDBRadioGroup Left = 8 Top = 392 Width = 185 Height = 73 Caption = ' '#1044#1077#1092#1080#1094#1080#1090' / '#1055#1088#1077#1085#1072#1090#1086#1074'. ' DataField = 'EXCESS_HOURS_STATE' DataSource = dsData Items.Strings = ( #1042#1089#1080#1095#1082#1080 #1048#1084#1072 #1053#1103#1084#1072) ParentBackground = True TabOrder = 5 Values.Strings = ( '2' '1' '0') end object rgFreeHoursState: TDBRadioGroup Left = 584 Top = 392 Width = 185 Height = 73 Caption = ' '#1057#1074#1086#1073#1086#1076#1077#1085' ' DataField = 'FREE_HOURS_STATE' DataSource = dsData Items.Strings = ( #1042#1089#1080#1095#1082#1080 #1048#1084#1072 #1053#1103#1084#1072) ParentBackground = True TabOrder = 6 Values.Strings = ( '2' '1' '0') end object rgSupportingHoursState: TDBRadioGroup Left = 200 Top = 392 Width = 185 Height = 73 Caption = ' '#1054#1073#1089#1083#1091#1078#1074#1072#1085#1077' ' DataField = 'LOGISTICS_HOURS_STATE' DataSource = dsData Items.Strings = ( #1042#1089#1080#1095#1082#1080 #1048#1084#1072 #1053#1103#1084#1072) ParentBackground = True TabOrder = 7 Values.Strings = ( '2' '1' '0') end object rgDevelopingHoursState: TDBRadioGroup Left = 392 Top = 392 Width = 185 Height = 73 Caption = ' '#1045#1082#1089#1087#1083#1086#1072#1090#1072#1094#1080#1103' ' DataField = 'EXPLOITATION_HOURS_STATE' DataSource = dsData Items.Strings = ( #1042#1089#1080#1095#1082#1080 #1048#1084#1072 #1053#1103#1084#1072) ParentBackground = True TabOrder = 8 Values.Strings = ( '2' '1' '0') end object pnlExcessHoursStateColor: TPanel Left = 18 Top = 393 Width = 11 Height = 11 BevelOuter = bvLowered Color = 8553215 ParentBackground = False TabOrder = 9 end object pnlSupportingHoursStateColor: TPanel Left = 210 Top = 393 Width = 11 Height = 11 BevelOuter = bvLowered Color = 13559807 ParentBackground = False TabOrder = 10 end object pnlDevelopingHoursStateColor: TPanel Left = 402 Top = 393 Width = 11 Height = 11 BevelOuter = bvLowered Color = 15261138 ParentBackground = False TabOrder = 11 end object pnlFreeHoursStateColor: TPanel Left = 594 Top = 393 Width = 11 Height = 11 BevelOuter = bvLowered Color = 14155735 ParentBackground = False TabOrder = 12 end end inherited alActions: TActionList inherited actForm: TAction Caption = '%s '#1085#1072' '#1042#1048#1052' - '#1058#1072#1073#1083#1080#1095#1077#1085' '#1085#1072' %Capacity% '#1085#1072' '#1058#1055 end end inherited cdsFilterVariants: TAbmesClientDataSet Top = 472 end inherited dsFilterVariants: TDataSource Top = 472 end inherited cdsFilterVariantFields: TAbmesClientDataSet Top = 488 end end
26.765517
145
0.569441
f1a9c848bb75f9f090e84291077339306d348edc
6,026
pas
Pascal
dxerr8.pas
randydom/commonx
2315f1acf41167bd77ba4d040b3f5b15a5c5b81a
[ "MIT" ]
48
2018-11-19T22:13:00.000Z
2021-11-02T17:25:41.000Z
dxerr8.pas
jpluimers/commonx
c49e51b4edcc61b2b51e78590a5168d574b66282
[ "MIT" ]
6
2018-11-24T17:15:29.000Z
2019-05-15T14:59:56.000Z
dxerr8.pas
jpluimers/commonx
c49e51b4edcc61b2b51e78590a5168d574b66282
[ "MIT" ]
12
2018-11-20T15:15:44.000Z
2021-09-14T10:12:43.000Z
{******************************************************************************} {* *} {* Copyright (C) Microsoft Corporation. All Rights Reserved. *} {* *} {* File: dxerr8.h *} {* Content: DirectX Error Library Include File *} {* *} {* DirectX 8.x Delphi adaptation by Alexey Barkovoy *} {* E-Mail: directx@clootie.ru *} {* *} {* Modified: 19-Jan-2004 *} {* *} {* Latest version can be downloaded from: *} {* http://clootie.ru *} {* http://sourceforge.net/projects/delphi-dx9sdk *} {* *} {******************************************************************************} { } { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) } { } { The contents of this file are used with permission, subject to the Mozilla } { Public License Version 1.1 (the "License"); you may not use this file except } { in compliance with the License. You may obtain a copy of the License at } { http://www.mozilla.org/MPL/MPL-1.1.html } { } { Software distributed under the License is distributed on an "AS IS" basis, } { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } { the specific language governing rights and limitations under the License. } { } { Alternatively, the contents of this file may be used under the terms of the } { GNU Lesser General Public License (the "LGPL License"), in which case the } { provisions of the LGPL License are applicable instead of those above. } { If you wish to allow use of your version of this file only under the terms } { of the LGPL License and not to allow others to use your version of this file } { under the MPL, indicate your decision by deleting the provisions above and } { replace them with the notice and other provisions required by the LGPL } { License. If you do not delete the provisions above, a recipient may use } { your version of this file under either the MPL or the LGPL License. } { } { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html } { } {******************************************************************************} unit DXErr8; interface uses Windows; (*==========================================================================; * * * File: dxerr8.h * Content: DirectX Error Library Include File * ****************************************************************************) // // DXGetErrorString8 // // Desc: Converts an DirectX HRESULT to a ansistring // // Args: HRESULT hr Can be any error code from // DPLAY D3D8 D3DX8 DMUSIC DSOUND // // Return: Converted ansistring // const //////////// DLL export definitions /////////////////////////////////////// dxerr8dll = 'dxerr81ab.dll'; function DXGetErrorString8A(hr: HRESULT): PAnsiChar; stdcall; external dxerr8dll; function DXGetErrorString8W(hr: HRESULT): PWideChar; stdcall; external dxerr8dll; function DXGetErrorString8(hr: HRESULT): PAnsiChar; stdcall; external dxerr8dll name {$IFDEF UNICODE}'DXGetErrorString8W'{$ELSE}'DXGetErrorString8A'{$ENDIF}; // // DXTrace // // Desc: Outputs a formatted error message to the debug stream // // Args: AnsiChar* strFile The current file, typically passed in using the // __FILE__ macro. // DWORD dwLine The current line number, typically passed in using the // __LINE__ macro. // HRESULT hr An HRESULT that will be traced to the debug stream. // AnsiChar* strMsg A ansistring that will be traced to the debug stream (may be NULL) // BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info. // // Return: The hr that was passed in. // function DXTraceA(strFile: PAnsiChar; dwLine: DWORD; hr: HRESULT; strMsg: PAnsiChar; bPopMsgBox: BOOL): HRESULT; stdcall; external dxerr8dll; function DXTraceW(strFile: PWideChar; dwLine: DWORD; hr: HRESULT; strMsg: PWideChar; bPopMsgBox: BOOL): HRESULT; stdcall; external dxerr8dll; function DXTrace(strFile: PAnsiChar; dwLine: DWORD; hr: HRESULT; strMsg: PAnsiChar; bPopMsgBox: BOOL): HRESULT; stdcall; external dxerr8dll name {$IFDEF UNICODE}'DXTraceW'{$ELSE}'DXTraceA'{$ENDIF}; // // Helper macros // (* #if defined(DEBUG) | defined(_DEBUG) #define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE ) #define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE ) #define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE ) #else #define DXTRACE_MSG(str) (0L) #define DXTRACE_ERR(str,hr) (hr) #define DXTRACE_ERR_NOMSGBOX(str,hr) (hr) #endif *) implementation end.
49.801653
141
0.48772
f168eec525c2e3789bbac1242580bab8af033cf0
800
pas
Pascal
unit4.pas
nanotanto/akuntansi-trading
11964bc19e3d63f54dc394909bd93f9d1033f90a
[ "Apache-2.0" ]
1
2020-05-27T14:42:36.000Z
2020-05-27T14:42:36.000Z
unit4.pas
nanotanto/akuntansi-tading
11964bc19e3d63f54dc394909bd93f9d1033f90a
[ "Apache-2.0" ]
null
null
null
unit4.pas
nanotanto/akuntansi-tading
11964bc19e3d63f54dc394909bd93f9d1033f90a
[ "Apache-2.0" ]
null
null
null
unit Unit4; {$mode objfpc}{$H+} interface uses Classes, SysUtils, db, FileUtil, Forms, Controls, Graphics, Dialogs, DBGrids, StdCtrls, DbCtrls, ZDataset; type { TfAkun } TfAkun = class(TForm) DataSource1: TDataSource; DBGrid1: TDBGrid; DBNavigator1: TDBNavigator; Label1: TLabel; ZQuery1: TZQuery; procedure DataSource1DataChange(Sender: TObject; Field: TField); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); private { private declarations } public { public declarations } end; var fAkun: TfAkun; implementation {$R *.lfm} { TfAkun } procedure TfAkun.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin end; procedure TfAkun.DataSource1DataChange(Sender: TObject; Field: TField); begin end; end.
16
79
0.715
f10a93052f916bb295a1edcc03490a43a63aab36
60,977
dfm
Pascal
Intra_Messenger/Messenger_Client/AudioVideo.dfm
delphi-pascal-archive/intra-messenger
755eca7276b3cf3ec4476a7e55614126261e8d14
[ "Unlicense" ]
null
null
null
Intra_Messenger/Messenger_Client/AudioVideo.dfm
delphi-pascal-archive/intra-messenger
755eca7276b3cf3ec4476a7e55614126261e8d14
[ "Unlicense" ]
null
null
null
Intra_Messenger/Messenger_Client/AudioVideo.dfm
delphi-pascal-archive/intra-messenger
755eca7276b3cf3ec4476a7e55614126261e8d14
[ "Unlicense" ]
null
null
null
object CAudioVideo: TCAudioVideo Left = 219 Top = 181 BorderIcons = [] BorderStyle = bsSingle Caption = 'R'#233'glages Audio / Vid'#233'o' ClientHeight = 549 ClientWidth = 494 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False Scaled = False OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object PageControl1: TPageControl Left = 0 Top = 0 Width = 494 Height = 508 ActivePage = TabSheet1 Align = alClient TabOrder = 0 object TabSheet1: TTabSheet Caption = 'Haut-parleur / microphone' OnShow = TabSheet1Show object GroupBox2: TGroupBox Left = 0 Top = 0 Width = 486 Height = 236 Align = alTop Caption = ' S'#233'lectionnez le haut parleur / microphone '#224' utiliser ' Padding.Left = 20 Padding.Top = 20 Padding.Right = 20 Padding.Bottom = 20 TabOrder = 0 object GroupBox1: TGroupBox Left = 22 Top = 35 Width = 442 Height = 179 Margins.Left = 6 Margins.Top = 6 Margins.Right = 6 Margins.Bottom = 6 Align = alClient Caption = ' S'#233'lectionnez le haut parleur / microphone '#224' utiliser ' Padding.Left = 20 Padding.Top = 20 Padding.Right = 20 Padding.Bottom = 20 TabOrder = 0 object Label1: TLabel Left = 108 Top = 115 Width = 38 Height = 13 Caption = 'Volume:' end object Label3: TLabel Left = 108 Top = 115 Width = 88 Height = 13 Caption = 'Cannot set volume' Visible = False end object Label2: TLabel Left = 108 Top = 158 Width = 62 Height = 13 Caption = 'Mute/Select:' end object Label4: TLabel Left = 108 Top = 158 Width = 110 Height = 13 Caption = 'Cannot set mute/select' Visible = False end object LabelStereo: TLabel Left = 208 Top = 115 Width = 57 Height = 13 Alignment = taRightJustify Caption = 'LabelStereo' end object Image2: TImage Left = 30 Top = 35 Width = 53 Height = 53 Center = True Picture.Data = { 0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000040 000000400806000000AA6971DE000000017352474200AECE1CE9000000046741 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000 80E8000075300000EA6000003A98000017709CBA513C000015D249444154785E ED5B7B5894F799CD66BB49D3346DB6CD6ED3A6B7B4BB7D76B3DDDD3CE9DED26D D274DBED1F9B98441144B98BF71BCC0C88282A282ADE50105104660644C0E136 DC6F02DE058199C1BB88F7BB51A3E9F6D92830EF9EF31B860CC88C6243FA47E5 797ECF20DFCC37DF7B7EE73DEF79DFEFF3A9A79EFC3C41E009027F2208FCD99F 489C0F86A9C9D8FF8D28D3E9AFFF5101282F2F7FA9A2B634A8BCD69C54515D62 ACAC2D595E5163FE4D5B5BDA5F8CF48545A5B57D3D52DFF186887CF12C40E05F 29AF2A59535A597CAFACA6A4BBBAB6E27E755DA5BDA2AAF41E00B09B2B8A2E96 5799C78E2808083C5CDFF15F5AFDC1EF8DE8F70C3EB9D96CFE5E4959C189CADA F26EABAD5DAE5DBF2AD76F5C956BD72ECB952B17E564E771A9DB516D2F2D2F92 D2F2C25493C9F4E723758111D91D3FD5E8AD1F8CD4F91F386F79B9E995E2D282 8B8D4DF5DD0CFAE6AD8F54E0972F5F908B97CEF7AF0B17CFC9C1D60300A0A81B EFCF1AA90BD4982E3EA7355A17CCDB76E82F47EA3BFACF8B9D7CA6B038BFBDA1 B1BEFBF6ED5B720BC15FBD7A59CE9D3B2346A35E6216464B74CC3CC9D467C8A9 AE9372FEC25969B3B44871A9A9A7A0382F62A42E30C2680B89C83AF49B913AFF 67009873E32BAACCF76FDDBA251F7F7C4BAE83FA0043FC03C6CB071F8E12DFF1 DE32CE77ACBCFFC17B32C17FBCD4D657CBB9F3A765F79E263115E7F51496E6FE D3485CA4CE60FD57B060F9489CBBFF9CF9C5F93FCD2FDCD673EEFC59F9E493BB F2D147D765EFBE5DE2E3335642260649F482B9327FE13C9987575D6438409920 5EDE63644743BD9C3D775ACCA585BD79055B3B6263639F7E9C0BF5A4F4B1A6A3 CF680DB6EA99592DDF7C9C733FD267724D5B1B9A76EDE8F9FDEFFF57ED7E2784 2E382448A64D9F2CB14B16CAA2D80512B378BE0384F99132779E4E8227064A50 708050288F1D3F22F985B9F7720B73821EE90B07BD69B6DEF2579E3EA733DA12 B506EBFF3CCEB91FFA99BCBCAD6FE56ECFEEBD815DBF73E763B979F3860A7662 68B02C59B65896C42F96D8A50021AE0F8498280542649456FCC084F9D0853367 BBA4B2AA5472F28C57D3D286E71166579D7A36DC607DE7290FF55E63B04ED018 AD890F0DE671DE00C5DF79F793BBF67BF73E05F5AFC99E3DBB15C519F8B28425 12BF3C4E01D10FC2A268041D2551D111A2D1CD51DAB0A3A1464E9C3C2A00B267 6BAED16BB8D7A133768C47C97BD5DDE700D00F0142E770CFFBD0F7E7E6A67FAB EBF4A95EE4A0D8ED7694BC2BD8DD28D146844BC2EA65B26255BC2C4F582AF12B E264E9B25807084C0780403D602A4C9E1A2ABAB95AE93ADD2925E6A2DEACADFA 86877EF1A03768B36CBFD2183A7C3D7D0E2970367CEBB16F0FF7DC1EDF9F939F BDB2716783BDA7A7477EF7BBBBB27FFF1E503F4812562D93D56B57C8CA35CB1D 40AC8C97652B963898004D5818EBD08328A48216A2E8E7EF2B3B1AEBA405DEC0 989369CFCE4E77BB9B435D902EF7E44B5ABD65B34700F4D62CADDEF6DEE70640 CD8E9AB7B272F4BDEDD656B97BF763B904B393B4619D6822C264EDFA55B276DD 4A5993B852561188D5CB150864025363F19218A513D1310E164C9A3211A02D97 CE53C7257B9BF19E3E7B4BDC702F1400941208779F0303C2B506CBC2E19E77C8 F7D737D6BC5B595BD69D69DC2257E1F46EDCB8A6846C76D82CB5CBEB92D7C8BA A43592B87EB50242B101202C5F89748026C4C52F52A9B0A0AF2ACC099F2993A7 84A21A1C96227381A4676EB60CF74211E0BA08A3F55D779F8B80506AF5D6E2E1 9EF781F7D7ECA878AB7647E53D18193B044B2080CAEAD6D455C9AC3933C082B5 929C9288D744598FDF139308C22A0502D381C2A8F400A9E0CA82899382A5ACA2 4476EE6E902D999B7A0D06C38B83BF3C2DADCD6D17E9507A9B5BA5A71D06485D 6E01A099A8A92B9F595D577E064B1E58F51557F1B7A4CA1AF39DE6967DBD1555 6552DF580B00EEC0CC74C9968CCD4AD85252D7ABB5012B79E33A0502D9402630 1D288CD48338A4024B2359402D983E738A246F582F878E58255DBFD99E9691FA A1EBC5CED8D8F4D53906EBDFBA0B606EA6E53B707CAD0F11C2EBB1B14D5F1AF2 3DB0B15115D5E65E6B479BF2EA5DA71DABADBD450A0AF3C5909521C56613EC6D 5D2FBD3EE97FE870071A9E1B4AC1E397C521B038494DDBA0D6C6CDC992B22949 366C5CAFD84026AC01081446A6C2D2E52E2C00707334B394633C7AEC90E8B332 EE6F4E4F4971BD500E377446ABDFC394DEE371003464B9349B4DAF99CB0B7B4E 761E938F606428685C079AF7A9DD62DE6EC06E9ACB0AD0DE5E83D9B9291BD392 E5D2A50B72E5EA2539828BA6B1598FDCDF9CBED1B1B6A43880D894AC4070A6C3 EAB509AA4AF4B3005A405FA09BAB010BA6AA06695B5E36C13BE81A0C19AA355A 36780A50A7B7EED7641CFD867B21B4E46BF496071BA3C292ED6507DB9ABB4967 8AD97198126B87455D28559BEA9D5F90A32C2BEDEEA9AE536A77D9F19DBF7856 1A9AEA148DD31038F2D7B13252D5BF37010882A0D22179ADD283556B56385800 2D501581BE009F9F397BBA60782225654548A3A4BB8303D1182CD99CF47850FA 1C4D96EDDF3C00B056A3B7850C38AED7EB7F84498D3232B0337219438B73E7CF 88A970BB122AAEE48D89525A56ACAC2E9B1D8BB54D32F469EADFA7CFC0C09416 CAE2B818FC6DB36418D2FAD666A8F926412ECB26308180511C990AAB131D2C20 B0714B17C9C2BE9218A69D2DDBF2B7C213D42AC052525206343028636B230DD6 D73D00B05867B004B83B8E63F3500906B6DE8B63630ED737D4D1CCA91FEE2A27 3774708B62635460595B33E52876FFEEDD3B0A80C69DF5525462928FEFDC5616 76EBB62C085A8CDAC5700411B3681EE89FA4740282A698C074A0303215C802A5 05F80E328C6248634453949A9622FB0EEC7688E78675FFE91A0CBABA8950726F 770162FA13A4D3DBDC7A088DD1120AA15CDDFF796FDF31EF4398ECFBE0E03EFD F4FFD0C9DD5635BDB5B545ED0AA9C9B265C84A577FE78E33050A8AB64BFD8E5A B97DFBA61C3E629375A8F7ECF9D9DC4C99162A7E8113641C3C3ECF41469009D4 050A633F0BA005AC084BA12FAA24E2BB688A68A2A80378ED4D4C5A33A03B64FE 0204AD5B06182DEF7B6A7A301BF81042AAEFFF7CC43CDD398AD5D1A387B1F337 E5C285736A1580FE2C4F14275E10294EE527086C778DD919B277FF6E6107D871 D82213278748205A5BE636E9AE37A6ABDC260851D191920910A80B3CA658002D 604550BE8025B12F0DA823FC779BA559925212EF27AE5F19E91A2CEAFC3F300D 3C00F06BB020CD3D432CBF044005EAB8B79FF76B5535A5928A5DE9EAEA84A263 6079F2B85A1B539341E7B98AD2BCE03D7B77AA3697AA4F10D2D253A5F9E00135 F064D90C0C0A40098B52B425EDB717E672D4A5EA3F4160FDA73E28164010119C 02568921D2407982BE6A1007361C6C3B20291BD775AF4A4C1840E748C3C19735 065BB67B0D68FF0FA4C836B71A9069FB050C538503005FAF2931B1F37B783154 FECE5327C406E5E7624D9F3B2F42517243EA3AFCCDAAE67B67CE74A9F248816A 853FB87CE592B45B0F4AE8A410B8BA68456FE356F885D202A9AA2D5395832006 A34122306401B5809F27382C89EC11543580865007B85A5AF75134BB619F07EC 362B80A70023323005760638040A1893BF0106D5A8433EE3C6AE0B0809E8A620 9D3EDD251D08B2B979BF5AA47E045A5402405F7FF4D811398F71D7F11347E5EC D9334AC539C9E1A4B7B5BD59A64E9BA4F29DD47630601B3CFD760E389435F61E E7851D5FED6001528E4E51A5019A25550D5C74806970A0652F59D89BB0327E8B 6B1C1C6F790A302CBBEDFB38DEE436050C87FE1122B8471D1FEBEB65F40FF2B7 B349E9EC3C21CD2D07A46967835A3435ECE923A3742AD86300E0D4A9938A1D9D 9D27550D3F7CA403E5F22C52612F7AFA49B200931DFA7DEE3045939583019361 13D0EE52E8A805AC082A0DE00E5535C0F733EF392B606F40C6ECDDBF930CB0E3 7B721FF4027D141E224A02D01FE010C7358301F00BF0B3F3CB8F1C392CBB7637 49754DA55A0C9EE52C0265894A4D761C3D76585A90F77C2F2BC3A1C33635D5DD DFBC5B422182048D8ACEA0A81BCE20192001884380FAAC8169C06E913AC0F3B1 43E49C807678F7DE46A4C97A3B7CC200006263E5E98731005562873B066032F4 3A52A8CEC1001FAFC409FE13BA89FCC1D666A9ABAF91E29242B5B4BA7099133E 4B684CE8D99B9B0F00049B02C96A6D0703E2A5DDD2AA0C1301E070330C5E9EF9 CB7698A0A9F61702B76051944A010AA401D583BE80EE90F6589922B0868C527E A0AF45DEBDAF091E604DEFD2F8D80129400D80DDDDEE96E2A8129E00D20D1641 D4EBFBA4DDCE9D8D52555D21B979396A91FAB3E64C57D694D465CD6FB7B42990 0E40231210DC81967DEAE606E91A14ECA7EA3F677CA4306B3A35815AC2610745 30272F0B0289B43038AA017580FAA284907E00424843C4B56B4F03AB4437BE7B 800872FAEB49043599967FC17193DB2A60B4BC0D8614AAE35EE3BDFE6EDC046F 75C1667391949597E2AE4DBA5A2C6933664D55CD09A73604A5ADBD55CA2B4AA1 118DA06D024AE32EE12DAEDDFB1A25040106041184496A26C0F42118D3664C16 1FDC0CA1EA6FCBCF164C90940E2800608DC90A0AA1C310392AC112BC36EDAEE7 84A87B71ECC28165D0D8F6634F0D117CC26F7506DB26B7651223B10165D4CBDB AB438B1156A6211D5EBF04BB8216166BE1E205EAE2A762AEAF4130ABB04B2D10 490C2DA1115510C6556C8B5515D8B96787CC045B7C7CBDC43F703CC00884310A 5680F06FB4D3A6A25C4C7CB762DC05005025D81F502314003444A804D40F9AA7 8435CBA461671D01B91FB368FE0023A428ACB7C5B8DD61BD65BCCE6859EADE27 58830738451F1FAF5108D49EB072190030CBDA44F4EC6B57C992A5B18AD29CD8 4EC3A082AD6A03EEE294959BA5B0C86170CCE5C5AA156EDC550F714B17DF093E CAF470C7D56D302C3A3D1A22DCFB933C0580C12184040006CC51091C8ED0590A D7E3DCF50DD5D08EE8DEE845D103ADB0D1E6F34037E7122DE81D858E719A7B8D B0E8D8100D381E3C29B0235C3B47B69BF2657D52224C104656F1718ACE54F750 EC6638048E139FEAEA4A3166E9B17B1B54377805E688F9CA5BDDC6EC7494B245 2AA556A1D1A10FC08005AD6D0100C8973CD356344D0420DD618808001D615F29 646748BDE1DFF16C814ABDE88591039B21DCE9E56CCFFD0EDB32D02FFCD23D43 6C6BD850B91E7F3A3070DC4F48F5E48DC9F0EAA9E801A2D59A153653E5366F61 4D9E3A11A5710E02354B56B601B57EA3CA553260DF815D525659DC6F7FF97B25 2C369D200371000006B8030096D8D50BB0CF206051F371E324563360B841810B CB3EFA7D0F14DFEB69F68F5678C0689C8F8EF0E1846742270597697561F7B7A4 6F56F94F1FA0D18541BD03D1E4F84B50883F1831593124DF94279B366F94C879 5A0C43709F1FBEBDB2BA54B6176C130C56901A452A70EE3EC1A02D76A6C06006 D03AB3277005A0A0280F2C4B97C868ED0303116DA6B5845EC00300EE879EF810 00DCABD35B5E737E9E27E280F0D9316346BD111412D0C3E09392D7C19F738EBF 1CCE6C8102C01FED6D6090BF2A6919995B242BCB08ABAC51B300DBA176C19418 3B9CA3768E019756A0AA207882410DF84C04FB34C03505060150555BAEC66F11 515A8EC4FA9FEF999BB9F705DCE4742B701C8581DE6DEEC0E1DF01C015DA69FE EEDC7D8E99BF8CF51598950508B4374C330729C0598063B19D9D316B9A8422F8 C0203F3BBC412F1F72980BAFC02EF1246E66D4355421C83C1528739FB4C78C51 BD9215EC0E59069D558022385803E848698A78AEF8154BEEA394A6E2BAFA779B 535FF4F3FFEDC104FD1601E6B83B3E3BA7F96B387ECE79BC9FFE4E00F0FAC2FB A3DFD77A8F1B73964A3E7879FB785DFFE08351FAF17EE3EE8685CFEE65CDCEC9 CD525EA0BEB11A330393EAFE487782C09DE72BFFCDBF6F8311523EC05906FBAB C06729C0F258535F81140CB3CF0A9BC69BA4FD00609AFB3CD65FBB1538943F4C 83A6B805C861926A0703D0CF001CF82A16078E7C9E86B3387ED9CB58DFC1E293 563FC07AF5E73FFFF7B160CBBD30CD6C7B349C1E01D80B2164CEB3D6B31364D0 8525F9EA95BBCF12C89B280E2738D008B10C52035805B6834126BC1F16BC77D4 F851BCCD3530DF3DDC0207FD6BC3B3DBFFDE1D00087E325AE104D7E3144002F0 2C53A00F80AFE1F5C53E00F8D0C1B7B07847F5BB5854DF1F62FDE8ED77DE0E45 ADEF9E1536434D8ADB6DAD8ABA79DBB395DA53101938C1A03638E86F50BD8073 30D2EF04FB7C4002DC20B5840609E76DC7F7509F1EE9891134392F223D9A1E22 905B2080031ECD738A2045813AF03CD60B1E58E00AC2AB6FFEE24DEF1933A7F6 E2F93FE9EC3AA1002842BE6FCBCF523BCEC00906EEF9ABDD27FD6982381F54CD 90B31740BB4D2BCC3699E798B720F2FE8C595396E03AB8418FF490236BFF03D3 DE4154C0710B9F1318CC1057163CE706045726BCE2C2861F403453172D9A6FE7 733EECE0386263A963E3432098F71C8A50FCB8FB6A3648011C3C15020025A81E C565265A707B68A8FFDF3CEAEE3320ADA17D321B2177F4E7F34148816B431D77 AD064C057720301FA909CE94A02EBCF23A7EA64E9FD4D3D67E509543EE60FEF6 1C457702C1C5E099FB6AF75DE6826A3ACC7900949F6CE067D11DF64E9D31B971 38C16B4CFB9FD3E8DB439CE56DA820F15CC0384F77868702C155139CC2485746 20C80827182FA3F1A9807BEB3985FB883B9A6A9518722EC88910177FA7FDA5F8 3927C36A24E6727F80E5923763D154F54C9C3C71588FC830FF39E971B7FB8A21 466B2A1810ECE93D3CE6AA09AE6C6075706AC38BF89D558260B052BC347AF4A8 F7264D9DD84B06709EAF5880B2C7A01D6BCB807B03ACFF6A288A59003B413C0B A03E9396992AA15343AEE251B9A1EFDE7AB8FA58C3596AD8903F7CF40EA3F266 ADFEF0233D33EC64032F82E248209451C2A2483AC160B52033B85E0C9914B033 655372374D11BBC39ABA0A3EEAE2B84506DA73E7D57DC2BE5B646C82380DE260 B4AAD6D1374C9F3DF55EC8A440FF87EDD2708FEB8CED3F4387E818820CE38740 90114E917405833A41409CA03CFFE187EFFE0C73806EDE2CE18D121AA30A08A2 A23D448F031006EF7A9394C1D32D72F7C184DE90D060DBE33E28E9292EADB17D A636D312388CD81F78AB2B186406BD0317417102F32C0620CB232234F70FE156 596BFB01155839F480CAEF7C5E8062C719003D4019FA05BE8765326862407770 B09FC73C7E9C00629B9ABE04014C9A9DDECC12FEB9FE1014273064CAD36FBEF9 E6730141FEAD2B572EEBE6FDC296B6FD8A09750D95CA15B23264212DD8333070 1EA35DC6CCA13B206882E673BDBABE9361E7FF5997D5113612E71EF29CFEFEFE DFF60B1C7F01777BBA2DB8634451DCB5B701D5A14605CDD7C65D756AB1730C9D 12DC3321C03763A42E907792390A1FA9F30F795E3FBF31DF1D1FE07B0425AD9B 0F3D1D443AB4B4EE97FD2D7B640F26C8751877210DEC085C7CFD7CF818CC23B9 BDE106C1F63802FF59826930DCCFFEC1EF0F0E0EFEB2CFF8B12B3175BEC7FCC6 BD87FB1876DA23E669EFE1EFF6717EDEE7BD7DBD47FFC15FE4E104787AF42791 C6C33F1EC9EF78E8B9478F1EFDCDB1E3C606A27B5C8F65C08A1FEB3BF6D7EFBC F3CE88EE8A37FE1BCE824DB657FE28BBFF5054BEA037984C3262FF17E90B0AE1 C9D73C41E009022384C0FF0399C47440B43BD4BA0000000049454E44AE426082} Proportional = True end object ComboBox1: TComboBox Left = 108 Top = 50 Width = 145 Height = 21 Style = csDropDownList ItemHeight = 13 TabOrder = 0 OnChange = ComboBox1Change end object ComboBox2: TComboBox Left = 108 Top = 77 Width = 145 Height = 21 Style = csDropDownList ItemHeight = 13 TabOrder = 1 OnChange = ComboBox2Change end object ComboBox3: TComboBox Left = 108 Top = 23 Width = 145 Height = 21 Style = csDropDownList ItemHeight = 13 TabOrder = 2 OnChange = ComboBox3Change end object TrackBar: TTrackBar Left = 108 Top = 127 Width = 145 Height = 25 Max = 65535 TabOrder = 3 TickStyle = tsNone OnChange = TrackBarChange end object CheckBox: TCheckBox Left = 232 Top = 158 Width = 13 Height = 17 TabOrder = 4 OnClick = CheckBoxClick end end end object GroupBox3: TGroupBox Left = 0 Top = 236 Width = 486 Height = 241 Align = alTop Caption = ' S'#233'lectionnez le haut parleur / microphone '#224' utiliser ' Padding.Left = 20 Padding.Top = 20 Padding.Right = 20 Padding.Bottom = 20 TabOrder = 1 object GroupBox4: TGroupBox Left = 22 Top = 35 Width = 442 Height = 184 Margins.Left = 6 Margins.Top = 6 Margins.Right = 6 Margins.Bottom = 6 Align = alClient Caption = ' S'#233'lectionnez le haut parleur / microphone '#224' utiliser ' Padding.Left = 20 Padding.Top = 20 Padding.Right = 20 Padding.Bottom = 20 TabOrder = 0 object Label6: TLabel Left = 108 Top = 115 Width = 38 Height = 13 Caption = 'Volume:' end object Label7: TLabel Left = 108 Top = 116 Width = 88 Height = 13 Caption = 'Cannot set volume' Visible = False end object Label8: TLabel Left = 108 Top = 158 Width = 62 Height = 13 Caption = 'Mute/Select:' end object Label9: TLabel Left = 108 Top = 158 Width = 110 Height = 13 Caption = 'Cannot set mute/select' Visible = False end object Image1: TImage Left = 30 Top = 32 Width = 53 Height = 53 Center = True Picture.Data = { 0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000040 000000400806000000AA6971DE000000017352474200AECE1CE9000000046741 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000 80E8000075300000EA6000003A98000017709CBA513C0000146849444154785E ED5B07589457D64E3665D7DD1477A389AB29C635C6A860E8C91A23262E1634A2 14151B02B6187B236A1441BAD245BAF43214A9431F3AD80BA88888051B363496 286DCE9EF7C22498ECFEE20626F179FE799EFBCC7CDF7CF37DF7BCE79CF7947B E7B9E7FEFFA57C04328B32FF9E25939AE7E4A5BBE6C8A411D97952AFEC5CE9BA CCBC4C75E5CF46894FCCC991AAE5CA32F2726419F2FCA29CE68AE3479AAA4F9F 92571E3FDA545256D8C44050B62CA32E2B3763AEB5B5F51F9438B5EE7D14113D 9F93976105C14F5655B4343636F2A95FBE7EF8E1019DAE3925E7EB5AF97A595A 71DA5FBB77664ABA3B0BE49C2D93B6DEBED320A496CBE5F4C30F3FD0FDFBF7E8 F4E9D374E9D245BA78B18E2E5CB840ADADADF4FDDDEFA9A038AF392B2FFD9454 2A7D4D49D3EC9EC764E54AA7B169CBEF7C7F47080EEDE3BDA5A5851E3C782080 B87CF9129D3A758A4E9E3C4165E5A5749701B877EF1EE515663766E5A62775CF CC9470D7ACACACBF30B9DD3A7BEE8C10FAFE83FB0200BCA069088FE33B77EE08 EDC31A0A0B0BA8A4AC846EDCBC4197181806A09901D453C274BBFE112CFC86C2 92BC87D07643C32DBA76EDDA8F2ED0D4D42440A9AFAF179670FBF66D2A2A2AA2 73E7CE525A7A1AC5C54BE8EEBDBBEC0AF9F28CECD4AAAE9F9D12EE98969174F6 DCF95A7AF8F021D59E3D238487D6151600A16109D7AF5F670EB848B76EDD22A9 349DF6EDDF4B39B9D994999549E72F9C27BE0FA5A727A92861CA5DF7889414C9 FB7B52E2843F43FB376E5CE7CF7785C078C12A600577EEDC16E76FDEBC49274E 9CA0935527A9B0A880925392284F9623F821363EEAD19EE4B8755D373B25DC29 2E2E5A5792104D8F1A1FD1D5FACB74FDC6B5C700686E6E66FF7F24C00108708F 63C78E0910F20BF329293991F62425505D5D1D25A62636C5C5477B2B61DA5DF7 88A8D87093C898306A6A6EA2CAE31574E64CCD8FE10FBE0F006EDCB8418F1E3D E2307889AAABAB85B6535253A89449509A9146EBD6AFA5FA6BF59491954E7CAF C8AE9B9D12EE141611681A1A1E440DB71BA8E64C355DB97A59101E6701C20DC0 0B10FEFCF9F3E2FCB973E728272787C36115252626506090BFB082CACA0A8A95 44536858F0B30540E06E3FD3C0605F4E76EE5345E5513ACB24D826F4430100DE 6101D7AF5FA3DADA5A61FA151515949D9D45593999141B1743DBEC6C18BC1A76 85780A0CDEF56C01E0E3E765BACBDF5B6475870E1FA09A9A6A110120B82209AA AFBFCA667F5998FFB16347E9F0E1C3942E4DA3D4B4140A8B08A3CD5B36D1094E 8E24F1D1B42BC0FBD902C0CBC7D5D473A79B20B18347F60B0BB872E58AD03EFC FFFBEFDBA2C3F1E3959C00B501B0674F2295EF2DA3A0E02072717122BF805D1C 110A59FB01E4E1EDFE6C01E0EAE162BAC3DD9990FFCB0A72E8F091C322EC21FF 0700F738C9A9AD3D23EA8043870E72125448070F1EA0C0C0008A898D16C29B5B CE63F7A9A088A830E27B3D5B0038BAD899F2E014F73C959617D1A9EA9322D169 E6A8D066017704EB23FFAFA83846FBF6EDE564278DD93F9D092F843CBCDCC865 871315706AEC1FE84B7CAF670B003B3B1BD36DF65BD9F46B39ACFDEF00E4E6E5 928F9F37D9DA5B3F5B0058DB7C67BA65EB26BA76BD9EB2733398E00E3EE602C8 106B6A4E0B0B3970603FE5E7CB8415F807F83DE602488BE10E5BAC373D3B0098 98181A9A5B9A356ED8B49E23C0212A2E2DA0EAD35582F15B5BDB52E0DB9C1F5C E32407CC8F58BF7FFF3E8A8989A6FC0219EDF2DB450E8E76E4EBEF43923809BB 82232D5DF6B5DC789AE16E25A4304FF70807173B7B27677B49C76131DFEC8299 F91C5ABB7E15D572299C9B9745478F1D11CC0FF2433E80080012ACAE3E25C80F 242893E551547424854786D14E1F2FFEFD6A5114B97BEEA0AFBF59480C80FCE7 CFE2E3286767E73E4F37EB2EBC3A30C84FC4776811991B86E5420B9A357726AD 58BD4CC4FFAC1CA9C8054082D03C9A1D488010FE40827BF7960BE17372B2299C E33F48D06BA707AD5EB3529022C870FE220B0ADA1D24FA07289214CF7274B603 419A76A1484F772B0080C4A6E36BF9CAE56432C384962C5B4C0505F96D1C70E4 A0487850F80008B4C060012525C50200704048C86E9108B97BBA91F5D6CDFCEE 4AFEFE7EF49DF5469ACB16E517E0FF8B46E26F0E002600ED82D460E2785FB464 314D9E6A400B175B7293B39A1212251CCE64A2E243DC47FD5F5777814DFFA008 817979799492924CB9B939E4EEE126121F378F1D347BCE2C6E8EA492ED366B9A 39DB94BE1CABD7FE9C3B228CE259BF0B0030893C592E9BF72D8A4F90D0B49933 68EC84F19CC89851764E164933533914168BBE1F623FC810D521842F2E2E1656 92999941919111141D1D455EDE9E64676F2B6A014485E5AB9691A1B1218D1C3D 9A493186AA4E9D1015263E771680FE1F7FDCF3C311235E7D3AFBEEC4D520419E C4C90076056479606E0323A3DB2346E9D26CE6816826B5ECDC4CE6810CE1EF08 7BE8FFA1EA3BCC1102C2E771AC4712141E1E461111E1C2056C58EB4ECE0EE4BD D38BE698CDA671132790CE6723E510F80C5797B979D92CBCFDDD2792A0B1F10B 1FA9A9BDF7C130F58F3434345EEA84484F7F8983F3B6193BDC9C8559C2DC2D17 2DA818AEA5FDC078BA319BB33FC9F2F338B6477261739CAAB8E3D356FD1D17CC 5F5E5EC6E69FC2213086929393C8C9C991BC3902383AD9733F600DF971489C6E 6AC2C28F68D5D5D32BDBEEEAC42E54AFD07EE2FF35DBC1DADA6FA8AAAB8F5451 D31AD5AFDFE037F8DAEE596C7173B3EEC99A79082E40CACB9FE50E2EB6634CA6 1B6D58B0D0E261D9DE1266F84C26B854A1F9AAAA2A11FA90F8C0F7D107440FC0 C3C38322A322D8E76DE8DB0D561415138950289F36C3A8CAD1D1F1750767BBF3 E8125DB972912383039E33E73F01C09AEEA5AAAEFDC53075AD5943876B8C7EED B5D7FEC6D7758FF61513E0C98443DB2877A3622258837657ACACACFA4F9F6172 CB9753D9439C091615170AB3AFACAC14898F4C2613A10F55207C1F2EE0E6EE2A 461887425FD63E83D86C626A3296EF1FE9EABE9DDD871B27EC527C7CDBD5D5B5 474700D4D4D47AAB68681BF05835445D7DE6BB03070EE1EF5FEF76E1310987ED 0E1A3CA996E29222D1E70717F071D55CF3D94B90C0A4A42589D2F7E8D1A374E4 C8112A2B2B13C2676448293E3E5EF83EC2A08787BB4885C3188C3966B31A4DA6 1B273B3A6D0B443688508AF419DA07F77410FE791535CDF12CB8E310358DD503 060CD2E2EF7AF378A5DBCCFE3F999E83939D8DF37607D1DB47B213121A243465 616996CB7EDC8A5E7F4D4D0D93E149E1FB88FDB1B1319490104F1249AC88F9A9 69A90C4408E27ED38C992675DB1C6C2A5CDD5CF837951C46AF28803DE2E9E9F9 47C51C5434348C876968060E1C3C74129FEBDBAEF5179E9ECD7EE52F2412C90B 0ECEF611202A5EF515652F96BA70BC7CE5D207B0848D9B36B4E433F3C3124A4B 4B198872E21524C105F1F1716463BB957DDE583ECFC2ECBE9D830DC525C4D2D5 AB57444FD19F8B22CEFA6A5C5C6CDF574C759896D63B2AEA9A19033EF86062BB D6BBD7D79F841156829D5CEC1C9D5CECE5D9B9598213EE71782C2B2F216736E3 F90BCD91D3D3AC39A6F2B5EBD7B472AC97AF5EBB4A6E6E61866287939F994C80 EBD81292E9DCF9B39C663FA083870E707FC015D6B4D7CECEEEAD8E731044A7AE 51CCE77A3D696E4AFDDEDED97E0258DB6BA73B9594168B3501BC1A1A1AA87C5F 9920B8ADB6D622DDB5B6D94CAE6EDB298D7B8175172F886E31043F7AF488C28D 1AE15E7E7E7EBFD0EE90E16AAB87A96B54B270CF2B55C0CE3C8C3739FC1913E7 84E51A5B04454687534151BE20B29BB76EF29AE07D010ACA630073A1EE1CEDDD 57CEB9449C488559E34D3CE2ED77D80FFA6FCF7B7FD0A0912A1A5ACDAA9A9A2B 7E972060E2202C4E968C1D5CB6857078AC16E96BFB000029A9493F1EF3F9EB7C 6D8A8393EDEA4E96B9AF0F1C3CC44E55539B41D03EABA2A563A3A2A5354A4747 E777B7AF00591898F9C5A54BE7F5B6B7B7D90010D0254E4ED943F68EDBB25658 ADE8DF1EB35F6CBF16BFE98C690F7CB36F5F0376074F0E85271988D6F651CDEF 717C6EFD506DEDE19DB1DAEEB80602401008051F7E99C71FB76EDB3C1700A039 82ECCEDEC13686CFFFA97D20C4E15A05104F0201DFA329329487468F1EAF7EDA FF1F83A67FA4327CD33075CD70550DEDF30C04F1A855D5D499DE1D42FEB77B76 145E08DE2E600FEE199A0100D40FA820AD6DB7C4F2777FE1F1671EC8F0702D7E D359101473C06F91F7BFC3E3431E1F0394BEEFBC6330EC63F5080641AEAAA1B5 58592074D43C04C2E420E02B1BBEB33247D718ABC6489D377E6725E1F3285791 BD01085C0B8BF85F40F8B97CB81F1224D5814386D933080F5555FFF966778300 EDC3E761CA8F090F4157AF5D6189AEF1A5CB751412164C6BD6AF8EE3F3C8DB41 5E00420142474BF8B5D5DC1FFEF6D65B9FB4B983A6617703A0D03E34084D0ACD 7FF8E1877DC78CD1FD64D1D70B1CBEDDB88EB07FC83FC897962E5F92CFE775D5 74D414050C2CA1A33B00C8C7D25B5D5DDD17D5D446F465D61F00925351D7D150 55D7F9848FC788D15618190FD7D29A052264C143795CE7B059DFAF5FBFB7BB1D 8011DC8131309834DED0688AABB1895199F174C39BC8F630CCCCE7D29A752BA9 AAFA0479EFF224CB0516A437EE5F34FA4B5DFAD7D8318F26E88F3FAD3F699C64 D2E449967A7A9FC39F5F1A3C7CF8A0E11A5A9B59880C26B64BC29FDBC84D319A 54B5B41BC4D014C457CBD79DE6E383AA9A5A252CB864F05095ADAFF4EC39BA5D 295D8F0176781A1B4FD5672133B9946D44FE3FCF626EE32AEE106FDCBC81B8B8 211757676E7759D3B215DFD0B1CAC39CF46CA7458BE7730B6D2E59CC9F4766F3 E6A212A459B34D5B8C4CA6B6E01E8646060DA3C67C2957D3D2B9324C4D2360D0 509595EF0D1830B5579F3EA35E7EF9655596041160180FEC25FAB87D60EBAD46 8781631063CFAE979CE3B5A189E12C16FA1226BC64E9E2662C6EF805ECA4E0DD 01A233E417E0433B59DB488F6D9900D90D68FFA1722E70EC45DB0B75C07CB684 65CBBFE19EA08D581F44466863BB85CF2D4167A895EFDD386EC2D8A85EBD7A41 1898316A03343CB0AB14828143301411056EA408ABDD21F773CF4D9D3AE13D9E 582904B7DAB0561E10ECC7696F18EDE672D82FD0875B5C1E2CCC0E72C7E0450E 8CAD9CFF43DB25E58564C3D6306DBA09194CF94A8060B36D8BC80C913EA39284 85B481B19DACB85062209A4DD89DBE9AA23F95254298FCED5EFA53F487B1D6EB 79E1A21982C7C5C7506878302F6F79B3B63D84C677FAFE3400062C80D7FA44D3 5456982DFAFE53B88D6E6C62C819A1AD580A435F01002852667C46DFD1D3DB8D 0B27175ABA62492B3FB7F52B8389DFB46B58F9208C1C39F2EF3C891BCB562C69 46DD1E1B174D01CCE8BEFE3B85E943FBFE81BB98E5DBC62E3EE70317F071272B 8E006876F226480E81AB68B2C124B273D88A7D002CA0330BEB24B40F203AD60E F80C4B00906C6D62B94C5F7F1CB23BE40D4FCA18BB14A4978C4CA6845A2C306F 4C4A4EE0C6458C103680F705F1FE200A0AF1A7E0D00076031E6181E2D89F01E1 AD33C202A0654483C5CC03DC0021F3F9E6B49D85767577691B1E6DEFD03AAEED 680D0001DFF9F87A61F94CCE4AB8D9BF7F7FA4C208B74A79BDC0D5D6DB2C400B 844EE57E1F840E0E691316BBC3C2228279917337854785F00E8F100A8D081220 C02AE0161EDE3B780FD0465EF199CEAC3F875C58D3D03EB40B8EF010C3557C86 B0DB5D7F09027A093B7D3C61494DFA93C6AF68273FA570C2CBE3278E378206D3 335229614F2C6773816D42B3B091D1A1C4FB04295A1241317191EC1A9114C39F F11D2C42B803738437BB8287370BC9E4888E0F880ED6E1E5E326F8C39B077CBE 0D845F5A022C2380778F2C5864D9623075128A294482C73AC5DD650E7F1AA73F CE180064F2CA6F524A82D036048F66C121307689C62772C333299687841279E0 1D3BBE102142C360117EEC32CC0FCC0DBEE00C0E937EE00C1EE010B80B7CDD93 418265C01D3A720238228843ECC2C5F35B26B70180B618C25FB773410F151595 017081F088DD94979FD326BC84858F8F128243E0A494784A4E4BA094F4441E7B C47B726A02610F71FC9E1806234A5809769402C050B6A0DDA1CC17EC4EB0125F DE66A7C81B14AED0910F000E96E41016C74DD05BAB4C009058F49C6A383972C1 62CBC6C2E27CB10902C2C7B1E6A175080F81D3329279AB6BAA607B69560AA549 9304286D20C4B2A5B483C000863108702570450000801530D1216AC045DAB8C0 4910225C232C2284D65BAD959B4C33BAF5E69B6FFE83E7843218894FB7BF4034 AF0E1E3C78D0B4E9C637D67FBBB6B9B4B4888A4A0A843B3C0E4092101C00A467 A650AA0280E49F59412701801BA03D1E151DC14DD5CD220C7EF9A5AE05CF0751 00D5A45248100823E4F4D4F94CE733E31986D7900B64664BE9C0A1BD9CDCE40A 9387967F720136FF34DE41921A4FBCF55D10277802241915CBABC22252C00538 6D860B300FFCE4026E42E348A763255162DFE0BA6FD7A08D2ED71B37C68AE7D1 4F99DA57981788068CFB577575150D4393A9FB391ECB77B83ACB6505B974F0F0 7EFEEB4B11E5B06BA44AF7B49361ACF07DB809DC0591218AFD1FC2238228F205 983F48102020AB8C96448ABE611C778EB05D66E6EC19CD26D30C1B74BF1869D9 2EBCD2C8EFE7BEA500A1274C506F9CDE32D6CA556866C3A66F5B6278E2C5EC16 070EEDA37D07CA1910DE08C5E060CF9034338D52D2D84A9261113F8D6476A174 690AC19AB0A7006136243498D70E36C967CC9A86CAB071E2A409C17DFAF441F5 872E0F0A21A567813F0702CD0A7471DEE8D1A3C7DB5F7C316ADE142383024539 CCCD8E26E7ED8EC284B17F00C2E5C9B2798D40C600158AED33D84491C682F31F 23D8C77967A8B33DAD5EBBB285191E42135B58CDD8F17ADBB89181EE2EAA402C 7EA2EA539ACF778659D1FD1140C0227AF7EE3D70D4A8CF66B3C602B89E3FC080 34281A224F787FC802574F9CAC9F387ACCE8B51F7CD05F87EFF75EBBC61582FF B66B804F4003AD2B9825581960A06687B9BE0BD3D5D2521FA7F34F1DC3CF3F1F 31F78B31A3967EAE3BC2E2D3CF3E9DA1F989E65703070FFC94AFC3E2E7BBED9A 06BBC3C7712F10EFAFED0B7646915D7A0D260C6D61F2E8F3F5E401BF0530100C 1AC5C0670C7C076191D1E13730F16ECFECBA54E2A7B81904EB389EE2A75D73E9 BF01FA027CE2AFB50D850000000049454E44AE426082} Proportional = True end object ComboBox4: TComboBox Left = 108 Top = 50 Width = 145 Height = 21 Style = csDropDownList ItemHeight = 13 TabOrder = 0 OnChange = ComboBox4Change end object ComboBox5: TComboBox Left = 108 Top = 77 Width = 145 Height = 21 Style = csDropDownList ItemHeight = 13 TabOrder = 1 OnChange = ComboBox5Change end object ComboBox6: TComboBox Left = 108 Top = 23 Width = 145 Height = 21 Style = csDropDownList ItemHeight = 13 TabOrder = 2 OnChange = ComboBox6Change end object TrackBar1: TTrackBar Left = 108 Top = 127 Width = 145 Height = 25 Max = 65535 TabOrder = 3 TickStyle = tsNone OnChange = TrackBarChange end object CheckBox1: TCheckBox Left = 232 Top = 158 Width = 13 Height = 17 TabOrder = 4 OnClick = CheckBoxClick end end end end object TabSheet2: TTabSheet Caption = 'Webcam' ImageIndex = 1 OnShow = TabSheet2Show object GroupBox5: TGroupBox Left = 0 Top = 0 Width = 486 Height = 480 Align = alClient Caption = ' S'#233'lectionnez le haut parleur / microphone '#224' utiliser ' Padding.Left = 20 Padding.Top = 20 Padding.Right = 20 Padding.Bottom = 20 TabOrder = 0 object GroupBox6: TGroupBox Left = 22 Top = 35 Width = 442 Height = 423 Margins.Left = 6 Margins.Top = 6 Margins.Right = 6 Margins.Bottom = 6 Align = alClient Caption = ' S'#233'lectionnez le haut parleur / microphone '#224' utiliser ' Padding.Left = 20 Padding.Top = 20 Padding.Right = 20 Padding.Bottom = 20 TabOrder = 0 object Label5: TLabel Left = 97 Top = 75 Width = 90 Height = 13 Caption = 'Nombre de Frame :' end object Image3: TImage Left = 18 Top = 23 Width = 53 Height = 53 Center = True Picture.Data = { 0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000060 000000600806000000E2987738000000017352474200AECE1CE9000000046741 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000 80E8000075300000EA6000003A98000017709CBA513C0000227449444154785E ED9D09948E75FBC70BA924DB2BE495A44D11254992144985361469534A85A8AC 49216DB690DD18DB58C6BE2F33638DB1EF13B2656BF9773A4EFF4EC799E338BF FFF773DDF7EF99C71815AFF76FA6C639D7B99F79669EFBB9EFEF75FDBED7FABB 5D7451F6BF6C04B211C846201B816C04B211C846201B816C04B211385B041E7F FCF1DC927C92C2F5EBD72FAEE3EDA1DCA463494901C965E1DFE538DBF367FF7D 060808E81B04E86B924192B5927D921F24BFE977274349D5CFBF4A0EE8E7CD92 F5922992169252D9C09E050202F12249454957C9CE7AF5EAB9471E79C4D5AC59 D355AF5EDD55AD5AD5DD73CF3DEE1E1D795DADDA7DEEFEFBEFB7DF3FFCF0C3EE D1471F752FBEF8A26BD9B2A51D9F7CF2C913A142DED4F98A9FC5A5FCB3FE54E0 E492D490CC1060BF032680DF7DF7DDEEAEBBEE72952A55B263E5CA955D952A55 5CD57BABBAFBEE0BC07FF0C107DD430F3DE4EAD4A9E31EABFB98D339DCB3CF3E EBDE7AEB2DD7A54B17F7FEFB9D51C649568ECEFDA98E2574FC6701FC47771BF2 F81C81925AAB562D0318C03DE8008FDC7D7700FEBDF7DE1B805FA3867B50960F F8AC92BA75EB1AF84F3FFDB46BD4A8916BD2A4897BFEF9E74D115F7ED9CF7D35 70A07BAD7973A755F5B3FEAE23FEE21FAD05019057D20D8B0778ACDD03EFC1AF 54C9837FB7510FE0B3326A087C68A776EDDA063E54F5C4134FB80602FF99679E 31F05F78E105F7F2CB2FBBE6AFBEEADE78E30DF7C5175FB8850BE6BB5131238D 9EF017FAFE4AD0DE3FEA9F6E388784C865D5638F3D76B25AB56A66E167121473 26F0E17C03FF4981DFA08181FFDC73CF05E0376BE69ACBE25BB46861ABE0EDB7 DFD64AF8D2AD58B6D42D495CEC3EFAB02B2BE66729E20549AE7F841242278B43 3C8605DF7557E5D3E8268D7A2ADBAA007C9484E53FF0C0038ED5E21DAE80C3D1 BA860D1A1AEF3715F85877B368F05BBEE55AB76EEDDAB66DEBDAB56BEFC68F1B EB36AC5B63123362B814F7348E7A207EE86FAD04C0D78D766BD8B0E189218307 B9C183BF723D3EEEE65E79E56557E381FBDD9D77DE79BAB3B548A79A395B03FF 21815FE761A7950385B8A700BF6143D7F8D9C6AE69D3A606FE2BAFBCE25E7FFD 75A39D56AD5AC9F203F0DF7BEF3DD75E0AF8F0C30FDDE2450BDCB62D1BDD964D 1BDCC2F973CD57E87C93758D79FE964A80767483ADE51C4FC68E8A718B172E08 444020B3664E777DFAF412773F6B167F37910EE06714E9087C9CED534F3D65CE B671E3C606E04B2FBD649CCFE7AEBEFA6A57B4685157A142057BCFC06FDFDE75 ECD8D1E4ABAFBE72DBB76E723BB66D765BA584C4C50B512079052B21F7DF4E09 BAA9974415A9809F94B048B2D8042EF6AFFDFB63C78C72AF366F26F065F9354E 0D33D3473A8DC348E7A5975F72AFCAD95697C2049ECB91238729E08EDB6F3785 E01700BE53A74E26AC027CC1AE6F7648095BDC968DEBDDDCD933F12184AB9DFF 560A20D25084720CDA59B6245192E4962FF5B244AF91247B7FA97EBF3431418A 4970B1B1235D93E71A47221DC027D221CC4C1FE9003ECEB662C58AEED24B2F75 A54A95129DDDE96EBBED3657A8502157A24409D7A14387C80AE8DCB9B39B3E6D AADBFBED4EB733659BD1113E216EFC587C0A4A78E26F111DC1A95AD65BBB7ED0 C5805EB97CA9FB7AF932B76AC57293D52B7544562C735F4BF8FD8A6581429626 258AA6E6BB3E7D7BC9C13E138499E9229D66CD146646453A5051FEFCF9DDE597 5FEE72E5CA65AB01B9E69A6B4C017E05709C387182DBBF77B756C176A3A38DEB D7BAE4AF57B87E7DFBE00F8EEADA6FC8F22B4137D2F945858449090B0D6C6E70 CDEA956EEDEAAFDDDAE4556E5D286B93F5B3DE5FB36AA5FD1DCA4011B62AA488 B97366B98FBA75758D9B34363A392DD279AB6524D2C117DC7CF3CD2E77EEDC2E 67CE9CAE58B162AEF92BCDDDFB9DDE3F4501F1F193DCFE3D2860474401AB57AD B055C86AD2B54FC377655925E8E2CB28463F367EEC6803769D405EBF66B5DBB0 36D96DD4723791D56D5C1FBC8602D6AF5D6D4A0914B1C256CB0AAD1C9490247F 3175EA64F77E97CE16E9BCF6DA6B16E950F721C6B748E7DDC0D962E1587CDB76 6DDD435D6AB93B869475E547947135BA5677ED3B765079E27D9790B0C0EDD9FD 8DDBB9639BDBBA79A3BE3BD956E392A40437216E3C547742F7F06896544018F5 4C6CDBE66D0314600179D386756EB31C1E4E8FE8235A786FB37EBF71DD5A53D2 BA35ABB462561A55B11A4C0972DC8B444BA347C7B80E1DDBBB96AD02F0DF79E7 9DB448A74310E974EAD8C9DDD6B39C2BB637BFAB7BBC8A7B32F53E77EDFEAB5C FD77EBB91E3D7AB8F5EB928D7E8884B826562414C8772C5068DABE7D3B56C1D2 2CB90A74D1E5E4CC7E9F214787656F92A57BD0B76FD91484805B37BB14DD3C47 84F7B7C912B76CF28A582325ACB6D580657A25242E5E644A8096860D1FE23A75 EE785A98C90A68DFA1BD2B383EBF2BF87D1E57E5D732AEDAFF96734553F2BB86 EF3670A3E4E0BF91E5F3BDE40258FF6AD123410261F1DC39B3DDE8D85196E449 09D5B3DC2AD045F76A256A007CAC1A4B076000FF66FB562D7B649BDBA50804E1 35EFA72824443950020A83A2A02D5382FC028E1C8A4858B450759D796EDEDC39 CA2166B861C386B86EDD3E8A44393EE47CA4E323EECAF83CEECAA4CBDCD57145 5CAD0E355DFFFE5F9AF5F31D9B36AE33F09375FEE55A65890A9117CC9F67E79C 3A25DE710FBA973849D6F1052C5971FFD15131236C6963D558DA37DB02D0776B D97FBB7387DBB32B2522DFEE4CD1FB3B4C192882BFB7D5604A602540472B4411 CBCC31431324720BE6CD757366CF72B3664C7753A64C7623460E779F7FF199FB A0EB075A1941CCDFBA7D6BD7BC6D73F7FA5BAFBB418307BA6439FBC0DF248B76 BEB6D5856239274AE57C84A893274D747DFBF4F1D5D3ACD34B90B5546EA4F200 94B175F386007C81BA3B05E053DC5E39BE7D8ABFF7EFD915917DDFEED2FB3BDD 1E53C4765B2129A11236CB4A010CB08890022AD22A50F6BA50D63A4F74315B16 0B6853E227BB4913275ABD67F88861CA7807BABEFDFAB84F3EFD44ABA3831B39 7C983977E826599118C9DF547D86F7870F1BEA66CF9A61D61FAFF726C4C5C9D7 8CB6BC83BC20CBD0902EB647EBD6ADCC7AA11D0F3EE0EE13C80704FC777BBF75 07F7217BDC773AF2F301C5E42862CFAE6F6C35EC0C5702F4850F312A92532632 82ABCD21ABBC3C5F34347BD64C3763FA34A30D2C972866DCD8B10230D6C5C4C4 B811234688A686CA59B775F8A516AA1555A850DE5D7ED9652E9742D51C175FEC 2E965CA69F2B942FEFDAA974C16763E507DE78C342D2D82CA18030FA59D4B74F EF90F3B7885602CB37F00532A01F3AB0D71DFE6E9F3B22E178583F1FDC2F6544 9410AC0494871251A6AD02592D5191F90265CB097298D0D05CD1C64CD1D0B4A9 535CFCE4496EE28438374EAB608C2C7894CA1F23A580816AC8D0BC212F2858A0 80CB5F20BFBBE28A2B5C6E65CEE40B3E69E38852EE5253A86FDFBE8EAC590AD8 9E25AAA5BAC842F0FF6465993853B37E5933B403E5003E601F39B8DF7D7FE880 FBFEF077763CAA9F0F1FD8674AB0952065E127F0195018AB00874C480B854468 48CE18A749D4925E01E3C78D7363C68C76B1A34629ECECEE6EBAF1462BD29115 53272A7CD55556F8A39847518FEA2A0D9FEBAEBBCE9471B184BF23AFD07DFD22 C9FC7E403751420AF89DE409E000D0AC5F9C0FCD60F980FDFDA1EFDC8F470E4A 0ED9F10729C22B014A42593869560F91110E991C22888870C64B2D2FA08A69D1 90140077E307E06FCA0CE3C78F7363C78C3100AF96D5DF72CB2DEE2665C8E5CA 95B3448EFC81421D205F79E595EE2A290405DD52A68CBBFEFAEB5DDEBC794D09 C5F47B95BF53756F55323D0DC94A2AAA667392448A9093A80620F78BDB03EBDF E78ECAE27F10E83F1D3DE4FEE7FBC33A1E3625B012A0245B0552C05EF305690A 209C257221244501F8017202DA8CA739E2091354581B6FE05FA7C21CDDB63BEE B8C36A495DBB76756504728E1C39C5FB39AC6654A4481129A288593FAF29E2E5 174D51CE50FC4969E3A4EE2BF367C5B2923A440D9B37AC37CBC5824D019E7E04 30400338E0FFFCC3915009878C8E8E7CB7DF1DDABF570AD81D2A6087682C5801 A72A2070C4969465A400AD80BE2AAADD70C3F5D6C0C7D2295550E3A15097274F 1EE3FF5CB9721AC897C90F60F5FFFAD7BFDCADB7DEEA8A162B6A1318F9F2E573 975C92CB5DAEDFEBE7065961053C019F6EDDA4D8DFAF005150B002BE0D56C041 AD80C3D12B20A0A1E81580C2FC0AF826A4A033AD0053C0DC534351C2D0B2656F B52E5ACD9AB52C1F68D8B091395B2C1E2958B0A0593CCAB8F2CABCAEA0CAD665 CB9695D26EB072F6ED77DC6EB445391BA75CA0408136995E015A017559E62460 67F201DE014343C6FF06BEF7017B2D2C4561D13EC0B2D6D0075842A6664AC407 844ED8FB007281A7D52D6384E531F51028D6BDFAEA2BB2E44B4E1194409F00A7 8C3200BA821A3850102B86DF317541D4944F3E42E067FE50543EA02A757B6A38 911C8028487C1ED010AB405190A8065FE005A544A220D1CF19A32065C4E9A320 9231EA4264C384A1245437DD74937B4A54D844A5EBCF3FFFDC9A34B972E773B9 2E2B61D6EF9501FDD0C4295CB8B001CD0A285DBAB4F5A14B5D5BCA26EDA0A67F FFFBDF74D9B6668515505A51502AF57C781B3FB046B13BD10B992EDC8E85C3F3 28C2720009D1114E3A48C69411871190D18FF20056D406D56FD2F280246B6746 97230843A74B014DD433A8F1400D8DAA3C6971FCB5D75E2BF0AF7297948877D7 D5DCEF0A5DDB384243288395E2C3D3DBB5026E0DA90B47CDFC11BE005A92EFF8 550AC8DC93135A0125D43AFC6DBEC2429227EA368306310131C8E2749F0F00B4 65C05EC884B1FC107C5F8EF03980CF8493C31034C88483AA6874263C46D92B61 643DC5F48CA6D02F00E49C79AAB8DCA557B8724F1E75D7541A1C5905FC0E275D B26449B37CF202C25446662A94AF10197D6465A8D376520A2890A957816F4142 0338CDF8C9934D0108930858ACD582B41AF6530F12D7537E0078DEB7A29C22A7 4819228C7E36AC0DB3E0B01614A98886B520CFFFDD551105C03A9A96FB4CD483 93856E725E5ED65D543C414A58E572177A26A200A29CEAF755379AA18B06F0E5 558A60EEE8CE3B2B46A6EF0861C913047E914CAD00865EA58419F48069C0509B 891939522581583752C761C38659564B760CD811D1CF81D59F5A0D857A380F19 70500D0DE27FAC1F65CE0FABA101FD4C758FCBF2A1146646BB75EB6621A68F7A 725E7E9BCB7945B553AC9FB115688768C7038F4F202BE63C4CDDA10C5EE32332 BD02B00E29E0CD669AC5A1E248C10C8A58A6AC956489B200D9ABEF0700B8894A 16568656E88AF346491E7CDF0FC0AFD0AC0F6A40519550553029C4217E0CA551 A3672CE90A627DEF743906AF794F61A5D586E07A122F86BF101C300A809A08A9 99C4632A4FD1D171DD5EE61FE895026E95B8990284AC150B867200728A288972 81EF824577C302E0831E002127C537DF1FB6664C5886F6C9178A9DA3591E5F03 9A1A1F6FD10A03BDAD348A482C9F2F5F7E2B334487A03E07C0B249BAA02C2806 6BA716C4B5137E3285C794054A829A14A6EECED4F4137D71B2A0B5DD4501F474 294B60E5749D2815A300DA8E5B366EB076A049D80FDEB4414DFAB0394FFD1FDA 092C3FE809D3B1C2F15A0534AAFE637D009DBB8878BA9CAC998E1809564E951B F003087C4FB809D858359C0FF5404328838887C48D958302500453D64C5FB307 41A1ECB82CA3005D7C1BC2C144958B291F933811A7535F0748AC3B3219114E44 A0285609CD713F9E42072C003FC1CA0E1676868957740F8012F40495A00BAB94 70A3728077DF7DD728860C961C8030139A61FE941C81D5C1B15CB9B2063C0A80 72187764008CF8BF69D3E7DCD30D9E363AA29624F09B661905683CFC1DDDCCC9 FEDA1841E9D83BCFE50A4B019719209B0D8A12DEC7E2D3CF05C1F969E0CF0D0A 6F6AC0CC9C312DACFFD3050B8A6F64B425AF2D6943B92880EC160550D9E46722 19688A1571B314E0A7ADAB28FC04749AF0583C8A60C49D23B52D7DE607815F2C 4B28408353153FFBECB3E34C2833324ED384C80507CA3CA64DC78956FC741C47 7EB61920FD9E52367FCF88224E1C874BBDC7D3CEEC99027F7A90F5FA16241DB0 89AA80962E7D9DAA9AC56C7411A08B16296AF13DC0A30CCA0C24668CC043337E 370E2B00A01FD27B4C5E33F8850366F2BA967C807C48AFAC027E11958037B31B 85A964CA123DBA77B3B091CC152A397D3E34980B35D0454F583C7F0FF0500EA5 061C2E5D2F7ABF38770F7ED07E8C530F789CB5207196583A095579B51CA9F314 2A54D0E27CB89FAC963D07B41D897E0841B17868062A42294CDE61387EAB93CE 81F597CAF40A78A651A3DCCA3C270E1E3CD81A1E88AC683DCB384ED549C0A491 0E9D444F4863E53857DE0774560C160FF0583D9463930F029F50331AFC8921F8 345E46C7C66A3CB195BB42CE17250026DC0FD7D30D6315E08429B2F932037C4F E889C26A68121BE0112222E80865A957DC3ED383CF050AF06ECA784FB21D08F0 35A3B95CBCCA3EB004E643897E70A074B000D844118D098047816E160FF0E27A B37AF13D9F27B1C3E132F960961F76BD68A08F52F39D2988A2A219781F6BC7F2 A11D1FFD00368A81FB591194183812E713F1F808087FC08A50FD679A6E2D73CF 04A9A79A430EAB69EFDEBD4F308F490D46F47340FC7953989895D412DFF3E69B 6F1AA05834F57B40F6C28015EF53D5C4DA71B281C54FB7298688D51BF8136CEA 01DA193B36B07C6BBC2BD366FA010AB94489166127CEB64C9920D44411345C68 415E53F21A77A356055151BD7A750D7C1463DB5E45632463FA7C7296C87C057E ED9E3D7BFECABC25E04B7E9313AC1CBD6C29534B09BFD0229C392398BDC1B299 C331D16BDE235425B1826AB0F8695302471BB17A859A443BF03D0D77035F960F F8C3870FB7520735279C2CA32650118A8076B07A2CFB3109313E0E169EC76FF0 F7AC987BABDE6B4A510EB152D79FF99BF0CA146BA8E6F20B4ED7832F6BCA7017 B46EBAB69490DABE5D3BA312004E2F583ABF23AB256B9E3C29B078221C80F756 CFB80939457AF0870E19A2CAEB60DB0D8985A30456039464BEA160018B8EC803 1022245F8A60954851A9EA9AC508FCCCBD574C605ED4B4E9F395BB7ED0F5676A EEA1D34D55F2D242A1DD197D963ED7404A38D6527E224EFC8D757BA1728AA513 D9C0F14C36C0F369C04759BD6A4A31DAEFCBBC4F60F9439D07DF575FFBF5EB67 B472A90A720C5D518E201FA0F5081D152F5EDC425244B494AAA12C28A776A6AF F983AE78B6B2D2FDA30C3BB13D0805688B68975AB56AFEA9C392025809874974 860D1D6A8063E181C405A08BE35110BDDD71E2798B72C249356FF5F0FD708D14 0ED539868496EFC18F3E325885224A096856027D618A74ECA4C11FC84FFC2A65 90E566EE668B376B815F4DCF60F8899B847604FE49ED303CAB44452BA1986425 A15E972EEF1BA7432F01E0630D70389E32363C4F1515E0296D07C0077C1F803F D868C7F71CFC115FC06B8C84237FDBBF7F7FD7AB572F2B55F0DD925592325922 CC546C7C91F8BDD6071F7CF07394E59F94250F543C7DD6655A2920AF564247C9 AF541D3FFDE413033AB0F4602E93E886D94E9C2C743342C00F17F0AC1CB37A03 3F68F89C49060C181051C4471F7D64FB89F94E7D7F2FAE214B80CF450AFC46DA DE792C9A7604DCB0FAF5EB9D35F8FEA699BB67984B479EEF73024550451D3972 84597B04F4D0E23DF0D156FF47E0F33B14C096A4E79BDA666C22A045922A348F B2C43F956E730B98CE9F7EFA692A8ECDD30E96AFE7F5FC29E7FFD59B14205505 4C1CA38D64CFF473E96A411B38D988D58774939E6A82DE7340457D34D7CF041C 8358508DCEF99BCE3D8770F8AF5E4FA6F83BC5C92504789CACE8A414E0A39D13 02BFA7EA3CE77D47B90062459497749142B6B22AA827411B6CCA63C73BCF0002 5CE804058912CDC2F91D01018918E391FA2C4FD5DAAC73F5D4B19C8E59C3C97A CDAB26524B0FB9D80D1F134984717EAA56C39BB2A8F37633028767C1F16832BD ACDF593244AFE7E9B89D1197B66DDBE8FB3B49F9CD44234D05EEE3919A3D954B EA36BE7046644515569F3F261927E17167D5C3F39F7783F9AFAC12D5438AA88E 3350167F12E7071584E0A7E806ABFD275F2A50F3088C4A3AB694B0F76AA3E477 AC9CF22F7B7CA925B511E89DA474AC798868852C9992356D4B067E19FCE5E745 AA2B91CC912B8CD0934FA020389F73B1811B85519AE6FC6C9995F04CB93192F7 C849C2D5569895F79FDCD779F9AC2C3E976EB87E9B366D7602FCC71F7F6C4B5A E01F97F497143E972F0A69A58C6E9A8733A588938F537B692E4A69A7AC98E736 9049C3F53E5C24C4A4B4F18922A3F9E1A639BFE5C96F6F42192881DA114539FC 04A1E79C3973CC0790204E64BB92943352491BD931E7D4FDD97D51F594AFF95D D7F75368080402DDF4338F292843842439975B3EFBCFA878564C1223205289B3 79BE4EE86C772BCEAF73F6670C3EA11BE2260612F6B11182FDBC281680FAA95B D6FFCBFE66B13E6627B41C3A54FBB514F560C1BB76699CF1E0776E85356B96D8 B41D73448C39F27C079A3BD49228CA11B62E5BB6CCFDF8E38F6EC1820536903B 855A92245EA50D6432E50DC9249538C629EFE05E5114FE846BA387C1EA81FA30 165D7B8C8EB575CC77AE18FCE1E7442979F4A5AD65893FC1F58013D2CD71018F D51738D72FD685E7932CE591618C8663E52441AA9ADA4D639158BD4F94A00F92 25C06705B232A8AE262525B9FDFBF7BB23478EB8238735C6AEFD0447355DBD7F EF1E3D6863874B91ECDEBDDB1D3870C02527271BA8386C009E364DFBC6A6222A 654BBC32BC125821139481B34AF87B848D7903070EB0EFE73C94A83120C91429 E20549A9F3425902BEB826878768D9A772E3F45105F8094992C0AF2AF98F7851 6DBE663CC16A8F86AE06E9861892057CB37E85B328C05B3FE063FD500F00927C 8D5252C6DF10DDE017183521DA81963817511994C20404BB5DB87EAAAD9C1F0B 07FCE994B3557D45781D28244A1193D84D73AA12C6280BC718F97E0C61D0A0AF 5CF7EEDDED1AF02762A86352C64A29E11D1D89D8CE2D20D14D1497B6BBE8A20F 8456CFF159C9798916D4EAEBD743A3823F69FC3C514D976E6A4D46ACBFDFA9D6 1F504F9AF573F3582260609D58A9B74E14043028C9FF1EC0512A43006C391D37 26D68D11258DD0EB7E5A6DACB838D59866AA9F1CAD084F4BA728612C7BCB0225 D80E4B258556FA103542952ABD9B1F8152A580E3920552C28372F46767B08A6E 7268155493A5C708F4F63A9ED7B45C095C4BB683A2801DE26EE275EF1CA3AD7F 10D62FF0A3AD9F9B070440F70A0064A8031A99262B9ECE349C2CDBAC5520EDD2 ECD1F78CB96BF29A3178765C9AE8357B8EA74F8D775FF6EB6B5DB3B1AA37B112 58115342DF604AB02EDB78FB3D06E057C1F0E16C731D66ABD4D797060C1868CA 68F17A0BCB3BD46B885577EDEC7C8580CF2BE00B48CE95EACFF839CDD2949733 3BBE5D83577B356EFEA19227B60D99A51AF753A3F9CA42C78CAC1F100C7C8102 381E7C032EA41694323A3626043C98B0B6815F4DE2B12781BDC9DFDA0EFC60EE 3445E38F8CBFD06FE00152F8247C1096CE0A61A5711C376EBC190085C0C83E63 AD82A14386DAF5B212A04F0C89FBE131093C8E4D79C93CF5A0CFB934735E95A0 526FBE471E7D3465BA9ECB8355F6108F9AF3CD807E32B2FEB158BFCAD28002D0 D085B75A2C1F3AE9D3BB57B0EBDEEFB417E8698F3D48037DC7563D83620B8F3F D09E638D3F6ED6541EB2414F6649D2140665701EECCAF569A4460F13EC61D68D 9FE13D0C06A079CD112A45082C7A7EDCD37C0F4A216FD1CA6F715E813CD79369 063397FCC0D2383D2FE890763E76970FF0D10FD63350173C7890AC3F9DF38DA6 1FAC31DAFABD63057CFC4092A62CD25B79DA433F0438F3A6F6049600F08D3673 AADD96027EDD1A9E15A16DAFABB5EB66953680F3681C44AF57685689E88B9C82 AE9CBF265F998D5468750DD0E4A2451ABB59B2C4C259DDF33CF51CCECD319F2B D8197D4E8350B9B424574D9E305E33FFDBAC7E13AD002CE64FE9C75BFF64B528 43CEC6FA590983455F9E5A82077CF0A495C0CA19F205F04DDAADB9713DA0EB51 07EC3110E86B043ACF8958CD630F566ACBEB0A6DFC5EAEDDF78C412A8F58B654 FBCFD8892F4051C25F95C4C4448BD834CCCB24C5856F696AE8A980ACE16082CA 056BB5B305EBC828FC3C23FF67403F4430333531D1ABD717365B1A500B569E46 2D66E502DDACDC40C7CA5747ACFC6BEDB40F4017E03C77C2009708F0F4A0032A 8212D2BFF68AE133AC004262454327340A03059D9D333E9F96EFCFA5118F526A D41CDFA5279FC4ABBF4BEC1E848AA7C6FF810282D0926C96E863AC3A63E61471 BE8AD5E3E3D5AC0F93A9CFC5D18C31FEB9958B5ABEE6713467B0F2D3003F1DE8 68EB07642890EB231A221F2107213FA018A8B6E731B53747E8FE698A5FF815A0 319006CFA9E6F3BDF605E32C7D0286431BA00828230A8A1DA5F0533708AF1AFF 4F20FA99A450312827E0F8185F845A22560E97432DE2F2E490CBD3AC5CD402AD 48B0F2257F815AB0F4F9F3E70734A78887248C8224F52B859B2744ABC79564FE 26033BAAEDAC7B147AAED784C5340D717515F0ECA6679CE5C2FB00D1CF900FF5 E024E2F3AE3A9EA280B0FE73461FA015307E7C1016FAF81FCB5F2600E172EF40 9371A0DECA798807CF973B85CB053A969E94C6E7898969BCEEE903474F6040D9 9D01320A75545005F4EF1AD23A289037CABAE769B02B46D313BDB465B58B406E 23794D4243BFAEA4A2843D64171E7CC5C2799503EC9BA1E46796122642BA4001 410D28BA04F1473900C0900C415F58B539D08CAC1C2E67F376060E349187FD89 C303B0175B3EE1C1A6F846F74DC692AA01AD9FB543668FF611ACD27CD03401DD 5F6002F49B5120F3FC3880BE55525A5222041DCEA7827076D9F07F83FB39A76E E6413D6CF5C456ED7CE92D8749BCDCBB775022FE6305C428F9910F603242C223 C368BAE3340911578656BE9CA8255DC4B284479945452D50C9BC79F36C15F1FD 940FC286FC09F85AF34BBBB54569B936DFC5695EA89F42471E590CD84D422AA1 7D593E049ABD0105426E0768AC1CB03307E0E915298B1AD1490E2A45510A49CA 6955D0016955D0F445389C1C809110CD52C483E55B9818C5E5670A13011DDF41 02E5A944B59A931AB4FD49E387DB3509B7409B38868942E06BC07E5642B91DC7 8955978AB268325A0FF47FCB56CFFF79C593B9E5A87E89D7C01523E6C4FFC10A A0121A6492D16568AF00B261A886E86296122DAC3ECDCA432E8FC4E669B442B2 C467A99452AD544D265501C04F38470D5C4DD156D53EBACBF724CD244F48E8EA 95939494D064A206166DD5E71F94FFCF332A3A78904A21890E4D146AFAD60B88 8A84BE0CFB00D461F00D9429007FBAC23C22168BCD3388CBA1988484040B0751 2425680DD99ED48AC359EE530CBE40136F8364E1CCF4BF24C139422558378017 921022661EBE3EDFCAD1FF66D491FF3481EC13E191F51DF41055E67DA00684C2 1C1D2B1443ECBF68E142B3768B5832C840798F6808674EA70CC7A99ACBAFDA54 BD593B58A669E4F073DD474B09CFF4C1510238E1600149D6A49273558C1C5C1F 26A0D7AA3B6561A2A29625E266B691FA71F2D9B36659D482A59F09F085520A15 493FCD266A39212EFF413BDA9365E5243C1D435A81C32B49884ABC85673DEE3E 57C0D37F8E6AE0CB9A6E58A2F02F526731077AE694DF472F244023551A26C324 622193D6EE95C3DAD39B14452DC4DDB52444288481DECA33674472BE80FDABE7 D1FC7D3139E1C3EF690096F41D6A49CFE7583D31FBE2C58BADC18253A69085EF D0674F281E3FA05C224153CC03F5BDEF48080D6B44518B779CD9A067A098DCCA 1AEB888A76B20B85863CCD7E9C2C1C4EB39B0904DAA034BC4982B46A7ED186B8 14A5F4B354C58EE6731C285B9DC830719E173ECBFCAB967801FF0EAB2CA26D3E B5F5A0A341DA81B8910C5351CA0144AFF7A95BB6553B539294714ED1B31CFA0B 74324ED2FA2724C4E4FCEF158488D9A09FA322B15400BC5DC218F20B92574390 39F233110B0E142BF771394ED4472DE7F8D5D91FF308B01288B70B4848E5090B 719A1CA114C086CBFF5961E205B68F6CA779811590FDF5D9086423908D403602 D9086423908D403602FF2804FE0F677AF8E569AA54DC0000000049454E44AE42 6082} Proportional = True end object Label10: TLabel Left = 97 Top = 32 Width = 109 Height = 13 Caption = 'Nombre de Frame Cap:' end object Label11: TLabel Left = 97 Top = 110 Width = 54 Height = 13 Caption = 'Secondes :' end object TrackBar2: TTrackBar Left = 202 Top = 68 Width = 211 Height = 29 Max = 100 Min = 1 Position = 50 TabOrder = 0 OnChange = TrackBar2Change end object Camera1: TCamera Left = 90 Top = 152 Width = 260 Height = 257 Overlay = True FramesPreview = 2 FramesCaptura = 2 end object TrackBar3: TTrackBar Left = 202 Top = 32 Width = 211 Height = 30 Max = 100 Min = 1 Position = 50 TabOrder = 2 OnChange = TrackBar3Change end object TrackBar4: TTrackBar Left = 202 Top = 103 Width = 211 Height = 29 Max = 100 Min = 1 Position = 50 TabOrder = 3 OnChange = TrackBar4Change end end end end end object Panel1: TPanel Left = 0 Top = 508 Width = 494 Height = 41 Align = alBottom TabOrder = 1 object BitBtn1: TBitBtn Left = 172 Top = 8 Width = 137 Height = 25 Caption = '&Confirmer les choix' TabOrder = 0 OnClick = BitBtn1Click Kind = bkYes end end object Mixer: TAudioMixer MixerId = 0 OnControlChange = MixerControlChange Left = 448 Top = 16 end end
58.914976
87
0.735277
83c9ab4a0be73f78a34b57f86a8b2357d3dc74b2
32,330
pas
Pascal
mpprotocol.pas
gcarreno/NosoWallet
f3f9dbd6e0325ad4a0d5d9625b98b53e9b77d4c6
[ "Unlicense" ]
null
null
null
mpprotocol.pas
gcarreno/NosoWallet
f3f9dbd6e0325ad4a0d5d9625b98b53e9b77d4c6
[ "Unlicense" ]
null
null
null
mpprotocol.pas
gcarreno/NosoWallet
f3f9dbd6e0325ad4a0d5d9625b98b53e9b77d4c6
[ "Unlicense" ]
null
null
null
unit mpProtocol; {$mode objfpc}{$H+} interface uses Classes, SysUtils, mpRed, MasterPaskalForm, mpParser, StrUtils, mpDisk, mpTime,mpMiner, mpBlock, Zipper, mpcoin, mpCripto; function GetPTCEcn():String; Function GetOrderFromString(textLine:String):OrderData; function GetStringFromOrder(order:orderdata):String; function GetStringFromBlockHeader(blockheader:BlockHeaderdata):String; Function ProtocolLine(tipo:integer):String; Procedure ParseProtocolLines(); function IsValidProtocol(line:String):Boolean; Procedure PTC_Getnodes(Slot:integer); function GetNodesString():string; Procedure PTC_SendLine(Slot:int64;Message:String); Procedure PTC_SaveNodes(LineText:String); function GetNodeFromString(NodeDataString: string): NodeData; Procedure ProcessPing(LineaDeTexto: string; Slot: integer; Responder:boolean); function GetPingString():string; procedure PTC_SendPending(Slot:int64); Procedure PTC_Newblock(Texto:String); Procedure PTC_SendResumen(Slot:int64); function CreateZipBlockfile(firstblock:integer):string; Procedure PTC_SendBlocks(Slot:integer;TextLine:String); Procedure INC_PTC_Custom(TextLine:String); Procedure PTC_Custom(TextLine:String); function ValidateTrfr(order:orderdata;Origen:String):Boolean; Procedure INC_PTC_Order(TextLine:String); Procedure PTC_Order(TextLine:String); Procedure PTC_AdminMSG(TextLine:String); function SavePoolFiles():boolean; Procedure PTC_NetReqs(textline:string); function RequestAlreadyexists(reqhash:string):string; Procedure UpdateMyRequests(tipo:integer;timestamp:string;bloque:integer;hash,hashvalue:string); CONST Getnodes = 1; Nodes = 2; Ping = 3; Pong = 4; GetPending = 5; NewBlock = 6; GetResumen = 7; LastBlock = 8; Custom = 9; implementation uses mpGui; // Devuelve el puro encabezado con espacio en blanco al final function GetPTCEcn():String; Begin result := 'PSK '+IntToStr(protocolo)+' '+ProgramVersion+' '+UTCTime+' '; End; // convierte los datos de la cadena en una order Function GetOrderFromString(textLine:String):OrderData; var orderinfo : OrderData; Begin OrderInfo := Default(OrderData); OrderInfo.OrderID := Parameter(textline,1); OrderInfo.OrderLines := StrToInt(Parameter(textline,2)); OrderInfo.OrderType := Parameter(textline,3); OrderInfo.TimeStamp := StrToInt64(Parameter(textline,4)); OrderInfo.reference := Parameter(textline,5); OrderInfo.TrxLine := StrToInt(Parameter(textline,6)); OrderInfo.Sender := Parameter(textline,7); OrderInfo.Address := Parameter(textline,8); OrderInfo.Receiver := Parameter(textline,9); OrderInfo.AmmountFee := StrToInt64(Parameter(textline,10)); OrderInfo.AmmountTrf := StrToInt64(Parameter(textline,11)); OrderInfo.Signature := Parameter(textline,12); OrderInfo.TrfrID := Parameter(textline,13); Result := OrderInfo; End; // Convierte una orden en una cadena para compartir function GetStringFromOrder(order:orderdata):String; Begin result:= Order.OrderType+' '+ Order.OrderID+' '+ IntToStr(order.OrderLines)+' '+ order.OrderType+' '+ IntToStr(Order.TimeStamp)+' '+ Order.reference+' '+ IntToStr(order.TrxLine)+' '+ order.Sender+' '+ Order.Address+' '+ Order.Receiver+' '+ IntToStr(Order.AmmountFee)+' '+ IntToStr(Order.AmmountTrf)+' '+ Order.Signature+' '+ Order.TrfrID; End; // devuelve una cadena con los datos de la cabecera de un bloque function GetStringFromBlockHeader(BlockHeader:blockheaderdata):String; Begin result := 'Number:'+IntToStr(BlockHeader.Number)+' '+ 'Start:' +IntToStr(BlockHeader.TimeStart)+' '+ 'End:'+IntToStr(BlockHeader.TimeEnd)+' '+ 'Total:'+IntToStr(BlockHeader.TimeTotal)+' '+ '20:'+IntToStr(BlockHeader.TimeLast20)+' '+ 'Trxs:'+IntToStr(BlockHeader.TrxTotales)+' '+ 'Diff:'+IntToStr(BlockHeader.Difficult)+' '+ 'Target:'+BlockHeader.TargetHash+' '+ 'Solution:'+BlockHeader.Solution+' '+ 'NextDiff:'+IntToStr(BlockHeader.NxtBlkDiff)+' '+ 'Miner:'+BlockHeader.AccountMiner+' '+ 'Fee:'+IntToStr(BlockHeader.MinerFee)+' '+ 'Reward:'+IntToStr(BlockHeader.Reward); End; //Devuelve la linea de protocolo solicitada Function ProtocolLine(tipo:integer):String; var Resultado : String = ''; Encabezado : String = ''; Begin Encabezado := 'PSK '+IntToStr(protocolo)+' '+ProgramVersion+' '+UTCTime+' '; if tipo = GetNodes then Resultado := '$GETNODES'; if tipo = Nodes then Resultado := '$NODES'+GetNodesString(); if tipo = Ping then Resultado := '$PING '+GetPingString; if tipo = Pong then Resultado := '$PONG '+GetPingString; if tipo = GetPending then Resultado := '$GETPENDING'; if tipo = NewBlock then Resultado := '$NEWBL '; if tipo = GetResumen then Resultado := '$GETRESUMEN'; if tipo = LastBlock then Resultado := '$LASTBLOCK '+IntToStr(mylastblock); if tipo = Custom then Resultado := '$CUSTOM '; Resultado := Encabezado+Resultado; Result := resultado; End; // Procesa todas las lineas procedentes de las conexiones Procedure ParseProtocolLines(); var contador : integer = 0; UsedProtocol : integer = 0; UsedVersion : string = ''; PeerTime: String = ''; Linecomando : string = ''; Begin SetCurrentJob('ParseProtocolLines',true); for contador := 1 to MaxConecciones do begin While SlotLines[contador].Count > 0 do begin UsedProtocol := StrToIntDef(Parameter(SlotLines[contador][0],1),1); UsedVersion := Parameter(SlotLines[contador][0],2); PeerTime := Parameter(SlotLines[contador][0],3); LineComando := Parameter(SlotLines[contador][0],4); if ((not IsValidProtocol(SlotLines[contador][0])) and (not Conexiones[contador].Autentic)) then // La linea no es valida y proviene de una conexion no autentificada begin ConsoleLinesAdd(LangLine(22)+conexiones[contador].ip+'->'+SlotLines[contador][0]); //CONNECTION REJECTED: INVALID PROTOCOL -> UpdateBotData(conexiones[contador].ip); CerrarSlot(contador); end else if UpperCase(LineComando) = 'DUPLICATED' then begin ConsoleLinesAdd('You are already connected to '+conexiones[contador].ip); //CONNECTION REJECTED: INVALID PROTOCOL -> CerrarSlot(contador); end else if UpperCase(LineComando) = 'OLDVERSION' then begin ConsoleLinesAdd('You need update your wallet to connect to '+conexiones[contador].ip); //CONNECTION REJECTED: INVALID PROTOCOL -> CerrarSlot(contador); end else if UpperCase(LineComando) = '$GETNODES' then PTC_Getnodes(contador) else if UpperCase(LineComando) = '$NODES' then PTC_SaveNodes(SlotLines[contador][0]) else if UpperCase(LineComando) = '$PING' then ProcessPing(SlotLines[contador][0],contador,true) else if UpperCase(LineComando) = '$PONG' then ProcessPing(SlotLines[contador][0],contador,false) else if UpperCase(LineComando) = '$GETPENDING' then PTC_SendPending(contador) else if UpperCase(LineComando) = '$NEWBL' then PTC_NewBlock(SlotLines[contador][0]) else if UpperCase(LineComando) = '$GETRESUMEN' then PTC_SendResumen(contador) else if UpperCase(LineComando) = '$LASTBLOCK' then PTC_SendBlocks(contador,SlotLines[contador][0]) else if UpperCase(LineComando) = '$CUSTOM' then INC_PTC_Custom(GetOpData(SlotLines[contador][0])) else if UpperCase(LineComando) = 'ORDER' then INC_PTC_Order(SlotLines[contador][0]) else if UpperCase(LineComando) = 'ADMINMSG' then PTC_AdminMSG(SlotLines[contador][0]) else if UpperCase(LineComando) = 'NETREQ' then PTC_NetReqs(SlotLines[contador][0]) else Begin // El comando recibido no se reconoce. Verificar protocolos posteriores. ConsoleLinesAdd(LangLine(23)+SlotLines[contador][0]+') '+intToStr(contador)); //Unknown command () in slot: ( end; if SlotLines[contador].count > 0 then SlotLines[contador].Delete(0); end; end; SetCurrentJob('ParseProtocolLines',false); End; // Verifica si una linea recibida en una conexion es una linea valida de protocolo function IsValidProtocol(line:String):Boolean; Begin if copy(line,1,4) = 'PSK ' then result := true else result := false; End; // Procesa una solicitud de nodos Procedure PTC_Getnodes(Slot:integer); Begin //PTC_SendLine(slot,ProtocolLine(Nodes)); End; // Devuelve una cadena con la info de los 50 primeros nodos validos. function GetNodesString():string; var NodesString : String = ''; NodesAdded : integer = 0; Counter : integer; Begin for counter := 0 to length(ListaNodos)-1 do begin NodesString := NodesString+' '+ListaNodos[counter].ip+':'+ListaNodos[counter].port+':' +ListaNodos[counter].LastConexion+':'; NodesAdded := NodesAdded+1; if NodesAdded>50 then break; end; result := NodesString; End; // Envia una linea a un determinado slot Procedure PTC_SendLine(Slot:int64;Message:String); Begin if slot <= length(conexiones)-1 then begin if ((conexiones[Slot].tipo='CLI') and (not conexiones[Slot].IsBusy)) then begin try Conexiones[Slot].context.Connection.IOHandler.WriteLn(Message); except On E :Exception do begin ConsoleLinesAdd(E.Message); ToExcLog('Error sending line: '+E.Message); CerrarSlot(Slot); end; end; end; if ((conexiones[Slot].tipo='SER') and (not conexiones[Slot].IsBusy)) then begin try CanalCliente[Slot].IOHandler.WriteLn(Message); except On E :Exception do begin ConsoleLinesAdd(E.Message); ToExcLog('Error sending line: '+E.Message); CerrarSlot(Slot); end; end; end; end else ToExcLog('Invalid PTC_SendLine slot: '+IntToStr(slot)); end; // Guarda los nodos recibidos desde otro usuario Procedure PTC_SaveNodes(LineText:String); var NodosList : TStringList; Contador : integer = 5; MoreParam : boolean = true; ThisParam : String = ''; ThisNode : NodeData; Begin ConsoleLinesAdd('Get nodes: deprecated'); { NodosList := TStringList.Create; while MoreParam do begin ThisParam := Parameter(LineText,contador); if thisparam = '' then MoreParam := false else NodosList.Add(ThisParam); contador := contador+1; end; for contador := 0 to NodosList.Count-1 do Begin ThisParam := StringReplace(NodosList[contador],':',' ', [rfReplaceAll, rfIgnoreCase]); ThisNode := GetNodeFromString(ThisParam); If NodeExists(ThisNode.ip,ThisNode.port)<0 then UpdateNodeData(ThisNode.ip,ThisNode.port,ThisNode.LastConexion); end; NodosList.Free; } End; // Devuelve la info de un nodo a partir de una cadena pre-tratada function GetNodeFromString(NodeDataString: string): NodeData; var Resultado : NodeData; Begin Resultado.ip:= GetCommand(NodeDataString); Resultado.port:=Parameter(NodeDataString,1); Resultado.LastConexion:=Parameter(NodeDataString,2); Result := Resultado; End; // Procesa un ping recibido y envia el PONG si corresponde. Procedure ProcessPing(LineaDeTexto: string; Slot: integer; Responder:boolean); var PProtocol, PVersion, PConexiones, PTime, PLastBlock, PLastBlockHash, PSumHash, PPending : string; PResumenHash, PConStatus, PListenPort : String; Begin PProtocol := Parameter(LineaDeTexto,1); PVersion := Parameter(LineaDeTexto,2); PTime := Parameter(LineaDeTexto,3); PConexiones := Parameter(LineaDeTexto,5); PLastBlock := Parameter(LineaDeTexto,6); PLastBlockHash := Parameter(LineaDeTexto,7); PSumHash := Parameter(LineaDeTexto,8); PPending := Parameter(LineaDeTexto,9); PResumenHash := Parameter(LineaDeTexto,10); PConStatus := Parameter(LineaDeTexto,11); PListenPort := Parameter(LineaDeTexto,12); conexiones[slot].Autentic:=true; conexiones[slot].Connections:=StrToIntDef(PConexiones,1); conexiones[slot].Version:=PVersion; conexiones[slot].Lastblock:=PLastBlock; conexiones[slot].LastblockHash:=PLastBlockHash; conexiones[slot].SumarioHash:=PSumHash; conexiones[slot].Pending:=StrToIntDef(PPending,0); conexiones[slot].Protocol:=StrToIntDef(PProtocol,0); conexiones[slot].offset:=StrToInt64(PTime)-StrToInt64(UTCTime); conexiones[slot].lastping:=UTCTime; conexiones[slot].ResumenHash:=PResumenHash; conexiones[slot].ConexStatus:=StrToIntDef(PConStatus,0); conexiones[slot].ListeningPort:=StrToIntDef(PListenPort,-1); if responder then PTC_SendLine(slot,ProtocolLine(4)); if responder then G_TotalPings := G_TotalPings+1; End; // Devuelve la informacion contenida en un ping function GetPingString():string; var Port : integer = 0; Begin if Form1.Server.Active then port := UserOptions.Port else port:= -1 ; result :=IntToStr(GetTotalConexiones())+' '+ IntToStr(MyLastBlock)+' '+ MyLastBlockHash+' '+ MySumarioHash+' '+ IntToStr(LEngth(PendingTXs))+' '+ MyResumenHash+' '+ IntToStr(MyConStatus)+' '+ IntToStr(port); End; // Envia las TXs pendientes al slot indicado procedure PTC_SendPending(Slot:int64); var contador : integer; Encab : string; Textline : String; TextOrder : String; CopyPendingTXs : Array of OrderData; Begin Encab := GetPTCEcn; TextOrder := encab+'ORDER '; if Length(PendingTXs) > 0 then begin EnterCriticalSection(CSPending); SetLength(CopyPendingTXs,0); CopyPendingTXs := copy(PendingTXs,0,length(PendingTXs)); LeaveCriticalSection(CSPending); for contador := 0 to Length(CopyPendingTXs)-1 do begin Textline := GetStringFromOrder(CopyPendingTXs[contador]); if (CopyPendingTXs[contador].OrderType='CUSTOM') then begin PTC_SendLine(slot,Encab+'$'+TextLine); end; if (CopyPendingTXs[contador].OrderType='TRFR') then begin if CopyPendingTXs[contador].TrxLine=1 then TextOrder:= TextOrder+IntToStr(CopyPendingTXs[contador].OrderLines)+' '; TextOrder := TextOrder+'$'+GetStringfromOrder(CopyPendingTXs[contador])+' '; if CopyPendingTXs[contador].OrderLines=CopyPendingTXs[contador].TrxLine then begin Setlength(TextOrder,length(TextOrder)-1); PTC_SendLine(slot,TextOrder); TextOrder := encab+'ORDER '; end; end; end; Tolog('Sent '+IntToStr(Length(CopyPendingTXs))+' pendingTxs to '+conexiones[slot].ip); SetLength(CopyPendingTXs,0); end; End; // Se recibe un mensaje con una solucion para el bloque Procedure PTC_Newblock(Texto:String); var TimeStamp : string = ''; NumeroBloque : string = ''; DireccionMinero : string = ''; Solucion : string = ''; BlockNumber : integer; Proceder : boolean = true; Begin TimeStamp := Parameter (Texto,5); NumeroBloque := Parameter (Texto,6); DireccionMinero := Parameter (Texto,7); Solucion := Parameter (Texto,8); solucion := StringReplace(Solucion,'_',' ',[rfReplaceAll, rfIgnoreCase]); if MyConStatus < 3 then begin OutgoingMsjsAdd(Texto); Proceder := false; end; if not TryStrToInt(NumeroBloque,BlockNumber) then begin ToExcLog('ERROR CONVERTING RECEIVED BLOCK NUMBER'); Proceder := false; end; if proceder then begin // proceder 1 // Se recibe una solucion del siguiente bloque if ( (BlockNumber = LastBlockData.Number+1) and (VerifySolutionForBlock(lastblockdata.NxtBlkDiff,MyLastBlockHash,DireccionMinero,Solucion)=0))then begin ConsoleLinesAdd(LangLine(21)+NumeroBloque); //Solution for block received and verified: CrearNuevoBloque(BlockNumber,StrToInt64(TimeStamp),Miner_Target,DireccionMinero,Solucion); end // se recibe una solucion distinta del ultimo bloque pero mas antigua else if ( (BlockNumber = LastBlockData.Number) and (StrToInt64(timestamp)<LastBlockData.TimeEnd) and (VerifySolutionForBlock(lastblockdata.Difficult,LastBlockData.TargetHash,DireccionMinero,Solucion)=0) and (StrToInt64(timestamp)+15 > StrToInt64(UTCTime)) ) then begin UndoneLastBlock(false,true); CrearNuevoBloque(BlockNumber,StrToInt64(TimeStamp),Miner_Target,DireccionMinero,Solucion); end // solucion distinta del ultimo con el mismo timestamp se elige la mas corta else if ( (BlockNumber = LastBlockData.Number) and (StrToInt64(timestamp)=LastBlockData.TimeEnd) and (VerifySolutionForBlock(lastblockdata.Difficult,LastBlockData.TargetHash,DireccionMinero,Solucion)=0) and (StrToInt64(timestamp)+15 > StrToInt64(UTCTime)) and (DireccionMinero<>LastBlockData.AccountMiner) and (Solucion<LastBlockData.Solution) ) then begin UndoneLastBlock(false,true); CrearNuevoBloque(BlockNumber,StrToInt64(TimeStamp),Miner_Target,DireccionMinero,Solucion); end; end; // proceder 1 End; // Send headers file to peer Procedure PTC_SendResumen(Slot:int64); var AFileStream : TFileStream; Begin SetCurrentJob('PTC_SendResumen',true); EnterCriticalSection(CSHeadAccess); AFileStream := TFileStream.Create(ResumenFilename, fmOpenRead + fmShareDenyNone); LeaveCriticalSection(CSHeadAccess); if conexiones[slot].tipo='CLI' then begin try Conexiones[slot].context.Connection.IOHandler.WriteLn('RESUMENFILE'); Conexiones[slot].context.connection.IOHandler.Write(AFileStream,0,true); Except on E:Exception do begin Form1.TryCloseServerConnection(Conexiones[Slot].context); ToExcLog('SERVER: Error sending headers file ('+E.Message+')'); end; end; end; if conexiones[slot].tipo='SER' then begin try CanalCliente[slot].IOHandler.WriteLn('RESUMENFILE'); CanalCliente[slot].IOHandler.Write(AFileStream,0,true); Except on E:Exception do begin ToExcLog('CLIENT: Error sending Headers file ('+E.Message+')'); CerrarSlot(slot); end; end; end; AFileStream.Free; SetCurrentJob('PTC_SendResumen',false); //ConsoleLinesAdd(LangLine(91));//'Headers file sent' End; // Creates the zip block file function CreateZipBlockfile(firstblock:integer):string; var MyZipFile: TZipper; ZipFileName:String; LastBlock : integer; contador : integer; filename, archivename: String; Begin result := ''; LastBlock := FirstBlock + 100; if LastBlock>MyLastBlock then LastBlock := MyLastBlock; MyZipFile := TZipper.Create; ZipFileName := BlockDirectory+'Blocks_'+IntToStr(FirstBlock)+'_'+IntToStr(LastBlock)+'.zip'; MyZipFile.FileName := ZipFileName; EnterCriticalSection(CSBlocksAccess); try for contador := FirstBlock to LastBlock do begin filename := BlockDirectory+IntToStr(contador)+'.blk'; {$IFDEF WINDOWS} archivename:= StringReplace(filename,'\','/',[rfReplaceAll]); {$ENDIF} {$IFDEF LINUX} archivename:= filename; {$ENDIF} MyZipFile.Entries.AddFileEntry(filename, archivename); end; MyZipFile.ZipAllFiles; result := ZipFileName; finally MyZipFile.Free; LeaveCriticalSection(CSBlocksAccess); end; End; // Send Zipped blocks to peer Procedure PTC_SendBlocks(Slot:integer;TextLine:String); var FirstBlock, LastBlock : integer; MyZipFile: TZipper; contador : integer; AFileStream : TFileStream; filename, archivename: String; FileSentOk : Boolean = false; ZipFileName:String; Begin SetCurrentJob('PTC_SendBlocks',true); FirstBlock := StrToIntDef(Parameter(textline,5),-1)+1; ZipFileName := CreateZipBlockfile(FirstBlock); AFileStream := TFileStream.Create(ZipFileName, fmOpenRead + fmShareDenyNone); try if conexiones[Slot].tipo='CLI' then begin try Conexiones[Slot].context.Connection.IOHandler.WriteLn('BLOCKZIP'); Conexiones[Slot].context.connection.IOHandler.Write(AFileStream,0,true); FileSentOk := true; Except on E:Exception do begin Form1.TryCloseServerConnection(Conexiones[Slot].context); ToExcLog('SERVER: Error sending ZIP blocks file ('+E.Message+')'); end; end; end; if conexiones[Slot].tipo='SER' then begin try CanalCliente[Slot].IOHandler.WriteLn('BLOCKZIP'); CanalCliente[Slot].IOHandler.Write(AFileStream,0,true); FileSentOk := true; Except on E:Exception do begin ToExcLog('CLIENT: Error sending ZIP blocks file ('+E.Message+')'); CerrarSlot(slot); end; end; end; finally AFileStream.Free; end; //MyZipFile.Free; deletefile(ZipFileName); SetCurrentJob('PTC_SendBlocks',false); End; Procedure INC_PTC_Custom(TextLine:String); Begin AddCriptoOp(4,TextLine,''); StartCriptoThread(); End; // Procesa una solicitud de customizacion Procedure PTC_Custom(TextLine:String); var OrderInfo : OrderData; Address : String = ''; OpData : String = ''; Proceder : boolean = true; Begin OrderInfo := Default(OrderData); OrderInfo := GetOrderFromString(TextLine); Address := GetAddressFromPublicKey(OrderInfo.Sender); if address <> OrderInfo.Address then proceder := false; // La direccion no dispone de fondos if GetAddressBalance(Address)-GetAddressPendingPays(Address) < Customizationfee then Proceder:=false; if TranxAlreadyPending(OrderInfo.TrfrID ) then Proceder:=false; if OrderInfo.TimeStamp < LastBlockData.TimeStart then Proceder:=false; if TrxExistsInLastBlock(OrderInfo.TrfrID) then Proceder:=false; if AddressAlreadyCustomized(Address) then Proceder:=false; If AddressSumaryIndex(OrderInfo.Receiver) >=0 then Proceder:=false; if not VerifySignedString('Customize this '+Address+' '+OrderInfo.Receiver,OrderInfo.Signature,OrderInfo.Sender ) then Proceder:=false; if proceder then begin OpData := GetOpData(TextLine); // Eliminar el encabezado AddPendingTxs(OrderInfo); OutgoingMsjsAdd(GetPTCEcn+opdata); end; End; // Verify a transfer function ValidateTrfr(order:orderdata;Origen:String):Boolean; Begin Result := true; if GetAddressBalance(Origen)-GetAddressPendingPays(Origen) < Order.AmmountFee+order.AmmountTrf then result:=false; if TranxAlreadyPending(order.TrfrID ) then result:=false; if Order.TimeStamp < LastBlockData.TimeStart then result:=false; if TrxExistsInLastBlock(Order.TrfrID) then result:=false; if not VerifySignedString(IntToStr(order.TimeStamp)+origen+order.Receiver+IntToStr(order.AmmountTrf)+ IntToStr(order.AmmountFee)+IntToStr(order.TrxLine), Order.Signature,Order.Sender ) then result:=false; End; Procedure INC_PTC_Order(TextLine:String); Begin AddCriptoOp(5,TextLine,''); StartCriptoThread(); End; Procedure PTC_Order(TextLine:String); var NumTransfers : integer; TrxArray : Array of orderdata; SenderTrx : array of string; cont : integer; Textbak : string; SendersString : String = ''; TodoValido : boolean = true; Proceder : boolean = true; Begin NumTransfers := StrToInt(Parameter(TextLine,5)); Textbak := GetOpData(TextLine); SetLength(TrxArray,0);SetLength(SenderTrx,0); for cont := 0 to NumTransfers-1 do begin SetLength(TrxArray,length(TrxArray)+1);SetLength(SenderTrx,length(SenderTrx)+1); TrxArray[cont] := default (orderdata); TrxArray[cont] := GetOrderFromString(Textbak); if TranxAlreadyPending(TrxArray[cont].TrfrID) then Proceder := false; SenderTrx[cont] := GetAddressFromPublicKey(TrxArray[cont].Sender); if SenderTrx[cont] <> TrxArray[cont].Address then begin proceder := false; //ConsoleLinesAdd(format('error: %s <> %s',[SenderTrx[cont],TrxArray[cont].Address ])) end; if pos(SendersString,SenderTrx[cont]) > 0 then begin ConsoleLinesAdd(LangLine(94)); //'Duplicate sender in order' Proceder:=false; // hay una direccion de envio repetida end; SendersString := SendersString + SenderTrx[cont]; Textbak := copy(textBak,2,length(textbak)); Textbak := GetOpData(Textbak); end; for cont := 0 to NumTransfers-1 do begin if not ValidateTrfr(TrxArray[cont],SenderTrx[cont]) then begin TodoValido := false; end; end; if not todovalido then Proceder := false; if proceder then begin Textbak := GetOpData(TextLine); Textbak := GetPTCEcn+'ORDER '+IntToStr(NumTransfers)+' '+Textbak; for cont := 0 to NumTransfers-1 do AddPendingTxs(TrxArray[cont]); OutgoingMsjsAdd(Textbak); U_DirPanel := true; end; End; Procedure PTC_AdminMSG(TextLine:String); var msgtime, mensaje, firma, hashmsg : string; msgtoshow : string = ''; contador : integer = 1; errored : boolean = false; Begin msgtime := parameter(TextLine,5); mensaje := parameter(TextLine,6); firma := parameter(TextLine,7); hashmsg := parameter(TextLine,8); if AnsiContainsStr(MsgsReceived,hashmsg) then errored := true else mensaje := StringReplace(mensaje,'_',' ',[rfReplaceAll, rfIgnoreCase]); if not VerifySignedString(msgtime+mensaje,firma,AdminPubKey) then begin ToLog('Admin msg wrong sign'); errored := true; end; if HashMD5String(msgtime+mensaje+firma) <> Hashmsg then begin ToLog('Admin msg wrong hash'); errored :=true; end; if not errored then begin MsgsReceived := MsgsReceived + Hashmsg; for contador := 1 to length(mensaje) do begin if mensaje[contador] = '}' then msgtoshow := msgtoshow+slinebreak else msgtoshow := msgtoshow +mensaje[contador]; end; Tolog('Admin message'+slinebreak+ TimestampToDate(msgtime)+slinebreak+ msgtoshow); formlog.Visible:=true; OutgoingMsjsAdd(TextLine); end; End; // Save the pool files to a zip file function SavePoolFiles():boolean; var MyZipFile: TZipper; Begin result := true; try MyZipFile := TZipper.Create; MyZipFile.FileName := 'NOSODATA'+DirectorySeparator+'PoolFiles.zip'; MyZipFile.Entries.AddFileEntry(PoolInfoFilename); MyZipFile.Entries.AddFileEntry(PoolMembersFilename); MyZipFile.ZipAllFiles; MyZipFile.Free; Except on E:Exception do begin tolog('Error saving pool files'); result := false; end; end; End; Procedure PTC_NetReqs(textline:string); var request : integer; timestamp : string; Direccion : string; Bloque: integer; ReqHash, ValueHash : string; valor,newvalor : string; texttosend : string; NewValueHash : string; Begin request := StrToIntDef(parameter(TextLine,5),0); timestamp := parameter(TextLine,6); Direccion := parameter(TextLine,7); Bloque := StrToIntDef(parameter(TextLine,8),0); ReqHash := parameter(TextLine,9); ValueHash := parameter(TextLine,10); valor := parameter(TextLine,11); if request = 1 then // hashrate begin if ( (StrToInt64def(timestamp,0) = LastBlockData.TimeEnd) and (Direccion = LastBlockData.AccountMiner) and (bloque=LastBlockData.Number) and (RequestAlreadyexists(ReqHash)='') ) then begin //ConsoleLinesAdd('NETREQ GOT'+slinebreak+IntToStr(request)+' '+timestamp+' '+direccion+' '+IntTostr(bloque)+' '+ // ReqHash+' '+ValueHash+' '+valor); newvalor := InttoStr(StrToIntDef(valor,0)+Miner_LastHashRate); ConsoleLinesAdd('hashrate set to: '+newvalor); NewValueHash := HashMD5String(newvalor); TextToSend := GetPTCEcn+'NETREQ 1 '+timestamp+' '+direccion+' '+IntToStr(bloque)+' '+ ReqHash+' '+NewValueHash+' '+newvalor; OutgoingMsjsAdd(texttosend); UpdateMyRequests(request,timestamp,bloque, ReqHash,ValueHash ); end else if ( (RequestAlreadyexists(ReqHash)<>'') and (RequestAlreadyexists(ReqHash)<>ValueHash) ) then begin NewValueHash := HashMD5String(valor); TextToSend := GetPTCEcn+'NETREQ 1 '+timestamp+' '+direccion+' '+IntToStr(bloque)+' '+ ReqHash+' '+NewValueHash+' '+valor; OutgoingMsjsAdd(texttosend); ConsoleLinesAdd('Now hashrate: '+valor); UpdateMyRequests(request,timestamp,bloque, ReqHash,NewValueHash ); end else begin networkhashrate := StrToInt64def(valor,-1); ConsoleLinesAdd('Final hashrate: '+valor); if nethashsend=false then begin TextToSend := GetPTCEcn+'NETREQ 1 '+timestamp+' '+direccion+' '+IntToStr(bloque)+' '+ ReqHash+' '+ValueHash+' '+valor; OutgoingMsjsAdd(texttosend); nethashsend:= true; end; end; end else if request = 2 then // peers begin if ( (StrToInt64def(timestamp,0) = LastBlockData.TimeEnd) and (Direccion = LastBlockData.AccountMiner) and (bloque=LastBlockData.Number) and (RequestAlreadyexists(ReqHash)='') ) then begin newvalor := InttoStr(StrToIntDef(valor,0)+1); ConsoleLinesAdd('peers set to: '+newvalor); NewValueHash := HashMD5String(newvalor); TextToSend := GetPTCEcn+'NETREQ 2 '+timestamp+' '+direccion+' '+IntToStr(bloque)+' '+ ReqHash+' '+NewValueHash+' '+newvalor; OutgoingMsjsAdd(texttosend); UpdateMyRequests(request,timestamp,bloque, ReqHash,ValueHash ); end else if ( (RequestAlreadyexists(ReqHash)<>'') and (RequestAlreadyexists(ReqHash)<>ValueHash) ) then begin NewValueHash := HashMD5String(valor); TextToSend := GetPTCEcn+'NETREQ 2 '+timestamp+' '+direccion+' '+IntToStr(bloque)+' '+ ReqHash+' '+NewValueHash+' '+valor; OutgoingMsjsAdd(texttosend); ConsoleLinesAdd('Now peers: '+valor); UpdateMyRequests(request,timestamp,bloque, ReqHash,NewValueHash ); end else begin networkpeers := StrToInt64def(valor,-1); ConsoleLinesAdd('Final peers: '+valor); if netpeerssend=false then begin TextToSend := GetPTCEcn+'NETREQ 2 '+timestamp+' '+direccion+' '+IntToStr(bloque)+' '+ ReqHash+' '+ValueHash+' '+valor; OutgoingMsjsAdd(texttosend); netpeerssend:= true; end; end; end; End; function RequestAlreadyexists(reqhash:string):string; var contador : integer; Begin result := ''; if length(ArrayNetworkRequests) > 0 then begin for contador := 0 to length(ArrayNetworkRequests)-1 do begin if ArrayNetworkRequests[contador].hashreq = reqhash then begin result := ArrayNetworkRequests[contador].hashvalue; break; end; end; end; End; Procedure UpdateMyRequests(tipo:integer;timestamp:string;bloque:integer;hash,hashvalue:string); var contador : integer; ExistiaTipo : boolean = false; Begin if length(ArrayNetworkRequests)>0 then begin for contador := 0 to length(ArrayNetworkRequests)-1 do begin if ArrayNetworkRequests[contador].tipo = tipo then begin ArrayNetworkRequests[contador].timestamp:=StrToInt64(timestamp); ArrayNetworkRequests[contador].block:=bloque; ArrayNetworkRequests[contador].hashreq:=hash; ArrayNetworkRequests[contador].hashvalue:=hashvalue; if tipo = 1 then nethashsend := false; if tipo = 2 then netpeerssend := false; ExistiaTipo := true; end; end; end; if not ExistiaTipo then begin SetLength(ArrayNetworkRequests,length(ArrayNetworkRequests)+1); ArrayNetworkRequests[length(ArrayNetworkRequests)-1].tipo := tipo; ArrayNetworkRequests[length(ArrayNetworkRequests)-1].timestamp:=StrToInt64(timestamp); ArrayNetworkRequests[length(ArrayNetworkRequests)-1].block:=bloque; ArrayNetworkRequests[length(ArrayNetworkRequests)-1].hashreq:=hash; ArrayNetworkRequests[length(ArrayNetworkRequests)-1].hashvalue:=hashvalue; end; End; END. // END UNIT
35.684327
139
0.685431
6a3b0eb32d49b0b265c65e2a533b9c86257207cd
729
pas
Pascal
native/ntvStdThemes.pas
parmaja/minictrls
04cc476a0da16278b20835d1819da3ce88b644ce
[ "MIT" ]
8
2019-02-02T03:00:49.000Z
2021-11-24T12:06:06.000Z
native/ntvStdThemes.pas
parmaja/minictrls
04cc476a0da16278b20835d1819da3ce88b644ce
[ "MIT" ]
3
2019-12-28T11:05:18.000Z
2020-11-21T08:53:10.000Z
native/ntvStdThemes.pas
parmaja/minictrls
04cc476a0da16278b20835d1819da3ce88b644ce
[ "MIT" ]
4
2020-09-10T11:18:35.000Z
2022-01-15T14:24:37.000Z
unit ntvStdThemes; {** * This file is part of the "Mini Library" * * @url http://www.sourceforge.net/projects/minilib * @license modifiedLGPL (modified of http://www.gnu.org/licenses/lgpl.html) * See the file COPYING.MLGPL, included in this distribution, * @author Belal Alhamed <belalhamed at gmail dot com> * @author Zaher Dirkey <zaher at parmaja dot com> *} {$mode objfpc}{$H+} interface uses Dialogs, Classes, Messages, Controls, ExtCtrls, SysUtils, Math, Contnrs, Graphics, LCLType, Forms, LCLIntf, ntvThemes; type { TntvStdThemePainter } TntvStdThemePainter = class(TntvTheme) private public end; implementation uses Types; end.
20.828571
85
0.663923
6afcaf4254427b6310f2733659875ee3404fc69a
4,490
pas
Pascal
Source/AggSpanInterpolatorTrans.pas
kant/AggPasMod
6acc4502e9108ae105b55992800d0a3a505fb033
[ "OLDAP-2.4", "OLDAP-2.3" ]
69
2015-06-07T10:45:24.000Z
2022-02-17T06:47:12.000Z
Source/AggSpanInterpolatorTrans.pas
kant/AggPasMod
6acc4502e9108ae105b55992800d0a3a505fb033
[ "OLDAP-2.4", "OLDAP-2.3" ]
15
2015-08-28T07:28:58.000Z
2020-04-10T22:16:57.000Z
Source/AggSpanInterpolatorTrans.pas
kant/AggPasMod
6acc4502e9108ae105b55992800d0a3a505fb033
[ "OLDAP-2.4", "OLDAP-2.3" ]
28
2015-06-11T05:04:57.000Z
2021-05-28T10:52:15.000Z
unit AggSpanInterpolatorTrans; //////////////////////////////////////////////////////////////////////////////// // // // Anti-Grain Geometry (modernized Pascal fork, aka 'AggPasMod') // // Maintained by Christian-W. Budde (Christian@pcjv.de) // // Copyright (c) 2012-2020 // // // // Based on: // // Pascal port by Milan Marusinec alias Milano (milan@marusinec.sk) // // Copyright (c) 2005-2006, see http://www.aggpas.org // // // // Original License: // // Anti-Grain Geometry - Version 2.4 (Public License) // // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // // Contact: McSeem@antigrain.com / McSeemAgg@yahoo.com // // // // Permission to copy, use, modify, sell and distribute this software // // is granted provided this copyright notice appears in all copies. // // This software is provided "as is" without express or implied // // warranty, and with no claim as to its suitability for any purpose. // // // //////////////////////////////////////////////////////////////////////////////// // // // Horizontal Span interpolator for use with an arbitrary transformer. // // The efficiency highly depends on the operations done in the transformer // // // //////////////////////////////////////////////////////////////////////////////// interface {$I AggCompiler.inc} {$Q-} {$R-} uses AggBasics, AggTransAffine, AggSpanInterpolatorLinear; type TAggSpanInterpolatorTrans = class(TAggSpanInterpolator) private FTrans: TAggTransAffine; FX, FY: Double; FIntX, FIntY: Integer; public constructor Create(SS: Cardinal = 8); overload; constructor Create(Trans: TAggTransAffine; SS: Cardinal = 8); overload; constructor Create(Trans: TAggTransAffine; X, Y, Z: Cardinal; SS: Cardinal = 8); overload; function GetTransformer: TAggTransAffine; override; procedure SetTransformer(Trans: TAggTransAffine); override; procedure SetBegin(X, Y: Double; Len: Cardinal); override; procedure IncOperator; override; procedure Coordinates(X, Y: PInteger); override; procedure Coordinates(var X, Y: Integer); override; end; implementation { TAggSpanInterpolatorTrans } constructor TAggSpanInterpolatorTrans.Create(SS: Cardinal = 8); begin inherited Create(SS); FTrans := nil; end; constructor TAggSpanInterpolatorTrans.Create(Trans: TAggTransAffine; SS: Cardinal = 8); begin inherited Create(SS); FTrans := Trans; end; constructor TAggSpanInterpolatorTrans.Create(Trans: TAggTransAffine; X, Y, Z: Cardinal; SS: Cardinal = 8); begin inherited Create(SS); FTrans := Trans; SetBegin(X, Y, 0); end; function TAggSpanInterpolatorTrans.GetTransformer; begin Result := FTrans; end; procedure TAggSpanInterpolatorTrans.SetTransformer; begin FTrans := Trans; end; procedure TAggSpanInterpolatorTrans.SetBegin(X, Y: Double; Len: Cardinal); begin FX := X; FY := Y; FTrans.Transform(FTrans, @X, @Y); FIntX := IntegerRound(X * FSubpixelSize); FIntY := IntegerRound(Y * FSubpixelSize); end; procedure TAggSpanInterpolatorTrans.IncOperator; var X, Y: Double; begin FX := FX + 1.0; X := FX; Y := FY; FTrans.Transform(FTrans, @X, @Y); FIntX := IntegerRound(X * FSubpixelSize); FIntY := IntegerRound(Y * FSubpixelSize); end; procedure TAggSpanInterpolatorTrans.Coordinates(X, Y: PInteger); begin X^ := FIntX; Y^ := FIntY; end; procedure TAggSpanInterpolatorTrans.Coordinates(var X, Y: Integer); begin X := FIntX; Y := FIntY; end; end.
31.180556
81
0.509577
f1428b81b9cbc2dda678cb6184826e3f16717a9d
4,858
pas
Pascal
source/iocpSocketUtils.pas
ymofen/diocp3
db1404dd757e8eb60754e61be76049956926962e
[ "BSD-2-Clause" ]
40
2015-01-03T08:13:46.000Z
2021-05-11T07:55:52.000Z
source/iocpSocketUtils.pas
zhrongpower/diocp3
db1404dd757e8eb60754e61be76049956926962e
[ "BSD-2-Clause" ]
null
null
null
source/iocpSocketUtils.pas
zhrongpower/diocp3
db1404dd757e8eb60754e61be76049956926962e
[ "BSD-2-Clause" ]
34
2015-01-03T08:13:51.000Z
2022-01-26T03:03:54.000Z
unit iocpSocketUtils; interface uses iocpWinsock2, Windows, SysUtils; type TSocketState = (ssDisconnected, ssConnected, ssConnecting, ssListening, ssAccepting); type TIocpAcceptEx = function(sListenSocket, sAcceptSocket: TSocket; lpOutputBuffer: Pointer; dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD; var lpdwBytesReceived: DWORD; lpOverlapped: POverlapped): BOOL; stdcall; TIocpConnectEx = function(const s : TSocket; const name: PSOCKADDR; const namelen: Integer; lpSendBuffer : Pointer; dwSendDataLength : DWORD; var lpdwBytesSent : DWORD; lpOverlapped : LPWSAOVERLAPPED): BOOL; stdcall; // Extention function "GetAcceptExSockAddrs" TIocpGetAcceptExSockAddrs = procedure(lpOutputBuffer: Pointer; dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD; var LocalSockaddr: PSockAddr; var LocalSockaddrLength: Integer; var RemoteSockaddr: PSockAddr; var RemoteSockaddrLength: Integer); stdcall; TIocpDisconnectEx = function(const hSocket : TSocket; lpOverlapped: LPWSAOVERLAPPED; const dwFlags : DWORD; const dwReserved : DWORD) : BOOL; stdcall; var IocpAcceptEx:TIocpAcceptEx; IocpConnectEx:TIocpConnectEx; IocpDisconnectEx:TIocpDisconnectEx; IocpGetAcceptExSockaddrs: TIocpGetAcceptExSockAddrs; function getSocketAddr(pvAddr: string; pvPort: Integer): TSockAddrIn; function socketBind(s: TSocket; const pvAddr: string; pvPort: Integer): Boolean; implementation const WINSOCK_LIB_VERSION : Word = $0202; const WSAID_GETACCEPTEXSOCKADDRS: TGuid = (D1:$b5367df2;D2:$cbac;D3:$11cf;D4:($95,$ca,$00,$80,$5f,$48,$a1,$92)); WSAID_ACCEPTEX: TGuid = (D1:$b5367df1;D2:$cbac;D3:$11cf;D4:($95,$ca,$00,$80,$5f,$48,$a1,$92)); WSAID_CONNECTEX: TGuid = (D1:$25a207b9;D2:$ddf3;D3:$4660;D4:($8e,$e9,$76,$e5,$8c,$74,$06,$3e)); {$EXTERNALSYM WSAID_DISCONNECTEX} WSAID_DISCONNECTEX: TGuid = (D1:$7fda2e11;D2:$8630;D3:$436f;D4:($a0,$31,$f5,$36,$a6,$ee,$c1,$57)); function creatTcpSocketHandle:THandle; begin Result := WSASocket(AF_INET, SOCK_STREAM, IPPROTO_IP, nil, 0, WSA_FLAG_OVERLAPPED); if (Result = INVALID_SOCKET) then begin RaiseLastOSError; end; end; procedure LoadAcceptEx(const s: TSocket); var rtnCode: Integer; bytesReturned: Cardinal; begin rtnCode := WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, @WSAID_ACCEPTEX, SizeOf(WSAID_ACCEPTEX), @@IocpAcceptEx, SizeOf(Pointer), bytesReturned, nil, nil); if rtnCode <> 0 then begin RaiseLastOSError; end; end; procedure LoadDisconnectEx(const s: TSocket); var rtnCode: Integer; bytesReturned: Cardinal; begin rtnCode := WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, @WSAID_DISCONNECTEX, SizeOf(WSAID_DISCONNECTEX), @@IocpDisconnectEx, SizeOf(Pointer), bytesReturned, nil, nil); if rtnCode <> 0 then begin RaiseLastOSError; end; end; procedure LoadAcceptExSockaddrs(const s: TSocket); var rtnCode: Integer; bytesReturned: Cardinal; begin rtnCode := WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, @WSAID_GETACCEPTEXSOCKADDRS, SizeOf(WSAID_GETACCEPTEXSOCKADDRS), @@IocpGetAcceptExSockaddrs, SizeOf(Pointer), bytesReturned, nil, nil); if rtnCode <> 0 then begin RaiseLastOSError; end; end; procedure LoadConnecteEx(const s: TSocket); var rtnCode: Integer; bytesReturned: Cardinal; begin rtnCode := WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, @WSAID_CONNECTEX, SizeOf(WSAID_CONNECTEX), @@IocpConnectEx, SizeOf(Pointer), bytesReturned, nil, nil); if rtnCode <> 0 then begin RaiseLastOSError; end; end; procedure WSAStart; var lvRET: Integer; WSData: TWSAData; begin lvRET := WSAStartup($0202, WSData); if lvRET <> 0 then RaiseLastOSError; end; procedure loadExFunctions; var skt:TSocket; begin skt := creatTcpSocketHandle; LoadAcceptEx(skt); LoadConnecteEx(skt); LoadAcceptExSockaddrs(skt); LoadDisconnectEx(skt); closesocket(skt); end; function getSocketAddr(pvAddr: string; pvPort: Integer): TSockAddrIn; begin Result.sin_family := AF_INET; Result.sin_addr.S_addr:= inet_addr(PAnsiChar(AnsiString(pvAddr))); Result.sin_port := htons(pvPort); end; function socketBind(s: TSocket; const pvAddr: string; pvPort: Integer): Boolean; var sockaddr: TSockAddrIn; begin FillChar(sockaddr, SizeOf(sockaddr), 0); with sockaddr do begin sin_family := AF_INET; sin_addr.S_addr := inet_addr(PAnsichar(AnsiString(pvAddr))); sin_port := htons(pvPort); end; Result := iocpWinsock2.bind(s, TSockAddr(sockaddr), SizeOf(sockaddr)) = 0; end; initialization WSAStart; loadExFunctions; end.
24.912821
108
0.711404
f1b0b6f24cbcc4c53fc7c89a57d996e7a0e0bc36
4,314
pas
Pascal
frmVGA.pas
cdesp/NewMachine
62dc8b4c1c3b6778978f467bfadebd4ad0ffdb70
[ "BSD-3-Clause" ]
null
null
null
frmVGA.pas
cdesp/NewMachine
62dc8b4c1c3b6778978f467bfadebd4ad0ffdb70
[ "BSD-3-Clause" ]
null
null
null
frmVGA.pas
cdesp/NewMachine
62dc8b4c1c3b6778978f467bfadebd4ad0ffdb70
[ "BSD-3-Clause" ]
null
null
null
unit frmVGA; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, DXDraws, DXClass, Vcl.ExtCtrls; type TfVGA = class(TDXForm) dxvga: TDXDraw; Timer1: TTimer; procedure FormShow(Sender: TObject); procedure FormHide(Sender: TObject); procedure Timer1Timer(Sender: TObject); private procedure DoMyPaint; { Private declarations } public { Public declarations } procedure DoResize1; end; var fVGA: TfVGA; isGraph:boolean; isHires:boolean; implementation {$R *.dfm} uses New,unbmemory,math,unbscreen,jcllogic; procedure TfVGA.DoResize1; begin left:=fNewBrain.left-width-3; top:=fNewBrain.top; end; procedure TfVGA.DoMyPaint; var x,y: Integer; addr,staddr:Integer; bt,btl,bth:byte; bt8:byte; col:tcolor; function getBit(v,b:Byte):Byte; begin b:=trunc(system.math.Power(2,b)); if v and b=b then result:=1 else result:=0; end; function get4bitcolor(bt:byte):TColor; var r,g,b,i:Byte; Begin i:=getBit(bt,3); if (i=0) then Begin b:=getBit(bt,0) * 127; g:=getBit(bt,1) * 127; r:=getBit(bt,2) * 127; end else begin b:=getBit(bt,0) * 255; g:=getBit(bt,1) * 255; r:=getBit(bt,2) * 255; end; result:=RGB(r,g,b); End; var xpix,ypix,clr:byte; forecol,backcol:tcolor; screenMode:Byte; Begin if not dxvga.candraw then exit; screenMode:=nbmem.GetDirectMem(8,32760); ishiRes:= (screenMode and 2=2); isGraph:= not (screenMode and 1=1); //00=graph low res F5 //01=text low res F6 //10=graph hires F7 //11=text hires F8 forecol:=clGreen; backCol:=clBlack; staddr:=$0000; dxvga.BeginScene; dxvga.Surface.Fill(clgreen); dxvga.Surface.lock(); //4bits per pixel // if ishires then Begin for y := 0 to 400-1 do for x:=0 to 640-1 do Begin if isgraph then //640x400 b/w Begin addr:=y*(640 div 8)+(x div 8); bt:=nbmem.GetDirectMem(8,addr); //auto advances to other pages if addr>8000 xpix:=x mod 8; if getbit(bt,xpix)=1 then col:=forecol else col:=backcol; end else Begin //80x40 chars of 8x10 each b/w addr:=(y div 10)*80 +(x div 8); bt:=nbmem.GetDirectMem(8,addr); //bt:=nbmem.ROM[addr]; xpix:=x mod 8; ypix:=y mod 10; bt:=ReverseBits(Chararr[bt+ypix*256]);//get line pattern for char //clr:=nbmem.GetDirectMem(8,addr+1024); if getbit(bt,xpix)=1 then col:=forecol else col:=backcol; End; dxvga.Surface.Pixel[x,y]:=col; End; end else //lowres Begin for y := 0 to 400-1 do for x:=0 to 640-1 do Begin if isgraph then Begin addr:=(y div 2)*160+(x div 2) div 2; bt:=nbmem.GetDirectMem(8,addr); //auto advances to other pages if addr>8000 //bt:=nbmem.ROM[addr]; btl:=bt and $0f; bth:=(bt and $f0) shr 4; if x mod 4<2 then col:=get4bitcolor(btH) else col:=get4bitcolor(btL); end else Begin //40x20 chars of 8x10 each addr:=(y div 20)*40 +(x div 8 div 2); bt:=nbmem.GetDirectMem(8,addr); //bt:=nbmem.ROM[addr]; xpix:=(x div 2) mod 8; ypix:=(y div 2) mod 10; bt:=ReverseBits(Chararr[bt+ypix*256]);//get line pattern for char clr:=nbmem.GetDirectMem(8,addr+1024); //clr:=nbmem.ROM[addr+1024]; if getbit(bt,xpix)=1 then col:=get4bitcolor(clr and $0f) else col:=get4bitcolor((clr and $f0) shr 4); End; dxvga.Surface.Pixel[x,y]:=col; End; end; dxvga.Surface.Canvas.Release; {Flip the buffer} try dxvga.surface.unlock; dxvga.Flip; except end; //code here dxvga.EndScene; End; procedure TfVGA.FormHide(Sender: TObject); begin Timer1.Enabled:=false; end; procedure TfVGA.FormShow(Sender: TObject); begin Timer1.Enabled:=true; dxvga.Finalize; fvga.Refresh; end; procedure TfVGA.Timer1Timer(Sender: TObject); begin DoMyPaint; end; end.
20.84058
98
0.587622
f1468f3699a704759783c7bd821344a2df9b739d
589,904
dfm
Pascal
Source/dmCommands.dfm
nioniochang/pyscripter
e5ad6138fe3c6de9fd96c58e6fed98aa4c82fd5a
[ "MIT" ]
null
null
null
Source/dmCommands.dfm
nioniochang/pyscripter
e5ad6138fe3c6de9fd96c58e6fed98aa4c82fd5a
[ "MIT" ]
null
null
null
Source/dmCommands.dfm
nioniochang/pyscripter
e5ad6138fe3c6de9fd96c58e6fed98aa4c82fd5a
[ "MIT" ]
null
null
null
object CommandsDataModule: TCommandsDataModule OldCreateOrder = False OnCreate = DataModuleCreate OnDestroy = DataModuleDestroy Height = 392 Width = 675 object SynPythonSyn: TSynPythonSyn DefaultFilter = 'Python Files (*.py;*.pyw)|*.py;*.pyw' Options.AutoDetectEnabled = False Options.AutoDetectLineLimit = 0 Options.Visible = False IdentifierAttri.Foreground = clBlack KeyAttri.Foreground = clNavy NonKeyAttri.Style = [] NumberAttri.Foreground = clTeal HexAttri.Foreground = clTeal OctalAttri.Foreground = clTeal FloatAttri.Foreground = clTeal SpaceAttri.Background = clWhite SpaceAttri.Foreground = clSilver StringAttri.Foreground = clOlive DocStringAttri.Foreground = 16711884 SymbolAttri.Foreground = clMaroon Left = 616 Top = 212 end object SynEditPrint: TSynEditPrint Copies = 1 Header.DefaultFont.Charset = DEFAULT_CHARSET Header.DefaultFont.Color = clBlack Header.DefaultFont.Height = -13 Header.DefaultFont.Name = 'Arial' Header.DefaultFont.Style = [] Footer.DefaultFont.Charset = DEFAULT_CHARSET Footer.DefaultFont.Color = clBlack Footer.DefaultFont.Height = -13 Footer.DefaultFont.Name = 'Arial' Footer.DefaultFont.Style = [] Margins.Left = 25.000000000000000000 Margins.Right = 15.000000000000000000 Margins.Top = 25.000000000000000000 Margins.Bottom = 25.000000000000000000 Margins.Header = 18.000000000000000000 Margins.Footer = 18.000000000000000000 Margins.LeftHFTextIndent = 2.000000000000000000 Margins.RightHFTextIndent = 2.000000000000000000 Margins.HFInternalMargin = 0.500000000000000000 Margins.MirrorMargins = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -13 Font.Name = 'Courier New' Font.Style = [] Highlighter = SynPythonSyn TabWidth = 8 Color = clWhite Left = 188 Top = 68 end object PrintDialog: TPrintDialog MaxPage = 10000 Options = [poPageNums] Left = 187 Top = 22 end object PrinterSetupDialog: TPrinterSetupDialog Left = 100 Top = 68 end object CodeImages: TImageList ColorDepth = cd32Bit Left = 32 Top = 241 Bitmap = { 494C01010A000D00480010001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000003000000001002000000000000030 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000A0A0A99101010CC1010 10CC101010CC101010CC101010CC101010CC101010CC101010CC101010CC1010 10CC101010CC101010CC0A0A0A99000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000191919CCC2C2C2FFBCBC BCFFB6B6B6FFB0B0B0FFAAAAAAFFA4A4A4FF9E9E9EFF989898FF49007AFF8C8C 8CFF8D888DFF808080FF191919CC000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000212121CCCBCBCBFFC5C5 C5FFBFBFBFFFB9B9B9FFB3B3B3FFADADADFFA7A7A7FF7A2AACFF560688FF4D00 7EFF8F8F8FFF8F8B8FFF212121CC000000000000000000000000000000000E25 36853883B2E92B6B9CE0040B1256000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004FCF75FF5FC67DFF6FBC 86FF80B38FFF90A997FFBCBCBCFFB6B6B6FF7A2AACFF9746C8FF550587FF6414 96FF510183FF929292FF2E2A2ECF000000000000000000000000000000002B6B 8DC985E9F9FF4BD9F5FF3383B9F3040C145D0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000262626CCDDDDDDFFD7D7 D7FFD1D1D1FFCBCBCBFFC5C5C5FF7A2AACFF9C4BCDFF9E4DCFFF560688FF6A1A 9CFF5F0F91FF530385FF262626CC000000000000000000000000000000002E70 94CFA0E6F8FF36D2F2FF45D6F6FF3587BDF5040D16620000000D0000000D0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000004FCF75FF5FC67DFF6FBC86FF80B3 8FFF90A997FFD4D4D4FF7C2CAEFF9B4ACCFFA04FD1FF9645C7FFBB6AECFF6919 9BFF69199BFF550587FF282828CC000000000000000000000000000000000613 1C5C256690CE98E2F6FF51DCF5FF44D9F6FF3183BAF42A6AABE82B6BAEE80309 1153000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000002B2B2BCCEFEFEFFFE9E9 E9FFE3E3E3FFDDDDDDFF7929ABFF9D4CCEFF9544C6FFC574F6FFC675F7FFC271 F3FF7424A6FF540486FF2B2B2BCC000000000000000000000000000000000000 0000010608342B6A8DCA3B8AADDE5CD9F2FF4CDBF6FF59DDF7FF53D8F5FF2A76 C0F7030A13590000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000005FC67DFF6FBC86FF80B3 8FFF90A997FFE6E6E6FF7929ABFF9544C6FFC574F6FFC473F5FFC372F4FFC473 F5FFBD6CEEFF6F1FA1FF2F2F2FCC000000000000000000000000000000000000 000000000000000000000E293C8688DDF4FF68E0F6FF71E2F7FF5DDFF6FF53DA F6FF3171BAF30000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000313131CCFFFFFFFFFBFB FBFFF5F5F5FFEFEFEFFFAC5BDDFFC675F7FFCB7AFCFFC372F4FFC372F4FFBB6A ECFFAC5BDDFFBFBFBFFF313131CC000000000000000000000000000000000000 000000000000000000001B4B68AFA8EEF9FF7CE6F8FF99E8F8FF7CD1F0FF7EE2 F6FF3686C0F00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000333333CCFFFFFFFFFFFF FFFFFFFFFFFFF8F8F8FFF2F2F2FFAC5BDDFFCF7EFFFFCC7BFDFFBC6BEDFFAC5B DDFFCECECEFFC8C8C8FF333333CC000000000000000000000000000000000000 000000000000000000000717226659BCE6FDA2F0FBFF7ED4F0FF7CC7ECFF4896 CBF5030D15590000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001D1D1D99343434CC3434 34CC2A2A2ACC999999FF2A2A2ACC343434CCAC5BDDFFC473F5FFAC5BDDFF2A2A 2ACC343434CC343434CC1D1D1D99000000000000000000000000000000000000 0000000000000000000000000000071B29706DC9ECFFC9F3FBFF4AA0C7ED020A 1048000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000262626CC000000000000000000000000AC5BDDFF262626CC0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000020D2B3E892B6B8ECB061620630000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000002D2D2DCC0B0B0B6600000000000000000B0B0B662D2D2DCC0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000002020233333333CC333333CC333333CC333333CC020202330000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000020103234C25 68CD020103230000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000049007AFF0000 00000000000F0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000002010323773BA1FF9E61 C7FF4C2567CE0201032300000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007A2AACFF560688FF4D00 7EFF000000000000000F00000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000793DA3FFAE71D7FFD397 FCFFAA6DD3FF4C2568CD02010323000000000000000000000000000000000000 000000000000D55454FFD55454FF0000000000000000D55454FFD55454FF0000 000000000000000000000000000000000000000000000000000000000000D554 54FFD55454FFD55454FFD55454FF0000000000000000D55454FFD55454FFD554 54FFD55454FF000000000000000000000000000000004FCF75FF5FC67DFF6FBC 86FF80B38FFF90A997FF00000000000000007A2AACFF9746C8FF550587FF6414 96FF510183FF000000000000000F000000000000000000000000000000000000 00000000000000000000000000007B7B7BFF7B7B7BFF7B7B7BFF8E51B7FFD397 FCFFD397FCFFDDA1FFFF773BA1FF000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FFD55454FFD55454FF0000000000000000D55454FFD55454FFD554 54FFD55454FF0000000000000000000000000000000000000000000000000000 00000000000000000000000000007A2AACFF9C4BCDFF9E4DCFFF560688FF6A1A 9CFF5F0F91FF530385FF00000000000000000000000000000000000000000000 00000000000000000000000000007B7B7BFF0000000000000000020103239D60 C6FFDDA1FFFF763AA0FF02010323000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF0000000000000000000000004FCF75FF5FC67DFF6FBC86FF80B3 8FFF90A997FF000000007C2CAEFF9B4ACCFFA04FD1FF9645C7FFBB6AECFF6919 9BFF69199BFF550587FF00000000000000000000000000000000000000000000 00000000000000000000000000007B7B7BFF00000000030300236E5008CD0B08 0741763AA0FF0201032300000000000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF0000000000000000000000000000000000000000000000000000 000000000000000000007929ABFF9D4CCEFF9544C6FFC574F6FFC675F7FFC271 F3FF7424A6FF540486FF00000000000000000000000000000000000203230882 A1FA0002032300000000000000007B7B7BFF03030023AB7C0DFFD1A333FF6F4F 08CE030300230000000000000000000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000005FC67DFF6FBC86FF80B3 8FFF90A997FF000000007929ABFF9544C6FFC574F6FFC473F5FFC372F4FFC473 F5FFBD6CEEFF6F1FA1FF000000000000000000000000000203230C8CABFF20A0 BFFF045F77D900020323000000007B7B7BFFAD7E0FFFE1B343FFFFD868FFDDAF 3FFF6E5008CD030300230000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF0000000000000000000000000000000000000000000000000000 00000000000000000000AC5BDDFFC675F7FFCB7AFCFFC372F4FFC372F4FFBB6A ECFFAC5BDDFF000000000000000000000000000203230E8EADFF27A7C6FF1191 B0FF1898B7FF046178DA7B7B7BFF7B7B7BFF7B7B7BFFC19323FFFFD868FFFFD8 68FFFFE272FFAB7C0DFF00000000000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000AC5BDDFFCF7EFFFFCC7BFDFFBC6BEDFFAC5B DDFF00000000000000000000000000000000066881E128A8C7FF25A5C4FF1191 B0FF1191B0FF1F9FBEFF046178DA000203230000000003030023D0A232FFFFE2 72FFAA7B0CFF0303002300000000000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000AC5BDDFFC473F5FFAC5BDDFF0000 000000000000000000000000000000000000000203230E8EADFF37B7D6FF2CAC CBFF20A0BFFF20A0BFFF27A7C6FF046178DA000203230000000003030023AA7B 0CFF030300230000000000000000000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FF000000000000000000000000000000000000000000000000D554 54FFD55454FF0000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000AC5BDDFF000000000000 00000000000000000000000000000000000000000000000203231191B0FF43C3 E2FF3ABAD9FF2FAFCEFF2FAFCEFF44C4E3FF0583A2FD00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000D55454FFD55454FF00000000000000000000000000000000D55454FFD554 54FF00000000000000000000000000000000000000000000000000000000D554 54FFD55454FFD55454FFD55454FF0000000000000000D55454FFD55454FFD554 54FFD55454FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000203231393 B2FF4FCFEEFF48C8E7FF47C7E6FF0583A2FD0002032300000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000D55454FFD55454FF0000000000000000D55454FFD55454FF0000 000000000000000000000000000000000000000000000000000000000000D554 54FFD55454FFD55454FFD55454FF0000000000000000D55454FFD55454FFD554 54FFD55454FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000002 03231696B5FF59D9F8FF057D9BF8000203230000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000203231184A1F300020323000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003942FF00000000000000 000000000000CEC6D60063735A00007B5A0000A5520000FF000000847B00007B 8400008C8C00004A4A00A5A5A500000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000B5BDEF000808FF0000004A000052 00000042000008520800A58CB500FFF7FF00184A080000CE000000C64200008C 7B00007B8400008C8C000029290094949C000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000636B7B000000FF0000C6 520000EF390000FF000000AD00003139390052425A00ADC6DE000031080000FF 080000847B00007B8400008C8C00003939000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000010510DFF0000 00000000000000000000000000000000000000000000635A5A00000000000000 FF0000007B000000080000B5390000FF080000B5000084848C00D6CEDE000029 210000EF180000847B0000848400006B6B000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001C7816FF145A10FF1154 0EFF00000000000000000000000000000000DEDEEF00216B2100004229000063 4200006BBD0000183100000000000029390000FF1000008C0000634263000052 100000CE420000EF100000738C00008C8C000000000000000000000000000000 000000000000738C730008100800DECEDE000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008C738C0010081000CEDECE000000000000000000000000000000 000000000000000000000000000000000000000000004FCF75FF5FC67DFF6FBC 86FF80B38FFF90A997FF0000000F000000001C7816FF1A9813FF145A10FF1A64 15FF12570FFF0000000000000000000000001042180000FF000000FF100000FF 000000FF000000FF1000005A0000000000000031390000FF310000A50000004A 080000FF100000DE210000738C00008484000000000000000000000000000000 00000000000018CE180000630000182118008C8C8C00EFDEEF00000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000CE18CE0063006300211821008C8C8C00DEEFDE00000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000001C7816FF19A011FF17A210FF145A10FF1A68 15FF176013FF135810FF00000000000000000021000000FF290000847B0000B5 520000BD420000946B0000FF080000FF000000080000005A000000BD5A00008C 00000073000000739C0000848400008C8C000000000000000000000000000000 00008CFF8C0008B50800007B0000008C00000031000029312900BDADBD000000 0000000000000000000000000000000000000000000000000000000000000000 0000FF8CFF00B508B5007B007B008C008C003100310031293100ADBDAD000000 0000000000000000000000000000000000004FCF75FF5FC67DFF6FBC86FF80B3 8FFF90A997FF000000001C7A16FF199E11FF17A410FF1A9813FF0ACE00FF1B67 16FF1B6716FF145A10FF0000000000000000001818000042520000737B00004A 5A0000526300008C7B0000847B0000FF080000B539000094000000FF000000FF 000000100000008C8C0000848400007373000000000000000000000000000000 000000E7000000630000007B0000007B000000940000006B0000002100006B7B 6B00000000000000000000000000000000000000000000000000000000000000 0000E700E700630063007B007B0084008400940094006B006B00210021007B6B 7B00000000000000000000000000000000000000000000000000000000000000 000000000000000000001C7816FF19A011FF1A9613FF0FD500FF0FD700FF0FD2 00FF1B7216FF135810FF000000000000000010292900007B7B00008C8C00007B 7B00007B7B00007B8400007B8400007B840000AD520000AD630000FF080000FF 000000210000008C8C00008C8C00004A4A000000000000000000000000000000 00006BF76B0000CE000000840000006B0000007B0000007B0000009400000008 0000000000000000000000000000000000000000000000000000000000000000 0000F76BF700CE00CE00840084006B006B007B007B0084008400940094000800 080000000000000000000000000000000000000000005FC67DFF6FBC86FF80B3 8FFF90A997FF000000001C7816FF1A9613FF0FD500FF0FD500FF0FD500FF0FD5 00FF0AD000FF1B6E16FF00000000000000000000000010393900003131000094 9400008C8C00008C8C0000848400008C8C0000848C00007B8C00007B73000052 080000849400006B6B0000212100737373000000000000000000000000000000 000000000000BDFFBD0029E7290000B50000006B000000840000084A08008C84 8C00000000000000000000000000000000000000000000000000000000000000 000000000000FFBDFF00E729E700B500B5006B006B00840084004A084A00848C 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000011B809FF0FD700FF0FD900FF0FD500FF0FD500FF0ACE 00FF11B809FF00000000000000000000000000000000CED6D600A5ADAD000000 00000000000000292900004A4A000000000000393900008C8C00006B6B000000 00000000000029393900B5BDBD00000000000000000000000000000000000000 00000000000000000000000000008CFF8C0018E71800009C000018391800E7CE E700000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000FF8CFF00E718E7009C009C0039183900CEE7 CE00000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000011B809FF15DD00FF0FDB00FF0ACE00FF11B8 09FF000000000000000000000000000000000000000000000000000000009484 8C0008F7F700399C9C000084840042F7F700297B7B0000525200000000009CA5 A500000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000DEFFDE0008F7080073EF73000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FFDEFF00F708F700EF73EF000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000011B809FF0FD500FF11B809FF0000 000000000000000000000000000000000000000000000000000000000000847B 7B00FF000000FF00000000A5A500FF000000CE00000000636300212121000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000011B809FF000000000000 0000000000000000000000000000000000000000000000000000000000008473 7B0008F7F70008A5A500006B6B0008F7F700008C8C00005A5A00101818000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000B5BD C600000000000031310000000000001010000052520000525200737373000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000D6DEDE00000808006B8484001839390000101000737B7B00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000300000000100010000000000800100000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000B801FFFFFFFF00000000FFFFFFFF0000 8000FFFFFFFF00008000FFFFFFFF00000000F8FFF8FF00000000F83FF83F0000 0000F01FF01F00000000F00FF00F00000000F00FF00F00008000F80FF80F0000 8001FE0FFE0F0000E00FFF1FFF1F0000E01FFFFFFFFF0000E01FFFFFFFFF0000 E01FFFFFFFFF0000F03FFFFFFFFF000000000000000000000000000000000000 000000000000} end object ParameterCompletion: TSynCompletionProposal Options = [scoLimitToMatchedText, scoUseInsertList, scoUsePrettyText, scoCompleteWithTab, scoCompleteWithEnter] Width = 300 EndOfTokenChr = '()[]. ' TriggerChars = '.' Title = 'Parameters' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Shell Dlg 2' Font.Style = [] TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clBtnText TitleFont.Height = -11 TitleFont.Name = 'MS Shell Dlg 2' TitleFont.Style = [fsBold] Columns = < item ColumnWidth = 100 DefaultFontStyle = [fsBold] end item ColumnWidth = 300 end> Resizeable = False ShortCut = 24656 OnCodeCompletion = ParameterCompletionCodeCompletion Left = 335 Top = 12 end object ModifierCompletion: TSynCompletionProposal Options = [scoLimitToMatchedText, scoUseInsertList, scoUsePrettyText, scoCompleteWithTab, scoCompleteWithEnter] Width = 300 EndOfTokenChr = '()[].- ' TriggerChars = '.' Title = 'Modifiers' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clBtnText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [fsBold] Columns = < item ColumnWidth = 100 DefaultFontStyle = [fsBold] end item ColumnWidth = 400 end> Resizeable = False ShortCut = 24653 OnCodeCompletion = ModifierCompletionCodeCompletion Left = 338 Top = 58 end object CodeTemplatesCompletion: TSynAutoComplete AutoCompleteList.Strings = ( 'hdr' '|Python Module header' '=#--------------------------------------------------------------' + '-----------------' '=# Name: $[ActiveDoc-Name]' '=# Purpose: |' '=#' '=# Author: $[UserName]' '=#' '=# Created: $[DateTime-'#39'DD/MM/YYYY'#39'-DateFormat]' '=# Copyright: (c) $[UserName] $[DateTime-'#39'YYYY'#39'-DateFormat]' '=# Licence: <your licence>' '=#--------------------------------------------------------------' + '-----------------' 'cl' '|Comment Line' '=#--------------------------------------------------------------' + '-----------------' '=|' 'pyapp' '|Python application' '=def main():' '= |pass' '=' '=if __name__ == '#39'__main__'#39':' '= main()' 'cls' '|Python class' '=class |(object):' '= """' '='#9#9'class comment' '= """' '=' '= def __init__(self):' '= pass' 'fec' '|File encoding comment' '=# -*- coding: UTF-8 -*-' '=|' 'she' '|Sheband' '=#!/usr/bin/env python$[($[PythonVersion]>='#39'3.0'#39')'#39'3'#39':'#39#39']' '=|') EndOfTokenChr = '()[]. ' ShortCut = 0 Options = [scoLimitToMatchedText, scoUseInsertList, scoCompleteWithTab, scoCompleteWithEnter] Left = 340 Top = 108 end object imlShellIcon: TImageList DrawingStyle = dsTransparent ShareImages = True Left = 104 Top = 240 end object SynEditSearch: TSynEditSearch Left = 195 Top = 123 end object SynEditRegexSearch: TSynEditRegexSearch Left = 105 Top = 124 end object ProgramVersionCheck: TJvProgramVersionCheck AllowedReleaseType = prtAlpha AppStoragePath = 'Check for Updates' CheckFrequency = 0 LocalDirectory = 'Updates' LocalVersionInfoFileName = 'versioninfo.ini' LocationHTTP = ProgramVersionHTTPLocation LocationType = pvltHTTP UserOptions = [uoCheckFrequency, uoLocalDirectory, uoAllowedReleaseType, uoLocationHTTP] VersionHistoryFileOptions.INIOptions.BooleanStringTrueValues = 'TRUE, YES, Y' VersionHistoryFileOptions.INIOptions.BooleanStringFalseValues = 'FALSE, NO, N' VersionHistoryFileOptions.INIOptions.SetAsString = True VersionHistoryFileOptions.INIOptions.FloatAsString = True VersionHistoryFileOptions.INIOptions.DefaultIfReadConvertError = True VersionHistoryFileOptions.XMLOptions.BooleanStringTrueValues = 'TRUE, YES, Y' VersionHistoryFileOptions.XMLOptions.BooleanStringFalseValues = 'FALSE, NO, N' VersionHistoryFileOptions.XMLOptions.SetAsString = True VersionHistoryFileOptions.XMLOptions.FloatAsString = True VersionHistoryFileOptions.XMLOptions.DefaultIfReadConvertError = True VersionHistoryFileOptions.XMLOptions.UseOldItemNameFormat = False VersionHistoryFileOptions.XMLOptions.WhiteSpaceReplacement = '_' VersionHistoryFileOptions.XMLOptions.InvalidCharReplacement = '_' Left = 491 Top = 23 end object ProgramVersionHTTPLocation: TJvProgramVersionHTTPLocation OnLoadFileFromRemote = ProgramVersionHTTPLocationLoadFileFromRemote VersionInfoLocationPathList.Strings = ( 'https://raw.githubusercontent.com/pyscripter/pyscripter/master') VersionInfoFileName = 'PyScripterVersionInfo.ini' Left = 494 Top = 72 end object SynIniSyn: TSynIniSyn Options.AutoDetectEnabled = False Options.AutoDetectLineLimit = 0 Options.Visible = False Left = 344 Top = 324 end object JvMultiStringHolder: TJvMultiStringHolder MultipleStrings = < item Name = 'InitScript' Strings.Strings = ( 'import sys' 'import code' 'import pyscripter' '' 'class PythonInteractiveInterpreter(code.InteractiveInterpreter):' ' debugIDE = __import__("DebugIDE")' '' ' class IDEDebugger(__import__('#39'bdb'#39').Bdb):' ' debugIDE = __import__("DebugIDE")' '' ' def do_clear(self, arg):' ' numberlist = arg.split()' ' for i in numberlist:' ' self.clear_bpbynumber(i)' '' ' def stop_here(self, frame):' ' import bdb' ' if not self.InitStepIn:' ' self.InitStepIn = True' ' self.set_continue()' ' return 0' ' return bdb.Bdb.stop_here(self, frame)' '' ' def canonic(self, filename):' ' import bdb' ' if type(filename) is unicode:' ' filename = filename.encode("mbcs")' ' return bdb.Bdb.canonic(self, filename)' '' ' def user_call(self, frame, args):' ' self.debugIDE.user_call(frame, args)' '' ' def user_line(self, frame):' ' self.debugIDE.user_line(frame)' '' ' def user_exception(self, frame, exc_stuff):' ' self.debugIDE.user_exception(frame, exc_stuff)' '' ' def trace_dispatch(self, frame, event, arg):' ' self.tracecount += 1' ' if self.tracecount == 30: #yield processing every 3' + '0 steps' ' self.tracecount = 0' ' self.debugIDE.user_yield()' ' if self.quitting: raise __import__('#39'bdb'#39').BdbQui' + 't' ' return __import__('#39'bdb'#39').Bdb.trace_dispatch(self, fr' + 'ame, event, arg)' '' ' def run(self, cmd, globals=None, locals=None):' ' import bdb' ' import sys' ' import types' '' ' if globals is None:' ' globals = self.locals' '' ' self.saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' try:' ' try:' ' bdb.Bdb.run(self, cmd, globals, locals)' ' except SystemExit, e:' ' if isinstance(e.code, basestring):' ' print e.code' ' elif isinstance(e.code, int):' ' print "Exit code: ", e.code' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = self.saveStd' + 'io' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' '' ' class IDETestResult(__import__('#39'unittest'#39').TestResult):' ' debugIDE = __import__("DebugIDE")' '' ' def startTest(self, test):' ' __import__('#39'unittest'#39').TestResult.startTest(self, te' + 'st)' ' self.debugIDE.testResultStartTest(test)' '' ' def stopTest(self, test):' ' __import__('#39'unittest'#39').TestResult.stopTest(self, tes' + 't)' ' self.debugIDE.testResultStopTest(test)' '' ' def addError(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addError(self, tes' + 't, err)' ' self.debugIDE.testResultAddError(test, self._exc_inf' + 'o_to_string(err, test))' '' ' def addFailure(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addFailure(self, t' + 'est, err)' ' self.debugIDE.testResultAddFailure(test, self._exc_i' + 'nfo_to_string(err, test))' '' ' def addSuccess(self, test):' ' self.debugIDE.testResultAddSuccess(test)' ' __import__('#39'unittest'#39').TestResult.addSuccess(self, t' + 'est)' '' ' def __init__(self, locals = None):' ' code.InteractiveInterpreter.__init__(self, locals)' ' self.locals["__name__"] = "__main__"' '' ' self.debugger = self.IDEDebugger()' ' self.debugger.InitStepIn = False' ' self.debugger.tracecount = 0' ' self.debugger.currentframe = None' ' self.debugger.locals = self.locals' '' ' import repr' ' pyrepr = repr.Repr()' ' pyrepr.maxstring = 60' ' pyrepr.maxother = 60' ' self._repr = pyrepr.repr' '' ' self.commontypes = frozenset([' ' '#39'NoneType'#39',' ' '#39'NotImplementedType'#39',' ' '#39'bool'#39',' ' '#39'buffer'#39',' ' '#39'builtin_function_or_method'#39',' ' '#39'code'#39',' ' '#39'complex'#39',' ' '#39'dict'#39',' ' '#39'dictproxy'#39',' ' '#39'ellipsis'#39',' ' '#39'file'#39',' ' '#39'float'#39',' ' '#39'frame'#39',' ' '#39'function'#39',' ' '#39'generator'#39',' ' '#39'getset_descriptor'#39',' ' '#39'instancemethod'#39',' ' '#39'int'#39',' ' '#39'list'#39',' ' '#39'long'#39',' ' '#39'member_descriptor'#39',' ' '#39'method-wrapper'#39',' ' '#39'object'#39',' ' '#39'slice'#39',' ' '#39'str'#39',' ' '#39'traceback'#39',' ' '#39'tuple'#39',' ' '#39'unicode'#39',' ' '#39'xrange'#39'])' '' ' def _import(self, name, code):' ' import imp' ' import sys' ' mod = imp.new_module(name)' ' mod.__file__ = code.co_filename' '' ' try:' ' exec code in mod.__dict__' ' sys.modules[name] = mod' ' return mod' ' except SystemExit:' ' pass' '' ' def run_nodebug(self, cmd, globals=None, locals=None):' ' import types' ' import sys' '' ' if globals is None:' ' globals = self.locals' '' ' self.saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' try:' ' try:' ' exec cmd in globals, locals' ' except SystemExit, e:' ' if isinstance(e.code, basestring):' ' print e.code' ' elif isinstance(e.code, int):' ' print "Exit code: ", e.code' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = self.saveStdio' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' '' ' def objecttype(self, ob):' ' try:' ' try:' ' return ob.__class__.__name__' ' except:' ' return type(ob).__name__' ' except:' ' return "Unknown type"' '' ' def objectinfo(self, ob):' ' res = 1' ' try:' ' import inspect' ' if hasattr(ob, "__dict__") and isinstance(ob.__dict_' + '_, dict):' ' res = res | 2' ' if inspect.ismodule(ob):' ' res = res | 4' ' elif inspect.ismethod(ob):' ' res = res | 8' ' elif inspect.isfunction(ob) or inspect.isbuiltin(ob)' + ':' ' res = res | 16' ' elif inspect.isclass(ob):' ' res = res | 32' ' elif isinstance(ob, dict):' ' res = res | 64' ' return res' ' except:' ' return res' '' ' def saferepr(self, x):' ' try:' ' return self._repr(x)' ' except:' ' return '#39'<unprintable %s object>'#39' % type(x).__name__' '' ' def membercount(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' # dictitems will be True when used in the Variables win' + 'dow' ' # expandcommontypes will be False when used in the Vari' + 'ables window' ' try:' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return len(ob)' ' elif dictitems and isinstance(ob, dict):' ' return len(ob)' ' elif not expandcommontypes and (self.objecttype(ob) ' + 'in self.commontypes):' ' return 0' ' else:' ' return len(dir(ob))' ' except:' ' return 0' '' ' def _getmembers(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' result = {}' ' for i in range(len(ob)):' ' result[str(i)] = ob[i]' ' elif dictitems and isinstance(ob, dict):' ' result = {}' ' for (i,j) in ob.items():' ' result[self.safestr(i)] = j' ' elif not expandcommontypes and (self.objecttype(ob) in s' + 'elf.commontypes):' ' result = {}' ' else:' ' result = {}' ' for i in dir(ob):' ' try :' ' result[self.safestr(i)] = getattr(ob, i)' ' except:' ' result[self.safestr(i)] = None' ' return result' '' ' def safegetmembers(self, ob, dictitems = False, expandcommon' + 'types = True, sequenceitems = False):' ' try:' ' return self._getmembers(ob, dictitems, expandcommont' + 'ypes, sequenceitems)' ' except:' ' return {}' '' ' def safegetmembersfullinfo(self, ob, dictitems = False, expa' + 'ndcommontypes = True, sequenceitems = False):' ' try:' ' members = self._getmembers(ob, dictitems, expandcomm' + 'ontypes, sequenceitems)' ' d = {}' ' for (i,j) in members.items():' ' d[i] = (j, self.objecttype(j), self.objectinfo(j' + '))' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return tuple(sorted(d.items(), key = lambda r: i' + 'nt(r[0])))' ' else:' ' return tuple(d.items())' ' except:' ' return ()' '' ' def safestr(self, value):' ' try:' ' return str(value)' ' except:' ' return self.saferepr(value)' '' ' def find_dotted_module(self, name, path=None):' ' import imp' ' segs = name.split('#39'.'#39')' ' file = None' ' while segs:' ' if file: file.close()' ' file, filename, desc = imp.find_module(segs[0], path' + ')' ' del segs[0]' ' path = [filename]' ' return file, filename, desc' '' '' ' def findModuleOrPackage(self, modName, path=None):' ' if path is None:' ' import sys' ' path = sys.path' ' try:' ' f, filename, (ext, mode, type) = self.find_dotted_m' + 'odule(modName, path)' ' except ImportError, err:' ' return None' '' ' if f is not None:' ' f.close()' ' if filename:' ' import imp, os' ' if type == imp.PKG_DIRECTORY:' ' return os.path.join(filename, '#39'__init__.py'#39')' ' elif type in (imp.PY_SOURCE, imp.C_EXTENSION):' ' return filename' '' ' def getmodules(self, path=None):' ' import sys' ' try:' ' import pkgutil' ' l = [i[1] for i in pkgutil.iter_modules(path)]' ' except:' ' l = []' ' if path is None:' ' l.extend(sys.builtin_module_names)' ' return l' '' ' def runcode(self, code):' ' import sys' ' def softspace(file, newvalue):' ' oldvalue = 0' ' try:' ' oldvalue = file.softspace' ' except AttributeError:' ' pass' ' try:' ' file.softspace = newvalue' ' except (AttributeError, TypeError):' ' # "attribute-less object" or "read-only attribut' + 'es"' ' pass' ' return oldvalue' '' ' self.saveStdio = (sys.stdin, sys.stdout, sys.stderr)' ' try:' ' if self.debugger.currentframe:' ' exec code in self.debugger.currentframe.f_global' + 's, self.debugger.currentframe.f_locals' ' # save locals' ' try:' ' import ctypes' ' ctypes.pythonapi.PyFrame_LocalsToFast(ctypes' + '.py_object(self.debugger.currentframe), 0)' ' except :' ' pass' ' else:' ' exec code in self.locals' ' except SystemExit, e:' ' if isinstance(e.code, basestring):' ' print e.code' ' elif isinstance(e.code, int):' ' print "Exit code: ", e.code' ' except:' ' self.showtraceback()' ' else:' ' if softspace(sys.stdout, 0):' ' print' ' sys.stdin, sys.stdout, sys.stderr = self.saveStdio' '' ' def evalcode(self, code):' ' # may raise exceptions' ' try:' ' if self.debugger.currentframe:' ' return eval(code, self.debugger.currentframe.f_g' + 'lobals, self.debugger.currentframe.f_locals)' ' else:' ' return eval(code, self.locals)' ' except SystemExit:' ' return None' '' ' def _find_constructor(self, class_ob):' ' # Given a class object, return a function object used fo' + 'r the' ' # constructor (ie, __init__() ) or None if we can'#39't find' + ' one. (from IDLE)' ' try:' ' return class_ob.__init__.im_func' ' except AttributeError:' ' for base in class_ob.__bases__:' ' rc = self._find_constructor(base)' ' if rc is not None: return rc' ' return None' '' ' def get_arg_text(self, ob):' ' "Get a string describing the arguments for the given obj' + 'ect - From IDLE"' ' import types' ' from inspect import isclass, isfunction, getargspec, for' + 'matargspec, getdoc' ' argText = ""' ' if ob is not None:' ' argOffset = 0' ' if isclass(ob):' ' # Look for the highest __init__ in the class cha' + 'in.' ' fob = self._find_constructor(ob)' ' if fob is None:' ' fob = lambda: None' ' else:' ' argOffset = 1' ' elif type(ob)==types.MethodType:' ' # bit of a hack for methods - turn it into a fun' + 'ction' ' # but we drop the "self" param.' ' fob = ob.im_func' ' argOffset = 1' ' else:' ' fob = ob' ' # Try and build one for Python defined functions' ' if isfunction(fob):' ' try:' ' args, varargs, varkw, defaults = getargspec(' + 'fob)' ' argText = formatargspec(args[argOffset:], va' + 'rargs, varkw, defaults)[1:-1]' ' #argText = "%s(%s)" % (fob.func_name, argTex' + 't)' ' except:' ' pass' ' return (argText, getdoc(fob))' '' ' def Win32RawInput(self, prompt=None):' ' "Provide raw_input() for gui apps"' ' # flush stderr/out first.' ' debugIDE = __import__("DebugIDE")' ' import sys' ' try:' ' sys.stdout.flush()' ' sys.stderr.flush()' ' except:' ' pass' ' if prompt is None: prompt = ""' ' ret = debugIDE.InputBox(u'#39'Python input'#39', unicode(prompt)' + ',u"")' ' if ret is None:' ' raise KeyboardInterrupt, "operation cancelled"' ' return ret' '' ' def Win32Input(self, prompt=None):' ' "Provide input() for gui apps"' ' return eval(raw_input(prompt))' '' ' def setupdisplayhook(self):' ' if pyscripter.IDEOptions.PrettyPrintOutput:' ' import sys, pprint, __builtin__' ' def pphook(value, show=pprint.pprint, bltin=__builti' + 'n__):' ' if value is not None:' ' bltin._ = value' ' show(value)' ' sys.displayhook = pphook' '' '_II = PythonInteractiveInterpreter(globals())' '' 'sys.modules['#39'__builtin__'#39'].raw_input=_II.Win32RawInput' 'sys.modules['#39'__builtin__'#39'].input=_II.Win32Input' '' 'import os' 'try:' ' sys.path.remove(os.path.dirname(sys.executable))' ' sys.path.remove(os.path.dirname(sys.executable))' 'except:' ' pass' 'sys.path.insert(0, "")' '' 'import warnings' 'warnings.simplefilter("ignore", DeprecationWarning)' '' 'del DebugOutput' 'del code' 'del PythonInteractiveInterpreter' 'del sys' 'del os' 'del warnings') end item Name = 'InitScript3000' Strings.Strings = ( 'import sys' 'import code' 'import pyscripter' '' 'class PythonInteractiveInterpreter(code.InteractiveInterpreter):' ' debugIDE = __import__("DebugIDE")' '' ' class IDEDebugger(__import__('#39'bdb'#39').Bdb):' ' debugIDE = __import__("DebugIDE")' '' ' def do_clear(self, arg):' ' numberlist = arg.split()' ' for i in numberlist:' ' self.clear_bpbynumber(i)' '' ' def stop_here(self, frame):' ' import bdb' ' if not self.InitStepIn:' ' self.InitStepIn = True' ' self.set_continue()' ' return 0' ' return bdb.Bdb.stop_here(self, frame)' '' ' def user_call(self, frame, args):' ' self.debugIDE.user_call(frame, args)' '' ' def user_line(self, frame):' ' self.debugIDE.user_line(frame)' '' ' def user_exception(self, frame, exc_stuff):' ' self.debugIDE.user_exception(frame, exc_stuff)' '' ' def trace_dispatch(self, frame, event, arg):' ' self.tracecount += 1' ' if self.tracecount == 30: #yield processing every 3' + '0 steps' ' self.tracecount = 0' ' self.debugIDE.user_yield()' ' if self.quitting: raise __import__('#39'bdb'#39').BdbQui' + 't' ' return __import__('#39'bdb'#39').Bdb.trace_dispatch(self, fr' + 'ame, event, arg)' '' ' def run(self, cmd, globals=None, locals=None):' ' import bdb' ' import sys' ' import types' '' ' if globals is None:' ' globals = self.locals' '' ' self.saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' try:' ' try:' ' bdb.Bdb.run(self, cmd, globals, locals)' ' except SystemExit as e:' ' if isinstance(e.code, str):' ' print(e.code)' ' elif isinstance(e.code, int):' ' print("Exit code: ", e.code)' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = self.saveStd' + 'io' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' '' ' class IDETestResult(__import__('#39'unittest'#39').TestResult):' ' debugIDE = __import__("DebugIDE")' '' ' def startTest(self, test):' ' __import__('#39'unittest'#39').TestResult.startTest(self, te' + 'st)' ' self.debugIDE.testResultStartTest(test)' '' ' def stopTest(self, test):' ' __import__('#39'unittest'#39').TestResult.stopTest(self, tes' + 't)' ' self.debugIDE.testResultStopTest(test)' '' ' def addError(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addError(self, tes' + 't, err)' ' self.debugIDE.testResultAddError(test, self._exc_inf' + 'o_to_string(err, test))' '' ' def addFailure(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addFailure(self, t' + 'est, err)' ' self.debugIDE.testResultAddFailure(test, self._exc_i' + 'nfo_to_string(err, test))' '' ' def addSuccess(self, test):' ' self.debugIDE.testResultAddSuccess(test)' ' __import__('#39'unittest'#39').TestResult.addSuccess(self, t' + 'est)' '' ' def __init__(self, locals = None):' ' code.InteractiveInterpreter.__init__(self, locals)' ' self.locals["__name__"] = "__main__"' '' ' self.debugger = self.IDEDebugger()' ' self.debugger.InitStepIn = False' ' self.debugger.tracecount = 0' ' self.debugger.currentframe = None' ' self.debugger.locals = self.locals' '' ' try:' ' pyrepr = __import__('#39'repr'#39').Repr()' ' except:' ' pyrepr = __import__('#39'reprlib'#39').Repr()' ' pyrepr.maxstring = 60' ' pyrepr.maxother = 60' ' self._repr = pyrepr.repr' '' ' self.commontypes = frozenset([' ' '#39'NoneType'#39',' ' '#39'NotImplementedType'#39',' ' '#39'bool'#39',' ' '#39'buffer'#39',' ' '#39'builtin_function_or_method'#39',' ' '#39'code'#39',' ' '#39'complex'#39',' ' '#39'dict'#39',' ' '#39'dictproxy'#39',' ' '#39'ellipsis'#39',' ' '#39'file'#39',' ' '#39'float'#39',' ' '#39'frame'#39',' ' '#39'function'#39',' ' '#39'generator'#39',' ' '#39'getset_descriptor'#39',' ' '#39'instancemethod'#39',' ' '#39'int'#39',' ' '#39'list'#39',' ' '#39'long'#39',' ' '#39'member_descriptor'#39',' ' '#39'method-wrapper'#39',' ' '#39'object'#39',' ' '#39'slice'#39',' ' '#39'str'#39',' ' '#39'traceback'#39',' ' '#39'tuple'#39',' ' '#39'unicode'#39',' ' '#39'xrange'#39'])' '' ' def _import(self, name, code):' ' import imp' ' import sys' ' mod = imp.new_module(name)' ' mod.__file__ = code.co_filename' '' ' try:' ' exec(code, mod.__dict__)' ' sys.modules[name] = mod' ' return mod' ' except SystemExit:' ' pass' '' ' def run_nodebug(self, cmd, globals=None, locals=None):' ' import types' ' import sys' '' ' if globals is None:' ' globals = self.locals' '' ' self.saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' try:' ' try:' ' exec(cmd, globals, locals)' ' except SystemExit as e:' ' if isinstance(e.code, str):' ' print(e.code)' ' elif isinstance(e.code, int):' ' print("Exit code: ", e.code)' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = self.saveStdio' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' '' ' def objecttype(self, ob):' ' try:' ' try:' ' return ob.__class__.__name__' ' except:' ' return type(ob).__name__' ' except:' ' return "Unknown type"' '' ' def objectinfo(self, ob):' ' res = 1' ' try:' ' import inspect' ' if hasattr(ob, "__dict__") and isinstance(ob.__dict_' + '_, dict):' ' res = res | 2' ' if inspect.ismodule(ob):' ' res = res | 4' ' elif inspect.ismethod(ob):' ' res = res | 8' ' elif inspect.isfunction(ob) or inspect.isbuiltin(ob)' + ':' ' res = res | 16' ' elif inspect.isclass(ob):' ' res = res | 32' ' elif isinstance(ob, dict):' ' res = res | 64' ' return res' ' except:' ' return res' '' ' def saferepr(self, x):' ' try:' ' return self._repr(x)' ' except:' ' return '#39'<unprintable %s object>'#39' % type(x).__name__' '' ' def membercount(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' # dictitems will be True when used in the Variables win' + 'dow' ' # expandcommontypes will be False when used in the Vari' + 'ables window' ' try:' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return len(ob)' ' elif dictitems and isinstance(ob, dict):' ' return len(ob)' ' elif not expandcommontypes and (self.objecttype(ob) ' + 'in self.commontypes):' ' return 0' ' else:' ' return len(dir(ob))' ' except:' ' return 0' '' ' def _getmembers(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' result = {}' ' for i in range(len(ob)):' ' result[str(i)] = ob[i]' ' elif dictitems and isinstance(ob, dict):' ' result = {}' ' for (i,j) in ob.items():' ' result[self.safestr(i)] = j' ' elif not expandcommontypes and (self.objecttype(ob) in s' + 'elf.commontypes):' ' result = {}' ' else:' ' result = {}' ' for i in dir(ob):' ' try :' ' result[self.safestr(i)] = getattr(ob, i)' ' except:' ' result[self.safestr(i)] = None' ' return result' '' ' def safegetmembers(self, ob, dictitems = False, expandcommon' + 'types = True, sequenceitems = False):' ' try:' ' return self._getmembers(ob, dictitems, expandcommont' + 'ypes, sequenceitems)' ' except:' ' return {}' '' ' def safegetmembersfullinfo(self, ob, dictitems = False, expa' + 'ndcommontypes = True, sequenceitems = False):' ' try:' ' members = self._getmembers(ob, dictitems, expandcomm' + 'ontypes, sequenceitems)' ' d = {}' ' for (i,j) in members.items():' ' d[i] = (j, self.objecttype(j), self.objectinfo(j' + '))' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return tuple(sorted(d.items(), key = lambda r: i' + 'nt(r[0])))' ' else:' ' return tuple(d.items())' ' except:' ' return ()' '' ' def safestr(self, value):' ' try:' ' return str(value)' ' except:' ' return self.saferepr(value)' '' ' def find_dotted_module(self, name, path=None):' ' import imp' ' segs = name.split('#39'.'#39')' ' file = None' ' while segs:' ' if file: file.close()' ' file, filename, desc = imp.find_module(segs[0], path' + ')' ' del segs[0]' ' path = [filename]' ' return file, filename, desc' '' '' ' def findModuleOrPackage(self, modName, path=None):' ' if path is None:' ' import sys' ' path = sys.path' ' try:' ' f, filename, (ext, mode, type) = self.find_dotted_m' + 'odule(modName, path)' ' except ImportError as err:' ' return None' '' ' if f is not None:' ' f.close()' ' if filename:' ' import imp, os' ' if type == imp.PKG_DIRECTORY:' ' return os.path.join(filename, '#39'__init__.py'#39')' ' elif type in (imp.PY_SOURCE, imp.C_EXTENSION):' ' return filename' '' ' def getmodules(self, path=None):' ' import sys' ' try:' ' import pkgutil' ' l = [i[1] for i in pkgutil.iter_modules(path)]' ' except:' ' l = []' ' if path is None:' ' l.extend(sys.builtin_module_names)' ' return l' '' ' def runcode(self, code):' ' import sys' ' self.saveStdio = (sys.stdin, sys.stdout, sys.stderr)' ' try:' ' if self.debugger.currentframe:' ' exec(code, self.debugger.currentframe.f_globals,' + ' self.debugger.currentframe.f_locals)' ' # save locals' ' try:' ' import ctypes' ' ctypes.pythonapi.PyFrame_LocalsToFast(ctypes' + '.py_object(self.debugger.currentframe), 0)' ' except :' ' pass' ' else:' ' exec(code, self.locals)' ' except SystemExit as e:' ' if isinstance(e.code, str):' ' print(e.code)' ' elif isinstance(e.code, int):' ' print("Exit code: ", e.code)' ' except:' ' self.showtraceback()' ' sys.stdin, sys.stdout, sys.stderr = self.saveStdio' '' ' def evalcode(self, code):' ' # may raise exceptions' ' try:' ' if self.debugger.currentframe:' ' return eval(code, self.debugger.currentframe.f_g' + 'lobals, self.debugger.currentframe.f_locals)' ' else:' ' return eval(code, self.locals)' ' except SystemExit:' ' return None' '' ' def _find_constructor(self, class_ob):' ' # Given a class object, return a function object used fo' + 'r the' ' # constructor (ie, __init__() ) or None if we can'#39't find' + ' one. (from IDLE)' ' try:' ' return class_ob.__init__.__func__' ' except AttributeError:' ' for base in class_ob.__bases__:' ' rc = self._find_constructor(base)' ' if rc is not None: return rc' ' return None' '' ' def get_arg_text(self, ob):' ' "Get a string describing the arguments for the given obj' + 'ect - From IDLE"' ' import types' ' from inspect import isclass, isfunction, getfullargspec,' + ' formatargspec, getdoc' ' argText = ""' ' if ob is not None:' ' argOffset = 0' ' if isclass(ob):' ' # Look for the highest __init__ in the class cha' + 'in.' ' fob = self._find_constructor(ob)' ' if fob is None:' ' fob = lambda: None' ' else:' ' argOffset = 1' ' elif type(ob)==types.MethodType:' ' # bit of a hack for methods - turn it into a fun' + 'ction' ' # but we drop the "self" param.' ' fob = ob.__func__' ' argOffset = 1' ' else:' ' fob = ob' ' # Try and build one for Python defined functions' ' if isfunction(fob):' ' try:' ' args, varargs, varkw, defaults, kwonlyargs, ' + 'kwonlydefaults, ann = getfullargspec(fob)' ' argText = formatargspec(args[argOffset:], va' + 'rargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann)[1:-1]' ' #argText = "%s(%s)" % (fob.func_name, argTex' + 't)' ' except:' ' pass' ' return (argText, getdoc(fob))' '' ' def Win32RawInput(self, prompt=None):' ' "Provide raw_input() for gui apps"' ' # flush stderr/out first.' ' debugIDE = __import__("DebugIDE")' ' import sys' ' try:' ' sys.stdout.flush()' ' sys.stderr.flush()' ' except:' ' pass' ' if prompt is None: prompt = ""' ' ret = debugIDE.InputBox('#39'Python input'#39', str(prompt),"")' ' if ret is None:' ' raise KeyboardInterrupt("Operation cancelled")' ' return ret' '' ' def setupdisplayhook(self):' ' if pyscripter.IDEOptions.PrettyPrintOutput:' ' import sys, pprint, builtins' ' def pphook(value, show=pprint.pprint, bltin=builtins' + '):' ' if value is not None:' ' bltin._ = value' ' show(value)' ' sys.displayhook = pphook' '' '_II = PythonInteractiveInterpreter(globals())' '' 'sys.modules['#39'builtins'#39'].input=_II.Win32RawInput' '' 'import os' 'try:' ' sys.path.remove(os.path.dirname(sys.executable))' ' sys.path.remove(os.path.dirname(sys.executable))' 'except:' ' pass' 'sys.path.insert(0, "")' '' 'import warnings' 'warnings.simplefilter("ignore", DeprecationWarning)' '' 'del DebugOutput' 'del code' 'del PythonInteractiveInterpreter' 'del sys' 'del os' 'del warnings') end item Name = 'RpyC_Init' Strings.Strings = ( 'import sys' 'import code' 'import threading' '' '__import__('#39'bdb'#39').__traceable__ = 0' '__import__('#39'rpyc'#39').core.netref.__traceable__ = 0' '__import__('#39'rpyc'#39').core.protocol.__traceable__ = 0' '__import__('#39'rpyc'#39').core.stream.__traceable__ = 0' '__import__('#39'rpyc'#39').core.brine.__traceable__ = 0' '__import__('#39'rpyc'#39').core.channel.__traceable__ = 0' '__import__('#39'rpyc'#39').core.vinegar.__traceable__ = 0' '__import__('#39'rpyc'#39').core.service.__traceable__ = 0' '__import__('#39'rpyc'#39').utils.classic.__traceable__ = 0' '__import__('#39'rpyc'#39').utils.server.__traceable__ = 0' 'threading.__traceable__ = 0' '' 'class RemotePythonInterpreter(code.InteractiveInterpreter):' ' class DebugManager:' ' # Debugger commands' ' dcNone, dcRun, dcStepInto, dcStepOver, dcStepOut, dcRunT' + 'oCursor, dcPause, dcAbort = range(8)' ' debug_command = dcNone' '' ' _threading = threading' ' # IDE synchronization lock' ' user_lock = threading.Lock()' '' ' # Thread status' ' thrdRunning, thrdBroken, thrdFinished = range(3)' ' main_thread_id = threading.currentThread().ident' '' ' # module for communication with the IDE' ' debugIDE = None #will be set to P4D module' '' ' # shared debugger breakpoints' ' breakpoints = {}' '' ' # main debugger will be set below' ' main_debugger = None' '' ' #active debugger objects' ' active_thread = active_frame = None' '' ' #sleep function' ' import time' ' _sleep = time.sleep' '' ' @classmethod' ' def thread_status(cls, ident, name, status):' ' with cls.user_lock:' ' cls.debugIDE.user_thread(ident, name, status)' '' ' class ThreadWrapper(threading.Thread):' ' """ Wrapper class for threading.Thread. """' ' def _Thread__bootstrap(self):' ' self._set_ident()' ' self.debug_manager.thread_status(self.ident, self.na' + 'me, self.debug_manager.thrdRunning)' '' ' self.debugger = self.debug_manager.main_debugger.__c' + 'lass__()' ' self.debugger.reset()' ' self.debugger._sys.settrace(self.debugger.trace_disp' + 'atch)' '' ' try:' ' self._Thread__bootstrap_inner()' ' finally:' ' self.debugger._sys.settrace(None)' ' self.debug_manager.thread_status(self.ident, sel' + 'f.name, self.debug_manager.thrdFinished)' ' self.debugger = None' ' ThreadWrapper.debug_manager = DebugManager' '' ' class IDEDebugger(__import__('#39'bdb'#39').Bdb):' ' def __init__(self):' ' __import__('#39'bdb'#39').Bdb.__init__(self)' ' self.locals = globals()' ' self.breaks = self.debug_manager.breakpoints' ' self.InitStepIn = False' ' self.tracecount = 0' ' self._sys = __import__("sys")' '' ' def showtraceback(self):' ' """Display the exception that just occurred.' ' We remove the first two stack items because it is ou' + 'r own code.' ' """' ' import sys, traceback' ' try:' ' type, value, tb = sys.exc_info()' ' sys.last_type = type' ' sys.last_value = value' ' sys.last_traceback = tb' ' tblist = traceback.extract_tb(tb)' ' del tblist[:2]' ' lines = traceback.format_list(tblist)' ' if lines:' ' lines.insert(0, "Traceback (most recent call' + ' last):\n")' ' lines.extend(traceback.format_exception_only(typ' + 'e, value))' ' finally:' ' tblist = tb = None' ' sys.stderr.write('#39#39'.join(lines))' '' ' def do_clear(self, arg):' ' numberlist = arg.split()' ' for i in numberlist:' ' self.clear_bpbynumber(i)' '' ' def isTraceable(self, frame):' ' return frame.f_globals.get('#39'__traceable__'#39', 1)' '' ' def stop_here(self, frame):' ' if not self.InitStepIn:' ' self.InitStepIn = True' ' self.set_continue()' ' return 0' ' return __import__('#39'bdb'#39').Bdb.stop_here(self, frame)' '' ' def canonic(self, filename):' ' if type(filename) is unicode:' ' filename = filename.encode("mbcs")' ' return __import__('#39'bdb'#39').Bdb.canonic(self, filename)' '' ' def user_line(self, frame):' ' try:' ' self._sys.stdout.print_queue.join()' ' except:' ' pass' '' ' dbg_manager = self.debug_manager' ' thread_id = dbg_manager._threading.currentThread().i' + 'dent' '' ' with dbg_manager.user_lock:' ' if not dbg_manager.debugIDE.user_line(thread_id,' + ' frame, self.botframe):' ' self.set_return(frame)' ' return' '' ' dbg_manager.debug_command = dbg_manager.dcNone' ' conn = object.__getattribute__(dbg_manager.debugIDE,' + ' "____conn__")()' '' ' while (((thread_id != dbg_manager.active_thread) or' ' (dbg_manager.debug_command == dbg_manager.dc' + 'None)) and' ' (dbg_manager.debug_command != dbg_manager.dc' + 'Run)):' ' with dbg_manager.user_lock:' ' conn.poll_all(0.01)' ' if thread_id != dbg_manager.active_thread:' ' dbg_manager._sleep(0.1)' '' ' if dbg_manager.debug_command == dbg_manager.dcRun:' ' self.set_continue()' ' elif dbg_manager.debug_command == dbg_manager.dcStep' + 'Into:' ' self.set_step()' ' elif dbg_manager.debug_command == dbg_manager.dcStep' + 'Over:' ' self.set_next(frame)' ' elif dbg_manager.debug_command == dbg_manager.dcStep' + 'Out:' ' self.set_return(frame)' ' elif dbg_manager.debug_command == dbg_manager.dcRunT' + 'oCursor:' ' self.set_continue()' ' elif dbg_manager.debug_command == dbg_manager.dcPaus' + 'e:' ' self.set_step()' ' elif dbg_manager.debug_command == dbg_manager.dcAbor' + 't:' ' self.set_quit()' '' ' if dbg_manager.debug_command != dbg_manager.dcRun:' ' dbg_manager.debug_command = dbg_manager.dcNone' ' dbg_manager.thread_status(thread_id, "", dbg_manager' + '.thrdRunning)' '' ' def user_call(self, frame, arg):' ' self.tracecount += 1' ' #yield processing every 1000 calls' ' if (self.tracecount > 1000) and not (hasattr(self._s' + 'ys.stdout, "writing") and self._sys.stdout.writing):' ' self.tracecount = 0' ' with self.debug_manager.user_lock:' ' cmd = self.debug_manager.debugIDE.user_yield' + '()' ' if cmd == self.debug_manager.dcAbort:' ' self.set_quit()' ' elif cmd == self.debug_manager.dcPause:' ' self.set_step()' '' ' def dispatch_call(self, frame, arg):' ' res = __import__('#39'bdb'#39').Bdb.dispatch_call(self, fram' + 'e, arg)' ' if res:' ' if self.isTraceable(frame) == 0:' ' return' ' return res' '' ' def run(self, cmd, globals=None, locals=None):' ' import bdb' ' import types' ' import sys' ' import threading' '' ' if globals is None:' ' globals = self.locals' '' ' saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' old_thread_class = threading.Thread' ' threading.Thread = self.thread_wrapper' '' ' self.exc_info = None' ' try:' ' try:' ' bdb.Bdb.run(self, cmd, globals, locals)' ' except SystemExit, e:' ' if isinstance(e.code, basestring):' ' print e.code' ' elif isinstance(e.code, int):' ' print "Exit code: ", e.code' ' except:' ' self.showtraceback()' ' exc_info = sys.exc_info()' ' if hasattr(exc_info[0], "__name__"):' ' name = exc_info[0].__name__' ' elif type(exc_info[0]) == str:' ' name = exc_info[0]' ' else:' ' name = ""' ' self.exc_info = (name, exc_info[1], exc_info' + '[2])' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = saveStdio' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' ' threading.Thread = old_thread_class' ' sys.stdout.print_queue.join()' ' IDEDebugger.debug_manager = DebugManager' ' IDEDebugger.thread_wrapper = ThreadWrapper' ' DebugManager.main_debugger = IDEDebugger()' '' ' class IDETestResult(__import__('#39'unittest'#39').TestResult):' '' ' def startTest(self, test):' ' __import__('#39'unittest'#39').TestResult.startTest(self, te' + 'st)' ' self.debug_manager.debugIDE.testResultStartTest(test' + ')' '' ' def stopTest(self, test):' ' __import__('#39'unittest'#39').TestResult.stopTest(self, tes' + 't)' ' self.debug_manager.debugIDE.testResultStopTest(test)' '' ' def addError(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addError(self, tes' + 't, err)' ' self.debug_manager.debugIDE.testResultAddError(test,' + ' self._exc_info_to_string(err, test))' '' ' def addFailure(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addFailure(self, t' + 'est, err)' ' self.debug_manager.debugIDE.testResultAddFailure(tes' + 't, self._exc_info_to_string(err, test))' '' ' def addSuccess(self, test):' ' self.debug_manager.debugIDE.testResultAddSuccess(tes' + 't)' ' __import__('#39'unittest'#39').TestResult.addSuccess(self, t' + 'est)' ' IDETestResult.debug_manager = DebugManager' '' ' def __init__(self, locals = None):' ' code.InteractiveInterpreter.__init__(self, locals)' ' self.locals["__name__"] = "__main__"' ' self.inspect = __import__("inspect")' ' self.exc_info = None' '' ' import repr' ' pyrepr = repr.Repr()' ' pyrepr.maxstring = 60' ' pyrepr.maxother = 60' ' self._repr = pyrepr.repr' '' ' self.commontypes = frozenset([' ' '#39'NoneType'#39',' ' '#39'NotImplementedType'#39',' ' '#39'bool'#39',' ' '#39'buffer'#39',' ' '#39'builtin_function_or_method'#39',' ' '#39'code'#39',' ' '#39'complex'#39',' ' '#39'dict'#39',' ' '#39'dictproxy'#39',' ' '#39'ellipsis'#39',' ' '#39'file'#39',' ' '#39'float'#39',' ' '#39'frame'#39',' ' '#39'function'#39',' ' '#39'generator'#39',' ' '#39'getset_descriptor'#39',' ' '#39'instancemethod'#39',' ' '#39'int'#39',' ' '#39'list'#39',' ' '#39'long'#39',' ' '#39'member_descriptor'#39',' ' '#39'method-wrapper'#39',' ' '#39'object'#39',' ' '#39'slice'#39',' ' '#39'str'#39',' ' '#39'traceback'#39',' ' '#39'tuple'#39',' ' '#39'unicode'#39',' ' '#39'xrange'#39'])' '' '' ' def saferepr(self, ob):' ' try:' ' return self._repr(ob)' ' except:' ' return '#39'<unprintable %s object>'#39' % type(ob).__name__' '' ' def membercount(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' # dictitems will be True when used in the Variables win' + 'dow' ' # expandcommontypes will be False when used in the Vari' + 'ables window' ' try:' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return len(ob)' ' elif dictitems and isinstance(ob, dict):' ' return len(ob)' ' elif not expandcommontypes and (self.objecttype(ob) ' + 'in self.commontypes):' ' return 0' ' else:' ' return len(dir(ob))' ' except:' ' return 0' '' ' def _getmembers(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' result = {}' ' for i in range(len(ob)):' ' result[str(i)] = ob[i]' ' elif dictitems and isinstance(ob, dict):' ' result = {}' ' for (i,j) in ob.items():' ' result[self.safestr(i)] = j' ' elif not expandcommontypes and (self.objecttype(ob) in s' + 'elf.commontypes):' ' result = {}' ' else:' ' result = {}' ' for i in dir(ob):' ' try :' ' result[self.safestr(i)] = getattr(ob, i)' ' except:' ' result[self.safestr(i)] = None' ' return result' '' ' def safegetmembers(self, ob, dictitems = False, expandcommon' + 'types = True, sequenceitems = False):' ' try:' ' return self._getmembers(ob, dictitems, expandcommont' + 'ypes, sequenceitems)' ' except:' ' return {}' '' ' def safegetmembersfullinfo(self, ob, dictitems = False, expa' + 'ndcommontypes = True, sequenceitems = False):' ' try:' ' members = self._getmembers(ob, dictitems, expandcomm' + 'ontypes, sequenceitems)' ' d = {}' ' for (i,j) in members.items():' ' d[i] = (j, self.objecttype(j), self.objectinfo(j' + '))' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return tuple(sorted(d.items(), key = lambda r: i' + 'nt(r[0])))' ' else:' ' return tuple(d.items())' ' except:' ' return ()' '' ' def safestr(self, value):' ' try:' ' return str(value)' ' except:' ' return self.saferepr(value)' '' ' def find_dotted_module(self, name, path=None):' ' import imp' ' segs = name.split('#39'.'#39')' ' file = None' ' while segs:' ' if file: file.close()' ' file, filename, desc = imp.find_module(segs[0], path' + ')' ' del segs[0]' ' path = [filename]' ' return file, filename, desc' '' ' def findModuleOrPackage(self, modName, path=None):' ' if path is None:' ' import sys' ' path = sys.path' ' try:' ' f, filename, (ext, mode, type) = self.find_dotted_m' + 'odule(modName, path)' ' except ImportError, err:' ' return None' '' ' if f is not None:' ' f.close()' ' if filename:' ' import imp, os' ' if type == imp.PKG_DIRECTORY:' ' return os.path.join(filename, '#39'__init__.py'#39')' ' elif type in (imp.PY_SOURCE, imp.C_EXTENSION):' ' return filename' '' ' def getmodules(self, path=None):' ' import sys' ' try:' ' import pkgutil' ' l = [i[1] for i in pkgutil.iter_modules(path)]' ' except:' ' l = []' ' if path is None:' ' l.extend(sys.builtin_module_names)' ' return tuple(l)' '' ' def showsyntaxerror(self, filename=None):' ' import sys, code' ' old_excepthook = sys.excepthook' ' sys.excepthook = sys.__excepthook__' ' try:' ' code.InteractiveInterpreter.showsyntaxerror(self, fi' + 'lename)' ' finally:' ' sys.excepthook = old_excepthook' ' sys.stdout.print_queue.join()' '' ' def runsource(self, source, filename="<input>", symbol="sing' + 'le"):' ' import sys, code' ' saveStdio = (sys.stdin, sys.stdout, sys.stderr)' ' try:' ' return code.InteractiveInterpreter.runsource(self, s' + 'ource, filename, symbol)' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = saveStdio' ' sys.stdout.print_queue.join()' '' ' def runcode(self, code):' ' import sys' ' def softspace(file, newvalue):' ' oldvalue = 0' ' try:' ' oldvalue = file.softspace' ' except AttributeError:' ' pass' ' try:' ' file.softspace = newvalue' ' except (AttributeError, TypeError):' ' # "attribute-less object" or "read-only attribut' + 'es"' ' pass' ' return oldvalue' ' try:' ' if self.DebugManager.active_frame:' ' exec code in self.DebugManager.active_frame.f_gl' + 'obals, self.DebugManager.active_frame.f_locals' ' # save locals' ' try:' ' import ctypes' ' ctypes.pythonapi.PyFrame_LocalsToFast(ctypes' + '.py_object(self.DebugManager.active_frame), 0)' ' except :' ' pass' ' else:' ' exec code in self.locals' ' except SystemExit, e:' ' if isinstance(e.code, basestring):' ' print e.code' ' elif isinstance(e.code, int):' ' print "Exit code: ", e.code' ' except:' ' self.showtraceback()' ' else:' ' import sys' ' if softspace(sys.stdout, 0):' ' print' '' ' def evalcode(self, code):' ' # may raise exceptions' ' try:' ' if self.DebugManager.active_frame:' ' return eval(code, self.DebugManager.active_frame' + '.f_globals, self.DebugManager.active_frame.f_locals)' ' else:' ' return eval(code, self.locals)' ' except SystemExit:' ' return None' '' ' def _find_constructor(self, class_ob):' ' # Given a class object, return a function object used fo' + 'r the' ' # constructor (ie, __init__() ) or None if we can'#39't find' + ' one. (from IDLE)' ' try:' ' return class_ob.__init__.im_func' ' except AttributeError:' ' for base in class_ob.__bases__:' ' rc = self._find_constructor(base)' ' if rc is not None: return rc' ' return None' '' ' def get_arg_text(self, ob):' ' "Get a string describing the arguments for the given obj' + 'ect - From IDLE"' ' import types' ' from inspect import isclass, isfunction, getargspec, for' + 'matargspec, getdoc' ' argText = ""' ' if ob is not None:' ' argOffset = 0' ' if isclass(ob):' ' # Look for the highest __init__ in the class cha' + 'in.' ' fob = self._find_constructor(ob)' ' if fob is None:' ' fob = lambda: None' ' else:' ' argOffset = 1' ' elif type(ob)==types.MethodType:' ' # bit of a hack for methods - turn it into a fun' + 'ction' ' # but we drop the "self" param.' ' fob = ob.im_func' ' argOffset = 1' ' else:' ' fob = ob' ' # Try and build one for Python defined functions' ' if isfunction(fob):' ' try:' ' args, varargs, varkw, defaults = getargspec(' + 'fob)' ' argText = formatargspec(args[argOffset:], va' + 'rargs, varkw, defaults)[1:-1]' ' #argText = "%s(%s)" % (fob.func_name, argTex' + 't)' ' except:' ' pass' ' return (argText, getdoc(fob))' '' ' def rem_compile(self, source, fname):' ' import sys' ' self.exc_info = None' ' try:' ' return compile(source, fname, "exec")' ' except (OverflowError, SyntaxError, ValueError), e:' ' print' ' self.showsyntaxerror(fname)' ' exc_info = sys.exc_info()' ' self.exc_info = (exc_info[0].__name__, exc_info[1], ' + 'exc_info[2], issubclass(exc_info[0], SyntaxError))' '' ' def rem_import(self, name, code):' ' import imp' ' import sys' ' mod = imp.new_module(name)' ' mod.__file__ = code.co_filename' '' ' self.exc_info = None' ' try:' ' exec code in mod.__dict__' ' sys.modules[name] = mod' ' return mod' ' except SystemExit:' ' pass' ' except:' ' self.showtraceback()' ' exc_info = sys.exc_info()' ' if hasattr(exc_info[0], "__name__"):' ' name = exc_info[0].__name__' ' elif type(exc_info[0]) == str:' ' name = exc_info[0]' ' else:' ' name = ""' ' self.exc_info = (name, exc_info[1], exc_info[2])' '' ' def run_nodebug(self, cmd, globals=None, locals=None):' ' import types' ' import sys' '' ' if globals is None:' ' globals = self.locals' '' ' saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' self.exc_info = None' ' try:' ' try:' ' exec cmd in globals, locals' ' except SystemExit, e:' ' if isinstance(e.code, basestring):' ' print e.code' ' elif isinstance(e.code, int):' ' print "Exit code: ", e.code' ' except:' ' self.showtraceback()' ' exc_info = sys.exc_info()' ' if hasattr(exc_info[0], "__name__"):' ' name = exc_info[0].__name__' ' elif type(exc_info[0]) == str:' ' name = exc_info[0]' ' else:' ' name = ""' ' self.exc_info = (name, exc_info[1], exc_info[2])' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = saveStdio' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' ' sys.stdout.print_queue.join()' '' ' def objecttype(self, ob):' ' try:' ' try:' ' return ob.__class__.__name__' ' except:' ' return type(ob).__name__' ' except:' ' return "Unknown type"' '' ' def objectinfo(self, ob):' ' res = 1' ' try:' ' inspect = self.inspect' ' if hasattr(ob, "__dict__") and isinstance(ob.__dict_' + '_, dict):' ' res = res | 2' ' if inspect.ismodule(ob):' ' res = res | 4' ' elif inspect.ismethod(ob):' ' res = res | 8' ' elif inspect.isfunction(ob) or inspect.isbuiltin(ob)' + ':' ' res = res | 16' ' elif inspect.isclass(ob):' ' res = res | 32' ' elif isinstance(ob, dict):' ' res = res | 64' ' return res' ' except:' ' return res' '' ' def rem_chdir(self, path):' ' import os' ' try:' ' os.chdir(path)' ' except:' ' pass' '' ' def rem_getcwdu(self):' ' import os' ' try:' ' return os.getcwdu()' ' except:' ' return '#39#39 '' ' class AsyncStream(object):' ' softspace=0' ' encoding=None' ' def __init__(self, stream):' ' import Queue' ' import time' ' self._stream = stream' ' self.writing = False' ' self.print_queue = Queue.Queue()' ' self._sleep = time.sleep' '' ' import threading' ' print_thread = threading.Thread(target = self.proces' + 's_print_queue)' ' print_thread.daemon = True' ' print_thread.start()' '' '## def __getattr__(self, attr):' '## return getattr(self._stream, attr)' '' ' def flush(self):' ' self.print_queue.join()' '' ' def readline(self, size=None):' ' try:' ' self.print_queue.join()' ' return self._stream.readline(size)' ' except KeyboardInterrupt:' ' raise KeyboardInterrupt, "Operation Cancelled"' '' ' def write(self, message):' ' self.print_queue.put(message)' '' ' def process_print_queue(self):' ' def rem_write(l):' ' self.writing = True' ' self._stream.write("".join(l))' ' self.writing = False' ' del l[:]' '' ' while True:' ' self._sleep(0.01)' ' l = [self.print_queue.get()]' ' while not self.print_queue.empty():' ' if len(l) > 10000:' ' rem_write(l)' ' l.append(self.print_queue.get())' ' self.print_queue.task_done()' ' rem_write(l)' ' # matches the first get so that join waits for w' + 'riting to finesh' ' self.print_queue.task_done()' '' ' def asyncIO(self):' ' import sys' ' sys.stdin = sys.stderr = sys.stdout = self.AsyncStream(s' + 'ys.stdout)' '' ' def setupdisplayhook(self):' ' import sys, pprint, __builtin__' ' def pphook(value, show=pprint.pprint, bltin=__builtin__)' + ':' ' if value is not None:' ' bltin._ = value' ' show(value)' ' sys.displayhook = pphook' '' ' def Win32RawInput(self, prompt=None):' ' "Provide raw_input() for gui apps"' ' # flush stderr/out first.' ' import sys' ' try:' ' sys.stdout.flush()' ' sys.stderr.flush()' ' except:' ' pass' ' if prompt is None: prompt = ""' ' with self.DebugManager.user_lock:' ' ret = self.DebugManager.debugIDE.InputBox(u'#39'Python i' + 'nput'#39', unicode(prompt),u"")' ' if ret is None:' ' raise KeyboardInterrupt, "Operation cancelled"' ' return ret' '' ' def Win32Input(self, prompt=None):' ' "Provide input() for gui apps"' ' return eval(raw_input(prompt))' '' '_RPI = RemotePythonInterpreter(globals())' '' 'sys.modules['#39'__builtin__'#39'].raw_input = _RPI.Win32RawInput' 'sys.modules['#39'__builtin__'#39'].input = _RPI.Win32Input' '' 'import os' 'try:' ' sys.path.remove(os.path.dirname(sys.argv[0]))' 'except:' ' pass' 'sys.path.insert(0, "")' '' 'del code' 'del RemotePythonInterpreter' 'del sys' 'del os' 'del threading') end item Name = 'RpyC_Init3000' Strings.Strings = ( 'import sys' 'import code' 'import threading' '#import logging' '' '##logging.basicConfig(level=logging.DEBUG,' '## filename = "c:/users/kiriakos/desktop/test' + '.log",' '## filemode = "a",' '## format='#39'(%(threadName)-10s) %(message)s'#39')' '' '__import__('#39'bdb'#39').__traceable__ = 0' '__import__('#39'rpyc'#39').core.netref.__traceable__ = 0' '__import__('#39'rpyc'#39').core.protocol.__traceable__ = 0' '__import__('#39'rpyc'#39').core.stream.__traceable__ = 0' '__import__('#39'rpyc'#39').core.brine.__traceable__ = 0' '__import__('#39'rpyc'#39').core.channel.__traceable__ = 0' '__import__('#39'rpyc'#39').core.vinegar.__traceable__ = 0' '__import__('#39'rpyc'#39').core.service.__traceable__ = 0' '__import__('#39'rpyc'#39').utils.classic.__traceable__ = 0' '__import__('#39'rpyc'#39').utils.server.__traceable__ = 0' 'threading.__traceable__ = 0' '' 'class RemotePythonInterpreter(code.InteractiveInterpreter):' ' class DebugManager:' ' # Debugger commands' ' dcNone, dcRun, dcStepInto, dcStepOver, dcStepOut, dcRunT' + 'oCursor, dcPause, dcAbort = range(8)' ' debug_command = dcNone' '' ' _threading = threading' ' # IDE synchronization lock' ' user_lock = threading.Lock()' '' ' # Thread status' ' thrdRunning, thrdBroken, thrdFinished = range(3)' ' main_thread_id = threading.current_thread().ident' '' ' # module for communication with the IDE' ' debugIDE = None #will be set to P4D module' '' ' # shared debugger breakpoints' ' breakpoints = {}' '' ' # main debugger will be set below' ' main_debugger = None' '' ' #active debugger objects' ' active_thread = active_frame = None' '' ' #sleep function' ' import time' ' _sleep = time.sleep' '' ' @classmethod' ' def thread_status(cls, ident, name, status):' ' with cls.user_lock:' ' cls.debugIDE.user_thread(ident, name, status)' '' ' class ThreadWrapper(threading.Thread):' ' """ Wrapper class for threading.Thread. """' ' def _bootstrap(self):' ' self._set_ident()' ' self.debug_manager.thread_status(self.ident, self.na' + 'me, self.debug_manager.thrdRunning)' '' ' self.debugger = self.debug_manager.main_debugger.__c' + 'lass__()' ' self.debugger.reset()' ' self.debugger._sys.settrace(self.debugger.trace_disp' + 'atch)' '' ' try:' ' self._bootstrap_inner()' ' finally:' ' self.debugger._sys.settrace(None)' ' self.debug_manager.thread_status(self.ident, sel' + 'f.name, self.debug_manager.thrdFinished)' ' self.debugger = None' ' ThreadWrapper.debug_manager = DebugManager' '' ' class IDEDebugger(__import__('#39'bdb'#39').Bdb):' ' def __init__(self):' ' super().__init__()' ' self.locals = globals()' ' self.breaks = self.debug_manager.breakpoints' ' self.InitStepIn = False' ' self.tracecount = 0' ' self._sys = __import__("sys")' '' ' def showtraceback(self):' ' """Display the exception that just occurred.' ' We remove the first two stack items because it is ou' + 'r own code.' ' """' ' import sys, traceback' ' try:' ' type, value, tb = sys.exc_info()' ' sys.last_type = type' ' sys.last_value = value' ' sys.last_traceback = tb' ' tblist = traceback.extract_tb(tb)' ' del tblist[:2]' ' lines = traceback.format_list(tblist)' ' if lines:' ' lines.insert(0, "Traceback (most recent call' + ' last):\n")' ' lines.extend(traceback.format_exception_only(typ' + 'e, value))' ' finally:' ' tblist = tb = None' ' sys.stderr.write('#39#39'.join(lines))' '' ' def do_clear(self, arg):' ' numberlist = arg.split()' ' for i in numberlist:' ' self.clear_bpbynumber(i)' '' ' def isTraceable(self, frame):' ' return frame.f_globals.get('#39'__traceable__'#39', 1)' '' ' def stop_here(self, frame):' ' if not self.InitStepIn:' ' self.InitStepIn = True' ' self.set_continue()' ' return 0' ' return super().stop_here(frame)' '' ' def user_line(self, frame):' ' try:' ' self._sys.stdout.print_queue.join()' ' except:' ' pass' '' ' dbg_manager = self.debug_manager' ' thread_id = dbg_manager._threading.current_thread().' + 'ident' '' ' with dbg_manager.user_lock:' ' if not dbg_manager.debugIDE.user_line(thread_id,' + ' frame, self.botframe):' ' self.set_return(frame)' ' return' '' ' dbg_manager.debug_command = dbg_manager.dcNone' ' conn = object.__getattribute__(dbg_manager.debugIDE,' + ' "____conn__")()' '' ' while (((thread_id != dbg_manager.active_thread) or' ' (dbg_manager.debug_command == dbg_manager.dc' + 'None)) and' ' (dbg_manager.debug_command != dbg_manager.dc' + 'Run)):' ' with dbg_manager.user_lock:' ' conn.poll_all(0.01)' ' if thread_id != dbg_manager.active_thread:' ' dbg_manager._sleep(0.1)' '' ' if dbg_manager.debug_command == dbg_manager.dcRun:' ' self.set_continue()' ' elif dbg_manager.debug_command == dbg_manager.dcStep' + 'Into:' ' self.set_step()' ' elif dbg_manager.debug_command == dbg_manager.dcStep' + 'Over:' ' self.set_next(frame)' ' elif dbg_manager.debug_command == dbg_manager.dcStep' + 'Out:' ' self.set_return(frame)' ' elif dbg_manager.debug_command == dbg_manager.dcRunT' + 'oCursor:' ' self.set_continue()' ' elif dbg_manager.debug_command == dbg_manager.dcPaus' + 'e:' ' self.set_step()' ' elif dbg_manager.debug_command == dbg_manager.dcAbor' + 't:' ' self.set_quit()' '' ' if dbg_manager.debug_command != dbg_manager.dcRun:' ' dbg_manager.debug_command = dbg_manager.dcNone' ' dbg_manager.thread_status(thread_id, "", dbg_manager' + '.thrdRunning)' '' ' def user_call(self, frame, arg):' ' self.tracecount += 1' ' #yield processing every 1000 calls' ' if (self.tracecount > 1000) and not (hasattr(self._s' + 'ys.stdout, "writing") and self._sys.stdout.writing):' ' self.tracecount = 0' ' with self.debug_manager.user_lock:' ' cmd = self.debug_manager.debugIDE.user_yield' + '()' ' if cmd == self.debug_manager.dcAbort:' ' self.set_quit()' ' elif cmd == self.debug_manager.dcPause:' ' self.set_step()' '' ' def dispatch_call(self, frame, arg):' ' res = super().dispatch_call(frame, arg)' ' if res:' ' if self.isTraceable(frame) == 0:' ' return' ' #logging.debug("dispatch_call " + frame.f_code.c' + 'o_filename + " " + frame.f_code.co_name)' ' return res' '' '## def trace_dispatch(self, frame, event, arg):' '## logging.debug(frame.f_code.co_filename + " " + eve' + 'nt+ " " + frame.f_code.co_name)' '## return super().trace_dispatch(frame, event, arg)' '' ' def run(self, cmd, globals=None, locals=None):' ' import bdb' ' import types' ' import sys' ' import threading' '' ' if globals is None:' ' globals = self.locals' '' ' saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' old_thread_class = threading.Thread' ' threading.Thread = self.thread_wrapper' '' ' self.exc_info = None' ' try:' ' try:' ' bdb.Bdb.run(self, cmd, globals, locals)' ' except SystemExit as e:' ' if isinstance(e.code, str):' ' print(e.code)' ' elif isinstance(e.code, int):' ' print("Exit code: ", e.code)' ' except:' ' self.showtraceback()' ' exc_info = sys.exc_info()' ' if hasattr(exc_info[0], "__name__"):' ' name = exc_info[0].__name__' ' elif type(exc_info[0]) == str:' ' name = exc_info[0]' ' else:' ' name = ""' ' self.exc_info = (name, exc_info[1], exc_info' + '[2])' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = saveStdio' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' ' threading.Thread = old_thread_class' ' sys.stdout.print_queue.join()' ' IDEDebugger.debug_manager = DebugManager' ' IDEDebugger.thread_wrapper = ThreadWrapper' ' DebugManager.main_debugger = IDEDebugger()' '' ' class IDETestResult(__import__('#39'unittest'#39').TestResult):' '' ' def startTest(self, test):' ' __import__('#39'unittest'#39').TestResult.startTest(self, te' + 'st)' ' self.debug_manager.debugIDE.testResultStartTest(test' + ')' '' ' def stopTest(self, test):' ' __import__('#39'unittest'#39').TestResult.stopTest(self, tes' + 't)' ' self.debug_manager.debugIDE.testResultStopTest(test)' '' ' def addError(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addError(self, tes' + 't, err)' ' self.debug_manager.debugIDE.testResultAddError(test,' + ' self._exc_info_to_string(err, test))' '' ' def addFailure(self, test, err):' ' __import__('#39'unittest'#39').TestResult.addFailure(self, t' + 'est, err)' ' self.debug_manager.debugIDE.testResultAddFailure(tes' + 't, self._exc_info_to_string(err, test))' '' ' def addSuccess(self, test):' ' self.debug_manager.debugIDE.testResultAddSuccess(tes' + 't)' ' __import__('#39'unittest'#39').TestResult.addSuccess(self, t' + 'est)' ' IDETestResult.debug_manager = DebugManager' '' ' def __init__(self, locals = None):' ' code.InteractiveInterpreter.__init__(self, locals)' ' self.locals["__name__"] = "__main__"' ' self.inspect = __import__("inspect")' ' self.exc_info = None' '' ' try:' ' pyrepr = __import__('#39'repr'#39').Repr()' ' except:' ' pyrepr = __import__('#39'reprlib'#39').Repr()' ' pyrepr.maxstring = 60' ' pyrepr.maxother = 60' ' self._repr = pyrepr.repr' '' ' self.commontypes = frozenset([' ' '#39'NoneType'#39',' ' '#39'NotImplementedType'#39',' ' '#39'bool'#39',' ' '#39'buffer'#39',' ' '#39'builtin_function_or_method'#39',' ' '#39'code'#39',' ' '#39'complex'#39',' ' '#39'dict'#39',' ' '#39'dictproxy'#39',' ' '#39'ellipsis'#39',' ' '#39'file'#39',' ' '#39'float'#39',' ' '#39'frame'#39',' ' '#39'function'#39',' ' '#39'generator'#39',' ' '#39'getset_descriptor'#39',' ' '#39'instancemethod'#39',' ' '#39'int'#39',' ' '#39'list'#39',' ' '#39'long'#39',' ' '#39'member_descriptor'#39',' ' '#39'method-wrapper'#39',' ' '#39'object'#39',' ' '#39'slice'#39',' ' '#39'str'#39',' ' '#39'traceback'#39',' ' '#39'tuple'#39',' ' '#39'unicode'#39',' ' '#39'xrange'#39'])' '' '' ' def saferepr(self, ob):' ' try:' ' return self._repr(ob)' ' except:' ' return '#39'<unprintable %s object>'#39' % type(ob).__name__' '' ' def membercount(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' # dictitems will be True when used in the Variables win' + 'dow' ' # expandcommontypes will be False when used in the Vari' + 'ables window' ' try:' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return len(ob)' ' elif dictitems and isinstance(ob, dict):' ' return len(ob)' ' elif not expandcommontypes and (self.objecttype(ob) ' + 'in self.commontypes):' ' return 0' ' else:' ' return len(dir(ob))' ' except:' ' return 0' '' ' def _getmembers(self, ob, dictitems = False, expandcommontyp' + 'es = True, sequenceitems = False):' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' result = {}' ' for i in range(len(ob)):' ' result[str(i)] = ob[i]' ' elif dictitems and isinstance(ob, dict):' ' result = {}' ' for (i,j) in ob.items():' ' result[self.safestr(i)] = j' ' elif not expandcommontypes and (self.objecttype(ob) in s' + 'elf.commontypes):' ' result = {}' ' else:' ' result = {}' ' for i in dir(ob):' ' try :' ' result[self.safestr(i)] = getattr(ob, i)' ' except:' ' result[self.safestr(i)] = None' ' return result' '' ' def safegetmembers(self, ob, dictitems = False, expandcommon' + 'types = True, sequenceitems = False):' ' try:' ' return self._getmembers(ob, dictitems, expandcommont' + 'ypes, sequenceitems)' ' except:' ' return {}' '' ' def safegetmembersfullinfo(self, ob, dictitems = False, expa' + 'ndcommontypes = True, sequenceitems = False):' ' try:' ' members = self._getmembers(ob, dictitems, expandcomm' + 'ontypes, sequenceitems)' ' d = {}' ' for (i,j) in members.items():' ' d[i] = (j, self.objecttype(j), self.objectinfo(j' + '))' ' if sequenceitems and isinstance(ob, (list, tuple)):' ' return tuple(sorted(d.items(), key = lambda r: i' + 'nt(r[0])))' ' else:' ' return tuple(d.items())' ' except:' ' return ()' '' ' def safestr(self, value):' ' try:' ' return str(value)' ' except:' ' return self.saferepr(value)' '' ' def find_dotted_module(self, name, path=None):' ' import imp' ' segs = name.split('#39'.'#39')' ' file = None' ' while segs:' ' if file: file.close()' ' file, filename, desc = imp.find_module(segs[0], path' + ')' ' del segs[0]' ' path = [filename]' ' return file, filename, desc' '' ' def findModuleOrPackage(self, modName, path=None):' ' if path is None:' ' import sys' ' path = sys.path' ' try:' ' f, filename, (ext, mode, type) = self.find_dotted_m' + 'odule(modName, path)' ' except ImportError as err:' ' return None' '' ' if f is not None:' ' f.close()' ' if filename:' ' import imp, os' ' if type == imp.PKG_DIRECTORY:' ' return os.path.join(filename, '#39'__init__.py'#39')' ' elif type in (imp.PY_SOURCE, imp.C_EXTENSION):' ' return filename' '' ' def getmodules(self, path=None):' ' import sys' ' try:' ' import pkgutil' ' l = [i[1] for i in pkgutil.iter_modules(path)]' ' except:' ' l = []' ' if path is None:' ' l.extend(sys.builtin_module_names)' ' return tuple(l)' '' ' def showsyntaxerror(self, filename=None):' ' import sys, code' ' old_excepthook = sys.excepthook' ' sys.excepthook = sys.__excepthook__' ' try:' ' super().showsyntaxerror(filename)' ' finally:' ' sys.excepthook = old_excepthook' ' sys.stdout.print_queue.join()' '' '' ' def runsource(self, source, filename="<input>", symbol="sing' + 'le"):' ' import sys' ' saveStdio = (sys.stdin, sys.stdout, sys.stderr)' ' try:' ' return super().runsource(source, filename, symbol)' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = saveStdio' ' sys.stdout.print_queue.join()' '' ' def runcode(self, code):' ' import sys' '' ' try:' ' if self.DebugManager.active_frame:' ' exec(code, self.DebugManager.active_frame.f_glob' + 'als, self.DebugManager.active_frame.f_locals)' ' # save locals' ' try:' ' import ctypes' ' ctypes.pythonapi.PyFrame_LocalsToFast(ctypes' + '.py_object(self.DebugManager.active_frame), 0)' ' except :' ' pass' ' else:' ' exec(code, self.locals)' ' except SystemExit as e:' ' if isinstance(e.code, str):' ' print(e.code)' ' elif isinstance(e.code, int):' ' print("Exit code: ", e.code)' ' except:' ' self.showtraceback()' '' ' def evalcode(self, code):' ' # may raise exceptions' ' try:' ' if self.DebugManager.active_frame:' ' return eval(code, self.DebugManager.active_frame' + '.f_globals, self.DebugManager.active_frame.f_locals)' ' else:' ' return eval(code, self.locals)' ' except SystemExit:' ' return None' '' ' def _find_constructor(self, class_ob):' ' # Given a class object, return a function object used fo' + 'r the' ' # constructor (ie, __init__() ) or None if we can'#39't find' + ' one. (from IDLE)' ' try:' ' return class_ob.__init__.__func__' ' except AttributeError:' ' for base in class_ob.__bases__:' ' rc = self._find_constructor(base)' ' if rc is not None: return rc' ' return None' '' ' def get_arg_text(self, ob):' ' "Get a string describing the arguments for the given obj' + 'ect - From IDLE"' ' import types' ' from inspect import isclass, isfunction, getfullargspec,' + ' formatargspec, getdoc' ' argText = ""' ' if ob is not None:' ' argOffset = 0' ' if isclass(ob):' ' # Look for the highest __init__ in the class cha' + 'in.' ' fob = self._find_constructor(ob)' ' if fob is None:' ' fob = lambda: None' ' else:' ' argOffset = 1' ' elif type(ob)==types.MethodType:' ' # bit of a hack for methods - turn it into a fun' + 'ction' ' # but we drop the "self" param.' ' fob = ob.__func__' ' argOffset = 1' ' else:' ' fob = ob' ' # Try and build one for Python defined functions' ' if isfunction(fob):' ' try:' ' args, varargs, varkw, defaults, kwonlyargs, ' + 'kwonlydefaults, ann = getfullargspec(fob)' ' argText = formatargspec(args[argOffset:], va' + 'rargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann)[1:-1]' ' #argText = "%s(%s)" % (fob.func_name, argTex' + 't)' ' except:' ' pass' ' return (argText, getdoc(fob))' '' ' def rem_compile(self, source, fname):' ' import sys' ' self.exc_info = None' ' try:' ' return compile(source, fname, "exec")' ' except (OverflowError, SyntaxError, ValueError) as e:' ' print()' ' self.showsyntaxerror(fname)' ' exc_info = sys.exc_info()' ' self.exc_info = (exc_info[0].__name__, exc_info[1], ' + 'exc_info[2], issubclass(exc_info[0], SyntaxError))' '' ' def rem_import(self, name, code):' ' import imp' ' import sys' ' mod = imp.new_module(name)' ' mod.__file__ = code.co_filename' '' ' self.exc_info = None' ' try:' ' exec(code, mod.__dict__)' ' sys.modules[name] = mod' ' return mod' ' except SystemExit:' ' pass' ' except:' ' self.showtraceback()' ' exc_info = sys.exc_info()' ' if hasattr(exc_info[0], "__name__"):' ' name = exc_info[0].__name__' ' elif type(exc_info[0]) == str:' ' name = exc_info[0]' ' else:' ' name = ""' ' self.exc_info = (name, exc_info[1], exc_info[2])' '' ' def run_nodebug(self, cmd, globals=None, locals=None):' ' import types' ' import sys' '' ' if globals is None:' ' globals = self.locals' '' ' saveStdio = (sys.stdin, sys.stdout, sys.stderr)' '' ' if locals is None:' ' locals = globals' '' ' globals["__name__"] = '#39'__main__'#39 ' if isinstance(cmd, types.CodeType):' ' globals["__file__"] = cmd.co_filename' ' else:' ' cmd = cmd+'#39'\n'#39 '' ' self.exc_info = None' ' try:' ' try:' ' exec(cmd, globals, locals)' ' except SystemExit as e:' ' if isinstance(e.code, str):' ' print(e.code)' ' elif isinstance(e.code, int):' ' print("Exit code: ", e.code)' ' except:' ' self.showtraceback()' ' exc_info = sys.exc_info()' ' if hasattr(exc_info[0], "__name__"):' ' name = exc_info[0].__name__' ' elif type(exc_info[0]) == str:' ' name = exc_info[0]' ' else:' ' name = ""' ' self.exc_info = (name, exc_info[1], exc_info[2])' ' finally:' ' sys.stdin, sys.stdout, sys.stderr = saveStdio' ' if '#39'__file__'#39' in globals:' ' del globals['#39'__file__'#39']' ' __import__("gc").collect()' ' sys.stdout.print_queue.join()' '' ' def objecttype(self, ob):' ' try:' ' try:' ' return ob.__class__.__name__' ' except:' ' return type(ob).__name__' ' except:' ' return "Unknown type"' '' ' def objectinfo(self, ob):' ' res = 1' ' try:' ' inspect = self.inspect' ' if hasattr(ob, "__dict__") and isinstance(ob.__dict_' + '_, dict):' ' res = res | 2' ' if inspect.ismodule(ob):' ' res = res | 4' ' elif inspect.ismethod(ob):' ' res = res | 8' ' elif inspect.isfunction(ob) or inspect.isbuiltin(ob)' + ':' ' res = res | 16' ' elif inspect.isclass(ob):' ' res = res | 32' ' elif isinstance(ob, dict):' ' res = res | 64' ' return res' ' except:' ' return res' '' ' def rem_chdir(self, path):' ' import os' ' try:' ' os.chdir(path)' ' except:' ' pass' '' ' def rem_getcwdu(self):' ' import os' ' try:' ' return os.getcwd()' ' except:' ' return '#39#39 '' ' class AsyncStream(object):' ' #softspace=0' ' encoding=None' ' def __init__(self, stream):' ' import queue' ' import time' ' self._stream = stream' ' self.writing = False' ' self.print_queue = queue.Queue()' ' self._sleep = time.sleep' '' ' import threading' ' print_thread = threading.Thread(target = self.proces' + 's_print_queue)' ' print_thread.daemon = True' ' print_thread.start()' '' '## def __getattr__(self, attr):' '## return getattr(self._stream, attr)' '' ' def flush(self):' ' self.print_queue.join()' '' ' def readline(self, size=None):' ' try:' ' self.print_queue.join()' ' return self._stream.readline(size)' ' except KeyboardInterrupt:' ' raise KeyboardInterrupt("Operation Cancelled")' '' ' def write(self, message):' ' self.print_queue.put(message)' '' ' def process_print_queue(self):' ' def rem_write(l):' ' self.writing = True' ' self._stream.write("".join(l))' ' self.writing = False' ' del l[:]' '' ' while True:' ' self._sleep(0.01)' ' l = [self.print_queue.get()]' ' while not self.print_queue.empty():' ' if len(l) > 10000:' ' rem_write(l)' ' l.append(self.print_queue.get())' ' self.print_queue.task_done()' ' rem_write(l)' ' # matches the first get so that join waits for w' + 'riting to finesh' ' self.print_queue.task_done()' '' ' def asyncIO(self):' ' import sys' ' sys.stdin = sys.stderr = sys.stdout = self.AsyncStream(s' + 'ys.stdout)' '' ' def setupdisplayhook(self):' ' import sys, pprint, builtins' ' def pphook(value, show=pprint.pprint, bltin=builtins):' ' if value is not None:' ' bltin._ = value' ' show(value)' ' sys.displayhook = pphook' '' ' def Win32RawInput(self, prompt=None):' ' "Provide raw_input() for gui apps"' ' # flush stderr/out first.' ' import sys' ' try:' ' sys.stdout.flush()' ' sys.stderr.flush()' ' except:' ' pass' ' if prompt is None: prompt = ""' ' with self.DebugManager.user_lock:' ' ret = self.DebugManager.debugIDE.InputBox('#39'Python in' + 'put'#39', str(prompt), "")' ' if ret is None:' ' raise KeyboardInterrupt("Operation cancelled")' ' return ret' '' '_RPI = RemotePythonInterpreter(globals())' '' 'import os' 'try:' ' sys.path.remove(os.path.dirname(sys.argv[0]))' 'except:' ' pass' 'sys.path.insert(0, "")' '' 'sys.modules['#39'builtins'#39'].input=_RPI.Win32RawInput' 'del code' 'del RemotePythonInterpreter' 'del sys' 'del os' 'del threading') end item Name = 'SimpleServer' Strings.Strings = ( 'import sys' 'if len(sys.argv) > 2:' ' sys.path.insert(0, sys.argv[2])' '' 'from rpyc.utils.server import Server' 'from rpyc.utils.classic import DEFAULT_SERVER_PORT' 'from rpyc.core import SlaveService' 'import threading' '' '__traceable__ = 0' '' 'class SimpleServer(Server):' ' def _accept_method(self, sock):' ' self._serve_client(sock, None)' '' 'class ModSlaveService(SlaveService):' ' __slots__ = []' '' ' def on_connect(self):' ' import imp' ' from rpyc.core.service import ModuleNamespace' '' ' sys.modules["__oldmain__"] = sys.modules["__main__"]' ' sys.modules["__main__"] = imp.new_module("__main__")' ' self.exposed_namespace = sys.modules["__main__"].__dict_' + '_' '' ' self._conn._config.update(dict(' ' allow_all_attrs = True,' ' allow_pickle = True,' ' allow_getattr = True,' ' allow_setattr = True,' ' allow_delattr = True,' ' import_custom_exceptions = True,' ' instantiate_custom_exceptions = True,' ' instantiate_oldstyle_exceptions = True,' ' ))' ' # shortcuts' ' self._conn.modules = ModuleNamespace(self._conn.root.get' + 'module)' ' self._conn.eval = self._conn.root.eval' ' self._conn.execute = self._conn.root.execute' ' self._conn.namespace = self._conn.root.namespace' ' if sys.version_info[0] > 2:' ' self._conn.builtin = self._conn.modules.builtins' ' else:' ' self._conn.builtin = self._conn.modules.__builtin__' '' 'def main():' ' import warnings' ' warnings.simplefilter("ignore", DeprecationWarning)' '' ' try:' ' port = int(sys.argv[1])' ' except:' ' port = DEFAULT_SERVER_PORT' '' ' t = SimpleServer(ModSlaveService, port = port, auto_register' + ' = False)' ' t.start()' '' 'if __name__ == "__main__":' ' main()') end item Name = 'TkServer' Strings.Strings = ( 'import sys' 'if len(sys.argv) > 2:' ' sys.path.insert(0, sys.argv[2])' '' 'import Tkinter' 'import threading' 'import gc' '' 'from rpyc.utils.server import Server' 'from rpyc.utils.classic import DEFAULT_SERVER_PORT' 'from rpyc.core import SlaveService' '' '__traceable__ = 0' '' 'class SimpleServer(Server):' ' def _accept_method(self, sock):' ' from rpyc.core import SocketStream, Channel, Connection' ' config = dict(self.protocol_config, credentials = None)' ' self.conn = Connection(self.service, Channel(SocketStrea' + 'm(sock)),' ' config = config, _lazy = True)' ' self.conn._init_service()' '' 'class ModSlaveService(SlaveService):' ' __slots__ = []' '' ' def on_connect(self):' ' import imp' ' from rpyc.core.service import ModuleNamespace' '' ' sys.modules["__oldmain__"] = sys.modules["__main__"]' ' sys.modules["__main__"] = imp.new_module("__main__")' ' self.exposed_namespace = sys.modules["__main__"].__dict_' + '_' '' ' self._conn._config.update(dict(' ' allow_all_attrs = True,' ' allow_pickle = True,' ' allow_getattr = True,' ' allow_setattr = True,' ' allow_delattr = True,' ' import_custom_exceptions = True,' ' instantiate_custom_exceptions = True,' ' instantiate_oldstyle_exceptions = True,' ' ))' ' # shortcuts' ' self._conn.modules = ModuleNamespace(self._conn.root.get' + 'module)' ' self._conn.eval = self._conn.root.eval' ' self._conn.execute = self._conn.root.execute' ' self._conn.namespace = self._conn.root.namespace' ' if sys.version_info[0] > 2:' ' self._conn.builtin = self._conn.modules.builtins' ' else:' ' self._conn.builtin = self._conn.modules.__builtin__' '' 'running = False' '' 'class GuiPart:' ' def __init__(self, master):' ' self.processing = False' '' ' def processIncoming(self, conn):' ' """' ' Handle messages currently in the queue (if any).' ' """' ' if self.processing:' ' return' ' else:' ' self.processing = True' ' try:' ' conn.poll_all()' ' except EOFError:' ' global running' ' running = False' '' ' self.processing = False' '' 'class GuiServer:' ' def __init__(self, master):' ' self.master = master' '' ' import warnings' ' warnings.simplefilter("ignore", DeprecationWarning)' '' ' try:' ' port = int(sys.argv[1])' ' except:' ' port = DEFAULT_SERVER_PORT' '' ' self._server = SimpleServer(ModSlaveService, port = port' + ', auto_register = False)' '## self._server.start()' ' self._server.listener.listen(self._server.backlog)' ' self._server.active = True' ' self._server.listener.settimeout(0.5)' ' self._server.accept()' '' ' # Set up the GUI part' ' self.gui = GuiPart(master)' '' ' global running' ' running = True' ' # Start the periodic call in the GUI to check if the que' + 'ue contains' ' # anything' ' self.periodicCall()' '' ' def periodicCall(self):' ' """' ' Check every 100 ms if there is something new in the queu' + 'e.' ' """' ' global running' ' if not running:' ' import sys' ' self._server.conn.close()' ' self._server.close()' ' gc.collect()' ' sys.exit(1)' ' else:' ' if not self.gui.processing:' ' self.gui.processIncoming(self._server.conn)' '' ' self.master.after(1, self.periodicCall)' '' 'def hijack_tk():' ' """Modifies Tkinter'#39's mainloop with a dummy so when a module' + ' calls' ' mainloop, it does not block.' '' ' """' ' def misc_mainloop(self, n=0):' ' pass' ' def Tkinter_mainloop(n=0):' ' pass' ' def dummy_exit(arg=0):' ' pass' ' def dummy_quit(self):' ' if self.master:' ' self.master.destroy()' ' else:' ' self.destroy()' '' ' Tkinter.oldmainloop = Tkinter.mainloop' ' Tkinter.Misc.oldmainloop = Tkinter.Misc.mainloop' ' Tkinter.Misc.mainloop = misc_mainloop' ' Tkinter.mainloop = Tkinter_mainloop' ' Tkinter.Misc.oldquit = Tkinter.Misc.quit' ' Tkinter.Misc.quit = dummy_quit' ' import sys' ' sys.exit = dummy_exit' '' 'def main():' ' root = Tkinter.Tk()' ' server = GuiServer(root)' ' root.withdraw()' ' hijack_tk()' ' root.oldmainloop()' '' 'if __name__ == "__main__":' ' main()') end item Name = 'WxServer' Strings.Strings = ( 'import sys' 'if len(sys.argv) > 2:' ' sys.path.insert(0, sys.argv[2])' '' 'import wx' 'import threading' 'import gc' '' '__traceable__ = 0' 'running = False' '' 'from rpyc.utils.server import Server' 'from rpyc.utils.classic import DEFAULT_SERVER_PORT' 'from rpyc.core import SlaveService' '' '__traceable__ = 0' '' 'class SimpleServer(Server):' ' def _accept_method(self, sock):' ' from rpyc.core import SocketStream, Channel, Connection' ' config = dict(self.protocol_config, credentials = None)' ' self.conn = Connection(self.service, Channel(SocketStrea' + 'm(sock)),' ' config = config, _lazy = True)' ' self.conn._init_service()' '' 'class ModSlaveService(SlaveService):' ' __slots__ = []' '' ' def on_connect(self):' ' import imp' ' from rpyc.core.service import ModuleNamespace' '' ' sys.modules["__oldmain__"] = sys.modules["__main__"]' ' sys.modules["__main__"] = imp.new_module("__main__")' ' self.exposed_namespace = sys.modules["__main__"].__dict_' + '_' '' ' self._conn._config.update(dict(' ' allow_all_attrs = True,' ' allow_pickle = True,' ' allow_getattr = True,' ' allow_setattr = True,' ' allow_delattr = True,' ' import_custom_exceptions = True,' ' instantiate_custom_exceptions = True,' ' instantiate_oldstyle_exceptions = True,' ' ))' ' # shortcuts' ' self._conn.modules = ModuleNamespace(self._conn.root.get' + 'module)' ' self._conn.eval = self._conn.root.eval' ' self._conn.execute = self._conn.root.execute' ' self._conn.namespace = self._conn.root.namespace' ' if sys.version_info[0] > 2:' ' self._conn.builtin = self._conn.modules.builtins' ' else:' ' self._conn.builtin = self._conn.modules.__builtin__' '' 'class GuiPart:' ' def __init__(self, master):' ' self.processing = False' ' self.connected = False' ' self.conn = None' '' ' def connect(self):' ' import warnings' ' warnings.simplefilter("ignore", DeprecationWarning)' '' ' try:' ' port = int(sys.argv[1])' ' except:' ' port = DEFAULT_SERVER_PORT' '' ' self._server = SimpleServer(ModSlaveService, port = port' + ', auto_register = False)' '## self._server.start()' ' self._server.listener.listen(self._server.backlog)' ' self._server.active = True' ' self._server.listener.settimeout(0.5)' ' self._server.accept()' '' ' self.conn = self._server.conn' ' self.connected = True' ' self.processIncoming()' '' ' def processIncoming(self):' ' """' ' Handle messages currently in the queue (if any).' ' """' ' global running' ' if self.processing:' ' return' ' else:' ' self.processing = True' ' try:' ' self.conn.poll_all()' ' except EOFError:' ' running = False' '' ' self.processing = False' '' 'class GuiServer:' ' def __init__(self, master):' '' ' global running' '' ' self.master = master' '' ' # Set up the GUI part' ' self.gui = GuiPart(master)' '' ' running = True' ' # Start the periodic call in the GUI to check if the que' + 'ue contains' ' # anything' ' wx.CallAfter(self.setupPeriodicCall)' '' ' def setupPeriodicCall(self):' ' self.calllater = wx.CallLater(1, self.periodicCall)' '' ' def periodicCall(self):' ' """' ' Check every 1 ms if there is something new in the queue.' ' """' ' global running' ' if not running:' ' import sys' ' self.gui.conn.close()' ' gc.collect()' ' sys.exit(1)' ' if not self.gui.connected:' ' self.gui.connect()' ' elif not self.gui.processing:' ' self.gui.processIncoming()' '' ' self.calllater.Restart()' '' 'def hijack_wx():' ' """Modifies wx mainloop with a dummy so when a module calls' ' mainloop, it does not block.' '' ' """' ' def MainLoop(self):' ' pass' '' ' def RedirectStdio(self, filename=None):' ' pass' '' ' def RestoreStdio(self):' ' pass' '' ' def dummy_exit(arg=0):' ' pass' '' ' wx.PyApp.OldMainLoop = wx.PyApp.MainLoop' ' wx.PyApp.MainLoop = MainLoop' ' wx.App.OldRedirectStdio = wx.App.RedirectStdio' ' wx.App.RedirectStdio = RedirectStdio' ' wx.App.OldRestoreStdio = wx.App.RestoreStdio' ' wx.App.RestoreStdio = RestoreStdio' ' import sys' ' sys.exit = dummy_exit' '' 'def main():' ' app = wx.App()' ' frame = wx.Frame(None, title='#39'PyScripter Debug Server'#39')' ' app.SetTopWindow(frame)' ' #frame.Show()' ' hijack_wx()' ' server = GuiServer(app)' ' app.OldMainLoop(app)' '' 'if __name__ == "__main__":' ' main()') end> Left = 343 Top = 176 end object dlgFileOpen: TOpenDialog Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing] Left = 20 Top = 16 end object dlgFileSave: TSaveDialog Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofEnableSizing] Left = 20 Top = 68 end object SynWebHtmlSyn: TSynWebHtmlSyn Options.HtmlVersion = shvHtml5 Options.UseEngineOptions = True ActiveHighlighterSwitch = False Engine = SynWebEngine Left = 432 Top = 272 end object SynWebXmlSyn: TSynWebXmlSyn ActiveHighlighterSwitch = False Engine = SynWebEngine Left = 436 Top = 328 end object SynWebCssSyn: TSynWebCssSyn Options.HtmlVersion = shvHtml401Transitional ActiveHighlighterSwitch = False Engine = SynWebEngine Left = 528 Top = 324 end object SynCppSyn: TSynCppSyn Options.AutoDetectEnabled = False Options.AutoDetectLineLimit = 0 Options.Visible = False Left = 344 Top = 272 end object SynWebEngine: TSynWebEngine Options.HtmlVersion = shvHtml5 Left = 616 Top = 324 end object actlMain: TActionList Images = Images Left = 21 Top = 125 object actFileSave: TAction Category = 'File' Caption = '&Save' Enabled = False HelpContext = 310 Hint = 'Save|Save active file' ImageIndex = 4 ShortCut = 16467 OnExecute = actFileSaveExecute end object actFileSaveAs: TAction Category = 'File' Caption = 'Save &As...' Enabled = False HelpContext = 310 Hint = 'Save As|Save active file under different name' OnExecute = actFileSaveAsExecute end object actFileClose: TAction Category = 'File' Caption = '&Close' Enabled = False HelpContext = 310 Hint = 'Close|Close active file' ImageIndex = 149 ShortCut = 16499 OnExecute = actFileCloseExecute end object actEditCut: TEditCut Category = 'Edit' Caption = 'Cu&t' Enabled = False HelpContext = 320 HelpType = htContext Hint = 'Cut|Cuts the selection and puts it on the Clipboard' ImageIndex = 11 ShortCut = 16472 end object actEditCopy: TEditCopy Category = 'Edit' Caption = '&Copy' Enabled = False HelpContext = 320 HelpType = htContext Hint = 'Copy|Copies the selection and puts it on the Clipboard' ImageIndex = 12 ShortCut = 16451 end object actEditPaste: TEditPaste Category = 'Edit' Caption = '&Paste' HelpContext = 320 HelpType = htContext Hint = 'Paste|Inserts Clipboard contents' ImageIndex = 13 ShortCut = 16470 end object actEditDelete: TEditDelete Category = 'Edit' Caption = 'De&lete' Enabled = False HelpContext = 320 HelpType = htContext Hint = 'Delete|Delete selection' ImageIndex = 14 end object actEditUndo: TEditUndo Category = 'Edit' Caption = '&Undo' Enabled = False HelpContext = 320 HelpType = htContext Hint = 'Undo|Reverts the last action' ImageIndex = 9 ShortCut = 16474 end object actEditRedo: TAction Category = 'Edit' Caption = '&Redo' Enabled = False HelpContext = 320 Hint = 'Redo| Redo last action' ImageIndex = 10 ShortCut = 24666 OnExecute = actEditRedoExecute end object actEditSelectAll: TEditSelectAll Category = 'Edit' Caption = 'Select &All' HelpContext = 320 HelpType = htContext Hint = 'Select All|Selects the entire document' ShortCut = 16449 end object actSearchFind: TAction Category = 'Search' Caption = '&Find...' Enabled = False HelpContext = 330 Hint = 'Search|Search for a string' ImageIndex = 15 ShortCut = 16454 OnExecute = actSearchFindExecute end object actSearchFindNext: TAction Category = 'Search' Caption = 'Find &Next' Enabled = False HelpContext = 330 Hint = 'Find next|Find next match' ImageIndex = 16 ShortCut = 114 OnExecute = actSearchFindNextExecute end object actSearchFindPrev: TAction Category = 'Search' Caption = 'Find &Previous' Enabled = False HelpContext = 330 Hint = 'Find previous|Find Previous match' ImageIndex = 121 ShortCut = 8306 OnExecute = actSearchFindPrevExecute end object actSearchReplace: TAction Category = 'Search' Caption = '&Replace...' Enabled = False HelpContext = 330 Hint = 'Replace|Search & Replace' ImageIndex = 17 ShortCut = 16456 OnExecute = actSearchReplaceExecute end object actFileSaveAll: TAction Category = 'File' Caption = 'Save &All' HelpContext = 310 Hint = 'Save all|Save project and all open files' ImageIndex = 5 OnExecute = actFileSaveAllExecute end object actFilePrint: TAction Category = 'File' Caption = '&Print...' Enabled = False HelpContext = 310 Hint = 'Print|Print active file' ImageIndex = 8 ShortCut = 16464 OnExecute = actFilePrintExecute end object actPrinterSetup: TAction Category = 'File' Caption = 'Printer Set&up...' HelpContext = 310 Hint = 'Printer setup' ImageIndex = 6 OnExecute = actPrinterSetupExecute end object actPrintPreview: TAction Category = 'File' Caption = 'Print Pre&view' HelpContext = 310 Hint = 'Print preview' ImageIndex = 7 OnExecute = actPrintPreviewExecute end object actPageSetup: TAction Category = 'File' Caption = 'Pa&ge Setup...' HelpContext = 310 Hint = 'Page setup' ImageIndex = 78 OnExecute = actPageSetupExecute end object actEditorOptions: TAction Category = 'Options' Caption = '&Editor Options...' HelpContext = 620 Hint = 'Set Editor Options' ImageIndex = 22 OnExecute = actEditorOptionsExecute end object actIDEOptions: TAction Category = 'Options' Caption = '&IDE Options...' HelpContext = 610 Hint = 'Set IDE Options' ImageIndex = 24 OnExecute = actIDEOptionsExecute end object actEditIndent: TAction Category = 'Source Code' Caption = '&Indent Block' HelpContext = 320 Hint = 'Indent block|Indent selected block of code' ImageIndex = 69 ShortCut = 24649 OnExecute = actEditIndentExecute end object actEditDedent: TAction Category = 'Source Code' Caption = '&Unindent Block' HelpContext = 320 Hint = 'Unindent|Unindent selected block of code' ImageIndex = 70 ShortCut = 24661 OnExecute = actEditDedentExecute end object actEditCommentOut: TAction Category = 'Source Code' Caption = '&Comment out' HelpContext = 320 Hint = 'Comment out| Comment out block of code' ImageIndex = 73 ShortCut = 49342 OnExecute = actEditCommentOutExecute end object actEditUncomment: TAction Category = 'Source Code' Caption = '&Uncomment' HelpContext = 320 Hint = 'Uncomment| Uncomment block of code' ImageIndex = 74 ShortCut = 49340 OnExecute = actEditUncommentExecute end object actSearchMatchingBrace: TAction Category = 'Search' Caption = '&Matching Brace' HelpContext = 330 Hint = 'Find Matching Brace' ShortCut = 16605 OnExecute = actSearchMatchingBraceExecute end object actEditTabify: TAction Category = 'Source Code' Caption = '&Tabify' HelpContext = 320 Hint = 'Tabify|Convert spaces to tabs' ShortCut = 32990 OnExecute = actEditTabifyExecute end object actEditUntabify: TAction Category = 'Source Code' Caption = 'U&ntabify' HelpContext = 320 Hint = 'Untabify|Convert tabs to spaces' ShortCut = 41182 OnExecute = actEditUntabifyExecute end object actPythonPath: TAction Category = 'Tools' Caption = 'Python &Path...' HelpContext = 870 Hint = 'Python Path|View or edit the Python path' ImageIndex = 25 OnExecute = actPythonPathExecute end object actHelpContents: THelpContents Category = 'Help' Caption = '&Contents' Enabled = False HelpContext = 370 HelpType = htContext Hint = 'Help Contents' ImageIndex = 71 OnExecute = actHelpContentsExecute end object actPythonManuals: THelpContents Category = 'Help' Caption = '&Python Manuals' HelpContext = 370 HelpType = htContext Hint = 'Show Python Manuals' ImageIndex = 77 OnExecute = actPythonManualsExecute end object actAbout: TAction Category = 'Help' Caption = 'About...' HelpContext = 370 Hint = 'About|Info about the application' ImageIndex = 30 OnExecute = actAboutExecute end object actSearchGoToLine: TAction Category = 'Search' Caption = 'Go To &Line...' HelpContext = 330 Hint = 'Go to line number' ImageIndex = 32 ShortCut = 32839 OnExecute = actSearchGoToLineExecute end object actSearchGoToSyntaxError: TAction Category = 'Search' Caption = 'Go To Syntax &Error' HelpContext = 330 Hint = 'Jump to the position of the first syntax error' ImageIndex = 123 ShortCut = 24645 OnExecute = actSearchGoToSyntaxErrorExecute end object actFindInFiles: TAction Category = 'Search' Caption = '&Find in Files...' HelpContext = 330 Hint = 'Search in Files|Search for a string in Files' ImageIndex = 86 ShortCut = 24646 OnExecute = actFindInFilesExecute end object actParameterCompletion: TAction Category = 'Parameters' Caption = 'Insert &parameter' HelpContext = 720 Hint = 'Insert parameter to the edited file' ShortCut = 24656 OnExecute = actParameterCompletionExecute end object actModifierCompletion: TAction Category = 'Parameters' Caption = 'Insert &modifier' HelpContext = 720 Hint = 'Insert parameter to the edited file' ShortCut = 24653 OnExecute = actModifierCompletionExecute end object actReplaceParameters: TAction Category = 'Parameters' Caption = '&Replace parameters' HelpContext = 720 Hint = 'Replace parameters with their values' ShortCut = 24658 OnExecute = actReplaceParametersExecute end object actHelpParameters: TAction Category = 'Help' Caption = '&Parameters' HelpContext = 370 Hint = 'Help on custom parameters' OnExecute = actHelpParametersExecute end object actInsertTemplate: TAction Category = 'Edit' Caption = 'Insert &Template' HelpContext = 320 Hint = 'Insert a Code Template' ShortCut = 16458 OnExecute = actInsertTemplateExecute end object actCustomizeParameters: TAction Category = 'Parameters' Caption = 'Custom &Parameters...' HelpContext = 720 Hint = 'Add/Remove custom parameters' OnExecute = actCustomizeParametersExecute end object actIDEShortcuts: TAction Category = 'Options' Caption = 'IDE &Shortcuts...' HelpContext = 615 Hint = 'Customize IDE shortcuts' ImageIndex = 102 OnExecute = actIDEShortcutsExecute end object actCodeTemplates: TAction Category = 'Options' Caption = '&Code Templates...' HelpContext = 540 Hint = 'Add/Remove code templates' OnExecute = actCodeTemplatesExecute end object actConfigureTools: TAction Category = 'Tools' Caption = 'Configure &Tools...' HelpContext = 710 Hint = 'Configure Tools|Add/remove/edit command-line tools' ImageIndex = 83 OnExecute = actConfigureToolsExecute end object actHelpExternalTools: TAction Category = 'Help' Caption = 'External &Tools' HelpContext = 370 Hint = 'Help on External Tools' OnExecute = actHelpExternalToolsExecute end object actFindFunction: TAction Category = 'Search' Caption = 'Find F&unction...' HelpContext = 330 Hint = 'Find Function|Find function from function list' ImageIndex = 26 ShortCut = 16455 OnExecute = actFindFunctionExecute end object actEditLineNumbers: TAction Category = 'Edit' Caption = 'Line &Numbers' HelpContext = 320 Hint = 'Show/Hide line numbers' ImageIndex = 43 OnExecute = actEditLineNumbersExecute end object actEditShowSpecialChars: TAction Category = 'Edit' Caption = 'Special &Characters' HelpContext = 320 Hint = 'Show/Hide special characters' ImageIndex = 95 OnExecute = actEditShowSpecialCharsExecute end object actFindPreviousReference: TAction Tag = 1 Category = 'Search' Caption = 'Find Previous Reference' HelpContext = 330 Hint = 'Find previous identifier reference' ShortCut = 49190 OnExecute = actFindNextReferenceExecute end object actFindNextReference: TAction Category = 'Search' Caption = 'Find Next Reference' HelpContext = 330 Hint = 'Find next identifier reference' ShortCut = 49192 OnExecute = actFindNextReferenceExecute end object actEditLBDos: TAction Category = 'Edit' Caption = '&DOS/Windows' Checked = True HelpContext = 320 Hint = 'DOS/Windows|Convert to DOS line break' OnExecute = actEditLBExecute end object actEditLBUnix: TAction Tag = 1 Category = 'Edit' Caption = '&UNIX' HelpContext = 320 Hint = 'UNIX|Convert to UNIX line break' OnExecute = actEditLBExecute end object actEditLBMac: TAction Tag = 2 Category = 'Edit' Caption = '&Mac' HelpContext = 320 Hint = 'Mac|Convert to Mac line break' OnExecute = actEditLBExecute end object actEditAnsi: TAction Category = 'Edit' Caption = 'ANSI' Checked = True HelpContext = 320 Hint = 'Use ANSI encoding' OnExecute = actEditFileEncodingExecute end object actHelpEditorShortcuts: TAction Category = 'Help' Caption = 'Editor &Shortcuts' HelpContext = 370 Hint = 'Help on editor shortcuts' OnExecute = actHelpEditorShortcutsExecute end object actCheckForUpdates: TAction Category = 'Tools' Caption = 'Check For &Updates' HelpContext = 350 Hint = 'Check whether a newer version of PyScripter is available' OnExecute = actCheckForUpdatesExecute end object actUnitTestWizard: TAction Category = 'Tools' Caption = '&Unit Test Wizard...' HelpContext = 930 Hint = 'Unit test wizard|Create unit test for active module' ImageIndex = 103 OnExecute = actUnitTestWizardExecute end object actInterpreterEditorOptions: TAction Category = 'Options' Caption = '&Interpreter Editor Options...' HelpContext = 620 Hint = 'Set Interpreter Editor Options' ImageIndex = 22 OnExecute = actInterpreterEditorOptionsExecute end object actEditToggleComment: TAction Category = 'Source Code' Caption = 'Toggle &Comment' HelpContext = 320 Hint = 'Toggle Comment| Comment/Uncomment block of code' ImageIndex = 73 ShortCut = 16606 OnExecute = actEditToggleCommentExecute end object actFileTemplates: TAction Category = 'Options' Caption = '&File Templates...' HelpContext = 640 Hint = 'Add/Remove file templates' OnExecute = actFileTemplatesExecute end object actEditUTF8: TAction Tag = 1 Category = 'Edit' Caption = 'UTF-8' HelpContext = 320 Hint = 'Use UTF-8 encoding when saving the file' OnExecute = actEditFileEncodingExecute end object actEditUTF8NoBOM: TAction Tag = 2 Category = 'Edit' Caption = 'UTF-8 (No BOM)' HelpContext = 320 Hint = 'Use UTF-8 encoding without BOM' OnExecute = actEditFileEncodingExecute end object actEditUTF16LE: TAction Tag = 3 Category = 'Edit' Caption = 'UTF-16LE' HelpContext = 320 Hint = 'Use UTF-16LE encoding' OnExecute = actEditFileEncodingExecute end object actEditUTF16BE: TAction Tag = 4 Category = 'Edit' Caption = 'UTF-16BE' HelpContext = 320 Hint = 'Use UTF-16BE encoding' OnExecute = actEditFileEncodingExecute end object actFileReload: TAction Category = 'File' Caption = '&Reload' Enabled = False HelpContext = 310 Hint = 'Reload|Reload active file' ImageIndex = 120 OnExecute = actFileReloadExecute end object actImportShortcuts: TAction Category = 'Import/Export' Caption = 'Import Shortcuts' Hint = 'Import Shortcuts' OnExecute = actImportShortcutsExecute end object actExportShortCuts: TAction Category = 'Import/Export' Caption = 'Export Shortcuts' Hint = 'Export Shortcuts' OnExecute = actExportShortCutsExecute end object actImportHighlighters: TAction Category = 'Import/Export' Caption = 'Import Highlighters' Hint = 'Import Syntax Highlighters' OnExecute = actImportHighlightersExecute end object actExportHighlighters: TAction Category = 'Import/Export' Caption = 'Export Highlighters' Hint = 'Export Syntax Highlighters' OnExecute = actExportHighlightersExecute end object actSearchReplaceNow: TAction Category = 'Search' Caption = 'Replace' Enabled = False HelpContext = 330 Hint = 'Replace with existing settings' ImageIndex = 17 OnExecute = actSearchReplaceNowExecute end object actSearchHighlight: TAction Category = 'Search' AutoCheck = True Caption = '&Highlight Search Text' HelpContext = 330 Hint = 'Highlight the search text in the current editor' ImageIndex = 122 ShortCut = 24648 OnExecute = actSearchHighlightExecute end object actEditWordWrap: TAction Category = 'Edit' Caption = 'Word &Wrap' HelpContext = 320 Hint = 'Turn word wrap on/off' ImageIndex = 124 OnExecute = actEditWordWrapExecute end object actSearchGoToDebugLine: TAction Category = 'Search' Caption = 'Go To &Debugger Position' HelpContext = 330 Hint = 'Go to the current position of the debugger' OnExecute = actSearchGoToDebugLineExecute end object actHelpWebProjectHome: TAction Category = 'Help' Caption = '&Project Home' HelpContext = 370 Hint = 'Go to the project home page' ImageIndex = 147 OnExecute = actHelpWebProjectHomeExecute end object actHelpWebGroupSupport: TAction Category = 'Help' Caption = '&Group Support' HelpContext = 370 Hint = 'Go to the PyScripter Internet group' ImageIndex = 147 OnExecute = actHelpWebGroupSupportExecute end object actFileCloseAllOther: TAction Category = 'File' Caption = 'Close All &Other' HelpContext = 310 Hint = 'Close all files except the active one' OnExecute = actFileCloseAllOtherExecute end object actFileCloseAllToTheRight: TAction Category = 'File' Caption = 'Close All to the &Right' HelpContext = 310 Hint = 'Close all files to the right' OnExecute = actFileCloseAllToTheRightExecute end object actEditCopyFileName: TAction Category = 'Edit' Caption = 'Copy File Name' HelpContext = 320 HelpType = htContext Hint = 'Copy file name of active file to clipboard' ImageIndex = 12 OnExecute = actEditCopyFileNameExecute end object actToolsEditStartupScripts: TAction Category = 'Tools' Caption = 'Edit Start&up Scripts' HelpContext = 350 HelpType = htContext Hint = 'Edit PyScripter initialization files' OnExecute = actToolsEditStartupScriptsExecute end object actHelpWebBlog: TAction Category = 'Help' Caption = '&Blog' HelpContext = 370 Hint = 'Go to the PyScripter Blog' ImageIndex = 147 OnExecute = actHelpWebBlogExecute end object actFoldVisible: TAction Category = 'Code Folding' Caption = 'Code Folding' Hint = 'Show/Hide Code Folding' OnExecute = actFoldVisibleExecute end object actFoldAll: TAction Category = 'Code Folding' Caption = 'All' Hint = 'Fold all' ImageIndex = 29 OnExecute = actFoldAllExecute end object actUnfoldAll: TAction Category = 'Code Folding' Caption = 'All' Hint = 'Unfold all' ImageIndex = 28 OnExecute = actUnfoldAllExecute end object actFoldNearest: TAction Category = 'Code Folding' Caption = 'Nearest' Hint = 'Collapse nearest fold' OnExecute = actFoldNearestExecute end object actUnfoldNearest: TAction Category = 'Code Folding' Caption = 'Nearest' Hint = 'Expand nearest fold' OnExecute = actUnfoldNearestExecute end object actFoldRegions: TAction Category = 'Code Folding' Caption = 'Regions' Hint = 'Fold Ranges' OnExecute = actFoldRegionsExecute end object actUnfoldRegions: TAction Category = 'Code Folding' Caption = 'Regions' Hint = 'Unfold ranges' OnExecute = actUnfoldRegionsExecute end object actFoldLevel1: TAction Category = 'Code Folding' Caption = 'Level 1' Hint = 'Fold level 1' OnExecute = actFoldLevel1Execute end object actUnfoldLevel1: TAction Category = 'Code Folding' Caption = 'Level 1' Hint = 'Unfold level 1' OnExecute = actUnfoldLevel1Execute end object actFoldLevel2: TAction Category = 'Code Folding' Caption = 'Level 2' Hint = 'Fold level 2' OnExecute = actFoldLevel2Execute end object actUnfoldLevel2: TAction Category = 'Code Folding' Caption = 'Level 2' Hint = 'Unfold level 2' OnExecute = actUnfoldLevel2Execute end object actFoldLevel3: TAction Category = 'Code Folding' Caption = 'Level 3' Hint = 'Fold level 3' OnExecute = actFoldLevel3Execute end object actUnfoldLevel3: TAction Category = 'Code Folding' Caption = 'Level 3' Hint = 'Unfold level 3' OnExecute = actUnfoldLevel3Execute end object actFoldClasses: TAction Category = 'Code Folding' Caption = 'Classes' Hint = 'Fold classes' OnExecute = actFoldClassesExecute end object actUnfoldClasses: TAction Category = 'Code Folding' Caption = 'Classes' Hint = 'Unfold classes' OnExecute = actUnfoldClassesExecute end object actFoldFunctions: TAction Category = 'Code Folding' Caption = 'Functions' Hint = 'Fold functions' OnExecute = actFoldFunctionsExecute end object actUnfoldFunctions: TAction Category = 'Code Folding' Caption = 'Functions' Hint = 'Unfold functions' OnExecute = actUnfoldFunctionsExecute end end object Images: TImageList ColorDepth = cd32Bit Left = 36 Top = 194 Bitmap = { 494C0101A000E000540010001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000009002000001002000000000000090 0200000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000330000003300000033000000000000001E0000 003300000033000000330000001E000000000000000000000000000000000000 0000000000000000000000000033000000330000003300000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000003300000033000000330000003300000033000000330000 0033000000330000003300000033000000330000000000000000000000000000 0000000000000000000000000033000000330000003300000000000000330000 0033000000220000000000000000000000000000000000000000000000240000 00230000000000000000747270FF74716DFF7B7767FF00000019141D4FA9374C CCFF374CCBFF374CCCFF161F51AC0000001E0000000000000000000000240000 00230000000000000000576C7DFF496684FF4F91DAFF00000033000000000000 002F000000230000000000000000000000000000000000000000000000200000 0020000000003A8CD6FF3A8CD6FF3A8CD6FF3A8CD6FF3A8CD6FF3A8CD6FF3A8C D6FF3A8CD6FF3A8CD6FF3A8CD6FF3A8CD6FF0000000000000000000000240000 00230000000000000000767371FF777070FF847075FF00000000008A49FF00C6 84FF004323BD00000021000000000000000000000000000000233D3D3BC13C3A 3ABF0000002F00000033706E6CFFEFEDEAFF777363FF0D143E983650D9FF375C F9FF365CFAFF375CF9FF3751D7FF151E51AC00000000000000233D3D3BC13C3A 3ABF0000002F000000335B87A4FF80A8B7FF8FD6FFFF31699EFF000000336864 60EF3D3C3BC00000002400000000000000000000000000000020343332B23433 32B20000002D337CBEF245C9FAFF47D2FFFF47D2FFFF47D2FFFF47D2FFFF47D2 FFFF47D2FFFF47D2FFFF45C9FAFF347BBCF000000000000000233D3D3BC13C3A 3ABF0000002F000000337B7072FFFFEEF4FF8B6D76FF00000033008846FF00E4 A6FF00BE80FF004121B90000002100000000000000003D3D3BBFA19F9DFF9E9C 9AFF62605EEF706E6CFF898785FFE2E0DDFF928D7DFF2841D1FF3F63FCFF3B5F FAFF395CF8FF3B5FFAFF4064FBFF334ACCFF000000003D3D3BBFA19F9DFF9E9C 9AFF62605DEF746D66FF41B2F8FF8AE6FFFF80D4FFFF119BFFFF32699FFFADA1 96FFA6A19DFF3E3D3BBD000000000000000000000000333332AE9C9A98FF9C9A 98FF605E5DE5667E95FF3F9EE0FF50D6FFFF50D6FFFF50D6FFFF686564FF50D6 FFFF50D6FFFF50D6FFFF3F9EE0FF050D1450000000003D3D3BBFA19F9DFF9E9C 9AFF62605FEF7B7071FF1F8253FF00893EFF008841FF008844FF008340FF00D9 A1FF00D8A0FF00BC80FF004121B90000002200000000686765ED9F9D9BFFDFDD DBFFB8B6B4FFDBD9D7FFD8D6D4FFD8D6D2FFE4E0D0FF223BCDFFA7B8FFFFFFFF FFFFFFFFFFFFFFFFFFFFA9BAFFFF3047CAFF00000000686765ED9F9D9BFFDFDD DBFFB8B6B3FFDED9D5FFE4D8CFFF2273C7FF3FC6FFFF2AABFFFF159DFFFF3168 9DFFAEA298FF393735AD000000000000000000000000525150D09D9B99FFD1CF CDFFB6B4B2FFD1CFCDFF5F9CD4FF50C2F2FF5BDBFFFF5BDBFFFF5BDBFFFF5BDB FFFF5BDBFFFF50C2F2FF214E79C10000000000000000686765ED9F9D9BFFDFDD DBFFBBB7B5FFEDDDE0FF00863BFF3CE8BFFF00D79FFF00D7A0FF00D59FFF00D0 9CFF00D09CFF00D39FFF00B981FF004424BD0000000000000000757471FEB7B3 B3FFD2D0CFFFD1CFCFFFD3D1D0FFD5D3D0FFDFDBCEFF213BCFFF5875FFFF5674 FEFF5372FDFF5675FEFF5C78FFFF3249CBFF0000000000000000757471FEB7B3 B3FFD2D0CFFFD2D0CEFFD8D2CFFFE5D7CDFF2A79CAFF45C9FFFF2BACFFFF139C FFFF2C69A3FF0000003300000000000000000000000000000013716F6DF2B5B2 B1FFCDCBCAFFCDCBCAFFBBC3CBFF4695D8FF62DAFCFF65E0FFFF686564FF65E0 FFFF62DAFCFF3680BFF000020320000000000000000000000000757471FEB7B3 B3FFD5D1D1FFE3D3D8FF008238FF6BE8CEFF00C899FF00C899FF00C899FF00C7 97FF00C898FF00CA9AFF62E6CDFF008A46FF0000003300000033777573FFD2D0 CEFFCECCCAFFBEBCBAFF92908EFF8F8C89FF9B988EFF6471BEFF3B56E1FF6B86 FFFF7089FFFF6C87FFFF425CE0FF111945940000003300000033777573FFD2D0 CEFFCECCCAFFBFBDBAFF93918EFF948E89FFA4968BFF2D7CCDFF42C9FFFF20AB FFFF83B0D8FF7E7871FF00000033000000000000003302020240817E7CFFCAC8 C6FFCAC8C6FFBCBAB8FF989694FF6689A8FF51B3E8FF70E5FFFF686564FF70E5 FFFF51B3E8FF0E21338D00000033000000000000003300000033777573FFD2D0 CEFFD0CDCBFFCDBDC1FF008539FF94EFE2FF4CE9D4FF4EE8D3FF4CE6D1FF93E8 D8FF00C397FF5DE0C6FF00B37EFF003C1FA9817E7CFF7B7977FF9D9B99FFCCC9 C8FFCCC9C8FF93918FFF2D2C2B9C020202222E2D2B9C9F9B8DFF7280CCFF213B CDFF223CCCFF243ED0FF5661A6FF00000000817E7CFF7B7977FF9D9B99FFCCC9 C8FFCCC9C8FF93918FFF2D2C2B9C020202222F2D2B9CA3968CFF2479CEFFAFDC F1FF928880FFC1BFB8FF767B6DFF0000003383817EFF83817EFFA09E9CFFC7C4 C3FFC7C4C3FF989694FF333331A408080840214F7BC36DD8F7FF686564FF6DD8 F7FF5491C8FF83817EFF83817EFF00000000817E7CFF7B7977FF9D9B99FFCCC9 C8FFCDC9C9FF9C9092FF106A42E5008A40FF00883EFF00863DFF008238FF81E4 D5FF55D9C3FF00AD79FF308358FF00000000817E7CFFE3E1DFFFDCDAD8FFC6C5 C2FFC8C6C4FF8F8D8BFF0404043D000000070404043D93908BFFD0CCC2FFD2CD BFFFE6E2D3FFEAE6D8FF888375FF00000000817E7CFFE3E1DFFFDCDAD8FFC6C5 C2FFC8C6C4FF8F8D8BFF0404043D000000070404043D95908BFFD2CAC4FF867E 78FFEBE8E4FF898C82FFBA79B6FF9868CAFF858381FFD1CFCDFFD1CFCDFFC4C2 C0FFC3C1BFFF949290FF0B0B0B580000000D0B111666479EDEFF82EDFFFF479E DEFFB6C4D0FFD1CFCDFF858381FF00000000817E7CFFE3E1DFFFDCDAD8FFC6C5 C2FFC8C6C4FF948D8DFF030202360000000603020235AD9199FF00873DFF72E3 D5FF00A978FF51AD7EFF947D83FF00000000848280FF807D7BFF949492FFD0CE CCFFC3C0BFFF93918FFF343432AD0505054E343432AD949290FFC5C1BFFFD2D0 CCFF969591FF817D79FF85837EFF00000000848280FF807D7BFF949492FFD0CE CCFFC3C0BFFF93918FFF343432AD0505054E343432AD959390FFC6C2C1FFD3D1 CEFF81837BFFE3B2E1FFCB96C6FFAE7CCEFF868482FF868482FF9A9997FFCAC8 C6FFC0BDBCFF989694FF3A3938B20D0D0D663A3938B2638CB0FF4CA4E0FF87AF D3FF9A9997FF868482FF868482FF00000000848280FF807D7BFF949492FFD0CE CCFFC3C0BFFF949190FF353333AD0504044D363333ADA49598FF008739FF00A8 79FF248454FF918083FF8A8383FF000000000000000000000000807D7BFFDAD9 D8FFBEBBB9FFBCB9B7FF94918EFF928F8DFF94918FFFB3B2B0FFBEBBB9FFDBD9 D8FF807D7BFF0000000000000000000000000000000000000000807D7BFFDAD9 D8FFBEBBB9FFBCB9B7FF94918EFF928F8DFF94918FFFB3B2B0FFBFBBB9FFDAD9 D7FF7A7C74FFC48AD9FFBF8AD5FF000000000000000000000010888684FFD0CE CDFFBDBAB8FFB9B6B4FF989593FF959290FF989593FFB2B0AEFFBDBAB8FFD0CE CDFF888684FF0000000000000000000000000000000000000000807D7BFFDAD9 D8FFBEBBB9FFBCB9B7FF94908FFF938F8DFF959190FFB9B3B3FFCCBEC0FFEBDB DFFF8B8081FF0000000000000000000000000000000000000023716F6DEFACAA A8FFC7C5C3FFBBB8B7FFBAB7B6FFBBB8B7FFBBB8B7FFBBB8B7FFC7C5C3FFACAA A8FF706F6DEF0000002300000000000000000000000000000023716F6DEFACAA A8FFC7C5C3FFBBB8B7FFBAB7B6FFBBB8B7FFBBB8B7FFBBB8B7FFC7C5C3FFACAA A7FF696A63EA00000022000000000000000000000000000000206B6A68E5AEAC AAFFC4C2C0FFBBB8B7FFB9B6B5FFB9B6B5FFB9B6B5FFBBB8B7FFC4C2C0FFAEAC AAFF6B6A68E50000002000000000000000000000000000000023716F6DEFACAA A8FFC7C5C3FFBBB8B7FFBAB7B6FFBBB8B7FFBBB8B7FFBCB8B8FFC9C5C4FFAFAB AAFF72706EEF00000023000000000000000000000000454342BAA4A2A0FFDAD8 D7FFC6C4C2FFE4E3E1FFDBD9D7FFC2BFBEFFD7D5D4FFE4E3E1FFC5C4C2FFDAD8 D7FFA4A2A0FF454342BA000000000000000000000000454342BAA4A2A0FFDAD8 D7FFC6C4C2FFE4E3E1FFDBD9D7FFC2BFBEFFD7D5D4FFE4E3E1FFC5C4C2FFDAD8 D7FFA2A29DFF40423DB80000000000000000000000003A3938ABA3A19FFFCFCD CCFFC2C0BEFFD8D7D5FFD2D0CEFFC0BDBCFFCFCDCCFFD8D7D5FFC1C0BEFFCFCD CCFFA3A19FFF3A3938AB000000000000000000000000454342BAA4A2A0FFDAD8 D7FFC6C4C2FFE4E3E1FFDBD9D7FFC2BFBEFFD7D5D4FFE4E3E1FFC5C4C2FFDAD8 D7FFA4A2A0FF454342BA000000000000000000000000434241B2B2B1AFFFAFAE ACFF706F6DEB868482FF9A9897FFBCBAB7FF9A9897FF868482FF83817FFEAFAE ACFFB2B1AFFF434241B2000000000000000000000000434241B2B2B1AFFFAFAE ACFF706F6DEB868482FF9A9897FFBCBAB7FF9A9897FF868482FF83817FFEAFAE ACFFB1B1AEFF424241B20000000000000000000000003636349FACABA9FFACAB A9FF6B6A68DF8E8C8AFF9F9D9CFFB9B7B5FF9F9D9CFF8E8C8AFF7C7A78EFACAB A9FFACABA9FF3636349F000000000000000000000000434241B2B2B1AFFFAFAE ACFF706F6DEB868482FF9A9897FFBCBAB7FF9A9897FF868482FF83817FFEAFAE ACFFB2B1AFFF434241B200000000000000000000000000000000444342B24240 40AF00000000000000008B8987FFE9E7E7FF8B8987FF00000000000000007977 74ED424241B00000000000000000000000000000000000000000444342B24240 40AF00000000000000008B8987FFE9E7E7FF8B8987FF00000000000000007977 74ED424241B000000000000000000000000000000000000000003736369F3736 369F0000000000000000908E8CFFD7D5D4FF908E8CFF00000000000000105D5C 5BCF3736369F0000000000000000000000000000000000000000444342B24240 40AF00000000000000008B8987FFE9E7E7FF8B8987FF00000000000000007977 74ED424241B00000000000000000000000000000000000000000000000000000 00000000000000000000908E8CFF8F8D8BFF908E8CFF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000908E8CFF8F8D8BFF908E8CFF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000092908EFF92908EFF92908EFF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000908E8CFF8F8D8BFF908E8CFF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000001001C010100200000000C000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000033000000330000003300000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000330000003300000033000000000000001E0000 003300000033000000330000001E000000000000000000000000000000000000 0000010100201A330AA8346214EA346518E9346418E7356515EC264A0FCB0409 0148000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000240000 00230000000000000000747270FF72706EFF747270FF00000000000000000000 002F000000230000000000000000000000000000000000000000000000240000 00230000000000000000747270FF74706EFF826E72FF00000019003D24A9009E 5DFF009D5CFF009E5DFF003F26AC0000001E0000000000000000000000000912 0366356515ED4F8D3CFD579E50FF529B4BFF529B4BFF529B4BFF4C913DFF386B 1AEF1A320AA80000000C00000000000000000000000000000000000000001A7E A5FF1A7EA5FF1A7EA5FF1A7EA5FF1A7EA5FF000000001A7EA5FF1A7EA5FF1A7E A5FF1A7EA5FF1A7EA5FF000000000000000000000000000000233D3D3BC13C3A 3ABF0000002F00000033706E6CFFEEECEBFF706E6CFF00000033000000336765 63F13C3C3BC000000024000000000000000000000000000000233D3D3BC13C3A 3ABF0000002F00000033706E6CFFF0EBEBFF7D6A6EFF002F1B9800A668FF00BA 86FF76DFC4FF00BA86FF00A669FF003F26AC0000000000000000080F025F3768 19ED4F9544FF66A55FFFD1E4CEFF5B9E53FF509848FF509848FF509848FF5098 48FF3D7224F11B340AAB00000000000000000000000000000000000000001E86 AAFFD3F3FBFFB6EBFAFFCCF1FBFF1E86AAFF000000001E86AAFFD3F3FBFFB6EB FAFFCFF2FBFF1E86AAFF0000000000000000000000003D3D3BBFA19F9DFF9E9C 9AFF62605EEF706E6CFF898785FFE1DFDEFF898785FF706E6CFF716F6DFE9F9D 9BFFA19F9DFF3E3C3BBD0000000000000000000000003D3D3BBFA19F9DFF9E9C 9AFF62605EEF706E6CFF898785FFE3DFDFFF998589FF009E57FF00C08BFF00BB 82FFFFFFFFFF00BB82FF00C08CFF009E5DFF0000000000000010366814F24D93 40FF4E9645FF64A35CFFFFFFFFFFE3EFE2FF6AA662FF4E9645FF4E9645FF4E96 45FF4E9645FF396D1BF2050A024F00000000000000000000000000000000228D B0FF98E2F8FF85DDF8FF95E2F9FF228DB0FF00000000228DB0FF98E2F8FF85DD F8FF95E2F9FF228DB0FF000000000000000000000000686765ED9F9D9BFFDFDD DBFFB8B6B4FFDBD9D7FFD8D6D4FFD6D4D2FFD8D6D4FFDBD9D7FFB8B6B4FFDFDD DBFF9F9D9BFF393837AF000000000000000000000000686765ED9F9D9BFFDFDD DBFFB8B6B4FFDBD9D7FFD8D6D4FFD9D5D3FFEAD7DBFF009951FF73E5CBFFFFFF FFFFFFFFFFFFFFFFFFFF76E5CCFF009C5BFF000000000F1E0683417E29FB4C93 42FF4C9342FF62A15AFFFFFFFFFFFFFFFFFFF4F8F3FF70A968FF4C9342FF4C93 42FF4C9342FF488B36FF2A5010D3000000000000000000000000000000002594 B5FF94DEF8FF81D9F8FF91DEF9FF2594B5FF000000002594B5FF94DEF8FF81D9 F8FF91DEF9FF2594B5FF00000000000000000000000000000000757471FEB7B3 B3FFD2D0CFFFD1CFCFFFD3D1D0FFD3D1D0FFD3D1D0FFD1CFCFFFD2D0CFFFB7B3 B3FF666462EF0000000000000000000000000000000000000000757471FEB7B3 B3FFD2D0CFFFD1CFCFFFD3D1D0FFD6D1D2FFE5D3D8FF009A52FF00CB96FF00C8 8FFFFFFFFFFF00C88FFF00CC98FF009D5CFF000000002F5A12E1488A36FF4B90 3FFF4B903FFF619E57FFFFFFFFFFFFFFFFFFFFFFFFFFF7FAF6FF81B178FF4B90 3FFF4B903FFF4B903FFF376B15F6010100200000000000000000000000002798 B8FFBBE8F8FFAFE5F8FFB9E8F9FF2798B8FF000000002798B8FFBBE8F8FFAFE5 F8FFB9E8F9FF2798B8FF00000000000000000000003300000033777573FFD2D0 CEFFCECCCAFFBEBCBAFF92908EFF8D8B89FF92908EFFBEBCBAFFCECCCAFFD2D0 CEFF777573FF0000003300000033000000000000003300000033777573FFD2D0 CEFFCECCCAFFBEBCBAFF92908EFF8F8C8AFF9E9394FF45A37DFF00AE6BFF00D2 9BFF72EDD3FF00D39DFF00AF70FF00351F94000000003B7013FD498E3BFF498E 3CFF498E3CFF609C54FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF99C0 92FF498E3CFF498E3CFF376919EF030701400000000000000000000000002798 B8FFDEF1F8FFD9F0F8FFDEF2F9FF2798B8FF000000002798B8FFDEF1F8FFD9F0 F8FFDEF2F9FF2798B8FF0000000000000000817E7CFF7B7977FF9D9B99FFCCC9 C8FFCCC9C8FF93918FFF2D2C2B9C020202222D2C2B9C93918FFFCCC9C8FFCCC9 C8FF9D9B99FF7B7977FF817E7CFF00000000817E7CFF7B7977FF9D9B99FFCCC9 C8FFCCC9C8FF93918FFF2D2C2B9C020202222E2D2C9CA59497FF52B18AFF0099 50FF009850FF009B53FF398E6AFF00000000000000003B7014FD4E9A49FF4E9A 4AFF4E9A4AFF64A761FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEEF5EEFF75B0 72FF4E9A4AFF4E9A4AFF386B1BEF030701400000000000000000000000002798 B8FFDEF1F8FFD9F0F8FFDEF2F9FF2798B8FF000000002798B8FFDEF1F8FFD9F0 F8FFDEF2F9FF2798B8FF0000000000000000817E7CFFE3E1DFFFDCDAD8FFC6C5 C2FFC8C6C4FF8F8D8BFF0404043D000000070404043D8F8D8BFFC8C6C4FFC6C5 C2FFDCDAD8FFE3E1DFFF817E7CFF00000000817E7CFFE3E1DFFFDCDAD8FFC6C5 C2FFC8C6C4FF8F8D8BFF0404043D000000070404043D948F8EFFD4C7C9FFD7C6 C9FFECD9DDFFF0DEE2FF8D7B7EFF00000000000000002E5812DC4F9C4CFF55A7 5BFF55A75BFF6AB26FFFFFFFFFFFFFFFFFFFFFFFFFFFE2F0E3FF6AB26FFF55A7 5BFF55A75BFF55A75BFF386D16F6000100180000000000000000000000002798 B8FFE1F3FAFFD9F0F8FFE0F3F9FF2798B8FF000000002798B8FFE1F3FAFFD9F0 F8FFE0F3F9FF2798B8FF0000000000000000848280FF807D7BFF949492FFD0CE CCFFC3C0BFFF93918FFF343432AD0505054E343432AD939290FFC3C0BFFFD0CE CCFF949492FF807D7BFF848280FF00000000848280FF807D7BFF949492FFD0CE CCFFC3C0BFFF93918FFF343432AD0505054E343432AD949290FFC5C0C0FFD3CE CDFF979492FF817C7BFF868280FF0000000000000000101F0783478836FA5CB4 6CFF5CB46CFF70BD7EFFFFFFFFFFFFFFFFFFD4EBD8FF64B873FF5CB46CFF5CB4 6CFF5CB46CFF52A052FF2A5212D2000000000000000000000000000000002798 B8FFE9F6FBFFD9F0F8FFE6F5FAFF2798B8FF000000002798B8FFE9F6FBFFD9F0 F8FFE6F5FAFF2798B8FF00000000000000000000000000000000807D7BFFDAD9 D8FFBEBBB9FFBCB9B7FF94918EFF928F8DFF94918FFFB3B2B0FFBEBBB9FFDBD9 D8FF807D7BFF0000000000000000000000000000000000000000807D7BFFDAD9 D8FFBEBBB9FFBCB9B7FF94918EFF928F8DFF94918FFFB3B2B0FFBEBBB9FFDBD9 D8FF807D7BFF0000000000000000000000000000000000000010366818ED5BB5 6BFF62C17CFF76C98DFFFFFFFFFFC9EAD2FF67C381FF62C17CFF62C17CFF62C1 7CFF61C07AFF3C7320F404090147000000000000000000000000000000002798 B8FFFDFEFFFFF1F9FCFFFAFDFEFF2798B8FF000000002798B8FFFDFEFFFFF1F9 FCFFFBFEFEFF2798B8FF00000000000000000000000000000023716F6DEFACAA A8FFC7C5C3FFBBB8B7FFBAB7B6FFBBB8B7FFBBB8B7FFBBB8B7FFC7C5C3FFACAA A8FF706F6DEF0000002300000000000000000000000000000023716F6DEFACAA A8FFC7C5C3FFBBB8B7FFBAB7B6FFBBB8B7FFBBB8B7FFBBB8B7FFC7C5C3FFACAA A8FF706F6DEF0000002300000000000000000000000000000000060C02533A6E 1EF062C27CFF7CD59CFFB5E7C7FF6BD090FF69CF8EFF69CF8EFF69CF8EFF68CD 8BFF418032F119300CA100000000000000000000000000000000000000002798 B8FF2798B8FF2798B8FF2798B8FF2798B8FF000000002798B8FF2798B8FF2798 B8FF2798B8FF2798B8FF000000000000000000000000454342BAA4A2A0FFDAD8 D7FFC6C4C2FFE4E3E1FFDBD9D7FFC2BFBEFFD7D5D4FFE4E3E1FFC5C4C2FFDAD8 D7FFA4A2A0FF454342BA000000000000000000000000454342BAA4A2A0FFDAD8 D7FFC6C4C2FFE4E3E1FFDBD9D7FFC2BFBEFFD7D5D4FFE4E3E1FFC5C4C2FFDAD8 D7FFA4A2A0FF454342BA00000000000000000000000000000000000000000509 024B386B1BED54A556FD6BD291FF70DC9EFF70DC9EFF6ED99AFF5CB46AFF3D74 21F412240A890000000400000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000434241B2B2B1AFFFAFAE ACFF706F6DEB868482FF9A9897FFBCBAB7FF9A9897FF868482FF83817FFEAFAE ACFFB2B1AFFF434241B2000000000000000000000000434241B2B2B1AFFFAFAE ACFF706F6DEB868482FF9A9897FFBCBAB7FF9A9897FF868482FF83817FFEAFAE ACFFB2B1AFFF434241B200000000000000000000000000000000000000000000 00000000000C12240A8932601BDF386E1AF339701CF3376A1AED1F3B12AE0102 0028000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000444342B24240 40AF00000000000000008B8987FFE9E7E7FF8B8987FF00000000000000007977 74ED424241B00000000000000000000000000000000000000000444342B24240 40AF00000000000000008B8987FFE9E7E7FF8B8987FF00000000000000007977 74ED424241B00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000908E8CFF8F8D8BFF908E8CFF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000908E8CFF8F8D8BFF908E8CFF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000DDBE B300694731006947310069473100694731006947310069473100694731006947 310069473100694731006947310069473100000000000000000000000000DDBE B300694731006947310069473100694731006947310069473100694731006947 310069473100694731006947310069473100000000000000000000000000F9F9 F9FFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC FCFFFCFCFCFFFCFCFCFFF9F9F9FF00000000DDBEB30069473100694731006947 3100694731006947310069473100694731006947310069473100694731006947 310069473100694731006947310069473100000000000000000000000000DDBE B300F7F4F200D6C2B600D6C2B600D6C2B600D6C2B600D6C2B600D6C2B600D6C2 B600D6C2B600D6C2B600D6C2B60069473100000000000000000000000000DDBE B300F7F4F200D6C2B600D6C2B600D6C2B600D6C2B600D6C2B600D6C2B600D6C2 B600D6C2B600D6C2B600D6C2B60069473100000000000000000000000000A0C7 AAFF6FAA7DFF589D69FF70AB80FFA1C8AAFFD6E6DAFFFCFCFCFFFCFCFCFFFCFC FCFFFCFCFCFFFCFCFCFFFCFCFCFF00000000DDBEB300FFFFFF00B7A29300B7A2 9300B7A29300B7A29300B7A29300B7A29300B7A29300B7A29300B7A29300B7A2 9300B7A29300B7A29300B7A2930069473100000000000000000000000000DDBE B300FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8E400EDE5E000EAE0 DA00E7DBD400E4D6CF00D6C2B60069473100000000000000000000000000DDBE B300FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8E400EDE5E000EAE0 DA00E7DBD400E4D6CF00D6C2B6006947310000000000000000006AA277FF71AA 79FFA5B48AFFBAB58CFF90B991FF579D69FF76AD84FFC0D9C7FFFBFBFBFFFBFB FBFFFBFBFBFFFBFBFBFFFCFCFCFF00000000DDBEB300FBF9F800FBF9F800F8F5 F300F4F0ED00F2ECE800EEE7E200ECE3DE00E9DFD800E6DBD300E3D6CE00E0D2 C900DCCDC300DCCDC300B7A2930069473100000000000000000000000000DDBE B300FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8E400EDE5 E000EAE0DA00E7DBD400D6C2B60069473100000000000000000000000000DDBE B300FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8E400EDE5 E000EAE0DA00E7DBD400D6C2B600694731000000000074AD84FF7CC299FFAECA 8DFFCEAD6BFFD9AB65FFA1A464FF6AB889FF67A67CFF75AC83FFD4E4D9FFFAFA FAFFFAFAFAFFFAFAFAFFFCFCFCFF00000000DDBEB300FEFDFD00FEFDFD00FCFA F900F8F6F400F6F2F000F3EDEA00F0E9E500EDE4DF00EAE0DA00E7DBD500E4D7 D000E0D2CA00E0D2CA00B7A2930069473100000000000000000000000000DDBE B300FFFFFF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8 E400EDE5E000EAE0DA00D6C2B60069473100000000000000000000000000DDBE B300FFFFFF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8 E400EDE5E000EAE0DA00D6C2B60069473100A2C8ACFF75B78CFF71C479FFA9B4 67FFD5A455FFE1A853FFBB974AFF89A053FF79B187FF599B6AFFA0C7AAFFFAFA FAFFF8F8F8FFF8F8F8FFFCFCFCFF00000000DDBEB300FEFEFE00FEFEFE00FEFD FD00FBFAF900F9F6F400F5F1EE00F3EDEA00EFE8E400EDE4E000EAE0DA00E7DC D600E3D6CF00E3D6CF00B7A2930069473100DDBEB3006947310069473100DDBE B300FFFFFF00FFFFFF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2EC E800EFE8E400EDE5E000D6C2B60069473100DDBEB3006947310069473100DDBE B300FFFFFF00FFFFFF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2EC E800EFE8E400EDE5E000D6C2B6006947310070AC81FF8CD1A0FFAFD582FFC8AD 60FFDBAA54FFD3A04DFFBF8842FFBF904CFF82A263FF78B995FF70AB81FFF9F9 F9FFF9F9F9FFF8F8F8FFFCFCFCFF00000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FDFDFC00FCFBFA00F9F6F500F6F2F000F2EDE900F0E9E500EDE4E000EAE1 DC00E7DCD500E7DCD500B7A2930069473100DDBEB300F7F4F200D6C2B600DDBE B300FFFFFF00FFFFFF00FFFFFF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0 ED00F2ECE800EFE8E400EAE0DA0069473100DDBEB300F7F4F200D6C2B600DDBE B300FFFFFF00FFFFFF00FFFFFF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0 ED00F2ECE800EFE8E400EAE0DA0069473100589E6AFF8EDB9EFF94D976FFCAC5 81FFCDA556FFBFBB6DFFABCF69FF9BB852FF61A44FFF8EC8A8FF589D69FFF9F9 F9FFF6F6F6FFF6F6F6FFFCFCFCFF00000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FEFEFE00FEFEFD00FBFBF900F9F6F500F5F1EE00F2EDEA00F0E8E400EDE4 E000EAE0DA00EAE0DA00B7A2930069473100DDBEB300FDFCFB00FAF8F700D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000DDBEB300FDFCFB00FAF8F700D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D880000071AC82FF93D7A2FFA0E78BFFD5EA BCFFCCB367FFC4C874FF7ADB58FF5CDA42FF5EC258FF87C19EFF70AA80FFF6F6 F6FFF3F3F3FFF2F2F2FFFCFCFCFF00000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FEFEFE00FCFBFB00F9F7F500F7F3F100F4EFEB00F1EB E600EEE6E100EEE6E100B7A2930069473100DDBEB300FFFFFF00FDFCFB00F898 0000F8C89000F8980000F8980000F8980000F8980000F8980000F8980000F898 0000F8980000F8980000F898000000000000DDBEB300FFFFFF00FDFCFB00F898 0000F8C89000F8980000F8980000F8980000F8980000F8980000F8980000F898 0000F8980000F8980000F898000000000000A1C8ACFF84C29AFFBAF1AAFFC9EC B9FFD8D599FFD6BF77FFB6BB64FF92D66EFF8ADF90FF69AB7DFF9EC4A7FFF2F2 F2FFEFEFEFFFEDEDEDFFFCFCFCFF00000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FEFEFE00FCFBFA00F9F7F500F6F2EF00F4EF EB00F0E9E500F0E9E500B7A2930069473100DDBEB300FFFFFF00FFFFFF00F898 0000F8C89000F8C89000F8C89000F8C89000F8980000EDE5E000EAE0DA00D6C2 B60069473100000000000000000000000000DDBEB300FFFFFF00FFFFFF00F898 0000F8C89000F8C89000F8C89000F8C89000F8980000EDE5E000EAE0DA00D6C2 B600694731000000000000000000000000000000000075AF86FFADE2C1FFCDF2 CFFFD4E4BDFFDBDBA2FFDAC283FFD1C28BFF99CAA1FF74AD84FFCDDDD2FFECEC ECFFEAEAEAFFE6E6E6FFFCFCFCFF00000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FCFBFA00F6F2 EF00F4EFEB00F4EFEB00F0E9E50069473100DDBEB300FFFFFF00FFFFFF00FFFF FF00F8980000F8980000F8980000F8980000F2ECE800EFE8E400EDE5E000D6C2 B60069473100000000000000000000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00F8980000F8980000F8980000F8980000F2ECE800EFE8E400EDE5E000D6C2 B6006947310000000000000000000000000000000000000000006CA67BFF90C3 A2FFB8DABBFFD4DCB4FFB9CB9EFF83B281FF75AE85FFBAD4C1FFEBEBEBFFFCFC FCFFFCFCFCFFFCFCFCFFFCFCFCFF00000000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8E400EAE0 DA0069473100000000000000000000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FDFCFB00FAF8F700F7F4F200F5F0ED00F2ECE800EFE8E400EAE0 DA0069473100000000000000000000000000000000000000000000000000A0C8 AAFF6FAB80FF589E6AFF70AB80FF9EC4A8FFCFDFD3FFF0F0F0FFEAEAEAFFFCFC FCFFF6F6F6FFF4F4F4FFC4C4C4FF00000000F8980000F8C89000F8980000F898 0000F8980000F8980000F8980000F8980000F8980000F8980000F8980000F898 0000F8980000F8980000F898000000000000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000000000000000000000000000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000000000000000000000000000000000000000000000000000FBFB FBFFF4F4F4FFF5F5F5FFF5F5F5FFF5F5F5FFF1F1F1FFEFEFEFFFE9E9E9FFFCFC FCFFE7E7E7FFC2C2C2FF0000000000000000F8980000F8C89000F8C89000F8C8 9000F8C89000F8C89000F89800000000000000000000041A9800093492000000 980000009800000098000000980000009800F8980000F8C89000F8980000F898 0000F8980000F8980000F8980000F8980000F8980000041A9800093492000000 980000009800000098000000980000009800F8980000F8C89000F8980000F898 0000F8980000F8980000F8980000F8980000F8980000F8980000F8980000F898 000000000000000000000000000000000000000000000000000000000000F8F8 F8FFFBFBFBFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFF8F8 F8FFC1C1C1FF00000000000000000000000000000000F8980000F8980000F898 0000F8980000F8980000000000000000000000000000000098008195FB008195 FC006B84FD004064FE000033FF0000009800F8980000F8C89000F8C89000F8C8 9000F8C89000F8980000000000000000000000000000000098008195FB008195 FC006B84FD004064FE000033FF0000009800F8980000F8C89000F8C89000F8C8 9000F8C89000F898000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000009800000098000000 98000000980000009800000098000000980000000000F8980000F8980000F898 0000F89800000000000000000000000000000000000000009800000098000000 98000000980000009800000098000000980000000000F8980000F8980000F898 0000F89800000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000006060607423C3645A97B57B6D98C51ECE78B 47FEE38643FEDF823FFED47533FE52463E5B0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000CB7E48FEC77E44FEC37E40FEB87534FE0000000000000000006B1DF50279 1CFF000200210000000000000000000000000000000000000000000000000000 0000000000004B524BFF5F625FFF666866FF676867FF487249FF5E8960FF6B6C 6BFF6C6C6CFF676767FF5D5D5DFF000000000000000000000000000000000000 0000000000000000000000000000433D3845D09465D1FEBB79FEFEBC7AFEFEBA 76FEFEB773FEFEB56EFEF69C56FE53473E5B000000004C841DFF4C841DFFCFDE C2FF0000000000000000AF6E64FF06060607423C3645A97B57B6D98C51ECE78B 47FEE38643FEDF823FFED47533FE52463E5BD49D73FFD0874BFFFEBB76FFFEBC 77FFFEBA73FFFEB770FFFEB56BFFF69C53FF0000000000000000007723F541A0 5DFF005E18E40002002700000000000000000000000000000000000000006598 68FF475348FF8D908DFFAAABA8FFADADADFF969696FF6E6E6EFF757575FF9696 96FFADADADFFADAEADFF939393FF666666FF0000000000000000000000000000 000000000000004800FF006100FFB48D42FFFEC486FEF9B87AF9C48C5ECD8368 509182654F9181634D917F614B91312D2A34000000004C841DFF5EB05FFF4C84 1DFF62963BFFD3E0C7FF00000000B7694DFFD09465D1FEBB79FEFEBC7AFEFEBA 76FEFEB773FEFEB56EFEF69C56FE53473E5BFDC18DFFFFC587FFFFBD7CFFF5AE 73FFE8B78EFFE5B28BFFE3AF88FF6F3A14FF148E41FF0F8A39FF389E5CFF7EC0 95FF44A260FF0F7A22FF423A21B700000000000000000000000064AC6AFF517B 5EFF686C6AFFD3D3CEFF6F6A5CFF41403FFF434343FF4E4E4EFF4E4E4EFF4343 43FF3F403FFF4D5F4EFFC3C3C3FF6D6D6DFF0000000000000000000000000000 000000000000006100FF069C1FFFEAAF62FFFECB91FFD69B6AD634312D360000 0000000000000909090A0000000100000000000000004C841DFF63A74BFF63A6 4BFF63A74BFF4C841DFF8FB371FFF9BB86FFFEC487FFF9B87AF9C48C5ECD8368 509182654F9181634D917F614B91312D2A34FFBC76FFFFCC92FFFFB97CFFF9E8 D8FFFFFFFFFFFFFFFFFFFDFAF7FFFFFFFFFF8CC8A4FF89C5A0FF87C49DFF68B5 84FF81C196FF46A464FF0D7A23FF000400300000000083C189FF73BF8CFF5E7B 6AFF818381FFD3D3CEFFC0A466FF43413EFFBCBCBCFFCECECEFFC1C1C1FFACAC ACFF3F4240FF63A476FFC3C3C3FF848484FF0000000000000000000000000000 000000000000006100FF0E9C1FFFE1B867FFFECE96FFE0A762FF534A41550000 000000000000D1864AFF3C37323F00000000000000004C841DFF6FAB56FF6FAA 56FF70AB55FF70AB55FF70AB56FFF0B165FFFECC92FFF3A76BFF8B3826FF7120 1EFF000000000909090A0000000100000000E1A562FFFFCF97FFFFBD83FFF9DF C5FFFFFFFDFFFEFEFDFFD18649FF321C0BFF6DB98DFF69B788FF64B584FF5FB2 7EFF65B481FF82C197FF3A9F5AFF007B23FC0000000052AF5CFFB4EAD3FF5590 5DFF707470FFD3D3CEFF756A56FF4A4948FF626262FF919191FF767676FF6262 62FF484948FF6B7B73FFC3C3C3FF747574FF0000000000000000000000000000 000000000000006100FF0EA527FF9EB250FFFACD92FFFDCE97FFEEB36FFFDA9D 68DAD89864DAD1864AFFD1864AFF453E3948000000004C841DFF81BD83FF81BD 83FF81BE83FF4C841DFF679A42FFFDC080FFFECE97FFF7B173FFCC906EFF4111 11FF772720FFD1864AFF3C37323F00000000986D3EFFFAC992FFFFCF99FFFFBF 82FFFFB878FFFDB274FFD18649FFD18649FF93CDACFF90CBA9FF8FCBA7FF72BB 8FFF89C7A0FF44A466FF078633FF0000000F8BCE93FF91D7AEFF9FDEB3FF81C2 6CFF738861FF909090FFE8E8E8FFDDDDDDFFC0C0C0FF898377FF897C6CFFD8D7 D5FFDDDDDDFFC3C3C3FF909090FF536D54FF0000000000000000000000000000 000000000000006100FF0EB537FF39A832FFB9B55BFFFFCD93FFFED19CFFFED2 9DFFFECF99FEFFCE95FFD1864AFFD1864AFF000000004C841DFF87C593FF4C84 1DFF76A654FFD3E0C7FFE9DCD8FFEBBE87FFFECD95FFFECE99FFF6B273FFF5A6 66FFEB9555FFD1864AFFD1864AFF00000000D49D73FFB78950FFFFCD93FFFFD2 9DFFFFD39EFFFFD09AFFFFCE95FFD18649FFD18649FF2F9D60FF53AE7AFF90CB A9FF4DAA72FF178F44FFA87955FF000000006CC476FFAFE9CFFF82D48FFFBEDC 89FFBCC47CFF9E875CFF8A8781FF9D9D9DFF847D73FFAC7D49FFAF8144FF837D 73FF9D9D9DFF828683FF87A596FF3E8141FF0000000000000000000000000000 000000000000006100FF16B548FF0EAD37FF27AE3CFF74B24DFFA8B153FFB69D 4AFFB69446FFD1864AFFD1864AFF2C29272D000000004C841DFF4C841DFFCFDE C2FFE3CFCCFFB58073FFD3CDB8FFE1D9B8FFF6CA8FFFFFCD93FFFED19DFFFED2 9DFFFECF99FFFFCE95FFD1864AFFD1864AFFD49D73FFFFFFFFFFFFE1C1FFFFD2 A2FFFFCA95FFFFC591FFD18649FFD18649FFFBF9F7FFFBF9F5FF37A167FF58B2 80FF269755FFF7FBF9FFB17A58FF0000000062C46FFFBDEFDDFF70D17AFF8FD1 69FFBBE09DFFC7A65BFFD3AF5BFFC59850FFC5BB6BFFAED177FFB3C36AFFAEA8 5CFF78A854FF57A264FFB0E3CEFF348138FF0000000000000000000000000000 000000000000006100FF50BD50FF58BD50FF48BD50FF48BD50FF48BD50FF0061 00FF005000FFD1864AFF2E2B292F00000000000000000000000000000000AE69 5EFF9F5549FFA96257FFE0E6D2FFEDF0F0FFE3D1C7FFEDD3A7FFEFBF87FFEEB1 77FFDE8F55FFD1864AFFD1864AFF2C29272DD59F74FFFFFFFFFFFDFDFCFFFDFD FBFFFDFDFAFFFCFCF9FFD18649FFFFFFFFFFFBF8F4FFFBF7F3FF3DA56EFF2F9E 63FFF1EFE7FFFFFFFFFFB47C5AFF0000000064C570FFBDF0DCFF80D882FF74DB 6AFFBEE599FFCCDFA6FFCAA75AFFC1BC69FFB7DA8AFFA5D85DFF74D13CFF67D0 43FF56BB4DFF60AA69FFB1E4CEFF39853DFF0000000000000000000000000000 000000000000006100FF58C658FF69C669FF69C661FF48BD50FF006100FF0048 00FF0000000000000000000000000000000000000000B3776CFFB3776CFF0000 0000B7ADB8FFA96057FFDBE2CAFFEDF1F1FFEDF1F1FFDBE0CAFFCFC5AEFFA860 57FFB7ADB8FFDD975FE42E2B292F00000000D8A177FFFFFFFFFFFDFDFAFFFCFC FAFFFCFBF9FFFBFAF6FFFBF8F5FFFBF7F4FFFBF6F1FFF8F4EEFFF7F2EBFFF7F0 EAFFF6ECE8FFFFFFFFFFB6805CFF0000000070C97BFFB2ECD2FF9AE2A1FF9CEA 8CFFD4EDB6FFD0EAC7FFCFB86BFFCCB063FFCBC972FF73DB64FF63D94AFF62D7 4AFF69D35AFF70BA7BFFA4DBC1FF49924EFF0000000000000000000000000000 000000000000006100FF69C669FF79D679FF79D679FF006100FF004800FF0000 0000000000000000000000000000000000000000000000000000000000000000 0000A4584FFFDBE0CAFFA4584FFFDCE2CAFFE0E6D2FFD3CDB8FFA0594DFFB7AD B8FFB7ADB8FFA86057FFAF6E63FF00000000D9A277FFFFFFFFFFFCFBF9FFFCFB F8FFFBF9F7FFFBF7F4FFFAF7F2FFF9F5F0FFF7F3EDFFF6EFEAFFF5EBE7FFF3EA E4FFF2E7DEFFFFFFFFFFB9845EFF0000000093D69BFF97DEB4FFB4EBCCFFB0EF A6FFC9EEA8FFD1EAC9FFD5CF8CFFD9CB8AFFCDB363FFBBBB64FF99D66EFF81DE 70FF77DC6EFF90D0A2FF87C8A3FF6FAD73FF0000000000000000000000000000 000000000000006100FF61C661FF8CD68CFF006100FF004800FF000000000000 000000000000000000000000000000000000000000000000000000000000B7AD B8FF9B4E42FFEDF1F1FFDBE0CAFF974F41FF974D41FF9B4E42FF000000008D40 30FF974D41FF000000000000000000000000DBA378FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFBC8661FF000000000000000061C46DFFBFF3E2FFB4EF B3FFB4F0ABFFC0EDB6FFD4E3B6FFD9D89BFFDAD394FFCDB46AFFC7B26AFFB4CB 83FF93DF99FFAEE7CDFF459B4CFF000000000000000000000000000000000000 000000000000006100FF37AD37FF006100FF004800FF00000000000000000000 00000000000000000000000000000000000000000000B27369FFAF6C62FFA963 57FFA4584EFF904638FF904638FFB7ADB8FF9F5549FFB7ADB8FF000000000000 000000000000000000000000000000000000DCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFBF8A64FF000000000000000098D8A0FF86D79FFFBFF2 DEFFC7F2D6FFD5EFD5FFD0E9CFFFD5DBA5FFDCDEAAFFDBCD8FFFD7C88AFFC9C0 8DFFBCD5AEFF77C790FF7BBC83FF000000000000000000000000000000000000 000000000000004800FF006100FF004800FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000B7ADB8FFA75D53FFB7ADB8FF0000000000000000AE6C61FF000000000000 000000000000000000000000000000000000D2A882FDE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFBC8D64FD00000000000000000000000084D08EFF8BD8 A1FFCDF5E8FFD4EDDAFFCEEDD3FFCFDFAEFFD6DEB4FFD4D4A1FFCED0A0FFC3D0 A9FF86C990FF6FBC77FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000AF6C62FF000000000000000000000000B3776CFF000000000000 0000000000000000000000000000000000001D130E6BCA9F80F4DCA679FFDCA5 78FFDAA378FFD8A177FFD59F74FFD49D73FFD29C71FFCF9970FFCE986EFFCB95 6DFFC9936AFFB38A6EF41D130E6B0000000000000000000000000000000098D8 A1FF62C46FFFA4E1BAFFB9EACCFFC4E0BDFFC4DAB3FFBCD7AFFFA5D7ABFF5CBE 68FF88CD91FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000B3756CFF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000095D79DFF71CA7DFF64C571FF62C46FFF6BC877FF90D599FF0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000353D4146457B9DBE427CA0C43841474D127B2CEB0178 1BFF030303040000000000000000000000000000000000000000000000000000 00000000000000000000353D4146457B9DBE427CA0C43841474D127B2CEB0178 1BFF03030304000000000000000000000000000000005E50476B95674ABCB166 39EDB56533F7B56533F7B56533F7B56433F7B56432F7B46431F76F6F6FFF5959 59FFB06436EF956547BD574B4363000000000000000000000000006400FF0064 00FFB59A9BFFB59A9BFFB59A9BFFB59A9BFFB59A9BFFB59A9BFFB59A9BFF0064 00FF006400FF0000000000000000000000000000000000000000000000000000 00002427292B4C758EA52A8CC7FE8ECDEBFF6CB6E2FF3D8DC8FF088135F840A0 5CFF28763ACC0505050600000000000000000000000000000000000000000000 00002427292B4C758EA52A8CC7FE8ECDEBFF6CB6E2FF3D8DC8FF088135F840A0 5CFF28763ACC05050506000000000000000000000000AA6A41DEEBE4DFF2F5EA DDFDF6EBDEFFF6EADEFFF6EADCFFB2ADA7FF666666FFD4CFCAFFA1A1A1FF8A8A 8AFFC7C4C1FE5B5B5BFF6E5C50F30000000000000000006400FF009900FF0099 00FFE5DEDFFF006400FF006400FFE4E7E7FFE0E3E6FFD9DFE0FFCCC9CCFF0064 00FF017B01FF006400FF00000000000000000000000000000000141515164D68 76853891C1EF81C3E5FF1F974FFF199147FF138F41FF0E8B39FF379E5BFF7DC0 95FF43A25FFF227939D606060607000000000000000000000000141515164D68 76853891C1EF81C3E5FF1F974FFF199147FF138F41FF0E8B39FF379E5BFF7DC0 95FF43A25FFF227939D6060606070000000000000000B86F3BF5F4EADEFEFDBE 65FFFCBC64FFFBBD62FFFCBD61FF9F9F9FFFC9C9C9FFA4A4A4FFCACACAFFC1C1 C1FFA0A0A0FFC3C3C3FF6A6A6AFF0202020300000000006400FF009900FF0099 00FFE9E2E2FF006400FF006400FFE2E1E3FFE2E6E8FFDDE2E4FFCFCCCFFF0064 00FF017B01FF006400FF00000000000000000505050645565D654792B7DB7ABF E0FFC7EEFCFFCCF2FFFF269A58FF8FCAA8FF8CC8A4FF89C5A0FF87C49DFF67B5 84FF81C196FF45A463FF167B38E8111212130505050645565D654792B7DB7ABF E0FFC7EEFCFFCCF2FFFF269A58FF8FCAA8FF8CC8A4FF89C5A0FF87C49DFF67B5 84FF81C196FF45A463FF167B38E81112121300000000BC753DF7F7EDE3FFFDC1 6BFFFFD89FFFFFD79DFFF9D39BFFCDB99BFFC9C9C9FFBCBCBCFF9B9997FF9997 93FFB4B4B4FFC1C1C1FF896954FC1111111200000000006400FF009900FF0099 00FFECE4E4FF006400FF006400FFDFDDDFFFE1E6E8FFE0E5E7FFD3D0D2FF0064 00FF017B01FF006400FF0000000000000000538AA2BB74BCDCFFBEE5F6FFDBF6 FFFFC0EEFFFFA4E5FFFF2E9E60FF93CDACFF6CB98DFF68B788FF63B584FF5EB2 7DFF64B481FF82C197FF399F59FF007D26FE538AA2BB74BCDCFFBEE5F6FFDBF6 FFFF143F57FF265E87FF4587BAFF529BB7FF6CB98DFF68B788FF63B584FF5EB2 7DFF64B481FF82C197FF399F59FF007D26FE00000000BF7941F7F7F0E6FFF8B3 52FFF7B353FFF7B451FFA4A4A4FFB6B6B6FFE1E1E1FF9B9B9BFFF7B14EFFF7B1 4CFF9A9690FFD5D5D5FF989898FF626262FF00000000006400FF009900FF0099 00FFEFE6E6FFEDE5E5FFE5DEDFFFE0DDDFFFDFE0E2FFE0E1E3FFD6D0D2FF0064 00FF017B01FF006400FF000000000000000043A5CFF9E7FBFEFFDDF6FFFFC0EF FFFFB6EBFFFFAAE8FFFF34A268FF95CEAFFF93CDACFF90CBA9FF8FCBA7FF71BB 8FFF89C7A0FF43A465FF078735FF2683BDF843A5CFF9E7FBFEFFDDF6FFFFC0EF FFFF2A6483FF93C7F9FF90C9F9FF3E84C9FF1E65A9FF90CBA9FF8FCBA7FF71BB 8FFF89C7A0FF43A465FF078735FF2683BDF800000000C07E43F7F8F1E8FFFEE5 D5FFFDE5D3FFFDE5D3FFB3B3B3FFCACACAFFE8E8E8FF858585FFFCE2CCFFFBE0 C9FF999897FFE2E2E2FFB5B5B5FF868686FF00000000006400FF009900FF0099 00FF009900FF009900FF009900FF009900FF009900FF009900FF009900FF0099 00FF009900FF006400FF000000000000000048A4C9F0E2F6FCFFD4F3FFFFC9F0 FFFFBDEDFFFFB2EAFFFF3AA46CFF35A36CFF30A166FF2C9D60FF52AE79FF90CB A9FF4CAA71FF158E44FF82C4EBFF2D85BBF048A4C9F0E2F6FCFFD4F3FFFFC9F0 FFFF4088A9FFE0F2FFFF5199D8FF1777BDFF4697C4FF2E74AFFF52AE79FF90CB A9FF4CAA71FF158E44FF82C4EBFF2D85BBF000000000C08146F7F8F2EBFFFEE7 D6FFFDE7D6FFFDE7D6FFFDE7D6FFD7CCC3FFD2D2D2FFAAAAAAFF808080FF8989 89FFB3B3B3FFCACACAFFA48872FC0000000000000000006400FF009900FFB1D0 B1FFB1D0B1FFB1D0B1FFB1D0B1FFB1D0B1FFB1D0B1FFB1D0B1FFB1D0B1FFB1D0 B1FF009900FF006400FF00000000000000004BA6CAF0E2F6FCFFD7F4FFFFCEF2 FFFFC8EFFFFFB9EBFFFF91DBFBFF53C0F1FF45C1F9FF38BCF0FF30A16BFF57B2 80FF259754FF44B0E6FF87CAEEFF2F87BCF04BA6CAF0E2F6FCFFD7F4FFFFCEF2 FFFFC8EFFFFF77B5D5FF8FB6D1FF52C9E4FF58DFF5FF75D0EDFF3A8CCBFF57B2 80FF259754FF44B0E6FF87CAEEFF2F87BCF000000000C08348F7F9F3ECFFFEE8 D6FFFEE8D7FFFDE7D6FFFDE7D6FFB9B9B9FFDADADAFFBEBEBEFFD6D6D6FFD8D8 D8FFB7B7B7FFD4D4D4FF878787FF0909090A00000000006400FF009900FFF9F9 F9FFF9F9F9FFF9F9F9FFF9F9F9FF81B7E6FF69AEE3FF51A4E1FF4EA4E0FF4AA3 E0FF419FDAFF3D9DDAFF499ED9F84F86B3CA4CA9CBF0E2F6FDFFDAF4FFFFD5F3 FFFFBCEBFFFF88D5F7FF66C9F5FF49B3E9FF8CDAFBFF8BDCFFFF35A573FF2E9E 62FF45BEE8FF4CBAE8FF8BD0F0FF328ABEF04CA9CBF0E2F6FDFFDAF4FFFFD5F3 FFFFBCEBFFFF88D5F7FF70B7D3FFC1F6FDFF60DFF7FF5AE2F8FF76D3F0FF3E90 D4FF42B7E5FF4CBAE8FF8BD0F0FF328ABEF000000000C0874AF7F9F4EDFFFEE8 D8FFFEE8D8FFFEE8D7FFFEE7D6FFDFD3C9FFBDBCBBFFEDD8C8FFBFBFBFFFBDBD BDFFE4CFBBFFB0AFAFFFAF947CFC0000000000000000006400FF009900FFF9F9 F9FFF9F9F9FFF9F9F9FFF9F9F9FF77B7E6FFB5E9F8FF8EE0F6FF79DCF5FF65D7 F3FF52D1F1FF42CEF0FF62D5F2FE67AFDEF84EAACCF0E2F8FDFFD4F3FFFFAFE4 FAFF85CFF1FF7CD0F5FF75D0F5FF49B0E4FFAFE4FAFFB5E9FFFF4F8C75FF1B69 38FF166834FF1B6938FF4D8972FF348CBFF04EAACCF0E2F8FDFFD4F3FFFFAFE4 FAFF85CFF1FF7CD0F5FF75D0F5FF74CBE7FFC7F7FDFF5BDCF5FF57E1F7FF78D4 F1FF3E96DDFF38ABE5FF8FD5F1FF348CBFF000000000C0874BF7F9F4EFFFFEE7 D7FFFDE7D6FFFDE7D5FFFDE6D4FFFCE6D2FFFBE1CCFFFADFC7FFB9B8B7FFB3B3 B3FFF6D8BAFFFAF4EFFFC08247F70000000000000000006400FF009900FFF9F9 F9FFCDCDCDFFCDCDCDFFCDCDCDFF77BDE5FFC8F1FBFFA3E9F9FF8CE3F6FF71DE F5FF59D7F3FF43D2F2FF60D8F3FE6AB5DFF94CB1D4FBE1F8FEFFCDEBF9FF91D2 EDFF83CCEBFF6CBEE5FF53B0DBFF3893C8FFCEECFAFF29797AFF258B50FF61B9 8CFF94D2B1FF61B98CFF258B50FF387968FE4CB1D4FBE1F8FEFFCDEBF9FF91D2 EDFF83CCEBFF6CBEE5FF53B0DBFF3893C8FF76D3EEFFC7F7FDFF5CDCF5FF58E2 F7FF77D6F2FF469EE1FF74CCF2FF3091C7FB00000000C0884CF7F9F4F0FFFCE6 D3FFFCE6D4FFFDE7D3FFFCE4D1FFFBE3CDFFFAE0C8FFF8DCC1FFF5D6BAFFF3D4 B4FFF1D2B2FFF8F4F0FFBF8147F70000000000000000006400FF009900FFF9F9 F9FFF9F9F9FFF9F9F9FFF9F9F9FF7BC3E7FFEDFAFEFFDFF7FDFFD3F4FBFFA4E9 F8FF77DFF5FF61D9F4FF77DDF5FE6CBAE0F95A82909F4BB3D8FEA4D9EDFFD2EB F5FFBDDEEDFF94C9DEFF88C2DBFF6DB7D6FF66B8DDFF1B6C3CFF5FB98AFF5DB9 86FFFFFFFFFF5DB886FF64BB8EFF196936FF5A82909F4BB3D8FEA4D9EDFFD2EB F5FFBDDEEDFF94C9DEFF88C2DBFF6DB7D6FF66B8DDFF78D3ECFFC3F6FDFF69DD F6FF6ACAEDFF60A2D7FF599AD2FF4F7D98B300000000C0884CF7F9F5F1FFFCE3 CFFFFBE4D0FFFCE4CFFFFCE3CDFFFAE1CAFFF9DDC3FFF6D9BBFFF4E9DFFFF7F2 ECFFFBF7F3FFF5EFE9FFBF7B44FB0000000000000000006400FF009900FFF9F9 F9FFCDCDCDFFCDCDCDFFCDCDCDFF74C5E5FFABE0F3FF82CDEEFFA2DAF1FFC9EC F8FFCAECF7FFC6EBF7FFD1EFF9FE78C3DFF800000000384042465A96ACC27BC5 E0FFD1EEF7FFF6FFFFFFF0FEFFFFCBEDFBFF4DACDAFF2E7849FF9BD4B5FFFFFF FFFFFFFFFFFFFFFFFFFF94D2B1FF166834FF00000000384042465A96ACC27BC5 E0FFD1EEF7FFF6FFFFFFF0FEFFFFCBEDFBFF4DACDAFF8AD7F7FF79D2EAFFB1E3 F9FF8ABFE7FFADD3F6FFC3E0FCFF659CCDF700000000C0874DF6F9F5F1FFFCE3 CDFFFBE3CEFFFBE3CDFFFBE2CBFFF9E0C8FFF8DCC1FFF5D6B9FFFDFBF8FFFCE6 CDFFFAE5C9FFE2B583FF8A6C55A60000000000000000006400FF009900FFF9F9 F9FFF9F9F9FFF9F9F9FFF9F9F9FF7CC9E6FFACE8F8FF92DCF4FF9BDCF3FFC8EC F8FFCAECF7FFC6EBF7FFD0EEF8FD77BBD3E80000000000000000040404054859 5F6555A2BDDB91CFE5FFE6F8FCFFE3F6FEFFAEDDF2FF41875EFF8FD3B0FF91D6 B0FFFFFFFFFF62BB8BFF64BB8EFF166937FF0000000000000000040404054859 5F6555A2BDDB91CFE5FFE6F8FCFFE3F6FEFFAEDDF2FFB1E4F7FF6FBFE1FF74BD E7FFB3D2F0FFE5F3FFFFABD2EFFF4E87B9E800000000B88550EAF7F3EFFCFAE0 C7FFFBE1C9FFFBE2C9FFFBE0C8FFF9DFC4FFF8DBC0FFF4D6B7FFFFFBF8FFF6D8 B3FFE1AF7AFFD49063F606060607000000000000000000000000006400FFF9F9 F9FFF9F9F9FFF9F9F9FFF9F9F9FF6DC8E4FFC8EAF5FFC8EAF5FFC5E9F4FF97D7 EBFF36A194FF5D8D9BAA608B98A54353575D0000000000000000000000000000 000014151516546F79844FAACBEF9BD5EAFF87CCE7FF46A5A7FF5EAA80FF94D4 B3FFB9E6D0FF67BA8EFF2A8E54FF1C7472FF0000000000000000000000000000 000014151516546F79844FAACBEF9BD5EAFF87CCE7FF48A7CDF353717E8C1718 191A55A4D8FF84B0DBFF439CD0FF404F575E000000009F7B56C3E4E0DBECF5F1 EBFCF8F4EDFFF8F3EDFFF8F3EDFFF8F3EDFFF8F2ECFFF7F2ECFFF2E6D7FFE2B1 7AFFD39164F50606060700000000000000000000000000000000000000000000 00000000000000000000000000003A43464A414C4F53414C4F533F4A4D512225 2728040404050303030403030304010101020000000000000000000000000000 000000000000000000002528292B598A9CAF5890A5BC2A2D2F314BA9ACFF5495 71FF4C8D63FF3D855DFF579F9CFF000000000000000000000000000000000000 000000000000000000002528292B598A9CAF5890A5BC2A2D2F31000000000000 00000000000000000000000000000000000000000000574D45609D7C59BBBD89 52EEC38A4FF6C28A50F7C28A50F7C28B50F7C38A50F7C18950F7AB8256D47D64 5091050505060000000000000000000000000000000000000000000000000000 00000000000000000000353D4146457B9DBE427CA0C43841474D45526A781D4F A8DF0340BAFE1A4EABE3404F697A000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000465D4E88216A 3CF2166834FF216A3CF2465D4E88000000000000000000000000000000000000 00000000000000000000353D4146457B9DBE427CA0C43841474D127B2CEB0178 1BFF030303040000000000000000000000001312121466574C84755F4DA37D61 4CB6133D53FD275D84FE4786BAFF537F99FE866146FF99663EFFA2714CFFAC81 5CFF886042D92F2D2B3400000000000000000000000000000000000000000000 00002427292B4C758EA52A8CC7FE8ECDEBFF6CB6E2FF2A6FC4FF2362C8FE1E74 E6FF0376EAFF0061DDFF054BBBFC404F697A0000000000000000000000000000 00000000000000000000000000000000000000000000465B4D84258B50FF61B9 8CFF94D2B1FF61B98CFF258B50FF465E4F8C0000000000000000000000000000 00002427292B4C758EA52A8CC7FE8ECDEBFF6CB6E2FF3D8DC8FF088135F840A0 5CFF28763ACC050505060000000000000000564D4568B78F6AFFD6B9A2FFDFC5 B2FF2B6483FF93C7F9FF90C9F9FF3E84C9FF2468ADFFD8E5F0FFFBEBDFFFFBEF E6FFC09C7DFF5A50476F00000000000000000000000000000000141515164D68 76853891C1EF81C3E5FFCCF4FFFFC3EFFFFF8AD2F1FF1051BEFF609CF4FF157C FFFF0073F8FF0073EEFF0165E1FF194DABE400000000465868704B7395A63784 C9EA3087D2F73087D2F73087D2F73087D2F73087D2F7196A3BFF5FB98AFF5DB9 86FFFFFFFFFF5DB886FF64BB8EFF1D6A39F70000000000000000141515164D68 76853891C1EF81C3E5FF1F974FFF199147FF138F41FF0E8B39FF379E5BFF7DC0 95FF43A25FFF227939D606060607000000006B5B4E89C7A384FFFFFFFFFFFFFF FFFF4088A9FFE0F2FFFF5199D8FF1777BDFF4697C4FF468DC5FFC5A692FFFAE8 DBFFCEAE94FF6C5C4E8B00000000000000000505050645565D654792B7DB7ABF E0FFC7EEFCFFCCF2FFFFA7E8FFFF93E0FEFF3EB9E7FF023FBBFFADCDFEFFFFFF FFFFFFFFFFFFFFFFFFFF157CEFFF0340BAFE000000003D89C6E6D1E1EBF0A6DB F2FD9DDBF4FF95DAF3FF8DD8F3FF85D7F3FF7CD4F2FF2E7849FF9BD4B5FFFFFF FFFFFFFFFFFFFFFFFFFF94D2B1FF166834FF0505050645565D654792B7DB7ABF E0FFC7EEFCFFCCF2FFFF269A58FF8FCAA8FF8CC8A4FF89C5A0FF87C49DFF67B5 84FF81C196FF45A463FF167B38E8111212134B453F579A673BF6B38456FFD9A4 78FF8E887DFF77B5D5FF8FB6D1FF52C9E4FF58DFF5FF75D0EDFF4C94D0FFE0D8 D2FFD8BAA1FF7863519E0000000000000000538AA2BB74BCDCFFBEE5F6FFDBF6 FFFFC0EEFFFFA4E5FFFF9EE3FFFF93E1FEFF43C0EAFF0850BEFF8CB4F6FF4A91 FFFF0F74FFFF1E85FFFF3D89EBFF0C4BB5F7000000003791D4F7EFFAFEFFA0E9 F9FF90E5F8FF80E1F7FF6FDEF6FF60DAF5FF51D7F4FF41885FFF8FD3B0FF91D6 B0FFFFFFFFFF62BB8BFF64BB8EFF1D6A39F7538AA2BB74BCDCFFBEE5F6FFDBF6 FFFFC0EEFFFFA4E5FFFF2E9E60FF93CDACFF6CB98DFF68B788FF63B584FF5EB2 7DFF64B481FF82C197FF399F59FF007D26FE13131214816952ABD5AD8BFFFDF0 E5FFF7C7A1FFAEB5AFFF73B8D5FFC1F6FDFF60DFF7FF5AE2F8FF76D3F0FF4797 DCFFCDC5BDFF856A51B3000000000000000043A5CFF9E7FBFEFFDDF6FFFFC0EF FFFFB6EBFFFFAAE8FFFFA3E4FFFF95E1FEFF45C5EBFF2D8CD8FF3572D1FF8CB4 F7FFB7D6FEFF6FA7F5FF2B69CBFF1765BDFB000000003898D5F8F2FAFDFFB2ED FAFFA3E9F9FF94E6F8FF84E2F7FF73DEF6FF62DBF5FF51B2ADFF5EAA80FF94D4 B3FFB9E6D0FF67BA8EFF2A8E54FF465E4F8C43A5CFF9E7FBFEFFDDF6FFFFC0EF FFFFB6EBFFFFAAE8FFFF34A268FF95CEAFFF93CDACFF90CBA9FF8FCBA7FF71BB 8FFF89C7A0FF43A465FF078735FF2683BDF80000000025242328B68553FFFEFE FDFFFADEC1FFFADCBEFFACBDBCFF74CBE7FFC7F7FDFF5BDCF5FF57E1F7FF78D4 F1FF4898DBFF857768D5000000000000000048A4C9F0E2F6FCFFD4F3FFFFC9F0 FFFFBDEDFFFFB2EAFFFFACE7FFFF79D9FEFF45C7EFFF40C3EAFF2F8DD7FF1156 C3FF023FBBFF084DBDFF4488D4FF2D85BBF000000000379ED5F9F6FCFEFFC8F2 FCFFB8EFFBFFABECFAFF9BE8F9FF8AE3F7FF79E0F6FF69DCF6FF58B6B3FF5596 72FF4C8D63FF44895EFF328B91FB0000000048A4C9F0E2F6FCFFD4F3FFFFC9F0 FFFFBDEDFFFFB2EAFFFF3AA46CFF35A36CFF30A166FF2C9D60FF52AE79FF90CB A9FF4CAA71FF158E44FF82C4EBFF2D85BBF0000000001C1C1B1EB8854FFFFEFC F9FFF9DCBEFFF8DBBEFFF8DCBFFFBACEC9FF76D3EEFFC7F7FDFF5CDCF5FF58E2 F7FF77D6F2FF4896D0FD292B2E30000000004BA6CAF0E2F6FCFFD7F4FFFFCEF2 FFFFC8EFFFFFB9EBFFFF91DBFBFF53C0F1FF45C1F9FF38BCF0FF44C4ECFF42BC E9FF3FB4E6FF44B0E6FF87CAEEFF2F87BCF00000000037A4D5FAFEFFFFFFF8FD FFFFF6FDFFFFF5FCFFFFF3FCFEFFD8F6FCFF93E6F8FF84E3F7FF73DFF6FF65DB F5FF59D8F4FFD7F4FCFF37A1D4F7000000004BA6CAF0E2F6FCFFD7F4FFFFCEF2 FFFFC8EFFFFFB9EBFFFF91DBFBFF53C0F1FF45C1F9FF38BCF0FF30A16BFF57B2 80FF259754FF44B0E6FF87CAEEFF2F87BCF00000000008080809B88448FFFEFB F7FFF9DCC0FFF8DCBEFFF8DCBEFFF8DBBFFFBCD2CAFF7AD4EEFFC3F6FDFF69DD F6FF6ACAEDFF60A2D7FF5E95C5EC212324264CA9CBF0E2F6FDFFDAF4FFFFD5F3 FFFFBCEBFFFF88D5F7FF66C9F5FF49B3E9FF8CDAFBFF8BDCFFFF45C3F9FF35B5 ECFF45BEE8FF4CBAE8FF8BD0F0FF328ABEF00000000035A7D5FAE8F6FBFF93D4 EFFF87CEEEFF70C0E9FFC9E9F6FFF2FCFEFFF3FCFEFFF2FCFEFFF0FCFEFFEFFB FEFFEEFBFEFFFEFFFFFF38A6D4F7000000004CA9CBF0E2F6FDFFDAF4FFFFD5F3 FFFFBCEBFFFF88D5F7FF66C9F5FF49B3E9FF8CDAFBFF8BDCFFFF35A573FF2E9E 62FF45BEE8FF4CBAE8FF8BD0F0FF328ABEF00000000000000000B8874AF9FCF6 F0FFF9DFC7FFF9DCBCFFFADCBEFFFADBC0FFFADDC2FFB1D0CDFF80D5EDFFB1E3 F9FF8ABFE7FFADD3F6FFC3E0FCFF659CCDF74EAACCF0E2F8FDFFD4F3FFFFAFE4 FAFF85CFF1FF7CD0F5FF75D0F5FF49B0E4FFAFE4FAFFB5E9FFFF9AE1FFFF75D6 FEFF3DBCF5FF3AB4E9FF8FD5F1FF348CBFF0000000003BA4D0F2F1FAFDFF93DE F5FF92DCF4FF80D5F2FF67CAEDFF69CBEAFF84D3EFFF7DD2EFFF77D0EFFF73CF EEFF6FCFEEFFE9F7FBFF38A8D0F3000000004EAACCF0E2F8FDFFD4F3FFFFAFE4 FAFF85CFF1FF7CD0F5FF75D0F5FF49B0E4FFAFE4FAFFB5E9FFFF9AE1FFFF75D6 FEFF3DBCF5FF3AB4E9FF8FD5F1FF348CBFF00000000000000000AD8656DAF5E7 D8FFFAE5D2FFF9DABBFFF9DBBBFFFADBBEFFFADDC0FFFADDC0FFACD0CFFF74BD E7FFB3D2F0FFE5F3FFFFABD2EFFF4E87B9E84CB1D4FBE1F8FEFFCDEBF9FF91D2 EDFF83CCEBFF6CBEE5FF53B0DBFF3893C8FFCEECFAFFD9F5FFFFB8EAFFFF94DF FEFF74D5FFFFA4E4FFFF83DCFBFF3091C7FB000000003BA8CFF0F7FCFEFF8DE4 F8FF90DEF5FF9EE0F5FFABE1F6FFEFFBFEFFF4FDFEFFF3FCFEFFF1FCFEFFEFFB FEFFEEFBFEFFF4F7F9F9479BBAD4000000004CB1D4FBE1F8FEFFCDEBF9FF91D2 EDFF83CCEBFF6CBEE5FF53B0DBFF3893C8FFCEECFAFFD9F5FFFFB8EAFFFF94DF FEFF74D5FFFFA4E4FFFF83DCFBFF3091C7FB00000000000000009E815CBBF0D9 C0FFFBEDE1FFF9DABFFFF9DCC1FFF9DEC4FFFAE0C7FFFAE2CAFFFAE2CDFFB8D4 D5FF55A4D8FF84B0DBFF439CD0FF5A6A708A5A82909F4BB3D8FEA4D9EDFFD2EB F5FFBDDEEDFF94C9DEFF88C2DBFF6DB7D6FF66B8DDFF8FD7F5FF7CCFF5FF9CDB F8FFA9E3FAFF83CAECFF4EA5D5FF4D788FA60000000038AFD5F8FDFEFEFFFEFF FFFFFEFEFFFFFDFEFFFFFEFFFFFFEAF7FBFF6AC3DEF969C2DCF869C2DCF869C2 DCF876C7DEF774B7CCE13E4C5156000000005A82909F4BB3D8FEA4D9EDFFD2EB F5FFBDDEEDFF94C9DEFF88C2DBFF6DB7D6FF66B8DDFF8FD7F5FF7CCFF5FF9CDB F8FFA9E3FAFF83CAECFF4EA5D5FF4D788FA6000000000000000090795CA4EDD0 B1FFFFF6F0FFFAE1CAFFFBE3CCFFFBE3D0FFFBE6D3FFFBE9D5FFFCE9D8FFFCEA DBFFFFFFFDFFD29C6EFFEED9C0FFBE925AE500000000384042465A96ACC27BC5 E0FFD1EEF7FFF6FFFFFFF0FEFFFFCBEDFBFF4DACDAFF8AD7F7FFA9E1F9FF94D6 F2FF5FB1DBFF4C8BA9C83A43484D0000000000000000479DB6D05CBEDCFA5EBF DDFA5EBFDDFA5EBFDDFA5DBFDDFA48A5C1DD141515160E0E0E0F0E0E0E0F0E0E 0E0F0E0E0E0F0E0E0E0F030303040000000000000000384042465A96ACC27BC5 E0FFD1EEF7FFF6FFFFFFF0FEFFFFCBEDFBFF4DACDAFF8AD7F7FFA9E1F9FF94D6 F2FF5FB1DBFF4C8BA9C83A43484D00000000000000000000000084725A92EBCA A4FFFFFDFBFFFDE9D5FFFDEBD8FFFDEADBFFFDEDDFFFFDF0E2FFFDF1E4FFFCF0 E4FFFFFFFFFFE09F6DFFFFFBF9FFDFB786FF0000000000000000040404054859 5F6555A2BDDB91CFE5FFE6F8FCFFE3F6FEFFAEDDF2FFB1E4F7FF6FBFE1FF4A99 BCE0485B636C0808080900000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000040404054859 5F6555A2BDDB91CFE5FFE6F8FCFFE3F6FEFFAEDDF2FFB1E4F7FF6FBFE1FF4A99 BCE0485B636C0808080900000000000000000000000000000000796B5784EBC5 99FFFFFFFFFFFCEFE2FFFDF0E7FFFDF1EBFFFDF5EEFFFDF8F1FFFDFAF7FFFFFC FAFFFFFFFFFFFEFBF7FFF4DABFFFCA9C5EEA0000000000000000000000000000 000014151516546F79844FAACBEF9BD5EAFF87CCE7FF48A7CDF353717E8C1718 191A000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000014151516546F79844FAACBEF9BD5EAFF87CCE7FF48A7CDF353717E8C1718 191A000000000000000000000000000000000000000000000000665C4F6DEABF 8BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDF9F4FFFBF3EAFFF8EBD9FFF8E6 D3FFF5DFC5FFE9CBA5FFD0A15FED5851475D0000000000000000000000000000 000000000000000000002528292B598A9CAF5890A5BC2A2D2F31000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000002528292B598A9CAF5890A5BC2A2D2F31000000000000 000000000000000000000000000000000000000000000000000034322E36B493 64C6EABB80FFE8B674FFE6B16AFFE4AF65FFD5A560F0CBA062E3BB9864CFB896 63CCAA8D64BB9A8361A848433C4B040404050000000000000000000000000000 000000000000000000000000000000000001544F4C649D7657F4B17D53FFAE7B 4FFF9D7353F65C5752730000000000000000FBFBFBFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFBFBFF0000000000000000000000000000 00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000353D4146457B9DBE427CA0C43841474D465D4E88216A 3CF2166834FF216A3CF2465D4E88000000000000000000000000000000000000 000000000000000000003635343D98795EE7B18055FFCBAA88FFD1B394FFBA8D 60FFB48657FFAA744AFF957359EB3D3B3946FFFFFFFFAB8F78FF8C674EFF8C6C 57FF866753FF806150FF775C4CFF6F574AFF675247FF614E43FF5B4940FF5546 3FFF53423BFF412F27FF6C5E57FFFFFFFFFF0000000000000000000000000000 0000FFFFFFFFFFFFFFFF8BD1F5FF78B6D6FF1974A5FF82CFF6FFFFFFFFFFFFFF FFFF000000000000000000000000000000000000000000000000000000000000 00002427292B4C758EA52A8CC7FE8ECDEBFF6CB6E2FF29797AFF258B50FF61B9 8CFF94D2B1FF61B98CFF258B50FF465E4F8C0000000000000000000000000000 00001313131407070708AB7D54FED5BA9EFFD6BA9DFFD3B79BFFD1B293FFB688 5AFFB98D5FFFB78C5EFFB18053FFA6734BFEFFFFFFFF9F7859FFE4DBD5FFF9F6 F3FFF6F1EAFFF3EDE6FFF3ECE5FFF2EBE4FFF1EAE3FFF0E9E2FFEFE9E1FFEFE7 DEFFF2F0EEFFD1CCCBFF412F27FFFFFFFFFF0000000000000000FFFFFFFFFFFF FFFFA9D5ECFF4287AAFF3084ADFFC1E8FCFF6BB0D7FF1B76A7FF1671A2FF7DCE F6FFFFFFFFFFFFFFFFFF00000000000000000000000000000000141515164D68 76853891C1EF81C3E5FFCCF4FFFFC3EFFFFF8AD2F1FF1B6C3CFF5FB98AFF5DB9 86FFFFFFFFFF5DB886FF64BB8EFF1D6A39F700000000000000014C514C636192 65F460A167FF5EA066FFB07B4FFFE1CDB7FFD8BFA4FFD8BFA6FFD4B99CFFB78B 5DFFB6895DFFB78C5EFFB98D5FFFB07B4FFFFFFFFFFFAF8E6DFFF9F8F5FF2E83 AFFF2E83AFFF2E83AFFF2E83AFFFFBD3A9FFFBD1A4FFFBCFA0FFFBCD9BFFFBCA 96FFFBC892FFF4F1EFFF53423BFFFFFFFFFFFFFFFFFFFFFFFFFFAED8EFFF5797 B8FF5797B8FFEDF8FEFFC9EBFDFFC1E8FBFF6BB0D7FF84C5E6FF83C3E5FF1772 A3FF136E9FFF7BCDF6FFFFFFFFFFFFFFFFFF0505050645565D654792B7DB7ABF E0FFC7EEFCFFCCF2FFFFA7E8FFFF93E0FEFF3EB9E7FF2E7849FF9BD4B5FFFFFF FFFFFFFFFFFFFFFFFFFF94D2B1FF166834FF3436343D68906CE763A269FF92BF 98FF9DC7A3FF6EAB75FFAE7B4EFFE3D0BBFFDAC2AAFFD3B79DFFC7A27AFFC097 6CFFB58859FFB6895DFFB98D5FFFB07D51FFFFFFFFFF2E83AFFF2E83AFFFE1F3 F9FFD4F7FFFF76BAE1FF76BAE1FF2E83AFFF2E83AFFFFBD0A2FFFBCE9EFFFFCC 97FFFBCA96FFEFE7DDFF55463FFFFFFFFFFFFFFFFFFF73AFCDFF61A2C3FFF4FB FEFFF5FBFEFFADDFFAFFA9DEFBFFC2E8FBFF76B8D9FF81C4E6FF85C6E8FF88C9 EAFF97D5F5FF136D9EFF69B1D6FFFFFFFFFF538AA2BB74BCDCFFBEE5F6FFDBF6 FFFFC0EEFFFFA4E5FFFF9EE3FFFF93E1FEFF43C0EAFF41875EFF8FD3B0FF91D6 B0FFFFFFFFFF62BB8BFF64BB8EFF186939FD619D69FEA8CDAEFFA5CCABFFA1C9 A8FF98C49EFF68A871FFAD794CFFDCC8AFFFBE9E80FFB78C62FFD1B28EFFD1B2 8EFFBA8F63FFBB9065FFB6895DFFB07B4FFF61A5C6FFF2FBFEFFFFFFFFFFB3EC FFFFC6EBFFFF71B6D6FF93D3F5FF93D3F5FF76BAE1FF2E83AFFFFBD0A2FFFBCE 9EFFFBCD9BFFF0E8E1FF5B4940FFFFFFFFFFFFFFFFFF5393B4FFF6FBFEFFB9E5 FAFFB7E4FAFFB2E3FAFFAEE0FAFFC3E8FAFF79BADAFF84C6E8FF87C8EAFF90CE EDFF90D0F0FF95D3F3FF126D9CFFFFFFFFFF43A5CFF9E7FBFEFFDDF6FFFFC0EF FFFFB6EBFFFFAAE8FFFFA3E4FFFF95E1FEFF45C5EBFF46A5A7FF5EAA80FF94D4 B3FFB9E6D0FF67BA8EFF2A8E54FF1E7573FC5FA066FFBFDAC4FFACD0B2FFAACE B0FF9DC8A5FF6AA973FF94787BFF575EC8FF4D55E3FF4C53E0FF555CC8FF8F75 83FFBA8F63FFD1B28EFFC5A178FFA7764DFE61A5C6FFF5FFFFFFA2DDFAFFA7E0 FBFFBFE7FBFF6EB1D3FF81C6EAFF91CDEDFF93D3F5FF4899C1FFFBD1A6FFFBD0 A2FFFBCF9FFFF8EAE4FF5F4D43FFFFFFFFFFFFFFFFFF5697B8FFF7FCFEFFC3E9 FAFF8EC4E0FFA4D5EEFFB4E3FAFFC4E8FAFF7DBBDBFF88C9EAFF77BDE0FF63AD D3FF4394BEFF95D3F3FF1570A1FFFFFFFFFF48A4C9F0E2F6FCFFD4F3FFFFC9F0 FFFFBDEDFFFFB2EAFFFFACE7FFFF79D9FEFF45C7EFFF40C3EAFF4BA9ACFF5495 71FF4C8D63FF3D855DFF579F9CFF2D85BBF05D9F65FFC4DEC9FFB3D4B8FFA3C9 A9FF80AA99FF5E6AC2FF4D55E0FF6365EBFF9292F4FF5E60EAFF5558E4FF464F DCFF5D60BDFFA5887CFFC0996EFF8F7C6BC861A5C6FFF0FFFFFFB9E5F8FFC0E7 FBFFF1FBFDFF76BAE1FF81C6EAFF91D2F2FF93D3F5FF4497C0FFFBD3A9FFFBD2 A7FFFBD1A4FFF5EBE4FF675247FFFFFFFFFFFFFFFFFF5C9DBEFFD8E9F1FF76B3 D2FFD1EDFBFF8FC5E0FF71B2D3FFF0F8FCFFAEDBF3FF4E9CC4FF64AED3FFA8DB F5FF4B9BC4FF81C3E6FF1873A4FFFFFFFFFF4BA6CAF0E2F6FCFFD7F4FFFFCEF2 FFFFC8EFFFFFB9EBFFFF91DBFBFF53C0F1FF45C1F9FF38BCF0FF44C4ECFF42BC E9FF3FB4E6FF44B0E6FF87CAEEFF2F87BCF05A9E62FFB8D6BDFF86B98EFF6EAB 75FF5056DCFF6367EBFF9795F4FF9090F3FF8889F0FF585CE7FF5C5FE9FF5A5E E8FF4E55E4FF4752D7FE3B3939430909090A61A5C6FFFFFFFFFFD7EEF9FFEEFB FFFFB8E4FAFFB8E4FAFF76BAE1FF76BAE1FF81C6EAFF4B9CC5FFFCD7AFFFFBD4 ABFFFBD3A9FFF8F5F1FF6F574AFFFFFFFFFFFFFFFFFF5FA0C1FF9FC6DAFFD9F1 FCFFDCF1FCFFFAFDFEFFF9FCFEFF75BBDFFF75BBDFFFE2F2FBFFE2F2FBFFBCE4 F8FFABDDF6FF58A5CCFF1B76A7FFFFFFFFFF4CA9CBF0E2F6FDFFDAF4FFFFD5F3 FFFFBCEBFFFF88D5F7FF66C9F5FF49B3E9FF8CDAFBFF8BDCFFFF45C3F9FF35B5 ECFF45BEE8FF4CBAE8FF8BD0F0FF328ABEF0629E69FE85B98EFF98C5A1FF71AC 79FF4C54E2FFB3B0F9FF9695F4FF9292F4FF8B8CF0FF595DE8FF595EE7FF5A5E E8FF5C5FE9FF4C54E2FF2A2A2D300000000061A5C6FFFFFFFFFFB8E4FAFFB8E4 FAFFB8E4FAFF9AD0ECFFB8E4FAFFB8E4FAFF81C6EAFF4C9FC9FFFDD9B4FFFCD7 B0FFFBD5ADFFF9F5F2FF775C4CFFFFFFFFFFFFFFFFFF60A2C3FF9FC6DAFFFAFC FEFFF8FCFEFF75BBDFFF75BBDFFF79BADAFFABDCF5FF75BBDFFF75BBDFFFD5EC F9FFD5ECF9FF5AA6CDFF207AABFFFFFFFFFF4EAACCF0E2F8FDFFD4F3FFFFAFE4 FAFF85CFF1FF7CD0F5FF75D0F5FF49B0E4FFAFE4FAFFB5E9FFFF9AE1FFFF75D6 FEFF3DBCF5FF3AB4E9FF8FD5F1FF348CBFF0728B75C879B384FF73AE7BFF6CAA 75FF4B51E1FFB3B0F9FF9495F5FF6367EBFF6C6EECFF6B6FECFF5759E5FF595E E7FF5C5FE9FF4E55E2FF2A2A2D300000000061A5C6FFB8E4FAFFB8E4FAFF9AD0 ECFF8FC9E7FF8AC4E1FF9AD0ECFFB8E4FAFFB8E4FAFF4189ABFFFDDAB8FFFDDA B6FFFCD8B2FFF9F5F2FF7C5F4FFFFFFFFFFFFFFFFFFF61A3C4FFF3F9FCFF75BB DFFF75BBDFFF90CFF0FF90CFF0FF79BADAFFABDCF5FF90CFF0FF90CFF0FF75BB DFFF75BBDFFF88CBEDFF297BA8FFFFFFFFFF4CB1D4FBE1F8FEFFCDEBF9FF91D2 EDFF83CCEBFF6CBEE5FF53B0DBFF3893C8FFCEECFAFFD9F5FFFFB8EAFFFF94DF FEFF74D5FFFFA4E4FFFF83DCFBFF3091C7FB0909090A3335333B484C485B6BA7 74FF494FE0FFA1A1F4FF6769ECFF5E60EAFF9692F7FF9692F7FF6165E9FF6263 EAFF595EE7FF4C54E2FF2A2A2D3000000000FFFFFFFF61A5C6FF61A5C6FFB8E4 FAFF9AD0ECFFB8E4FAFFB8E4FAFF61A5C6FF61A5C6FFFDDEBEFFFDDDBBFFFEF6 EDFFFEF5ECFFF9F6F3FF846553FFFFFFFFFFFFFFFFFF89BAD4FF62A4C5FFD4EF FDFFAEDBF3FF90CFF0FF90CFF0FF79BADAFFABDCF5FF90CFF0FF90CFF0FFAEDB F3FFD1EEFDFF3F81A2FF79B4D2FFFFFFFFFF5A82909F4BB3D8FEA4D9EDFFD2EB F5FFBDDEEDFF94C9DEFF88C2DBFF6DB7D6FF66B8DDFF8FD7F5FF7CCFF5FF9CDB F8FFA9E3FAFF83CAECFF4EA5D5FF4D788FA60000000000000000000000000000 00005258DAFE7979F2FF9692F7FF6165E9FF4F55E3FF4F55E3FF6165E9FF9692 F7FF7979F2FF4B54D8FE2222242600000000FFFFFFFFE3D2B0FFF5EFE8FF61A5 C6FF61A5C6FF61A5C6FF61A5C6FFFDE1C4FFFDDFC1FFFDDFBFFFFDDEBEFFFEF6 EDFFEFBD8AFFE3B383FF8C6C57FFFFFFFFFFFFFFFFFFFFFFFFFFDEF0FAFF62A4 C5FF62A4C5FFD4EFFDFFAEDBF3FF79BADAFFABDCF5FFAEDBF3FFD4EFFDFF4E8E AEFF4988A8FFAAD6EEFFFFFFFFFFFFFFFFFF00000000384042465A96ACC27BC5 E0FFD1EEF7FFF6FFFFFFF0FEFFFFCBEDFBFF4DACDAFF8AD7F7FFA9E1F9FF94D6 F2FF5FB1DBFF4C8BA9C83A43484D000000000000000000000000000000000000 00007173A9C86B6CECFF6365EBFF5C5FE9FF7575F0FF7171F0FF5C5FE9FF6668 EBFF6C6EECFF7073A8C80000000000000000FFFFFFFFE5D3AEFFF0E7D7FFF5EF E4FFF7F1E9FFF7EFE7FFF9F2EAFFF8F1EBFFF6EDE5FFF6EDE5FFF6EDE4FFF7EC E3FFF1C18EFF9D7758FFFFFFFFFF000000000000000000000000FFFFFFFFFFFF FFFFDEF0FAFF61A3C4FF60A2C3FFD4EFFDFFD5EFFDFF5999BAFF5494B5FFB0DA F0FFFFFFFFFFFFFFFFFF00000000000000000000000000000000040404054859 5F6555A2BDDB91CFE5FFE6F8FCFFE3F6FEFFAEDDF2FFB1E4F7FF6FBFE1FF4A99 BCE0485B636C0808080900000000000000000000000000000000000000000000 00000909090A3333373B4848525B5E60E3FF4E54E2FF4E54E2FF5C5FE3FF494A 545E3333373B0909090A0000000000000000FFFFFFFFF0E7D3FFE5D3ADFFE2D0 AFFFDDCBA8FFD7C39FFFD2BB95FFC7AE88FFC7AE88FFBA9E79FFBA9E79FFB195 72FFA78765FFFFFFFFFF00000000000000000000000000000000000000000000 0000FFFFFFFFFFFFFFFFDEF0FAFF5EA0C1FF5C9DBEFFBAE0F3FFFFFFFFFFFFFF FFFF000000000000000000000000000000000000000000000000000000000000 000014151516546F79844FAACBEF9BD5EAFF87CCE7FF48A7CDF353717E8C1718 191A000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FBFBFBFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000002528292B598A9CAF5890A5BC2A2D2F31000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000050505061717171A1C1C1C211C1C1C2115151518040404050000 0000000000000000000000000000000000001D1D1D1F00000000000000000000 00000000000000000000000000003C3C3C43848484B49F9F9FF69E9E9EEE7474 74920D0D0D0E00000000000000000000000035353543464646E2393939FF3A3A 3AFF3B3B3BFF3A3A3AFF3A3A3AFF393939FF373737FF363636FF333333FF4141 41E2333333410000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFF000000000000000000000000000000000000000000000000000000000000 000022222223B9B9B9C3F5F5F5F8FFFFFFFFF4F4F4F8B9B9B9CD3F3F3F500505 050600000000000000000000000000000000A6A6A6EF5E5E5E6F0D0D0D0E0000 00000303030441414149898989BEADADADFFE5E5E5FFFDFDFDFFFFFFFFFFFBFB FBFFCBCBCBD6000000000000000000000000484848E2415543FF415344FF4563 49FF455B47FF476A4CFF445E48FF576559FFCAD0CBFFF8F8F8FFFFFFFFFFF7F7 F7FFC3C3C3E80000000000000000000000000000000000000000000000000000 00000000000000000000FFFFFFFFFFFFFFFF2E83AFFF2E83AFFF2E83AFFF2E83 AFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000 0000B6B6B6B8B3F5FFFF5BE3FFFF46D9FFFF47D3FFFFA0E6FFFFBBBBBBCF1818 181C00000000000000000000000000000000AFAFAFFFC1C1C1FFACACACFB9E9E 9EE0A4A4A4F4B3B3B3FFCDCDCDFFF6F6F6FFAEF1FFFF51DBFFFF3BD0FFFF3DCB FFFF9BE2FFFFB7B7B7B700000000000000003F3F3FFF455848FF444B45FF4A6A 4EFF495F4BFF4C6B50FF4A664EFFCACACAFFAEF1FFFF51DBFFFF3BD0FFFF3DCB FFFF9BE2FFFFB7B7B7B700000000000000000000000000000000000000000000 000000000000FFFFFFFF2E83AFFF2E83AFFFE1F3F9FFD4F7FFFF76BAE1FF76BA E1FF2E83AFFF2E83AFFFFFFFFFFF000000000000000000000000000000000000 0000F6F6F6F663EDFFFF5AE8FFFF4FE0FFFFD5F6FFFF3DD0FFFFF6F6F6F92121 212800000000000000000000000000000000B3B3B3FFDCDCDCFFF3F3F3FFE4E4 E4FFE7E7E7FFE9E9E9FFE8E8E8FFFEFEFEFF5DE9FFFF4FE0FFFF44D7FFFFD2F4 FFFF32C7FFFFF6F6F6F60000000000000000444444FF464646FF454545FF4040 40FF454545FF494949FF484848FFF8F8F8FF5DE9FFFF4FE0FFFF44D7FFFFD2F4 FFFF32C7FFFFF6F6F6F600000000000000000000000000000000000000000000 0000FFFFFFFF61A5C6FFF2FBFEFFFFFFFFFFB3ECFFFFC6EBFFFF71B6D6FF93D3 F5FF93D3F5FF76BAE1FF2E83AFFFFFFFFFFF0000000005050506161616191C1C 1C21FFFFFFFF60EDFFFF5FEDFFFF58E7FFFF4DDEFFFF42D6FFFFFFFFFFFF2D2D 2D3B1C1C1C20141414170404040500000000B6B6B6FFCDCDCDFFE2E2E2FFEDED EDFFEDEDEDFFF9F9F9FFFEFEFEFFFFFFFFFF5FEDFFFF58E7FFFFB7F2FFFFFFFF FFFFFFFFFFFFFFFFFFFFF5F5F5F5B6B6B6B6484848FF4B4F4CFF455046FF4958 4BFF667568FFCED0CEFFF8F8F8FFFFFFFFFF5FEDFFFF58E7FFFFB7F2FFFFFFFF FFFFFFFFFFFFFFFFFFFFF5F5F5F5B6B6B6B6FFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFF61A5C6FFF5FFFFFFA2DDFAFFA7E0FBFFBFE7FBFF6EB1D3FF81C6 EAFF91CDEDFF93D3F5FF4899C1FFFFFFFFFF22222223B8B8B8C2F5F5F5F8FFFF FFFFFFFFFFFF60EDFFFF60EDFFFFBEF7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFF4F4F4F8B9B9B9CD3F3F3F5005050506B9B9B9FFDDDDDDFFF6F6F6FFF0F0 F0FFFAFAFAFFD0BCA4FF916D43FFFFFFFFFF61EDFFFF5FECFFFF56E5FFFF4BDD FFFF40D4FFFF35CCFFFF2EC3FFFF99E0FFFF4C4C4CFF4F5F51FF4C674FFF5879 5CFFD1D6D1FFD0BCA4FF916D43FFFFFFFFFF61EDFFFF5FECFFFF56E5FFFF4BDD FFFF40D4FFFF35CCFFFF2EC3FFFF99E0FFFFFFFFFFFFD7BC9BFFD9B38CFFD9AD 81FFD9AD81FF61A5C6FFF0FFFFFFB9E5F8FFC0E7FBFFF1FBFDFF76BAE1FF81C6 EAFF91D2F2FF93D3F5FF4497C0FFFFFFFFFFB7B7B7B9CCBAA5FF886844FF7B62 43FFFFFFFFFF61EDFFFF60EDFFFF60EDFFFF5EEBFFFF54E3FFFF49DBFFFF3ED2 FFFF37CBFFFF9DE4FFFFBBBBBBCF1919191DBDBDBDFFCECECEFFE4E4E4FFF2F2 F2FFFEFEFEFFA97C47FF996F3DFFF3EFEAFF9BF4FFFF61EDFFFF5EEBFFFF54E3 FFFF49DBFFFF3ED2FFFF33CAFFFF36C5FFFF4F4F4FFF3E3E3EFF414141FF5656 56FFF9F9F9FFA97C47FF996F3DFFF3EFEAFF9BF4FFFF61EDFFFF5EEBFFFF54E3 FFFF49DBFFFF3ED2FFFF33CAFFFF36C5FFFFFFFFFFFFD9B38CFFF5DABEFFF5DA BEFFF5DABEFF61A5C6FFFFFFFFFFD7EEF9FFEEFBFFFFB8E4FAFFB8E4FAFF76BA E1FF76BAE1FF81C6EAFF4B9CC5FFFFFFFFFFF6F6F6F6A17849FF8F6A3FFF8465 41FFF1EEEAFF9BF4FFFF61EDFFFF60EDFFFF60EDFFFF5CEAFFFF52E2FFFF47D9 FFFF3CD1FFFF3ECCFFFFF6F6F6F922222229C0C0C0FFDEDEDEFFF6F6F6FFF5F5 F5FFFFFFFFFFAD7839FFA2733BFFB3956FFFF3EFEAFFFFFFFFFFFFFFFFFFFFFF FFFFEBFBFFFF74E2FFFF3CD1FFFF31C8FFFF474747FF465849FF576559FF6785 6AFFFFFFFFFFAD7839FFA2733BFFB3956FFFF3EFEAFFFFFFFFFFFFFFFFFFFFFF FFFFEBFBFFFF74E2FFFF3CD1FFFF31C8FFFFFFFFFFFFD9B38CFFFFF4EAFFD9A0 64FFFFF4EAFF61A5C6FFFFFFFFFFB8E4FAFFB8E4FAFFB8E4FAFF9AD0ECFFB8E4 FAFFB8E4FAFF81C6EAFF4C9FC9FFFFFFFFFFFFFFFFFFA4743BFF996F3DFF8D69 40FFA38E72FFF0EEEAFFFFFFFFFFFFFFFFFFFFFFFFFFEDFDFFFF85EDFFFF50E0 FFFF45D8FFFF3ACFFFFFFFFFFFFF2323232AC3C3C3FFD0D0D0FFE5E5E5FFF8F8 F8FFFFFFFFFFBB8643FFAB773AFFA0723CFF946C3EFF896740FF7C6243FF7B62 44FFAC9C89FFEBFBFFFF45D8FFFF46D2FFFF393939FF4C5D4EFF5F6560FF6C8C 70FFF9F9F9FFBB8643FFAB773AFFA0723CFF946C3EFF896740FF7C6243FF7B62 44FFAC9C89FFEBFBFFFF45D8FFFF46D2FFFFFFFFFFFFD7BC9BFFF5DABEFFF5DA BEFFF5DABEFF61A5C6FFB8E4FAFFB8E4FAFF9AD0ECFF8FC9E7FF8AC4E1FF9AD0 ECFFB8E4FAFFB8E4FAFF4189ABFFFFFFFFFFF5F5F5F5B28245FFA2733BFF966D 3EFF8B6840FF806342FF7A6143FF7A6143FF7B6244FFAC9C89FFEDFDFFFF59E7 FFFF4DDFFFFF4ED9FFFFF4F4F4F81C1C1C21C7C7C7FFDFDFDFFFF7F7F7FFFAFA FAFFF6F6F6FFE0C4A1FFB6803BFFA9763AFF9E713CFF926B3FFF876641FF7B62 43FF7B6345FFFFFFFFFF51DFFFFFA8ECFFFF363636FF555555FF616161FF6464 64FFD3D3D3FFE0C4A1FFB6803BFFA9763AFF9E713CFF926B3FFF876641FF7B62 43FF7B6345FFFFFFFFFF51DFFFFFA8ECFFFFFFFFFFFFD7BC9BFFFFF4EAFFD9A0 64FFFFF4EAFFFFF4EAFF61A5C6FF61A5C6FFB8E4FAFF9AD0ECFFB8E4FAFFB8E4 FAFF61A5C6FF61A5C6FFFFFFFFFF00000000B6B6B6B6DCC2A2FFAD7A3DFFA072 3CFF946C3EFF896740FF7C6243FF7A6143FF7A6143FF7B6345FFFFFFFFFF5FEC FFFF5AE6FFFFACEFFFFFB7B7B7C40A0A0A0BC9C9C9FFD1D1D1FFE7E7E7FFFDFD FDFFDDDDDDFFFDFDFDFFFEFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFD0C1B0FF8565 41FF7B6143FFFFFFFFFFF5F5F5F5B5B5B5B5424242FF647466FF6E8C72FF6F85 71FF728C75FFCECFCEFFF9F9F9FFFFFFFFFFFFFFFFFFFFFFFFFFD0C1B0FF8565 41FF7B6143FFFFFFFFFFF5F5F5F5B5B5B5B5FFFFFFFFCBB797FFF5DABEFFF5DA BEFFF5DABEFFF5DABEFFF5DABEFFF5DABEFF61A5C6FF61A5C6FF61A5C6FF61A5 C6FFFFFFFFFFFFFFFFFF000000000000000000000000B8B8B8B8F7F7F7F7FFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFC9BEB1FF7A6143FF7A6143FFFFFFFFFFFFFF FFFFF4F4F4F5B5B5B5B82323232500000000C5C5C5FFDFDFDFFFF8F8F8FFFEFE FEFFF7F7F7FFFEFEFEFFFDFDFDFFFFFFFFFFB17C3CFFEAE0D3FF996F3DFF8E69 3FFF856745FFF4F4F4F40000000000000000555555FF626E64FF6C8770FF678B 6CFF5E7C63FF4E5950FF434343FFF8F8F8FFB17C3CFFEAE0D3FF996F3DFF8E69 3FFF856745FFF4F4F4F40000000000000000FFFFFFFFCBB797FFFFF4EAFFD9A0 64FFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFD9AD 81FFFFFFFFFF0000000000000000000000000000000000000000000000000000 0000FFFFFFFF9B703DFF906A3FFF856541FF7B6143FF7A6143FFFFFFFFFF2222 222900000000000000000000000000000000C1C1C1FFCFCFCFFFE6E6E6FFFCFC FCFFE3E3E3FFEEEEEEFFF8F8F8FFFAFAFAFFDEC2A2FFB28245FFA3733BFF9D76 49FFCABAA7FFB5B5B5B50000000000000000585858FF5D5D5DFF5C5C5CFF3D3D 3DFF3E3E3EFF3F3F3FFF3F3F3FFFC9C9C9FFDEC2A2FFB28245FFA3733BFF9D76 49FFCABAA7FFB5B5B5B50000000000000000FFFFFFFFD7BC9BFFF5DABEFFF5DA BEFFF5DABEFFF5DABEFFF5DABEFFF5DABEFFF5DABEFFF5DABEFFF5DABEFFD9B3 8CFFFFFFFFFF0000000000000000000000000000000000000000000000000000 0000F5F5F5F5A6773EFFE8DFD3FF8E693FFF826442FF7D6447FFF4F4F4F81C1C 1C2100000000000000000000000000000000BEBEBEFFDEDEDEFFF7F7F7FFF9F9 F9FFDEDEDEFFE7E7E7FFEEEEEEFFE1E1E1FFFEFEFEFFFDFDFDFFFFFFFFFFFEFE FEFFECECECFF000000000000000000000000565656FF617564FF4E5F50FF4F6C 53FF4D6450FF587B5DFF4F6853FF59615AFFD2D5D3FFFAFCFAFFFFFFFFFFF8F8 F8FFB6B6B6B9000000000000000000000000FFFFFFFFD7BC9BFFFFF4EAFFFFF4 EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFD9AD 81FFFFFFFFFF0000000000000000000000000000000000000000000000000000 0000B6B6B6B6D8C0A3FFA87B47FF976E3EFF93714BFFC4B7A8FFB7B7B7C40A0A 0A0B00000000000000000000000000000000BBBBBBFFCECECEFFE4E4E4FFF6F6 F6FFF8F8F8FFF8F8F8FFFAFAFAFFFAFAFAFFFCFCFCFFC8C8C8FFF9F9F9FFCCCC CCFF6F6F6F7F0000000000000000000000005B5B5BE2566759FF353B36FF4B69 4FFF455948FF4C6750FF4A634EFF494949FF5D7160FF5B715EFF4D4D4DFF5252 527F00000000000000000000000000000000FFFFFFFFB99152FFB9823CFFB982 3CFFB9753BFFB9753BFFB9753BFFB9753BFFB9753BFFB9753BFFB9753BFFB975 3BFFFFFFFFFF0000000000000000000000000000000000000000000000000000 000000000000B8B8B8B8F7F7F7F7FFFFFFFFF4F4F4F5B6B6B6B9232323250000 000000000000000000000000000000000000B7B7B7FFB9B9B9FFBBBBBBFFBDBD BDFFBFBFBFFFC1C1C1FFC3C3C3FFC5C5C5FFC8C8C8FFC9C9C9FFC7C7C7FF7070 707F0000000000000000000000000000000036363642454545E62D2D2DFF2F2F 2FFF303030FF313131FF353535FF535353FF525252FF4F4F4FFF5252527F0000 000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFF0000000000000000000000000000000000000000A16868FFA168 68FFA16868FFA16868FFA16868FFA16868FFA16868FFA16868FFA16868FFA168 68FFA16868FFA16868FFA16868FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001267 9B0012679B000000000000000000000000000000000000000000B68F84FFFFEA CAFFF4E0B6FFF4D4ABFFF4D4A1FFF4CA98FFF4CA8FFFEAC084FFEAC079FFEAC0 79FFEAC079FFF4CA84FFA16868FF0000000000000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF00000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF00000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001267 9B0062CEF80012679B0000000000000000000000000000000000B68F84FFFFEA CAFFF4E0C0FFF4D4B6FFF4D4ABFFF4CAA1FFF4CA8FFFEAC084FF842101FFEAC0 79FFEAC079FFEAC084FFA16868FF0000000000000000C04600FFFFE0B6FFFFD4 ABFFFFD4ABFFFFD4A1FFFFCA98FFFFCA98FFC04600FFFFE0B6FFFFD4ABFFFFD4 ABFFFFD4A1FFFFCA98FFFFCA98FFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFF4FFFFF4E0FFFFF4E0FFFFEACAFFFFEACAFFFFE0B6FFFFD4ABFFFFD4 ABFFFFD4A1FFFFCA98FFFFCA98FFC04600FF0000000000000000000000000000 00000000000000000000000000000000000000000000126DA200126DA200126D A20081D5F80062CEF800126DA200000000000000000000000000B6988FFFFFEA E0FF847968FF847968FF847968FF565656FFF4CAA1FFC04600FF842101FF8421 01FF842101FFEAC084FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFF4E0FFFFEACAFFFFE0B6FFFFD4A1FFC04600FFFFFFFFFFFFFFF4FFFFF4 E0FFFFEACAFFFFE0B6FFFFD4A1FFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4FFFFF4 E0FFFFEACAFFFFE0B6FFFFD4A1FFC04600FF0000000000000000000000000000 0000000000000000000000000000000000001774AA007AD5F80099E5F80099E5 F80099E5F80099E5F8007AD5F8001774AA000000000000000000B6988FFFFFF4 E0FFF4E0CAFFF4E0C0FFF4E0B6FFF4D4B6FFF4D4A1FFF4CAA1FFC04600FFEAC0 84FF842101FFEAC079FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFF4E0FFFFEACAFFFFD4A1FFC04600FFFFFFFFFFFFFFFFFFFFFF F4FFFFF4E0FFFFEACAFFFFE0B6FFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF F4FFFFF4E0FFFFEACAFFFFE0B6FFC04600FF0000000000000000000000000000 00000000000000000000000000001C81B10089DDF800B1EDF800B1EDF800B1ED F800B1EDF800B1EDF80081D5F000177BB1000000000000000000C0A198FFFFFF F4FFFFEAE0FFF4E0CAFFF4E0CAFFF4E0C0FFF4D4B6FFF4D4ABFFF4CAA1FFF4CA 98FF842101FFEAC084FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFF4E0FFFFEACAFFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFF4FFFFF4E0FFFFEACAFFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFF4FFFFF4E0FFFFEACAFFC04600FF0000000000000000000000000000 00009BA6950000000000000000001C81B100E8F5F800B1EDF8001C81B1001C81 B100E8F5F800A9DDF0001C81B100000000000000000000000000CAA198FFFFFF FFFFFFF4EAFFFFEAE0FFF4E0CAFFF4E0C0FFF4E0B6FFF4D4B6FF842101FFF4CA 98FFF4CA8FFFF4CA8FFFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E0FFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF4FFFFF4E0FFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF4FFFFF4E0FFC04600FF0000000000000000000000000000 00000000000065725E00000000001C81B100EFFAFE001C81B100000000001C81 B100E8F5F8001C81B10000000000000000000000000000000000CAABA1FFFFFF FFFF847968FF847968FF847968FF565656FFF4E0C0FFC04600FF842101FF8421 01FF842101FFF4CA98FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FF00000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF00000000000000009FA99A000000 0000C8C5B800534E1E007A793C00868350002D85A80000000000000000001C81 B1001C81B1000000000000000000000000000000000000000000CAABA1FFFFFF FFFFFFFFFFFFFFF4F4FFFFF4EAFFFFEAE0FFF4E0CAFFF4E0C0FFC04600FFF4D4 ABFF842101FFF4D4A1FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFF4E0FFFFF4E0FFFFEACAFFFFEACAFFFFEACAFFFFEACAFFFFD4 ABFFFFD4ABFFFFD4ABFFFFD4ABFFC04600FF0000000000000000000000006977 66008775430098C1930089D2B4004FAB7B009D966C0000000000A1A89E000000 0000000000000000000000000000000000000000000000000000D4ABA1FFFFFF FFFFFFFFFFFFFFFFFFFFFFF4F4FFFFEAE0FFFFEAD4FFF4E0CAFFF4E0C0FFF4D4 B6FF842101FFF4CAA1FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF F4FFFFF4E0FFFFEACAFFFFE0B6FFC04600FF0000000000000000000000004344 1900AFC79C00B5E6D5007FBF970089D2B40073773B006C775E00BBBFBB000000 0000000000000000000000000000000000000000000000000000D4B6A1FFFFFF FFFF847968FF847968FF847968FF565656FFFFEAE0FFFFEAD4FFFFEAD4FFFFEA CAFFE0D4B6FFB6AB98FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFF4FFFFFFFFFFFFFFFFFFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFF4FFFFF4E0FFFFEACAFFC04600FF000000008A928100A1A8A000786D 4A00B1C69D00D0F4E700B5E5D30098C39A008A7E590000000000000000000000 0000000000000000000000000000000000000000000000000000E0B6A1FFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4EAFFFFF4EAFFF4E0CAFFB68F 79FFA17971FFA17168FFA16868FF0000000000000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFC04600FF00000000C04600FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFF4FFFFF4E0FFC04600FF0000000000000000000000009B90 5E007FC4A300B1C9A000ABC5970082774A008B8D8E007D8E7800C2C7C3000000 0000000000000000000000000000000000000000000000000000E0B6A1FFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4FFE0C0C0FFAB71 56FFEAA156FFEA8F2FFFB6684EFF0000000000000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF00000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF0000000083907C006A755E007780 4F00948C5900726945007A6F4B00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000EAC0ABFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0CAC0FFB679 5EFFFFB656FFC07956FF00000000000000000000000000000000C04600FFC046 00FFC04600FFC04600FFC04600FFC04600FF00000000C04600FFC04600FFC046 00FFC04600FFC04600FFC04600FF000000000000000000000000C04600FFC046 00FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC04600FFC046 00FFC04600FFC04600FFC04600FF00000000000000000000000000000000979C 9500000000000000000075816F00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000E0B6A1FFFFF4 F4FFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFFFF4EAFFE0C0C0FFB679 5EFFC08468FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000B7BB B7000000000000000000C5C7C500000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000E0B6A1FFEAC0 A1FFEAC0A1FFEAC0A1FFEAC0A1FFE0B6A1FFE0B6A1FFEAC0A1FFCAABA1FFAB68 5EFF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000BFBFBF00BFBFBF00BFBF BF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00BFBF BF00BFBFBF00BFBFBF000000000000000000000000002F4861FFAD7979FF0000 0000000000000000000000000000000000000000000000000000000000000000 0000006100FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000004A563100000000000000000000000000000000000000 00000000000000000000000000000000000000000000BFBFBF00E5E5E500E5E5 E500E6E6E600E6E6E600A74A1F00DBCFCC00E5E5E500E5E5E500E4E4E400E4E4 E400E4E4E400BFBFBF0000000000000000005084B5FF0671E7FF2F618CFFB579 79FF000000000000000000000000000000000000000000000000000000000061 00FF00AD00FF0000000000000000000000001CD7F5FF1CD7F5FF1CD7F5FF21E4 FEFF9FF3FDFF15C1E5FF15C1E5FF15C1E5FF1BB1D5FF1BB1D5FF81B8C1FF0000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003D4828000000000000000000000000000000 00000000000000000000000000000000000000000000BFBFBF00E8E8E800E8E8 E800E9E9E900A74A1F00A9542F00A74A1F009C514400D3BCBC00E7E7E700E6E6 E600E4E4E400BFBFBF0000000000000000002FA5FFFF37A5FFFF0E71EFFF2F61 8CFFB57979FF0000000000000000000000000000000000000000006100FF00AD 00FF00AD00FF006100FF006100FF006100FF0000000000000000000000000000 000015C1E5FF9FF3FDFF91F2FDFF6EECFEFF43E7FEFF21DBF7FF24C8EAFF2498 BBFF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000032412300B1AEB100B1AEB100000000000000 00000000000000000000000000000000000000000000BFBFBF00EBEBEB00EBEB EB00A74A1F00C6792400B1572200CC822400CC822400B4492200E8E1DB00E8E8 E800E7E7E700BFBFBF0000000000000000000000000037A5FFFF37A5FFFF0669 E7FF2F618CFFB57979FF0000000000000000000000000000000027FF27FF00AD 00FF00AD00FF27FF27FF27FF27FF27FF27FF0000000000000000000000000000 00002DC1E2FF83DDFBFF9FF3FDFF91F2FDFF6EECFEFF43E7FEFF20E5FEFF24C8 EAFF2498BBFF0000000000000000000000000000000000000000000000004A56 31000000000000000000000000003239200079621D0078631D0079631D007962 1D000000000000000000000000000000000000000000BFBFBF00EDEDED00EEEE EE00EEEEEE00DFA32F00DFA32F00EEEEEE00EAE0D600E7BB8000E0A87E00EBEB EB00E9E9E900BFBFBF000000000000000000000000000000000037A5FFFF2FA5 FFFF0671E7FF2F618CFFAD7979FF0000000000000000000000000000000027FF 27FF00AD00FF0000000000000000000000000000000000000000000000000000 00000000000024C8EAFF83DDFBFF9FF3FDFF91F2FDFF6EECFEFF43E7FEFF20E5 FEFF24C8EAFF5C818FFF00000000000000000000000000000000000000000000 0000454E2D00B1AEB10079651F007965200087C9A60081C79F0079C295002B7C 3A0078641F0000000000000000000000000000000000BFBFBF00F0F0F000F0F0 F000F1F1F100F1F1F100DFA32F00F1F1F100F0F0F000EFECE800E7C08600EDED ED00ECECEC00BFBFBF00000000000000000000000000000000000000000037A5 FFFF2FA5FFFF0E69D6FF405058FF000000009C6158FFB58C84FFCEA58CFFC68C 84FF27FF27FF0000000000000000000000000000000000000000000000000000 0000000000000000000024C8EAFF83DDFBFF9FF3FDFF91F2FDFF6EECFEFF43E7 FEFF5C818FFF7A9AA1FF53798CFF7796A1FF0000000000000000000000000000 000039452800B1AEB100796721009CD2B80099D2B50091CEAE003C8D530079C3 96007A662200B1AEB100000000004A4E310000000000BFBFBF00F2F2F200EFDF CF00E5B18D00F3F3F300F3F3F300F3F3F300F2F2F200F2F2F200F1F1F100EFEF EF00EEEEEE00BFBFBF0000000000000000000000000000000000000000000000 000037ADFFFFA5CEEFFF8C7971FFA58471FFF7E7C6FFFFFFCEFFFFFFCEFFFFFF CEFFE7D6ADFFC69C8CFF00000000000000000000000000000000000000000000 000000000000000000000000000024C8EAFF83DDFBFF9FF3FDFF91F2FDFF6487 93FF7A9AA1FF7A9AA1FF4B7386FF6C848FFF0000000000000000000000000000 0000323E23007A682400AEDCC600B4DFCB00AEDBC70058A7730091CEAF0081C7 9F007A682400323920003D4E2D000000000000000000BFBFBF00F4F4F400F4F1 EC00E3A35500C46C5300D7B8B800F5F5F500A74A1F00F4F4F400F3F3F300F1F1 F100F0F0F000BFBFBF0000000000000000000000000000000000000000000000 000000000000C6A5A5FFCEA58CFFFFEFB5FFFFFFCEFFFFFFCEFFFFFFCEFFFFFF D6FFFFFFE7FFF7F7EFFFA57171FF000000000000000000000000000000000000 00000000000000000000000000000000000024C8EAFF83DDFBFF709099FFA0B4 B7FFA0B4B7FF6A8D9DFF72949FFF6E909EFF000000000000000000000000454E 3100394528007B6A2700C2E7D500CCEBDB007FC19200AEDBC60099D2B60087C9 A6007A6B270000000000000000000000000000000000BFBFBF00F5F5F500F6F6 F600F2E2C100DFA43800C3711E00C3711E00A74A1F008F311D00F4F4F400F3F3 F300F1F1F100BFBFBF0000000000000000000000000000000000000000000000 000000000000B57971FFF7D6A5FFF7CE8CFFFFF7C6FFFFFFCEFFFFFFD6FFFFFF E7FFFFFFF7FFFFFFFFFFD6CEADFF000000000000000000000000000000000000 00000000000000000000000000000000000000000000859DA2FF8CA3A8FFA0B4 B7FF72949FFF809DA2FF7A9AA1FF72949FFF0000000053563800535638000000 0000B1AEB1007B6D2A00CCEADB00DBF3E700CCEBDB00B4DFCB009DD2B8007C6D 2A00B1AEB10000000000000000000000000000000000BFBFBF00F7F7F700F8F8 F800F8F8F800F6EACA00CC822400CC822400A74A1F00B65E260098381800F4F4 F400F3F3F300BFBFBF0000000000000000000000000000000000000000000000 000000000000D6AD8CFFFFE79CFFF7C679FFFFF7C6FFFFFFD6FFFFFFE7FFFFFF F7FFFFFFF7FFFFFFE7FFF7E7C6FFB58479FF0000000000000000000000000000 00000000000000000000000000000000000000000000000000006E919CFF7294 9FFFB5C3C5FFA0B4B7FF809DA2FF7A9AA1FF0000000000000000000000000000 00007C6E2B00AFDCC700226A2E00CCEBDB00C2E6D500AEDCC6007B6F2C00B1AE B100B1AEB1003D4E2D004A5631000000000000000000BFBFBF00F8F8F800F9F9 F900FAFAFA00FAFAFA00FAFAFA00FAFAFA00CC822400DFA32F00F7F7F700F5F5 F500F4F4F400BFBFBF0000000000000000000000000000000000000000000000 000000000000E7B59CFFFFD69CFFEFAD69FFF7E7A5FFFFFFCEFFFFFFD6FFFFFF E7FFFFFFE7FFFFFFD6FFF7F7CEFFB59C84FF0000000000000000000000000000 00000000000000000000000000000000000000000000000000009BAFB6FF7A9A A1FF809DA2FFB5C3C5FFA0B4B7FF809DA2FF000000000000000000000000B1AE B1007C702D00DBF3E700AFDBC7007C702D007C702D007C702D00000000003239 20003941280000000000000000000000000000000000BFBFBF00F9F9F900FAFA FA00FBFBFB00FBFBFB00FBFBFB00FBFBFB00DFA32F00BFBFBF00BFBFBF00BFBF BF00BFBFBF00BFBFBF0000000000000000000000000000000000000000000000 000000000000D6AD9CFFFFE7A5FFEFAD69FFF7C679FFFFEFB5FFFFFFD6FFFFFF D6FFFFFFD6FFFFFFD6FFF7E7C6FFB58C84FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007294 9FFF7A9AA1FF809DA2FFB5C3C5FFA0B4B7FF000000004A5631004A4E3100454E 2D003D4828007C702D007C702D00B1AEB10039452800B1AEB100000000000000 00000000000000000000000000000000000000000000BFBFBF00FAFAFA00FBFB FB00FBFBFB00FCFCFC00FCFCFC00FBFBFB00FBFBFB00BFBFBF00D4D4D400E9E9 E900BFBFBF000000000000000000000000000000000000000000000000000000 000000000000B58479FFFFEFB5FFFFEFB5FFF7CE8CFFF7C684FFF7E7A5FFFFF7 C6FFFFF7C6FFFFFFCEFFE7D6ADFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000072949FFF7A9AA1FF809DA2FFB5C3C5FF0000000000000000000000000000 0000B1AEB1003D482D00B1AEB1000000000000000000454E3100000000000000 00000000000000000000000000000000000000000000BFBFBF00FAFAFA00FBFB FB00FCFCFC00FCFCFC00FCFCFC00FBFBFB00FBFBFB00BFBFBF00E9E9E900BFBF BF00000000000000000000000000000000000000000000000000000000000000 00000000000000000000D6B59CFFFFFFFFFFFFF7EFFFF7C679FFEFAD69FFF7C6 84FFFFE7A5FFFFF7B5FFAD8471FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000072949FFF7A9AA1FF809DA2FF0000000000000000000000000000 0000000000004A4E310000000000000000000000000053563800000000000000 00000000000000000000000000000000000000000000BFBFBF00FAFAFA00FBFB FB00FCFCFC00FCFCFC00FCFCFC00FBFBFB00FBFBFB00BFBFBF00BFBFBF000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000CEADADFFF7E7C6FFFFEFB5FFFFE79CFFFFE7 A5FFF7D6A5FFC69C84FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000072949FFF7A9AA1FF0000000000000000000000000000 0000000000004E56380000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000BFBFBF00BFBFBF00BFBF BF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00BFBFBF00000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000C69C79FFC69C84FFD6AD8CFFD6AD 8CFF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003F3F3F7F172430FF4246 499F3F43416F4454497F3D43405F000000000000000000000000000000000000 000000000000000000000000000000000000A1A1A1006058500098988F000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000A1A1A1006058500098988F000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003E3E3E6F6399C7FF6296 C4FF2D445AFF0F5432FF21AE5EFF3C7054BF415D4E9F188247FF26784BEF3D47 425F0000000000000000000000000000000098B6CA00607BD400845058008484 8400000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000098B6CA00607BD400845058008484 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000040000 00140000001A0000001A0000001A0000001A0000001A0000001A0000001A0000 001700000006000000000000000000000000000000002F2F2F3F5683ABFF486E 92FF0A6987FF0A89A6FF156447FF209869FF219B68FF1E8B75FF1C8181FF1D8B 65FF445B4E8F34684CCF2E7350DF2628272F8FE0FF002AA1FF00586ACA008458 58008F8F8F000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008FE0FF002AA1FF00586ACA008458 58008F8F8F000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000042D17 01A1613101CC613101CC301801A60000001A301801A6613101CC613101CC2F18 01A300000006000000000000000000000000000000002626262F204859FF119C AAFF15BAE9FF0C8CAFFF076174FF145E5EFF1C8181FF1C8181FF1C8181FF1666 66FF1C8181FF1C8181FF1C827DFF406356AF000000008FE0FF0023ABFF005073 D4007B505800ABABAB0000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000008FE0FF0023ABFF005073 D4007B505800ABABAB0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000006535 04CCFFBD1EFFFFB810FF653504CC00000000653504CCFFB80FFFFFB508FF6535 04CC00000000000000000000000000000000000000000E0E0E0F3C4C4E9F109C ABFF13A6BAFF14B6E7FF0C96B8FF053B44FF145E5EFF145E5EFF4354548F373B 3B4F3A6060BF434F4F7F424B4B7F125656FFC0C0CA00C0C0CA00487BA10016A1 FF00506AC000484040007B7373006A585000736058005848480073737300ABAB AB00A1A1A100A1A1A1000000000000000000C0C0CA00C0C0CA00487BA10016A1 FF00506AC000484040007B7373006A585000736058005848480073737300ABAB AB00A1A1A100A1A1A10000000000000000000000000000000000000000006A3A 07CCFCBA21FFFBAF05FF6A3A07CC000000006A3A07CCFBB515FFFBAF05FF6A3A 07CC000000000000000000000000000000003E3E3E6F3F3F3F7F2626262F2A47 4CCF16C7DAFF129FBBFF11A7D5FF0B95B5FF0C4144FF3A6060BF0E0E0E0F0000 00000000000000000000000000004046468FA1583100A1583100A1502A0073AB CA0084A1B600AB7B6A00FFEAAB00FFFFEA00FFFFFF00FFFFFF008F6A6000481C 1100CA7B5800603116000000000000000000A1583100A1583100A1502A0073AB CA0084A1B600AB7B6A00FFEAAB00FFFFEA00FFFFFF00FFFFFF008F6A6000481C 1100CA7B5800603116000000000000000000000000000000000000000000703F 0CCCF2B636FFEDA717FF703F0CCC00000000703F0CCCF0B12BFFEDA717FF703F 0CCC000000000000000000000000000000002F2F323F130F8EFF198348FF1983 47FF148260FF15A9B1FF13A4CBFF0D8EB3FF0989A6FF125656FF356868CF0E0E 0E0F00000000000000000000000000000000EAC08400E0FFFF00E0FFFF00D4F4 F400C0ABAB00EAC08F00F4F4B600F4F4C00099362F00F4FFFF00FFFFFF006A60 5800CAF4FF007B6050000000000000000000EAC08400E0FFFF00E0FFFF00D4F4 F400C0ABAB00EAC08F00F4F4B600F4F4C000EAF4D400F4FFFF00FFFFFF006A60 5800CAF4FF007B60500000000000000000000000000000000000000000007646 11CCE8B24DFFDD9C2CFF764611CC00000000764611CCE5AB43FFDD9C2CFF7646 11CC0000000000000000000000000000000000000000222844DF191DAFFF0E3F 2BFF198141FF1FA359FF0F6256FF15B8E8FF0C8CAEFF065566FF1A7676FF4148 486F00000000000000000000000000000000E0AB6A00C0EAFF00B6CAD400B6C0 CA00CAAB8F00E0CA9800D4C08F00D4E0B60099362F00E0E0E000FFFFEA00AB98 7B008F98A100735850000000000000000000E0AB6A00C0EAFF00B6CAD400B6C0 CA00CAAB8F00E0CA9800D4C08F00D4E0B600D4E0D400E0E0E000FFFFEA00AB98 7B008F98A1007358500000000000000000000000000000000000000000007C4B 15CCE3B360FFD0933EFF7C4B15CC000000007C4B15CCDCA855FFD0933EFF7C4B 15CC0000000000000000000000000000000044554C7F188349FF18834AFF1676 43FF062917FF0C3E1EFF1FA35AFF127363FF14B6E6FF0C96B8FF084047FF3E5D 5DAF00000000000000000000000000000000E0AB6A00C0EAFF00B6CAD400B6C0 CA00CAAB9800D4C08F0099362F0099362F0099362F0099362F0099362F00CAAB 84008F98A1007B5848000000000000000000E0AB6A00C0EAFF00B6CAD400B6C0 CA00CAAB9800D4C08F0099362F0099362F0099362F0099362F00EAF4CA00CAAB 84008F98A1007B58480000000000000000000000000000000000000000008252 1ACCF3C578FFE1A558FF82521ACC0000000082521ACCDDAB5EFFCC9043FF8252 1ACC00000000000000000000000000000000198349FF21A45FFF1F9969FF21A7 5EFF21AE60FF188246FF0E4823FF21AE62FF149095FF11A7D4FF0A89A6FF313D 3EBF00000000000000000000000000000000E0AB6A00C0EAFF00B6CAD400B6CA D400CAAB9800E0E0AB00D4C09800D4CA980099362F00E0D4AB00FFFFC000AB84 6A00B6CAD4007B5848000000000000000000E0AB6A00C0EAFF00B6CAD400B6CA D400CAAB9800E0E0AB00D4C09800D4CA9800D4D4AB00E0D4AB00FFFFC000AB84 6A00B6CAD4007B58480000000000000000000000000000000000000000008857 1ECCF7CB7EFFF1B669FF88571ECC0000000088571ECCECBE71FFE0A558FF8857 1ECC000000000000000000000000000000002D6D56DF0B3636FF0E4646FF1C81 81FF1E8B73FF22A95CFF1FA359FF21AD5EFF146D4AFF14B0DAFF0D8DB2FF087B 97FF2F2F2F3F000000000000000000000000E0AB6A00CAEAFF00C0D4D400C0D4 D400B6B6AB00D4C0B600EAF4F400E0D4AB0099362F00F4EAA100EAC084008F73 7300F4FFFF007B5840000000000000000000E0AB6A00CAEAFF00C0D4D400C0D4 D400B6B6AB00D4C0B600EAF4F400E0D4AB00EACA8F00F4EAA100EAC084008F73 7300F4FFFF007B58400000000000000000000000000000000000000000008D5D 22CCFBD589FFF7C477FF8D5D22CC000000008D5D22CCFBD286FFF7C477FF8D5D 22CC000000000000000000000000000000002627272F236868EF1C8181FF1C81 81FF1C8181FF1C837CFF209567FF209567FF127171FF15B8CAFF15B7E8FF0B80 9EFF3F5257EF0E0E0E0F0000000000000000E0AB6A00C0EAFF00B6CAD400B6CA D400B6CAD400ABA1A100CAB6AB00E0CA9800EACA8F00E0B68F00A1847B00B6CA D400FFFFFF007B5840000000000000000000E0AB6A00C0EAFF00B6CAD400B6CA D400B6CAD400ABA1A100CAB6AB00E0CA9800EACA8F00E0B68F00A1847B00B6CA D400FFFFFF007B58400000000000000000000000000000000000000000009161 25CCFFE094FFFEDA8EFF916125CC00000000916125CCFFDF93FFFEDA8EFF9161 25CC00000000000000000000000000000000000000000E0E0E0F2F5F5FDF3D76 77FF3F8081FF3D7677FF186F6FFF145E5EFF1F393DDF13B8CAFF1C95A8FF6C8E 99FF1E1F1FFF56555ABF0000000000000000E0AB6A00CAEAFF00C0CAE000C0D4 E000C0D4E000C0E0EA00B6B6C000A1989800ABA1AB00B6B6C000CAEAF400D4F4 FF00FFFFFF007B5840000000000000000000E0AB6A00CAEAFF00C0CAE000C0D4 E000C0D4E000C0E0EA00B6B6C000A1989800ABA1AB00B6B6C000CAEAF400D4F4 FF00FFFFFF007B58400000000000000000000000000000000000000000005438 1699956427CC956427CC543816990000000054381699956427CC956427CC5438 1699000000000000000000000000000000000000000000000000515C5C7F574D 48FF5B7A7AFF461A13FF0E4040FF434F4F7F0E0E0E0F334A4EEF616162FF3F3F 40FF8D8EA6FF6666BEFF2F2F2F3F00000000EAB67B00CAF4FF00C0E0EA00C0E0 EA00CAEAF400CAEAF400CAEAF400D4F4FF00CAF4FF00CAEAFF00CAEAF400D4F4 F400FFFFFF007B5840000000000000000000EAB67B00CAF4FF00C0E0EA00C0E0 EA00CAEAF400CAEAF400CAEAF400D4F4FF00CAF4FF00CAEAFF00CAEAF400D4F4 F400FFFFFF007B58400000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000444A4A7F4E76 76FF476F70FF435B5BFF1C6666FF3C41415F000000002F2F2F3F69687BFF7778 ADFF6D6DC9FF4F4F5B8F0000000000000000AB500B00AB581100AB581100AB58 1100AB581100AB581100AB581100AB581100AB581100B66A1600B66A1600B66A 16008F6A50006A3811000000000000000000AB500B00AB581100AB581100AB58 1100AB581100AB581100AB581100AB581100AB581100B66A1600B66A1600B66A 16008F6A50006A38110000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001B1B1B1F2B61 61DF3D5656AF216060EF3A6060BF0E0E0E0F00000000000000004948506F615E 96DF39383A4F000000000000000000000000D4600600E06A0600E06A0600E06A 0600E06A0600E06A0600E06A0600E06A0600E06A0600E06A0600E06A0600E06A 0600E06A0600987348000000000000000000D4600600E06A0600E06A0600E06A 0600E06A0600E06A0600E06A0600E06A0600E06A0600E06A0600E06A0600E06A 0600E06A06009873480000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 003300000033000000330000000B000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 003300000033000000330000000B000000000000000000000000000000000063 A500008484000000000000000000000000000000000000000000000000000063 A5000063A500F7F7F70000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000334B80 A7FF4A7EA8FF4881ACFF050A0D5E000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000334B80 A7FF4A7EA8FF4881ACFF050A0D5E00000000000000000000000000639C0063CE CE00009CFF0000639C00F7F7F7000000000000000000000000000063CE009CFF FF00009CCE000063A500F7F7F7000000000000000000009CCE00319CCE00009C CE00000000000000000000000000F7FFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 001A0000003100000033000000330000003300000030000000334D81A7FF199F FFFF28ADFFFF2C5367AD4491C6FF000000000000000000000000000000000000 001A0000003100000033000000330000003300000030000000334D81A7FF199F FFFF28ADFFFF2C5367AD4491C6FF00000000000000000000000000000000319C CE0063FFCE0063CEFF000063A500F7F7F70000000000319CCE009CFFFF0063CE FF00009CCE0000000000000000000000000000000000009CCE009CFFFF0063CE FF0031CECE00009CFF00009C9C00009CCE00009CCE0000000000000000000000 00000000000000000000000000000000000000000000000000000000002E1627 359C3F75A0F9417AA9FF417AA8FF417AA8FF3C6E96F2477EA7FF129BFFFF1CA0 FFFF5ABFFFFFB9ECFFFF4091C5FF0000000000000000000000000000002E1627 359C3F75A0F9417AA9FF417AA8FF417AA8FF3C6E96F2477EA7FF129BFFFF1CA0 FFFF5ABFFFFFB9ECFFFF4091C5FF000000000000000000000000000000000063 A50063CEFF0031FFCE0063CEFF000063A500009CCE009CFFFF0063CEFF0063CE FF000063A50000000000000000000000000000000000009CCE00319CCE009CFF FF0063FFCE0063CEFF0063CEFF0063CEFF0063CEFF0000CECE00009CFF003163 CE00F7F7F700000000000000000000000000000000000000002E37698FEA579B C8FF7ACCF6FF87DDFFFF85DCFFFF86DCFFFF7ACAF4FF5898C4FF3C81B7FF58BC FFFFB1E5FFFF6DD6FFFF4292C8FF00000000000000000000002E37698FEA579B C8FF7ACCF6FF87DDFFFF85DCFFFF86DCFFFF7ACAF4FF5898C4FF3C81B7FF58BC FFFFB1E5FFFF6DD6FFFF4292C8FF000000000000000000000000000000000000 00000063A50063CEFF0063CEFF0000FFFF00DEDEDE009CFFFF0000FFFF000063 A500F7F7F70000000000000000000000000000000000009CCE00639CCE009CFF FF009CFFFF0063CEFF009CFFFF0063CEFF0031FFCE0063CEFF0063CEFF0000FF FF003163CE000000000000000000000000000000001A376A92EA67B0DCFF99DB F7FFD4CBA0FFFBCB79FFFED585FFFFDB89FFDEDDB2FF9ADEF7FF66ABD6FF538D B9FF6AD4FFFF4090C4FF00000000000000000000001A376A92EA67B0DCFF99DB F7FFD4CBA0FFFACB79FFFDD485FFFFDB89FFDEDDB2FF9ADEF7FF66ABD6FF538D B9FF6AD4FFFF4090C4FF00000000000000000000000000000000000000000000 0000000000000084840063CEFF0063CEFF0031FFCE009CFFFF000063A5000000 00000000000000000000000000000000000000000000009CCE00009CCE009CFF FF0063CEFF009CFFFF0063FFCE0063FFCE0063CEFF0063FFCE0063CEFF0063CE FF0000FFFF00F7F7F70000000000000000001529389B5A9FCCFFA0DEF5FFECBA 71FFF1C57AFFF5D28BFFFAE098FFFEE69EFFFFE99DFFFFE499FFA0DFF6FF589B C7FF4188BCFF0000000000000000000000001529389B5A9FCCFFA0DEF5FFECBA 71FFF1C479FFF3D089FFF6DB93FFFBE39BFFFFE89CFFFFE499FFA0DFF6FF589B C7FF4188BCFF00000000000000000000000000000000F7F7F700000000000063 A50000848400009CFF0000FFFF0063CEFF0063CEFF009CFFFF0063CEFF000084 84000063A50000000000000000000000000000000000009CCE0063CEFF00009C CE009CFFFF0063CEFF0063CEFF009CFFFF009CFFFF0063CEFF0063FFCE0063CE FF0063CEFF00009CCE00F7F7F700000000003D7DADF98DD5F9FFD2BF93FFF0C5 8AFFF1D399FFF8DA95FF885825FFFFF2A9FFFFF4ABFFFFE89CFFE1DFB2FF8BD2 F6FF39729FF20000000000000000000000003D7DADF98DD5F9FFD2BF93FFF0C5 8AFFF0D298FFF3D48FFFF7DF9AFFFCECA4FFFFF3AAFFFFE89CFFE1DFB2FF8BD2 F6FF39729FF20000000000000000000000000000000000319C00009C9C0063CE FF0063CEFF0000FFFF00009CFF0031CECE0000FFFF0063CEFF009CFFFF0063CE FF0031CECE00009CCE000063A500F7F7F70000000000009CCE009CFFFF00009C CE009CFFFF009CFFFF009CFFFF0063CEFF0063CECE009CFFFF0063FFCE0063CE FF0063CEFF009C9CFF00F7F7F700000000003F84B8FFA4EBFFFFEAAA5AFFF7DE B9FFF8E1B5FFFFE9AFFF8F602CFFFFF5ACFFFFF2A9FFFDE69EFFFFDA89FFA2E8 FFFF3E84B7FF0000000000000000000000003F84B8FFA4EBFFFFEAAA5AFFF7DE B9FFF7E0B3FFF9E2A9FFFDE59FFFFFEEA6FFFFF1A8FFFDE69EFFFFDA89FFA2E8 FFFF3E84B7FF0000000000000000000000000063A50063CECE00F7F7F7009CFF FF009CFFFF0063CEFF0000FFFF00009CFF0063CEFF0000FFFF0063CEFF009CFF FF009CFFFF0063CECE0063CECE000063A50000000000009CCE009CFFFF0063CE FF00009CFF00009CFF00009CCE00009CFF009CFFFF0063CEFF000031FF0063CE FF000031CE000031FF009C9CFF000063FF003D86BAFFA8EFFFFFE7A656FFFCED D7FF89581FFF906028FF94652FFF8F602CFF885825FFFADF98FFFBD384FFA7EC FFFF3D86B9FF0000000000000000000000003D86BAFFA8EFFFFFE7A656FFFCED D7FF88571EFF8B5B23FF8C5C26FF8B5B27FF885724FFFADF98FFFBD384FFA7EC FFFF3D86B9FF00000000000000000000000000639C000063A50000319C000063 9C00003163000063A50063CEFF0000FFFF00009CFF00319CCE000063A5000063 A50000319C000063A5000063A5000031630000000000009CCE009CFFFF0063FF CE0063CEFF0031CECE0063CEFF0063CEFF00009CFF009CFFFF006363FF000031 FF000031FF000031FF000031FF006363CE003C88BEFFB1F3FFFFE4A050FFFAEA D7FFFDEFD6FFFFEFCBFF906028FFFFE9AFFFF7DA95FFF4D28BFFF7C978FFB0F0 FFFF3C88BDFF0000000000000000000000003C88BEFFB1F3FFFFE4A050FFFAEA D7FFFBEDD4FFFBE8C4FFFBE5B6FFF9E2A8FFF7D993FFF4D28BFFF7C978FFB0F0 FFFF3C88BDFF0000000000000000000000000000000000000000000000000000 000000000000000000000031630031FFCE0000FFFF000063CE00000000000000 00000000000000000000000000000000000000000000009CCE009CFFFF009CFF FF0063FFCE009CFFFF0063FFCE0063CEFF0063CEFF00009CCE000031FF000031 FF00009CFF0063CEFF000031FF000031FF003B82B5F8A3E1FDFFD5B687FFF1CD A3FFFCF4E7FFFCEED5FF89581EFFF8E1B4FFF2D29AFFEFC479FFE0CFA1FFA2DF FCFF3B82B5F80000000000000000000000003B82B5F8A3E1FDFFD5B687FFF1CD A3FFFBF3E6FFF7E8CEFFF5E1BCFFF3DAADFFF1D198FFEFC479FFE0CFA1FFA2DF FCFF3B82B5F80000000000000000000000000000000000000000000000000000 0000000000000000000000639C0063CEFF0063CEFF000063A500000000000000 00000000000000000000000000000000000000000000009CCE00DEDEDE0063FF CE009CFFFF00DEDEDE00DEDEDE009CFFFF0063CEFF0063CEFF000031FF000031 FF009CFFFF0031FFCE000031FF000031FF001125338364ADD9FFC3EDF3FFDFA0 56FFF1CDA3FFFCEFDFFFFBECD6FFF6E0BEFFF0CB95FFEBBA6FFFC3EFF7FF63AC D9FF112533830000000000000000000000001125338364ADD9FFC3EDF3FFDFA0 56FFF0CCA2FFFAEDDCFFF7E7D0FFF4DDBBFFF0CA94FFEBBA6FFFC3EFF7FF63AC D9FF112533830000000000000000000000000000000000000000000000000000 0000000000000000000000319C009CFFFF0031CECE000063A500F7F7F7000000 00000000000000000000000000000000000000000000009CCE009CFFFF00DEDE DE009CFFFF009CFFFF00009CCE00009CCE00009C9C00009CCE000063A5000031 FF000063FF000063FF000031FF009C9CFF00000000003273A1E581C4E8FFC9EF F4FFD9B887FFE39F50FFE4A455FFE6A859FFDDC393FFCAF1F6FF80C3E7FF3273 A1E500000000000000000000000000000000000000003273A1E581C4E8FFC9EF F4FFD8B787FFE29E4FFFE3A354FFE6A858FFDDC393FFCAF1F6FF80C3E7FF3273 A1E5000000000000000000000000000000000000000000000000000000000000 000000000000000000000063A5009CFFFF00319CCE0000636300000000000000 0000000000000000000000000000000000000000000000000000009CCE00009C CE00009CCE00009C9C00F7F7F7000000000000000000000000000031FF003163 FF000031FF000031FF006363FF000031FF0000000000000000003274A2E567B1 DDFFB2EAFEFFCDFFFFFFCCFEFFFFCDFFFFFFB2E9FEFF67B1DDFF3274A2E50000 00000000000000000000000000000000000000000000000000003274A2E567B1 DDFFB2EAFEFFCDFFFFFFCCFEFFFFCDFFFFFFB2E9FEFF67B1DDFF3274A2E50000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000639C00DEDEDE00319CCE000063A500F7F7F7000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000031FF000031FF0000000000000000000000000000000000000000001027 35833889C0F73991CCFF3991CCFF3991CCFF3889C0F710273583000000000000 0000000000000000000000000000000000000000000000000000000000001027 35833889C0F73991CCFF3991CCFF3991CCFF3889C0F710273583000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000063A5000063A50000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000FF525200FF00 0000FF000000DE000000DE000000DE000000B500000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000A5A5A500635A52009C9C8C000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003B271A8F5E3D29B5A369 47EEB97751FFB5754FFFB3744FFFB0724EFFAC704DFFA96F4DFFA76D4CFFA66C 4BFFA36C4BFE916043F161402CC400000000000000000000000000000000FF52 5200FF212100DE000000DE000000B50000000000000000000000000000000000 0000000000004AFFFF000000000000000000000000007B7B7B00DEE7DE00D6DE D600CECECE00BDC6BD00B5B5B500A5A5A5009C9C9C00949494008C8C8C008484 84007B847B007B7B7B0000000000000000009CB5CE00637BD60084525A008484 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000090603FDEFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFF8E5D41ED000000000000000000000000000000000000 0000FF525200FF000000B5000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00EFEFE700DEE7 DE0000000000CECECE00BDC6BD0000000000A5A5A5009C9C9C00949494008C8C 8C00848484007B847B0000000000000000008CE7FF0029A5FF005A6BCE00845A 5A008C8C8C000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000BF7F56FEFFFFFFFFAE65 2AFFAC6229FFAC6229FFFFFFFFFFF0E5DEFFF0E5DEFFF0E5DEFFF0E5DEFFF0E5 DEFFF0E5DEFFFFFFFFFFA46D4CFE000000000000000000000000D6F7FF000000 0000FF212100FF000000DE00000000000000D6F7FF0000000000000000000000 00000000000000000000000000004AFFFF00000000007B7B7B00EFF7F7000000 0000DEE7DE0000000000CECECE0000000000ADB5AD00A5A5A5009C9C9C009494 94008C8C8C00848484000000000000000000000000008CE7FF0021ADFF005273 D6007B525A00ADADAD0000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000C38558FFFFFFFFFFAE65 2AFFCD9E72FFAC6229FFFFFFFFFFF0E5DEFFF6EFEBFFF6EFEBFFF6EFEBFFF6EF EBFFF0E5DEFFFFFFFFFFA76F4DFF000000000000000000000000FF525200FF52 5200FF000000FF000000DE000000DE000000B500000000000000000000000000 0000000000004AFFFF000000000000000000000000007B7B7B00F7F7F700EFF7 F70000000000DEDEDE00CED6CE0000000000BDBDBD00ADB5AD00A5A5A5009C9C 9C008C948C008C8C8C000000000000000000C6C6CE00C6C6CE004A7BA50010A5 FF00526BC6004A4242007B7373006B5A520073635A005A4A4A0073737300ADAD AD00A5A5A500A5A5A500000000000000000000000000C48559FFFFFFFFFFAE65 2AFFCD9F73FFAC6229FFFFFFFFFFF0E5DEFFF6EFEBFFF5ECE6FFF5ECE6FFF6EF EBFFF0E5DEFFFFFFFFFFAB704EFF00000000000000000000000000000000FF84 8400FF5252009C000000DE000000B50000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFF700F7F7 F700EFF7EF00E7EFE700DEDEDE00CED6CE00C6C6C600BDBDBD00ADB5AD00A5A5 A5009C9C9C008C948C000000000000000000A55A3100A55A3100A552290073AD CE0084A5B500AD7B6B00FFEFAD00FFFFEF00FFFFFF00FFFFFF008C6B63004A18 1000CE7B5A0063311000000000000000000000000000C78758FFFFFFFFFFB36C 31FFD0A47CFFB16A2CFFFFFFFFFFF0E5DEFFF6EFEBFFF5ECE6FFF5ECE6FFF6EF EBFFF0E5DEFFFFFFFFFFB1744FFF000000000000000000000000000000000808 0800EF0000008400000084000000080808000000000000000000000000000000 000000000000000000004AFFFF0000000000000000007B7B7B00FFFFFF00FFFF F70000000000EFEFEF00E7EFE70000000000CED6CE00C6C6C600B5BDB500ADAD AD00A5A5A5009C9C9C000000000000000000EFC68400E7FFFF00E7FFFF00D6F7 F700C6ADAD00EFC68C00F7F7B500F7F7C600EFF7D600F7FFFF00FFFFFF006B63 5A00CEF7FF007B635200000000000000000000000000C88959FFFFFFFFFFB674 3EFFD1A582FFB57136FFFFFFFFFFF0E5DEFFF6EFEBFFF6EFEBFFF6EFEBFFF6EF EBFFF0E5DEFFFFFFFFFFB57651FF000000000000000000000000000000000000 0000080808000808080008080800000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF00FFFF FF0000000000F7F7F70000000000E7E7E70000000000CED6CE00C6C6C600B5BD B500ADADAD00A5A5A5000000000000000000E7AD6B00C6EFFF00B5CED600B5C6 CE00CEAD8C00E7CE9C00D6C68C00D6E7B500D6E7D600E7E7E700FFFFEF00AD9C 7B008C9CA500735A5200000000000000000000000000CA8B5AFFFFFFFFFFBB7D 52FFB97B4AFFB97A48FFFFFFFFFFF0E5DEFFF0E5DEFFF0E5DEFFF0E5DEFFF0E5 DEFFF0E5DEFFFFFFFFFFB87A52FF000000000000000000000000000000000808 08008CB5FF008CB5FF008CB5FF00080808000000000000000000000000000000 0000000000004AFFFF000000000000000000000000007B7B7B00FFFFFF00FFFF FF0000000000FFFFF700F7F7F70000000000E7E7E700DEDEDE00CECECE00C6C6 C600B5BDB500ADADAD000000000000000000E7AD6B00C6EFFF00B5CED600B5C6 CE00CEAD9C00D6C68C00CEB58C00D6D6AD00D6E7B500D6E7C600EFF7CE00CEAD 84008C9CA5007B5A4A00000000000000000000000000C98B5BFEFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFBB7C53FF000000000000000000000000000000000808 0800D6E7FF00D6E7FF008CB5FF00080808000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFF700F7F7F700EFEFEF00E7E7E700D6DED600CECE CE00C6C6C600B5B5B5000000000000000000E7AD6B00C6EFFF00B5CED600B5CE D600CEAD9C00E7E7AD00D6C69C00D6CE9C00D6D6AD00E7D6AD00FFFFC600AD84 6B00B5CED6007B5A4A00000000000000000000000000C48958FAFFFFFFFFEDC3 9AFFEDC39AFFEDC39AFFEDC39AFFEDC39AFFEDC39AFFEDC39AFFEDC39AFFEDC3 9AFFEDC39AFFFFFFFFFFBD8055FF000000000000000000000000000000000000 0000FF525200FF00000084000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF00FFFF FF0000000000FFFFFF00FFFFFF0000000000F7F7F700EFEFEF00E7E7E700D6DE D600CECECE00BDC6BD000000000000000000E7AD6B00CEEFFF00C6D6D600C6D6 D600B5B5AD00D6C6B500EFF7F700E7D6AD00EFCE8C00F7EFA500EFC684008C73 7300F7FFFF007B5A4200000000000000000000000000B58052F0FFFFFFFFEDC3 9BFFF4DAC0FFF4DAC0FFF4DBC1FFF4DBC1FFF4DBC1FFF4DBC1FFF4DBC1FFF4DB C1FFEDC39AFFFFFFFFFFBE8156FE000000000000000000000000000000000000 0000FF525200FF000000B5000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF000000 0000FFFFFF0000000000FFFFFF0000000000F7F7F700F7F7F700EFEFEF00DEE7 DE00D6D6D600CECECE000000000000000000E7AD6B00C6EFFF00B5CED600B5CE D600B5CED600ADA5A500CEB5AD00E7CE9C00EFCE8C00E7B58C00A5847B00B5CE D600FFFFFF007B5A4200000000000000000000000000936843D8FFFFFFFFEDC3 9BFFEDC39BFFEDC39BFFEDC39AFFEDC39AFFEDC39AFFEDC39AFFEDC39AFFEDC3 9AFFEDC39AFFFFFFFFFFBA835AF8000000000000000000000000000000000000 0000FF525200FF212100B5000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF00FFFF FF0000000000FFFFFF00FFFFFF0000000000FFFFFF00F7FFF700F7F7F7000000 000000000000000000000000000000000000E7AD6B00CEEFFF00C6CEE700C6D6 E700C6D6E700C6E7EF00B5B5C600A59C9C00ADA5AD00B5B5C600CEEFF700D6F7 FF00FFFFFF007B5A42000000000000000000000000004B35229BFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFD6A988FF000000000000000000000000000000000000 000000000000B500000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7FFF700BDBD BD00D6DED6007B7B7B000000000000000000EFB57B00CEF7FF00C6E7EF00C6E7 EF00CEEFF700CEEFF700CEEFF700D6F7FF00CEF7FF00CEEFFF00CEEFF700D6F7 F700FFFFFF007B5A4200000000000000000000000000281C1271412E1D90845D 3BCCCE925DFFCB905DFECD915DFFCC8F5DFFCD915FFFCD9261FFCB905FFFB27C 52EF805B3ECBD8AD8AFFD7AB8AFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00BDBD BD007B7B7B00000000000000000000000000AD520800AD5A1000AD5A1000AD5A 1000AD5A1000AD5A1000AD5A1000AD5A1000AD5A1000B56B1000B56B1000B56B 10008C6B52006B39100000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000007B7B7B007B7B7B007B7B 7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B 7B0000000000000000000000000000000000D6630000E76B0000E76B0000E76B 0000E76B0000E76B0000E76B0000E76B0000E76B0000E76B0000E76B0000E76B 0000E76B00009C734A0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF0000000000FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000CE630000CE630000CE63 0000CE630000CE630000CE630000CE630000CE630000CE630000CE630000CE63 0000CE630000CE630000CE630000CE6300000000000000000000000000000000 0000000000000000000000000000FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000CE630000FFFFFF00FFFF FF00FFFFF700FFF7E700FFEFD600FFE7C600FFDEB500FFD6AD00FFD6AD00FFD6 AD00FFD6AD00FFD6AD00FFD6AD00CE6300000000000000000000000000000000 000000000000FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484008484 8400848484008484840084848400848484008484840084848400848484008484 84009C9C9C0000000000000000000000000000000000CE630000FFFFFF00FFFF FF00FFFFFF00FFFFF700FFF7E700FFEFD600FFE7C600FFDEB500FFD6AD00FFD6 AD00FFD6AD00FFD6AD00FFD6AD00CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF004273 FF004273FF004273FF00FFFFF700A5390800A5390800A5390800FFDEB500009C CE00009CCE00009CCE00FFD6AD00CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF004273 FF004273FF004273FF00FFFFFF00A5390800A5390800A5390800FFE7C600009C CE00009CCE00009CCE00FFD6AD00CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF004273 FF004273FF004273FF00FFFFFF00A5390800A5390800A5390800FFEFD600009C CE00009CCE00009CCE00FFD6AD00CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFF700FFF7E700FFEF D600FFE7C600FFDEB500FFD6AD00CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF00CE9C 9C00CE9C9C00CE9C9C00FFFFFF00E77B0000E77B0000E77B0000FFFFF700009C 0000009C0000009C0000FFDEB500CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF00CE9C 9C00CE9C9C00CE9C9C00FFFFFF00E77B0000E77B0000E77B0000FFFFFF00009C 0000009C0000009C0000FFE7C600CE6300000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF00CE9C 9C00CE9C9C00CE9C9C00FFFFFF00E77B0000E77B0000E77B0000FFFFFF00009C 0000009C0000009C0000FFEFD600CE6300000000000000000000000000000000 000000000000FFFFFF0000000000FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFF700FFF7E700CE6300000000000000000000000000000000 0000000000000000000000000000FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000000000000000000000000000000000000000000000000 00008484840000000000000000000000000000000000CE630000CE630000CE63 0000CE630000CE630000CE630000CE630000CE630000CE630000CE630000CE63 0000CE630000CE630000CE630000CE6300000000000000000000000000000000 000000000000FFFFFF00FFFFFF00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484008484 8400848484008484840084848400848484008484840084848400848484008484 8400848484000000000000000000000000000000000000000000CE630000CE63 0000CE630000CE630000CE630000CE630000CE630000CE630000CE630000CE63 0000CE630000CE630000CE630000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000009C0000009C000000CECECE00CECECE00CECECE009C0000006300 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000F7F7F700C6C6C6008484 8400949494000000000000000000F7F7F70000000000F7F7F700000000009494 940084848400A5A5A500F7F7F700000000000000000000000000000000000000 0000630000009C000000630000009C000000630000009C000000630000009C00 0000630000000000000000000000000000000000000000000000000000006B73 7B00737373007B737B007B7B8400848484007B737B00313939006B737300A5AD AD00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084848400DE525200EFAD 0000EFB5B500E7848400D6D6D600D6D6D600D6D6D600D6D6D600E7848400E794 9400E7848400DE52520084848400F7F7F7000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00009C00000000000000000000000000000000000000A5B5B5006B5A6300E7C6 CE00EFD6D600F7EFEF00FFFFFF00FFFFFF00F7EFEF00E7C6C6009C7B7B004A42 42006B6B7300BDCECE0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000D6D6D600DE525200EFAD0000E784 8400E7848400EFB5B50063636300212121000039390084848400EFB5B500EFB5 B500B5AD0800EFAD0000DE525200C6C6C6000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000009C0000000000000000000000A5B5B5009C7B8400DEB5B5000000 8400000084007B7B7B0084848400848484007B7B7B009484AD00000084000000 840029217B006B6B7300BDCECE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000A5A5A500E7848400DE525200EFAD 0000EFB5B500EFB5B5005AF7FF00009CFF00009CFF005AF7FF00EFB5B500E784 8400E7848400DE525200E7848400A5A5A50000000000000000000000FF000000 00000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000 FF000000FF0000009C0000000000000000006B525200D6A5A500736363000000 840000008400E7E7E700D6DEDE00CECED6007B7BAD00000084004A4273008C6B 7B000000840018187300848C8C000000000000000000C6A54200C6A52100C684 2100C6842100C6842100C6842100C6842100C6842100C6842100C6842100C684 2100C6842100C68421008463210000000000EFE7E700E7848400E7848400E784 8400E7848400EFB5B500A5A5A500000000000000000094949400EFB5B500E784 8400E7848400E7848400E7848400EFE7E7000000000000000000006363009CFF FF000000FF000000FF000000FF000000FF000000FF000000FF0000636300009C 9C00006363000000000000000000000000006B5252007B6B7300FFFFFF000000 840000008400735A63006B5A5A006B5252000000840000008400848484007B7B 84009C737300313939006B6B73000000000000000000C6A54200C6A54200C6A5 4200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A5 4200C6A54200C6A54200846321000000000000000000D6D6D600E7848400EFB5 B500E7848400B5B5B500A5A5A500313131000039390094949400EFB5B500E784 8400EFB5B500E7848400C6C6C600000000000000000000000000009C9C0063FF FF000000FF000000FF000000FF000000FF00009C9C0000636300009C9C000063 630000000000000000000000000000000000424A4A00FFFFFF00736B7B000000 840000008400F7ADBD00F7A5AD00F79CA5000000840000008400000084000000 840000008400000084006B6B73000000000000000000C6A54200C6A54200C6A5 4200F7CEA500F7CEA500FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7CEA500C6A5 4200C6A54200C6A5420084632100000000000000000000000000F7F7F7008484 8400EFB5B500B5B5B500D6D6D6005AF7FF005AF7FF00D6D6D600A5A5A500EFB5 B50084848400F7F7F70000000000000000000000000000000000006363009CFF FF000000FF000000FF000000FF000000FF0000636300009C9C0000636300009C 9C000000000000000000000000000000000084848C008C8C9400E7A5C6000000 840000008400E79CBD00FFA5BD00FF9CA500A5639C0000008400AD7B8C002910 4A000000840018187300A5ADAD000000000000000000C6A54200C6A54200C6A5 4200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A5 4200C6A54200C6A542008463210000000000000000000000000000000000F7F7 F700B5B5B500D6D6D600B5B5B5009CFFFF005AF7FF009CFFFF00EFD6D600B5B5 B500D6D6D600000000000000000000000000000000000000000000FFFF00FFFF FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000063 63000000000000000000000000000000000084848C00C6C6CE00B5849C000000 840000008400634A9C00634A9400BD849400B57B840063427B00000084000000 840063639400525A5A00000000000000000000000000C6A54200C6A54200FFFF FF00F7CEA500FFFFFF00F7CEA500FFFFFF00F7CEA500FFFFFF00F7CEA500FFFF FF00F7CEA500C6A542008463210000000000F7F7F700C6C6C600A5A5A500C6C6 C600A5A5A500C6C6C600F7F7F7000073EF000073EF00F7F7F700C6C6C6008484 8400C6C6C60094949400C6C6C600F7F7F700000000000000000000FFFF00FFFF FF00FFFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FF FF0000636300000000000000000000000000A5B5B500C6C6C600C6C6DE008C6B 9400CE94B500D694AD00C6849C00B56B73009C5A52006B42420063525200A5A5 AD005A636B0000000000000000000000000000000000C6A54200C6A54200C6A5 4200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A5 4200C6A54200C6A542008463210000000000D6D6D600C6C6C60000000000C6C6 C600A5A5A50094949400C6C6C6005AF7FF009CFFFF00C6C6C60084848400C6C6 C600C6C6C600F7F7F700C6C6C600D6D6D6000000000000000000000000000063 00009CFFFF0000FFFF00009C000000630000009C000000630000009C00000063 0000009C000000000000000000000000000000000000A5B5BD008C8C9400FFFF FF00A5A5B5008C8CA500848494006B737B007B8484009CA5A500848C9400525A 5A0052525200BDCECE00000000000000000000000000C6A54200C6A54200FFFF FF00F7CEA500FFFFFF00F7CEA500FFFFFF00F7CEA500FFFFFF00F7CEA500FFFF FF00F7CEA500C6A5420084632100000000000000000000000000000000000000 0000F7F7F70084848400424242005AF7FF0000F7FF008484840084848400F7F7 F700000000000000000000000000000000000000000000000000000000000000 000000630000009C000000630000000000009C9C9C00CECECE0000630000009C 0000006300000000000000000000000000000000000000000000000000007B84 8C007B848C007B7B840073737B006B7373006B737B00636B7300B5B5B500ADAD AD00525A5A0052525200BDCECE000000000000000000C6842100C6A54200C6A5 4200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A54200C6A5 4200C6A54200C6A52100C6842100000000000000000000000000C6C6C6009494 940094949400C6C6C60084848400009CFF00009CFF0042424200C6C6C6009494 940094949400C6C6C60000000000000000000000000000000000000000000000 000000000000000000000000000000000000009C0000009C0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000A5B5BD00737373006B6B 7300394239001018180052525200BDCECE0000000000C6A54200C6630000C663 0000C6630000C6630000C6630000C6630000C6630000C6630000C6630000C663 0000C6630000C6630000C68442000000000000000000D6D6D600C6C6C600D6D6 D600F7F7F70000000000424242000052E7000052E70063636300F7F7F700F7F7 F700F7F7F700A5A5A500F7F7F700000000000000000000000000000000000000 00000000000000000000000000000000000000630000009C0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000A5B5B5005A5A 5A00737B7B003131390008080800525252000000000000000000C6630000C663 0000C6630000C6630000C6630000C6630000C6630000C6630000C6630000C663 0000C6630000C6630000000000000000000000000000C6C6C600D6D6D6000000 00000000000000000000000000008484840084848400F7F7F700000000000000 000000000000D6D6D600C6C6C600000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000009C00000063 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000A5B5 B500525A5A007373730021212900000008000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000C6C6C600D6D6D600C6C6C600C6C6C600000000000000 00000000000000000000F7F7F700000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000630000009C 00009C9C9C000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000A5B5B5004A52520063636300181818000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000F7F7F700D6D6D6000000000000000000D6D6D600F7F7F7000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008400 0000840000008400000000000000000000000000000000000000840000008400 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000844200000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084008400008484000084 8400008484000084840000000000000000000000000000000000008484000084 8400000000008400840000000000000000000000000000000000000000000000 0000000000000000000000000000844200008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000844200008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848484000000 000000000000000000000000000000000000000000000084840000FFFF0000FF FF0000FFFF0000848400C6C6C600C6C6C600C6C6C600000000000084840000FF FF00008484000084840000000000000000000000000000000000000000000000 0000000000000000000084420000F7CEA5008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000084420000FFFFFF0084420000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008484840000000000000000000000 000084848400000000000000000000000000000000000084840000FFFF0000FF FF000084840000840000FFFFFF00FFFFFF00FFFFFF00C6C6C6008484840000FF FF0000FFFF000084840000000000000000000000000000000000000000000000 00000000000084420000F7CEA500F7CEA5008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000084420000FFFFFF00F7CEA500844200000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000848484000000000000000000000000000084840000FFFF0000FF FF00000000000000000000000000000000000000000000000000840084000084 840000848400C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484000000 0000008484008400840000000000000000000000000000000000000000000000 000084420000F7CEA500F7CEA500F7CEA5008442000084420000844200008442 0000844200008442000084420000000000000000000084420000844200008442 000084420000844200008442000084420000FFFFFF00F7CEA500F7CEA5008442 0000000000000000000000000000000000000000000000000000000000008484 8400000000000000000000000000FF000000FF0000000000000000FFFF0000FF FF00000000008484840000000000000000000000000000000000000000000000 0000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C6000000 0000000000000000000000000000000000000000000000000000000000008442 0000F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA500F7CEA50084420000000000000000000084420000FFFFFF00F7CE A500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500844200000000000000000000000000000000000084848400000000008484 8400FF0000008484840000000000FF000000FF00000000000000008484000084 8400000000000000000000000000000000000000000000000000000000000000 0000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C6000000 000000000000000000000000000000000000000000000000000084420000F7CE A500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA500F7CEA50084420000000000000000000084420000FFFFFF00F7CE A500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA5008442000000000000000000008484840000000000000000000000 000084848400FF00000000000000000000008400000000000000000000000084 000000FF00000000000084848400000000000000000000000000000000008400 840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C6C6C6000000 0000000000000000000000000000000000000000000084420000FFFFFF00F7CE A500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA500F7CEA50084420000000000000000000084420000FFFFFF00F7CE A500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA500F7CEA5008442000000000000000000000000000084848400FF00 000084848400000000000000000000000000000084000000FF00000000000084 000000FF00000084000000000000000000000000000000000000000000000000 000000000000C6C6C600FFFFFF00FFFFFF00FFFFFF00FFFFFF00848400000000 000084008400000000000000000000000000000000000000000084420000FFFF FF00F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA500F7CEA50084420000000000000000000084420000FFFFFF00F7CE A500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CEA500F7CE A500F7CEA5008442000000000000000000000000000084848400000000000000 000000000000848484000000FF0000000000000084000000FF00000084000000 000000FF00000084000000000000000000000000000000000000000000000000 00008400840084848400FFFFFF00FFFFFF00FFFFFF00C6C6C600000000008400 8400000000000000000000000000000000000000000000000000000000008442 0000FFFFFF00F7CEA500F7CEA500F7CEA500FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF0084420000000000000000000084420000FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7CEA500F7CEA500F7CE A500844200000000000000000000000000000000000000000000000000008484 84000000FF00848484000000FF000000FF00000000000000FF000000FF000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000084008400C6C6C60084848400C6C6C60084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 000084420000FFFFFF00F7CEA500F7CEA5008442000084420000844200008442 0000844200008442000084420000000000000000000084420000844200008442 000084420000844200008442000084420000FFFFFF00F7CEA500F7CEA5008442 0000000000000000000000000000000000000000000000000000848484000000 0000000000000000000084848400000000000000000000000000000000008484 8400848484000000000000000000000000000000000000000000000000000000 0000000000008400840000FFFF0000FFFF0000FFFF0000000000840000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000084420000FFFFFF00F7CEA5008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000084420000FFFFFF00F7CEA500844200000000 0000000000000000000000000000000000000000000000000000000000000000 0000848484000000000084848400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008400840084848400008484008484840000000000840084000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084420000FFFFFF008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000084420000FFFFFF0084420000000000000000 0000000000000000000000000000000000000000000000000000000000008484 8400848484000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000840084008484840000000000C6C6C60000000000840084000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000844200008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000844200008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008484 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008400840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008442000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000844200000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084008400000000000000 00000000000000000000000000000000000000000000ADADA5008C8C8C006B6B 6B00BDB5AD000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000C6847300B5848400B584 8400B5848400B5848400B5848400B5848400B5848400B5848400B5848400B584 8400B5848400B5848400B58484000000000000000000C6847300B5848400B584 8400B5848400B5848400B5848400B5848400B5848400B5848400B5848400B584 8400B5848400B5848400B5848400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000ADA59C009C522900844A 210073422100633921004A4A4A00BDB5AD000000000000000000000000000000 000000000000000000000000000000000000C6A59C00FFFFEF00FFFFEF00FFFF EF00FFFFEF00FFF7DE00FFF7DE00FFF7DE00FFF7DE00FFEFD600FFEFD600FFEF D600FFDEB500FFDEB500FFD6A500B5848400C6A59C00FFFFEF00FFFFEF00FFFF EF00FFFFEF00FFF7DE00FFF7DE00FFF7DE00FFF7DE00FFEFD600FFEFD600FFEF D600FFDEB500FFDEB500FFD6A500B58484000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000A59C9400AD4A0800DEAD 7B00EFB58C00C67B42009C522900633921004A4A4A00BDB5AD00000000000000 000000000000000000000000000000000000C6A59C00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFDEB500B5848400C6A59C00FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFF7DE00FFF7DE00FFEF D600FFEFD600FFEFD600FFDEB500B58484000000000000000000000000000000 000000000000AD4A18007B29180000000000AD4A18007B291800000000000000 000000000000000000000000000000000000000000009C948C00B5521000E7BD 9400FFEFD600FFDEC600FFDEB500F7BD8400C6844A009C522900523121000000 000000000000000000000000000000000000C6ADA500FFFFFF00FFFFFF00FFFF FF00FFFFFF00E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100FFF7 DE00FFEFD600FFEFD600FFEFD600B5848400C6ADA500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100FFFFFF00FFF7DE00FFF7 DE00FFEFD600FFEFD600FFEFD600B58484000000000000000000000000000000 000000000000AD4A18007B29180000000000AD4A18007B291800000000000000 00000000000000000000000000000000000000000000948C7B00B5521000E7C6 AD00FFE7D600FFDEC600FFDEB500FFE7BD00FFD68400FFAD5A00733910009494 940000000000000000000000000000000000C6ADA500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600B5848400C6ADA500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600B58484000000000000000000000000000000 000000000000AD4A18007B29180000000000AD4A18007B291800000000000000 00000000000000000000000000000000000000000000948C7B00BD631800E7CE B500FFEFD600CED6CE00009CCE00FFDEB500FFC65A00F7B57300633921008484 840000000000000000000000000000000000D6B5AD00FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B 2100E77B2100E77B2100FFEFD600B5848400D6B5AD00FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B 2100E77B2100E77B2100FFEFD600B58484000000000000000000000000000000 000000000000AD4A18007B29180000000000AD4A18007B291800000000000000 00000000000000000000000000000000000000000000948C7B00BD631800FFDE C600DEE7DE00009CCE00009CCE00BDBDA50094947300D6946300844A18008484 840094949400000000000000000000000000D6B5AD00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFFF FF00FFFFEF00FFF7DE00FFEFD600B5848400D6B5AD00FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFFFFF00FFFFFF00FFFF FF00FFFFEF00FFF7DE00FFEFD600B58484000000000000000000000000000000 000000000000AD4A18007B29180000000000AD4A18007B291800000000000000 000000000000000000000000000000000000000000009C846B00C66B2900FFE7 D60039ADD600BDD6DE00ADD6D600009CCE00A59C8400EFB58C00FFCE9400C684 4A00946339006B6B6B009494940000000000D6BDB500FFFFFF00FFFFFF00FFFF FF00FFFFFF00E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100FFFF FF00FFFFEF00FFFFEF00FFF7DE00B5848400D6BDB500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100FFFFFF00FFFFFF00FFFF FF00FFFFEF00FFFFEF00FFF7DE00B58484000000000000000000000000000000 00007B2918007B2918007B29180000000000AD4A18007B291800000000000000 000000000000000000000000000000000000000000009C846B00C66B2900F7EF E700F7F7EF00FFF7E700DEE7DE0039A5BD00FFE7C600E7AD7300C6844A00FFCE 9400FFCE9400BD946B005A5A84006B6B6B00D6BDB500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFF7DE00B5848400D6BDB500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFF7DE00B58484000000000000000000000000007B29 1800AD5A2900AD4A18007B29180000000000AD4A18007B291800000000000000 000000000000000000000000000000000000000000009C846B00C66B2900FFF7 EF00FFF7F700FFF7E700FFF7E7004AADCE00F7EFDE00E7BD9400633918008C7B 6300EFB58C00AD9C9C00315AD6004A52B500D6BDB500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B 2100E77B2100E77B2100FFF7DE00B5848400D6BDB500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B 2100E77B2100E77B2100FFF7DE00B584840000000000000000007B291800AD5A 2900D6732900D67329007B29180000000000AD4A18007B291800000000000000 000000000000000000000000000000000000000000009C846B00CE7B4200FFF7 F700FFFFFF00FFF7F700FFF7EF00ADD6D600CEE7E700F7BD9400523121008484 840000000000BDB5AD00426BD600424A9C00E7C6B500FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFFF FF00FFFFFF00FFFFFF00FFFFEF00B5848400E7C6B500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFEF00B584840000000000000000007B291800D673 2900DE842900DE8429007B29180000000000AD4A18007B291800000000000000 00000000000000000000000000000000000000000000AD8C6B00CE7B4200FFF7 F700FFFFFF00FFFFFF00FFFFFF00D6EFEF00CEE7E700F7BD8400523121008484 840000000000000000000000000000000000E7C6B500FFFFFF00FFFFFF00FFFF FF00FFFFFF00E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100FFFF FF00FFFFFF00FFFFFF00FFFFEF00B5848400E7C6B500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFEF00B584840000000000000000007B291800AD4A 1800D6732900D67329007B29180000000000AD4A18007B291800000000000000 00000000000000000000000000000000000000000000ADA59C00CE631000C673 3900D6946300DEB59C00EFCEC600F7EFE700FFFFFF00E7BD94005A4229008484 840000000000000000000000000000000000E7C6B500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFFFEF00B5848400E7C6B500FFFFFF00FFEFD600FFEF D600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFEFD600FFEFD600FFFFEF00B58484000000000000000000000000007B29 1800AD5A2900AD4A18007B291800AD4A1800AD4A18007B291800AD4A1800AD4A 18000000000000000000000000000000000000000000BDB5AD00E78C2900C65A 0000C65A0000C65A0000BD520000C65A1000C67B4200C67339005A4A31009494 940000000000000000000000000000000000E7C6B500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B 2100E77B2100E77B2100FFFFEF00B5848400E7C6B500FFFFFF00E77B2100E77B 2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B2100E77B 2100E77B2100E77B2100FFFFEF00B58484000000000000000000000000000000 00007B2918007B2918007B2918007B2918007B2918007B2918007B2918007B29 180000000000000000000000000000000000000000000000000000000000BDB5 AD00ADA59C009C948C00CE8C4200D6843100D6731000D66B0000949494000000 000000000000000000000000000000000000E7C6B500FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFEF00C6847300E7C6B500FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFEF00C68473000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000E7C6B500E7C6B500E7C6 B500E7C6B500E7C6B500E7C6B500D6BDB500D6BDB500D6B5AD00D6B5AD00C6AD A500C6ADA500C6A59C00C6A59C000000000000000000E7C6B500E7C6B500E7C6 B500E7C6B500E7C6B500E7C6B500D6BDB500D6BDB500D6B5AD00D6B5AD00C6AD A500C6ADA500C6A59C00C6A59C00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000F374EF7255B82FB4583B6FB244F6BC10002032200000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000FF848400E76B5A00E76B 5A00E76B5A00E76B5A00E76B5A00E76B5A00E76B5A00E76B5A00E76B5A000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000007B7B7B007B7B 7B00000000007B7B7B007B7B7B00000000000000000000000000000000000000 000028607EFB93C7F9FF90C9F9FF3F84C9FF185999F30104062F000000000000 00000000000000000000000000000000000000000000C06614008E4019008E40 19008E4019008E4019008E4019008E4019008E4019008E4019008E4019008E40 19008E4019008E4019008E4019008E4019000000000000000000FF848400FF84 8400E76B5A00DE393100DE393100E7423100FF848400FF848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000007B7B7B000000 0000000000007B7B7B000000000000000000493022A9C28D66FFBF8A64FFBD87 62FF4188A9FFE0F2FFFF5299D8FF1878BDFF4797C4FF3E80B5FF987769FFAA73 52FFA87151FFA86F4FFF493022A90000000000000000C0661400B87A66008A5C 5C008A5C5C008A5C5C008A5C5C008A5C5C008A5C5C008A5C5C008A5C5C008A5C 5C008A5C5C008A5C5C008A5C5C008E401900000000000000000000000000E76B 5A00DE393100DE393100E74A4200E74A4200D652420000000000000000000000 0000000000000000000000000000000000007B7B7B000000FF0000007B000000 0000000000000000000000007B000000FF007B7B7B00000000007B7B7B000000 0000000000007B7B7B000000000000000000C8916AFFFFFFFFFFFFFFFFFFFFFF FFFFA6C4D9FF78B5D5FF8FB6D1FF53C9E4FF59DFF5FF76D0EDFF4F9CDDFFE4F0 FAFFFFFFFFFFFFFFFFFFA8704FFF0000000000000000C0661400BC7D6700B87A 6600B4786600B0756500AC726400A8706400A46D6300A06A62009C6862009865 610094626000906060008A5C5C008E4019000000000000000000E76B5A00E74A 4200E7423100F7635200EF736300E77B6B0084737B0039526B00000000000000 0000000000000000000000000000000000000000000000007B000000FF000000 000000000000000000000000FF0000007B0000000000000000007B7B7B000000 0000000000007B7B7B000000000000000000CA936CFFFFFFFFFFFFFFFFFFFFFF FEFFFFFFFDFFB2D6E6FF74B9D7FFC1F6FDFF61DFF7FF5BE2F8FF77D3F0FF4898 DCFFE3EEF5FFFFFFFFFFA97151FF0000000000000000C0661400C0806800BC7D 6700B87A6600B4786600B0756500AC726400A8706400A46D6300A06A62009C68 620098656100946260008A5C5C008E40190000000000E76B5A00E74A4200E75A 4A00F7635200F77B6300AD7B7B005A7B9400217BAD0008639C00085A9C000000 000000000000000000000000000000000000000000007B7B7B000000FF000000 FF000000FF000000FF000000FF007B7B7B000000000000000000000000007B7B 7B00000000007B7B7B000000000000000000CC966DFFFFFFFFFFFFFFFCFFFFFF FDFFFEFEFCFFFEFEFCFFAFD5E4FF75CBE7FFC7F7FDFF5CDCF5FF58E1F7FF79D4 F1FF4999DDFFD6E8F7FFAB7352FF0000000000000000C0661400C0806800C59A 8F00FFFFFF00FFFFFF00C59A8F00B0756500C0806800A8706400A46D6300CDA9 A000FFFFFF00986561008A5C5C008E401900E76B5A00EF5A4A00EF5A4A00DE73 6300A57B73005A739C00297BAD000873B500087BB5000873B500086BA5003939 5A0000000000000000000000000000000000000000000000000000007B000000 FF00000000000000FF0000007B00000000000000000000000000000000000000 00007B7B7B007B7B7B000000000000000000D19B71FFFFFFFFFFFEFEFCFFFEFE FCFFFEFEFCFFFDFDFBFFFDFDFBFFBDE7F1FF77D3EEFFC7F7FDFF5DDCF5FF59E2 F7FF78D6F2FF4FA1E2FF9B7C6CFF0000000000000000C0661400C0806800FFFF FF00C0806800BE7E6700FFFFFF00B4786600FFFFFF00C0806800A8706400FFFF FF00CDA9A0009C6862008A5C5C008E401900E75A4A00E76B5200B5736B004A8C A500217BAD000873B5000873B5000873B5000873B5000863A500315263008484 8400634A6300000000000000000000000000000000000000000000007B000000 FF007B7B7B000000FF0000007B00000000000000000000000000000000000000 000000000000000000000000000000000000D49D73FFFFFFFFFFFEFEFCFFFDFD FBFFFDFDFCFFFDFDFBFFFDFDF9FFFCFCF8FFBDE6F2FF7BD4EEFFC3F6FDFF6ADD F6FF6BCAEDFF61A2D7FF6198C9FF0103042600000000C0661400C0806800FFFF FF00C0806800C0806800BE7E6700BA7C6700C0806800B2766500CDA9A000FFFF FF00A46D6300A06A62008A5C5C008E40190000000000636B84001873AD00087B B5000894C6000873B500087BB500008CBD0018638400425A6300B5B5B500B5B5 B500A5A5A5005A4A5A0000000000000000000000000000000000000000000000 7B000000FF0000007B0000000000000000000000000000000000000000000000 00007B0000007B0000000000000000000000D59F74FFFFFFFFFFFDFDFCFFFDFD FBFFFDFDFAFFFCFCF9FFFCFBF7FFFBF9F5FFFBF8F4FFB2E1EDFF80D6EEFFB1E3 F9FF8ABFE7FFADD3F6FFC3E0FCFF5E94C5F700000000C0661400C0806800FFFF FF00C0806800C0806800FFFFFF00BE7E6700FFFFFF00C0806800FFFFFF00CDA9 A000AA716400A66E63008A5C5C008E40190000000000000000005A73C6001084 C600087BB500087BB5000894C60010738C0052636300ADADAD0094949400A5A5 A500ADADAD006B6B6B0000000000000000000000000000000000000000000000 7B000000FF0000007B00000000007B000000FF0000007B7B7B00000000000000 000000000000FF0000007B0000007B7B7B00D8A177FFFFFFFFFFFDFDFAFFFCFC FAFFFCFBF9FFFBFAF6FFFBF8F5FFFBF7F4FFFBF6F1FFF8F4EEFFAADDE8FF75BD E7FFB3D2F0FFE5F3FFFFABD2EFFF3A72A4E800000000C0661400C0806800CDA9 A000FFFFFF00FFFFFF00CDA9A000C0806800BE7E6700BA7C6700FFFFFF00B276 6500AE746500AA7164008A5C5C008E401900000000000000000000000000298C BD002173BD00086BAD0029638C00737373009C9C9C00949494009C9C9C00A5A5 A500B5B5B5008C8C8C0000000000000000000000000000000000000000007B7B 7B0000007B007B7B7B0000000000000000007B000000FF000000000000000000 000000000000FF0000007B00000000000000D9A277FFFFFFFFFFFCFBF9FFFCFB F8FFFBF9F7FFFBF7F4FFFAF7F2FFF9F5F0FFF7F3EDFFF6EFEAFFF5EBE7FFB3D7 E2FF56A4D8FF84B0DBFF449CD0FF05141C5E00000000C0661400C0806800C080 6800C0806800C0806800C0806800C0806800C0806800BE7E6700BA7C6700B679 6600B2766500AE7465008A5C5C008E4019000000000000000000000000000000 0000298CBD0029527B0073737300949494009494940094949400A5A5A500BDBD BD009C9C9C000000000000000000000000000000000000000000000000000000 000000007B00000000000000000000000000000000007B000000FF000000FF00 0000FF000000FF0000007B00000000000000DBA378FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFBC8661FF0000000000000000C0661400C0806800C080 6800C0806800C0806800C0806800C0806800C0806800C0806800BE7E6700BA7C 6700B6796600B2766500AE7465008E4019000000000000000000000000000000 00000000000063526300949494009494940094949400A5A5A500ADADAD00BDBD BD007B7B7B008C8C8C0000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000007B000000FF00 000000000000FF0000007B00000000000000DCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFBF8A64FF0000000000000000C06614008E4019008E40 19008E4019008E4019008E4019008E4019008E4019008E4019008E4019008E40 19008E4019008E4019008E4019008E4019000000000000000000000000000000 00000000000000000000949494007B7B7B008C8C8C007B7B7B006B6B6B00BDBD BD00CECECE007B7B7B008C8C8C00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007B00 0000FF000000FF0000007B00000000000000D9A882FDE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFBC8D6BFD0000000000000000C0661400ED973300ED97 3300ED973300ED973300ED973300ED973300ED973300F6CA9A00ED973300F6CA 9A00ED973300306DF900ED973300C06614000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007373 7300C6C6C600C6C6C6007B7B7B008C8C8C000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00007B000000FF0000007B000000000000001D130E6BCAA180F4DCA679FFDCA5 78FFDAA378FFD8A177FFD59F74FFD49D73FFD29C71FFCF9970FFCE986EFFCB95 6DFFC9936AFFB38C6EF41D130E6B000000000000000000000000C0661400C066 1400C0661400C0661400C0661400C0661400C0661400C0661400C0661400C066 1400C0661400C0661400C0661400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000737373007B7B7B008C8C8C00949494000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000007B0000007B000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000A5A5A5009C9C9C00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000007B000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000305300015207C001D2B920000000000000000000000000000 000000000000000000000000000000000000000000000404044E040404850000 0021000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000005ACE FF005ACEFF005ACEFF0000000000000000000000000027272730604B3AF1644A 36FF624834FF664D39FF755F4DFF69503DFF624834FF624834FF624834FF6248 34FF624834FF3D3D3E5E0000000000000000000000000000000000000000000A 0F50002336990F455FC03F7F9EE000344EC10000000000000000000000000000 000000000000000000000000000000000000000000000B0B0B72E8D9D9FF0303 03810000001A0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000006B6B6B000000 00000000000000000000000000000000000000000000BCA798FFF7EEE9FFE6D8 D1FFE0CDC4FFD8C4BDFF8F8CB1FFD5BDB4FFD8B7A7FFD5B1A0FFD4AF99FFD0AA 94FFC89F88FF624834FF00000000000000000404044E04040485001C2A9D2F81 A9F164B0D4FA81CBECFF84CEEEFF00507AEF00334DBE00334DBE00334DBE0033 4DBE00334DBE001C2B8E00000000000000000202026407070792151515BAD7CB CBFF060606BF0404048E04040485040404850404048504040485040404850404 0485040404850404048504040485020202640000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000BEA99AFFF9F2EEFFF7EE E9FFF5E9E4FF2E4EBEFF1437B3FF6677C4FFE4D0C8FFE9D0C3FFE7CCBEFFE3C5 B6FFD3AA95FF624834FF00000000000000000B0B0B72E8D9D9FF052332D978BC D7FF7ECAE9FF7ECAE9FF87D0EFFF257CA9FF8DD1F3FF8DD1F3FF8DD1F3FF8DD1 F3FF90D4F5FF00314AB20006093E000000000909097BEBEBEBFFD9D9D9FF9E9E 9EFFC3BCBCFF828282FFADADADFF919191FF6F6F6FFF7E7E7EFFA8A8A8FFDEDE DEFFE7E7E7FFE7E7E7FFEBEBEBFF0909097B0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000BEA99AFFF9F2EEFFD4D2 E1FF264AC0FF2652EDFF2149E2FF1036B5FF9B97C2FFEAD3C6FFE8CFC2FFE0C4 B5FFD3AB96FF624834FF00000000000000000000001B0A0A0A6FD7CBCBFF4C72 82FF78BEDAFF82CDEBFF8AD3F0FF257DABFF8ACEF0FF8ACEF0FF8ACEF0FF8ACE F0FF8FD3F4FFF4B62DFF002D44A4000000000A0A0A76EAEAEAFFE2E2E2FFD8D8 D8FF9F9F9FFFB1AFAFFFA09D9AFFDEDAD5FFF4EFEAFFE8E4E0FFABAAA9FF9393 93FFDBDBDBFFE2E2E2FFEAEAEAFF0A0A0A760000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000005ACE FF005ACEFF005ACEFF00000000000000000000000000C1AC9DFFFAF5F2FF1C41 BFFF2855F4FF5F83FBFF5174F6FF3B61EAFF1E3DB3FFD0C2C6FFEBD6CAFFE3CB BEFFD0AF9BFF624834FF01010102000000000000000000000015113141C6C3BC BCFF4D7586FF649CB1FF588697FF143F54FF4C7184FF6496AFFF85C7E7FF8BCF F1FF91D5F5FFFEC940FF002B429E000000000B0B0B73EDEDEDFFE6E6E6FFE6E6 E6FFBDBDBDFFAEAAA6FFE9DBCCFFF2EAE2FFF2EBE4FFF2EBE4FFF4EEE8FFB7B4 B1FFB9B9B9FFE6E6E6FFEDEDEDFF0B0B0B730000000000000000000000000000 00000000000000000000000000000000000000000000000000006B6B6B000000 00000000000000000000000000000000000000000000C5AFA0FFFCF8F6FF86A1 FBFF7695FBFF788FF5FFD6D2E4FF7D95F1FF4060E2FF3C53AFFFE9D5CDFFECD7 CDFFD3B5A3FF654B37FF00000000000000000000000000000000012C41A06D9A AAFFB1AFAFFF7E989FFFCDD8D9FFD6E0E2FFD3E0E4FF88A3B0FF5E899EFF89CA EBFF93D7F6FFEBEBDDFF002B409B000000000B0B0B71F0F0F0FFEBEBEBFFEBEB EBFFB1B1B1FFDBCFC3FFE8D8C6FFF3ECE5FFF3ECE5FFF3ECE5FFF3ECE5FFE5DC D1FFA4A4A4FFEBEBEBFFF0F0F0FF0B0B0B710000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000C8B3A3FFFDFBFAFFE6E6 F8FFBEC7F6FFF4EDECFFF6ECE7FFE2DBE2FF7991F0FF2C52DDFF5464AEFFEEDE D6FFDCC5B6FF725844FF0000000000000000000000000000000000293F9780B7 CAFF8AA4ABFFD6D8CFFFE3E9E5FFCFD9DBFFE2E8E7FFE5EAEBFF91ABB7FF76AB C5FF95D9F8FFF5F5EEFF00293F97000000000C0C0C6EF3F3F3FFEFEFEFFFEFEF EFFFA2A2A2FFE9DACAFFE9D9C7FFEFE4D7FFF4EDE6FFF4EDE6FFF2E7DEFFECDE D0FFA2A2A2FFEFEFEFFFF3F3F3FF0C0C0C6E0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000CBB6A6FFFEFDFDFFFDFB FAFFFBF8F5FFFAF4F1FFF8F0ECFFF6ECE6FFE9E0E2FF718BF1FF244AD7FF8D92 BAFFE3CFC4FF856B59FF0101010200000000000000000000000000293D9479AA B9FFC3CBC6FFD3D4C9FFE4EAE7FFCFDADCFFE2E8E7FFE2E8E7FFCAD5D4FF6C96 ABFF97DBF9FFFEFEFDFF00293D94000000000D0D0D6CF7F7F7FFF4F4F4FFF4F4 F4FFB4B4B4FFE3D6C8FFEADAC9FFEADAC9FFEADAC9FFEADAC9FFEADAC9FFE6DA CEFFB4B4B4FFF4F4F4FFF7F7F7FF0D0D0D6C0000000000ADFF000094DE000094 DE000094DE000094DE000094DE000094DE000094DE000084BD00000000000000 00000000000000000000000000000000000000000000CFB9A9FFFFFFFFFFFEFD FDFFFDFAF9FFFBF7F5FFFAF4F0FFF6EEEAFFEAE3E1FFF0E8E3FF7B92ECFF2248 D7FF9896B8FFA08D7DFF0000000000000000000000000000000000273B90739C A8FFD3D6CCFFD4D5C9FFDDE1D9FFD0DBDDFFE2E8E7FFDEE2E0FFD7D9D2FF6C94 A7FF99DDFAFF00273B9000040733000000000D0D0D6AFAFAFAFFF8F8F8FFF8F8 F8FFD2D2D2FFC8C2BDFFECDBCAFFF1E5D8FFF6EFE7FFF6EFE7FFF1E6DAFFC8C3 BEFFD2D2D2FFF8F8F8FFFAFAFAFF0D0D0D6A000000005ACEFF0000ADFF0000AD FF0000ADFF0000ADFF0000ADFF0000ADFF0000ADFF000094DE00000000000000 00000000000000000000000000000000000000000000D2BCACFFFFFFFFFFFFFE FDFF7C9FA9FF5F8894FF618694FF5F7989FF5B7584FF6A818EFF95A2A9FF8AA0 EAFF264CD6FFA8978AFF0303030400000000000000000000000000263A8D80AC B8FFC5D0CAFFD5D6CAFFD6D7CAFFBBC2BDFFD3D3CAFFD3D3CAFFC7D1D0FF76A2 B7FF9BDFFCFF00263A8D00000000000000000D0D0D68FDFDFDFFFCFCFCFFFCFC FCFFF7F7F7FFC6C6C6FFCCC6C1FFE8DBCDFFF5EBE3FFEDE6DFFFCCC7C2FFC6C6 C6FFF7F7F7FFFCFCFCFFFDFDFDFF0D0D0D68000000005ACEFF0000ADFF0000AD FF0000ADFF0000ADFF0000ADFF0000ADFF0000ADFF000094DE00000000000000 00000000000000000000000000000000000000000000D4BEAEFFFFFFFFFFFFFF FEFF87A9B6FF94D7E1FF97E5F1FF7CD7E8FF60C5DDFF4F99B0FF6D828BFFF1E4 DEFFE3D4CDFFA59688FF000000000000000000000000000000000025388A92C8 D5FF9CB9BEFFD5D7CBFFDEE2D9FFD2DDDFFFE3E9E8FFDBDFDBFF98B4C0FF85BB D5FF9EE2FDFF0025388A00000000000000000D0D0D67FFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFAFAFAFFDBDBDBFFC4C4C4FFBBBBBBFFC4C4C4FFDBDBDBFFFAFA FAFFFFFFFFFFFFFFFFFFFFFFFFFF0D0D0D67000000005ACEFF0000ADFF0000AD FF0000ADFF0000ADFF0000ADFF0000ADFF0000ADFF000094DE00000000000000 00000000000000000000000000000000000000000000C7B3A4F5FFFFFFFFFFFF FFFFF6FBFCFF80A7B3FFA2ABA0FF87756BFF76C5D6FF4A6A7AFFF7EEE9FFEDE3 DCFFF0E3DCFF836D5FFB0000000000000000000000000000000000243687A6E9 F8FF89B9C6FF9FBDC1FFCCD6CEFFCAD6D9FFCEDCDFFF99B6C3FF80AFC6FF94D7 F8FF9FE3FEFF002436870000000000000000A6722FE1EEB265FFEDB164FFEBAF 62FFE9AD60FFE6AA5DFFE4A85BFFE1A558FFDEA255FFDB9F52FFD89C4FFFD69A 4DFFD3974AFFD19548FFCF9346FF88520FE0000000005ACEFF0000ADFF0000AD FF005ACEFF005ACEFF005ACEFF005ACEFF005ACEFF0000ADFF00000000000000 000000000000000000000000000000000000000000001C1C1C20BCAA9EEDD4BE AFFFD0BDAFFF70A5B4FFA4E7EFFF9BE7F3FF8AD3E0FF446474FFC0AB9CFFBDA9 99FFBCA797FF3031313E0000000000000000000000000000000000233685ACF1 FFFFA8EAF9FF87C4D5FF64A1B8FF4B87A4FF80ADC4FF89BFDAFF96D8F9FF98DC FEFFA1E5FFFF002336850000000000000000885D28CDF3C275FDFED287FFFDCE 85FFFACA83FFF8C57EFFF6C17AFFF4BD73FFF3BB6BFFF3BC5FFFF4BE4FFFF7C2 3DFFF9C82AFFFBCD18FFF1BF1FFD885D28CD6B6B6B00BDEFFF005ACEFF005ACE FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000010101022B2C2C3686B3C3FF78A3B3FF6C92A3FF1717171A000000000000 00000000000000000000000000000000000000000000000000000023358388DC F4FF5FC0E9FF5EBFEAFF80D3F4FF9CE3FDFFA2E6FFFFA2E6FFFFA2E6FFFFA2E6 FFFFA6EAFFFF0023358300000000000000001911085C8A602ACDA97631E0A976 31E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A976 31E0A97631E0A97631E08A602ACD1911085C0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000131D610022 3381002233810022338100223381002233810022338100223381002233810022 33810022338100131D6100000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000007B635200F7BD7B00DE843100DE733100D6731800734A39000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000006B7373006B73730000000000000000000000 000000000000000000000000000000000000DDBEB30069473100694731006947 3100694731006947310069473100694731006947310069473100694731006947 3100694731006947310069473100694731000000000000000000000000000000 0000000000000000000084848400000000000000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000007B635200F7BD7B00DE843100DE733100D6731800734A39000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000006B7373008C736300A5632100734A2900000000000000 000000000000000000000000000000000000DDBEB300FFFFFF00B7A29300B7A2 9300B7A2930098300000B7A29300B7A29300B7A29300B7A29300B7A29300B7A2 9300B7A29300B7A29300B7A29300694731000000000000000000000000000000 000084848400000000000000000084848400FFFFFF0084848400000000008484 8400000000000000000000000000000000000000000000000000000000000000 0000000000007B635200F7BD7B00DE843100DE733100D6731800734A39000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000006B635A009C846300D6731800A55A2900000000000000 000000000000000000000000000000000000DDBEB300FBF9F800FBF9F800F8F5 F3009830000098300000EEE7E200ECE3DE00E9DFD800E6DBD300E3D6CE00E0D2 C900DCCDC300DCCDC300B7A29300694731000000000000000000848484000000 00000000000084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 00000000000000FFFF0000000000000000000000000000000000000000000000 000000000000848484007B6352007B6352007B6352007B635200848484000000 00000000000000000000000000000000000000000000000000005A5252005A52 52005A525200000000006B635A009C846300D6731800945A2900000000000000 000000000000000000000000000000000000DDBEB300FEFDFD00FEFDFD009830 0000C16E390098300000983000009830000098300000EAE0DA00E7DBD500E4D7 D000E0D2CA00E0D2CA00B7A29300694731000000000000000000000000008484 8400FFFFFF00FFFFFF00FFFFFF00848484000000000000000000FFFFFF000000 000000FFFF000000000084848400000000000000000000000000000000000000 0000000000000000000084848400FFFFFF00C6C6C6005A525200000000000000 0000000000000000000000000000000000000000000084848400B5B5B500BDBD BD00B5B5B500A5A5A500736B6300A58C7300D67318008C523100000000000000 000000000000000000000000000000000000DDBEB300FEFEFE0098300000DA90 4C00DA904C00C16E3900C16E3900C16E390098300000EDE4E000EAE0DA00E7DC D600E3D6CF00E3D6CF00B7A29300694731000000000084848400FFFFFF00FFFF FF00FFFFFF00FFFFFF000000000000000000FFFFFF0000000000C6C6C6008484 840000000000FFFF000000000000000000000000000000000000000000000000 0000000000000000000084848400FFFFFF00C6C6C6005A525200000000000000 0000000000000000000000000000000000000000000084848400848484008484 8400C6C6C600BDBDBD00736B6300CE9C6B00D67318008C5A39005A5252005A52 52005A5252005A5252006363630000000000DDBEB30098300000FBC4A100E8A9 7700DF9C6000DF9C6000DA904C00C16E390098300000F0E9E500EDE4E000EAE1 DC00E7DCD500E7DCD500B7A2930069473100848484000000000084848400FFFF FF000000000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF 0000FFFF00000000000084848400000000000000000000000000000000000000 0000000000000000000084848400FFFFFF00C6C6C6005A525200000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000B5B5B500C6C6C600736B6300CE9C6300D6732100734A3900B5B5B500ADAD AD00ADADAD00B5B5B500A594A5005A525200DDBEB300FFFFFF00D7673300FBC4 A100E8A97700FBC4A100FBC4A100FBC4A10098300000F2EDEA00F0E8E400EDE4 E000EAE0DA00EAE0DA00B7A29300694731000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF00000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084848400FFFFFF00C6C6C6005A525200000000000000 000000000000000000000000000000000000000000009C9C9C00636363006363 6300C6C6C600BDBDBD007B736300DEA56B00D6732100734A3900848484008484 840084848400848484008484840000000000DDBEB300FFFFFF00FFFFFF00D767 3300FBC4A100D7673300D7673300D7673300D7673300F7F3F100F4EFEB00F1EB E600EEE6E100EEE6E100B7A29300694731000000000000000000000000000000 000000000000FFFFFF000000000000000000FFFF000000000000000000000000 FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000084848400FFFFFF00C6C6C6005A525200000000000000 000000000000000000000000000000000000000000009C9C9C00A5A5A500B5B5 B500A5A5A5008484840063635A00D6A57300DE7331007B5A4A00000000000000 000000000000000000000000000000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00D7673300D7673300FFFFFF00FEFEFE00FCFBFA00F9F7F500F6F2EF00F4EF EB00F0E9E500F0E9E500B7A29300694731000000000000000000000000000000 00000000000000000000FFFF0000FFFF00000000000000000000000000000000 00000000FF000000000000000000000000000000000000000000000000000000 000000000000000000005A5252005A5252005A5252005A525200000000000000 00000000000000000000000000005A52520000000000000000009C9C9C009C9C 9C0084848400000000007B736B00F7BD7B00CE73310084635A00000000000000 000000000000000000000000000000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00D7673300FFFFFF00FFFFFF00FFFFFF00FFFFFF00FCFBFA00F6F2 EF00F4EFEB00F4EFEB00F0E9E50069473100000000000000000000000000FFFF FF0000000000FFFF000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000005A5252005A5252000000 0000000000005A525200848484008484840084848400848484005A5252000000 000000000000000000005A5252005A5252000000000000000000000000000000 0000000000000000000063524200A57B5A00A5634200846B6300000000000000 000000000000000000000000000000000000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D88000000000000000000000FFFFFF00FFFF FF00000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000527B840084848400848484005A52 52005A52520084848400C6C6C600C6C6C600C6C6C600848484005A5252005A52 52005A5252005A525200C6C6C6005A5252000000000000000000000000000000 000000000000000000005A525200A5A5A5006B6B6B005A525200000000000000 000000000000000000000000000000000000F8980000F8C89000F8980000F898 0000F8980000F8980000F8980000F8980000F8980000F8980000F8980000F898 0000F8980000F8980000F8980000000000000000000000000000FFFFFF000000 000000000000FFFF000000000000000000000000000000000000000000000000 00000000000000000000000000000000000063636300FFFFFF00C6C6C600C6C6 C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600848484008484 840084848400C6C6C6005A525200000000000000000000000000000000008C8C 8C008C8C8C00000000005A525200A5A5A500B5B5B5005A525200000000000000 000000000000000000000000000000000000F8980000F8C89000F8C89000F8C8 9000F8C89000F8C89000F8980000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000FFFF 0000FFFF00000000000000000000000000000000000000000000000000000000 0000000000000000000000FFFF0000000000527B8400FFFFFF00C6C6C600C6C6 C600FFFFFF00C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6 C600C6C6C6008484840000000000000000000000000000000000527B8400D6D6 D600636363008C8C8C005A52520094949400C6C6C600C6C6C600000000000000 00005A5252006B737300000000000000000000000000F8980000F8980000F898 0000F8980000F898000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000FFFF00000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000FFFF00000000000000000063636300FFFFFF00FFFFFF008484 840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484 8400848484000000000000000000000000000000000000000000527B8400B5B5 B50063636300F7F7F7006B6B6B0094949400ADADAD00B5B5B500C6C6C600BDBD BD009C9C9C006B73730000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084848400848484000000 0000000000008484840084848400848484008484840084848400848484000000 000000000000000000000000000000000000000000000000000063636300B5B5 B5009C9C9C008C8C8C00A5A5A500DEDEDE00CECECE00BDBDBD00ADADAD00949C 9C006B7373000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003942FF00000000000000 000000000000CEC6D60063735A00007B5A0000A5520000FF000000847B00007B 8400008C8C00004A4A00A5A5A5000000000000000000000000008C4A52008C4A 52008C4A52008C4A52008C4A52008C4A52008C4A52008C4A52008C4A52008C4A 52008C4A52008C4A52008C4A5200000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000020103234C25 68CD02010323000000000000000000000000B5BDEF000808FF0000004A000052 00000042000008520800A58CB500FFF7FF00184A080000CE000000C64200008C 7B00007B8400008C8C000029290094949C000000000000000000A57B6B00FFEF B50021393900EFCE9C0021393900EFC67B00EFB57300EFAD6B00EFB56300EFAD 6B0021393900EFB56B008C4A520000000000DDBEB30069473100694731006947 3100694731006947310069473100694731006947310069473100694731006947 3100694731006947310069473100694731000202026404040485040404850404 04850404048504040485040404850404048504040485100B1396773BA1FF9E61 C7FF572B75E8100B1396040404850202026400000000636B7B000000FF0000C6 520000EF390000FF000000AD00003139390052425A00ADC6DE000031080000FF 080000847B00007B8400008C8C00003939000000000000000000A57B6B002139 3900213939002139390021393900213939002139390021393900213939002139 390021393900213939008C4A520000000000DDBEB300FFFFFF00B7A29300B7A2 9300B7A29300B7A29300B7A29300B7A29300B7A29300B7A2930098300000B7A2 9300B7A29300B7A29300B7A29300694731000909097BEBEBEBFFE7E7E7FFE7E7 E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FF793DA3FFAE71D7FFD397 FCFFAA6DD3FF8C5BADFFDFD7E5FF0909097B00000000635A5A00000000000000 FF0000007B000000080000B5390000FF080000B5000084848C00D6CEDE000029 210000EF180000847B0000848400006B6B000000000000000000A57B7300FFEF D60021393900F7D6AD0021393900EFC68C00EFC68400EFB57B00EFB57300EFAD 6B0021393900EFB56B008C4A520000000000DDBEB300FBF9F800FBF9F800F8F5 F300F4F0ED00F2ECE800EEE7E200ECE3DE00E9DFD800E6DBD300983000009830 0000DCCDC300DCCDC300B7A29300694731000A0A0A76EAEAEAFFE2E2E2FFE2E2 E2FFE2E2E2FFE2E2E2FFE2E2E2FF7B7B7BFF7B7B7BFF7B7B7BFF8E51B7FFD397 FCFFD397FCFFDDA1FFFF773BA1FF0A0A0A76DEDEEF00216B2100004229000063 4200006BBD0000183100000000000029390000FF1000008C0000634263000052 100000CE420000EF100000738C00008C8C000000000000000000AD7B7300FFF7 E70021393900F7D6B500F7D6AD00EFCE9C00EFC68C00EFC68400EFB57B00EFB5 7300EFAD6B00EFB56B008C4A520000000000DDBEB300FEFDFD00FEFDFD00FCFA F900F8F6F400F6F2F000F3EDEA00D7673300983000009830000098300000C16E 390098300000E0D2CA00B7A29300694731000B0B0B73EDEDEDFFE6E6E6FFE6E6 E6FFE6E6E6FFE6E6E6FFE6E6E6FF7B7B7BFFE6E6E6FFE6E6E6FFDBD3E1FF9D60 C6FFDDA1FFFF763AA0FFE1D9E7FF0B0B0B731042180000FF000000FF100000FF 000000FF000000FF1000005A0000000000000031390000FF310000A50000004A 080000FF100000DE210000738C00008484000000000000000000B5847B00FFF7 EF0021393900F7E7C600F7D6B500F7D6AD00EFCE9C00EFC68C00EFC68400EFB5 7B00EFB57300EFB56B008C4A520000000000DDBEB300FEFEFE00FEFEFE00FEFD FD00FBFAF900F9F6F400F5F1EE00D7673300FBC4A100DF9C6000DA904C00DA90 4C00C16E390098300000B7A29300694731000B0B0B71F0F0F0FFEBEBEBFFEBEB EBFFEBEBEBFFEBEBEBFFEBEBEBFF7B7B7BFFEBEBEBFFE6E0D1FFB69137FFDCCF CCFF763AA0FFDFD7E5FFF0F0F0FF0B0B0B710021000000FF290000847B0000B5 520000BD420000946B0000FF080000FF000000080000005A000000BD5A00008C 00000073000000739C0000848400008C8C000000000000000000B58C8400FFFF FF0021393900F7EFD600F7E7C600F7D6B500F7D6AD00EFCE9C00EFC68C00EFC6 8400EFB57B00EFB573008C4A520000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FDFDFC00FCFBFA00F9F6F500D7673300FBC4A100E8A97700DF9C6000DA90 4C00DA904C00C16E390098300000694731000C0C0C6EF3F3F3FFCFE0E4FF0C8A A8FFCFE0E4FFEFEFEFFFEFEFEFFF7B7B7BFFEAE3D4FFAB7C0DFFD1A333FFB691 36FFEAE3D4FFEFEFEFFFF3F3F3FF0C0C0C6E001818000042520000737B00004A 5A0000526300008C7B0000847B0000FF080000B539000094000000FF000000FF 000000100000008C8C0000848400007373000000000000000000C69C8400FFFF FF0021393900FFEFE700F7EFD600F7E7C600F7D6B500F7D6AD00EFCE9C00EFC6 8C00EFC68400EFC67B008C4A520000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FEFEFE00FEFEFD00FBFBF900D7673300FBC4A100FBC4A100FBC4A100FBC4 A100C16E390098300000B7A29300694731000D0D0D6CD6E7EBFF0C8CABFF20A0 BFFF2895AFFFD3E5E9FFF4F4F4FF7B7B7BFFAD7E0FFFE1B343FFFFD868FFDDAF 3FFFB89339FFEEE8D8FFF7F7F7FF0D0D0D6C10292900007B7B00008C8C00007B 7B00007B7B00007B8400007B8400007B840000AD520000AD630000FF080000FF 000000210000008C8C00008C8C00004A4A000000000000000000C69C8400FFFF FF0021393900FFF7EF00FFEFE700F7EFD600F7E7C600F7D6B500F7D6AD00EFCE 9C00EFC68C00F7CE8C008C4A520000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FEFEFE00D7673300D7673300D7673300D7673300E8A9 770098300000EEE6E100B7A29300694731000D16187E0E8EADFF27A7C6FF1191 B0FF1898B7FF2895B0FF7B7B7BFF7B7B7BFF7B7B7BFFC19323FFFFD868FFFFD8 68FFFFE272FFAB7C0DFFFAFAFAFF0D0D0D6A0000000010393900003131000094 9400008C8C00008C8C0000848400008C8C0000848C00007B8C00007B73000052 080000849400006B6B0000212100737373000000000000000000CEA58C00FFFF FF0021393900FFFFFF00FFF7EF00FFEFE700F7EFD600F7E7C600F7D6B500F7CE A500F7CE9C00EFC68C008C4A520000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FEFEFE00FCFBFA00F9F7F500D76733009830 0000F0E9E500F0E9E500B7A293006947310009718BED28A8C7FF25A5C4FF1191 B0FF1191B0FF1F9FBEFF2896B0FFDAEBF0FFFCFCFCFFF5EFDFFFD0A232FFFFE2 72FFAA7B0CFFF5EFDFFFFDFDFDFF0D0D0D6800000000CED6D600A5ADAD000000 00000000000000292900004A4A000000000000393900008C8C00006B6B000000 00000000000029393900B5BDBD00000000000000000000000000CEA58C00FFFF FF0021393900FFFFFF00FFFFFF00FFF7EF00FFEFE700FFE7CE00F7E7C600F7E7 C600D6C6A500A59C7B008C4A520000000000DDBEB300FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0098300000F6F2 EF00F4EFEB00F4EFEB00F0E9E500694731000F17197C0E8EADFF37B7D6FF2CAC CBFF20A0BFFF20A0BFFF27A7C6FF2996B1FFDDEEF2FFFFFFFFFFF8F1E2FFAA7B 0CFFF8F1E2FFFFFFFFFFFFFFFFFF0D0D0D670000000000000000000000009484 8C0008F7F700399C9C000084840042F7F700297B7B0000525200000000009CA5 A500000000000000000000000000000000000000000000000000D6A58C00FFFF FF0021393900FFFFFF00FFFFFF00FFFFFF00FFF7EF00FFEFE700EFD6C600A573 63008C635200845A4A008C4A520000000000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000D8800000D8800000D8800000D880 0000D8800000D8800000D8800000D8800000A6722FE1CEAC6DFF1191B0FF43C3 E2FF3ABAD9FF2FAFCEFF2FAFCEFF44C4E3FF0685A3FFDB9F52FFD89C4FFFD69A 4DFFD3974AFFD19548FFCF9346FF88520FE0000000000000000000000000847B 7B00FF000000FF00000000A5A500FF000000CE00000000636300212121000000 0000000000000000000000000000000000000000000000000000E7AD8C00FFFF FF0021393900FFFFFF00FFFFFF00FFFFFF00FFFFF700FFFFF700D6B5AD009C5A 4200E7843900E7731800A552310000000000F8980000F8C89000F8980000F898 0000F8980000F8980000F8980000F8980000F8980000F8980000F8980000F898 0000F8980000F8980000F898000000000000885D28CDF3C275FDDCC78BFF1393 B2FF4FCFEEFF48C8E7FF47C7E6FF0685A3FFD2B372FFF3BC5FFFF4BE4FFFF7C2 3DFFF9C82AFFFBCD18FFF1BF1FFD885D28CD0000000000000000000000008473 7B0008F7F70008A5A500006B6B0008F7F700008C8C00005A5A00101818000000 0000000000000000000000000000000000000000000000000000E7AD8C002139 39002139390021393900FFFFFF00FFFFFF00FFFFFF00FFFFFF00D6B5B500AD6B 4A00FFA54200AD6342000000000000000000F8980000F8C89000F8C89000F8C8 9000F8C89000F8C89000F8980000000000000000000000000000000000000000 0000000000000000000000000000000000001911085C8A602ACDA97631E09577 40E41696B5FF59D9F8FF0A839FFE957740E4A97631E0A97631E0A97631E0A976 31E0A97631E0A97631E08A602ACD1911085C000000000000000000000000B5BD C600000000000031310000000000001010000052520000525200737373000000 0000000000000000000000000000000000000000000000000000E7AD8C00F7F7 EF0021393900F7F7EF00F7F7EF00F7F7EF00F7F7EF00F7F7EF00D6B5AD00A563 4A00B56B520000000000000000000000000000000000F8980000F8980000F898 0000F8980000F898000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000203231184A1F300020323000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000D6DEDE00000808006B8484001839390000101000737B7B00000000000000 0000000000000000000000000000000000000000000000000000EFB59C00EFC6 A500EFC6A500E7B5A500E7B5A500E7B5A500E7B5A500E7B5A500E7B5A5008C52 4200000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000201011C543D28AE0503022C00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000CA3774DF1AB7E51F707050332000000000000 0000000000000000000000000000000000000000000000000000000000008400 0000000000008400000000000000840000008400000084000000000000008400 0000840000008400000000000000000000000000000084840000000000000000 0000848400000000000000000000000000008484000000000000000000008484 00000000000000000000000000000000000000000000840000000000FF000000 FF000000FF000000000000000000000000008400000000000000000000008400 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000085603ED9E2CEB9FFAD7E52F8060403310000 0000000000000000000000000000000000000000000000000000000000008400 0000000000008400000000000000840000000000000000000000000000008400 0000000000000000000000000000000000000000000084840000000000000000 0000848400000000000000000000000000008484000000000000000000008484 00000000000000000000000000000000000000000000840000000000FF000000 FF000000FF000000FF0000000000000000008400000000000000000000008400 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000140E0955A3774DF1F9F6F1FFE2CDB8FFB58456FE8863 40DC7D5B3BD33A2B1B910000000F000000000000000000000000000000008400 0000840000000000000000000000840000008400000000000000000000008400 0000000000000000000000000000000000000000000084840000000000000000 0000848400000000000000000000000000008484000000000000000000008484 0000000000000000000000000000000000000000000084000000000000000000 FF000000FF000000FF0000000000000000008400000000000000000000008400 00000000FF0000000000000000000000000000000000010000152E2216810302 01210000000033251887CFAD8DFFEBDED1FFFDFCFAFFFDFCFAFFFDFBF8FFF4EB E3FFF1E7DDFFD8BDA2FFAB7C50F6241A11720000000000000000000000008400 0000000000008400000000000000840000000000000000000000000000008400 0000000000000000000000000000000000008484000084840000848400008484 0000848400008484000084840000848400008484000084840000848400008484 0000848400008484000084840000000000008400000084000000840000008400 00000000FF000000FF000000FF00840000008400000084000000840000000000 FF000000FF0084000000840000000000000000000000000000095A412AB35E44 2CB703020125976E47E8F8F1ECFFFDFBF8FFF8F0E7FFF7EFE6FFF7EEE4FFF8F0 E8FFF8F1EAFFFDFBF9FFF2E9E0FF83603ED80000000000000000000000008400 0000840000000000000000000000840000008400000084000000000000008400 0000840000008400000000000000000000000000000000000000848400000000 0000000000008484000000000000000000000000000084840000000000000000 0000848400000000000000000000000000000000000000000000840000000000 0000000000000000FF000000FF000000FF0000000000840000000000FF000000 FF00840000000000000000000000000000000000000000000000483522A17C71 65BD5F452DB8A67A4EF3FAF7F2FFFAF3ECFFF8F1E9FFF8F0E7FFF7EFE6FFF7EE E4FFF6ECE2FFF7EFE7FFF4ECE5FF8C6542DF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000848400000000 0000000000008484000000000000000000000000000084840000000000000000 0000848400000000000000000000000000000000000000000000840000000000 000000000000840000000000FF000000FF000000FF000000FF000000FF000000 000084000000000000000000000000000000000000000A07043C513B26AA8784 80BD7C7065BDB18254FBFAF6F1FFFAF4EEFFF9F2EAFFF8F1E9FFF8F0E8FFF7EF E6FFF7EEE4FFF8F1E9FFF3EAE2FF85613FDA0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008484000084840000848400008484 0000848400008484000084840000848400008484000084840000848400008484 0000848400008484000084840000000000008400000084000000840000008400 00008400000084000000840000000000FF000000FF000000FF00840000008400 0000840000008400000084000000000000001C140D64715D4CBD807971BD8B8A 89BD8B8A89BDB38659FBFAF6F2FFFAF5EFFFFAF4EEFFFAF3EDFFF9F3EBFFF9F2 EBFFF8F1E9FFFAF5EFFFF3EAE2FF85613FDA00000000CED6D60000000000CED6 D60000000000CED6D60000000000CED6D60000000000CED6D60000000000CED6 D60000000000CED6D60000000000000000000000000000000000848400000000 0000000000000000000084840000000000000000000084840000000000000000 0000000000008484000000000000000000000000000000000000840000000000 000000000000000000000000FF000000FF000000FF000000FF000000FF000000 000000000000840000000000000000000000523C27AC888481BD8B8A89BD8884 7EBD87837EBDAD8966F0E4D1BDFFFAF6F2FFFAF6F1FFFAF6F1FFFAF5F1FFFAF5 F1FFFAF5F0FFF6F0E9FFDCC3ACFF533D27AD0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008484 0000000000000000000084840000000000000000000000000000848400000000 0000000000008484000000000000000000000000000000000000000000008400 0000000000000000FF000000FF000000FF0000000000000000000000FF000000 FF00000000008400000000000000000000005A412AB3898784BD898581BD8884 80BD88847EBD918679CBAA8662EEB4875AFBB4875BFBB4875AFBAF8052F9A175 4CEFA1754CEF926A45E432241886040302280000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008484 0000000000000000000084840000000000000000000000000000848400000000 0000000000008484000000000000000000000000000000000000000000000000 FF000000FF000000FF000000FF00000000000000000000000000840000000000 FF000000FF0084000000000000000000000059412AB2898784BD898682BD8984 80BD888480BD88847FBD87837EBD87827DBD888480BD85807CBD493522A20000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000FF000000 FF000000FF000000FF0000000000000000000000000000000000000000000000 00000000FF000000FF00000000000000000059412AB2898784BD898783BD8986 82BD898582BD898581BD898481BD888480BD898783BD85807CBD493522A20000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000FF000000 FF000000FF000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003A2B1B917D7368BD898784BD8987 84BD898784BD898784BD898784BD898784BD878480BD796B5DBD2E2116800000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000403022838291A8E574029B15740 29B1574029B1574029B1574029B1574029B14F3A26A91B140D630201011E0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000073DEFF004AD6FF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000006B6B6B00D6F7FF0073DEFF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000000000000000000000000000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A00000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000004A844A000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004A84 4A00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000004A844A004A84 4A00000000000000000000000000FF630000D6520000D6520000BD4A0000BD4A 0000BD4A000000000000000000000000000000000000000000004A844A004A84 4A00000000000000000000000000FF630000D6520000D6520000BD4A0000BD4A 0000BD4A00000000000000000000000000000000000000000000000000000000 0000000000000000000073DEFF004AD6FF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000004A844A004A844A005ABD6B006BCE 84004A844A000000000000000000FF630000FF630000FF630000FF630000FF63 0000FF630000000000000000000000000000000000004A844A005ABD6B006BCE 84004A844A004A844A0000000000FF630000FF630000FF630000FF630000FF63 0000FF6300000000000000000000000000000000000000000000000000000000 00000000000000000000D6F7FF004AD6FF004AD6FF0000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000840000008400000000000000000000000000 0000000000000000000000000000000000004A844A0063E7630063E763006BCE 840018C618004A844A0000000000000000000000000000000000000000000000 0000000000000000000000000000000000004A844A0063E763006BCE840018C6 180018C618004A844A0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000006B6B6B0073DEFF005AD6FF004AD6FF00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000084000000840000008400000084000000000000000000 0000000000000000000000000000000000004A844A004A844A006BCE840018C6 18004A844A000000000000000000FF630000D6520000D6520000BD4A0000BD4A 0000BD4A0000BD4A0000BD4A0000BD4A0000000000004A844A0063E763006BCE 84004A844A004A844A0000000000FF630000D6520000D6520000BD4A0000BD4A 0000BD4A0000BD4A0000BD4A0000BD4A00000000000000000000000000000000 00000000000000000000000000000000000073DEFF005AD6FF004AD6FF000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008400000084000000840000008400000084000000840000000000 00000000000000000000000000000000000000000000000000004A844A004A84 4A00000000000000000000000000FF630000FF630000FF630000FF630000FF63 0000FF630000FF630000FF630000FF63000000000000000000004A844A004A84 4A00000000000000000000000000FF630000FF630000FF630000FF630000FF63 0000FF630000FF630000FF630000FF6300000000000000000000000000000000 0000000000000000000000000000000000000000000073DEFF005AD6FF004AD6 FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000840000008400000000000000000000000000 00000000000000000000000000000000000000000000000000004A844A000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004A84 4A00000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000073DE FF004AD6FF00000000000000000000000000000000000000000073DEFF004AD6 FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000840000008400000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000006B6B6B00D6F7 FF005AD6FF004AD6FF0000000000000000000000000073DEFF005AD6FF004AD6 FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000840000008400000000000000000000000000 000000000000000000000000000000000000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000000000000000000000000000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A00000000000000000000000000000000000000000000000000000000 0000D6F7FF0073DEFF0073DEFF0073DEFF0073DEFF0073DEFF0073DEFF0073DE FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000840000008400000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000D6F7FF00D6F7FF00D6F7FF00D6F7FF00D6F7FF00D6F7FF000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000E000010690000 2EAE00003BC700002EAE000010690000000E0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000E00002D9A060679DF0D0D B8F61010CEFD0D0DB7F6050578DF00002D9A0000000E00000000000000000000 0000000000000000000000000000000000000000000084848400000000000000 0000848484000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000202026404040485040404850404 0485040404850404048504040485040404850404048504040485040404850404 048504040485040404850404048502020264493022A9C28D66FFBF8A64FFBD87 62FFBA845FFFB8825DFFB37C5AFFB17A58FFB07956FFAD7755FFAC7454FFAA73 52FFA87151FFA86F4FFF493022A900000000020225A40E0E87F01616C7FF1010 C5FF1010C5FF1010C5FF1010C4FF060682F002022AB704040485040404850404 04850404048504040485040404850202026400000000000000000000000000FF FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000909097BEBEBEBFFE3DCCDFFB590 36FFE3DCCDFFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFD3D3E6FF5858C6FFD3D3 E6FFE7E7E7FFE7E7E7FFEBEBEBFF0909097BC8916AFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFA8704FFF00000000040455D53333C1FF1010B2FF1010 B2FF1010B2FF1010B2FF1010B2FF1818B0FF4848AAFFE7E7E7FFE7E7E7FFE7E7 E7FFE7E7E7FFE7E7E7FFEBEBEBFF0909097B000000000000000000FFFF000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000A0A0A76E5DFD0FFAB7C0DFFD1A3 33FFB38E34FFDED8C9FFE2E2E2FFE2E2E2FFCFCFE1FF3737C0FF5D5DE6FF5656 C4FFCFCFE1FFE2E2E2FFEAEAEAFF0A0A0A76CA936CFFC6B2A9FF6D4D31FF6D4D 31FF6D4D31FFAB968BFFFEFEFCFFFEFEFCFFC6B2A9FF6D4D31FF6D4D31FF6D4D 31FFC6B2A9FFFFFFFFFFA97151FF0000000003036AE14848D0FF2626B3FF1515 A6FF1010A2FF1010A2FF1010A2FF1B1BAAFF3030A5FFE2E2E2FFE2E2E2FFE2E2 E2FFE2E2E2FFE2E2E2FFEAEAEAFF0A0A0A760000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000B0B0B73AD7E0FFFE1B343FFFFD8 68FFDDAF3FFFB59036FFE2DCCCFFE6E6E6FF3939C2FF6D6DF6FF9393FFFF6969 F2FF5858C6FFD2D2E5FFEDEDEDFF0B0B0B73CC966DFF6D4D31FFECE8E4FFFFFF FCFFC6B2A9FF6D4D31FFFEFEFBFFFDFDFAFF6D4D31FFECE8E4FFFFFFFCFFC6B2 A9FF6D4D31FFFFFFFFFFAB7352FF0000000005055DD34F4FD6FF3939C2FF3737 C0FF3030B9FF2929B2FF2828B1FF3838BFFF4848B2FFE6E6E6FFE6E6E6FFE6E6 E6FFE6E6E6FFE6E6E6FFEDEDEDFF0B0B0B730000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000B0B0B71EBE4D5FFC19323FFFFD8 68FFFFD868FFFFE272FFAB7C0DFFEBEBEBFFD6D6E9FF4D4DD6FF9393FFFF9393 FFFF9D9DFFFF3737C0FFF0F0F0FF0B0B0B71D19B71FF6D4D31FFFFFAEBFFFFFF FCFFFFFFFCFF6D4D31FFFDFDFBFFFDFDFAFF6D4D31FFFFFAEBFFFFFFFCFFFFFF FCFF6D4D31FFFFFFFFFFAF7856FF000000000A0A36AB4343C8FF5959E2FF4E4E D7FF4E4ED7FF4E4ED7FF5656DFFF3E3EC3FF8A8ACCFFEBEBEBFFEBEBEBFFEBEB EBFFEBEBEBFFEBEBEBFFF0F0F0FF0B0B0B710000000084848400000000000000 0000848484008484840084848400848484000000000000000000000000000000 0000000000000000000000000000000000000C0C0C6EF3F3F3FFEAE3D4FFD0A2 32FFFFE272FFAA7B0CFFEAE3D4FFEFEFEFFFEFEFEFFFDADAEDFF5C5CE5FF9D9D FFFF3636BFFFDADAEDFFF3F3F3FF0C0C0C6ED49D73FF6D4D31FFFFF3D5FFFFFA EBFFFFFAEBFF6D4D31FFC6B2A9FFC6B2A9FF6D4D31FFFFF3D5FFFFFAEBFFFFFA EBFF6D4D31FFFFFFFFFFB17A58FF000000000C0C11765F5FC3FF4545CCFF6161 EAFF6969F0FF6060E9FF4444CCFF5D5DC2FFE1E1EAFFEFEFEFFFEFEFEFFFEFEF EFFFEFEFEFFFEFEFEFFFF3F3F3FF0C0C0C6E00000000000000000000000000FF FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000D0D0D6CF7F7F7FFF4F4F4FFEEE8 D8FFAA7B0CFFEEE8D8FFF4F4F4FFD3E5E9FF2E8199FFD3E5E9FFDEDEF1FF3636 BFFFDEDEF1FFF4F4F4FFF7F7F7FF0D0D0D6CD59F74FFC6B2A9FF6D4D31FF6D4D 31FF6D4D31FFC6B2A9FF6D4D31FF6D4D31FFC6B2A9FF6D4D31FF6D4D31FF6D4D 31FFAB968BFFFFFFFFFFB47C5AFF000000000D0D0D6CE9E9F2FF8F8FD5FF4C4C C0FF3434B9FF4C4CC0FF8F8FD5FFE6E6EFFFF4F4F4FFF4F4F4FFF4F4F4FFF4F4 F4FFF4F4F4FFF4F4F4FFF7F7F7FF0D0D0D6C000000000000000000FFFF000000 0000000000008484840084848400000000008484840084848400000000000000 0000000000000000000000000000000000000D0D0D6AFAFAFAFFF8F8F8FFF8F8 F8FFF8F8F8FFF8F8F8FFD7E8ECFF006585FF0C8CABFF2E8099FFD7E8ECFFF8F8 F8FFF8F8F8FFF8F8F8FFFAFAFAFF0D0D0D6AD8A177FFFFFFFFFF876B54FFC6B2 A9FFFCFBF9FFFBFAF6FFFBF8F5FFFBF7F4FFFBF6F1FFF8F4EEFFF7F2EBFFC6B2 A9FF6D4D31FFFFFFFFFFB6805CFF000000000D0D0D6AFAFAFAFFF8F8F8FFF8F8 F8FFF8F8F8FFF8F8F8FFF8F8F8FFF8F8F8FFF8F8F8FFF8F8F8FFF8F8F8FFF8F8 F8FFF8F8F8FFF8F8F8FFFAFAFAFF0D0D0D6A00000000000000000000000000FF FF00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000D0D0D68FDFDFDFFFCFCFCFFFCFC FCFFFCFCFCFFFCFCFCFF006787FF1C9CBBFF41C1E0FF1898B7FF30829BFFDAEB F0FFFCFCFCFFFCFCFCFFFDFDFDFF0D0D0D68D9A277FFFFFFFFFFFCFBF9FF6D4D 31FFC6B2A9FFFBF7F4FFFAF7F2FF6D4D31FFF7F3EDFFF6EFEAFFF5EBE7FFF3EA E4FFC6B2A9FF6D4D31FFB9845EFF000000000D0D0D68FDFDFDFFFCFCFCFFFCFC FCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC FCFFFCFCFCFFFCFCFCFFFDFDFDFF0D0D0D68000000000000000000FFFF000000 0000000000008484840084848400000000008484840084848400000000000000 0000000000000000000000000000000000000D0D0D67FFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFDDEEF2FF007B9BFF41C1E0FF41C1E0FF4BCBEAFF0065 85FFFFFFFFFFFFFFFFFFFFFFFFFF0D0D0D67DBA378FFFFFFFFFFFFFFFFFFFFFF FFFF6D4D31FFC6B2A9FFFFFFFFFF876B54FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFC6B2A9FF6D4D31FF000000000D0D0D67FFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFF0D0D0D6700000000000000000000000000FF FF00000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000A6722FE1EEB265FFEDB164FFEBAF 62FFE9AD60FFE6AA5DFFE4A85BFFC3A062FF0B8BAAFF4BCBEAFF006484FFB997 59FFD3974AFFD19548FFCF9346FF88520FE0DCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFBF8A64FF00000000A6722FE1EEB265FFEDB164FFEBAF 62FFE9AD60FFE6AA5DFFE4A85BFFE1A558FFDEA255FFDB9F52FFD89C4FFFD69A 4DFFD3974AFFD19548FFCF9346FF88520FE00000000084848400000000000000 0000848484008484840084848400848484000000000084848400848484000000 000000000000000000000000000000000000885D28CDF3C275FDFED287FFFDCE 85FFFACA83FFF8C57EFFF6C17AFFF4BD73FFD2B372FF006484FFD3B65AFFF7C2 3DFFF9C82AFFFBCD18FFF1BF1FFD885D28CDD7A882FDE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFBC8D69FD00000000885D28CDF3C275FDFED287FFFDCE 85FFFACA83FFF8C57EFFF6C17AFFF4BD73FFF3BB6BFFF3BC5FFFF4BE4FFFF7C2 3DFFF9C82AFFFBCD18FFF1BF1FFD885D28CD0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000001911085C8A602ACDA97631E0A976 31E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A976 31E0A97631E0A97631E08A602ACD1911085C1D130E6BCA9F80F4DCA679FFDCA5 78FFDAA378FFD8A177FFD59F74FFD49D73FFD29C71FFCF9970FFCE986EFFCB95 6DFFC9936AFFB38A6EF41D130E6B000000001911085C8A602ACDA97631E0A976 31E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A976 31E0A97631E0A97631E08A602ACD1911085C0000000000000000840000008400 0000840000008400000084000000840000008400000084000000840000008400 0000840000008400000084000000840000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000030308481B1B44CC010104330000 0000030308481B1B44CC03030848000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000001A0606106C0E0E26A6151536C4151536C40E0E26A60606106C0000 001A00000000000000000000000000000000212155CC6A6ADBFF212155CC0A0A 1A71212155CC6A6ADBFF212155CC000000000000000000000000000000000000 0000000000000000000000000000000000000000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000303 0A4D191941BF363685E35252C5F55C5CD3FD5C5CD3FD5252C5F5363685E31919 41BF03030A4D00000000000000000000000004040B4824245CCC7A7ADFFF2424 5CCC7A7ADFFF24245CCC04040B48000000000000000000000000000000000000 0000000000000000000000000000000000000000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000202026404040485040404850404 0485040404850404048504040485040404850404048504040485040404850404 048504040485040404850404048502020264000000000000000004040B4D2323 59CD5454C7F65E5ED7FF5E5ED7FF5E5ED7FF5E5ED7FF5E5ED7FF5E5ED7FF5252 C5F6222258CD04040B4D0000000000000000000000000D0D237B252561CC9292 E4FF252561CC0B0B1D7100000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000084848400000000008400 0000840000008400000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000909097BEBEBEBFFE7E7E7FFE7E7 E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7E7FFE7E7 E7FFE7E7E7FFE7E7E7FFEBEBEBFF0909097B000000000000011A1E1E4DBF5858 C7F65E5ED7FF5C5CD7FF5C5CD7FF5C5CD7FF5C5CD7FF5C5CD7FF5C5CD7FF5C5C D7FF4E4EBDF61D1D4FBF0000011A0000000005050C48272767CCA7A7E9FF2727 67CCA7A7E9FF272767CC02020633000000000000000E0606106911112EAE1717 3DC711112EAE060610690000000E000000000000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000A0A0A76EAEAEAFFE2E2E2FFE2E2 E2FFE2E2E2FFE2E2E2FF599265FF2C7137FF2C7137FF2C7137FF2C7137FF2C71 37FF2C7137FF599265FFEAEAEAFF0A0A0A76000000000909196C434397E25F5F D8FF5A5AD5FF5A5AD5FF5A5AD5FF5A5AD5FF5A5AD5FF5A5AD5FF5A5AD5FF5A5A D5FF5A5AD5FF373789E30909196C0000000029296CCCB7B7EDFF29296CCC0E0E 267B29296CCCB7B7EDFF29296CCC0000000E11112D9A363680DF5454C7F65C5C D3FD5454C7F631317DDF11112D9A0000000E0000000084848400000000008400 0000840000008400000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000B0B0B73EDEDEDFFE6E6E6FFE6E6 E6FFE6E6E6FFE6E6E6FF2D8A4AFF4FBD87FF3FB278FF26A867FF28AD6AFF28B0 6CFF32B975FF2D8A4AFFEDEDEDFF0B0B0B730000000016163CA76767CAF55757 CCFF5757CCFF5757CCFF5757CCFF5757CCFF5757CCFF5757CCFF5757CCFF5757 CCFF5757CCFF4D4DB4F516163CA70000000005050D482B2B71CC05050D480000 000005050D482B2B71CC05050D48090917693C3C8ADF6262D9FF5E5ED7FF5E5E D7FF5E5ED7FF5C5CD7FF31317DDF090917690000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000B0B0B71F0F0F0FFEBEBEBFFEBEB EBFF5D9569FF2E7239FF118539FF088B3BFF088B3BFF088B3BFF088B3BFF1192 45FF2EA45FFF5DB582FFF0F0F0FF0B0B0B7100000000202055C48080DCFD6A6A DBFF6A6ADBFF5353C0FF5151BCFF5151BCFF5151BCFF5151BCFF5353C0FF5353 C0FF5353C0FF5858C5FD202055C4000000000000000000000000000000000000 0000000000000000000E060610692A2A6BE56D6DD8FD5757C8FF5757C8FF5757 C8FF5757C8FF5757C8FF5050B7F6191943AE0000000084848400000000008400 0000840000008400000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000C0C0C6EF3F3F3FFEFEFEFFFEFEF EFFF2E8B4CFF56C48EFF4FBD87FF26A867FF28AD6AFF28B06CFF32B975FF2E8B 4CFFEFEFEFFFEFEFEFFFF3F3F3FF0C0C0C6E00000000202058C48585DDFD7676 DDFF7676DDFF7171DCFF7171DCFF5F5FCCFF5F5FCCFF4F4FB8FF4F4FB8FF4F4F B8FF4F4FB8FF5C5CC7FD202058C4000000000000000000000000000000000000 00000000000E11112D9A363680DF4242A6FD8A8AE2FF6E6EDBFF5656C1FF4F4F B8FF4F4FB8FF4F4FB8FF5A5AC3FD25255EC70000000084848400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000D0D0D6CF7F7F7FF60996CFF2F74 3BFF12863AFF088C3BFF088C3BFF088C3BFF088C3BFF129345FF2FA661FF60B9 86FFF4F4F4FFF4F4F4FFF7F7F7FF0D0D0D6C00000000191943A77D7DCFF57A7A DFFF7A7ADFFF7A7ADFFF7A7ADFFF7A7ADFFF7A7ADFFF7A7ADFFF7A7ADFFF7A7A DFFF7A7ADFFF6262C9F5191943A7000000000000000000000000000000000000 0000090917693C3C8ADF6262D9FF4848B3FF8B8BE3FF8080E0FF7C7CDFFF7676 DDFF6F6FDCFF6E6EDBFF6E6ECDF61C1C4AAE0000000084848400848484008484 8400848484008484840084848400848484000000000000000000000000000000 0000000000000000000000000000000000000D0D0D6AFAFAFAFF308D4EFF56C4 8EFF4FBD87FF3FB278FF26A867FF28B06CFF32B975FF308D4EFFF8F8F8FFF8F8 F8FFF8F8F8FFF8F8F8FFFAFAFAFF0D0D0D6A000000000B0B1D6C5C5CAFE38A8A E2FF8585E1FF8585E1FF8585E1FF8585E1FF8585E1FF8585E1FF8585E1FF8585 E1FF8A8AE2FF5757ADE30B0B1D6C000000000000000000000000000000000000 0000191943AE6C6CCDF65757C8FF4C4CBBFF6F6FDCFF9D9DE7FF9292E4FF9292 E4FF9292E4FF9B9BE7FF5151A8DF0A0A1B690000000000000000000000008484 8400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000D0D0D68FDFDFDFF63BC89FF31A8 63FF31A863FF31A863FF31A863FF31A863FF31A863FF63BC89FFFCFCFCFFFCFC FCFFFCFCFCFFFCFCFCFFFDFDFDFF0D0D0D68000000000000011A292964BF8D8D D5F69292E4FF9292E4FF9292E4FF9292E4FF9292E4FF9292E4FF9292E4FF9292 E4FF8686D4F6262662BF0000011A000000000000000000000000000000000000 000025255EC78686DEFD6E6EDBFF5454BDFF4646ADFF7171DCFF9D9DE7FFABAB EBFF9898E2FD5757A8DF16163D9A0000000E0000000000000000000000008484 8400848484008484840084848400848484008484840084848400000000000000 0000000000000000000000000000000000000D0D0D67FFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFF0D0D0D67000000000000000005050F4D3535 7FCD9191D7F6A0A0E8FF9B9BE7FF9B9BE7FF9B9BE7FF9B9BE7FFA0A0E8FF9090 D6F633337CCD05050F4D00000000000000000000000000000000000000000000 00001C1C4AAE8383D3F68080E0FF7C7CDFFF7272DDFF5C5CCBFF5050BFFF4C4C B9FD333388E50B0B1D690000000E000000000000000000000000000000000000 0000000000008484840000000000000000000000000000000000000000000000 000000000000000000000000000000000000A6722FE1EEB265FFEDB164FFEBAF 62FFE9AD60FFE6AA5DFFE4A85BFFE1A558FFDEA255FFDB9F52FFD89C4FFFD69A 4DFFD3974AFFD19548FFCF9346FF88520FE00000000000000000000000000606 0F4D292969BF6060B1E38F8FD5F5A6A6E6FDA5A5E5FD8F8FD5F55D5DAFE32929 69BF06060F4D0000000000000000000000000000000000000000000000000000 00000A0A1B695757A8DF9D9DE7FF9292E4FF9292E4FF9292E4FF9B9BE7FF5151 A8DF0A0A1B690000000000000000000000000000000000000000000000000000 0000000000008484840084848400848484008484840084848400848484008484 840000000000000000000000000000000000885D28CDF3C275FDFED287FFFDCE 85FFFACA83FFF8C57EFFF6C17AFFF4BD73FFF3BB6BFFF3BC5FFFF4BE4FFFF7C2 3DFFF9C82AFFFBCD18FFF1BF1FFD885D28CD0000000000000000000000000000 00000000011A0B0B1F6C1B1B4AA6272768C4272768C41B1B4AA60B0B1F6C0000 011A000000000000000000000000000000000000000000000000000000000000 00000000000E16163D9A5757A8DF9393D7F6A8A8E6FD9292D7F65757A8DF1616 3D9A0000000E0000000000000000000000000000000000000000840000008400 0000840000008400000084000000840000008400000084000000840000008400 0000840000008400000084000000840000001911085C8A602ACDA97631E0A976 31E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A97631E0A976 31E0A97631E0A97631E08A602ACD1911085C0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000E0B0B1D691F1F51AE28286BC71F1F51AE0B0B1D690000 000E000000000000000000000000000000000000000000000000840000008400 0000840000008400000084000000840000008400000084000000840000008400 0000840000008400000084000000840000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000030000 00120000002502010043391D01A3613101CC391D01A302010044000000280000 0015000000050000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000030000 00120000002502010043391D01A3613101CC391D01A302010044000000280000 0015000000050000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000020000 0009000000133B1F03A1B0791CE8FFB914FFB07511E83B1F03A1000000140000 000B000000030000000000000000000000000000000A00000017000000190000 0017000000130000000F0000000D0000000F00000013000000170000001A0000 0018000000130000000D00000006000000010000000000000000000000020000 0009000000133B1F03A1B0791CE8FFB914FFB07511E83B1F03A1000000140000 000B000000030000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000006A3A07CCFFC73CFFFFB200FFFFC028FF6A3A07CC000000000000 00000000000000000000000000000000000001000029381C00A1613101CC381C 00A1010000390000001E0000001A0000001E000000260C060062613101CC0B06 006300000026000000190000000C000000020000000000000000000000000000 0000000000006A3A07CCFFC73CFFFFB200FFFFBF28FF6A3A07CC000000000000 000000000000000000000000000000000000000000000000000000000000725F D1002310C1002310C1002310C1002310C1002310C1002310C1002310C1002310 C1002310C100725FD10000000000000000000000000000000000000000000000 0000000000004024079BB6893DE8FECA4DFFB68737E84024079B000000000000 0000000000000000000000000000000000003A1E029BAB7933E8FEB91CFFAF75 11E83A1E029B00000000000000000000000009050048643404CCFFBE21FF6434 04CC090500480000000000000000000000000000000000000000000000000000 0000000000004024079BB6893DE8FDCA4EFFB68737E84024079B000000000000 0000000000000000000000000000000000000000000000000000000000002310 C100A9AEF800A9A6F800A9A6F800A9A6F800A9A6F800A9A6F800A9A6F800A9A6 F800A9A6F8002310C10000000000000000000000000000000000000000000000 0000000000000201001B4328099B764611CC4328099B0201001B000000000000 000000000000000000000000000000000000693907CCF5C77AFFF3B141FFFBBD 2FFF693907CC00000000000000000D070148693907CCFBBF31FFF9AE07FFFBBC 2BFF693907CC0D07014800000000000000000000000000000000000000000000 0000000000000201001B4328099B764611CC4328099B0201001B000000000000 0000000000000000000000000000000000000000000000000000000000002310 C100A9AEF8004237E8004237E8004237E8004237E8004237E8004237E8004237 E800A9AEF8002310C10000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003F23069BB38847E8F7CC80FFB385 3FE83F23069B000000000D0701486E3E0BCCF2BE4BFFEAA41CFFEAA41CFFEAA4 1CFFF0B841FF6E3E0BCC0D070148000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000003A28 C9007A77F0003A2FE8003A2FE8003A2FE8003A2FE8003A2FE8003A2FE8003A2F E8007A77F0003A28C90000000000000000000000000000000000000000000000 000000000000000000000C060048633303CC0C06004800000000000000000000 0000000000000000000000000000000000000201001B4226099B74430FCC4226 099B0201001B0E08014874430FCCECBF65FFE3AC4AFFDEA23EFFD99933FFDDA1 3DFFE1A846FFE6B356FF74430FCC0E0801480000000000000000000000000000 000000000000381D0299633303CC633303CC633303CC381D0299000000000000 0000000000000000000000000000000000000000000000000000000000003A37 B9007267F0003220E8003220E8003220E8003220E8003220E8003220E8003220 E8007267F0003A37B90000000000000000000000000000000000000000000000 0000000000000D0701486D3C0ACCE0AC53FF6D3C0ACC0D070148000000000000 0000000000000000000000000000000000000805013300000000000000000000 00000000000043280A99794913CC794913CC73420FCCDBA859FFCD9142FFD9A5 56FF794913CC794913CC794913CC43280A990000000000000000000000000000 0000000000006D3C0ACCD69F4EFFD39947FFD49C4AFF6D3C0ACC000000000000 0000000000000000000000000000000000000000000000000000000000003A37 B9007A77F0003A2FE8003A2FE8003A2FE8003A2FE8003A2FE8003A2FE8003A2F E8007A77F0003A3FC90000000000000000000000000000000000000000000000 00000E090248784712CCE1B263FFCD9142FFDEAD5EFF784712CC0E0902480000 0000000000000000000000000000000000008B5D25C505030126000000000000 00000000000000000000000000000402002681501AD4E0AC5FFFD19649FFD2A1 56FA643E12B60000000000000000000000000000000000000000000000000000 000000000000784712CCD59F52FFCC9043FFD39A4DFF784712CC000000000000 0000000000000000000000000000000000000000000000000000000000003A3F C900A9A6F8004A3FE8004A3FE8004A3FE8004A3FE8004A3FE8004A3FE8004A3F E800A9AEF8003A3FC90000000000000000000000000000000000000000000F09 03487E4E17CCEDC376FFCD9144FFCC9043FFCC9043FFE1B265FF7E4E17CC0F09 0348000000000000000000000000000000004E3313983C280F83000000030000 00000000000000000000000000032F1B0683AF8243E5F6C477FFF6C275FFC89C 57EC3E280D8D0000000000000000000000000000000000000000000000000000 0000000000007E4E17CCEDB96CFFDFA356FFDDA75AFF7E4E17CC000000000000 0000000000000000000000000000000000000000000000000000000000003A3F C900A9AEF8005247E8005247E8005247E8005247E8005247E8005247E8005247 E800A9AEF8003A3FC90000000000000000000000000000000000100A03488352 1BCCFAD589FFF4C477FFECB669FFDFA356FFDAA356FFDCA95CFFE5B96CFF8352 1BCC100A03480000000000000000000000000A060239916024CC3A260E830403 01260000000704020026311E088394662BD9F3C87CFCF9C87BFFF3C87CFC986A 2DD30906023500000000000000000000000000000000000000004A2F0F998352 1BCC83521BCC83521BCCF3C174FFEEB265FFF3BE71FF83521BCC83521BCC8352 1BCC4A2F0F99000000000000000000000000000000000000000000000000424F C900A9AEF800524FE800524FE800524FE800524FE800524FE800524FE800524F E800A9A6F800424FC900000000000000000000000000000000004B3110998857 1ECC88571ECC88571ECCF5C679FFEFB366FFF4C477FF88571ECC88571ECC8857 1ECC4B3110990000000000000000000000000000000031210C79946529CF9768 2CD388581FCE906127D4B88E4CE6F6CD81FCFDD084FFF6CD81FCB08441DD3121 0C79000000000000000000000000000000000000000000000000100A03488857 1ECCFCDA8EFFF5C679FFF2BD70FFEFB467FFF2BC6FFFF4C275FFF8CF83FF8857 1ECC100A0348000000000000000000000000000000000000000000000000424F C900A9AEF800A9AEF800A9AEF800A9AEF800A9AEF800A9AEF800A9AEF800A9AE F800A9AEF800424FC90000000000000000000000000000000000000000000000 0000000000008C5B21CCF8CD81FFF3BB6EFFF8CB7EFF8C5B21CC000000000000 000000000000000000000000000000000000000000000000000A33220D79A073 34D3D4AE66ECF1D086F9FCDA8EFEF0CC82F9D4AB63ECA07234D333220D790000 000A00000000000000000000000000000000000000000000000000000000110B 04488C5B21CCFEDF93FFF4BE71FFF4BE71FFF4BE71FFFCD98DFF8C5B21CC110B 0448000000000000000000000000000000000000000000000000000000009996 D8004A57C9004A57C9004A57C9004A57C9004A57C9004A57C9004A57C9004A57 C9004A57C9009996D80000000000000000000000000000000000000000000000 000000000000905F24CCFCD68AFFF9C87BFFFCD589FF905F24CC000000000000 0000000000000000000000000000000000000000000000000000000000000906 0235472F138D765020B6916227C9765020B6472F138D09060235000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000110B0448905F24CCFFE397FFFAC97CFFFEE195FF905F24CC110B04480000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000926227CCFFE094FFFEDB8FFFFFDF93FF926227CC000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000120C0448926227CCFFE599FF926227CC120C0448000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000054381699956428CC956428CC956428CC54381699000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000120C0548956428CC120C054800000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004E841F004E841F00CFDE C2000000000000000000AF706600000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000A5000000000000000000000000000000000000000000000000000000 A50000000000000000000000000000000000000000004E841F0060B061004E84 1F0064963D00D3E0C70000000000A45A50000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00008A175D000000000000000000000000000000000000000000000000000000 0000CE924300CE924300CE924300000000000000000000000000000000000000 000000000000000000000000000000000000000000004E841F004E841F00CFDE C200000000000000000000000000000000000000000000000000000000000000 FF000000D6000000A500000000000000000000000000000000000000D6000000 D6000000A500000000000000000000000000000000004E841F0065A74D0065A6 4D0065A74D004E841F008FB37300F2E8E600B7ADB80000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000973436009734360000000000000000000000000000000000000000000000 000000000000CE92430000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004E841F0060B061004E84 1F0064963D00D3E0C700000000000000000000000000000000007B7BFF006B6B FF000000FF000000D6000000A50000000000000000000000D6000000FF000000 FF000000D6000000A5000000000000000000000000004E841F0071AB580071AA 580072AB570072AB570072AB58004E841F00E6D7D700B9908F00732220007322 2000000000000000000000000000000000000000000000000000000000000000 00009B373A00FFBF24009B373A00000000000000000000000000000000000000 000000000000CE92430000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004E841F0065A74D0065A6 4D0065A74D004E841F008FB37300000000000000000000000000000000007B7B FF006B6BFF000000FF000000D6000000FF000000FF000000FF000000FF000000 FF000000D600000000000000000000000000000000004E841F0081BD830081BD 830081BE83004E841F00699A4400EEE4E300D7C3B900C09A8C00BB897F004313 1300792922000000000000000000000000000000000000000000000000000000 0000A03C3D00FBB82000FBBF3300A03C3D000000000000000000000000000000 000000000000CE92430000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004E841F0071AB580071AA 580072AB570072AB570072AB58004E841F000000000000000000000000000000 00007B7BFF006B6BFF000000FF000000FF000000FF000000FF000000FF000000 D60000000000000000000000000000000000000000004E841F0087C593004E84 1F0078A65600D3E0C700E9DCD800CFC3AE00D0C8B200CBB4A300833F3700BB89 7F0084382500B7ADB80000000000AF7064000000000000000000000000000000 0000A4414100EFB33800EAA41C00F2BD4900A441410000000000000000000000 000000000000CE92430000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004E841F0081BD830081BD 830081BE83004E841F00699A4400000000000000000000000000000000000000 0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000 000000000000000000000000000000000000000000004E841F004E841F00CFDE C200E3CFCC00B5807500D3CDB800DBE0CA00E0E6D200B47A7200CBB7A300BF99 8A00944D3C008D423200A7625700000000000000000000000000000000000000 0000A9464400E4AE4F00D9993300D9993300EABB5F00A9464400000000000000 000000000000CE924300000000000000000000000000000000006051CF003A2E CC004135CB004134CC004134CC00756DDA00AEAAE9004E841F0087C593004E84 1F0078A65600D3E0C70000000000000000000000000000000000000000000000 0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000 000000000000000000000000000000000000000000000000000000000000AE6B 60009F574B00A9645900E0E6D200EDF1F100E0D4D300E0E6D200D3CBB600C7A9 9C008D4232000000000000000000000000000000000000000000000000000000 0000AE4A4700E5B46500CE924300CD914200CD914200E7BC6E00AE4A47000000 000000000000CE92430000000000000000000000000000000000372AC700ACAD F4008A88F7008D8BF6008D8BF6008D8BF600C9C9FB004E841F004E841F00CFDE C200000000000000000000000000000000000000000000000000000000000000 00006B6BFF000000FF000000FF000000FF000000FF000000FF000000D6000000 A5000000000000000000000000000000000000000000B3796E00B3796E000000 0000B7ADB800A9625900DBE2CA00EDF1F100EDF1F100DBE0CA00CFC5AE00A862 5900B7ADB8000000000000000000000000000000000000000000000000000000 0000B4514C00F5C67900E9AD6000DFA35600F1CC8000B4514C00000000000000 000000000000CE924300000000000000000000000000000000004537CB006E6D E6002B22E700322AE600322AE600322AE6009490F200BCBBF300BDC3EE000000 0000000000000000000000000000000000000000000000000000000000006B6B FF000000FF000000FF000000FF000000FF000000FF006B6BFF000000FF000000 D6000000A5000000000000000000000000000000000000000000000000000000 0000A45A5100DBE0CA00A45A5100DCE2CA00E0E6D200D3CDB800A05B4F00B7AD B800B7ADB800A8625900AF706500000000000000000000000000000000000000 0000B9565000F7CB7E00F1B66900FDDC9000B956500000000000000000000000 000000000000CE924300000000000000000000000000000000004A46C7005D54 F2002B1CE7003123E8003123E8003123E800322AE6006763F0005C63D3000000 00000000000000000000000000000000000000000000000000007B7BFF006B6B FF000000FF000000FF006B6BFF0000000000000000007B7BFF006B6BFF000000 FF000000D6000000A5000000000000000000000000000000000000000000B7AD B8009B504400EDF1F100DBE0CA0097514300974F43009B504400000000008D42 3200974F43000000000000000000000000000000000000000000000000000000 0000BE5A5300FBD48800FFE39700BE5A53000000000000000000000000000000 000000000000CE924300000000000000000000000000000000004A4CC3006763 F0003228E700382FE800382FE800382FE8003228E7006762EF004A51CE000000 0000000000000000000000000000000000000000000000000000000000007B7B FF006B6BFF006B6BFF00000000000000000000000000000000007B7BFF006B6B FF000000FF0000000000000000000000000000000000B2756B00AF6E6400A965 5900A45A500090483A0090483A00B7ADB8009F574B00B7ADB800000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000C15E5600FFE59900C15E5600000000000000000000000000000000000000 000000000000CE924300000000000000000000000000000000004F57CB00837F DD00433AEA004A42E8004A42E8004A42E800433AEA00837FDD004F57CA000000 0000000000000000000000000000000000000000000000000000000000000000 00007B7BFF000000000000000000000000000000000000000000000000007B7B FF00000000000000000000000000000000000000000000000000000000000000 0000B7ADB800A75F5500B7ADB8000000000000000000AE6E6300000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000C4615900C461590000000000000000000000000000000000000000000000 000000000000CE92430000000000000000000000000000000000555FCE008784 E800403AE7004843E6004843E6004843E600403AE7008784E800555FCE000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000AF6E6400000000000000000000000000B3796E00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000BA387C000000000000000000000000000000000000000000000000000000 0000CE924300CE924300CE9243000000000000000000000000005462D200ACB0 FE008C92F4008F95F5008F95F5008F95F5008C92F400ACB0FE005462D2000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000B3776E0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000008489D5005A69 D1006170D200616FD200616FD200616FD2006170D2005A69D1008489D5000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000088C1000088C1000088C1000087B1000086B1000086B10000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000021B5 390021B539005ACE84006BD68C005ACE7B0031C66B0029BD520021B53900006B 0800006B08000000000000000000000000000000000000000000000000000000 000000000000000000006BAD840021842900218429006BAD8400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000021B539006BD6 8C00BDEFCE009CE7B50063D68C004ACE730031C66B0029BD630029BD5A0021B5 4A00088C1000006B080000000000000000000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000004A000000630000004A00000000000000000000000000000000 0000000000000000000000000000000000000000000021B539007BDE9C00D6F7 E7007BDE9C0039C66B004ACE7300CEF7D6008CDEA50021B54A0021B54A0021B5 420010B52900087B1000006B0800000000000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000630000089C210000630000004A000000000000000000000000 0000000000000000000000000000000000000000000021B53900DEF7EF007BDE 9C0029BD630031C66B00BDEFCE00FFFFFF00F7FFF7005ACE7B0010B5210010B5 290010B5210008B51800006B0800000000000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000630000109C2100089C210000630000004A0000000000000000 00000000000000000000000000000000000029BD5200B5EFC600B5EFC60031C6 6B0031C66B00ADE7BD00FFFFFF00FFFFFF00FFFFFF00F7FFFF005ACE7B0008B5 180008B5180008B51800088C1000006B08000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000063000010A5290010A52900089C210000630000004A00000000 00000000000000000000000000000000000021B53900D6F7DE006BD68C0031C6 6B00ADE7BD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7FFFF005ACE 840008B5180008B5180008B51800006B0800000000006BAD8400218429002184 290021842900218429002184290094DE8C0039B5520021842900218429002184 290021842900218429006BAD840000000000000000006B84C6000021A5000021 A5000021A5000021A5000021A5000021A5000021A5000021A5000021A5000021 A5000021A5000021A5006B84C600000000000000000000000000000000000000 0000000000000063000010B5390010A52900089C2100089C210000630000004A 00000000000000000000000000000000000021B53900BDEFCE0052CE7B00ADE7 BD00FFFFFF00E7FFEF009CE7B500FFFFFF00C6EFD6008CDEA500FFFFFF00EFFF F70008B5180008B5180008B51800006B08000000000063A5630039B5520039B5 520039B5520039B5520039B5520039B5520039B5520039B5520039B5520039B5 520039B5520039B552002184290000000000000000000021A5009494F7000029 E7000029E7000029E7000029E7000029E7000029E7000029E7000029E7000029 E7000029E7000029E7000021A500000000000000000000000000000000000000 0000000000000063000018B54A0010AD390010AD390010AD390010A529000063 00000052000000000000000000000000000021B53900ADE7BD004ACE7300BDEF CE00F7FFFF006BD68C005ACE7B00FFFFFF00BDEFCE0008B5180094E7B500DEF7 E70008B5180008B5180008B51800006B08000000000063A5630094DE8C0094DE 8C0094DE8C0094DE8C0094DE8C0094DE8C0039B5520094DE8C0094DE8C0094DE 8C0094DE8C0094DE8C002184290000000000000000000021A500B5C6FF009CBD FF009CBDFF009CB5FF009CB5FF009CB5FF00638CF700638CF700638CF700638C F700526BF700526BF7000021A500000000000000000000000000000000000000 0000000000000063000052BD52005ABD52004ABD52004ABD52004ABD52000063 00000052000000000000000000000000000021B5390094E7B5004ACE730031C6 6B0042CE730021B54A005ACE8400FFFFFF00BDEFCE0008B5180008B5210018B5 310008B5180008B5180008B51800006B0800000000006BAD840063A5630063A5 630063A5630063A5630063A5630094DE8C0039B5520021842900218429002184 290021842900218429006BAD840000000000000000006B84C6000021A5000021 A5000021A5000021A5000021A5000021A5000021A5000021A5000021A5000021 A5000021A5000021A5006B84C600000000000000000000000000000000000000 000000000000006300005AC65A006BC66B006BC663004ABD520000630000004A 00000000000000000000000000000000000021B542006BD68C004ACE730029BD 520021B54A0021B54A005ACE7B00FFFFFF00BDEFCE0008B5180008B5180008B5 180008B5180008B51800088C1000006B08000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000006300006BC66B007BD67B007BD67B0000630000004A00000000 0000000000000000000000000000000000000000000029BD520031C66B0021B5 4A0021B5420021B54A005ACE7B00FFFFFF00BDEFCE0008B5180008B5180008B5 180008B5180008B51800006B0800000000000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000063000063C663008CD68C0000630000004A0000000000000000 0000000000000000000000000000000000000000000029BD520021B54A0021B5 4A0018B5310021B542005ACE7B00FFFFFF00BDEFCE0008B5180008B5180008B5 180008B51800087B1000006B0800000000000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000063000039AD390000630000004A000000000000000000000000 0000000000000000000000000000000000000000000000000000087B100010B5 290010B5290010B5210010B5210008B5180008B5180008B5180008B5180008B5 1800087B1000006B080000000000000000000000000000000000000000000000 0000000000000000000063A5630094DE8C0039B5520021842900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000004A000000630000004A00000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000088C 1000088C100008A5180008B5180008B5180008B5180008AD1800088C1000006B 0800006B08000000000000000000000000000000000000000000000000000000 000000000000000000006BAD840063A5630063A563006BAD8400000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000006B0800006B0800006B0800006B0800006B0800006B08000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000008C6363004242420000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000001073100010731000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000088C1000088C1000088C1000087B100008731000087310000000 0000000000000000000000000000000000000000000000000000000000000000 00008C6363009C636300BD636300BD6B6B004242420000000000000000000000 0000000000000000000000000000000000000000000029ADDE0031B5DE0021AD D600000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000001084100039BD630010731000000000000000 00000000000000000000000000000000000000000000000000000000000021B5 390021B5390063CE84006BD68C005ACE840039C66B0029BD5A0021B53900006B 0800006B080000000000000000000000000000000000000000008C6363009C63 6300C66B6B00D66B6B00D66B6B00C66B6B00424242009C6363009C6363009C63 63009C6363009C6363009C636300000000000000000029ADD600ADF7FF0084EF FF004AC6E7004AC6E7004AC6E70031B5DE0021ADD60000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000001084100052E77B0039BD630010731000000000000000 000000000000000000000000000000000000000000000000000021B539006BD6 8C00C6EFCE00A5E7BD0063D68C0042CE730039C66B0031C6630029BD5A0021B5 4A00088C1000006B0800000000000000000000000000000000009C636300D66B 6B00D66B6B00D66B6B00CE6B6B00C66B6B0042424200C67B7B00DE8C8C00F794 9400F7A5A500F7A5A5009C636300000000000000000029ADD600A5EFF7009CFF FF0094FFFF009CFFFF0094F7FF008CF7FF0084EFFF004AC6E7004AC6E70039BD DE00000000000000000000000000000000000000000000000000000000000000 000000000000000000001084100084F7A50039BD630010731000000000000000 0000000000000000000000000000000000000000000021B5390084DEA500D6F7 E70084DEA50039C66B006BD68C00FFFFFF00CEF7DE0021B54A0021B5420021B5 420010B52900087B1000006308000000000000000000000000009C636300D66B 6B00D66B6B00D6737300D6737300CE6B73004242420000940000009400000094 000000940000F7A5A5009C636300000000000000000029ADD6008CD6EF00ADFF FF0094FFFF0094F7FF0094F7FF008CF7FF008CF7FF0094F7FF0094F7FF0073DE F70029ADDE000000000000000000000000000000000000000000000000000000 000000000000000000001084100084F7A50039BD630010731000000000000000 0000000000000000000000000000000000000000000021B53900DEF7E70084DE A50031C6630031C66B0073D69400FFFFFF00CEEFD60008B5210008B5210010B5 290010B5210008B51800006308000000000000000000000000009C636300D673 7300D6737300DE737300DE737300D67373004242420000940000009400000094 000000940000F7A5A5009C636300000000000000000029ADD6004AC6E700ADF7 FF0094FFFF0094F7FF0094F7FF008CF7FF008CF7FF008CF7FF008CF7FF0073DE F70052CEEF000000000000000000000000000000000000000000000000000000 000000000000000000001084100084F7A50039BD630010731000000000000000 00000000000000000000000000000000000021B54A00ADE7C600ADE7C60039C6 6B0031C66B0039C66B0073D69400FFFFFF00CEEFD60008B5180008B5180008B5 180008B5180008B51800088C10000063080000000000000000009C636300E77B 7B00E77B7B00E77B7B00E7848400D67373004242420000940000008400000084 000000840000F7A5A5009C636300000000000000000029ADD6007BE7F7004AC6 E7009CFFFF008CF7FF0094F7FF00087B0800088C1000088C1000007B080073DE F7007BE7F70029B5DE0000000000000000000000000000000000000000000000 000000000000000000001084100084F7A50039BD630010731000000000000000 00000000000000000000000000000000000021B53900D6F7E7006BD68C0039C6 6B0052CE7B0039C66B0073D69400FFFFFF00CEEFD60008B5180008B5210018B5 310008B5180008B5180008B518000063080000000000000000009C636300F784 8C00EF848400EF949400FFDEDE00DE8C8C004242420000840000008400000063 000000630000F7A5A5009C636300000000000000000029ADD60094FFFF004AC6 E700ADEFF700ADF7FF00A5F7FF00A5F7FF008CF7FF00088C100008A518000884 080084EFFF005ACEEF0000000000000000000000000000000000000000000000 000000000000000000001084100084F7A50039BD630010731000000000000000 00000000000000000000000000000000000021B53900C6EFCE0052CE7B00C6EF CE00F7FFFF0073D6940063D68C00FFFFFF00C6EFCE0008B518009CE7AD00DEF7 E70008B5180008B5180008B51800006B080000000000000000009C636300F784 8C00EF848400F79C9C00FFFFFF00DE8C8C0042424200FFCEAD00F7B58400F7B5 8400F7B58400F7A5A5009C636300000000000000000029ADD6009CFFFF0084F7 FF004AC6E7004AC6E7004AC6E7004AC6E700B5F7FF0094F7FF000894100008A5 180084EFFF0084EFFF0018ADD600000000000000000000000000000000000000 0000000000001084100084F7A50052E77B0039BD6300104A1000107310000000 00000000000000000000000000000000000021B53900ADE7C60042CE7300ADE7 C600FFFFFF00E7FFEF008CDEA500FFFFFF00C6EFCE008CDEA500FFFFFF00EFFF F70008B5180008B5180008B51800006B080000000000000000009C636300F78C 8C00F78C8C00F78C8C00F78C8C00DE7B840042424200FFCEAD00FFD6BD00FFD6 BD00FFD6BD00F7A5A5009C636300000000000000000029ADD6009CFFFF0094FF FF0094FFFF0094FFFF0094F7FF006BDEF7004AC6E7009CE7F7000884100018AD 290008841000ADF7FF0042BDE700000000000000000000000000000000000000 00001084100084F7A50052E77B0052E77B0039AD520010631000104A10001073 10000000000000000000000000000000000021B539009CE7AD004ACE7B0031C6 63009CE7AD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7FFFF005ACE 840008B5180008B5180008B518000063080000000000000000009C636300F78C 8C00F7949400F7949400F78C8C00E784840042424200FFCEAD00FFD6BD00FFD6 BD00FFD6BD00F7A5A5009C636300000000000000000029ADD6009CFFFF0094FF FF0094FFFF0094F7FF0094F7FF0094FFFF0084EFFF004AC6E700108C210031C6 4A00109C21004ABDDE0031ADDE00000000000000000000000000000000001084 100084F7A5006BEF8C0063EF840052E77B0039BD5A001094100010631000104A 10001073100000000000000000000000000021B542006BD68C004ACE7B0029BD 520021B54A009CE7AD00FFFFFF00FFFFFF00FFFFFF00F7FFFF0052CE7B0008B5 180008B5180008B51800089410000063080000000000000000009C636300F78C 8C00FF949400FF949400F7949400E78C8C0042424200FFCEAD00FFD6BD00FFD6 BD00FFD6BD00F7A5A5009C636300000000000000000029ADD600A5FFFF0094FF FF0094FFFF0094FFFF008CEFFF0094EFFF0094EFFF000073080052D67B0042D6 6B0031C64A0000730800000000000000000000000000000000001084100084F7 A5006BEF940063EF8C0052E77B004AD6730039BD630039BD6300109410001063 1000104A10001073100000000000000000000000000029BD5A0039C66B0021B5 4A0021B5420021B54A00A5E7BD00FFFFFF00F7FFF70052CE7B0008B5180008B5 180008B5180008B51800006B08000000000000000000000000009C636300F78C 8C00FF949400FF9C9C00FF949400E78C8C0042424200FFCEAD00FFD6BD00FFD6 BD00FFD6BD00F7A5A5009C636300000000000000000021ADD60029ADD6009CF7 FF009CF7FF0084EFFF0029ADDE0021ADD60029ADD60029ADDE00007308005AE7 8C0000730800000000000000000000000000000000001084100084F7A5006BEF 940052DE73004AD6630042CE5A0031BD520039BD630039BD630039BD63001094 100010631000104A100010731000000000000000000029BD5A0021B54A0021B5 420018B5310021B5390021B54A00BDEFCE006BD68C0008B5180008B5180008B5 180008B51800087B1000006B08000000000000000000000000009C6363009C63 6300E79C9C00FF949400FF9C9C00EF8C940042424200FFCEAD00FFD6BD00FFD6 BD00FFD6BD00F7A5A5009C6363000000000000000000000000000000000029AD D60031ADDE0029ADDE0000000000000000000000000000000000000000000073 0800000000000000000000000000000000001084100010841000108410001084 1000108410001084100010841000108410001084100010841000108410001084 1000108410001084100010841000108410000000000000000000087B100018B5 310010B5290010B5210010B5210008B5180008B5180008B5180008B5180008B5 1800087B10000063080000000000000000000000000000000000000000000000 00009C636300B5737300D6848400DE8C8C00424242009C6363009C6363009C63 63009C6363009C6363009C636300000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000088C 1000088C100008A5180008B5180008B5180008B5180008AD1800089410000063 0800006308000000000000000000000000000000000000000000000000000000 000000000000000000009C6363009C6363004242420000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000063080000630800006B08000063080000630800006308000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000FF4A1800000000004A637B00BD9494000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000FF4A1800FF8463006B9CC600188CE7004A7BA500C694 9400000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000BD4A0000BD4A0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000005A6BEF001029A5000010 9C0000109C0000109C0000109C0000109C0000109C0000109C0000109C000821 9C005A6BEF000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000FF4A1800FF846300000000004AB5FF0052B5FF00218CEF004A7B A500C69494000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000BD4A00000000 000000000000FF630000D6520000D6520000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A00000000000000000000000000001029C6000018C6000821 C6001029C6001029C6000829CE001029CE001029CE000021CE000018CE000010 AD0010219C000000000000000000000000000000000000000000000000000000 0000000000000000000000000000FF4A1800FF4A180000000000000000000000 0000FF4A1800FF84630000000000000000000000000052B5FF0052B5FF001884 E7004A7BA500C694940000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000BD4A0000000000000000 000000000000FF630000FF630000FF630000FF630000FF630000FF630000FF63 0000FF630000FF6300000000000000000000000000000018CE001031D6001831 D6002139E7002942E7002142E7001842E7001039E7000831E7000029E7000018 CE0000109C000000000000000000000000000000000000000000000000000000 00000000000000000000FF4A1800FF945200FF945A00FF4A1800FF4A1800FF4A 1800FF8C6B00000000000000000000000000000000000000000052B5FF004AB5 FF00188CE7004A7BA500BD949400000000000000000000000000000000000000 000000000000000000000000000000000000BD4A0000BD4A0000BD4A00000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000021D6001831D6002942 E700314AE700294AE700294AE7001842E7001042E7001039E7000831E7000021 CE0000109C000000000000000000000000000000000000000000000000000000 00000000000000000000FF4A1800FF945A00FF9C6300FFA56B00FFB58400FF8C 6B00FF84630000000000000000000000000000000000000000000000000052B5 FF004AB5FF002184DE005A6B7300004A0000004A0000004A0000005A0000004A 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001031D6002142E7003952 E7003152E700314AE700294AE7001842E7001839E7001039E7000831E7001031 CE0000109C000000000000000000000000000000000000000000000000000000 00000000000000000000FF4A1800FF9C6300FFA57300FFB58400FFBD9400FF8C 6B00FF8463000000000000000000000000000000000000000000000000000000 000052BDFF00B5D6EF00185A210042632900315A1800295A1000087310000873 100021521000CEADA5000000000000000000BD4A0000BD4A0000BD4A00000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000002139E700314AE7003952 E7003152E700314AE700294AE7001842E7001039E7001031E7000831E7001031 CE0000109C000000000000000000000000000000000000000000000000000000 000000000000FF4A1800FF945A00FF9C6300FFAD7B00FFBD9400FFE7CE00FFE7 CE00FF8C6B000000000000000000000000000000000000000000000000000000 000000000000CEB5B500D6B5A500FFEFC600FFFFD600FFFFD6001863100018BD 4A00006B080073734200B58C8C000000000000000000BD4A0000000000000000 000000000000FF630000D6520000D6520000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A0000000000000000000000000000314AE700425AE7004252 E7003152E700314AE7002942E7001839DE001031DE001031DE001031DE001031 CE0000109C000000000000000000000000000000000000000000000000000000 0000FF4A1800FF945A00FFA56B00FFA57300FFBD9400FFE7CE00FFEFE700FFEF E700FF8C6B00000000000000000000000000000000000000000000000000004A 0000004A0000C6948C00F7DEB500F7D6A500FFF7CE00FFFFD600639C5A0018AD 390018AD390052733100DED6BD00000000000000000000000000BD4A00000000 000000000000FF630000FF630000FF630000FF630000FF630000FF630000FF63 0000FF630000FF6300000000000000000000000000003952E7004A63E700425A E7003952E7003142E7002942DE001839DE001031D6001031DE001031DE001031 CE0000109C0000000000000000000000000000000000FF4A1800FF4A1800FF4A 1800FF9C6300FF9C6300FFAD7300FFBD9400FFDEC600FF8C6B00FF8C6B00FF8C 6B00FF8463000000000000000000000000000000000000000000004A0000186B 1800005A080039632100FFE7AD00F7CE9400004A0000004A0000006B080029C6 520029CE5A0008731000004A0000004A0000BD4A0000BD4A0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004252E700526BEF004A63 E7004252DE00314AE7002942DE002139DE001839D6001831DE001031DE001031 CE0000109C00000000000000000000000000FF8C7300FF9C6300FFA57300FFA5 7300FF8C6B00FFAD7300FFBD9400FFDEC600FF8C6B00FF846300000000000000 00000000000000000000000000000000000000000000000000000052080021B5 420021B5420010631800528C3900EFBD8400528C3900218C42001094290042EF 730031E76B001084210039632100C6AD9C000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000004A63E7006B84EF005A73 EF004A63E7004252E7003152E700314ADE002942DE002142DE002139D6001031 CE0008189C00000000000000000000000000FF8C7300FFA56B00FFB58400FFBD 9400FFA57300FF8C6B00FFDEC600FF8C6B00FF84630000000000000000000000 00000000000000000000000000000000000000000000004A00001084210031E7 6B0042EF730010942900218C4200528C3900F7CE9400529442001063180021B5 420021B54200186B2900F7EFD600C6A59C00BD4A0000BD4A0000BD4A00000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000005A73EF008C94EF006B7B EF005273EF005263E7004A63E7004A5AE700425AE7003952E700294AE7001031 CE001831A500000000000000000000000000FF8C7300FFAD7300FFBD9400FFC6 A500FFD6BD00FFDECE00FF8C6B00FF8463000000000000000000000000000000 000000000000000000000000000000000000004A0000004A00000873100029CE 5A0029C65200006B0800004A0000004A0000F7D6A500F7CE9C00528C3900005A 0800186B18004A7B3100E7DEBD000000000000000000BD4A0000000000000000 000000000000FF630000D6520000D6520000BD4A0000BD4A0000BD4A0000BD4A 0000BD4A0000BD4A00000000000000000000000000005A73EF005A73EF004A5A E7003952E700314AE700314AE7002942E7002939E7002139D6001839D6001831 C6005A6BEF00000000000000000000000000FFB59C00FF8C6B00FFBD9400FFDE C600FFE7D600FFE7D600FF8C6B00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000004A000018AD 390018AD3900295A1800DEC6AD00FFFFFF00FFF7EF00F7CE9400EFBD84006394 4200639C4A00FFF7C600BD9C8C0000000000BD4A0000BD4A0000000000000000 000000000000FF630000FF630000FF630000FF630000FF630000FF630000FF63 0000FF630000FF63000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000FF846300FF8C6B00FFD6 BD00FFE7D600FFE7D600FF8C6B00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000004A0000006B 080018BD4A00004A000000000000D6BDBD00F7EFD600FFEFC600FFE7AD00FFE7 B500F7DEB500CEAD9C00000000000000000000000000BD4A0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000FFB59C00FFBD A500FFBDA500FFBDA500FFB59C00000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000004A 00000873100008731000004A0000185208004A63290039632100DEBDA500DEBD A500000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000063080000630800006B0800006B080000630800006308000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000008C8C8C008C8C8C008C8C8C000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000A5636B00A563 6B00A5636B00A5636B00A5636B00A5636B00A5636B00A5636B00A5636B00A563 6B00A5636B00A5636B00A5636B00000000000000000000000000000000000063 080000630800088C100008B5180008B5180008B5180008B5180008941000006B 0800006B08000000000000000000000000000000000000000000000000000000 00008C8C8C00D6BDBD00EFEFEF00D6CECE008C8C8C008C8C8C008C8484000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000094636300525A5200525A5200000000000000 0000000000000000000000000000000000000000000000000000A5636B00FFEF C600C6CE9400D6CE9400EFCE9C00E7CE9400EFC68400EFBD8400EFBD7B00EFBD 8400EFBD8400EFC68400A5636B00000000000000000000000000006B0800087B 100008B5180008B5180008B5180008B5180008B5180008B5180008B5180008B5 1800087B10000063080000000000000000000000000000000000000000009C94 9400D6C6C600FFFFFF00FFFFFF00EFEFEF00EFEFEF00DEB5B500946B6B008473 73008C8C8C008C8C8C0000000000000000000000000000000000000000000000 000000000000000000009C6363009C636300525A5200ADA5A500525A5200525A 5200000000000000000000000000000000000000000000000000A5636B00FFEF CE009CBD7300299C21006BAD4A0021941000219410005AA53900CEB57300EFBD 7B00EFBD7B00EFC68400A5636B000000000000000000006B0800088C100010B5 290010B5210008B5180008B5180008B5180008B5180008B5180008B5180008B5 180008B51800087B1000006308000000000000000000000000009C9C9400D6CE CE00FFFFFF00FFFFFF00FFFFFF00F7F7F700F7F7F700D6BDBD00946363009463 6300BDA5A500D6C6C6008C8C8C00847B7B000000000000000000000000000000 0000000000009C636300AD737300CE737300525A5200DECECE00D6CECE00AD9C A500525A5200525A520000000000000000000000000000000000A5635A00FFEF DE00BDCE9C00108C08000084000000840000008400000084000029941800DEBD 7B00EFBD7B00EFC68400A5636B000000000000000000006B080021B54A0021B5 420010B5290008B5180018B53100DEF7E700EFFFF7005ACE840008B5180008B5 180008B5180008B518000063080000000000000000009C9C9400E7DEDE00FFFF FF00FFFFFF00FFFFFF00FFFFFF00F7F7F700F7F7F700D6BDBD00946B6B009463 6300DEB5B500DEDEDE00D6C6C600847373000000000000000000000000000000 00009C636300AD737300D6949400CE7B7B00525A5200C6C6C600D6CECE00DECE CE00D6CECE00BDBDC600525A5200525A52000000000000000000A5635A00FFF7 E700BDCE9C00189410000084000018941000ADBD730073AD4A000084000073AD 4A00EFBD8400EFC68400A5636B00000000000873100021B5390029BD5A0021B5 420008B5210008B5180008B521009CE7AD00FFFFFF00F7FFFF0052CE7B0008B5 180008B5180008B518000894100000630800000000009C9C9400FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D6C6C600946B6B009463 6300D6BDBD00E7DEDE00D6C6C600847373000000000000000000000000009C63 6300B57B7B00E7A5A500CE8C9400BD848C009C6B6B00525A5200525A5200BDBD C600D6CECE00D6CECE00ADB5BD006B6363000000000000000000A5736B00FFF7 EF00BDD6A500088C0800008400000084000084B55A00EFCEA500A5B56B006BAD 4A00EFC68C00EFC68400A5636B00000000000873100029BD5A0031C6630021B5 4A0008B5210008B5180008B5180008B518008CDEA500FFFFFF00F7FFFF0052CE 7B0008B5180008B5180008AD180000630800000000009C9C9400FFFFFF00FFFF FF00D6C6C600A59C9C00E7DEDE00FFFFFF00FFFFFF00D6C6C6008C635A008C63 5A00D6BDBD00EFE7E700D6CECE008473730000000000000000009C636300B57B 7B00F7BDBD00DE9C9C00BD848C00C68C8C00C68C8C00D67B7B009C636300525A 5200525A5200BDBDC600ADA5AD006B6363000000000000000000A5736B00FFFF FF00E7E7D600A5CE94009CC6840094BD73009CBD7300EFD6AD00EFCEA5009CC6 7B00EFC69400EFC68C00A5636B0000000000087B100039C66B0039C66B00CEF7 DE00CEEFD600CEEFD600CEEFD600C6EFCE00C6EFCE00FFFFFF00FFFFFF00F7FF F7006BD68C0008B5180008B5180000630800000000009C9C9400EFEFEF008C8C 8C007B5A5A00845A5A006B525200DED6D600FFFFFF00EFEFEF00D6BDBD00B5A5 A500D6CECE00EFE7E700DED6D600946B6B00000000009C636300BD848C00F7C6 C600E7A5A500AD737300C68C8C00D69C9C00D69C9C00CE848400D67B7B00CE6B 6B009C636300525A5200525A52006B6363000000000000000000BD846B00FFFF FF00A5DEA500FFEFE700F7EFD6009CC6840094BD730094BD73009CBD7300EFCE A500EFCE9C00F7CE9400A5636B0000000000088C10005ACE840042CE7300FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00BDEFCE0008B5180008B51800006B0800000000009C9C9400735A5A00A56B 6B00E7ADAD00E79C9C00946363006B525200DED6D600FFFFFF00FFFFFF00FFFF FF00EFEFEF00FFF7F700DEB5B5006B525200000000009C636300F7C6C600F7AD AD00AD737300CE8C9400E7A5A500ADADB50010C6F70084A5B500D67B7B00CE6B 7300CE6B6B00CE6373009C6363009C6363000000000000000000BD846B00FFFF FF0073C67300ADD6A500FFEFE70084C673000084000000840000088C0800EFD6 AD00EFCEA500F7D6A500A5636B0000000000088C10006BD68C0063D68C006BD6 8C0073D6940073D6940073D6940063D68C008CDEA500FFFFFF00FFFFFF00A5E7 BD0021B54A0010B5210008B518000063080000000000845A5A00D69C9C00D6BD BD00DEADAD00E7A5A500DE9C9C0094635A006B525200DED6D600FFFFFF00FFFF FF00FFFFFF00D6BDBD004A4242008C635A00000000009C636300F7B5B500AD73 7300CE8C9400F7B5B500B5B5BD0010C6F70010C6F700ADA5A500CE7B7B00CE73 7300CE6B6B00CE6373009C636300000000000000000000000000D6946B00FFFF FF0084CE8400008400007BC67300ADD6A5001894180000840000108C0800F7D6 B500F7D6AD00EFCEA500A5636B0000000000088C100063CE8400A5E7BD0039C6 6B0031C66B0039C66B0039C66B0073D69400E7FFEF00FFFFFF009CE7AD0021B5 4A0021B5390010B5210008A518000063080000000000946B6B00FFCEEF00DEB5 B500E7ADAD00E7A5A500E79C9C00DE9C9C0094635A006B525200DEDEDE00FFFF FF00B5A5A5004A4242008C635A0000000000000000009C636300BD848C00DE9C 9C00F7C6C600F7BDC60010C6F70010C6F7007BA5BD0010C6F700CE8C9400D67B 7B00CE6B6B009C63630000000000000000000000000000000000D6946B00FFFF FF00F7F7EF0029A5290000840000008400000084000000840000108C0800FFEF CE00DECEB500B5AD9400A5636B00000000000000000021B53900C6EFCE0084DE A50031C6630031C66B0052CE7B00F7FFFF00FFFFFF009CE7AD0021B54A0021B5 420018B5310010B52900088C10000000000000000000946B6B00E7ADAD00D6BD BD00E7ADAD00E7A5A500E79C9C00E79C9C00DE9C9C0094635A00735252008C7B 7B004A4242008C635A000000000000000000000000009C6B6B009C636300F7BD BD00F7C6C600F7C6C600F7B5B500B5B5BD0010C6F700ADA5AD00C68C8C00D67B 7B009C6363000000000000000000000000000000000000000000DE9C7300FFFF FF00FFFFFF00DEF7DE0063BD6300219C2100219C210073BD6B00299C2100946B 5200A56B5A00A56B5A00A5636B00000000000000000021B539006BD68C00D6F7 E70084DEA50039C66B0039C66B00C6EFCE00ADE7C60031C6630029BD520021B5 4A0021B5420018B53100088C1000000000000000000000000000946B6B00E7AD AD00DEADAD00E7A5A500E79C9C00E79C9C00FFCEEF00AD6B6B0094635A004A42 420094636300000000000000000000000000000000002184310039AD5A009C63 63009C636300F7BDBD00F7BDBD00F7B5B500EFADAD00DE9C9C00CE8484009C63 6300000000000000000000000000000000000000000000000000DE9C7300FFFF FF00FFFFFF00FFFFFF00FFFFFF00DEF7DE00DEF7DE00FFFFF700ADB594008C6B 5200E79C5200E78C3100B56B4A0000000000000000000000000021B5390084DE A500DEF7E700ADE7C6006BD68C0052CE7B0042CE73004ACE7B004ACE7B0039C6 6B0021B54A00087B10000000000000000000000000000000000000000000946B 6B00E7A5A500E7A5A500E79C9C00E7ADAD00FFCEEF00E79C9C00946B6B000000 0000000000000000000000000000000000002184310039BD630039BD630031AD 4A00299C42007B6363009C636300DE9CA500EFADAD00CE8C94009C6363000000 0000000000000000000000000000000000000000000000000000E7AD7B00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00DEC6C600A56B 5A00FFB55A00BD7B5A00000000000000000000000000000000000000000021B5 390021B53900ADE7C600D6F7DE00C6EFCE00ADE7C6009CE7AD006BD68C0029BD 5A0029BD5A000000000000000000000000000000000000000000000000000000 0000946B6B00E7A5A500E79C9C00946B6B00946B6B00E79C9C00946B6B000000 000000000000000000000000000000000000218431002184310039BD630039B5 5A002184310000000000000000009C6363009C6363009C636300000000000000 0000000000000000000000000000000000000000000000000000E7AD7B00F7F7 EF00F7F7EF00F7F7EF00F7F7EF00F7F7EF00F7F7EF00F7F7EF00DEC6C600A56B 5A00BD846B000000000000000000000000000000000000000000000000000000 00000000000021B54A0021B5390021B5390021B5390021B5390021B542000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000946B6B00946B6B0000000000946B6B00946B6B00000000000000 0000000000000000000000000000000000000000000000000000218431002184 3100000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000E7AD7B00D694 6B00D6946B00D6946B00D6946B00D6946B00D6946B00D6946B00D6946B00A56B 5A00000000000000000000000000000000000000000000000000B5848400B584 8400B5848400B5848400B5848400B5848400B5848400B5848400B5848400B584 8400B5848400B5848400B5848400000000000000000000000000000000000000 00009C9C9C006B6B6B00525252004A4A4A004A4A4A004A4A4A00525252009C9C 9C00000000000000000000000000000000000000001426180C84392413A3482D 18B658371DC9674122DA7A4C28EB89552DFA945F37FF99673FFF057B21FF0279 1CFF5B4720DE0503023400000000000000000000000000000000000000000000 000000000000006B0800006B0800006B0800006B0800006B0800006B08000000 0000000000000000000000000000000000000000000000000000C6A59C00FFEF D600F7E7C600F7DEBD00F7DEB500F7D6AD00F7D6A500EFCE9C00EFCE9400EFCE 9400EFCE9400F7D69C00B584840000000000000000000000000000000000ADAD AD00E7CEC600EFDED600F7E7D600F7E7D600EFDED600EFDED600CEBDB5005A5A 5A00737373009C9C9C000000000000000000180F0868B78F6BFFD6B9A2FFDFC5 B2FFE7D4C2FFEEDFD3FFF5EAE2FFFBF4EFFFFDFAF6FFFFFEFDFF0A8630FF41A0 5DFF127D27FF1C1B0B850000000000000000000000000000000000000000006B 0800006B0800088C100008B5180008B5180008B5180008B51800088C1000006B 0800006B08000000000000000000000000000000000000000000C6A59C00FFEF D600FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFCE9C00FFCE 9C00FFCE9C00EFCE9C00B5848400000000000000000000000000CEC6BD00F7E7 D600F7F7F700E7E7E700CEB5A500D6AD9400DEC6BD00EFF7F700F7EFEF00EFDE D6008C847B006B6B6B009C9C9C00000000002B1C0E89C7A384FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFF209650FF1A9048FF148E42FF0F8A3AFF389E5CFF7EC0 95FF44A260FF07701CF40003002A000000000000000000000000006B0800087B 100008B5180008B5180008B5180008B5180008B5180008B5180008B5180008B5 1800087B1000006B080000000000000000000000000000000000C6ADA500FFEF E700F7E7D600F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00EFCE9C00EFCE 9C00EFCE9400EFCE9C00B58484000000000000000000E7D6CE00F7E7DE00F7FF FF00CE9C8400B54A1000BD633900D6AD9C00C65A2100BD522100D6AD9C00F7FF FF00F7DED6007B736B007373730000000000120B0657926033F6B38457FFD9A4 79FFD89D6DFFD79A68FF279A59FF8FCAA8FF8CC8A4FF89C5A0FF87C49DFF68B5 84FF81C196FF46A464FF00681AEA0004003000000000006B0800088C100010B5 290010B5210008B5180008B5180008B5180008B5180008B5180008B5180008B5 180008B51800087B1000006B0800000000000000000000000000C6ADA500FFF7 E700FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFCE9C00FFCE 9C00FFCE9C00EFCE9400B58484000000000000000000EFDED600F7FFFF00C67B 5A00BD4A1000C6521800C6A59400FFFFFF00DE947300BD4A1000B54A1000CE9C 8400F7FFFF00EFDED6005A5A5A009C9C9C000100001448311AABD5AD8BFFFDF0 E5FFF7C7A1FFF7CFACFF2F9E61FF93CDACFF6DB98DFF69B788FF64B584FF5FB2 7EFF65B481FF82C197FF3A9F5AFF007B23FC00000000006B080021B54A0021B5 420010B5290008B518005ACE8400EFFFF700DEF7E70018B5310008B5180008B5 180008B5180008B51800006B0800000000000000000000000000AD8C8400BDAD A500BDADA500BDADA500BDADA500BDADA500BDADA500BDADA500BDADA500BDAD A500BDADA500BDADA500AD7B7B0000000000F7E7E700F7F7F700D6AD9400BD4A 1000CE633100CE632900CE6B3900DE8C6B00CE632900CE633100C65A2900B54A 1000DEC6BD00F7EFE700A59C9400636363000000000004020128B68554FFFEFE FDFFFADEC1FFFADCBEFF35A269FF95CEAFFF93CDACFF90CBA9FF8FCBA7FF72BB 8FFF89C7A0FF44A466FF068433FD0000000F086B100021B5390029BD5A0021B5 4A0010B521005ACE7B00F7FFFF00FFFFFF0094E7B50008B5210008B5180008B5 180008B5180008B51800088C1000006B080000000000A5522900A5522900A552 2900A5522900A5522900A5522900A5522900A5522900A5522900A5522900A552 2900A5522900A5522900A5522900A5522900F7EFE700F7F7F700C6633100C65A 2900CE6B3100CE5A2100CE8C6B00F7E7DE00CE6B3900C65A2100CE633100C652 1800C67B5200F7FFFF00DECEC60052525200000000000201001EB88550FFFEFC F9FFF9DCBEFFF8DBBEFF3BA46DFF37A26CFF33A066FF2F9D60FF53AE7AFF90CB A9FF4DAA72FF168E43FF0000000C00000000086B100029BD520029BD630021B5 4A005ACE7B00F7FFFF00FFFFFF008CDEA50008B5180008B5180008B5180008B5 180008B5180008B5180008AD1800006B080000000000B55A0000BD8C8400E7EF EF00EF8C6300EF8C6300EF8C6300EF8C6300EF8C6300EF8C6300EF8C6300EF8C 6300EF8C6300E7EFEF00BD8C8400B55A0000F7EFE700EFDED600C65A2100CE63 3100CE633100CE5A2100C6846B00FFFFFF00EFAD9400C64A1000CE633100CE63 2900C65A2900F7EFEF00EFDED600525252000000000000000009B88449FFFEFB F7FFF9DCC0FFF8DCBEFFF8DCBEFFF8DBBFFFF9DDBFFFF9DDBFFF37A065FF58B2 80FF269755FFAB7E43FB0000000100000000087B100031C66B0031C66B008CDE A500F7FFF700FFFFFF00FFFFFF00C6EFD600BDEFCE00BDEFCE00BDEFCE00BDEF CE00BDEFCE0008B5180008B51800006B080000000000CE630000CE630000CE63 0000CE630000CE630000CE630000CE630000CE630000CE630000CE630000CE63 0000CE630000CE630000CE630000CE630000F7EFE700F7DECE00CE5A2100CE63 3100CE633100CE632900C6522100CEB5A500FFFFFF00E79C7B00C6521800CE63 2900C65A2900F7EFEF00EFDED600525252000000000000000000B38146F9FCF6 F0FFF9DFC7FFF9DCBCFFFADCBEFFFADBC0FFFADDC2FFFADDC1FF3DA46CFF2F9E 63FFF8F9F5FFC08C51FF0000000F00000000088C10005ACE7B004ACE7300CEF7 D600FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF FF00FFFFFF0008B5180008B51800006B08000000000000000000DEBDB500FFFF FF00FFFFFF00FFFFFF00FFF7F700FFEFE700FFEFDE00F7E7D600F7E7CE00F7DE C600F7DEC600F7DEB500B584840000000000F7EFE700F7EFE700DE6B3100D66B 3100CE632900C65A2100C6521800BD4A1000DECEC600FFFFFF00D6734200CE5A 2100CE6B3900FFF7F700EFDED6006B6B6B0000000000000000008F6738DAF5E7 D8FFFAE5D2FFF9DABBFFF9DBBBFFFADBBEFFFADDC0FFFADDC0FFF9DDC3FFFBE1 C8FFFFFDFBFFC89355FF0000001200000000088C10006BD68C0063D68C004ACE 7300BDEFCE00FFFFFF00FFFFFF009CE7B5005ACE7B005ACE84005ACE7B005ACE 7B005ACE7B0010B5210008B51800006B08000000000000000000DEC6B500FFFF FF00FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFCE9C00FFCE 9C00FFCE9C00F7DEC600B584840000000000F7E7E700FFFFFF00F79C6B00E763 2900CE8C6B00EFE7DE00D67B5200BD310000D69C7B00FFFFFF00DE8C6300CE52 1800E79C7300FFFFFF00DEC6BD00ADADAD0000000000000000006C4E2BBBF0D9 C0FFFBEDE1FFF9DABFFFF9DCC1FFF9DEC4FFFAE0C7FFFAE2CAFFFAE2CDFFFAE5 D0FFFFFEFDFFCB8E58FFB48348F10E0A0545088C10005ACE84009CE7B50039C6 6B0031C66B00ADE7BD00FFFFFF00E7FFEF006BD68C0021B54A0021B54A0021B5 4A0021B5420010B5210008A51800006B08000000000000000000E7C6B500FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7EF00FFF7EF00F7E7D600F7E7 D600F7E7D600F7DEC600B584840000000000F7EFE700F7EFEF00FFEFDE00FF8C 4A00DE845A00EFFFFF00FFFFFF00E7BDA500F7FFFF00EFFFFF00E7733900E773 3900FFEFEF00F7E7DE00A59C9400000000000000000000000000563E22A4EDD0 B1FFFFF6F0FFFAE1CAFFFBE3CCFFFBE3D0FFFBE6D3FFFBE9D5FFFCE9D8FFFCEA DBFFFFFFFDFFD29C6FFFEED9C0FFA87B43E50000000021B53900BDEFCE007BDE 9C0029BD630031C66B00ADE7BD00FFFFFF00F7FFFF0042CE730021B54A0021B5 420018B5310010B52900088C1000000000000000000000000000E7C6B500FFFF FF00FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFD6A500FFCE9C00FFCE 9C00FFCE9C00F7E7D600B58484000000000000000000EFDED600FFFFFF00FFEF CE00FFB57300EFAD8400EFE7DE00EFF7F700EFE7DE00F7A57B00FF8C4A00FFDE CE00FFFFFF00EFDED600CECEC60000000000000000000000000045331C92EBCA A4FFFFFDFBFFFDE9D5FFFDEBD8FFFDEADBFFFDEDDFFFFDF0E2FFFDF1E4FFFCF0 E4FFFFFFFFFFE09F6EFFFFFBF9FFDFB786FF0000000021B539006BD68C00D6F7 E7007BDE9C0031C66B0031C66B00ADE7BD00BDEFCE0031C66B0029BD520021B5 4A0021B54A0010B52900088C1000000000000000000000000000EFCEBD00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF7F700FFF7 F700FFEFDE00FFEFDE00B58484000000000000000000F7EFEF00EFDED600FFFF FF00FFFFFF00FFF7C600FFDEAD00FFCE9400FFCE9400FFD6AD00FFF7F700FFFF FF00EFDED600CECEC600000000000000000000000000000000003A2B1884EBC5 99FFFFFFFFFFFCEFE2FFFDF0E7FFFDF1EBFFFDF5EEFFFDF8F1FFFDFAF7FFFFFC FAFFFFFFFFFFFEFBF7FFF4DABFFFB78A4BEA000000000000000021B539007BDE 9C00DEF7EF00B5EFC6006BD68C0052CE7B004ACE73004ACE73004ACE730031C6 6B0021B54A00087B100000000000000000000000000000000000E7C6B500FFF7 F700FFF7EF00FFF7EF00FFF7EF00FFF7EF00FFF7EF00FFF7EF00FFF7EF00FFF7 EF00FFF7EF00FFF7EF00B5848400000000000000000000000000F7EFEF00EFDE D600F7E7E700FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00EFE7DE00EFDE D600DEDEDE000000000000000000000000000000000000000000281E106DEABF 8BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDF9F4FFFBF3EAFFF8EBD9FFF8E6 D3FFF5DFC5FFE9CBA5FFBF904FED1D160C5D00000000000000000000000021B5 390021B53900B5EFC600D6F7DE00BDEFCE00ADE7BD0094E7B5006BD68C0029BD 520029BD52000000000000000000000000000000000000000000E7C6B500EFCE B500EFCEB500EFCEB500EFCEB500E7C6B500E7C6B500E7C6B500E7C6B500E7C6 B500E7C6B500E7C6B500E7C6B50000000000000000000000000000000000F7EF E700F7F7EF00F7EFEF00F7EFEF00F7EFEF00F7EFEF00F7EFEF00F7EFEF00F7EF E7000000000000000000000000000000000000000000000000000A0704368867 38C6EABB80FFE8B675FFE6B16BFFE4AF66FFC89752F0B3874AE394713DCF916D 3BCC795B32BB624A28A8130E084B000000050000000000000000000000000000 00000000000029B5520021B5390021B5390021B5390021B5390021B542000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000CEA58C00AD734200AD734200AD734200AD734200AD734200734A29000000 0000000000000000000000000000000000000000000000000000000000000000 000094633900734A290000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000AD7342000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000CEA58C00AD734200AD734200AD734200734A2900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFEFD600734A2900734A2900000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000104AFF00104AFF00BD847300104AFF00000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000CEA58C00B57B4A00734A290000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000CEA58C00AD734200734A290000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFEFE700CEAD8C00734A2900734A29000000000000000000000000000000 0000000000000000000000000000000000000000000000000000638CC600104A FF00104AFF00104AFF003184FF00EFBD9C00BD847300C6B5B5003184FF00104A FF00000000000000000000000000000000000000000000000000000000000000 000000000000CEA58C00AD734200AD734200AD734200734A2900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000AD7342000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFEFE700FFE7CE00CEAD8C00734A2900734A2900734A2900734A2900734A 29000000000000000000000000000000000000000000000000003184FF00DEBD AD00FFDEAD00FFDEBD00FFE7C600FFEFD600DE9C7300FFDEBD00F7EFE7007BA5 FF005A8CCE000000000000000000000000000000000000000000000000000000 0000CEA58C00AD734200AD734200AD734200AD734200AD734200734A29000000 0000000000000000000000000000000000000000000008080000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000080800000000000000000000000000000000000094633900734A 2900FFE7CE00FFEFD600FFEFD600FFDEB500FFDEB500FFE7CE00CEAD8C009463 3900734A2900734A29000000000000000000000000005A8CCE004284F700FFDE BD00FFDEBD00FFEFCE00FFF7E700EFC6AD00F7CE9C00FFDEBD00FFF7EF000000 00007BA5FF005A8CCE0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000008080000080800000808 0000080800000808000008080000080800000808000008080000080800000808 0000080800000808000000000000000000000000000094633900E7C6AD00E7C6 AD00FFE7CE00FFEFD600946342008C392100B54A1000B5633900FFE7CE00FFDE B500CEAD8C00734A2900734A29000000000000000000429CFF00429CFF00FFEF D600FFEFDE00FFFFF70000000000DE9C7300FFDEAD00FFEFD600FFF7EF000000 0000000000004A9CFF005A8CCE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000094633900E7C6AD00FFE7CE00FFEF E700FFEFD600FFEFD600FFEFD6008C3921008C210000FFEFD600FFEFD600FFE7 CE00FFDEB500CEAD8C00734A2900734A2900000000003994FF00F7DECE00FFEF DE00FFFFF70000000000F7DECE00F7CE9C00FFE7CE00FFFFF700000000000000 0000EFF7FF002994FF005A8CCE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000008080000080800000808 0000080800000808000008080000080800000808000008080000080800000808 000008080000080800000000000000000000E7C6AD00FFE7CE00FFEFE700FFEF D600FFEFD600FFEFD600FFEFD6008C3921008C210000FFEFD600FFEFD600FFEF D600FFE7CE00FFDEB500CEAD8C00734A2900639CD600429CFF00FFF7EF00FFFF F700FFF7EF00FFFFF700DE9C7300FFDEAD00FFF7E70000000000000000000000 00008CC6FF005AADFF005A8CCE00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000008080000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000080800000000000000000000FFF7EF00FFEFE700FFEFE700FFEF D600FFEFD600FFEFD600842910008C3921008C210000FFEFD600FFEFD600FFEF D600FFEFD600FFE7CE00FFE7CE00734A2900429CFF00E7CEB500FFF7E700FFF7 E700FFFFF700F7EFE700EFCEA500FFE7C600FFF7E700FFFFF700000000000000 0000399CFF005A8CCE0000000000000000000000000000000000000000000000 0000CEA58C00AD734200AD734200AD734200AD734200AD734200734A29000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000AD7342000000000000000000000000000000 000000000000000000000000000000000000FFF7EF00FFF7EF00FFEFE700FFEF E700FFEFD600FFEFD60094634200842910006B180000FFEFD600FFEFD600FFEF D600FFEFD600FFE7CE00FFE7CE00734A2900429CFF00FFEFDE00000000000000 0000CEDEFF009CBDFF00B5BDDE00FFEFDE00000000000000000000000000A5D6 FF0052ADFF005A8CCE0000000000000000000000000000000000000000000000 000000000000CEA58C00AD734200AD734200AD734200734A2900000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000CEA58C00B57B4A00734A290000000000000000000000 000000000000000000000000000000000000FFE7CE00FFF7EF00FFF7EF00FFEF E700FFEFE700FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEFD600FFEF D600FFE7CE00FFF7EF00CEAD8C0094633900429CFF007BC6FF00429CFF00429C FF00000000000000000000000000C6DEFF00C6DEFF00000000000000000052AD FF005A8CCE000000000000000000000000000000000000000000000000000000 00000000000000000000CEA58C00AD734200734A290000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000CEA58C00AD734200AD734200AD734200734A2900000000000000 00000000000000000000000000000000000000000000FFE7CE00FFF7EF00FFF7 EF00FFEFE700FFEFE700FFEFE7009C422100CE734200FFEFD600FFEFD600FFE7 CE00FFF7EF00CEAD8C0094633900000000000000000000000000000000000000 000000000000000000000000000000000000429CFF00ADD6FF007BC6FF0063C6 FF005A8CCE000000000000000000000000000000000000000000000000000000 0000000000000000000000000000AD7342000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000CEA58C00AD734200AD734200AD734200AD734200AD734200734A29000000 0000000000000000000000000000000000000000000000000000FFE7CE000000 0000FFF7EF00FFF7EF00FFF7EF008400000084000000FFEFD600FFE7CE00FFEF D600CEAD8C009463390000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000007BC6FF005A8C CE00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFE7CE00FFF7EF00FFF7EF00FFEFD600FFEFD600FFDEB500CEAD8C009463 3900000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000033000000330000003300000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000711DF50279 1CFF000200210000000000000000000000000000000000000000000000000000 00000000000000000000556B81FF496685FF5191D9FF00000033000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000007726F541A0 5DFF006118E40002002700000000000000000000002400000033000000330000 003300000033000000335685ABFF80A7B8FF90D6FFFF34699DFF000000330000 003300000033000000330000002400000000000000000000000000000000CE63 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000840000000000000000000000000000000000 000000000000000000008400000000000000493022A9C28D66FFBF8A64FFBD87 62FFBA845FFFB8825DFF20964FFF1A9047FF148E41FF0F8A39FF389E5CFF7EC0 95FF44A260FF0F7A22FF423A22B7000000005F4207C1B77E0EFFB67C09FFB67B 08FFB87B06FFBE7A00FF3AAFFCFF88E5FFFF80D3FFFF129BFFFF316AA4FFCF86 00FFBE8109FFB9800FFF5F4207C100000000000000000000000000000000CE63 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000084000000000000000000000084000000000000000000 000084000000000000000000000084000000C8916AFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFF279A59FF8FCAA8FF8CC8A4FF89C5A0FF87C49DFF68B5 84FF81C196FF46A464FF0D7A23FF00040030B77E0EFFF7FFFFFFF2F7FFFFF2F7 FFFFF3F6FFFFF6F6FCFFFFF7F3FF1C6DC2FF3CC3FFFF29AAFFFF149CFFFF2964 A1FFFFFFFFFFFEFFFFFFB8800FFF00000000000000000000000000000000CE63 00000000000000000000CE630000CE630000CE630000CE630000CE6300000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000084000000000000000000000084000000000000000000 000084000000000000000000000084000000CA936CFFFFFFFFFFFFFFFFFFFFFF FEFFFFFFFDFFFEFEFDFF2F9E61FF93CDACFF6DB98DFF69B788FF64B584FF5FB2 7EFF65B481FF82C197FF3A9F5AFF007B23FCB67C09FFF5FBFFFFEBEBEEFFECEC EEFFEDECEEFFECEAECFFF2EEECFFFFFFFFFF216FC1FF42C6FFFF2AABFFFF0F99 FFFF205E9BFFFFFFFFFFBB810BFF00000000000000000000000000000000CE63 0000CE630000CE630000CE6300000000000000000000FFDEB500CE6300000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000084000000000000000000000084000000000000000000 000084000000000000000000000084000000CC966DFFFFFFFFFFFFFFFCFFFFFF FDFFFEFEFCFFFEFEFCFF35A269FF95CEAFFF93CDACFF90CBA9FF8FCBA7FF72BB 8FFF89C7A0FF44A466FF078633FF0000000FB67B08FFF5FBFFFFE6E6E7FF9D9C 9CFF9E9D9DFFE9E8E7FFC2C0BDFFFFFFFFFFFFFFFFFF2573C5FF40C7FFFF1FA9 FFFF7EADD5FF747273FFC18506FF00000000000000000000000000000000CE63 00000000000000000000CE630000CE630000CE630000CE630000CE6300000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000084000000000000000000000084000000840000008400 000000000000000000000000000084000000D19B71FFFFFFFFFFFEFEFCFFFEFE FCFFFEFEFCFFFDFDFBFF3BA46DFF37A36CFF33A166FF2F9D60FF53AE7AFF90CB A9FF4DAA72FF178F44FFA87955FF00000000B67B08FFF5FBFFFFE1E1E1FFE3E2 E1FFE4E3E2FFE4E3E2FFA0A0A0FFA2A1A0FFA7A4A0FFB3A8A0FF1F73C8FFACD9 EEFF90877DFFBEBEBAFF727A76FF00000033000000000000000000000000CE63 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000084000000000000000000000000000000000000000000 000000000000000000000000000084000000D49D73FFFFFFFFFFFEFEFCFFFDFD FBFFFDFDFCFFFDFDFBFFFDFDF9FFFCFCF8FFFBF9F7FFFBF9F5FF37A167FF58B2 80FF269755FFF7FBF9FFB17A58FF00000000B67B08FFF5FBFFFFDBDBDCFFDDDC DBFFDDDDDBFFDDDDDBFFDEDDDCFFDDDCDAFFDEDBDAFFE1DDDAFFE7E0DBFFA199 93FFE7E5E1FF878B82FFB978B7FF9768CCFF000000000000000000000000CE63 00000000000000000000CE630000CE630000CE630000CE630000CE6300000000 0000000000000000000000000000000000000000000084000000840000008400 0000840000000000000000000000840000000000000000000000000000000000 000000000000000000008400000000000000D59F74FFFFFFFFFFFDFDFCFFFDFD FBFFFDFDFAFFFCFCF9FFFCFBF7FFFBF9F5FFFBF8F4FFFBF7F3FF3DA56EFF2F9E 63FFF1EFE7FFFFFFFFFFB47C5AFF00000000B67B09FFF6FCFFFFD8D6D8FFDBD9 D9FFDBD9D9FFD9D7D7FFEEEDEEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3F2 F2FF9C9C95FFDFAEDFFFCA95C7FFAE7BD0FF000000000000000000000000CE63 0000CE630000CE630000CE6300000000000000000000FFDEB500CE6300000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000D8A177FFFFFFFFFFFDFDFAFFFCFC FAFFFCFBF9FFFBFAF6FFFBF8F5FFFBF7F4FFFBF6F1FFF8F4EEFFF7F2EBFFF7F0 EAFFF6ECE8FFFFFFFFFFB6805CFF00000000B67C09FFF6FCFFFFD4D3D3FF918F 8FFF929090FFD7D4D3FFC1C0BEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC2C2 BFFFD7D8D4FFBC80D7FFBC87DFFF00000000000000000000000000000000CE63 00000000000000000000CE630000CE630000CE630000CE630000CE6300000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000D9A277FFFFFFFFFFFCFBF9FFFCFB F8FFFBF9F7FFFBF7F4FFFAF7F2FFF9F5F0FFF7F3EDFFF6EFEAFFF5EBE7FFF3EA E4FFF2E7DEFFFFFFFFFFB9845EFF00000000B67C09FFF6FCFFFFCDCCCDFFD0CE CEFFD0CECFFFD0CECEFFA0A1A2FF9FA0A1FF9E9FA0FF9E9FA0FF9FA0A1FFA0A1 A2FFCECECEFFF8FFFFFFB77E00FF00000000000000000000000000000000CE63 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000DBA378FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFBC8661FF00000000B67C0BFFF4FDFFFFF3F7FFFFF3F7 FFFFF3F8FFFFF4F8FFFFF5F9FFFFF5FAFFFFF5F9FFFFF5F9FFFFF5FAFFFFF4F9 FFFFF3F8FFFFF5FEFFFFB67D09FF0000000000000000CE630000CE630000CE63 0000CE630000CE63000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000840000008400 0000000000008400000084000000000000000000000000000000000000000000 000000000000000000000000000000000000DCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA679FFDCA6 79FFDCA679FFDCA679FFBF8A64FF00000000B67E0FFFF7E4C0FFDCAA49FFDCAB 49FFDCAB4AFFDDAB4AFFDDAC4BFFDDAC4BFFDDAC4BFFDDAC4BFFDDAC4BFFDDAB 4AFFDCAA49FFF7E4C0FFB67E0FFF0000000000000000CE630000000000000000 0000FFDEB500CE63000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000008400 0000840000008400000000000000000000000000000000000000000000000000 000000000000000000000000000000000000D9A882FDE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B891FFE8B8 91FFE8B891FFE8B891FFBC8D6BFD00000000B88215FFEFD2A0FFEDCF9BFFECCF 9BFFECCF9BFFECCF9BFFECCF9BFFECCF9BFFECCF9BFFECCF9BFFECCF9BFFECCF 9BFFEDCF9BFFEFD2A0FFB88215FF0000000000000000CE630000CE630000CE63 0000CE630000CE63000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000001D130E6BCAA180F4DCA679FFDCA5 78FFDAA378FFD8A177FFD59F74FFD49D73FFD29C71FFCF9970FFCE986EFFCB95 6DFFC9936AFFB38C6EF41D130E6B000000005B400DB2B88216FFB78113FFB681 13FFB68113FFB68113FFB68113FFB68113FFB68113FFB68113FFB68113FFB681 13FFB78113FFB88216FF5B400DB2000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000009C000010AD000018AD000018AD000010AD000008A5000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000A00000007000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 9C000018B5000031C6000031C6000031C6000031C6000031C6000031C6000018 B50000009C0000000000000000000000000000000000B5848400A57B7300A57B 7300A57B7300A57B7300A57B7300A57B7300A57B7300A57B7300A57B7300A57B 7300A57B73009C6B630000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000073849C0000428C000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000A35823BFF2E7533FB000000070000000000000000000000000000 00000000000000000000000000000000000000000000000000000008A5000029 C6000031C6000031C6000031C6000031C6000031C6000031C6000031C6000031 C6000029BD000008A500000000000000000000000000B5848400FFEFDE00F7E7 CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6A500EFCE9C00EFCE9400EFCE 9400F7D69C009C6B630000000000000000000000000000000000000000000000 000000000000000000002173AD001873AD0029528400297BB50029A5D600295A 8C00005294000863A50000000000000000000000000000000000000000000000 000A3E8D45FF52A25AFF4D9E55FF307A36FE0000000800000000000000000000 0000000000000000000000000000000000000000000000009C000029CE000031 DE000031CE000021C6000029C6000031C6000031C6000031C6000021BD000029 C6000031C6000029BD0000009C000000000000000000B5847300FFF7E7009C31 00009C3100009C3100009C3100009C3100009C3100009C3100009C310000EFCE 9400F7D69C009C6B630000000000000000000000000000000000000000000000 000000000000000000004AADDE0042B5E7000863A5002994CE0031ADDE00086B AD001094C6001094CE00000000000000000000000000000000000000000A4799 4FFF59AB62FF75CA81FF72C87CFF4F9F57FF317B37FE00000008000000000000 000000000000000000000000000000000000000000000018BD000031E7000031 DE001039DE006384E7001842CE000029C6000029C6000839C6006384DE001842 C6000029C6000031C6000018B5000000000000000000B5847300FFF7EF009C31 0000FFFFFF00FFFFFF00FFFFFF008CA5FF00BDC6FF00FFFFFF009C310000EFCE 9C00F7D69C009C6B630000000000000000000000000000000000000000000000 00000000000021529400298CC6004ABDEF0042BDEF0042B5E70031ADDE0029A5 DE0018A5D6001094C60000428C0052638400000000000000000A4FA558FF61B4 6BFF7CCE88FF79CC86FF74CA80FF74C980FF50A158FF327C38FE000000080000 00000000000000000000000000000000000000009C000031E7000031F7000029 E7005273EF0000000000B5C6F7000831CE000029C600A5B5EF00000000006B84 DE000021BD000031C6000031C6000008A50000000000BD8C8400FFFFF7009C31 0000FFFFFF00FFFFFF007B9CFF000031FF005A7BFF00FFFFFF009C310000F7D6 A500F7D69C009C6B630000000000000000000000000000000000000000000000 000000000000214A940042ADE70052C6F7004ABDEF0063BDE7004A849C001873 A5001094CE001094C600006BA500216394000000000957AF61FF69BC74FF83D2 8FFF78C984FF5EB168FF61B36BFF76C982FF76CB81FF51A25AFF327B38FD0000 0008000000000000000000000000000000000008AD000031FF000031FF000031 EF000831EF008CA5F70000000000B5C6F700ADBDEF0000000000A5B5EF001039 C6000029C6000031C6000031C6000010AD0000000000BD8C8400FFFFFF009C31 0000D6DEFF00426BFF000031FF004263FF000031FF00DEE7FF009C310000F7D6 AD00F7D6A5009C6B630000000000000000000000000000000000000000000000 0000000000006BC6E70052C6EF004ABDEF006BC6EF00DEDEDE006B6B6B00295A 73001094C6000894CE00109CCE0063ADBD00070D0746479050E477C985FF7ECE 8CFF4DA156FC0E1E106F152D178B5AAC65FF7ACC85FF77CB84FF52A35BFF327C 38FC000000080000000000000000000000000018BD001042FF000839FF000031 FF000031F7000029EF0094A5F7000000000000000000ADBDEF000029C6000029 C6000031C6000031C6000031C6000018AD0000000000CE9C8400000000009C31 00005273FF001042FF00BDCEFF00EFF7FF001842FF004A73FF0094310000F7DE B500F7DEAD009C6B630000000000000000000000000000000000000000000000 000000000000218C390039A5B5004ABDEF006BC6EF00DEDEDE006B6B6B00316B 7B0018A5D600189CCE00189CCE000000000000000000050A053C499351E66BBF 77FF1020116F000000000000000017321A915CAD66FF7BCD88FF7ACD86FF54A4 5DFF337C39FC0000000800000000000000000818BD00426BFF00184AFF000031 FF000031FF000031F700A5B5F7000000000000000000BDC6F7000831D6000029 C6000031C6000031C6000031C6000018AD0000000000CE9C8400000000009C31 0000E7EFFF00DEE7FF00FFFFFF00FFFFFF009CADFF000031FF0063315A00F7DE BD00FFDEB5009C6B630000000000000000000000000063A55A00088C1000007B 00003994290039CE520031AD9C0042B5DE0063C6D600D6D6D60063636300426B 7B0029A5D60029A5D60000000000000000000000000000000000060C07430E1C 0F650000000000000000000000000000000017321A915DAE67FF7DCE89FF7CCE 88FF55A55EFF347D3AFC00000008000000000010B5005A7BFF004A6BFF000031 FF001039FF00A5B5FF0000000000A5B5FF0094A5F70000000000B5C6F7001842 D6000029CE000031C6000031C6000010AD0000000000DEAD8400000000009C31 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF005273FF000031FF00F7E7 C600F7DEB5009C6B6300000000000000000000000000299C29004ADE6B0021B5 310018AD290039CE520018A5390018A55A0042B54200C6B59C00525252008C73 630042A5C600189CCE0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000017321A915EAF68FF80CF 8CFF7DCF8AFF56A65FFF37843EFF000000080000A5004A6BF7008CA5FF001842 FF004A6BFF0000000000A5BDFF000031F7000029EF008CA5F70000000000637B E7000029D6000031CE000031C60000009C0000000000DEAD8400000000009C31 00009C3100009C3100009C3100009C3100009C3100008C3110002131CE000031 FF00C6BDAD009C6B6300000000000000000000000000318C18004ADE6B004AE7 730039D65A0039CE520029C6420021BD310018A51800219418006B8442000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000018321B9160B1 6AFF81D18EFF78C884FF55A55EFF0C1E0E7B000000001829CE009CADFF008CA5 FF00214AFF004A73FF000839FF000031FF000031F7000031F7004A6BF7001039 E7000031DE000031D6000018B5000000000000000000E7B58C00000000000000 00000000000000000000FFFFFF00FFFFF700FFF7EF00F7E7D600B58473000031 FF000031FF000031FF00000000000000000039A5390021B531004AE773004AE7 730073D6840073B584001894210010A5180010A51800089C0800529429000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001833 1B9161B26BFF5DAE67FF0E20107900000000000000000000A500425AEF00BDC6 FF009CADFF00395AFF000839FF000031FF000031FF000031FF000029F7000031 EF000031EF000029CE0000009C000000000000000000E7B58C00000000000000 0000000000000000000000000000FFFFFF00FFFFFF00E7CECE00B5847300EFB5 7300EFA54A000031FF00000000000000000094E7A5006BF7940052EF7B004ADE 6B00D6D6D600A5A5A500217B29000894080008A5100010A5180073C663000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000018341B911126137F000000000000000000000000000000000008A5004263 EF00ADBDFF00BDCEFF008CA5FF006384FF005273FF004A6BFF003963FF001042 FF000029D6000008A500000000000000000000000000EFBD9400000000000000 00000000000000000000000000000000000000000000E7D6D600B5847300FFC6 7300CE9473000000000000000000000000000000000042D663004ADE6B004ADE 6B00D6D6D600A5A5A500399C420021BD310018A518004AA52900000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 A5001831CE005A73F700849CFF008CA5FF007B94FF005273FF00214AF7000018 C60000009C0000000000000000000000000000000000EFBD9400FFF7F700FFF7 F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700E7D6CE00B5847300CE9C 84000000000000000000000000000000000000000000000000005AE77B004ADE 6B00CECECE008C8C8C005A944A0052BD4A0063C6630000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000A5000810B5001021C6000818C6000010B50000009C000000 00000000000000000000000000000000000000000000EFBD9400DEA58400DEA5 8400DEA58400DEA58400DEA58400DEA58400DEA58400DEA58400B58473000000 00000000000000000000000000000000000000000000000000000000000042D6 6300B5A58C00736B63008CB54A0021B529000000000000000000000000000000 00000000000000000000000000000000000000000000314A6300AD7B7B000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000063000000000000000000000000000052B5FF0052B5FF001884 E7004A7BA500CE94940000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000052B5FF0052B5FF001884 E7004A7BA500CE94940000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000005284B5000873E70031638C00B57B 7B00000000000000000000000000000000000000000000000000000000000000 00000000000000AD00000063000000000000000000000000000052B5FF004AB5 FF00188CE7004A7BA500BD949400000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000052B5FF004AB5 FF00188CE7004A7BA500BD949400000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000527B C600000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000031A5FF0039A5FF001073EF003163 8C00B57B7B000000000000000000000000000000000000000000006300000063 00000063000000AD000000AD00000063000000000000000000000000000052BD FF004AB5FF002184DE005A6B730000000000AD7B7300C6A59C00D6B5A500D6A5 9C000000000000000000000000000000000000000000000000000000000052BD FF004AB5FF002184DE005A6B730000000000AD7B7300C6A59C00D6B5A500D6A5 9C0000000000000000000000000000000000000000000000000000000000317B EF00527BC600296BC60000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000039A5FF0039A5FF00086B E70031638C00B57B7B000000000000000000000000000000000029FF290029FF 290029FF290000AD000000AD000029FF29000000000000000000000000000000 000052BDFF00B5D6EF00A5948C00B59C8C00F7E7CE00FFFFDE00FFFFDE00FFFF DE00EFDEC600CEADA50000000000000000000000000000000000000000000000 000052BDFF00B5D6EF00A5948C00B59C8C00F7E7CE00FFFFDE00FFFFDE00FFFF DE00EFDEC600CEADA5000000000000000000000000000000000000000000397B E700007BFF000073F700527BC600000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000039A5FF0031A5 FF000873E70031638C00AD7B7B00000000000000000000000000000000000000 00000000000000AD000029FF2900000000000000000000000000000000000000 000000000000CEB5B500DEBDA500FFF7C600FFFFD600FFFFDE00FFFFDE00FFFF DE00FFFFEF00F7F7EF00B58C8C000000000000000000000000001884E7000000 0000000000001884E700DEBDA500FFF7C6001884E700FFFFDE00FFFFDE00FFFF DE001884E7001884E700B58C8C00000000000000000000000000000000000000 0000009CFF00008CFF00008CFF00527BC6000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000039A5 FF0031A5FF00106BD60042525A00000000009C635A00B58C8400CEA58C00C68C 84000000000029FF290000000000000000000000000000000000000000000000 000000000000C6948C00F7E7B500FFDEAD00FFF7D600FFFFDE00FFFFE700FFFF F7000000000000000000DED6BD000000000000000000000000001884E7000000 0000000000001884E700F7E7B500FFDEAD00FFF7D6001884E700FFFFE700FFFF F7001884E700000000001884E700000000000000000000000000000000000000 00000000000000B5FF00008CFF000094FF00527BC600527BC600000000000000 0000000000000000000000000000000000000000000000000000000000000000 000039ADFF00A5CEEF008C7B7300A5847300F7E7C600FFFFCE00FFFFCE00FFFF CE00E7D6AD00C69C8C0000000000000000000000000000000000000000000000 000000000000DEBDAD00FFE7AD00F7CE9400FFF7CE00FFFFDE00FFFFE7000000 000000000000FFFFEF00F7EFD600C69C940000000000000000001884E7001884 E7001884E7001884E700FFE7AD001884E7001884E7001884E7001884E7000000 00001884E7001884E700F7EFD600C69C94000000000000000000000000000000 0000000000000000000000B5FF0008C6FF00009CFF00009CFF00527BC6000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000C6A5A500CEA58C00FFEFB500FFFFCE00FFFFCE00FFFFCE00FFFF D600FFFFE700F7F7EF00A5737300000000000000000000000000000000000000 000000000000E7C6AD00FFE7AD00EFBD8400FFE7B500FFFFDE00FFFFDE00FFFF EF00FFFFEF00FFFFE700FFFFD600C6AD9C0000000000000000001884E700FFFF FF00FFFFFF001884E700FFE7AD00EFBD8400FFE7B5001884E700FFFFDE00FFFF EF001884E700FFFFE7001884E700C6AD9C000000000000000000000000000000 000000000000000000000000000000B5FF0008BDFF0000ADFF00009CFF00527B C600000000000000000000000000000000000000000000000000000000000000 000000000000B57B7300F7D6A500F7CE8C00FFF7C600FFFFCE00FFFFD600FFFF E700FFFFF70000000000D6CEAD00000000000000000000000000000000000000 000000000000DEC6AD00FFEFB500EFBD8400F7CE9C00FFEFC600FFFFDE00FFFF DE00FFFFDE00FFFFDE00F7F7D600CEA59C000000000000000000000000001884 E7001884E700DEC6AD00FFEFB500EFBD84001884E700FFEFC600FFFFDE00FFFF DE001884E7001884E700F7F7D600CEA59C000000000000000000000000000000 0000527BC600527BC600527BC60000C6FF0008FFFF0031F7FF0010BDFF0000AD FF00527BC600527BC60000000000000000000000000000000000000000000000 000000000000D6AD8C00FFE79C00F7C67B00FFF7C600FFFFD600FFFFE700FFFF F700FFFFF700FFFFE700F7E7C600B5847B000000000000000000000000000000 000000000000CEA59C00FFF7C600FFEFC600F7D6A500F7D69C00FFE7BD00FFF7 CE00FFFFD600FFFFDE00E7DEBD00000000000000000000000000000000000000 000000000000CEA59C00FFF7C600FFEFC600F7D6A500F7D69C00FFE7BD00FFF7 CE00FFFFD600FFFFDE00E7DEBD00000000000000000000000000000000000000 000029ADFF0000C6FF0000EFFF0000F7FF0000F7FF0000FFFF004AEFFF0018CE FF0000A5FF00527BC60000000000000000000000000000000000000000000000 000000000000E7B59C00FFD69C00EFAD6B00F7E7A500FFFFCE00FFFFD600FFFF E700FFFFE700FFFFD600F7F7CE00B59C840000000000188CE700000000000000 0000188CE70000000000DEC6AD00188CE700FFF7EF00F7CE9C00F7BD8C00188C E700188CE700FFF7CE00BD9C8C0000000000000000001884E700000000000000 00001884E70000000000DEC6AD001884E700FFF7EF00F7CE9C00F7BD8C001884 E7001884E700FFF7CE00BD9C8C00000000000000000000000000000000000000 000039A5FF0000C6FF0000EFFF0000F7FF0000EFFF0000DEFF0000FFFF0000FF FF0039EFFF0008C6FF00527BC600000000000000000000000000000000000000 000000000000D6AD9C00FFE7A500EFAD6B00F7C67B00FFEFB500FFFFD600FFFF D600FFFFD600FFFFD600F7E7C600B58C840000000000188CE700000000000000 0000188CE7000000000000000000D6BDBD00188CE700FFF7C600FFE7B500188C E700F7DEB500188CE7000000000000000000000000001884E700000000000000 00001884E7000000000000000000D6BDBD001884E700FFF7C600FFE7B5001884 E700F7DEB5001884E70000000000000000000000000000000000000000000000 00000000000008C6FF0039E7FF004AEFFF0042F7FF0018FFFF0000FFFF0000FF FF0008FFFF0021FFFF00527BC600000000000000000000000000000000000000 000000000000B5847B00FFEFB500FFEFB500F7CE8C00F7C68400F7E7A500FFF7 C600FFF7C600FFFFCE00E7D6AD000000000000000000188CE700188CE700188C E700188CE70000000000188CE700188CE700188CE700188CE700DEBDAD00188C E700188CE700000000000000000000000000000000001884E7001884E7001884 E7001884E700000000001884E7001884E7001884E7001884E700DEBDAD001884 E7001884E7000000000000000000000000000000000000000000000000000000 000000000000000000000000000031D6FF0008F7FF0000FFFF0000F7FF0000D6 FF0000B5FF00527BC60000000000000000000000000000000000000000000000 00000000000000000000D6B59C0000000000FFF7EF00F7C67B00EFAD6B00F7C6 8400FFE7A500FFF7B500AD8473000000000000000000188CE700000000000000 0000188CE700000000000000000000000000188CE7000000000000000000188C E70000000000188CE7000000000000000000000000001884E700000000000000 00001884E7000000000000000000000000001884E70000000000000000001884 E700FFFFFF001884E70000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000031D6FF0000F7FF0000EF FF0000ADFF0000A5FF00527BC600000000000000000000000000000000000000 0000000000000000000000000000CEADAD00F7E7C600FFEFB500FFE79C00FFE7 A500F7D6A500C69C840000000000000000000000000000000000188CE700188C E700000000000000000000000000188CE700000000000000000000000000188C E700188CE70000000000000000000000000000000000000000001884E7001884 E7000000000000000000000000001884E7000000000000000000000000001884 E7001884E7000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000031D6 FF0042DEFF0010D6FF005AA5FF00527BC6000000000000000000000000000000 000000000000000000000000000000000000C69C7B00C69C8400D6AD8C00D6AD 8C00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000031D6FF0052A5FF00527BC6000000000000000000000000000000 000000000000B58C8C008C5A5A008C5A5A008C5A5A008C5A5A008C5A5A008C5A 5A008C5A5A008C5A5A008C5A5A0000000000000000000000000000000000299C DE00299CDE00A57B7300A57B7300A57B7300A57B7300A57B7300A57B7300A57B 7300A57B7300A57B7300A57B7300000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000031DE000031DE00000000004A637B00BD9494000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000B58C8C00FFF7E700F7EFDE00F7EFDE00F7EFDE00F7EFDE00F7EF DE00F7EFDE00F7E7CE008C5A5A00000000000000000000000000299CDE008CD6 EF0084D6F700CEC6BD00FFEFDE00F7EFE700F7EFDE00F7EFDE00F7EFDE00F7EF DE00F7EFDE00F7EFDE00A57B730000000000000000000031DE000031DE000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000031DE000031DE00000000006B9CC600188CE7004A7BA500C694 9400000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000B58C8C00F7EFDE00F7DECE00F7DEC600F7DEC600F7DEC600F7DE C600EFDECE00EFDECE008C5A5A000000000000000000299CDE00A5E7FF0094EF FF008CF7FF00CEC6BD00F7E7D600F7E7D600F7DEC600F7DEC600F7DEC600F7DE BD00F7DEC600F7E7D600A57B730000000000000000000031DE000031DE000031 DE00000000000000000000000000000000000000000000000000000000000000 00000031DE000031DE0000000000000000004AB5FF0052B5FF00218CEF004A7B A500C69494000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000B58C8C00FFF7E700FFD6A500FFD6A500FFD6A500FFD6A500FFD6 A500FFD6A500EFDECE008C5A5A000000000000000000299CDE00A5E7FF0094EF FF0084EFFF00CEC6BD00F7E7DE00FFE7CE00F7DEBD00F7DEBD00F7DEBD00F7DE BD00F7DEC600F7E7D600A57B730000000000000000000031DE000031DE000031 DE000031DE000000000000000000000000000000000000000000000000000031 DE000031DE000000000000000000000000000000000052B5FF0052B5FF001884 E7004A7BA500C694940000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000B58C8C008C5A5A008C5A 5A008C5A5A00B58C8C00FFF7EF00F7DEC600F7DEC600F7DEC600F7DEC600F7DE BD00F7E7CE00EFDECE009C6B63000000000000000000299CDE00ADEFFF00A5EF FF0094EFFF00CEC6BD00F7E7E700F7E7D600F7DEC600F7DEC600F7DEBD00F7DE BD00F7DEC600F7E7D600A57B73000000000000000000000000000031EF000031 DE000031DE000031DE00000000000000000000000000000000000031DE000031 DE0000000000000000000000000000000000000000000000000052B5FF004AB5 FF00188CE7004A7BA500BD949400000000000000000000000000000000000000 00000000000000000000000000000000000000000000B58C8C00FFF7E700F7EF DE00F7EFDE00B58C8C00FFF7EF00F7E7CE00F7DEC600F7DEC600F7DEC600F7DE C600F7E7D600EFDECE009C6B6B000000000000000000299CDE00B5EFFF00ADEF FF00A5EFFF00CEC6BD00F7EFE700F7EFDE00FFE7CE00FFE7CE00FFE7CE00F7DE C600F7E7D600EFE7DE00A57B7300000000000000000000000000000000000000 00000031DE000031DE000031DE00000000000031DE000031DE000031DE000000 00000000000000000000000000000000000000000000000000000000000052B5 FF004AB5FF002184DE005A6B730000000000AD7B7300C6A59C00D6B5A500CEA5 9C000000000000000000000000000000000000000000B58C8C00F7EFDE00F7DE CE00F7DEC600B58C8C00FFFFF700FFD6A500FFD6A500FFD6A500FFD6A500FFD6 A500FFD6A500EFE7D600A57B73000000000000000000299CDE00BDEFFF00BDF7 FF00ADF7FF00CEC6BD00FFF7EF00FFE7CE00FFDEBD00F7DEBD00F7DEBD00FFDE B500F7DEC600F7EFE700A57B7300000000000000000000000000000000000000 0000000000000031DE000031E7000031E7000031E7000031DE00000000000000 0000000000000000000000000000000000000000000000000000000000000000 000052BDFF00B5D6EF00A5948C00B59C8C00F7E7CE00FFFFD600FFFFD600FFFF D600E7DEBD00CEADA500000000000000000000000000B58C8C00FFF7E700FFD6 A500FFD6A500B58C8C00FFFFF700FFE7D600FFE7D600F7E7D600F7E7CE00FFE7 D600FFF7E700EFDEDE00A57B73000000000000000000299CDE00C6EFFF00CEF7 FF00BDF7FF00CEC6BD00FFF7F700FFF7EF00F7EFE700F7EFE700F7EFDE00F7EF DE00F7EFE700EFE7DE00A57B7300000000000000000000000000000000000000 000000000000000000000031E7000031E7000031EF0000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000CEB5B500D6B5A500FFEFC600FFFFD600FFFFD600FFFFD600FFFF DE00FFFFEF00F7F7EF00B58C8C000000000000000000B58C8C00FFF7EF00F7DE C600F7DEC600B58C8C00000000000000000000000000FFFFF700FFFFF700EFDE DE00D6C6C600BDADAD00B58473000000000000000000299CDE00CEEFFF00DEF7 FF00CEF7FF00CEC6BD00FFF7F7000000000000000000FFF7F700F7F7F700EFE7 DE00D6BDB500C6ADA500A57B7300000000000000000000000000000000000000 0000000000000031DE000031EF000031E7000031EF000031F700000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000C6948C00F7DEB500F7D6A500FFF7CE00FFFFD600FFFFDE00FFFF EF00FFFFF70000000000DED6BD000000000000000000B58C8C00FFF7EF00F7E7 CE00F7DEC600B58C8C00000000000000000000000000FFFFF700FFFFF700B58C 8C00B58C8C00B58C8C00B58C8C000000000000000000299CDE00CEEFFF00E7FF FF00DEF7FF00CEC6BD00FFF7F70000000000000000000000000000000000DECE C600E7AD7300C6AD8C0000000000000000000000000000000000000000000000 00000031F7000031EF000031E70000000000000000000031F7000031F7000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000DEBDA500FFE7AD00F7CE9400FFF7CE00FFFFDE00FFFFE700FFFF F700FFFFF700FFFFEF00F7EFD600C69C940000000000B58C8C00FFFFF700FFD6 A500FFD6A500B58C8C000000000000000000000000000000000000000000B58C 8C00EFB56B00C68C7B00000000000000000000000000299CDE00D6F7FF00F7FF FF00E7FFFF00CEC6BD00FFEFE700FFF7EF00FFF7EF00FFEFEF00FFF7EF00E7C6 BD00C6AD8C00299CDE0000000000000000000000000000000000000000000031 FF000031EF000031F700000000000000000000000000000000000031FF000031 F700000000000000000000000000000000000000000000000000000000000000 000000000000E7C6AD00FFDEAD00EFBD8400F7E7B500FFFFD600FFFFDE00FFFF E700FFFFE700FFFFDE00F7F7D600C6AD9C0000000000B58C8C00FFFFF700FFE7 D600FFE7D600B58C8C00B58C8C00B58C8C00B58C8C00B58C8C00B58C8C00B58C 8C00BD84840000000000000000000000000000000000299CDE00DEF7FF000000 0000F7FFFF00CEC6BD00CEC6BD00CEC6BD00CEC6BD00CEC6BD00CEC6BD00CEC6 BD0084C6DE00299CDE00000000000000000000000000000000000031F7000031 F7000031FF000000000000000000000000000000000000000000000000000031 F7000031F7000000000000000000000000000000000000000000000000000000 000000000000DEBDAD00FFE7B500EFBD8400F7CE9400FFEFC600FFFFDE00FFFF DE00FFFFDE00FFFFDE00F7EFD600C6A59C0000000000B58C8C00000000000000 000000000000FFFFF700FFFFF700EFDEDE00D6C6C600BDADAD00B58473000000 00000000000000000000000000000000000000000000299CDE00DEF7FF00F7F7 F700ADC6CE00A5C6CE00A5C6CE00A5C6CE00A5C6CE00A5C6CE00B5D6D600DEFF FF0084D6F700299CDE000000000000000000000000000031F7000031F7000031 F700000000000000000000000000000000000000000000000000000000000000 0000000000000031F70000000000000000000000000000000000000000000000 000000000000C69C9400FFEFC600FFEFC600F7D6A500F7CE9C00F7E7B500FFF7 CE00FFF7D600FFFFD600E7DEBD000000000000000000B58C8C00000000000000 000000000000FFFFF700FFFFF700B58C8C00B58C8C00B58C8C00B58C8C000000 00000000000000000000000000000000000000000000299CDE00DEF7FF00DECE C600BDA59C00A57B7300A57B7300A57B7300A57B7300A57B7300BD9C9400E7EF E70094DEF700299CDE0000000000000000000031F7000031F7000031F7000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000DEC6AD0000000000FFF7EF00F7CE9400EFBD8400F7CE 9C00FFE7B500FFF7C600BD9C8C000000000000000000B58C8C00000000000000 0000000000000000000000000000B58C8C00EFB56B00C68C7B00000000000000 0000000000000000000000000000000000000000000000000000299CDE00B5D6 E700949C9C00E7DED600F7E7D600F7E7D600F7E7D600CEC6BD00849CA5008CCE E700299CDE000000000000000000000000000031F7000031F700000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000D6BDBD00F7EFD600FFEFC600FFE7AD00FFE7 B500F7DEB500CEAD9C00000000000000000000000000B58C8C00B58C8C00B58C 8C00B58C8C00B58C8C00B58C8C00B58C8C00BD84840000000000000000000000 000000000000000000000000000000000000000000000000000000000000299C DE00299CDE009C948C009C948C009C948C009C948C009C948C00299CDE00299C DE00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000CEAD9400CEAD9C00DEBDA500DEBD A500000000000000000000000000000000000000000000000000000000000000 000000000000000000009C9C9C00000000000000000000000000848484008484 84008C8C8C000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00009C9C9C009C9C9C00D6CECE009494940039393900525252009C949400C6C6 C600D6D6D6008484840000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000AD3900008C290000000000000000000000000000A54200008C29 00000000000000000000000000000000000000000000000000009C9C9C009C9C 9C00F7F7F70000000000D6D6D6009C9C9C004242420021182100211821003131 310063636300848484008C8C8C00000000000000000100000003000000050000 00080000000B0000000F000000120000001500000017000000190000001A0000 001A0000001A0000001A0000001A000000100000000A000000170000001A0000 001A0000001A0000001A0000001A000000180000001600000014000000100000 000D0000000A0000000700000004000000020000000000000000000000000000 0000C65A0000A5420000A54200008C29000000000000A5420000AD390000AD39 00008C290000000000000000000000000000948C8C009C9C9C00EFEFEF000000 0000EFE7E700C6C6C6009C9C9C008C8C8C009494940084848400636363003939 39001821210021182100737373000000000000000001000000050000000A0000 00100A0500542D1701A100000024000000290000002E00000032000000330000 00330000003300000033301801A600000020000000132F1801A3000000330000 0033000000330000003300000033000000300000002C000000272E1701A20A05 0057000000130000000D00000007000000030000000000000000000000000000 0000AD39000000000000000000008C29000000000000AD390000000000000000 00008C2900000000000000000000000000009C9C9C00E7E7E700E7E7E700BDBD BD00A5A5A500B5ADAD00C6BDBD00A5A5A50094949400948C8C00949494009C94 94008C8C8C006B6B6B0084848400000000000000000000000000000000000905 0048653504CC653504CC00000000000000000000000000000000000000000000 0000000000001B0E017A653504CC0000000000000000653504CC1B0E017A0000 0000000000000000000000000000000000000000000000000000653504CC6535 04CC090500480000000000000000000000000000000000000000000000000000 0000AD3900008C290000000000008C29000000000000AD39000000000000C65A 00008C29000000000000000000000000000094949400ADADAD00A5A5A500ADAD AD00C6C6C600D6D6D600EFEFEF00EFEFEF00DEDEDE00C6C6C600ADADAD009C9C 9C00948C8C00949494008C8C8C000000000000000000000000000D0701486A3A 07CCFFC331FF6A3A07CC00000000000000000000000400000011040200280D07 0147321B038D764508CD532E06B60000000000000000532E06B6744615CD321B 038D0D07014704020028000000110000000400000000000000006A3A07CCFFB8 11FF6A3A07CC0D07014800000000000000000000000000000000000000000000 0000C65A0000AD390000AD390000AD390000A5948400AD390000AD390000AD39 00008C290000000000000000000000000000948C8C00ADADAD00C6C6C600CECE CE00C6C6C600DEDEDE00CECECE00A5ADA500BDBDBD00CECECE00D6D6D600D6D6 D600C6C6C600B5B5B5009494940000000000000000000E080148703F0CCCFACC 6BFFFCBD2BFF703F0CCC703F0CCC703F0CCC72410DCD7B490ED1895510D79F67 13E0CF8F10F1BE8010EB351E068D0000000000000000351E068DBC8E4BEBCC9C 4DF19F6D25E0895818D77C4A10D172420DCD703F0CCC703F0CCC703F0CCCFDB6 13FFFDB91BFF703F0CCC0E080148000000000000000000000000000000000000 000000000000C65A0000A54200009C4A18008C634A00AD390000A54200008C29 000000000000000000000000000000000000000000009C9C9C00CECECE00CECE CE00DEDEDE00C6C6C600B5B5B500A5D6A500BDC6BD00C6A5A500ADA5A500A5A5 A500B5B5B500C6BDBD00A5A5A500000000000E080248764611CCFAD68AFFEEB2 65FFF1B866FFF0B955FFECB23FFFEBAF3AFFEAAD36FFEAAB30FFE9A82AFFE8A4 23FFE1A128FC855315D307040135000000000000000007040135875920D3EDBE 73FCF4BC67FFF0B64BFFEBB03CFFEBB03CFFEBAF3AFFEAAE37FFEAAC34FFE9A7 29FFE7A21FFFEDB23AFF764611CC0E0802480000000000000000000000000000 00000000000000000000000000008C736B00E7DED60063524200000000000000 00000000000000000000000000000000000000000000000000009C9C9C00BDBD BD00ADADAD00ADADAD00E7E7E700F7EFEF00EFEFEF00EFE7DE00D6D6D600CECE CE00B5B5B5009494940000000000000000007C4B15CCFDDF93FFEFB467FFEFB4 67FFEFB467FFEFB467FFEBB060FFE3A753FFDA9E48FFD59842FFD29640FFD29B 47FC9A6727DD2B1A0779000000000000000000000000000000002B1A0779A173 36DDF0C379FCF6C174FFEFB767FFE4AA55FFDA9E48FFD59842FFD1943FFFD194 3FFFD49742FFD99C47FFEBB866FF7C4B15CC0000000000000000000000000000 000000000000000000008C736B00E7DED6009C847B00D6CEBD00635242000000 0000000000000000000000000000000000000000000000000000000000009C9C 9C00D6D6D600CECECE009C9C9C00BDBDBD00D6D6D600D6D6D600D6D6D600C6C6 C600ADADAD00000000000000000000000000100A034882521ACCFFE397FFF4BE 71FFF6C679FFF8CE82FFF8CD81FFF8CC80FFF7CB7EFFE7BA70F9C89954EC9161 27D32D1C08790000000A000000000000000000000000000000000000000A2D1C 0879916329D3C9A15BECEAC177F9F9CF83FFF8CD81FFF7CA7DFFF6C77AFFF2BD 70FFEFB467FFF7CB7EFF82521ACC100A03480000000000000000000000000000 000000000000000000009C847B00E7DED60063524200D6CEBD008C736B000000 0000000000000000000000000000000000000000000000000000000000000000 0000FFE7E700FFDECE00E7C6BD00E7C6BD00E7CEC600DED6CE00CECECE009494 94000000000000000000000000000000000000000000100A034888571ECCFFE5 99FFFCD78BFF88571ECC88571ECC88571ECC87571ECB6C4518B640290E8D0905 0235000000000000000000000000000000000000000000000000000000000000 00000905023540290E8D6C4518B687571ECB88571ECC88571ECC88571ECCF8CB 7EFFFBD78BFF88571ECC100A0348000000000000000000000000000000000000 0000000000008C736B00E7DED60063524200000000007B7B7300D6CEBD006352 4200000000000000000000000000000000000000000000000000000000000000 0000CE9C9C00FFDECE00FFCEBD00FFC6AD00FFBDA500FFAD9C00000000000000 0000000000000000000000000000000000000000000000000000110B04488D5D 22CCFFE599FF8D5D22CC00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000008D5D22CCFEE1 95FF8D5D22CC110B044800000000000000000000000000000000000000000000 0000000000009C847B009C847B000000000000000000000000007B7B73008C73 6B00000000000000000000000000000000000000000000000000000000000000 0000CE9C9C00FFDECE00FFCEBD00FFC6AD00FFBDA500F7AD9400000000000000 000000000000000000000000000000000000000000000000000000000000120C 0448916125CC916125CC00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000916125CC9161 25CC120C04480000000000000000000000000000000000000000000000000000 00008C736B00E7DED600635242000000000000000000000000007B7B7300D6CE BD00635242000000000000000000000000000000000000000000000000000000 0000CE9C9C00FFDECE00FFCEBD00FFC6AD00FFBDA500F7AD9C00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000120C05485438169900000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000054381699120C 0548000000000000000000000000000000000000000000000000000000000000 00007B7B73006352420000000000000000000000000000000000000000007B7B 73008C736B00000000000000000000000000000000000000000000000000CE9C 9C00FFE7D600FFDECE00FFCEBD00FFC6AD00FFBDA500F7AD9C00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000635242000000000000000000000000000000000000000000000000000000 00007B7B7300000000000000000000000000000000000000000000000000CE9C 9C00CE9C9C00CE9C9C00CE9C9C00F7AD9C00F7AD9C0000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003A20108F5D341AB59F5A2DEEB666 33FFB46633FFB36532FFB16432FFAF6331FFAD6231FFAB6130FFA96030FFA85F 30FFA75E2FFFA45E2FFE93542AF162381CC40000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000848484000000000000000000000000009C9C9C009C9C 9C00A5A5A5000000000000000000000000000000000000000000B5848400B584 8400B5848400B5848400B5848400B5848400B5848400B5848400B5848400B584 8400B5848400B5848400B5848400000000008C4E27DEEBC5ACFFEAC4ACFFFEFB F8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFB F8FFFEFBF8FFC8997AFFC79777FF8F5129ED0000000000000000000000000000 0000000000006E3D1EC5C28356FFD38A66FFE18E6EFFDC8C6AFFDA8A6BFFD789 6CFFCD8A6AFFAA6B42FFA55D2CFF000000000000000000000000000000000000 00008484840084848400DEDEDE00ADA5A500525252006B6B6B00ADADAD00CECE CE00DEDEDE009C9C9C0000000000000000000000000000000000636B7B00FFEF D600F7E7C600F7DEBD00F7DEB500F7D6AD00F7D6A500F7CE9C00F7CE9400F7CE 9C00F7CE9C00F7D69C00B584840000000000B76935FEEDCAB2FFE0A178FFFEFA F7FF60BF87FF60BF87FF60BF87FF60BF87FF60BF87FF60BF87FF60BF87FF60BF 87FFFDF9F6FFCA8C63FFC99A7AFFA45E2FFE0000000000000000000000000000 000000000000C58253FFEFCEB9FFDDFFFFFF86EEC7FFA1F4D7FFA1F6D7FF8BEE C7FFE0FFFFFFDDA184FFAA683CFF000000000000000000000000848484008484 8400F7F7F70000000000DEDEDE00B5ADAD005A5A630031313100313131005252 5200848484009C9C9C00A5A5A50000000000000000005A9CC600318CD6007B84 9C00F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6A500EFCE9C00EFCE 9400EFCE9400F7D69C00B584840000000000BA6A36FFEECCB5FFE1A178FFFEFA F7FFBEDCC1FFBEDCC1FFBEDCC1FFBEDCC1FFBEDCC1FFBEDCC1FFBEDCC1FFBEDC C1FFFDF9F6FFCD8F66FFCC9D80FFA75F30FF000000000000000000000000532E 16AC936241DEC27D4FFFEFB599FFEAF3E8FF4FBE83FF6DC997FF6FC998FF52BE 83FFE4F4E9FFDD9B79FFA96738FF000000008484840084848400EFEFEF000000 0000EFEFEF00D6D6D600B5B5B500A5A5A500ADA5AD009C9C9C007B7B7B005252 520031313900313139008C8C8C000000000000000000000000004AB5FF00298C E70084849C00F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6A500EFCE 9C00EFCE9400F7D69C00B584840000000000BA6936FFEFCEB7FFE1A177FFFEFA F7FF60BF87FF60BF87FF60BF87FF60BF87FF60BF87FF60BF87FF60BF87FF60BF 87FFFDF9F6FFCF9268FFCEA283FFA95F30FF0000000000000000000000009661 3FDEB59C8CDEC38052FFEAB596FFF3F3EAFFEDF1E6FFEFF1E6FFEFF0E6FFEDF1 E5FFF3F5EDFFD59B77FFAF6E42FF0000000084848400EFEFEF00E7E7E700CECE CE00B5B5B500B5B5B500CECECE00B5B5B500ADA5A500A5A5A500ADA5AD00ADAD AD00A5A5A500848484009C9C9C00000000000000000000000000B58473004AB5 FF00218CDE007B849C00F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6 A500EFCE9C00F7D69C00B584840000000000B96834FFEFD0BAFFE2A178FFFEFB F8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFB F8FFFEFBF8FFD3956BFFD2A689FFAA6030FF000000004326129B785036C9BA78 4DF8E0A78DF8C98A5FFFE6B491FFE2A680FFE1A680FFDEA27BFFDCA079FFDB9E 77FFD99D75FFD49971FFBA7C55FF0000000084848400BDBDBD00B5B5B500B5B5 B500D6D6D600DEDEDE00EFEFEF00F7F7F700E7E7E700CECECE00BDBDBD00ADAD AD00A5A5A500ADA5AD00A5A5A500000000000000000000000000BD8C8400FFFF F7004ABDFF005A94BD00A5847B00BD948C00AD7B7B00BD948C00D6B59C00F7D6 AD00F7D6A500F7D69C00B584840000000000BA6834FFF0D2BDFFE2A278FFE2A2 78FFE1A278FFE2A279FFE1A279FFE0A076FFDE9E75FFDD9E74FFDC9C72FFD99A 70FFD8986FFFD6986EFFD5AA8DFFAC6131FF000000007A5033C9947F73C9BC85 5EF8D4B193F8CA8C63FFEAB798FFDDA47CFFDDA57EFFDBA27AFFD99F78FFD99F 77FFD89E76FFD89D76FFBE835BFF0000000084848400B5B5B500D6D6D600D6D6 D600D6D6D600E7E7E700DEDEDE00B5BDB500B5B5B500D6D6D600DEDEDE00DEDE DE00D6CECE00C6C6C600ADADAD00000000000000000000000000BD8C8400FFFF FF00FFF7EF00BDA59C00C6A59C00E7CEBD00F7DEC600E7C6AD00C69C9400D6B5 9C00F7D6AD00F7D6A500B584840000000000BA6834FFF2D5C1FFE3A278FFE3A2 78FFE2A279FFE2A279FFE2A379FFE1A177FFE0A076FFDE9F75FFDE9D73FFDC9C 72FFDA9A71FFD99A71FFDAAF94FFAE6231FF00000000784D31C994715FC9C08D 67F8CAAB88F8C8875BFFEFBEA0FFFDFCFAFFFEFCFBFFFEFDFDFFFEFDFCFFFDFB FAFFFDFCFBFFDDA784FFC07D51FF000000000000000084848400DEDEDE00D6D6 D600E7E7E700D6D6D600B5B5B500BDDEBD00CECECE00B5B5B500BDB5B500BDBD BD00C6C6C600CECECE00BDBDBD00000000000000000000000000CE9C84000000 0000FFFFF700C69C9400E7CEC600FFEFDE00FFE7D600FFFFF700E7C6AD00BD94 8C00F7DEB500F7DEAD00B584840000000000BA6834FFF2D8C4FFE3A379FFE3A2 78FFE3A378FFE2A379FFE2A279FFE1A279FFE1A177FFDF9F75FFDE9E74FFDD9D 72FFDB9B70FFDC9C72FFDDB499FFB06332FF00000000794F33C991715CC9C28F 6BF8DDB398F8C78559FFEFBF9DFFFFFFFFFFCC926CFFFFFFFFFFFFFFFFFFFFFB F7FFFFF8F1FFE4AE8BFFC7895FFF00000000000000000000000084848400CECE CE00BDBDBD00C6BDBD00E7E7E700F7F7F700EFEFEF00F7EFE700E7DEDE00B5B5 B500C6C6C6008484840000000000000000000000000000000000CE9C84000000 0000FFFFFF00AD7B7B00FFEFE700FFEFE700FFEFDE00FFFFF700F7DEC600AD7B 7B00F7DEBD00FFDEB500B584840000000000BA6934FFF4D9C7FFE6A57BFFC88B 62FFC98C63FFC98D65FFCB916AFFCB916BFFCA8F67FFC88B63FFC88B62FFC88B 62FFC88B62FFDA9B72FFE1B99EFFB26432FF000000007C553BC98E7059C9BF82 5AF8E0B195F8CC8C63FFF3CDAFFFFFFFFFFFE3C7B2FFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFEABEA0FFC9885EFF000000000000000000000000000000008484 8400DEE7E700D6D6D600B5B5B500CECECE00DEDEDE00DEDEDE00DEDEDE00D6D6 D600848484000000000000000000000000000000000000000000DEAD84000000 000000000000C69C9C00E7D6D600FFF7EF00FFEFE700FFFFDE00E7CEBD00BD94 8C00F7E7C600F7DEB500B584840000000000B86934FEF4DCC9FFE7A67BFFF9EC E1FFF9ECE1FFF9EDE3FFFCF4EEFFFDFAF7FFFDF7F3FFFAEDE5FFF7E7DBFFF7E5 D9FFF6E5D8FFDE9F75FFE4BDA3FFB36532FF000000007D563EC991715EC9BD80 58F8DFB292F8D4966CFFD49D79FFD0976FFFD6A381FFCD8D66FFCD8F67FFD099 73FFD19871FFC88A60FF07040136000000000000000000000000000000000000 0000F7EFE700FFE7DE00EFD6CE00EFD6CE00EFD6CE00E7DEDE004A4A42004A4A 42004A4A42004A4A42004A4A42004A4A42000000000000000000DEAD84000000 000000000000DECECE00CEADAD00E7D6D600FFEFE700E7CEC600C6A59C00C6A5 9400E7DEC600C6BDAD00B584840000000000B36532FAF5DDCCFFE7A77CFFFAF0 E8FFFAF0E8FFC98C64FFFAF0E9FFFDF8F3FFFEFAF8FFFCF4EFFFF9E9DFFFF7E7 DBFFF7E5D9FFE0A176FFE7C1A8FFB56633FF000000007C5339C9947662C9C590 6DF8E6C6ADF8F1F1F1F8D9C1B0F8F1F1F0F8F1F1F1F8EDE8E4F8EAE3DFF8B18F 79DE986647DE0000000000000000000000000000000000000000000000000000 0000DEB5B500FFE7DE00FFDECE00FFD6C600FFCEB500FFC6AD004A4A42007B94 EF002139AD00FFE7DE00FFE7DE006B6363000000000000000000E7B58C000000 00000000000000000000DECECE00C69C9C00AD7B7B00C69C9400D6BDB500BD84 7B00BD847B00BD847B00B584840000000000A55D2EF0F6DFD0FFE8A77CFFFCF6 F1FFFCF6F1FFC88B62FFFAF1E9FFFBF4EEFFFDFAF7FFFDF9F6FFFAF0E8FFF8E8 DDFFF7E6DBFFE1A278FFEFD5C2FFB46733FE000000007C5237C9947761C9CD99 75F8C79472F8C99A78F8CEA386F8C6916FF8C6926FF8C6936FF8C48E69F89768 48DE0502012F0000000000000000000000000000000000000000000000000000 0000DEB5B500FFE7DE00FFD6C600FFD6C600FFCEB500FFBDAD007B94EF002139 AD007B94EF002139AD00FFE7DE006B6363000000000000000000E7B58C000000 000000000000000000000000000000000000FFFFFF00FFFFFF00E7CECE00BD84 7B00EFB57300EFA54A00C6846B0000000000864B25D8F6DFD1FFE9A97EFFFEFA F6FFFDFAF6FFC88B62FFFBF3EEFFFBF1EAFFFCF6F2FFFEFBF8FFFCF6F1FFF9EC E2FFF8E7DBFFEED0B9FFECD0BCFFB06839F8000000007F563EC9977F6DC99E9E 9EC98D7C6EC99E9E9EC99E9E9EC99E9E9EC99E9E9EC9917662C97C543AC90000 0000000000000000000000000000000000000000000000000000000000000000 0000DEB5B500FFE7DE00FFD6C600FFD6C600FFCEB500FFBDAD004A4A4200FFE7 DE00FFE7DE002139AD007B94EF007B7363000000000000000000EFBD94000000 0000000000000000000000000000000000000000000000000000E7D6D600BD84 7B00FFC67300CE94730000000000000000004526139BF6E0D1FFF7E0D1FFFEFB F8FFFEFBF7FFFDF9F6FFFCF5F0FFFAF0EAFFFBF2EDFFFDF9F6FFFDFAF7FFFBF1 EBFFF6E7DDFEE4C9B6FBAC744FEC1B0F076300000000835C43C983614BC9815D 45C9856550C97F573FC97F5840C9815F47C9825E46C97C553BC90402002B0000 000000000000000000000000000000000000000000000000000000000000DEB5 B500FFE7DE00FFE7DE00FFDECE00FFD6C600FFCEB500FFBDAD004A4A4200FFE7 DE00FFE7DE00FFE7DE002139AD007B94EF000000000000000000EFBD9400FFF7 F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700E7D6CE00BD84 7B00CE9C840000000000000000000000000024140A713B211090784321CCA35C 2DEEB36532FAB86934FEBA6934FFBA6834FFBA6834FFBB6A37FFBC6C39FFBA6B 38FFA35C30EF764526CB130B0554000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000DEB5 B500DEB5B500DEB5B500DEB5B500F7BDB500F7BDB500FFFFFF004A4A42006B63 63006B6363006B6363007B7363002139AD000000000000000000EFBD9400DEAD 8400DEAD8400DEAD8400DEAD8400DEAD8400DEAD8400DEAD8400DEAD8400BD84 7B00000000000000000000000000000000000000000000000000B5848400B584 8400B5848400B5848400B5848400B5848400B5848400B5848400B5848400B584 8400B5848400B5848400B5848400000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000005ACEE70031BDE70031BD E700000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000C6A59C00FFEF D600F7E7C600F7DEBD00F7DEB500F7D6AD00F7D6A500F7CE9C00F7CE9400F7CE 9C00F7CE9C00F7D69C00B5848400000000000000000029ADD60031B5DE0021AD D600000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000005ACEE70094F7FF007BE7 F70063D6EF005ACEEF0042C6E70021B5DE0000ADDE0000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000C6A59C00FFEF DE00F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6A500EFCE9C00EFCE 9400EFCE9400F7D69C00B5848400000000000000000029ADD6009CDEEF0084EF FF004AC6E70021ADD60018A5C60018A5C60018A5C60000000000000000000000 000000000000000000000000000000000000000000005ACEE700ADFFFF00A5F7 FF009CF7FF0094F7FF008CEFFF0084E7F70063D6F7005ACEEF0042C6E70021B5 E70042C6E7000000000000000000000000000000000000000000187B9C00187B 9C00187B9C00187B9C00187B9C00187B9C00187B9C00187B9C00187B9C00187B 9C00187B9C00187B9C00187B9C00000000000000000000000000C6ADA500FFF7 E700FFE7D600F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6A500EFCE 9C00EFCE9400F7D69C00B5848400000000000000000029ADD60052BDE7009CFF FF0094FFFF0073DEF70073DEF70073DEF70073DEF7004AC6E70021ADD60018A5 C60000000000000000000000000000000000000000005ACEE700ADFFFF00ADFF FF00A5F7FF009CF7FF0094EFFF008CE7F70084E7F7007BE7F70073DEF7007BDE F7006BD6F7004AC6EF0031BDE7000000000000000000188CB500188CB500188C B500188CB500188CB500188CB500188CB500188CB500188CB500188CB500188C B500188CB500188CB500188CB500187B9C000000000000000000CEADA500FFF7 EF00FFEFDE00F7E7D600F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6AD00F7D6 A500EFCE9C00F7D69C00B5848400000000000000000029ADD60052BDE700ADFF FF008CF7FF008CEFFF008CEFFF008CEFFF0073DEF70073DEF70073DEF7004AC6 EF0021ADD600000000000000000000000000000000005ACEE700B5FFFF00ADFF FF00ADFFFF00A5F7FF009CF7FF0094EFFF008CE7F7007BDEEF007BE7F70073DE F70073DEF7006BD6F70031BDE70000000000319CBD0063CEFF00188CB5009CFF FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6 FF0039B5DE009CF7FF00188CB500187B9C000000000000000000CEB5AD00FFFF F700FFEFE700FFEFDE00F7E7D600F7E7CE00F7DEC600F7DEBD00F7D6B500F7D6 AD00F7D6A500F7D69C00B5848400000000000000000029ADD60029ADD600ADDE EF0094F7FF0094F7FF008CEFFF008CEFFF008CEFFF008CEFFF0073DEF70073DE F7004AC6EF00000000000000000000000000000000005ACEE700B5FFFF00ADFF FF00ADFFFF00ADFFFF00A5F7FF009CF7FF0094EFFF00008400006BD6D6007BDE F70073DEF7006BD6F70031BDE70000000000319CBD0063CEFF00188CB5009CFF FF007BE7FF007BE7FF007BE7FF007BE7FF007BE7FF007BE7FF007BE7FF007BDE FF0042B5DE009CFFFF00188CB500187B9C000000000000000000D6B5AD00FFFF FF00FFF7EF00FFEFE700FFEFDE00F7E7D600F7E7CE00F7DEC600F7DEBD00F7D6 B500F7D6AD00F7D6A500B5848400000000000000000029ADD60073DEF70029AD D6009CFFFF008CF7FF008CF7FF008CF7FF008CEFFF008CEFFF008CEFFF0073DE F70073DEF70018A5C6000000000000000000000000005ACEE700B5FFFF00ADFF FF00ADFFFF00ADFFFF00ADFFFF00A5F7FF009CF7FF008CE7F700008400007BE7 F7007BDEF70073DEF70031BDE70000000000319CBD0063CEFF00188CB5009CFF FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084EF FF004AB5DE00A5F7FF00188CB500187B9C000000000000000000D6BDB500FFFF FF00FFFFF700FFF7EF00FFEFE700FFEFDE00FFE7D600F7E7CE00F7DEC600F7DE BD00F7DEB500F7DEAD00B5848400000000000000000029ADD60094F7FF0029AD D600ADDEEF00A5EFF700A5EFF700A5F7FF008CEFFF008CEFFF008CEFFF0073DE F7000073080018A5C6000000000000000000000000005ACEE700ADFFFF00ADFF FF00ADFFFF00ADFFFF00ADFFFF00ADF7FF009CF7FF0094F7FF0000A521000084 00007BE7F70073DEF70031BDE70000000000319CBD0063CEFF00188CB5009CFF FF0094FFFF0094FFFF0094FFFF0094FFFF0094FFFF0094FFFF0094FFFF008CF7 FF0052BDE7009CFFFF00188CB500187B9C000000000000000000DEBDB500FFFF FF00FFFFFF00FFFFF700FFF7EF00FFEFE700FFEFDE00F7E7D600F7E7CE00F7DE C600F7DEBD00FFDEB500B5848400000000000000000029ADD6009CFFFF0073DE F70029ADD60018A5C60018A5C60018A5C600ADDEEF008CF7FF0084EFFF000073 08005AE78C000073080018A5C60000000000000000005ACEE700B5FFFF00ADFF FF00ADFFFF006BCEA50000940000ADFFFF00ADF7FF00ADF7FF0000AD21000084 000084E7F7007BE7F70031BDE70000000000319CBD006BD6FF00188CB5009CFF FF009CFFFF009CFFFF009CFFFF00A5F7FF009CFFFF009CFFFF009CFFFF009CFF FF0063CEFF009CFFFF00188CB500187B9C000000000000000000DEC6B500FFFF FF00FFFFFF00FFFFFF00FFFFF700FFF7EF00FFEFE700FFEFDE00FFE7D600F7E7 CE00F7E7C600F7DEB500B5848400000000000000000029ADD6009CFFFF0094F7 FF0073DEF70073DEF70073DEF7006BDEF70029ADD600ADDEEF000073080052D6 7B0042D66B0031C64A000073080000000000000000005ACEE700DEFFFF00CEFF FF00B5EFE700009C2100009C2100ADFFFF00ADF7FF000094000000AD21000084 00008CE7FF0084E7F70031BDE70000000000319CBD007BDEFF00188CB5000000 0000F7FFFF00F7FFFF00F7FFFF00F7FFFF00F7FFFF0000000000000000000000 000084D6F700F7FFFF00188CB500187B9C000000000000000000E7C6B500FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFF700FFF7EF00FFEFE700FFEFDE00FFEF DE00E7DEC600C6BDAD00B5848400000000000000000029ADD6009CFFFF0094F7 FF0094F7FF0094F7FF0094F7FF0073DEF70073DEF70029ADD60018A5C600108C 210031C64A00109C210018A5C60000000000000000005ACEE70042C6E70042C6 E700008400004ACE7300008C2100008C21000094000000BD2100008400000094 000094EFFF0084E7F70031BDE70000000000319CBD0084EFFF0084E7FF00188C B500188CB500188CB500188CB500188CB500188CB500188CB500188CB500188C B500188CB500188CB500188CB500000000000000000000000000E7C6B500FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFF700FFF7EF00F7E7D600C6A5 9400B5948C00B58C8400B5848400000000000000000029ADD600C6FFFF0094FF FF009CFFFF00D6FFFF00D6FFFF008CEFFF0094EFFF0073DEF70073DEF7000884 100018AD2900088410000000000000000000000000005ACEE7008CEFF70063CE C60021A5420073F7A5004AD6730031C65A0021C63100009C000000840000A5F7 FF009CF7FF008CEFFF0031BDE70000000000319CBD009CF7FF008CF7FF008CF7 FF008CF7FF008CF7FF008CF7FF00000000000000000000000000000000000000 0000107BA5000000000000000000000000000000000000000000EFCEBD00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7CECE00BD8C 7300EFB57300EFA54A00C6846B00000000000000000021ADD6009CDEEF00C6FF FF00C6FFFF009CDEEF0018ADD60018A5C60018A5C60018A5C60018A5C600088C 100008A51800000000000000000000000000000000005ACEE700B5FFFF000084 000063E794006BEF9C004AD67300008400000084000000840000ADF7FF00ADFF FF00A5F7FF009CF7FF0031BDE70000000000319CBD00000000009CFFFF009CFF FF009CFFFF009CFFFF0000000000188CB500188CB500188CB500188CB500188C B500107BA5000000000000000000000000000000000000000000EFCEBD00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7D6D600CE9C 7B00FFC67300CE9473000000000000000000000000000000000031B5DE0029AD D60018A5C60018A5C60000000000000000000000000000000000088C100008A5 180008841000000000000000000000000000000000005ACEE700BDFFFF0084E7 C6000084000042C65A0031C64A00008400008CC6AD00C6EFF700C6E7F700ADE7 F700B5EFFF009CEFF70031BDE7000000000000000000319CBD00000000000000 000000000000F7FFFF00319CBD00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000EFCEB500FFF7 F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700E7D6CE00C694 7B00CE9C84000000000000000000000000000000000000000000000000000000 000000000000000000000000000000730800087B0800088C1000088C1000087B 080000000000000000000000000000000000000000005ACEE700A5F7FF00B5FF FF00A5F7E70042AD630021A5310000840000008400005ACEE7005ACEE7005ACE E7005ACEE7005ACEE7005ACEE700000000000000000000000000319CBD00319C BD00319CBD00319CBD0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000EFC6B500EFCE BD00EFCEBD00EFCEBD00EFCEBD00EFCEBD00EFCEBD00EFCEBD00DEBDB500BD84 7B00000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000005ACEE7005ACE E7005ACEE7005ACEE7005ACEE700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000900200000100010000000000801400000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000FFFFFFFFE000E000E0010000E000E000 E0010000E000E000C0010000E000E00080010000E000E0000001000000000000 0001000000000000000100000000000000010000000100010001000000070007 8001000000070007C001000000070007E001000100070007E00301800000000F E0078380038003FFFFFFFF80878087FFFE00FFFF0000F801FE008C000000E000 F80082000000C000F819800000008000F819800900008000F800800100000000 F800800100000000F800800000000000F801E00000000000F80F900100000000 F81FF00100000000F83FE02700008001F87F803F00008001F8FFF1BF0000C003 FFFFFBBF0000E007FFFFFBFF0000F81FFFFFFC07FC078001C007F003F0038001 8003C001C0018000800300000000800080030000000080008003000000008000 8003000000008001800300000000800080000000000080018000000000008001 8000000000008001800000000000800180008000800080018000C000C0008001 C000F000F0008003FE00FC01FC3F8007FC01FFC1FC070000F000FF80F0030000 C0008000C0010000000080000000000000008000000000000000800000000000 0000800100000000000080010000000000008001000000000000800100000000 000080010000000000008001000000008001800180010000C003FFFFC0030000 F00FFFFFF00F0000FC3FFFFFFC3F0000FE030000FC3FFC01FC000000F00FF000 F0000000C003C000800000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000001000000000000 00010000000000000001000000000000F001000000008001F0030000C003C003 F0030000F00FF00FFFFF0000FC3FFC3FF81F00000000FF0FF00F00000000FC03 F00F00000000F801F00F00000000F00080010000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000001 00000000000000038001000000000007F00F000000000007F00F000000000007 F00F000000000007F81F000000000007C001FFFFFFFFFFE7C00180808000FFE3 C00180008000FF81C00180008000FF00C00180008000FE00C00180008000F601 C00180008000FA23C00180008000D067C00180008000E05FC00180008000E01F C00180008000807FC00180008000E01FC0018000800081FFC003C081C001EDFF C007FFFFFFFFEDFFC00FFFFFFFFFFFFF80039FF7FFFFFDFF80030FE7001FFEFF 800307C0F00FFE3F800383C0F007EE0F8003C1E7F803F0078003E107FC00F002 8003F003FE00F0018003F801FF00E0078003F801FF8090078003F800FFC0F001 8003F800FFC0E0278003F800FFE0803F8007F801FFF0F1BF800FFC01FFF8FBBF 801FFE03FFFCFBFF803FFF0FFFFFFFFF000081FF1FFF1FFF0000800F0FFF0FFF 0000800007FF07FF0000800083FF83FF00008000000300030000001E00030003 0000000F000300030000800F000300030000000F000300030000000F00030003 0000000700030003000000030003000300008003000300030000C00100030003 0000C083000300030000C0C70003000300000000E7E3FFFF00000000C1C18EFF 00000000E087807F00000000E007800700000000F007800700000000F81F8003 00000000A0078001000000008000800100000000000080000000000000008000 00000000FC3F800000000000FC3F800000000000FC1F800000000000FC3FC1C0 00000000FC1FFFF300000000FE7FFFFF0000C07F80011FFF0000E0FB80010FFF 0000F1FF800107FF0000D17E800183FF0000C07B800100030000E0FF80010003 0000E0FD800100030000F1FF800100030000E0FB800100030000E0FF80010003 0000F1FF800100030000F1FF800100030000F1FF800100030000FBFF80030003 0000FFFF800700030000FFFF800F0003F07FF07FFFFFFFFFF07FF07FFFFF8000 507F507FFFFF8000F07FF07FC0078000707F707FDFF78000FFE0FFE0DDF78000 7FE07FE0D8F78000FD40FD40D07780007FE07FE0D2378000FDE0FDE0D7178000 707F707FDF978000F07FF07FDFD78000507F507FDFF78000F07FF07FC007C001 707F707FFFFFFFFFFFFFFFFFFFFFFFFFF80FFFFFFFFF86A1F007E00FFFFF8000 FFF78003FFFF0000FFFB0001FFFF0000C003000180010000C007000180018001 C00F00018001C003C00F00018001E007C00F000380010000C007000780012000 E00780038001F00FF107E0018001C003FF3FFF8080018401FF1FFFC0C0039E39 FFCFFFE0FFFFFC3DFFC7FFF0FFFFF99FFFFFFFFFFFFFE3CFFF7FFEFFFFFF8003 FE7FFE7FFFCF8003FC7FFE3FFF078003F87FFE1FF807C003F001800FE003E007 E00180078003E007C00180037001E00780018001C001F007C0018003B801F00F E0018007E003F81FF001800FDC07F81FF87FFE1FF1FFF81FFC7FFE3FE7FFF81F FE7FFE7FEFFFF83FFF7FFEFFFFFFFC3F87FF80018001FFFF80FF00000000FFFF 803F00000000F93F801F00000000F93F800F00000000F93F800F00000000F93F 800700000000F93F800100000000F13F800000000000E13F800000000000C13F 800800000000C13F800F00000000C13F800F00000000E00F800F00000000F00F E01F00000000FFFFFFFF80018001FFFF0000FFFF801FFFC000008000C03F0C49 00008000E07F1C4900008000C03F80C900008000801F80E100008000000FC9F3 000080000007C1FF000080008003E23000008000C003E23800008000E003E301 00008000F007F78100008000F803FFC900008000FC01FFE100008000FFE0FFF1 0000C001FFF0FFF90000FFFFFFF9FFFDFBC1FFFF00000000FD41800300000000 FBC1800300000000FFFF800300000000FBC1800300000000FD41800100000000 FBC1800300000000FFFF800300000000001F800100000000001F800100000000 001F800100000000001F800300000000001F800100000000001F800300000000 003FF03F000000008FFFFFFF00000000FFFFFFFFF81FFE7F0000FC3BF81FFC3F 0000F001F81FFC3F0000C001F81FC43F00008001FC3F803F00000001FC3F8001 00000001FC3FF0000000C003FC3F80010000F001FC3F803F0000E021FC3EC43F 000080F3981CFC3F000081FD0000FC3F000181F80001E43F01FF81F00003C033 83FF87F10007C003FFFF9FFB981FC0070000B801C001FFFF00000000C0010000 00008000C001000000008000C001000000000000C001000000000000C0010000 00000000C001000000000000C001000000000000C001000000008000C0010000 00008001C00100000000E00FC00100000000E01FC00100010000E01FC00301FF 0000E01FC00783FF0000F03FC00FFFFFFFFFFFFFFFFF00000000FFFFFFFF0000 7FFEFFFFEFFD00006A22B76F876F00006AEEB76F836B0000666EB76FA3670000 6AEE0001000100006622DBB7D88700007FFEDBB7D81700002AAA000100010000 0000DDBBDC1B00000000EDDBE8CB00001FFFEDDBE1C30000E0FFFFFFC3F30000 FF07FFFFC7FD0000FFF9FFFFFFFF0000F9FFFFFFFFFFFCFFF67FFFFFFFFFF87F E99FFFFFFFFFF87FD66700070007FC7FAF99FFFFFFFFFFFFD9E6DFFFEFFFFC7F B679CE07CE07F87FCF9E06078207F83FDE6503FF03FFFC1FBC3906008200FE0F C81ECE00CE00E707F67DDFFFEFFFC387FC7BFFFFFFFFC007FE7700070007E007 FE4FFFFFFFFFF00FFFFFFFFFFFFFF81FFFFF000000000000FFFF000000000000 87FF000000000000A7FF00000000000097FF0000000000008000000000000000 DFFE00000000000080FE000000000000A7FE000000000000913E000000000000 A7FE000000000000913E000000000000A7FE000000000000809E000000000000 DFFE000000000000C00000000000000000000000FFFF00000000000080FF0000 00000000BEFF000000000000A23F000000000000BE80000000000000A28E0000 00000000BEAE000000000000A2AE000000000000BEAE00000000000080AE0000 00000000CFAE000000000000C02E000000000000DBEE000000000000D80E0000 00000000C000000000000000C0000000000000000000FFFF000000000000FFFF 000000000000E003000000000000E003000000000000E003000000000000E003 000000000000E003000000000000E003000000000000E003000000000000E003 000000000000E003000000000000E003000000000000E003000000000000FFFF 000000000000FFFF000000000000FFFFFFFFFFFFFFFFFFFFF7EF8DFFFFFFFFFF E3C782FFF7F1FF8FC183807FF3FBFF838001800FF1FBFF81C0038007F0FBFF80 E0078002F07BFF81F00F8001F03BC003F00FE007F01BC00FE0079007F03BC01F C003F001F07BC01F8001E027F0FBC01FC183803FF1FBC01FE3C7F1BFF3FBC01F F7EFFBBFF7F1C01FFFFFFBFFFFFFC01FF81FFFFFFFFFFFFFE007FC3FFFFFFFFF C003FC3FFFFFF8FF8001FC3FFFFFF87F8001FC3FFFFFF83F0000FC3FFFFFF81F 000080018001F80F000080018001F807000080018001F807000080018001F80F 0000FC3FFFFFF81F8001FC3FFFFFF83F8001FC3FFFFFF87FC003FC3FFFFFF8FF E007FC3FFFFFFFFFF81FFFFFFFFFFFFFFE7FFFFFFF3FF81FF07F8FFFFE3FE007 C001807FFC3FC003C001800FFC3F8001C0018007FC3F8001C0018007FC3F0000 C0018003FC3F0000C0018003FC3F0000C0018001F81F0000C0018001F00F0000 C0018001E0070000C0018003C0038001C001800780018001C001E3EF0000C003 F001FFFFFFFFE007FC7FFFFFFFFFF81FFFFFFFFE9FFFFFFFFFFFFFFC0FFF3FFF 8007FFF907FFD8038007FE7383FFB8038007FC07C1FF1FFF8007FC07E00FFFFF 8007FC07F0031FFF8007F807F801B8038007F007E001D80380078007C0003FFF 8007003FC000FFFF8007007F80001FFF800700FF0001B803800701FFC0013803 FFFF81FFC203BFFFFFFFC1FFE00FFFFFF81FF8FFFFFFC001E007F01FFE3FC001 C003E003FC0FC0018001C000F803C00180018000F000C00100008000E000C001 00008000C000C001000080008000C001000080008000C001000080008001C001 000080018003C001800180038007C0018001C007800FC001C003E01F001FC003 E007F01F063FC007F81FF93FCFFFC00FC001F00F0000F81FC001E0030000E007 C001C0010000C003C001800100008001C001800000008001C001000000000000 800000000000000080000000000000008000000000000000C001000000000000 C001000000000000C001000100008001C001800100008001C00180030000C003 C001C0070000E007C001E00F0000F81F8003FFFFFFFFFFFFBFFBF01FF3FFFFFF FEFFF83FF1FFFC3FFC7FFC7FF0FFC00FF83FFEFFF00FC007F01FBFFBC0038013 FFFF800380018219FFFFFFFF00008431FFFF800300000071FFFFBFFB00000033 F01FFEFF000030E3F83FFC7F00000E67FC7FF83F8001FF07FEFFF01FD003FFCF BFFBFFFFF00FFFFF8003FFFFFFFFFFFF0000FFFFFFFF00000000FFFFFFFF0000 0000EFFFFEFD00000000EFFFCDB600000000EC1FCDB600000000E19FCDB60000 0000EC1FCD8E00000000EFFFCDFE00000000EC1F86FD00000000E19FCFFF0000 0000EC1FCFFF00000000EFFFCFFF0000000083FFC9FF00000000B3FFE3FF0000 000083FFFFFF00000000FFFFFFFF00000000F81FFFFFFFFF0000E0078003FF9F 0000C0038003FC03000080018003FC03000080018003F800000004208003F800 000002408003F80000000180A003F80100000180A003800300000240A0038003 00000420A003801F00008001BC03001F00008001BE03001F0000C003BF87803F 0000E007800FC07F0000F81F801FE0FF9FFB83FF83FFFFFF0FF9C1FFC1FFEFFF 07C0E10FE10FE3FF83C0F003F003E1FFC1F9F801D801F0FFE10BF80DD805F83F F003F818C010FC1FF801F800C000FE0FF805F800E000F003F800F801F801F003 F800B401B401F001F800B603B603F801F80184078407FE03FD01B76BB763FF81 FE03CEE7CEE7FFE0FF0FFFFFFFFFFFF8F801E001FFFC9FFFF801C0019FF90FFF F80180018FF307FFF801800187E783FF80018001C3CFC1FF80018001F11FE10F 80018001F83FF00380018001FC7FF80183818181F83FF805838181E3F19FF800 83E38003E3CFF80080079003C7E7F800B81F80038FFBF801B81F80031FFFFD01 BE3FC0073FFFFE03807FE00FFFFFFF0FFDC700000000FFFFF00300000000F9CF C40100000000F087100100000000F6B7000100000000F2A7000100000000F007 000100000000F80F800100000000FE3FC00300000000FC1FE00700000000FC1F F00F00000000F88FF03F00000000F9CFF03F00000000F1C7F03F00000000F3E7 E03F00000000F7F7E07F00000000FFFF00000000FDC7C00100000000F003C001 00000000C4018001000000001001C001000000000001C001000000000001C001 000000000001C001000000008001D00100000000C003D00100000000E007D801 00000000F000D80100000000F000DC0100000000F000DF0100000000F000DFC3 00000000E000C00700000000E000C00FC001FFFF8FFFFFFFC0018FFF807FFFFF C001807F8007C001C001800F80018000C001800780010000C001800780010000 C001800380010000C001800380010000C001800180010000C001800180011070 C001800180010001C0018003800101F7C001800780014207C003C3C78001B9FF C007FE0F8001C3FFC00FFFFFC1FFFFFF00000000000000000000000000000000 000000000000} end object SynWebEsSyn: TSynWebEsSyn ActiveHighlighterSwitch = False Engine = SynWebEngine Left = 616 Top = 272 end object SynWebPhpPlainSyn: TSynWebPhpPlainSyn ActiveHighlighterSwitch = False Engine = SynWebEngine Left = 528 Top = 272 end object SynGeneralSyn: TSynGeneralSyn DefaultFilter = 'Text Files(*.txt,*.*)|*.txt;*.*' Options.AutoDetectEnabled = False Options.AutoDetectLineLimit = 0 Options.Visible = False DetectPreprocessor = False SpaceAttri.Foreground = clSilver Left = 264 Top = 328 end object SynJSONSyn: TSynJSONSyn Options.AutoDetectEnabled = False Options.AutoDetectLineLimit = 0 Options.Visible = False Left = 264 Top = 272 end end
57.896163
116
0.75359
8336c82db9aca1a3b6b143b62106d1fc8410589d
406
dpr
Pascal
delphi/D3DRaster.dpr
VincentGsell/GS.Demos.3DRasterStandAlone
a670c7302906487a880271b959910f4a27ff66b0
[ "MIT" ]
2
2020-05-13T15:15:21.000Z
2020-10-25T07:53:55.000Z
delphi/D3DRaster.dpr
VincentGsell/GS.Demos.3DRasterStandAlone
a670c7302906487a880271b959910f4a27ff66b0
[ "MIT" ]
null
null
null
delphi/D3DRaster.dpr
VincentGsell/GS.Demos.3DRasterStandAlone
a670c7302906487a880271b959910f4a27ff66b0
[ "MIT" ]
1
2020-10-25T07:54:05.000Z
2020-10-25T07:54:05.000Z
program D3DRaster; uses Vcl.Forms, D3DRaster.fmain in 'D3DRaster.fmain.pas' {Form1}, GS.SoftwareRaster3D.ExempleStandAlone in '..\common\GS.SoftwareRaster3D.ExempleStandAlone.pas'; {$R *.res} begin {$IFDEF DEBUG} ReportMemoryLeaksOnShutdown := true; {$ENDIF} Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end.
21.368421
97
0.748768