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
83d7d0d76ffaaad2ddacf9ef6eaa810c186fe80e
1,159
pas
Pascal
example/kruskal.pas
ZubinGou/pas2c
dba590cc6575d266eca92a1f46b798cb767279ff
[ "Apache-2.0" ]
3
2022-01-01T08:14:38.000Z
2022-03-27T02:31:32.000Z
example/kruskal.pas
ZubinGou/pas2c
dba590cc6575d266eca92a1f46b798cb767279ff
[ "Apache-2.0" ]
null
null
null
example/kruskal.pas
ZubinGou/pas2c
dba590cc6575d266eca92a1f46b798cb767279ff
[ "Apache-2.0" ]
1
2021-06-07T08:14:00.000Z
2021-06-07T08:14:00.000Z
{采用并查集实现最小生成树} Program kruskal (input,output); var a, b, v, p : array[1..100] of integer; n, m, i, ans, tot, x, y : integer; procedure sort(l,r : integer); var i, j, x, y : integer; begin i := l; j := r; x := v[(l+r) div 2]; while i <= j do begin while v[i] < x do i := i+1; while x < v[j] do j := j-1; if not (i > j) then begin y := v[i]; v[i] := v[j]; v[j] := y; y := a[i]; a[i] := a[j]; a[j] := y; y := b[i]; b[i] := b[j]; b[j] := y; i := i+1; j := j-1; end; end; if l < j then sort(l,j); if i < r then sort(i,r); end; function doit(x : integer) : integer; begin if p[x] = x then begin ans := x; doit := x; end else begin p[x] := ans; doit := doit(p[x]); end; end; begin read(n,m); for i := 1 to m do read(a[i], b[i], v[i]); sort(1, m); for i := 1 to n do p[i] := i; for i := 1 to m do begin x := doit(a[i]); y := doit(b[i]); if (x <> y) then begin p[x] := y; tot := tot+v[i]; end; end; write(tot); end. { 6 15 0 1 4 0 2 4 1 2 2 1 0 4 2 0 4 2 1 2 2 3 3 2 5 2 2 4 4 3 2 3 3 4 3 4 2 4 4 3 3 5 2 2 5 4 3 ans: 10 }
15.662162
44
0.451251
f109549a551220cba1cd4b018279c124bb670904
2,117
pas
Pascal
examples/delphi/deprecated/example3-hellogui/ueditor.pas
DrPeaboss/vst24pas
0e3761c5add4c24600cf44ec4ec111e2a742148c
[ "MIT" ]
1
2022-02-22T17:20:19.000Z
2022-02-22T17:20:19.000Z
examples/delphi/deprecated/example3-hellogui/ueditor.pas
DrPeaboss/vst24pas
0e3761c5add4c24600cf44ec4ec111e2a742148c
[ "MIT" ]
null
null
null
examples/delphi/deprecated/example3-hellogui/ueditor.pas
DrPeaboss/vst24pas
0e3761c5add4c24600cf44ec4ec111e2a742148c
[ "MIT" ]
null
null
null
unit ueditor; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Menus, Vcl.ExtCtrls, vst24pas.gui; type TFormGain = class(TForm) CheckBoxHiFPS: TCheckBox; LabelGain: TLabel; ScrollBarGain: TScrollBar; PopupMenuReset: TPopupMenu; MenuItemReset: TMenuItem; procedure MenuItemResetClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); procedure FormHide(Sender: TObject); procedure CheckBoxHiFPSClick(Sender: TObject); procedure ScrollBarGainChange(Sender: TObject); private FLocked: boolean; Timer: TTimer; procedure TimerTimer(Sender: TObject); public Editor: TGuiEditor; end; implementation uses vst24pas.utils, math; {$R *.dfm} procedure TFormGain.CheckBoxHiFPSClick(Sender: TObject); begin if CheckBoxHiFPS.Checked then Timer.Interval := 20 else Timer.Interval := 40; end; procedure TFormGain.FormCreate(Sender: TObject); begin LabelGain.Caption := Format('Gain %.3fdB %.3f', [VstAmp2dB(1), 1.0]); Timer := TTimer.Create(self); Timer.Interval := 40; Timer.OnTimer := TimerTimer; Timer.Enabled := False; end; procedure TFormGain.FormHide(Sender: TObject); begin Timer.Enabled := False; end; procedure TFormGain.FormShow(Sender: TObject); begin Timer.Enabled := True; end; procedure TFormGain.MenuItemResetClick(Sender: TObject); begin ScrollBarGain.Position := 500; end; procedure TFormGain.ScrollBarGainChange(Sender: TObject); var param: single; begin param := ScrollBarGain.Position / 1000; if not FLocked then Editor.GetPlugin.SetParameterAutomated(0, param); LabelGain.Caption := Format('Gain %.3fdB %.3f', [VstAmp2dB(2 * param), 2 * param]); end; procedure TFormGain.TimerTimer(Sender: TObject); begin FLocked := True; ScrollBarGain.Position := Round(Editor.GetPlugin.GetParameter(0) * 1000); FLocked := False; end; end.
23.786517
86
0.700047
6a548feb4c130cdbd274867800578ec586f06061
1,818
pas
Pascal
Catalogos/ProductosDocumentosDM.pas
alexismzt/SOFOM
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
[ "Apache-2.0" ]
null
null
null
Catalogos/ProductosDocumentosDM.pas
alexismzt/SOFOM
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
[ "Apache-2.0" ]
51
2018-07-25T15:39:25.000Z
2021-04-21T17:40:57.000Z
Catalogos/ProductosDocumentosDM.pas
alexismzt/SOFOM
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
[ "Apache-2.0" ]
1
2021-02-23T17:27:06.000Z
2021-02-23T17:27:06.000Z
unit ProductosDocumentosDM; interface uses System.SysUtils, System.Classes, _StandarDMod, System.Actions, Vcl.ActnList, Data.DB, Data.Win.ADODB; type TdmProductosDocumentos = class(T_dmStandar) adodsMasterIdProductoDocumento: TAutoIncField; adodsMasterIdProducto: TIntegerField; adodsMasterIdDocumento: TIntegerField; adodsMasterIdProductoDocumentoTipo: TIntegerField; adodsMasterDescripcion: TStringField; adodsMasterFechaEmision: TDateTimeField; adodsTipo: TADODataSet; adodsDocumento: TADODataSet; actUpdateFile: TAction; adodsMasterDocumento: TStringField; adodsMasterTipo: TStringField; procedure DataModuleCreate(Sender: TObject); procedure actUpdateFileExecute(Sender: TObject); private { Private declarations } public { Public declarations } end; implementation {%CLASSGROUP 'Vcl.Controls.TControl'} uses DocumentosDM, ProductosDocumentosForm; {$R *.dfm} procedure TdmProductosDocumentos.actUpdateFileExecute(Sender: TObject); var dmDocumentos: TdmDocumentos; Id: Integer; begin inherited; dmDocumentos := TdmDocumentos.Create(nil); dmDocumentos.FileAllowed := faAll; Id := adodsMasterIdDocumento.AsInteger; if Id <> 0 then begin dmDocumentos.Edit(Id); adodsDocumento.Requery(); end else begin Id := dmDocumentos.Add; if Id <> 0 then begin adodsDocumento.Requery(); adodsMasterIdDocumento.AsInteger := Id; end; end; dmDocumentos.Free; end; procedure TdmProductosDocumentos.DataModuleCreate(Sender: TObject); begin inherited; gGridForm := TfrmProductosDocumentos.Create(Self); gGridForm.DataSet := adodsMaster; TfrmProductosDocumentos(gGridForm).UpdateFile := actUpdateFile; end; end.
24.90411
79
0.727723
f168dd1a9f0f8fdc0bdeda5cd5dceb5daa62b9ea
5,944
dfm
Pascal
Packages/Order Entry Results Reporting/CPRS/CPRS-Chart/Consults/fConsMedRslt.dfm
rjwinchester/VistA
6ada05a153ff670adcb62e1c83e55044a2a0f254
[ "Apache-2.0" ]
72
2015-02-03T02:30:45.000Z
2020-01-30T17:20:52.000Z
CPRSChart/OR_30_423_SRC/CPRS-chart/Consults/fConsMedRslt.dfm
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
80
2016-04-19T12:04:06.000Z
2020-01-31T14:35:19.000Z
CPRSChart/OR_30_423_SRC/CPRS-chart/Consults/fConsMedRslt.dfm
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
67
2015-01-27T16:47:56.000Z
2020-02-12T21:23:56.000Z
inherited frmConsMedRslt: TfrmConsMedRslt Left = 468 Top = 172 BorderStyle = bsDialog Caption = 'Select Medicine Result' ClientHeight = 222 ClientWidth = 500 Position = poScreenCenter OnCreate = FormCreate ExplicitWidth = 506 ExplicitHeight = 250 PixelsPerInch = 96 TextHeight = 13 object pnlBase: TORAutoPanel [0] Left = 0 Top = 0 Width = 500 Height = 222 Align = alClient BevelOuter = bvNone TabOrder = 0 object pnlAction: TPanel Left = 0 Top = 128 Width = 500 Height = 53 Align = alBottom BevelOuter = bvNone TabOrder = 1 DesignSize = ( 500 53) object lblDateofAction: TOROffsetLabel Left = 134 Top = -2 Width = 112 Height = 20 Caption = 'Date/time of this action' HorzOffset = 2 Transparent = False VertOffset = 6 WordWrap = False end object lblActionBy: TOROffsetLabel Left = 267 Top = -2 Width = 215 Height = 19 Caption = 'Action by' HorzOffset = 2 Transparent = False VertOffset = 6 WordWrap = False end object cmdDetails: TButton Left = 15 Top = 23 Width = 75 Height = 21 Caption = 'Show Details' TabOrder = 0 OnClick = cmdDetailsClick end object calDateofAction: TORDateBox Left = 131 Top = 23 Width = 116 Height = 21 TabOrder = 1 Text = 'Now' DateOnly = False RequireTime = False Caption = 'Date/time of this action' end object cboPerson: TORComboBox Left = 267 Top = 23 Width = 221 Height = 21 Anchors = [akLeft, akTop, akRight] Style = orcsDropDown AutoSelect = True Caption = 'Action by' Color = clWindow DropDownCount = 8 ItemHeight = 13 ItemTipColor = clWindow ItemTipEnable = True ListItemsOnly = True LongList = True LookupPiece = 2 MaxLength = 0 Pieces = '2,3' Sorted = False SynonymChars = '<>' TabOrder = 2 TabStop = True Text = '' OnNeedData = NewPersonNeedData CharsNeedMatch = 1 end end object pnlMiddle: TPanel Left = 0 Top = 0 Width = 500 Height = 128 Align = alClient TabOrder = 0 object SrcLabel: TLabel Left = 1 Top = 1 Width = 498 Height = 16 Align = alTop AutoSize = False Caption = 'Select medicine result:' ExplicitLeft = 12 ExplicitTop = 6 ExplicitWidth = 145 end object lstMedResults: TCaptionListView Left = 1 Top = 17 Width = 498 Height = 110 Margins.Left = 8 Margins.Right = 8 Align = alClient Columns = < item Caption = 'Type of Result' Width = 180 end item Caption = 'Date of Result' Tag = 1 Width = 100 end item Caption = 'Summary' Tag = 2 Width = 160 end> HideSelection = False HoverTime = 0 IconOptions.WrapText = False ReadOnly = True RowSelect = True ParentShowHint = False ShowWorkAreas = True ShowHint = True SmallImages = ImageList1 TabOrder = 0 ViewStyle = vsReport AutoSize = False Caption = 'Select medicine result' Pieces = '2,3,4' end end object pnlbottom: TPanel Left = 0 Top = 181 Width = 500 Height = 41 Align = alBottom BevelOuter = bvNone TabOrder = 2 object pnlButtons: TPanel Left = 315 Top = 0 Width = 185 Height = 41 Align = alRight BevelOuter = bvNone TabOrder = 1 object cmdOK: TButton Left = 11 Top = 9 Width = 75 Height = 21 Caption = 'OK' Default = True TabOrder = 0 OnClick = cmdOKClick end object cmdCancel: TButton Left = 99 Top = 9 Width = 75 Height = 21 Cancel = True Caption = 'Cancel' TabOrder = 1 OnClick = cmdCancelClick end end object ckAlert: TCheckBox Left = 134 Top = 12 Width = 79 Height = 17 Caption = 'Send alert' TabOrder = 0 OnClick = ckAlertClick end end end inherited amgrMain: TVA508AccessibilityManager Left = 8 Top = 40 Data = ( ( 'Component = pnlBase' 'Status = stsDefault') ( 'Component = frmConsMedRslt' 'Status = stsDefault') ( 'Component = pnlAction' 'Status = stsDefault') ( 'Component = pnlMiddle' 'Status = stsDefault') ( 'Component = pnlbottom' 'Status = stsDefault') ( 'Component = pnlButtons' 'Status = stsDefault') ( 'Component = cmdOK' 'Status = stsDefault') ( 'Component = cmdCancel' 'Status = stsDefault') ( 'Component = ckAlert' 'Status = stsDefault') ( 'Component = cmdDetails' 'Status = stsDefault') ( 'Component = calDateofAction' 'Text = Date/Time of this action. Press the enter key to access.' 'Status = stsOK') ( 'Component = cboPerson' 'Status = stsDefault') ( 'Component = lstMedResults' 'Status = stsDefault')) end object ImageList1: TImageList Height = 12 Width = 12 Left = 8 end end
22.861538
73
0.505215
f101df3896cce5afad081a26dc0c8be261de3ae9
17,643
pas
Pascal
Borland/CBuilder5/Source/PNG/pngzlib.pas
TrevorDArcyEvans/DivingMagpieSoftware
7ffcfef653b110e514d5db735d11be0aae9953ec
[ "MIT" ]
1
2021-05-27T10:27:25.000Z
2021-05-27T10:27:25.000Z
Borland/CBuilder5/Source/PNG/pngzlib.pas
TrevorDArcyEvans/Diving-Magpie-Software
7ffcfef653b110e514d5db735d11be0aae9953ec
[ "MIT" ]
null
null
null
Borland/CBuilder5/Source/PNG/pngzlib.pas
TrevorDArcyEvans/Diving-Magpie-Software
7ffcfef653b110e514d5db735d11be0aae9953ec
[ "MIT" ]
null
null
null
unit PNGZLIB; interface uses Sysutils, Classes; const ZLIB_VERSION = '1.1.3'; type TZAlloc = function (opaque: Pointer; items, size: Integer): Pointer; TZFree = procedure (opaque, block: Pointer); TZCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax); {** TZStreamRec ***********************************************************} TZStreamRec = packed record next_in : PChar; // next input byte avail_in : Longint; // number of bytes available at next_in total_in : Longint; // total nb of input bytes read so far next_out : PChar; // next output byte should be put here avail_out: Longint; // remaining free space at next_out total_out: Longint; // total nb of bytes output so far msg : PChar; // last error message, NULL if no error state : Pointer; // not visible by applications zalloc : TZAlloc; // used to allocate the internal state zfree : TZFree; // used to free the internal state opaque : Pointer; // private data object passed to zalloc and zfree data_type: Integer; // best guess about the data type: ascii or binary adler : Longint; // adler32 value of the uncompressed data reserved : Longint; // reserved for future use end; {** TCustomZStream ********************************************************} TCustomZStream = class(TStream) private FStream : TStream; FStreamPos : Integer; FOnProgress: TNotifyEvent; FZStream : TZStreamRec; FBuffer : Array [Word] of Char; protected constructor Create(stream: TStream); procedure DoProgress; dynamic; property OnProgress: TNotifyEvent read FOnProgress write FOnProgress; end; {** TZCompressionStream ***************************************************} TZCompressionStream = class(TCustomZStream) private function GetCompressionRate: Single; public constructor Create(dest: TStream; compressionLevel: TZCompressionLevel = zcDefault); destructor Destroy; override; function Read(var buffer; count: Longint): Longint; override; function Write(const buffer; count: Longint): Longint; override; function Seek(offset: Longint; origin: Word): Longint; override; property CompressionRate: Single read GetCompressionRate; property OnProgress; end; {** TZDecompressionStream *************************************************} TZDecompressionStream = class(TCustomZStream) public constructor Create(source: TStream); destructor Destroy; override; function Read(var buffer; count: Longint): Longint; override; function Write(const buffer; count: Longint): Longint; override; function Seek(offset: Longint; origin: Word): Longint; override; property OnProgress; end; {** zlib public routines ****************************************************} {***************************************************************************** * ZCompress * * * * pre-conditions * * inBuffer = pointer to uncompressed data * * inSize = size of inBuffer (bytes) * * outBuffer = pointer (unallocated) * * level = compression level * * * * post-conditions * * outBuffer = pointer to compressed data (allocated) * * outSize = size of outBuffer (bytes) * *****************************************************************************} procedure ZCompress(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; level: TZCompressionLevel = zcDefault); {***************************************************************************** * ZDecompress * * * * pre-conditions * * inBuffer = pointer to compressed data * * inSize = size of inBuffer (bytes) * * outBuffer = pointer (unallocated) * * outEstimate = estimated size of uncompressed data (bytes) * * * * post-conditions * * outBuffer = pointer to decompressed data (allocated) * * outSize = size of outBuffer (bytes) * *****************************************************************************} procedure ZDecompress(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer = 0); {** string routines *********************************************************} function ZCompressStr(const s: String; level: TZCompressionLevel = zcDefault): String; function ZDecompressStr(const s: String): String; type EZLibError = class(Exception); EZCompressionError = class(EZLibError); EZDecompressionError = class(EZLibError); implementation {** link zlib code **********************************************************} {$L deflate.obj} {$L inflate.obj} {$L infblock.obj} {$L inftrees.obj} {$L infcodes.obj} {$L infutil.obj} {$L inffast.obj} {$L trees.obj} {$L adler32.obj} {***************************************************************************** * note: do not reorder the above -- doing so will result in external * * functions being undefined * *****************************************************************************} const {** flush constants *******************************************************} Z_NO_FLUSH = 0; Z_PARTIAL_FLUSH = 1; Z_SYNC_FLUSH = 2; Z_FULL_FLUSH = 3; Z_FINISH = 4; {** return codes **********************************************************} Z_OK = 0; Z_STREAM_END = 1; Z_NEED_DICT = 2; Z_ERRNO = (-1); Z_STREAM_ERROR = (-2); Z_DATA_ERROR = (-3); Z_MEM_ERROR = (-4); Z_BUF_ERROR = (-5); Z_VERSION_ERROR = (-6); {** compression levels ****************************************************} Z_NO_COMPRESSION = 0; Z_BEST_SPEED = 1; Z_BEST_COMPRESSION = 9; Z_DEFAULT_COMPRESSION = (-1); {** compression strategies ************************************************} Z_FILTERED = 1; Z_HUFFMAN_ONLY = 2; Z_DEFAULT_STRATEGY = 0; {** data types ************************************************************} Z_BINARY = 0; Z_ASCII = 1; Z_UNKNOWN = 2; {** compression methods ***************************************************} Z_DEFLATED = 8; {** return code messages **************************************************} _z_errmsg: array[0..9] of PChar = ( 'need dictionary', // Z_NEED_DICT (2) 'stream end', // Z_STREAM_END (1) '', // Z_OK (0) 'file error', // Z_ERRNO (-1) 'stream error', // Z_STREAM_ERROR (-2) 'data error', // Z_DATA_ERROR (-3) 'insufficient memory', // Z_MEM_ERROR (-4) 'buffer error', // Z_BUF_ERROR (-5) 'incompatible version', // Z_VERSION_ERROR (-6) '' ); ZLevels: array [TZCompressionLevel] of Shortint = ( Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION ); SZInvalid = 'Invalid ZStream operation!'; {** deflate routines ********************************************************} function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar; recsize: Integer): Integer; external; function deflate(var strm: TZStreamRec; flush: Integer): Integer; external; function deflateEnd(var strm: TZStreamRec): Integer; external; {** inflate routines ********************************************************} function inflateInit_(var strm: TZStreamRec; version: PChar; recsize: Integer): Integer; external; function inflate(var strm: TZStreamRec; flush: Integer): Integer; external; function inflateEnd(var strm: TZStreamRec): Integer; external; function inflateReset(var strm: TZStreamRec): Integer; external; {** zlib function implementations *******************************************} function zcalloc(opaque: Pointer; items, size: Integer): Pointer; begin GetMem(result,items * size); end; procedure zcfree(opaque, block: Pointer); begin FreeMem(block); end; {** c function implementations **********************************************} procedure _memset(p: Pointer; b: Byte; count: Integer); cdecl; begin FillChar(p^,count,b); end; procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; begin Move(source^,dest^,count); end; {** custom zlib routines ****************************************************} function DeflateInit(var stream: TZStreamRec; level: Integer): Integer; begin result := DeflateInit_(stream,level,ZLIB_VERSION,SizeOf(TZStreamRec)); end; // function DeflateInit2(var stream: TZStreamRec; level, method, windowBits, // memLevel, strategy: Integer): Integer; // begin // result := DeflateInit2_(stream,level,method,windowBits,memLevel, // strategy,ZLIB_VERSION,SizeOf(TZStreamRec)); // end; function InflateInit(var stream: TZStreamRec): Integer; begin result := InflateInit_(stream,ZLIB_VERSION,SizeOf(TZStreamRec)); end; // function InflateInit2(var stream: TZStreamRec; windowBits: Integer): Integer; // begin // result := InflateInit2_(stream,windowBits,ZLIB_VERSION,SizeOf(TZStreamRec)); // end; {****************************************************************************} function ZCompressCheck(code: Integer): Integer; begin result := code; if code < 0 then begin raise EZCompressionError.Create(_z_errmsg[2 - code]); end; end; function ZDecompressCheck(code: Integer): Integer; begin Result := code; if code < 0 then begin raise EZDecompressionError.Create(_z_errmsg[2 - code]); end; end; procedure ZCompress(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; level: TZCompressionLevel); const delta = 256; var zstream: TZStreamRec; begin FillChar(zstream,SizeOf(TZStreamRec),0); outSize := ((inSize + (inSize div 10) + 12) + 255) and not 255; GetMem(outBuffer,outSize); try zstream.next_in := inBuffer; zstream.avail_in := inSize; zstream.next_out := outBuffer; zstream.avail_out := outSize; ZCompressCheck(DeflateInit(zstream,ZLevels[level])); try while ZCompressCheck(deflate(zstream,Z_FINISH)) <> Z_STREAM_END do begin Inc(outSize,delta); ReallocMem(outBuffer,outSize); zstream.next_out := PChar(Integer(outBuffer) + zstream.total_out); zstream.avail_out := delta; end; finally ZCompressCheck(deflateEnd(zstream)); end; ReallocMem(outBuffer,zstream.total_out); outSize := zstream.total_out; except FreeMem(outBuffer); raise; end; end; procedure ZDecompress(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer); var zstream: TZStreamRec; delta : Integer; begin FillChar(zstream,SizeOf(TZStreamRec),0); delta := (inSize + 255) and not 255; if outEstimate = 0 then outSize := delta else outSize := outEstimate; GetMem(outBuffer,outSize); try zstream.next_in := inBuffer; zstream.avail_in := inSize; zstream.next_out := outBuffer; zstream.avail_out := outSize; ZDecompressCheck(InflateInit(zstream)); try while ZDecompressCheck(inflate(zstream,Z_NO_FLUSH)) <> Z_STREAM_END do begin Inc(outSize,delta); ReallocMem(outBuffer,outSize); zstream.next_out := PChar(Integer(outBuffer) + zstream.total_out); zstream.avail_out := delta; end; finally ZDecompressCheck(inflateEnd(zstream)); end; ReallocMem(outBuffer,zstream.total_out); outSize := zstream.total_out; except FreeMem(outBuffer); raise; end; end; function ZCompressStr(const s: String; level: TZCompressionLevel): String; var buffer: Pointer; size : Integer; begin ZCompress(PChar(s),Length(s),buffer,size,level); SetLength(result,size); Move(buffer^,result[1],size); FreeMem(buffer); end; function ZDecompressStr(const s: String): String; var buffer: Pointer; size : Integer; begin ZDecompress(PChar(s),Length(s),buffer,size); SetLength(result,size); Move(buffer^,result[1],size); FreeMem(buffer); end; {** TCustomZStream **********************************************************} constructor TCustomZStream.Create(stream: TStream); begin inherited Create; FStream := stream; FStreamPos := stream.Position; end; procedure TCustomZStream.DoProgress; begin if Assigned(FOnProgress) then FOnProgress(Self); end; {** TZCompressionStream *****************************************************} constructor TZCompressionStream.Create(dest: TStream; compressionLevel: TZCompressionLevel); begin inherited Create(dest); FZStream.next_out := FBuffer; FZStream.avail_out := SizeOf(FBuffer); ZCompressCheck(DeflateInit(FZStream,ZLevels[compressionLevel])); end; destructor TZCompressionStream.Destroy; begin FZStream.next_in := Nil; FZStream.avail_in := 0; try if FStream.Position <> FStreamPos then FStream.Position := FStreamPos; while ZCompressCheck(deflate(FZStream,Z_FINISH)) <> Z_STREAM_END do begin FStream.WriteBuffer(FBuffer,SizeOf(FBuffer) - FZStream.avail_out); FZStream.next_out := FBuffer; FZStream.avail_out := SizeOf(FBuffer); end; if FZStream.avail_out < SizeOf(FBuffer) then begin FStream.WriteBuffer(FBuffer,SizeOf(FBuffer) - FZStream.avail_out); end; finally deflateEnd(FZStream); end; inherited Destroy; end; function TZCompressionStream.Read(var buffer; count: Longint): Longint; begin raise EZCompressionError.Create(SZInvalid); end; function TZCompressionStream.Write(const buffer; count: Longint): Longint; begin FZStream.next_in := @buffer; FZStream.avail_in := count; if FStream.Position <> FStreamPos then FStream.Position := FStreamPos; while FZStream.avail_in > 0 do begin ZCompressCheck(deflate(FZStream,Z_NO_FLUSH)); if FZStream.avail_out = 0 then begin FStream.WriteBuffer(FBuffer,SizeOf(FBuffer)); FZStream.next_out := FBuffer; FZStream.avail_out := SizeOf(FBuffer); FStreamPos := FStream.Position; DoProgress; end; end; result := Count; end; function TZCompressionStream.Seek(offset: Longint; origin: Word): Longint; begin if (offset = 0) and (origin = soFromCurrent) then begin result := FZStream.total_in; end else raise EZCompressionError.Create(SZInvalid); end; function TZCompressionStream.GetCompressionRate: Single; begin if FZStream.total_in = 0 then result := 0 else result := (1.0 - (FZStream.total_out / FZStream.total_in)) * 100.0; end; {** TZDecompressionStream ***************************************************} constructor TZDecompressionStream.Create(source: TStream); begin inherited Create(source); FZStream.next_in := FBuffer; FZStream.avail_in := 0; ZDecompressCheck(InflateInit(FZStream)); end; destructor TZDecompressionStream.Destroy; begin inflateEnd(FZStream); inherited Destroy; end; function TZDecompressionStream.Read(var buffer; count: Longint): Longint; begin FZStream.next_out := @buffer; FZStream.avail_out := count; if FStream.Position <> FStreamPos then FStream.Position := FStreamPos; while FZStream.avail_out > 0 do begin if FZStream.avail_in = 0 then begin FZStream.avail_in := FStream.Read(FBuffer,SizeOf(FBuffer)); if FZStream.avail_in = 0 then begin result := count - FZStream.avail_out; Exit; end; FZStream.next_in := FBuffer; FStreamPos := FStream.Position; DoProgress; end; ZDecompressCheck(inflate(FZStream,Z_NO_FLUSH)); end; result := Count; end; function TZDecompressionStream.Write(const Buffer; Count: Longint): Longint; begin raise EZDecompressionError.Create(SZInvalid); end; function TZDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint; var buf: Array [0..4095] of Char; i : Integer; begin if (offset = 0) and (origin = soFromBeginning) then begin ZDecompressCheck(inflateReset(FZStream)); FZStream.next_in := FBuffer; FZStream.avail_in := 0; FStream.Position := 0; FStreamPos := 0; end else if ((offset >= 0) and (origin = soFromCurrent)) or (((offset - FZStream.total_out) > 0) and (origin = soFromBeginning)) then begin if origin = soFromBeginning then Dec(offset,FZStream.total_out); if offset > 0 then begin for i := 1 to offset div SizeOf(buf) do ReadBuffer(buf,SizeOf(buf)); ReadBuffer(buf,offset mod SizeOf(buf)); end; end else raise EZDecompressionError.Create(SZInvalid); result := FZStream.total_out; end; end.
28.502423
88
0.57785
f10575076f40995f3744ce09f556fec55560114c
19,481
pas
Pascal
lab-src/Lab08-Authenticate user against InterBase/forms/formMain.pas
atkins126/FieldLogger-FMXTraining
7cd5348444b06c94492bbd78d8ba50c61087083b
[ "Apache-2.0" ]
21
2019-02-14T13:22:54.000Z
2022-03-08T20:55:53.000Z
lab-src/Lab08-Authenticate user against InterBase/forms/formMain.pas
atkins126/FieldLogger-FMXTraining
7cd5348444b06c94492bbd78d8ba50c61087083b
[ "Apache-2.0" ]
null
null
null
lab-src/Lab08-Authenticate user against InterBase/forms/formMain.pas
atkins126/FieldLogger-FMXTraining
7cd5348444b06c94492bbd78d8ba50c61087083b
[ "Apache-2.0" ]
11
2019-05-30T13:09:32.000Z
2022-01-13T01:44:35.000Z
unit formMain; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.TabControl, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.IB, FireDAC.Phys.IBLiteDef, FireDAC.FMXUI.Wait, Data.DB, FireDAC.Comp.Client, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Edit, FMX.Objects, FMX.Layouts, FMX.MultiView, FMX.Effects, FMX.Filter.Effects, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, FMX.ListView.Types, FMX.ListView.Appearances, FMX.ListView.Adapters.Base, Data.Bind.EngExt, FMX.Bind.DBEngExt, System.Rtti, System.Bindings.Outputs, FMX.Bind.Editors, Data.Bind.Components, Data.Bind.DBScope, FireDAC.Comp.DataSet, FMX.ActnList, FMX.ScrollBox, FMX.Memo, FMX.ListView, FMX.ListBox, System.Actions, FMX.Gestures, FMX.StdActns, FMX.Media, FMX.Ani, System.Sensors, System.Sensors.Components, FMX.WebBrowser, System.Devices, System.Threading, Math, uReportingFrame, uNewProjectFrame, uNewEntryFrame, uEntryDetailsFrame, uProjectDetailsFrame, uProjectsFrame, uSigninFrame, uProgressFrame, fieldlogger.Data, System.Net.URLClient, System.Net.HttpClient, System.Net.HttpClientComponent, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, FMX.Platform, FMX.VirtualKeyboard; type EConnectFailed = class(Exception) public constructor Create; reintroduce; end; TfrmMain = class(TForm) mmoCreateDatabase: TMemo; tbcMain: TTabControl; tabSignin: TTabItem; tabProjects: TTabItem; tabProjectDetail: TTabItem; tabEntryDetail: TTabItem; tabNewEntry: TTabItem; tabNewProject: TTabItem; LocationSensor1: TLocationSensor; tabReport: TTabItem; ReportingFrame1: TReportingFrame; ProgressFrame: TProgressFrame; VSB: TVertScrollBox; NetHTTPClient: TNetHTTPClient; DefaultImage: TImage; IdTCPClient1: TIdTCPClient; SigninFrame1: TSigninFrame; ProjectsFrame1: TProjectsFrame; ProjectDetailsFrame1: TProjectDetailsFrame; EntryDetailsFrame1: TEntryDetailsFrame; NewEntryFrame1: TNewEntryFrame; NewProjectFrame1: TNewProjectFrame; procedure LocationSensor1LocationChanged(Sender: TObject; const OldLocation, NewLocation: TLocationCoord2D); procedure tbcMainChange(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect); procedure FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect); procedure FormFocusChanged(Sender: TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); private FGeocoder: TGeocoder; FCurrentLocation: TLocationCoord2D; FRunOnce: Boolean; FKBBounds: TRectF; FNeedOffset: Boolean; FCurrentStyleId: Integer; procedure CalcContentBoundsProc(Sender: TObject; var ContentBounds: TRectF); procedure RestorePosition; procedure UpdateKBBounds; procedure ApplicationIdle(Sender: TObject; var Done: Boolean); procedure LoadEntryDetail(LogID: Integer); procedure OnGeocodeReverseEvent(const AAddress: TCivicAddress); public { Public declarations } CurrentProject: TProject; CurrentLogEntry: Integer; InternetConnectivity: IFuture <Boolean>; procedure ShowActivity; procedure HideActivity; procedure ReverseLocation(Lat, Long: double); procedure SignInComplete; procedure SignOut; procedure SetWelcomeScreen; procedure SetNewProjectScreen; procedure SetProjectScreen; procedure SetBackToProjectScreen; procedure SetProjectDetailScreen; procedure SetBackToProjectDetailScreen; procedure SetNewEntryDetailScreen; procedure SetEntryDetailScreen; procedure SetReportScreen; procedure UpdateProject(const ATitle, ADesc: String); procedure DeleteLogEntry; procedure SaveNewEntry(const ANote: String; ABitmap: TBitmap); procedure NewProject(const ATitle, ADesc: String); procedure LoadCurrentProject(AId: Integer); procedure LoadProjectDetail(AId: Integer); procedure NewProjectEntry; procedure DeleteCurrentProject; procedure ClearCurrentProject; procedure UpdateLogEntries; procedure DownloadStaticMap(const ALocation:String; AHeight, AWidth: Single; AImage: TImage); function DetectInternet: Boolean; function DetectInternetAsync: Boolean; function GetCurrentStyleId: Integer; end; const BUSY = 1; NOT_BUSY = 0; NO_CONNECTIVITY = 'No connectivity to the server detected.'; // Get an API key from here: https://developers.google.com/maps/documentation/static-maps/get-api-key GOOGLE_MAPS_STATIC_API_KEY = ''; var frmMain: TfrmMain; implementation uses uDataModule, IOUtils, strutils, fieldlogger.authentication, System.NetEncoding, System.Permissions, FMX.DialogService, {$IFDEF ANDROID} Androidapi.JNI.Os, Androidapi.JNI.JavaTypes, Androidapi.Helpers, System.Android.Sensors; {$ENDIF ANDROID} {$IFDEF IOS} System.iOS.Sensors; {$ELSE} {$IFDEF MACOS} System.Mac.Sensors; {$ENDIF MACOS} {$ENDIF IOS} {$IFDEF MSWINDOWS} System.Win.Sensors; {$ENDIF} constructor EConnectFailed.Create; begin inherited Create('Failed to connect to database.'); end; {$R *.fmx} function DataFilename: string; const cDatafileName = 'EMBEDDEDIBLITE.IB'; begin Result := TPath.GetDocumentsPath + TPath.DirectorySeparatorChar + cDatafileName; end; function TfrmMain.GetCurrentStyleId; begin Result := FCurrentStyleId; end; procedure TfrmMain.SignInComplete; begin SetProjectScreen; end; procedure TfrmMain.SetWelcomeScreen; begin tbcMain.SetActiveTabWithTransitionAsync(tabSignin, TTabTransition.Slide, TTabTransitionDirection.Normal,nil); end; procedure TfrmMain.SetNewProjectScreen; begin NewProjectFrame1.ClearFields; tbcMain.SetActiveTabWithTransitionAsync(tabNewProject, TTabTransition.Slide, TTabTransitionDirection.Normal,nil); end; procedure TfrmMain.SetProjectDetailScreen; begin tbcMain.SetActiveTabWithTransitionAsync(tabProjectDetail, TTabTransition.Slide, TTabTransitionDirection.Normal,procedure begin end); end; procedure TfrmMain.SetBackToProjectDetailScreen; begin tbcMain.SetActiveTabWithTransitionAsync(tabProjectDetail, TTabTransition.Slide, TTabTransitionDirection.Reversed,nil); {$IF NOT DEFINED(ANDROID)} if LocationSensor1.Active then LocationSensor1.Active := False; {$ENDIF} end; procedure TfrmMain.SetProjectScreen; begin tbcMain.SetActiveTabWithTransitionAsync(tabProjects, TTabTransition.Slide, TTabTransitionDirection.Normal,nil); end; procedure TfrmMain.SetBackToProjectScreen; begin tbcMain.SetActiveTabWithTransitionAsync(tabProjects, TTabTransition.Slide, TTabTransitionDirection.Reversed,nil); end; procedure TfrmMain.SetEntryDetailScreen; begin tbcMain.SetActiveTabWithTransitionAsync(tabEntryDetail, TTabTransition.Slide, TTabTransitionDirection.Normal,nil); end; procedure TfrmMain.ShowActivity; begin ProgressFrame.ShowActivity; end; procedure TfrmMain.HideActivity; begin ProgressFrame.HideActivity; end; procedure TfrmMain.SetReportScreen; begin end; procedure TfrmMain.SetNewEntryDetailScreen; begin // - Switch tab tbcMain.SetActiveTabWithTransition(tabNewEntry, TTabTransition.Slide, TTabTransitionDirection.Normal); end; procedure TfrmMain.NewProjectEntry; begin NewEntryFrame1.ClearFields; // - Set sensors active. {$IFDEF ANDROID} PermissionsService.RequestPermissions ([JStringToString(TJManifest_permission.JavaClass.ACCESS_FINE_LOCATION),JStringToString(TJManifest_permission.JavaClass.ACCESS_COARSE_LOCATION)], procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>) begin if (Length(AGrantResults) = 2) and (AGrantResults[0] = TPermissionStatus.Granted) and (AGrantResults[1] = TPermissionStatus.Granted) then begin { activate or deactivate the location sensor } LocationSensor1.Active := True; end else begin LocationSensor1.Active := False; end; end); {$ELSE} LocationSensor1.Active := True; {$ENDIF} SetNewEntryDetailScreen; end; procedure TfrmMain.DeleteCurrentProject; begin mainDM.DeleteProject(CurrentProject.ID); SetBackToProjectScreen; end; procedure TfrmMain.ClearCurrentProject; begin CurrentProject.ID := 0; CurrentProject.Title := ''; CurrentProject.Description := ''; end; procedure TfrmMain.LoadCurrentProject(AId: Integer); var ProjectData: IProjectData; Projects: TArrayOfProject; begin CurrentProject.ID := AId; // - Get Project data ProjectData := TProjectData.Create(mainDM.conn); if not assigned(ProjectData) then begin raise EConnectFailed.Create; end; if ProjectData.Read(Projects, AId) <> 1 then begin exit; end; CurrentProject := Projects[0]; end; procedure TfrmMain.DeleteLogEntry; begin mainDM.DeleteLogEntry(CurrentLogEntry, CurrentProject); ProjectDetailsFrame1.UpdateLogEntries(CurrentProject); SetBackToProjectDetailScreen; end; procedure TfrmMain.UpdateLogEntries; begin ProjectDetailsFrame1.UpdateLogEntries(CurrentProject) end; procedure TfrmMain.SaveNewEntry(const ANote: String; ABitmap: TBitmap); var LID: Integer; begin LID := mainDM.CreateNewLogEntry(ANote, ABitmap, CurrentProject, FCurrentLocation); LoadEntryDetail(LID); UpdateLogEntries; tbcMain.SetActiveTabWithTransitionAsync(tabEntryDetail, TTabTransition.Slide, TTabTransitionDirection.Reversed,nil); NewEntryFrame1.ClearFields; end; procedure TfrmMain.NewProject(const ATitle, ADesc: String); var ProjectData: IProjectData; Project: TProject; ID: Integer; begin // - Insert new project ProjectData := TProjectData.Create(mainDM.conn); if not assigned(ProjectData) then begin raise EConnectFailed.Create; end; Project.Title := ATitle; Project.Description := ADesc; ID := ProjectData.CreateProject(Project); // - Switch tabs back to tabProjectDetail CurrentProject.ID := ID; CurrentProject.Title := Project.Title; CurrentProject.Description := Project.Description; ProjectDetailsFrame1.LoadProjectDetail(CurrentProject); SetProjectDetailScreen; end; procedure TfrmMain.LoadProjectDetail(AId: Integer); begin ClearCurrentProject; LoadCurrentProject(AId); ProjectDetailsFrame1.LoadProjectDetail(CurrentProject); SetProjectDetailScreen; end; procedure TfrmMain.UpdateProject(const ATitle, ADesc: String); var ProjectData: IProjectData; Project: TProject; begin if CurrentProject.ID = 0 then begin exit; end; // - Only update if something actually changed. if (Trim(CurrentProject.Title) = Trim(ATitle)) and (Trim(CurrentProject.Description) = Trim(ADesc)) then begin exit; end; // - Current project changed, we better update it! ProjectData := TProjectData.Create(mainDM.conn); if not assigned(ProjectData) then begin raise EConnectFailed.Create(); end; Project.ID := CurrentProject.ID; Project.Title := ATitle; Project.Description := ADesc; if not ProjectData.Update([Project]) then begin raise Exception.Create('Failed to update project data.'); end; ProjectsFrame1.LoadProjects; end; procedure TfrmMain.CalcContentBoundsProc(Sender: TObject; var ContentBounds: TRectF); begin if FNeedOffset and (FKBBounds.Top > 0) then begin ContentBounds.Bottom := Max(ContentBounds.Bottom, 2 * ClientHeight - FKBBounds.Top); end; end; procedure TfrmMain.RestorePosition; begin VSB.ViewportPosition := PointF(VSB.ViewportPosition.X, 0); tbcMain.Align := TAlignLayout.Client; VSB.RealignContent; end; procedure TfrmMain.UpdateKBBounds; var LFocused : TControl; LFocusRect: TRectF; begin FNeedOffset := False; if Assigned(Focused) then begin LFocused := TControl(Focused.GetObject); LFocusRect := LFocused.AbsoluteRect; LFocusRect.Offset(VSB.ViewportPosition); if (LFocusRect.IntersectsWith(TRectF.Create(FKBBounds))) and (LFocusRect.Bottom > FKBBounds.Top) then begin FNeedOffset := True; tbcMain.Align := TAlignLayout.Horizontal; VSB.RealignContent; Application.ProcessMessages; VSB.ViewportPosition := PointF(VSB.ViewportPosition.X, LFocusRect.Bottom - FKBBounds.Top); end; end; if not FNeedOffset then RestorePosition; end; procedure TfrmMain.FormCreate(Sender: TObject); begin // - Ensure we're on the welcome tab tbcMain.TabPosition := TTabPosition.None; tbcMain.ActiveTab := tabSignIn; Application.OnIdle := ApplicationIdle; {$IF DEFINED(ANDROID) OR DEFINED(IOS)} VKAutoShowMode := TVKAutoShowMode.Always; VSB.OnCalcContentBounds := CalcContentBoundsProc; {$ENDIF} end; procedure TfrmMain.FormFocusChanged(Sender: TObject); begin UpdateKBBounds; end; procedure TfrmMain.FormKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); var FService : IFMXVirtualKeyboardService; begin if Key = vkHardwareBack then begin TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, IInterface(FService)); if (FService <> nil) and (TVirtualKeyboardState.Visible in FService.VirtualKeyBoardState) then begin // do nothing end else begin if tbcMain.ActiveTab = tabProjects then begin SignOut; Key := 0; end; if tbcMain.ActiveTab = tabProjectDetail then begin SetBackToProjectScreen; Key := 0; end; if tbcMain.ActiveTab = tabEntryDetail then begin SetBackToProjectDetailScreen; Key := 0; end; if tbcMain.ActiveTab = tabNewProject then begin SetBackToProjectScreen; Key := 0; end; if tbcMain.ActiveTab = tabNewEntry then begin SetBackToProjectDetailScreen; Key := 0; end; if tbcMain.ActiveTab = tabReport then begin SetBackToProjectDetailScreen; Key := 0; end; end; end end; procedure TfrmMain.FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect); begin FKBBounds.Create(0, 0, 0, 0); FNeedOffset := False; RestorePosition; end; procedure TfrmMain.FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect); begin FKBBounds := TRectF.Create(Bounds); FKBBounds.TopLeft := ScreenToClient(FKBBounds.TopLeft); FKBBounds.BottomRight := ScreenToClient(FKBBounds.BottomRight); UpdateKBBounds; end; function TfrmMain.DetectInternet: Boolean; begin Result := False; //offline test //Exit; try IdTCPClient1.ReadTimeout := 6000; IdTCPClient1.ConnectTimeout := 6000; IdTCPClient1.Port := 80; IdTCPClient1.Host := 'www.embarcadero.com'; IdTCPClient1.Connect; IdTCPClient1.Disconnect; Result := True; except Result := False; end; end; function TfrmMain.DetectInternetAsync: Boolean; begin InternetConnectivity := TTask.Future<Boolean>( function:Boolean begin Result := DetectInternet; end); Result := InternetConnectivity.Value; end; procedure TfrmMain.ApplicationIdle(Sender: TObject; var Done: Boolean); var SL: TStringList; begin if FRunOnce=False then begin FRunOnce := True; DetectInternetAsync; ShowActivity; SL := TStringList.Create; SL.Text := mmoCreateDatabase.Lines.Text; TTask.Run(procedure begin try mainDM.InitializeDatabase(DataFilename, SL); finally SL.Free; TThread.Synchronize(nil,procedure begin HideActivity; end); end; end); end; end; procedure TfrmMain.LocationSensor1LocationChanged(Sender: TObject; const OldLocation, NewLocation: TLocationCoord2D); begin FCurrentLocation := NewLocation; end; procedure TfrmMain.SignOut; begin CurrentProject.ID := 0; tbcMain.SetActiveTabWithTransition(tabSignIn, TTabTransition.Slide, TTabTransitionDirection.Reversed); end; procedure TfrmMain.OnGeocodeReverseEvent(const AAddress: TCivicAddress); begin EntryDetailsFrame1.UpdateDetails(AAddress); end; procedure TfrmMain.ReverseLocation(Lat, Long: double); var NewLocation: TLocationCoord2D; begin {$IFNDEF ANDROID} // Setup an instance of TGeocoder if not assigned(FGeocoder) then begin if assigned(TGeocoder.Current) AND TGeoCoder.Current.Supported=True then FGeocoder := TGeocoder.Current.Create; if assigned(FGeocoder) then FGeocoder.OnGeocodeReverse := OnGeocodeReverseEvent; end; // Translate location to address NewLocation.Latitude := Lat; NewLocation.Longitude := Long; if assigned(FGeocoder) and not FGeocoder.Geocoding then begin FGeocoder.GeocodeReverse(NewLocation); end; {$ENDIF} end; procedure TfrmMain.LoadEntryDetail(LogID: Integer); begin EntryDetailsFrame1.LoadEntryDetail(LogID, CurrentProject); end; procedure TfrmMain.tbcMainChange(Sender: TObject); begin if tbcMain.ActiveTab = tabProjects then begin ProjectsFrame1.LoadProjects; end else if tbcMain.ActiveTab = tabProjectDetail then begin end else if tbcMain.ActiveTab = tabNewProject then begin NewProjectFrame1.ClearFields; end else if tbcMain.ActiveTab = tabEntryDetail then begin if ProjectDetailsFrame1.lstEntries.ItemIndex >= 0 then begin CurrentLogEntry := ProjectDetailsFrame1.lstEntries.Items[ProjectDetailsFrame1.lstEntries.ItemIndex].Tag; LoadEntryDetail(CurrentLogEntry); end; end; end; procedure TfrmMain.DownloadStaticMap(const ALocation: String; AHeight, AWidth: Single; AImage: TImage); begin AImage.WrapMode := TImageWrapMode.Fit; AImage.Bitmap.Assign(DefaultImage.Bitmap); if GOOGLE_MAPS_STATIC_API_KEY='' then Exit; if NetHTTPClient.Tag=NOT_BUSY then begin if InternetConnectivity.Value=True then begin NetHTTPClient.Tag := BUSY; ITask(TTask.Create( procedure var MS: TMemoryStream; begin try MS := TMemoryStream.Create; try NetHTTPClient.Get('https://maps.googleapis.com/maps/api/staticmap?center='+ALocation+'&zoom=15&scale=2&size='+AWidth.ToString+'x'+AHeight.ToString+'&key='+GOOGLE_MAPS_STATIC_API_KEY,MS); TThread.Synchronize(nil, procedure begin AImage.Bitmap.LoadFromStream(MS); AImage.WrapMode := TImageWrapMode.Stretch; end); MS.Clear; finally MS.DisposeOf; MS := nil; end; finally TThread.Synchronize(nil, procedure begin NetHTTPClient.Tag := NOT_BUSY; end); end; end)).Start; end; end; end; end.
27.554455
204
0.724655
f162b3f285b2949c480ee3d1b768d1cf52ac73e3
1,017
dfm
Pascal
libs/u_ask_util.dfm
AndanTeknomedia/bazda-delphi-xe8
3cb9589e41bf7a7492323348a429a6ef7f357817
[ "MIT" ]
null
null
null
libs/u_ask_util.dfm
AndanTeknomedia/bazda-delphi-xe8
3cb9589e41bf7a7492323348a429a6ef7f357817
[ "MIT" ]
null
null
null
libs/u_ask_util.dfm
AndanTeknomedia/bazda-delphi-xe8
3cb9589e41bf7a7492323348a429a6ef7f357817
[ "MIT" ]
null
null
null
object FaskUtil: TFaskUtil Left = 0 Top = 0 ActiveControl = Button2 Caption = 'FaskUtil' ClientHeight = 143 ClientWidth = 467 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poScreenCenter PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel Left = 93 Top = 12 Width = 346 Height = 73 AutoSize = False Caption = 'Label1' WordWrap = True end object Button1: TButton Left = 87 Top = 102 Width = 75 Height = 25 Caption = 'Ya' Default = True ModalResult = 6 TabOrder = 0 end object Button2: TButton Left = 168 Top = 102 Width = 75 Height = 25 Cancel = True Caption = 'Tidak' ModalResult = 7 TabOrder = 1 end object CheckBox1: TCheckBox Left = 270 Top = 106 Width = 169 Height = 17 Caption = 'Jangan tampilkan lagi.' TabOrder = 2 end end
18.160714
38
0.614553
f11992046c9b01a4ee3e6ce49dbdfa50eb1d7639
1,539
pas
Pascal
codevs/1138.pas
yyong119/ACM-OnlineJudge
5871993b15231c6615bfa3e7c2b04f0f6a23e9dc
[ "MIT" ]
22
2017-08-12T11:56:19.000Z
2022-03-27T10:04:31.000Z
codevs/1138.pas
yyong119/ACM-OnlineJudge
5871993b15231c6615bfa3e7c2b04f0f6a23e9dc
[ "MIT" ]
2
2017-12-17T02:52:59.000Z
2018-02-09T02:10:43.000Z
codevs/1138.pas
yyong119/ACM-OnlineJudge
5871993b15231c6615bfa3e7c2b04f0f6a23e9dc
[ "MIT" ]
4
2017-12-22T15:24:38.000Z
2020-05-18T14:51:16.000Z
var s,y,tmp,ans:int64; mid,left,right,i,n,m,max,min:longint; c,a,w,v,l,r:array [0..222222] of longint; procedure work(t:longint); var i:longint; count,tot:int64; begin fillchar(a,sizeof(a),0); fillchar(c,sizeof(c),0); for i:=1 to n do begin if w[i]>=t then begin a[i]:=a[i-1]+v[i]; c[i]:=c[i-1]+1; end else begin a[i]:=a[i-1]; c[i]:=c[i-1]; end; end; y:=0; for i:=1 to m do begin count:=c[r[i]]-c[l[i]-1]; tot:=a[r[i]]-a[l[i]-1]; y:=y+count*tot; end; end; begin readln(n,m,s); max:=0; min:=maxlongint-1; for i:=1 to n do begin readln(w[i],v[i]); if w[i]>max then max:=w[i]; if w[i]<min then min:=w[i]; end; for i:=1 to m do begin readln(l[i],r[i]); end; left:=min-1; right:=max+1; ans:=maxlongint*1000000; while left<right do begin mid:=(left+right) div 2; work(mid); tmp:=s-y; if abs(tmp)<ans then ans:=abs(tmp); if ans=0 then break; if s>y then right:=mid else left:=mid+1; end; writeln(ans); end.
24.822581
56
0.369721
834854f02cbc4baa75925734e0b87da4a2355757
1,523
pas
Pascal
Components/JVCL/examples/JVCLMegaDemo/JvPanelsU.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/examples/JVCLMegaDemo/JvPanelsU.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/examples/JVCLMegaDemo/JvPanelsU.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: 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 JvPanelsU; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, JvItemsPanel, JvClock, JvRollOut, JvComponent, JvCaptionPanel, JvLookOut, ImgList, JvPanel, JvOutlookBar, JvExExtCtrls, JvExControls; type TJvPanelsFrm = class(TForm) ImageList1: TImageList; JvLookOut1: TJvLookOut; JvLookOutButton1: TJvLookOutButton; JvCaptionPanel1: TJvCaptionPanel; JvRollout1: TJvRollout; JvClock1: TJvClock; JvExpress1: TJvExpress; JvExpressButton1: TJvExpressButton; JvItemsPanel1: TJvItemsPanel; JvOutlookBar1: TJvOutlookBar; end; implementation {$R *.dfm} end.
28.203704
84
0.684176
83fc4640a3b7ea73d6ad043fd260fd22954078c1
15,094
pas
Pascal
tsr/0032.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
11
2015-12-12T05:13:15.000Z
2020-10-14T13:32:08.000Z
tsr/0032.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
null
null
null
tsr/0032.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
8
2017-05-05T05:24:01.000Z
2021-07-03T20:30:09.000Z
{ I love it when people actually post there hard slaved code. I've seen a number of people wanting to write tsr's, and all the examples in BP that I've ever come across are pathetic and above 6K of mem! So for those serious here is some flexible and easy to use code. Drowning in comments ;-) It's extremely efficient on memory (1040) bytes! I can write it in pascal using 550 bytes put then I decided to make it user friendly to a degree ;-) Shout if you need to know more info on tsr writing eg. making it be polite to dos etc ;-)) Cheers. Matt } {$A-}{$R-}{$S-}{$D-}{$F-}{$L-}{$Q-}{$T-}{$V-}{$X-}{$Y-}{$G+} {$B-}{$N-}{$P-} {$M 1024,0,0} (* Ulti-Tsr-Demo-Proggie Coded: Matthew Tagg Jan '95 *) (* The beauty of this is that your init code, eg paramter parsing etc. *) (* does NOT effect the size in memory! Unlike crappy BP's attemp at a *) (* tsr! Another beautiful thing is that for you who hate the technical *) (* stuff can let the program work out what to keep in memory! *) (* USES *) (* There is no USES, so don't *) (* use units, they suck. Use include*) (* files if you want but units *) (* create new segments AARG *) (* NOT for tsr's! *) Const CharSEG = $B800; (* $B800 = COLOUR or $B000 for Mono *) DSegSize = 128; (* Data Segment Size *) SSegSize = 256; (* Stack Segmetn Size *) SSize = SSegSize-16; (* This is the value of the Stack *) (* pointer (sp) and bp *) DSegOff = 2; (* This is added to the value copied*) (* from cs and written to ds ie DS *) (* points to 32 bytes ahead of CS *) (* I do this so that that pointers *) (* Are not overriden *) DatOffs = DSegOff*16; (* Offset relocation number *) (* Use this to reference your data *) (* ie. say you want to move the var *) (* NUM int the ax > *) (* mov ax, CS:datoffs+NUM *) (* ^^^ Must use segment *) (* override! OR easier to set *) (* DS = CS+DSegoff default=2 *) (* When in a pascal routine you can *) (* reference it normally *) CodeOffs = 16; (* Were OUR Code/Data starts, first *) (* 16 bytes of the int09 proc are *) (* used for pushing stuff but we *) (* don't need that crap! *) (* PS Typed Constants use up memory *) (* They just another name for *) (* initialised data. *) (* Untyped are the same as EQU in *) (* asm. Untyped = No memory *) PSize = 8; (* The amount of bytes used by the *) (* Pointers *) NewSSegLoc = (CodeOffs+PSize+DsegSize+16) div 16; (* This says were the stack must *) (* start (+16 so no code is over- *) (* ridden) *) Var (* VARIABLES TO BE USED IN THE ACTUAL TSR *) Bob : Byte; (* Just test variables *) Obo : Word; (* Used by the i.s.r (you can use *) (* your own) ` *) EndData : Word; (* Insert all data to be saved, *) (* ie data use in the i.s.r, *) (* BEFORE this statement all init *) (* data can come after Saves Mem! *) (* VARIABLES TO BE USED IN THE INIT PART *) ProgSize : Word; (* Memory required in 16 byte *) (* Paragraphs *) ThisDoes : Byte; (* Eg.... *) NotGetSaved : Char; ButCanBe : Pointer; UsedInThe : Longint; InitCode : PChar; LastVar : Word; (* WARNING DO NOT CHANGE THIS *) (* Do Not Insert Any Variable After *) {$F+} Procedure Int09; Interrupt; Assembler; Asm Dw 0,0 (* Pointers 4*2 bytes = 8 *) Dw 0,0 (* Data Seg (8*16=128bytes Not Bad) *) (* Bp7 Chews up the first 80 *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* bytes for whatever AAARG *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* Change the size according *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* to the amount of data your *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* prog uses *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* Stack Seg (8*16=128*) (* Temp Stack *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* You can make the stack size *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* whatever you want, but remember*) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* to change the const SSize, *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* Default=256 *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (* Stack Seg (8*16+8*16=256) *) (* Temp Stack *) Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Nop (* Used for to ensure safety *) Sti (* Interupts allowed *) Pushf (* Pushf simulates and interrupt *) Call Dword Ptr CS:[CodeOffs] (* Calls the saved INT8 *) Inc CS:DatOffs+Bob (* Has a second passed? If not exit *) Cmp CS:DatOffs+Bob,18 (* else call our interrupt WRT *) Jne @Finnish Mov Cs:DatOffs+Bob,0 (* Rests it for the next time *) Inc Cs:DatOffs+Obo (* Obo is the number we write to the*) (* screen. *) Pushf Call Dword Ptr Far [CS:Codeoffs+4]; (* Call our routine *) Sti @Finnish: iret End; (* You can delete this procedure (for demo purposes only) *) Procedure PWord(Num,Pos,Base:Word); (* Proc. to write a number in any *) (* base *) Const AlphaNum : Array[0..35] of Byte = (48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, 81,82,83,84,85,86,87,88,89,90);Begin Asm Push CharSEG (* Set ES to our text segment addr *) Pop Es (* Text Graphics segment *) Mov Ax, Num (* Ax to be divided *) @l1: Xor Dx, Dx (* Clear *) Div Base (* Dx = Remainder, Ax = Quotient *) Cmp Dx,0 (* Remainder *) Jnz @l2 (* Finnished? *) Cmp Ax,0 (* Quotient *) Jz @Fin @l2: Mov Si, Dx Mov Di, Pos (* Load offs *) Mov Dl, Byte Ptr [AlphaNum+Si] Mov [Es:Di], Dl Sub Pos,2 (* Inc bx by 2 *) Jmp @l1 @Fin: Pop Pos (* Maintain stack *) End; End; Procedure Wrt;Interrupt; (* This Is Our Interrupt Service Routine *) Begin Asm Mov Ax, Cs (* ALWAYS include these three *) Add Ax, DSegOff (* instructions if you want to use *) Mov Ds, Ax (* your pascal declared variables. *) End; (* DO WHAT YOU WANT HERE *) PWord(Obo,158,10); (* Write a number in the top left *) (* hand column, demo purposes only! *) End; {$F-}{ <----------------------------- | } (* Init Procedures follow, note the {$f-} means these are now local *) (* BTW if you make your own init procedures make sure you place them *) (* after the Getvec or you can place them before the getvec but then *) (* change the line further down that needs the name of the first init *) (* procedure to your own name (currently the first init proc is GetVec *) Procedure GetVec(VecNo :Word; Var SavPoint :Pointer); (* DOS Sucks *) Var SavSeg, SavOff :Word; (* Temp variables for pointer *) Begin Asm Push Es (* Save Es *) Shl VecNo, 2 (* Multiply num by 4 to get address *) Mov Es, Word Ptr 0h (* Zero Es. Vect Int's start at 0:0 *) Mov Di, VecNo (* Di = Num * 4 *) Mov Ax, Word Ptr [Es:Di] (* Copy offset word of int, *) Mov SavOff, Ax (* and save it *) Add Di, 2 (* Point to next word (segment) *) Mov Ax, Word Ptr [Es:Di] (* Ax = Offset *) Mov SavSeg, Ax (* Save in temporary variable *) Pop Es (* Retrieved stored value *) End; SavPoint := Ptr(SavSeg, SavOff); (* Convert Seg:Offset to pointer *) End; Procedure SetVec(VecNo :Word; NewPoint :Pointer); (* Don't use units *) Type (* Revectors the interrupts *) PType = Array[0..1] of Word; Var NtPoint : ^PType; Begin Asm Cli End; (* No interrupts can be generated *) NtPoint := @NewPoint; (* during the process *) MemW[0:VecNo*4] := NtPoint^[0]; MemW[0:VecNo*4+2] := NtPoint^[1]; Asm Sti End; (* Enable Interrupts *) End; Begin If (Ofs(Int09) <> 0) Then Halt; (* Used to ensure the proc is *) (* included *) (* If pascal doesn't see a reference*) (* to a proc. or var. it excludes *) (* it! *) EndData := Ofs(EndData); (* Basicly finds the size of the *) (* DS to be kept in memory *) GetVec($8, Pointer(MemL[Cseg:CodeOffs])); (* Vector 8 is the timer interrupt *) (* generated every 18.2 times a sec *) SetVec($8, Ptr(Cseg, CodeOffs+PSize+DSegSize+SSegSize)); (* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *) (* This is where the CODE actually *) (* starts in the code segment *) MemW[Cseg:Codeoffs+4] := Ofs( WRT ); MemW[Cseg:Codeoffs+6] := Seg( WRt ); (* -----------------^^^ *) (* Substitute your own i.s.r routine name over here, if you want *) (* This next stuff copies the data we defined and places it in *) (* our new data segment *) Asm Mov Ax, Cs (* Seeing as you can't say *) Add Ax, DSegOff (* Mov Es, Cs ..this is a way round *) Mov Es, Ax (* Inc Ax, so no code overriden ;) *) Xor Di, Di (* Di = 0 *) Xor Si, Si (* Si = 0 *) Mov Cx, EndData (* # of bytes to copy *) Rep Movsb (* ... and copy it *) End; (* What I am actually doing is having all three segments in the code *) (* segment, risky if you don't be careful but worth the space (g) *) Asm Mov Ax, Cs (* Get the current Code Seg *) Add Ax, NewSSegLoc (* Add the New Stack Segment Locat *) Mov Ss, Ax (* Adjust SS *) Mov Sp, SSize (* The stack pointer, is SSegSize-16*) Mov Bp, SSize (* (-16) to allow for segment *) (* alignment. *) Push Bp End; (* This allocates the amount of memory to be used in 16 byte *) (* paragraphs. The variable progsize is the memory used by our prog. *) (* @GetVec is the FIRST of the init procdures so it gets that address*) (* and uses it as the size of our code, it adds 256 because of the *) (* PSP (Program Segment Prefix) and then divides by 16 to get *) (* paragraphs and adds on 1 more to to be safe. *) ProgSize := (Ofs(GetVec)+256) div 16 + 1; Asm (* Uses dos int 31.. *KEEP* *) Mov Dx, ProgSize Mov Al, 0 (* Return code ei ERRORLEVEL *) Mov Ah, 31h (* Dos Func 31h *) Int 21h End; End. 
53.335689
80
0.401882
8356a60c6aef668d289ac3066911375e6b34a02a
2,488
pas
Pascal
src/Tasks/Implementations/Project/Core/CreateDispatcherMethodTaskImpl.pas
atkins126/fano-cli
29db4dfba28b164d3acf6de33075f88753731eaf
[ "MIT" ]
10
2018-11-10T22:58:49.000Z
2022-03-09T23:36:18.000Z
src/Tasks/Implementations/Project/Core/CreateDispatcherMethodTaskImpl.pas
atkins126/fano-cli
29db4dfba28b164d3acf6de33075f88753731eaf
[ "MIT" ]
8
2019-09-24T03:30:27.000Z
2021-09-14T02:15:06.000Z
src/Tasks/Implementations/Project/Core/CreateDispatcherMethodTaskImpl.pas
atkins126/fano-cli
29db4dfba28b164d3acf6de33075f88753731eaf
[ "MIT" ]
2
2020-07-06T12:35:11.000Z
2021-11-30T05:35:09.000Z
(*!------------------------------------------------------------ * Fano CLI Application (https://fanoframework.github.io) * * @link https://github.com/fanoframework/fano-cli * @copyright Copyright (c) 2018 - 2020 Zamrony P. Juhara * @license https://github.com/fanoframework/fano-cli/blob/master/LICENSE (MIT) *------------------------------------------------------------- *) unit CreateDispatcherMethodTaskImpl; interface {$MODE OBJFPC} {$H+} uses TaskOptionsIntf, TaskIntf, TextFileCreatorIntf, ContentModifierIntf, FileContentReaderIntf, CreateFileTaskImpl; type (*!-------------------------------------- * Task that add basic setup for buildDispatcher * to project creation *--------------------------------------------- * @author Zamrony P. Juhara <zamronypj@yahoo.com> *---------------------------------------*) TCreateDispatcherMethodTask = class (TCreateFileTask) private fFileReader : IFileContentReader; protected procedure createBuildDispatcherDependencyTpl(const methodDecl, methodImpl : string); public constructor create( const txtFileCreator : ITextFileCreator; const contentModifier : IContentModifier; const fileReader : IFileContentReader ); destructor destroy(); override; end; implementation constructor TCreateDispatcherMethodTask.create( const txtFileCreator : ITextFileCreator; const contentModifier : IContentModifier; const fileReader : IFileContentReader ); begin inherited create(txtFileCreator, contentModifier); fFileReader := fileReader; end; destructor TCreateDispatcherMethodTask.destroy(); begin fFileReader := nil; inherited destroy(); end; procedure TCreateDispatcherMethodTask.createBuildDispatcherDependencyTpl(const methodDecl, methodImpl : string); var bootstrapContent : string; begin fContentModifier.setVar( '[[BUILD_DISPATCHER_METHOD_DECL_SECTION]]', methodDecl ); fContentModifier.setVar( '[[BUILD_DISPATCHER_METHOD_IMPL_SECTION]]', methodImpl ); bootstrapContent := fFileReader.read(baseDirectory + '/src/bootstrap.pas'); createTextFile( baseDirectory + '/src/bootstrap.pas', fContentModifier.modify(bootstrapContent) ); end; end.
28.272727
116
0.598473
8398dbf7ec29787475e5d41cf48009888fe86c8f
20,060
pas
Pascal
restudio/REStudioMain.pas
iLya2IK/TRegExpr
a4d0ecbf5414344cf63b77450ce170d22ce8a53e
[ "MIT" ]
91
2019-05-28T05:11:03.000Z
2022-03-10T03:53:52.000Z
restudio/REStudioMain.pas
iLya2IK/TRegExpr
a4d0ecbf5414344cf63b77450ce170d22ce8a53e
[ "MIT" ]
155
2019-06-06T12:40:27.000Z
2022-03-11T08:23:26.000Z
restudio/REStudioMain.pas
iLya2IK/TRegExpr
a4d0ecbf5414344cf63b77450ce170d22ce8a53e
[ "MIT" ]
43
2019-06-07T17:30:08.000Z
2022-03-18T05:27:44.000Z
{$I REStudio_inc.pas} unit REStudioMain; {$IFDEF FPC} {$MODE Delphi} {$ENDIF} { Main form of Visual debugger for regular expressions (c) 1999-2004 Andrey V. Sorokin Saint Petersburg, Russia https://sorokin.engineer/ andrey@sorokin.engineer } interface uses {$IFnDEF FPC} Windows, {$ELSE} LCLIntf, LCLType, LMessages, {$ENDIF} Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ComCtrls, ExtCtrls, regexpr, RETestCases {$IFDEF UseProfiler}, StopWatch {$ENDIF}; type TfmREDebuggerMain = class(TForm) btnClose: TBitBtn; grpRegExpr: TGroupBox; lblWWW: TLabel; Bevel1: TBevel; PageControl1: TPageControl; tabExpression: TTabSheet; tabSubstitute: TTabSheet; pnlSubstitutionComment: TPanel; lblSubstitutionComment: TLabel; tabReplace: TTabSheet; pnlReplaceComment: TPanel; lblReplaceComment: TLabel; tabSplit: TTabSheet; btnSplit: TBitBtn; memSplitResult: TMemo; pnlSplitComment: TPanel; lblSplitComment: TLabel; lblSplitResult: TLabel; pnlTopExamples: TPanel; pnlReplaceTemplate: TPanel; lblReplaceString: TLabel; edReplaceString: TMemo; Splitter1: TSplitter; pnlReplaceResult: TPanel; lblReplaceResult: TLabel; memReplaceResult: TMemo; btnReplace: TBitBtn; pnlSubstitutionTemplate: TPanel; lblSubstitutionTemplate: TLabel; memSubstitutionTemplate: TMemo; Splitter2: TSplitter; pnlRegExpr: TPanel; gbModifiers: TGroupBox; chkModifierI: TCheckBox; chkModifierR: TCheckBox; chkModifierS: TCheckBox; chkModifierG: TCheckBox; chkModifierM: TCheckBox; lblRegExpr: TLabel; lblRegExprUnbalancedBrackets: TLabel; edRegExpr: TMemo; edSubExprs: TLabel; cbSubExprs: TComboBox; btnViewPCode: TSpeedButton; Splitter3: TSplitter; pnlSubstitutionResult: TPanel; lblSubstitutionResult: TLabel; memSubstitutionResult: TMemo; pnlInputStrings: TPanel; lblInputString: TLabel; edInputString: TMemo; lblInputStringPos: TLabel; edInputStringPos: TEdit; btnTestString: TBitBtn; btnExecNext: TBitBtn; btnFindRegExprInFile: TBitBtn; cbSubStrs: TComboBox; lblTestResult: TLabel; chkModifierX: TCheckBox; chkUseSubstitution: TCheckBox; btnGetRE: TSpeedButton; pnlRepositoryHint: TPanel; Label1: TLabel; Image1: TImage; lblStopWatch: TLabel; procedure btnViewPCodeClick(Sender: TObject); procedure btnCloseClick(Sender: TObject); procedure btnTestStringClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure btnExecNextClick(Sender: TObject); procedure btnReplaceClick(Sender: TObject); procedure btnSplitClick(Sender: TObject); procedure chkModifierIClick(Sender: TObject); procedure chkModifierSClick(Sender: TObject); procedure chkModifierRClick(Sender: TObject); procedure chkModifierGClick(Sender: TObject); procedure edRegExprChange(Sender: TObject); procedure cbSubExprsClick(Sender: TObject); procedure edInputStringClick(Sender: TObject); procedure edInputStringKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure edInputStringMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure edInputStringMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure edRegExprClick(Sender: TObject); procedure lblRegExprUnbalancedBracketsDblClick(Sender: TObject); procedure edRegExprKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure cbSubStrsClick(Sender: TObject); procedure btnHelpClick(Sender: TObject); procedure chkModifierMClick(Sender: TObject); procedure lblWWWClick(Sender: TObject); procedure chkModifierXClick(Sender: TObject); procedure btnGetREClick(Sender: TObject); procedure FormShow(Sender: TObject); private r : TRegExpr; {$IFDEF UseProfiler} sw : TStopWatch; {$ENDIF} procedure UpdateAndCompileExpression; procedure ProtectedCompilation; procedure ExecIt (AFindNext : boolean); procedure InputStringPosIsChanged; procedure RegExprChanged (AShowErrorPos : boolean = false); procedure RegExprPosIsChanged; procedure SubexprSelected; procedure SubStringSelected; procedure GoToRegExprHomePage; procedure UpdateModifiers; protected fHelpFolder : string; fShowOnce : boolean; //procedure AssignTestCase (ARegularExpression : string); public {$IFDEF FILEVIEWER} procedure HighlightREInFileViewer (AFileViewer : TfmFileViewer); {$ENDIF} property HelpFolder : string read fHelpFolder; end; var fmREDebuggerMain: TfmREDebuggerMain; implementation {$R *.dfm} uses {$IFnDEF FPC} ShellAPI, {$ELSE} {$ENDIF} PCode; const ProductHomePage = 'https://regex.sorokin.engineer'; procedure TfmREDebuggerMain.FormCreate(Sender: TObject); begin r := TRegExpr.Create; {$IFDEF UseProfiler} sw := TStopWatch.Create; {$ENDIF} Caption := Format ('Regular expressions visual debugger (TRegExpr v. %d.%d)', [TRegExpr.VersionMajor, TRegExpr.VersionMinor]); {$IFDEF UseProfiler} if (CPUClockKHz > 0) then begin Caption := Caption + ', ' + IntToStr (Round (CPUClockKHz / 1000.0)) + ' MHz CPU assumed for time measurement'; end; lblStopWatch.Visible := True; lblStopWatch.Caption := ''; {$ENDIF} lblWWW.Hint := ProductHomePage; lblRegExprUnbalancedBrackets.Caption := ''; fShowOnce := false; end; procedure TfmREDebuggerMain.FormDestroy(Sender: TObject); begin {$IFDEF UseProfiler} sw.Free; {$ENDIF} r.Free; end; procedure TfmREDebuggerMain.UpdateModifiers; begin // show effective values of modifiers chkModifierI.Checked := r.ModifierI; chkModifierR.Checked := r.ModifierR; chkModifierS.Checked := r.ModifierS; chkModifierG.Checked := r.ModifierG; chkModifierM.Checked := r.ModifierM; chkModifierX.Checked := r.ModifierX; end; procedure TfmREDebuggerMain.btnViewPCodeClick(Sender: TObject); begin UpdateAndCompileExpression; with TfmPseudoCodeViewer.Create (Application) do begin edSource.Text := r.Expression; Memo1.Lines.Text := r.Dump; ShowModal; end; end; procedure TfmREDebuggerMain.btnCloseClick(Sender: TObject); begin Close; end; procedure TfmREDebuggerMain.UpdateAndCompileExpression; // Syncronize r.Expression with edRegExpr value // and force compilation. begin r.Expression := edRegExpr.Text; ProtectedCompilation; end; procedure TfmREDebuggerMain.ProtectedCompilation; // Force r.e. [re]compilation, catch exceptions // and show error position to user. // Exception then reraised. begin try r.Compile; except on E:Exception do begin // exception during r.e. compilation or execution if E is ERegExpr then if (E as ERegExpr).CompilerErrorPos > 0 then begin // compilation exception - show place of error edRegExpr.SetFocus; edRegExpr.SelStart := (E as ERegExpr).CompilerErrorPos - 1; edRegExpr.SelLength := 1; end; raise; // continue exception processing end; end; end; procedure TfmREDebuggerMain.ExecIt (AFindNext : boolean); var i : integer; res : boolean; s : string; begin try if Not aFindNext then begin r.Expression := edRegExpr.Text; {$IFDEF UseProfiler} sw.Start; {$ENDIF} ProtectedCompilation; {$IFDEF UseProfiler} sw.Stop; lblStopWatch.Caption := 'Compile: ' + sw.TimeStr; {$ENDIF} end; {$IFDEF UseProfiler} sw.Start; {$ENDIF} if AFindNext then res := r.ExecNext // search next occurence. raise // exception if no Exec call preceded else res := r.Exec (edInputString.Text); // search from first position {$IFDEF UseProfiler} sw.Stop; lblStopWatch.Caption := lblStopWatch.Caption + ', Exec: ' + sw.TimeStr; {$ENDIF} if res then begin // r.e. found // Show r.e. positions: 0 - whole r.e., // 1 .. SubExprMatchCount - subexpressions. lblTestResult.Caption := 'Reg.expr found:'; lblTestResult.Font.Color := clGreen; cbSubStrs.Items.Clear; for i := 0 to r.SubExprMatchCount do begin s := '$' + IntToStr (i); if r.MatchPos [i] > 0 then s := s + ' [' + IntToStr (r.MatchPos [i]) + ' - ' + IntToStr (r.MatchPos [i] + r.MatchLen [i] - 1) + ']: ' + r.Match [i] else s := s + ' not found!'; cbSubStrs.Items.AddObject (s, TObject (r.MatchPos [i] + (r.MatchLen [i] ShL 16))); end; cbSubStrs.Visible := True; cbSubStrs.ItemIndex := 0; SubStringSelected; // Perform substitution - example of fill in template memSubstitutionResult.Text := r.Substitute (PChar (memSubstitutionTemplate.Text)); end else begin // r.e. not found cbSubStrs.Visible := False; lblTestResult.Caption := 'Regexpr. not found in string.'; lblTestResult.Font.Color := clPurple; memSubstitutionResult.Text := 'Substitution is not performed'; end; except on E:Exception do begin // exception during r.e. compilation or execution cbSubStrs.Visible := False; lblTestResult.Caption := 'Error: "' + E.Message + '"'; lblTestResult.Font.Color := clRed; memSubstitutionResult.Text := 'Substitution is not performed'; end; end; end; procedure TfmREDebuggerMain.btnTestStringClick(Sender: TObject); begin ExecIt (false); end; procedure TfmREDebuggerMain.btnExecNextClick(Sender: TObject); begin ExecIt (true); end; {$IFDEF FILEVIEWER} procedure TfmREDebuggerMain.HighlightREInFileViewer (AFileViewer : TfmFileViewer); var ExecRes : boolean; begin with AFileViewer do try // exception catcher lblMatchs.Visible := False; cbMatchs.Visible := False; cbMatchs.Items.Clear; RichEdit1.SelectAll; RichEdit1.Color := clBlack; r.Expression := edRegExpr.Text; {$IFDEF UseProfiler} sw.Start; {$ENDIF} ProtectedCompilation; {$IFDEF UseProfiler} sw.Stop; lblStat.Caption := 'Compile: ' + sw.TimeStr; {$ELSE} lblStat.Caption := ''; {$ENDIF} {$IFDEF UseProfiler} sw.Start; {$ENDIF} ExecRes := r.Exec (RichEdit1.Text); {$IFDEF UseProfiler} sw.Stop; {$ENDIF} if ExecRes then REPEAT cbMatchs.Items.AddObject ( copy ( copy (r.InputString, r.MatchPos [0], r.MatchLen [0]), 1, 80), TObject (r.MatchPos [0])); RichEdit1.SelStart := r.MatchPos [0] - 1; RichEdit1.SelLength := r.MatchLen [0]; RichEdit1.Color := clRed; {$IFDEF UseProfiler} sw.Start (False); {$ENDIF} ExecRes := r.ExecNext; {$IFDEF UseProfiler} sw.Stop; {$ENDIF} UNTIL not ExecRes; RichEdit1.SelLength := 0; memExpression.Lines.Text := r.Expression; lblModifiers.Caption := r.ModifierStr; {$IFDEF UseProfiler} lblStat.Caption := lblStat.Caption + ', Exec: ' + sw.TimeStr + ', '; {$ENDIF} lblStat.Caption := lblStat.Caption + Format ('%d match(s) found', [cbMatchs.Items.Count]); lblMatchs.Visible := True; cbMatchs.Visible := True; if cbMatchs.Items.Count > 0 then cbMatchs.ItemIndex := 0; cbMatchs.OnChange (nil); except on E:Exception do begin lblStat.Caption := E.Message; Application.MessageBox ( PChar ('Operation exception:'#$d#$a#$d#$a + E.Message), 'Compilation or execution error', mb_IconExclamation or mb_Ok); end; end; end; {$ENDIF} procedure TfmREDebuggerMain.btnReplaceClick(Sender: TObject); begin UpdateAndCompileExpression; memReplaceResult.Text := r.Replace (edInputString.Text, edReplaceString.Text, chkUseSubstitution.Checked); //###0.947 end; procedure TfmREDebuggerMain.btnSplitClick(Sender: TObject); begin UpdateAndCompileExpression; memSplitResult.Lines.Clear; r.Split (edInputString.Text, memSplitResult.Lines); end; procedure TfmREDebuggerMain.chkModifierIClick(Sender: TObject); begin r.ModifierI := chkModifierI.Checked; // You may use also // r.ModifierStr := 'i'; // or // r.ModifierStr := '-i'; end; procedure TfmREDebuggerMain.chkModifierRClick(Sender: TObject); begin r.ModifierR := chkModifierR.Checked; end; procedure TfmREDebuggerMain.chkModifierSClick(Sender: TObject); begin r.ModifierS := chkModifierS.Checked; end; procedure TfmREDebuggerMain.chkModifierGClick(Sender: TObject); begin r.ModifierG := chkModifierG.Checked; end; procedure TfmREDebuggerMain.chkModifierMClick(Sender: TObject); begin r.ModifierM := chkModifierM.Checked; end; procedure TfmREDebuggerMain.chkModifierXClick(Sender: TObject); begin r.ModifierX := chkModifierX.Checked; end; procedure TfmREDebuggerMain.InputStringPosIsChanged; begin if edInputString.SelLength <= 0 then edInputStringPos.Text := IntToStr (edInputString.SelStart + 1) else edInputStringPos.Text := IntToStr (edInputString.SelStart + 1) + ' - ' + IntToStr (edInputString.SelStart + edInputString.SelLength); end; procedure TfmREDebuggerMain.RegExprChanged (AShowErrorPos : boolean = false); var i : integer; n : integer; s : string; begin n := RegExprSubExpressions (edRegExpr.Text, cbSubExprs.Items, False); case n of //###0.942 0: lblRegExprUnbalancedBrackets.Caption := ''; // No errors -1: lblRegExprUnbalancedBrackets.Caption := 'Not enough ")"'; else begin if n < 0 then begin s := 'No "]" found for "["'; n := Abs (n) - 1; end else s := 'Unexpected ")"'; if AShowErrorPos then begin s := s + ' at pos ' + IntToStr (n); edRegExpr.SetFocus; edRegExpr.SelStart := n - 1; edRegExpr.SelLength := 1; end else s := s + '. Doubleclick here!'; lblRegExprUnbalancedBrackets.Caption := s; end; end; with cbSubExprs.Items do for i := 0 to Count - 1 do Strings [i] := '$' + IntToStr (i) + ': ' + Strings [i]; RegExprPosIsChanged; end; procedure TfmREDebuggerMain.RegExprPosIsChanged; var i : integer; CurrentPos : integer; SEStart, SELen : integer; MinSEIdx : integer; MinSELen : integer; begin MinSEIdx := -1; MinSELen := MaxInt; CurrentPos := edRegExpr.SelStart + 1; with cbSubExprs.Items do begin for i := 0 to Count - 1 do begin SEStart := integer (Objects [i]) and $FFFF; SELen := (integer (Objects [i]) ShR 16) and $FFFF; if (SEStart <= CurrentPos) and (SEStart + SELen > CurrentPos) and (MinSELen > SELen) then begin MinSEIdx := i; MinSELen := SELen; end; end; if (MinSEIdx >= 0) and (MinSEIdx < Count) then cbSubExprs.ItemIndex := MinSEIdx; end; end; procedure TfmREDebuggerMain.SubexprSelected; var n : integer; begin if cbSubExprs.ItemIndex < cbSubExprs.Items.Count then begin n := integer (cbSubExprs.Items.Objects [cbSubExprs.ItemIndex]); edRegExpr.SetFocus; edRegExpr.SelStart := n and $FFFF - 1; edRegExpr.SelLength := (n ShR 16) and $FFFF; end; end; procedure TfmREDebuggerMain.SubStringSelected; var n : integer; begin if cbSubStrs.ItemIndex < cbSubStrs.Items.Count then begin n := integer (cbSubStrs.Items.Objects [cbSubStrs.ItemIndex]); edInputString.SetFocus; edInputString.SelStart := n and $FFFF - 1; edInputString.SelLength := (n ShR 16) and $FFFF; InputStringPosIsChanged; end; end; procedure TfmREDebuggerMain.edRegExprChange(Sender: TObject); begin RegExprChanged; end; procedure TfmREDebuggerMain.cbSubExprsClick(Sender: TObject); begin SubexprSelected; end; procedure TfmREDebuggerMain.edInputStringClick(Sender: TObject); begin InputStringPosIsChanged; end; procedure TfmREDebuggerMain.edInputStringKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin InputStringPosIsChanged; end; procedure TfmREDebuggerMain.edInputStringMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin InputStringPosIsChanged; end; procedure TfmREDebuggerMain.edInputStringMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin InputStringPosIsChanged; end; procedure TfmREDebuggerMain.edRegExprClick(Sender: TObject); begin RegExprPosIsChanged; end; procedure TfmREDebuggerMain.lblRegExprUnbalancedBracketsDblClick(Sender: TObject); begin RegExprChanged (True); end; procedure TfmREDebuggerMain.edRegExprKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin RegExprPosIsChanged; end; procedure TfmREDebuggerMain.cbSubStrsClick(Sender: TObject); begin SubStringSelected; end; procedure TfmREDebuggerMain.GoToRegExprHomePage; var zFileName, zParams, zDir: array [0 .. MAX_PATH] of Char; {$IFNDEF FPC} URL : String; {$ENDIF} begin {$IFDEF FPC} OpenURL(StrPCopy (zFileName, 'http://' + ProductHomePage)); { *Converted from ShellExecute* } {$ELSE} URL:='http://' + ProductHomePage; ShellExecute(0,'OPEN',PChar(URL),Nil,Nil,0); { *Converted from ShellExecute* } {$ENDIF} end; procedure TfmREDebuggerMain.btnHelpClick(Sender: TObject); begin if not FileExists (Application.HelpFile) then begin case Application.MessageBox ( PChar ('The help in language You''ve selected is not found' + ' at the "' + ExtractFilePath (Application.HelpFile) + '".'#$d#$a#$d#$a + 'Press Yes if You want to go to my home page to obtain it,' + ' or Press No if it stored in different folder at Your computer,' + ' or press Cancel to cancel the action.'), PChar ('Cannot find help file "' + Application.HelpFile + '"'), MB_YESNOCANCEL or MB_ICONQUESTION) of IDYES: begin GoToRegExprHomePage; EXIT; end; IDNO:; // just skip it thru windows help system - it will ask user for help file path else EXIT; // must be cancel or error in showing of the message box end; end; Application.HelpCommand (HELP_FINDER, 0); end; procedure TfmREDebuggerMain.lblWWWClick(Sender: TObject); begin GoToRegExprHomePage; end; //procedure TfmREDebuggerMain.AssignTestCase (ARegularExpression : IXMLRegularExpressionType); // begin // if not Assigned (ARegularExpression) then begin // Application.MessageBox ( // 'R.e. test case is not loadeded!', // 'No r.e. is selected', mb_IconExclamation or mb_Ok); // // EXIT; // // end; // // with ARegularExpression do begin // edRegExpr.Text := Expression; // if TestCase.Count > 0 then // with TestCase [0] do begin // // edInputString.Text := (TestCase [0].Subject as ISubjectType).Text; // if Substitution.Count > 0 // then memSubstitutionTemplate.Text := Substitution [0].Template // else memSubstitutionTemplate.Text := ''; // if Replace.Count > 0 // then edReplaceString.Text := Replace [0].Template // else edReplaceString.Text := ''; // // chkUseSubstitution.Checked := ; // r.ModifierStr := Modifiers; // UpdateModifiers; // end // else begin // edInputString.Text := ''; // memSubstitutionTemplate.Text := ''; // edReplaceString.Text := ''; // end; // end; // end; procedure TfmREDebuggerMain.btnGetREClick(Sender: TObject); begin //with fmTestCases do begin // Caption := 'Select r.e. to load into debugger'; // if ShowModal = mrYes // then AssignTestCase (RegularExpression); // end; { with fmRETestCasesDlg do begin Caption := 'Select r.e. to load into debugger'; if ShowModal = mrYes then AssignTestCase (RE); end; } end; procedure TfmREDebuggerMain.FormShow(Sender: TObject); begin if fShowOnce then EXIT; fShowOnce := True; // with fmTestCases do // if Assigned (RegularExpression) // then AssignTestCase (RegularExpression); InputStringPosIsChanged; end; end.
27.899861
95
0.686391
f14ee6cd52ae95f36154241940132acb15355a21
4,194
pas
Pascal
headers_fmx/sdos_fat_vars_user_inc.inc.pas
Dennis1000/c256-pasdev-units
d770322c50114ee33d33300df42699b967506a8b
[ "MIT" ]
null
null
null
headers_fmx/sdos_fat_vars_user_inc.inc.pas
Dennis1000/c256-pasdev-units
d770322c50114ee33d33300df42699b967506a8b
[ "MIT" ]
null
null
null
headers_fmx/sdos_fat_vars_user_inc.inc.pas
Dennis1000/c256-pasdev-units
d770322c50114ee33d33300df42699b967506a8b
[ "MIT" ]
null
null
null
//// //// Data storage needed by the file system (internal variables user apps shouldn't need) //// //// NOTE: these locations are correct for the C256 Foenix User //// // Device information from master boot record and boot sector const DOS_HIGH_VARIABLES = $38A000; DEVICE = $38A000; // 1 byte - The number of the block device FILE_SYSTEM = $38A001; // 1 byte - The type of filesystem (FAT12, FAT32, etc.) PARTITION = $38A002; // 1 byte - The number of the partitions on the device SECTORS_PER_CLUSTER = $38A003; // 1 byte - The number of sectors in a cluster FIRSTSECTOR = $38A004; // 4 bytes - The LBA of the first sector on the volume SECTORCOUNT = $38A008; // 4 bytes - The number of sectors in the volume NUM_RSRV_SEC = $38A00C; // 2 bytes - The number of hidden or reserved sectors CLUSTER_SIZE = $38A00E; // 2 bytes - The size of a cluster in bytes SEC_PER_FAT = $38A010; // 4 bytes - The number of sectors per FAT FAT_BEGIN_LBA = $38A014; // 4 bytes - The LBA of the first sector of FAT #1 FAT2_BEGIN_LBA = $38A018; // 4 bytes - The LBA of the first sector of FAT #2 CLUSTER_BEGIN_LBA = $38A01C; // 4 bytes - The LBA of the first cluster in the storage area ROOT_DIR_FIRST_CLUSTER = $38A020; // 4 bytes - The number of the first cluster in the root directory ROOT_DIR_MAX_ENTRY = $38A024; // 2 bytes - The maximum number of entries in the root directory (0 = no limit) VOLUME_ID = $38A026; // 4 bytes - The ID of the volume // Other variables we don't need in bank 0 DOS_CURR_CLUS = $38A02A; // 4 bytes - The current cluster (for delete) DOS_NEXT_CLUS = $38A02E; // 4 bytes - The next cluster in a file (for delete) DOS_DIR_BLOCK_ID = $38A032; // 4 bytes - The ID of the current directory block // If DOS_DIR_TYPE = 0, this is a cluster ID // If DOS_DIR_TYPE = $80, this is a sector LBA DOS_NEW_CLUSTER = $38A036; // 4 bytes - Space to store a newly written cluster ID DOS_SHORT_NAME = $38A03A; // 11 bytes - The short name for a desired file DOS_DIR_TYPE = $38A045; // 1 byte - a code indicating the type of the current directory (0 = cluster based, $80 = sector based) DOS_CURR_DIR_ID = $38A046; // 4 byte - the ID of the first sector or cluster of the current directory DOS_DEV_NAMES = $38A04A; // 4 byte - pointer to the linked list of device names FDC_MOTOR_TIMER = $38A04E; // 2 bytes - count-down timer to automatically turn off the FDC spindle motor DOS_MOUNT_DEV = $38A050; // 1 byte - the device code of the currently mounted device // Larger buffers DOS_DIR_CLUSTER = $38A100; // 512 bytes - A buffer for directory entries DOS_DIR_CLUSTER_END = $38A300; // The byte just past the end of the directory cluster buffer DOS_SECTOR = $38A300; // 512 bytes - A buffer for block device read/write DOS_SECTOR_END = $38A500; // The byte just past the end of the cluster buffer DOS_FAT_SECTORS = $38A500; // 1024 bytes - two sectors worth of the FAT DOS_FAT_SECTORS_END = $38A900; // The byte just past the end of the FAT buffers DOS_BOOT_SECTOR = $38A900; // A sector for holding the boot sector DOS_BOOT_SECTOR_END = $38AB00; DOS_SPARE_SECTOR = $38AB00; // A spare 512 byte buffer for loading sectors DOS_SPARE_SECTOR_END = $38AD00; DOS_SPARE_FD = $38AD00; // A spare file descriptor buffer DOS_SPARE_FD_END = DOS_SPARE_FD + SIZE(FILEDESC); // Space for allocatable file descriptors (8 file descriptors of 32 bytes each) DOS_FILE_DESCS = DOS_SPARE_FD_END; DOS_FILE_DESCS_END = DOS_FILE_DESCS + SIZE(FILEDESC) * DOS_FD_MAX; // Space for sector buffers for the file descriptors (8 buffers of 512 bytes each) DOS_FILE_BUFFS = $38B000; DOS_FILE_BUFFS_END = DOS_FILE_BUFFS + DOS_SECTOR_SIZE * DOS_FD_MAX;
65.53125
141
0.639962
83b5a08b3c49bff8b2a20176ae65f753f77b8aa5
366
dpr
Pascal
Projects/Lazarus_Bible/D_XE/Aboutex.dpr
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
11
2017-06-17T05:13:45.000Z
2021-07-11T13:18:48.000Z
Projects/Lazarus_Bible/D_XE/Aboutex.dpr
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
2
2019-03-05T12:52:40.000Z
2021-12-03T12:34:26.000Z
Projects/Lazarus_Bible/D_XE/Aboutex.dpr
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
6
2017-09-07T09:10:09.000Z
2022-02-19T20:19:58.000Z
program Aboutex; uses Forms, ABOUT in '..\Source\AboutEx\ABOUT.PAS' {AboutForm} , Frm_AboutExMAIN in '..\Source\AboutEx\Frm_AboutExMAIN.PAS' {MainForm}; {$E EXE} {$R *.RES} begin Application.Title := 'Demo: AboutEx'; Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TAboutForm, AboutForm); Application.Run; end.
20.333333
73
0.685792
852d24ccc2ec0d14f92134bc7598dd553af577eb
49
pas
Pascal
Framework/Controls/DXGUIEdit.pas
flobernd/directx-gui
0937fae803af83d03e484b96103b6ef03a185daa
[ "MIT" ]
12
2016-03-25T16:07:48.000Z
2021-09-05T20:13:18.000Z
Framework/Controls/DXGUIEdit.pas
flobernd/directx-gui
0937fae803af83d03e484b96103b6ef03a185daa
[ "MIT" ]
null
null
null
Framework/Controls/DXGUIEdit.pas
flobernd/directx-gui
0937fae803af83d03e484b96103b6ef03a185daa
[ "MIT" ]
2
2018-01-02T06:52:23.000Z
2020-09-06T04:15:12.000Z
unit DXGUIEdit; interface implementation end.
6.125
15
0.795918
61bbb6e2a421ea86df7deae602d1373467cbd226
2,114
pas
Pascal
Apps/Car/Solutions/Delphi/VCL/fmain.pas
VincentGsell/APE
c1cc07b05a008ead95b6ee4d45c83825c1cc77d0
[ "MIT" ]
14
2018-05-25T17:41:00.000Z
2021-11-01T05:04:39.000Z
Apps/Car/Solutions/Delphi/VCL/fmain.pas
VincentGsell/APE
c1cc07b05a008ead95b6ee4d45c83825c1cc77d0
[ "MIT" ]
null
null
null
Apps/Car/Solutions/Delphi/VCL/fmain.pas
VincentGsell/APE
c1cc07b05a008ead95b6ee4d45c83825c1cc77d0
[ "MIT" ]
3
2018-06-28T22:44:28.000Z
2021-10-31T18:04:55.000Z
unit fmain; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uCarLevel, uRenderer.NativeCanvas, Vcl.ExtCtrls; type TFormCar = class(TForm) TimerCarApp: TTimer; procedure FormCreate(Sender: TObject); procedure TimerCarAppTimer(Sender: TObject); procedure FormPaint(Sender: TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); private { Private declarations } function IsKeyDown(k: Char): boolean; Overload; function IsKeyDown(w: Word): boolean; Overload; Procedure InitKeyboard; public Keys: array[word] of boolean; { Public declarations } TheLevel : TLevel; Renderer : TNativeCanvasRenderer; end; var FormCar: TFormCar; implementation {$R *.dfm} procedure TFormCar.FormCreate(Sender: TObject); begin Renderer := TNativeCanvasRenderer.Create(Canvas); TheLevel := TLevel.Create(Renderer); DoubleBuffered := true; end; function TFormCar.IsKeyDown(k: Char): boolean; var w : Word; begin w := ord(upcase(k)); result := IsKeyDown(w); end; function TFormCar.IsKeyDown(w: Word): boolean; begin result := Keys[w]; end; procedure TFormCar.TimerCarAppTimer(Sender: TObject); begin TimerCarApp.Enabled := false; try if IsKeyDown('a') then TheLevel.aCar.Speed := 0.2 else if IsKeyDown('d') then TheLevel.aCar.Speed := -0.2 else TheLevel.aCar.Speed := 0; TheLevel.Progress; Invalidate; finally TimerCarApp.Enabled := true; end; end; procedure TFormCar.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin Keys[Key] := true; end; procedure TFormCar.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); begin Keys[Key] := false; end; procedure TFormCar.FormPaint(Sender: TObject); begin TheLevel.Render; end; procedure TFormCar.InitKeyboard; var i : Word; begin for i := 0 to Length(Keys)-1 do Keys[i] := false; end; end.
20.133333
98
0.705298
8531f81e9d39a7044af0a4f6b7d5f5aca947c345
31,395
pas
Pascal
Unit1.pas
Swanty/Tardsplaya
45bb04c2f7f02e3b6717b28dd199b6181b63bcc9
[ "MIT" ]
34
2015-01-13T23:32:56.000Z
2021-03-26T05:36:55.000Z
Unit1.pas
Swanty/Tardsplaya
45bb04c2f7f02e3b6717b28dd199b6181b63bcc9
[ "MIT" ]
2
2018-08-31T20:08:03.000Z
2019-04-28T13:26:49.000Z
Unit1.pas
Swanty/Tardsplaya
45bb04c2f7f02e3b6717b28dd199b6181b63bcc9
[ "MIT" ]
14
2016-03-05T10:57:39.000Z
2021-04-10T10:30:46.000Z
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, superobject, OverbyteIcsUrl, OverbyteIcsHttpProt, OverbyteIcsCookies, OverbyteIcsWSocket, OverbyteIcsHttpCCodZLib {gzip}, System.Generics.Collections, OtlThreadPool, OtlComm, OtlTask, OtlTaskControl, OtlParallel, OtlCollections, OtlCommon, Unit2, Winsock, ShellApi, Vcl.ComCtrls, System.DateUtils, uHash, Vcl.Menus, System.IniFiles, frmSettings; type TForm1 = class(TForm) StatusBar1: TStatusBar; PageControl1: TPageControl; TabSheet1: TTabSheet; TabSheet2: TTabSheet; lblChannel: TLabel; edtChannel: TEdit; btnLoad: TButton; lblQuality: TLabel; btnWatch: TButton; lstQuality: TListBox; lblClusterTitle: TLabel; lblClusterVal: TLabel; chkAutoScroll: TCheckBox; chkEnableLogging: TCheckBox; lvLog: TListView; lblTardsNet: TLabel; lblFavorites: TLabel; lstFavorites: TListBox; btnAddFavorite: TButton; btnDeleteFavorite: TButton; btnEditFavorite: TButton; btnCheckVersion: TButton; chkLogOnlyErrors: TCheckBox; PopupMenu1: TPopupMenu; Clear1: TMenuItem; btnIncSections: TButton; btnDecSections: TButton; lblSectionsVal: TLabel; lblSectionsTitle: TLabel; MainMenu1: TMainMenu; File1: TMenuItem; Exit1: TMenuItem; ools1: TMenuItem; Settings1: TMenuItem; procedure FormCreate(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure btnWatchClick(Sender: TObject); procedure btnLoadClick(Sender: TObject); procedure lstQualityClick(Sender: TObject); procedure lblTardsNetClick(Sender: TObject); procedure lstFavoritesClick(Sender: TObject); procedure lstFavoritesDblClick(Sender: TObject); procedure lstFavoritesDragDrop(Sender, Source: TObject; X, Y: Integer); procedure lstFavoritesDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); procedure lstFavoritesMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure btnEditFavoriteClick(Sender: TObject); procedure btnDeleteFavoriteClick(Sender: TObject); procedure btnAddFavoriteClick(Sender: TObject); procedure btnCheckVersionClick(Sender: TObject); procedure Clear1Click(Sender: TObject); procedure btnIncSectionsClick(Sender: TObject); procedure btnDecSectionsClick(Sender: TObject); procedure Exit1Click(Sender: TObject); procedure Settings1Click(Sender: TObject); private FSectionCount: Integer; FPlayerHandle: THandle; FHelloWorker: IOmniTaskControl; FWritingStream: Boolean; FStreamUrlQueue: TList<TStreamUrlQueueItem>; FStreamUrl: string; FStreamPath: string; startingPoint: TPoint; procedure CheckFavorites(); procedure SaveFavorites(); procedure DeleteFavorite; procedure DoGetVideo; procedure TaskMessageProc(const task: IOmniTaskControl; const msg: TOmniMessage); procedure UpdateQueueText(q: Integer); procedure FreeQualities; procedure WriteToLog(str: String; isError: Boolean); public { Public declarations } end; type TFakeClass = class IcsCookies: TIcsCookies; procedure HTTPSetCookie(Sender: TObject; const Data: String; var Accept: Boolean); end; type TExtInf = class duration: Double; url: string; constructor Create(durationStr: string; url: string); end; type THelloWorker = class(TOmniWorker) strict private FStreamUrl : string; FLastTime: TDateTime; HttpCli1: THttpCli; DataIn: TMemoryStream; tmpStr: string; strList: TStringList; FExtMediaSequence: Integer; extInfs: TList<TExtInf>; private public constructor Create(const streamUrl: string); destructor Destroy; override; function Initialize: boolean; override; procedure StartWork(var msg: TMessage); message MSG_START_WORK; end; type TQuality = class public name: string; url: string; resolution: string; bitrate: string; end; var Form1: TForm1; PlayerPath: string; PlayerCmd: string; AutoConfirmFavoriteDeletion: Boolean; defaultPlayerPath: string; defaultPlayerCmd: string; procedure SetFormIcons(FormHandle: HWND; SmallIconName, LargeIconName: string); implementation {$R *.dfm} procedure TFakeClass.HTTPSetCookie(Sender: TObject; const Data: String; var Accept: Boolean); begin IcsCookies.SetCookie(Data, (Sender as THttpCli).Url); end; function DateTimeToUNIXTimeFAST(DelphiTime: TDateTime): LongWord; begin Result := Round((DelphiTime - 25569) * 86400); end; function SplitExt(line: string): TStringList; var tmpStr: string; begin Result := TStringList.Create; tmpStr := line; tmpStr := tmpStr.Replace('"', ''); Result.CommaText := tmpStr; end; procedure TForm1.WriteToLog(str:String; isError: Boolean); begin if chkEnableLogging.Checked then begin if ((chkLogOnlyErrors.Checked) and (isError)) or (not chkLogOnlyErrors.Checked) then begin with lvLog.Items.Add do begin Caption := FormatDateTime('hh:nn:ss.zzz', Now); SubItems.Add(str); if chkAutoScroll.Checked then begin MakeVisible(False); end; end; end; end; end; function DataInToString(DataIn: TMemoryStream): string; var SR: TStreamReader; begin DataIn.Seek(0, soBeginning); SR := TStreamReader.Create(DataIn, TEncoding.UTF8, True); try Result := SR.ReadToEnd; finally FreeAndNil(SR); end; end; procedure TForm1.FreeQualities(); var i: Integer; begin lblClusterVal.Caption := '-'; if lstQuality.Items.Count > 0 then begin for i := 0 to lstQuality.Items.Count - 1 do begin lstQuality.Items.Objects[i].Free; end; lstQuality.Items.Clear; end; end; procedure TForm1.lblTardsNetClick(Sender: TObject); begin ShellExecute(0, 'OPEN', PWideChar('http://tards.net/'), '', '', SW_SHOWNORMAL); end; procedure TForm1.lstQualityClick(Sender: TObject); begin if lstQuality.ItemIndex > -1 then begin btnWatch.Enabled := True; end else begin btnWatch.Enabled := False; end; end; procedure TForm1.lstFavoritesClick(Sender: TObject); begin CheckFavorites; end; procedure TForm1.lstFavoritesDblClick(Sender: TObject); begin if lstFavorites.ItemIndex > -1 then begin edtChannel.Text := lstFavorites.Items[lstFavorites.ItemIndex]; end; end; procedure TForm1.lstFavoritesDragDrop(Sender, Source: TObject; X, Y: Integer); var DropPosition, StartPosition: Integer; DropPoint: TPoint; begin DropPoint.X := X; DropPoint.Y := Y; with Source as TListBox do begin StartPosition := ItemAtPos(startingPoint, true); DropPosition := ItemAtPos(DropPoint, true); if (StartPosition <> -1) and (DropPosition <> -1) then begin Items.Move(StartPosition, DropPosition); SaveFavorites(); end; end; end; procedure TForm1.lstFavoritesDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := Source = lstFavorites; end; procedure TForm1.lstFavoritesMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin startingPoint.X := X; startingPoint.Y := Y; end; procedure TForm1.btnCheckVersionClick(Sender: TObject); const MSG_URL_ERROR = 1; MSG_URL_DONE = 2; begin btnCheckVersion.Enabled := False; btnCheckVersion.Caption := 'Checking...'; CreateTask( procedure(const task: IOmniTask) var HttpCli1: THttpCli; DataIn: TMemoryStream; tmpStr: string; hsh: string; begin hsh := GetFileHash(ParamStr(0)); hsh := hsh.ToLower; DataIn := TMemoryStream.Create; HttpCli1 := THttpCli.Create(nil); try try HttpCli1.Agent := 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36'; HttpCli1.Accept := '*/*'; HttpCli1.FollowRelocation := True; //HttpCli1.Connection := 'Keep-Alive'; HttpCli1.RequestVer := '1.1'; HttpCli1.Options := HttpCli1.Options + [httpoEnableContentCoding]; // gzip HttpCli1.Timeout := 30; HttpCli1.NoCache := True; HttpCli1.RcvdStream := DataIn; {$IFDEF DEBUG} HttpCli1.Proxy := '127.0.0.1'; HttpCli1.ProxyPort := '6969'; {$ENDIF} DataIn.Clear; HttpCli1.URL := 'http://tards.net/latest.txt'; try HttpCli1.Get; except on E: Exception do begin task.Comm.Send(MSG_URL_ERROR, Format('[1] Error: %s', [E.Message])); Exit; end; end; tmpStr := DataInToString(DataIn); if tmpStr = '' then begin task.Comm.Send(MSG_URL_ERROR, '[2] Error: result empty'); Exit; end; if tmpStr.ToLower = hsh then task.Comm.Send(MSG_URL_DONE, false) else task.Comm.Send(MSG_URL_DONE, true); except on E: Exception do begin task.Comm.Send(MSG_URL_ERROR, Format('[3] Error: %s', [E.Message])); end; end; finally FreeAndNil(DataIn); FreeAndNil(HttpCli1); end; end ) .OnMessage( procedure(const task: IOmniTaskControl; const msg: TOmniMessage) begin case msg.MsgID of MSG_URL_ERROR: begin btnCheckVersion.Enabled := True; btnCheckVersion.Caption := 'Check Version'; MessageBox(0, PWideChar(msg.MsgData.AsString), 'Tardsplaya', MB_OK or MB_ICONEXCLAMATION); end; MSG_URL_DONE: begin btnCheckVersion.Enabled := True; btnCheckVersion.Caption := 'Check Version'; if msg.MsgData.AsBoolean then MessageBox(0, 'YAY! There''s a new version.'#13#10'You can download it from tards.net. =))', 'Tardsplaya', MB_OK or MB_ICONINFORMATION) else MessageBox(0, 'Nop. Nothing new. =(', 'Tardsplaya', MB_OK or MB_ICONEXCLAMATION); end; end; end ) .Unobserved .Schedule; end; procedure TForm1.btnLoadClick(Sender: TObject); const MSG_URL_ERROR = 1; MSG_URL_QUALITY = 2; MSG_URL_DONE = 3; var json: ISuperObject; channelName: string; begin btnLoad.Enabled := False; btnLoad.Caption := 'Loading...'; btnWatch.Enabled := False; lstQuality.Enabled := False; lvLog.Clear; channelName := edtChannel.Text; channelName := channelName.ToLower; FreeQualities(); lstQuality.Enabled := False; CreateTask( procedure(const task: IOmniTask) var channel: String; HttpCli1: THttpCli; DataIn: TMemoryStream; tmpStr: string; json: ISuperObject; strList: TStringList; ext: TStringList; i: Integer; tmpCluster, tmpName, tmpResolution, tmpBitrate, tmpUrl: string; quality: TQuality; begin channel := task.Param['channel'].AsString; DataIn := TMemoryStream.Create; HttpCli1 := THttpCli.Create(nil); strList := TStringList.Create; try try HttpCli1.Agent := 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36'; HttpCli1.Accept := '*/*'; HttpCli1.FollowRelocation := True; //HttpCli1.Connection := 'Keep-Alive'; HttpCli1.RequestVer := '1.1'; HttpCli1.Options := HttpCli1.Options + [httpoEnableContentCoding]; // gzip HttpCli1.Timeout := 30; HttpCli1.NoCache := True; HttpCli1.RcvdStream := DataIn; {$IFDEF DEBUG} //HttpCli1.Proxy := '127.0.0.1'; //HttpCli1.ProxyPort := '6969'; {$ENDIF} DataIn.Clear; HttpCli1.URL := 'http://api.twitch.tv/api/channels/' + channel + '/access_token?rnd=' + IntToStr(DateTimeToUNIXTimeFAST(Now())); try HttpCli1.Get; except on E: Exception do begin if (E.Message = 'Not Found') then begin task.Comm.Send(MSG_URL_ERROR, '[1] Error: Channel not found'); end else begin task.Comm.Send(MSG_URL_ERROR, Format('[1] Error: %s', [E.Message])); end; Exit; end; end; tmpStr := DataInToString(DataIn); if tmpStr = '' then begin task.Comm.Send(MSG_URL_ERROR, '[2] Error: access token empty'); Exit; end; try json := SO(tmpStr); except on E: Exception do begin task.Comm.Send(MSG_URL_ERROR, Format('[3] Error: %s', [E.Message])); Exit; end; end; DataIn.Clear; HttpCli1.URL := 'http://usher.twitch.tv/api/channel/hls/' + channel + '.m3u8?sig=' + UrlEncode(json.AsObject.S['sig']) + '&token=' + UrlEncode(json.AsObject.S['token']) + '&allow_source=true&type=any&private_code=&rnd=' + IntToStr(DateTimeToUNIXTimeFAST(Now())); try HttpCli1.Get; except on E: Exception do begin if (E.Message = 'Not Found') then begin task.Comm.Send(MSG_URL_ERROR, '[4] Error: Stream not online'); end else begin task.Comm.Send(MSG_URL_ERROR, Format('[4] Error: %s', [E.Message])); end; Exit; end; end; strList.Text := DataInToString(DataIn); if not strList[0].StartsWith('#EXTM3U') then begin task.Comm.Send(MSG_URL_ERROR, '[5] Error: no stream found'); Exit; end; for i := 0 to strList.Count - 1 do begin if strList[i].StartsWith('#EXT-X') then begin if strList[i].StartsWith('#EXT-X-MEDIA:') then begin ext := SplitExt(strList[i].Replace('#EXT-X-MEDIA:', '')); tmpName := ext.Values['NAME']; ext.Free; end else if strList[i].StartsWith('#EXT-X-STREAM-INF:') then begin ext := SplitExt(strList[i].Replace('#EXT-X-STREAM-INF:', '')); tmpResolution := ext.Values['RESOLUTION']; tmpBitrate := ext.Values['BANDWIDTH']; ext.Free; end else if strList[i].StartsWith('#EXT-X-TWITCH-INFO:') then begin ext := SplitExt(strList[i].Replace('#EXT-X-TWITCH-INFO:', '')); tmpCluster := ext.Values['CLUSTER']; ext.Free; end; end else begin if strList[i].Contains('://') then begin tmpUrl := strList[i]; if tmpResolution <> '' then tmpName := tmpName + ' - ' + tmpResolution + ' ' + IntToStr(StrToInt(tmpBitrate) div 1024) + ' kbps' else tmpName := tmpName + ' - ' + IntToStr(StrToInt(tmpBitrate) div 1024) + ' kbps'; quality := TQuality.Create; quality.name := tmpName; quality.url := tmpUrl; quality.resolution := tmpResolution; quality.bitrate := tmpBitrate; task.Comm.Send(MSG_URL_QUALITY, quality); end; end; end; task.Comm.Send(MSG_URL_DONE, tmpCluster); except on E: Exception do begin task.Comm.Send(MSG_URL_ERROR, Format('[6] Error: %s', [E.Message])); end; end; finally FreeAndNil(strList); FreeAndNil(DataIn); FreeAndNil(HttpCli1); end; end ) .OnMessage( procedure(const task: IOmniTaskControl; const msg: TOmniMessage) var quality: TQuality; begin case msg.MsgID of MSG_URL_ERROR: begin btnLoad.Enabled := True; btnLoad.Caption := '1. Load'; MessageBox(0, PWideChar(msg.MsgData.AsString), 'Tardsplaya', MB_OK or MB_ICONEXCLAMATION); end; MSG_URL_QUALITY: begin quality := TQuality(msg.MsgData.AsObject); lstQuality.Items.AddObject(quality.name, quality); end; MSG_URL_DONE: begin btnLoad.Enabled := True; btnLoad.Caption := '1. Load'; lblClusterVal.Caption := msg.MsgData.AsString; lstQuality.Enabled := True; end; end; end ) .SetParameter('channel', channelName) .Unobserved .Schedule; end; procedure TForm1.btnWatchClick(Sender: TObject); var index: Integer; begin FStreamUrl := TQuality(lstQuality.Items.Objects[lstQuality.ItemIndex]).url; edtChannel.Enabled := False; btnLoad.Enabled := False; lstQuality.Enabled := False; btnWatch.Enabled := False; index := FStreamUrl.LastIndexOf('/'); FStreamPath := FStreamUrl.Substring(0, index + 1); if not InitWinsock then begin Exit end; DoGetVideo; end; procedure TForm1.btnAddFavoriteClick(Sender: TObject); var value: string; begin value := InputBox('Add Favorite', 'Channel', ''); if value <> '' then begin lstFavorites.Items.Add(value); SaveFavorites(); end; CheckFavorites(); end; procedure TForm1.btnDecSectionsClick(Sender: TObject); begin FSectionCount := FSectionCount - 1; if FSectionCount = 1 then begin btnDecSections.Enabled := False; end; btnIncSections.Enabled := True; lblSectionsVal.Caption := IntToStr(FSectionCount); WriteToLog('Section count changed to ' + lblSectionsVal.Caption, False); end; procedure TForm1.btnIncSectionsClick(Sender: TObject); begin FSectionCount := FSectionCount + 1; if FSectionCount = 4 then begin btnIncSections.Enabled := False; end; btnDecSections.Enabled := True; lblSectionsVal.Caption := IntToStr(FSectionCount); WriteToLog('Section count changed to ' + lblSectionsVal.Caption, False); end; procedure TForm1.btnDeleteFavoriteClick(Sender: TObject); begin if lstFavorites.ItemIndex > -1 then begin if AutoConfirmFavoriteDeletion then begin DeleteFavorite(); end else begin if Application.MessageBox (PWideChar(Format('You sure you want to delete "%s" from your favorites?', [lstFavorites.Items[lstFavorites.ItemIndex]])), 'Delete Favorite', MB_YESNO + MB_ICONQUESTION) = IDYES then begin DeleteFavorite(); end; end; end; CheckFavorites(); end; procedure TForm1.btnEditFavoriteClick(Sender: TObject); var value: string; begin if lstFavorites.ItemIndex > -1 then begin value := InputBox('Edit Favorite', 'Channel', lstFavorites.Items[lstFavorites.ItemIndex]); if value <> '' then begin lstFavorites.Items[lstFavorites.ItemIndex] := value; SaveFavorites(); end; end; CheckFavorites(); end; procedure TForm1.DoGetVideo; begin FHelloWorker := CreateTask(THelloWorker.Create(FStreamUrl)) .OnMessage(TaskMessageProc) //.SetParameter('ChannelName', channel.ToLower) .Unobserved .Schedule; end; procedure TForm1.Exit1Click(Sender: TObject); begin ExitProcess(0); end; procedure SetFormIcons(FormHandle: HWND; SmallIconName, LargeIconName: string); var hIconS, hIconL: Integer; begin hIconS := LoadIcon(hInstance, PChar(SmallIconName)); if hIconS > 0 then begin hIconS := SendMessage(FormHandle, WM_SETICON, ICON_SMALL, hIconS); if hIconS > 0 then DestroyIcon(hIconS); end; hIconL := LoadIcon(hInstance, PChar(LargeIconName)); if hIconL > 0 then begin hIconL := SendMessage(FormHandle, WM_SETICON, ICON_BIG, hIconL); if hIconL > 0 then DestroyIcon(hIconL); end; end; procedure TForm1.FormCreate(Sender: TObject); var IniFile: TIniFile; fn: string; begin FStreamUrlQueue := TList<TStreamUrlQueueItem>.Create; GlobalOmniThreadPool.MaxExecuting := 12; SetFormIcons(Handle, 'MAINICON', 'MAINICON'); {$IFDEF DEBUG} edtChannel.Text := 'end0re'; {$ENDIF} defaultPlayerPath := 'MPC-HC\mpc-hc.exe'; defaultPlayerCmd := '-'; PlayerPath := defaultPlayerPath; PlayerCmd := defaultPlayerCmd; AutoConfirmFavoriteDeletion := False; fn := ChangeFileExt(Application.ExeName, '.ini'); if FileExists(fn) then begin IniFile := TIniFile.Create(fn); try PlayerPath := IniFile.ReadString('Settings', 'PlayerPath', defaultPlayerPath); PlayerCmd := IniFile.ReadString('Settings', 'PlayerCmd', defaultPlayerCmd); AutoConfirmFavoriteDeletion := IniFile.ReadBool('Settings', 'AutoConfirmFavoriteDeletion', False); finally IniFile.Free; end; end; FSectionCount := 4; fn := ExtractFilePath(ParamStr(0)) + 'favorites.txt'; if FileExists(fn) then begin lstFavorites.Items.LoadFromFile(fn); end; end; procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); var i: Integer; begin TerminateProcess(FPlayerHandle, 0); ExitProcess(0); // GlobalOmniThreadPool.CancelAll; // WSACleanup(); // for i := 0 to FStreamUrlQueue.Count - 1 do // FStreamUrlQueue[i].Free; // FStreamUrlQueue.Free; // FreeQualities(); end; { TExtInf } function IsNumericString(const inStr: string): Boolean; var i: extended; begin Result := TryStrToFloat(inStr,i); end; constructor TExtInf.Create(durationStr, url: string); var spl: string; index: Integer; fmt: TFormatSettings; begin fmt := TFormatSettings.Create; fmt.DecimalSeparator := '.'; spl := durationStr.Split([','])[0]; index := AnsiPos('.', spl); if index > 0 then spl := spl.Substring(0, index + 1); Self.duration := StrToFloat(spl, fmt); Self.url := url; end; procedure TForm1.UpdateQueueText(q:Integer); begin StatusBar1.Panels[0].Text := Format('Chunk Queue: %d', [q]); end; procedure DoCheckPlayer(const task: IOmniTask); var FHandle: THandle; begin FHandle := THandle(task.Param['handle']); while WaitForSingleObject(FHandle, 50) <> 0 do begin end; ExitProcess(0); //task.Comm.Send(MSG_PLAYER_EXIT); end; procedure SaveBufferToFile(fileName:string;buffer:Pointer;len:Int64); var fs: TFileStream; begin if FileExists(fileName) then DeleteFile(fileName); fs := TFileStream.Create(fileName, fmCreate); try fs.WriteBuffer(buffer, len); finally fs.Free; end; end; procedure TForm1.TaskMessageProc(const task: IOmniTaskControl; const msg: TOmniMessage); procedure MsgProcCreateDlStreamTask(itm: TStreamUrlQueueItem; startIndex: Int64; endIndex: Int64); var chunk: TStreamChunk; begin chunk := TStreamChunk.Create; chunk.queueItem := itm; chunk.startIndex := startIndex; chunk.endIndex := endIndex; //WriteToLog(Format('Create part for task %d', [itm.id])); CreateTask(DoDlStream) .OnMessage(TaskMessageProc) .SetParameter('chunk', chunk) .Unobserved .Schedule; end; procedure MsgProcCreateWriteStreamTask(itm: TStreamUrlQueueItem); begin WriteToLog(Format('Begin feeding chunk %d to player', [itm.id]), False); CreateTask(WriteStreamToPlayer) .OnMessage(TaskMessageProc) .SetParameter('item', itm) .Unobserved .Schedule; end; var i: integer; qitem: TStreamUrlQueueItem; chunk: TStreamChunk; chunkSize: Int64; begin //task.Param['ChannelName'].AsString; case msg.MsgID of MSG_PLAYER_HANDLE: begin FPlayerHandle := msg.MsgData.AsInt64; CreateTask(DoCheckPlayer) .OnMessage(TaskMessageProc) .SetParameter('handle', FPlayerHandle) .Unobserved .Schedule; end; MSG_PLAYER_EXIT: begin ExitProcess(0); WriteToLog('Player was closed?', True); FHelloWorker.Stop; WriteToLog('[Check new chunk task] stopped', True); end; MSG_ERROR: begin WriteToLog(msg.MsgData.AsString, True); MessageBox(0, PWideChar(msg.MsgData.AsString), 'Tardsplaya', MB_OK or MB_ICONEXCLAMATION); task.Stop; end; MSG_LOG_ERROR: begin WriteToLog(msg.MsgData.AsString, True); end; MSG_STREAM: begin qitem := TStreamUrlQueueItem.Create; qitem.url := FStreamPath + msg.MsgData.AsArray[0].AsString; qitem.id := msg.MsgData.AsArray[1].AsInteger; qitem.content := nil; qitem.contentLength := -1; qitem.writtenChunks := 0; qitem.totalChunks := FSectionCount; // Start download stream MsgProcCreateDlStreamTask(qitem, 0, 0); FStreamUrlQueue.Add(qitem); UpdateQueueText(FStreamUrlQueue.Count); end; MSG_STREAM_BEGIN_DOWNLOAD: begin chunk := TStreamChunk(msg.MsgData.AsObject); chunkSize := chunk.queueItem.contentLength div chunk.queueItem.totalChunks; WriteToLog(Format('Beginning chunk %d download', [chunk.queueItem.id, chunkSize]), False); for i := 1 to chunk.queueItem.totalChunks - 1 do begin MsgProcCreateDlStreamTask(chunk.queueItem, chunkSize * i, (chunkSize * i) + chunkSize); end; end; MSG_STREAM_CHUNK_DOWNLOADED: begin chunk := TStreamChunk(msg.MsgData.AsObject); chunk.queueItem.writtenChunks := chunk.queueItem.writtenChunks + 1; WriteToLog(Format('Downloaded part %d/%d from chunk %d', [chunk.queueItem.writtenChunks, chunk.queueItem.totalChunks, chunk.queueItem.id]), False); if chunk.queueItem.writtenChunks = chunk.queueItem.totalChunks then begin // TODO: Write to player WriteToLog(Format('All parts from chunk %d downloaded', [chunk.queueItem.id]), False); if (not FWritingStream) and (FStreamUrlQueue.IndexOf(chunk.queueItem) = 0) then MsgProcCreateWriteStreamTask(chunk.queueItem); //SaveBufferToFile('C:\stream.ts', chunk.queueItem.content, chunk.queueItem.contentLength); //ShellExecute(0, 'open', 'C:\Program Files (x86)\Free Download Manager\fdm.exe', PWideChar(Format('-fs "%s"', [chunk.queueItem.url])), '',SW_HIDE); end; chunk.Free; end; MSG_PLAYER_FINISH_WRITE: begin FStreamUrlQueue.Delete(0); UpdateQueueText(FStreamUrlQueue.Count); WriteToLog(Format('Finished feeding chunk %d to player', [msg.MsgData.AsInteger]), False); if FStreamUrlQueue.Count = 0 then FWritingStream := False else begin if FStreamUrlQueue[0].writtenChunks = FStreamUrlQueue[0].totalChunks then MsgProcCreateWriteStreamTask(FStreamUrlQueue[0]); end; end; end; //task.ClearTimer(1); //task.Stop; end; { THelloWorker } constructor THelloWorker.Create(const streamUrl: string); begin inherited Create; FStreamUrl := streamUrl; DataIn := TMemoryStream.Create(); HttpCli1 := THttpCli.Create(nil); strList := TStringList.Create; extInfs := TList<TExtInf>.Create; HttpCli1.Agent := 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36'; HttpCli1.Accept := '*/*'; HttpCli1.FollowRelocation := True; HttpCli1.Connection := 'Keep-Alive'; HttpCli1.RequestVer := '1.1'; HttpCli1.Options := HttpCli1.Options + [httpoEnableContentCoding]; // gzip HttpCli1.Timeout := 10; HttpCli1.NoCache := True; HttpCli1.RcvdStream := DataIn; {$IFDEF DEBUG} HttpCli1.Proxy := '127.0.0.1'; HttpCli1.ProxyPort := '6969'; {$ENDIF} HttpCli1.URL := FStreamUrl; end; destructor THelloWorker.Destroy; begin FreeAndNil(HttpCli1); FreeAndNil(extInfs); FreeAndNil(strList); FreeAndNil(DataIn); inherited; end; function THelloWorker.Initialize: boolean; var mpchcHandle: THandle; begin Result := true; if IsRelativePath(PlayerPath) then mpchcHandle := CreateMPCHC(ExtractFilePath(ParamStr(0)) + PlayerPath, PlayerCmd) else mpchcHandle := CreateMPCHC(PlayerPath, PlayerCmd); if mpchcHandle = 0 then begin task.Comm.Send(MSG_ERROR, 'Error: failed to create player'); exit; end; task.Comm.Send(MSG_PLAYER_HANDLE, mpchcHandle); FLastTime := 0; FExtMediaSequence := 0; Task.SetTimer(1, 1, MSG_START_WORK); end; procedure THelloWorker.StartWork(var msg: TMessage); var i: Integer; TmpExtMediaSequence: Integer; errorMsg: string; ftime: Int64; begin Task.ClearTimer(1); errorMsg := ''; try try DataIn.Clear; try HttpCli1.Get; except on E: Exception do begin errorMsg := Format('StartWork() [1] Error: %s', [E.Message]); Exit; end; end; strList.Text := DataInToString(DataIn); if not strList[0].StartsWith('#EXTM3U') then begin errorMsg := 'StartWork() [2] Error: no media info found'; Exit; end; for i := 0 to strList.Count - 1 do begin if strList[i].StartsWith('#EXT-X-MEDIA-SEQUENCE:') then begin TmpExtMediaSequence := StrToInt(strList[i].Substring(22)); if TmpExtMediaSequence = FExtMediaSequence then Exit else FExtMediaSequence := TmpExtMediaSequence; end else if strList[i].StartsWith('#EXTINF:') then begin extInfs.Add( TExtInf.Create(strList[i].Substring(8), strList[i+1]) ); end; end; task.Comm.Send(MSG_STREAM, [extInfs[ (extInfs.Count-1) ].url, FExtMediaSequence]); //errorMsg := 'stream found'; except on E: Exception do begin errorMsg := Format('StartWork() [3] Error: %s', [E.Message]); Exit; end; end; finally for i := 0 to extInfs.Count - 1 do begin extInfs[i].Free; end; extInfs.Clear; if errorMsg = '' then begin ftime := MillisecondsBetween(Now, FLastTime); FLastTime := Now; if ftime > 500 then begin Task.SetTimer(1, 1, MSG_START_WORK); end else begin Task.SetTimer(1, 500 - ftime, MSG_START_WORK); end; end else begin task.Comm.Send(MSG_LOG_ERROR, errorMsg); Task.SetTimer(1, 1, MSG_START_WORK); end; end; end; procedure TForm1.CheckFavorites; begin if lstFavorites.ItemIndex > -1 then begin btnDeleteFavorite.Enabled := true; btnEditFavorite.Enabled := true; end else begin btnDeleteFavorite.Enabled := False; btnEditFavorite.Enabled := False; end; end; procedure TForm1.Clear1Click(Sender: TObject); begin lvLog.Clear; end; procedure TForm1.SaveFavorites; begin lstFavorites.Items.SaveToFile(ExtractFilePath(ParamStr(0)) + 'favorites.txt'); end; procedure TForm1.Settings1Click(Sender: TObject); begin Form2 := TForm2.Create(Self); try Form2.ShowModal(); finally Form2.Release; end; end; procedure TForm1.DeleteFavorite(); begin lstFavorites.Items.Delete(lstFavorites.ItemIndex); SaveFavorites(); end; end.
26.382353
272
0.639401
f16a032a6f06b1f69b777473d8fc9ed52402a34e
18,977
dfm
Pascal
Client/fStructurePartNeedsBySale.dfm
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
null
null
null
Client/fStructurePartNeedsBySale.dfm
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
null
null
null
Client/fStructurePartNeedsBySale.dfm
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
3
2021-06-30T10:11:17.000Z
2021-07-01T09:13:29.000Z
inherited fmStructurePartNeedsBySale: TfmStructurePartNeedsBySale Left = 240 Top = 177 Caption = #1042#1082#1083#1102#1095#1074#1072#1085#1077' '#1085#1072' %StructurePart% '#1074' '#1054#1055#1055 ClientHeight = 352 ClientWidth = 790 ExplicitWidth = 796 ExplicitHeight = 377 PixelsPerInch = 96 TextHeight = 13 inherited pnlBottomButtons: TPanel Top = 317 Width = 790 ExplicitTop = 317 ExplicitWidth = 790 inherited pnlOKCancel: TPanel Left = 522 TabOrder = 2 Visible = False ExplicitLeft = 522 end inherited pnlClose: TPanel Left = 433 TabOrder = 1 Visible = True ExplicitLeft = 433 end inherited pnlApply: TPanel Left = 701 TabOrder = 3 Visible = False ExplicitLeft = 701 end object btnEditRecord: TBitBtn Left = 8 Top = 2 Width = 105 Height = 25 Action = actEditRecord Caption = #1056#1077#1076#1072#1082#1090#1080#1088#1072#1085#1077'...' TabOrder = 0 Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000000000000000000000000000000000000FF00FF00FF00 FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000 0000000000000000000000000000000000000000000000000000FF00FF00FF00 FF00FF00FF00FF00FF00FF00FF00FF00FF0000000000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 0000FF00FF000000000000000000000000000000000000000000FFFFFF00FFFF FF0000000000FFFFFF000000000000000000FFFFFF0000000000FFFF00000000 00000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF00000000 000000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000FFFF FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFF00000000 0000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000 0000FFFFFF000000000000000000FFFFFF00FFFFFF0000000000FFFF00000000 000000FFFF00FFFFFF0000FFFF00FFFFFF000000000000000000000000000000 00000000000000FFFF0000000000FFFFFF00FFFFFF0000000000FFFF00000000 0000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF FF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFF00000000 000000FFFF00FFFFFF0000000000000000000000000000000000000000000000 000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000 00000000000000FFFF00FFFFFF0000FFFF00000000000000000000FFFF000000 0000FFFFFF00FFFFFF000000000000000000FFFFFF0000000000FF00FF00FF00 FF00FF00FF000000000000000000000000000000000000FFFF0000000000FFFF FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FF00FF00FF00 FF00FF00FF00FF00FF00FF00FF000000000000FFFF0000000000FFFFFF00FFFF FF00FFFFFF00FFFFFF0000000000000000000000000000000000FF00FF00FF00 FF00FF00FF00FF00FF000000000000FFFF0000000000FFFFFF00FFFFFF000000 000000000000FFFFFF0000000000FFFFFF00FFFFFF0000000000FF00FF00FF00 FF00FF00FF000000000000FFFF000000000000000000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF0000000000FFFFFF0000000000FF00FF00FF00FF00FF00 FF00000000000000FF0000000000FF00FF0000000000FFFFFF00FFFFFF00FFFF FF00FFFFFF00FFFFFF000000000000000000FF00FF00FF00FF00FF00FF00FF00 FF00FF00FF0000000000FF00FF00FF00FF000000000000000000000000000000 0000000000000000000000000000FF00FF00FF00FF00FF00FF00} end end inherited pnlMain: TPanel Width = 790 Height = 317 ExplicitWidth = 790 ExplicitHeight = 317 inherited pnlGrid: TPanel Width = 774 Height = 301 ExplicitWidth = 774 ExplicitHeight = 301 inherited pnlNavigator: TPanel Top = 57 Width = 774 ExplicitTop = 57 ExplicitWidth = 774 inherited pnlFilterButton: TPanel Left = 96 ExplicitLeft = 96 end inherited navData: TDBColorNavigator Width = 96 VisibleButtons = [nbFirst, nbPrior, nbNext, nbLast] Hints.Strings = () ExplicitWidth = 96 end inherited tlbTopGridButtons: TToolBar Left = 120 ExplicitLeft = 120 end object tbRightTop: TToolBar Left = 751 Top = 0 Width = 23 Height = 26 Align = alNone ButtonHeight = 24 Caption = 'tbRightTop' TabOrder = 3 object btnToggleProductDisplay: TSpeedButton Left = 0 Top = 0 Width = 23 Height = 24 Hint = #1055#1088#1077#1074#1082#1083#1102#1095#1074#1072' '#1059#1087#1088#1072#1074#1083#1103#1077#1084' '#1054#1073#1077#1082#1090'/'#1044#1088#1091#1075' '#1048#1076#1077#1085#1090#1080#1092#1080#1082#1072#1090#1086#1088' '#1085#1072' '#1059#1087#1088#1072#1074#1083#1103#1077#1084' '#1054#1073#1077#1082#1090 AllowAllUp = True GroupIndex = 2 Flat = True Glyph.Data = { 36030000424D3603000000000000360000002800000010000000100000000100 1800000000000003000000000000000000000000000000000000FF00FFFF00FF FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF FF00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00FF FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000FF0000000000FF0000FF00 00FF0000FF0000FF0000000000FF00FFFF00FFFFFF00FFFF00FFFF00FFFF00FF FF00FF0000FF0000000000FF0000FF0000FF0000FF0000FF0000000000FF00FF FF80808000FFFFFF00FFFF00FFFF00FFFF00FF0000FF00000000000000000000 00000000000000000000000000FF00FFFF80808080808000FFFFFF00FFFF00FF FF00FF0000FF0000FF0000000000FF0000FF0000FF0000000000FF0000FF00FF FF80808080808000FFFFFF00FFFF00FFFF00FF0000FF0000FF00000000000000 00FF0000000000000000FF0000FF00FFFF80808080808000FFFFFF00FFFF00FF FF00FF0000FF0000FF0000FF0000000000000000000000FF0000FF0000FF00FF FF80808000FFFF00FFFFFF00FFFF00FFFF00FF0000FF0000FF0000FF0000FF00 00000000FF0000FF0000FF0000FF00FFFF80808080808000FFFFFF00FFFF00FF FF00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00FF FF00FFFF80808000FFFFFF00FFFF00FFFF00FFFF00FFFF0000FF0000FF0000FF 0000FF0000FF0000FF0000FF0000FF000000FFFF00FFFF00FFFFFF00FFFF00FF FF00FFFF00FFFF00FFFF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 00FF000000FFFF00FFFFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF0000FF 0000FF0000FF0000FF0000FF0000FF0000FF0000FF000000FFFFFF00FFFF00FF FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} ParentShowHint = False ShowHint = True Transparent = False end end object tlbTopButtons: TToolBar Left = 176 Top = 0 Width = 73 Height = 24 Align = alLeft AutoSize = True ButtonWidth = 37 EdgeInner = esNone Images = dmMain.ilDocs TabOrder = 4 object sepBeforeProductDoc: TToolButton Left = 0 Top = 0 Width = 8 Caption = 'sepBeforeProductDoc' ImageIndex = 1 Style = tbsSeparator end object lblProductDoc: TLabel Left = 8 Top = 0 Width = 28 Height = 22 Caption = ' '#1059#1054#1073' ' Layout = tlCenter end object btnProductDoc: TToolButton Left = 36 Top = 0 Hint = #1055#1086#1082#1072#1079#1074#1072' '#1052#1048#1048#1054' '#1085#1072' '#1080#1079#1073#1088#1072#1085#1080#1103' '#1059#1087#1088#1072#1074#1083#1103#1077#1084' '#1054#1073#1077#1082#1090 Caption = 'btnProductDoc' ImageIndex = 0 OnClick = btnProductDocClick end end end inherited grdData: TAbmesDBGrid Top = 81 Width = 774 Height = 220 HorzScrollBar.Visible = False UseMultiTitle = True Columns = < item EditButtons = <> FieldName = 'SALE_IDENTIFIER' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|ID '#1054#1055#1055 Width = 63 end item EditButtons = <> FieldName = 'CLIENT_SHORT_NAME' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|'#1050#1083#1080#1077#1085#1090 Width = 111 end item EditButtons = <> FieldName = 'SHIPMENT_DATE' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|'#1044#1072#1090#1072' '#1077#1082#1089#1087'.' Width = 63 end item EditButtons = <> FieldName = 'PRODUCT_NAME' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|'#1059#1087#1088#1072#1074#1083#1103#1077#1084' '#1054#1073#1077#1082#1090 Width = 236 end item EditButtons = <> FieldName = 'CLIENT_PRODUCT_NAME' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|'#1054#1079#1085#1072#1095#1077#1085#1080#1077' '#1085#1072' '#1059#1087#1088#1072#1074#1083#1103#1077#1084' '#1054#1073#1077#1082#1090' '#1086#1090' '#1050 + #1083#1080#1077#1085#1090 Visible = False Width = 236 end item EditButtons = <> FieldName = 'QUANTITY' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|'#1050#1086#1083#1080#1095#1077#1089#1090#1074#1086 end item EditButtons = <> FieldName = 'MEASURE_ABBREV' Footers = <> Title.Caption = #1054#1088#1076#1077#1088' '#1079#1072' '#1055#1088#1086#1094#1077#1089' '#1055#1088#1086#1076#1072#1078#1073#1080' ('#1054#1055#1055')|'#1052'.'#1077#1076'.' end item EditButtons = <> FieldName = 'STRUCT_PART_SINGLE_QUANTITY' Footers = <> Title.Caption = '%StructurePart%|'#1050'-'#1074#1086' '#1074' 1 '#1059#1054#1073' '#1087#1088#1086#1076#1072#1074#1072#1085 end item EditButtons = <> FieldName = 'STRUCT_PART_TOTAL_QUANTITY' Footers = <> Title.Caption = '%StructurePart%|'#1054#1073#1097#1086' '#1082'-'#1074#1086 end item EditButtons = <> FieldName = 'STRUCT_PART_MEASURE_ABBREV' Footers = <> Title.Caption = '%StructurePart%|'#1052'.'#1077#1076'.' end> end inline frNeedsCommonHeader: TfrNeedsCommonHeader Left = 0 Top = 0 Width = 774 Height = 57 Align = alTop TabOrder = 2 TabStop = True ExplicitWidth = 774 inherited bvlMain: TBevel Width = 774 Height = 54 ExplicitWidth = 774 ExplicitHeight = 54 end inherited lblTreeNodeName: TLabel Width = 78 ExplicitWidth = 78 end inherited lblDateInterval: TLabel Width = 102 ExplicitWidth = 102 end end end end inherited dsGridData: TDataSource Left = 64 Top = 168 end inherited cdsGridData: TAbmesClientDataSet FieldDefs = < item Name = 'SALE_OBJECT_BRANCH_CODE' DataType = ftFloat end item Name = 'SALE_OBJECT_CODE' DataType = ftFloat end item Name = 'SALE_ORDER_TYPE_CODE' DataType = ftFloat end item Name = 'SALE_IDENTIFIER' DataType = ftWideString Size = 100 end item Name = 'CLIENT_COMPANY_CODE' DataType = ftFloat end item Name = 'CLIENT_SHORT_NAME' DataType = ftWideString Size = 20 end item Name = 'SHIPMENT_DATE' DataType = ftTimeStamp end item Name = 'QUANTITY' DataType = ftFloat end item Name = 'PRODUCT_CODE' DataType = ftFloat end item Name = 'PRODUCT_NO' DataType = ftFloat end item Name = 'PRODUCT_NAME' DataType = ftWideString Size = 100 end item Name = 'CLIENT_PRODUCT_NAME' DataType = ftWideString Size = 250 end item Name = 'DOC_BRANCH_CODE' DataType = ftFloat end item Name = 'DOC_CODE' DataType = ftFloat end item Name = 'HAS_DOC' DataType = ftFloat end item Name = 'MEASURE_ABBREV' DataType = ftWideString Size = 5 end item Name = 'STRUCT_PART_SINGLE_QUANTITY' DataType = ftFloat end item Name = 'STRUCT_PART_TOTAL_QUANTITY' DataType = ftFloat end item Name = 'STRUCT_PART_MEASURE_ABBREV' DataType = ftWideString Size = 5 end item Name = 'REQUEST_BRANCH_CODE' DataType = ftFloat end item Name = 'REQUEST_NO' DataType = ftFloat end> Params = < item DataType = ftFloat Name = 'ALL_FILTERED_COMPANIES' ParamType = ptInput end item DataType = ftFloat Name = 'ALL_FILTERED_PRODUCTS' ParamType = ptInput end item DataType = ftTimeStamp Name = 'BEGIN_DATE' ParamType = ptInput end item DataType = ftTimeStamp Name = 'END_DATE' ParamType = ptInput end item DataType = ftFloat Name = 'PRODUCT_CODE' ParamType = ptInput end item DataType = ftWideString Name = 'CHOSEN_RESULT_PRODUCTS' ParamType = ptInput end item DataType = ftWideString Name = 'CHOSEN_COMPANIES' ParamType = ptInput end> ProviderName = 'prvDetailRealNeedsBySale' ConnectionBroker = dmMain.conNeeds Left = 32 Top = 168 object cdsGridDataCLIENT_PRODUCT_NAME: TAbmesWideStringField FieldName = 'CLIENT_PRODUCT_NAME' Size = 50 end object cdsGridDataREQUEST_BRANCH_CODE: TAbmesFloatField FieldName = 'REQUEST_BRANCH_CODE' end object cdsGridDataREQUEST_NO: TAbmesFloatField FieldName = 'REQUEST_NO' end object cdsGridDataSALE_OBJECT_BRANCH_CODE: TAbmesFloatField FieldName = 'SALE_OBJECT_BRANCH_CODE' end object cdsGridDataSALE_OBJECT_CODE: TAbmesFloatField FieldName = 'SALE_OBJECT_CODE' end object cdsGridDataSALE_ORDER_TYPE_CODE: TAbmesFloatField FieldName = 'SALE_ORDER_TYPE_CODE' end object cdsGridDataSALE_IDENTIFIER: TAbmesWideStringField FieldName = 'SALE_IDENTIFIER' Size = 100 end object cdsGridDataCLIENT_COMPANY_CODE: TAbmesFloatField FieldName = 'CLIENT_COMPANY_CODE' end object cdsGridDataCLIENT_SHORT_NAME: TAbmesWideStringField FieldName = 'CLIENT_SHORT_NAME' end object cdsGridDataSHIPMENT_DATE: TAbmesSQLTimeStampField FieldName = 'SHIPMENT_DATE' end object cdsGridDataQUANTITY: TAbmesFloatField FieldName = 'QUANTITY' DisplayFormat = ',0.##' end object cdsGridDataPRODUCT_CODE: TAbmesFloatField FieldName = 'PRODUCT_CODE' end object cdsGridDataPRODUCT_NO: TAbmesFloatField FieldName = 'PRODUCT_NO' end object cdsGridDataPRODUCT_NAME: TAbmesWideStringField FieldName = 'PRODUCT_NAME' Size = 100 end object cdsGridDataDOC_BRANCH_CODE: TAbmesFloatField FieldName = 'DOC_BRANCH_CODE' end object cdsGridDataDOC_CODE: TAbmesFloatField FieldName = 'DOC_CODE' end object cdsGridDataHAS_DOC: TAbmesFloatField FieldName = 'HAS_DOC' FieldValueType = fvtBoolean end object cdsGridDataMEASURE_ABBREV: TAbmesWideStringField FieldName = 'MEASURE_ABBREV' Size = 5 end object cdsGridDataSTRUCT_PART_SINGLE_QUANTITY: TAbmesFloatField FieldName = 'STRUCT_PART_SINGLE_QUANTITY' DisplayFormat = ',0.00' end object cdsGridDataSTRUCT_PART_TOTAL_QUANTITY: TAbmesFloatField FieldName = 'STRUCT_PART_TOTAL_QUANTITY' DisplayFormat = ',0.00' end object cdsGridDataSTRUCT_PART_MEASURE_ABBREV: TAbmesWideStringField FieldName = 'STRUCT_PART_MEASURE_ABBREV' Size = 5 end end inherited alActions: TActionList Left = 248 inherited actForm: TAction Caption = #1042#1082#1083#1102#1095#1074#1072#1085#1077' '#1085#1072' %StructurePart% '#1074' '#1054#1055#1055 end inherited actFilter: TAction Visible = True end end inherited pdsGridDataParams: TParamDataSet Left = 32 Top = 200 end inherited dsGridDataParams: TDataSource Left = 64 Top = 200 end inherited dsData: TDataSource Left = 64 Top = 136 end inherited cdsData: TAbmesClientDataSet Left = 32 Top = 136 end end
35.671053
326
0.627286
1775ba97a7f90a81c8de71241d89f6c395031846
1,518
pas
Pascal
samples/Pascal/lazcomlib_1_0_tlb.pas
barrettotte/linguist
accc1608083d5299e5a9929de0e91cac1fa6bff1
[ "MIT" ]
8,271
2015-01-01T15:04:43.000Z
2022-03-31T06:18:14.000Z
samples/Pascal/lazcomlib_1_0_tlb.pas
barrettotte/linguist
accc1608083d5299e5a9929de0e91cac1fa6bff1
[ "MIT" ]
3,238
2015-01-01T14:25:12.000Z
2022-03-30T17:37:51.000Z
samples/Pascal/lazcomlib_1_0_tlb.pas
barrettotte/linguist
accc1608083d5299e5a9929de0e91cac1fa6bff1
[ "MIT" ]
4,070
2015-01-01T11:40:51.000Z
2022-03-31T13:45:53.000Z
Unit LazComLib_1_0_TLB; // Imported LazComLib on 19/11/2014 15:59:16 from D:\_development\Lazarus\LazComDll\LazComDll.tlb {$mode delphi}{$H+} interface Uses Windows,ActiveX,Classes,Variants; Const LazComLibMajorVersion = 1; LazComLibMinorVersion = 0; LazComLibLCID = 0; LIBID_LazComLib : TGUID = '{570A55B0-1122-49AE-A335-1F630EC4FE65}'; IID_ILazCom : TGUID = '{247EAD48-16D6-4C1C-9265-F841BF4BD411}'; CLASS_LazComCoClass : TGUID = '{93E11168-E984-415C-ACD6-853226D22CF9}'; //Enums //Forward declarations Type ILazCom = interface; ILazComDisp = dispinterface; //Map CoClass to its default interface LazComCoClass = ILazCom; //records, unions, aliases //interface declarations // ILazCom : ILazCom = interface(IDispatch) ['{247EAD48-16D6-4C1C-9265-F841BF4BD411}'] // LazComMethod : procedure LazComMethod;safecall; end; // ILazCom : ILazComDisp = dispinterface ['{247EAD48-16D6-4C1C-9265-F841BF4BD411}'] // LazComMethod : procedure LazComMethod;dispid 201; end; //CoClasses CoLazComCoClass = Class Public Class Function Create: ILazCom; Class Function CreateRemote(const MachineName: string): ILazCom; end; implementation uses comobj; Class Function CoLazComCoClass.Create: ILazCom; begin Result := CreateComObject(CLASS_LazComCoClass) as ILazCom; end; Class Function CoLazComCoClass.CreateRemote(const MachineName: string): ILazCom; begin Result := CreateRemoteComObject(MachineName,CLASS_LazComCoClass) as ILazCom; end; end.
19.973684
98
0.746377
83f253f37d2fff535fef55425fd277f86b857f82
15,437
pas
Pascal
TMQTT/MQTT.pas
bigheadfjuee/TMQTTClient_synapse40_XE10
5eb7e5ee56f5aec89fc60f00c1c3c471fc54134a
[ "MIT" ]
1
2021-03-04T17:06:11.000Z
2021-03-04T17:06:11.000Z
TMQTT/MQTT.pas
bigheadfjuee/TMQTTClient_synapse40_XE10
5eb7e5ee56f5aec89fc60f00c1c3c471fc54134a
[ "MIT" ]
null
null
null
TMQTT/MQTT.pas
bigheadfjuee/TMQTTClient_synapse40_XE10
5eb7e5ee56f5aec89fc60f00c1c3c471fc54134a
[ "MIT" ]
3
2017-03-06T17:13:52.000Z
2022-01-15T13:29:34.000Z
unit MQTT; interface uses SysUtils, Types, Classes, ExtCtrls, Generics.Collections, SyncObjs, blcksock, MQTTHeaders, MQTTReadThread; type {$IF not declared(TBytes)} TBytes = array of Byte; {$IFEND} TMQTT = class private { Private Declarations } FClientID: AnsiString; FHostname: string; FPort: Integer; FMessageID: Integer; FisConnected: boolean; FRecvThread: TMQTTReadThread; FCSSock: TCriticalSection; FWillMsg: AnsiString; FWillTopic: AnsiString; FUsername: AnsiString; FPassword: AnsiString; FSocket: TTCPBlockSocket; FKeepAliveTimer: TTimer; // Event Fields FConnAckEvent: TConnAckEvent; FPublishEvent: TPublishEvent; FPingRespEvent: TPingRespEvent; FPingReqEvent: TPingReqEvent; FSubAckEvent: TSubAckEvent; FUnSubAckEvent: TUnSubAckEvent; FPubAckEvent: TPubAckEvent; FPubRelEvent: TPubRelEvent; FPubRecEvent: TPubRecEvent; FPubCompEvent: TPubCompEvent; function WriteData(AData: TBytes): boolean; function hasWill: boolean; function getNextMessageId: integer; function createAndResumeRecvThread(Socket: TTCPBlockSocket): boolean; // TMQTTMessage Factory Methods. function ConnectMessage: TMQTTMessage; function DisconnectMessage: TMQTTMessage; function PublishMessage: TMQTTMessage; function PingReqMessage: TMQTTMessage; function SubscribeMessage: TMQTTMessage; function UnsubscribeMessage: TMQTTMessage; // Our Keep Alive Ping Timer Event procedure KeepAliveTimer_Event(sender: TObject); // Recv Thread Event Handling Procedures. procedure GotConnAck(Sender: TObject; ReturnCode: integer); procedure GotPingResp(Sender: TObject); procedure GotSubAck(Sender: TObject; MessageID: integer; GrantedQoS: Array of integer); procedure GotUnSubAck(Sender: TObject; MessageID: integer); procedure GotPub(Sender: TObject; topic, payload: Ansistring); procedure GotPubAck(Sender: TObject; MessageID: integer); procedure GotPubRec(Sender: TObject; MessageID: integer); procedure GotPubRel(Sender: TObject; MessageID: integer); procedure GotPubComp(Sender: TObject; MessageID: integer); public { Public Declarations } function Connect: boolean; function Disconnect: boolean; function Publish(Topic: Ansistring; sPayload: Ansistring): boolean; overload; function Publish(Topic: Ansistring; sPayload: Ansistring; Retain: boolean): boolean; overload; function Publish(Topic: Ansistring; sPayload: Ansistring; Retain: boolean; QoS: integer): boolean; overload; function Subscribe(Topic: Ansistring; RequestQoS: integer): integer; overload; function Subscribe(Topics: TDictionary<Ansistring, integer>): integer; overload; function Unsubscribe(Topic: Ansistring): integer; overload ; function Unsubscribe(Topics: TStringList): integer; overload; function PingReq: boolean; constructor Create(hostName: string; port: integer); destructor Destroy; override; property WillTopic: AnsiString read FWillTopic write FWillTopic; property WillMsg: AnsiString read FWillMsg write FWillMsg; property Username: AnsiString read FUsername write FUsername; property Password: AnsiString read FPassword write FPassword; // Client ID is our Client Identifier. property ClientID : AnsiString read FClientID write FClientID; property isConnected: boolean read FisConnected; // Event Handlers property OnConnAck : TConnAckEvent read FConnAckEvent write FConnAckEvent; property OnPublish : TPublishEvent read FPublishEvent write FPublishEvent; property OnPingResp : TPingRespEvent read FPingRespEvent write FPingRespEvent; property OnPingReq : TPingRespEvent read FPingRespEvent write FPingRespEvent; property OnSubAck : TSubAckEvent read FSubAckEvent write FSubAckEvent; property OnUnSubAck : TUnSubAckEvent read FUnSubAckEvent write FUnSubAckEvent; property OnPubAck : TUnSubAckEvent read FUnSubAckEvent write FUnSubAckEvent; property OnPubRec : TUnSubAckEvent read FUnSubAckEvent write FUnSubAckEvent; property OnPubRel : TUnSubAckEvent read FUnSubAckEvent write FUnSubAckEvent; property OnPubComp : TUnSubAckEvent read FUnSubAckEvent write FUnSubAckEvent; end; implementation { TMQTTClient } procedure TMQTT.GotConnAck(Sender: TObject; ReturnCode: integer); begin if Assigned(FConnAckEvent) then OnConnAck(Self, ReturnCode); end; function TMQTT.Connect: boolean; var Msg: TMQTTMessage; begin // Create socket and connect. FSocket := TTCPBlockSocket.Create; try FSocket.Connect(Self.FHostname, IntToStr(Self.FPort)); FisConnected := true; except // If we encounter an exception upon connection then reraise it, free the socket // and reset our isConnected flag. on E: Exception do begin raise; FisConnected := false; FSocket.Free; end; end; if FisConnected then begin Msg := ConnectMessage; try Msg.Payload.Contents.Add(Self.FClientID); (Msg.VariableHeader as TMQTTConnectVarHeader).WillFlag := ord(hasWill); if hasWill then begin Msg.Payload.Contents.Add(Self.FWillTopic); Msg.Payload.Contents.Add(Self.FWillMsg); end; if ((Length(FUsername) > 1) and (Length(FPassword) > 1)) then begin Msg.Payload.Contents.Add(FUsername); Msg.Payload.Contents.Add(FPassword); end; if WriteData(Msg.ToBytes) then Result := true else Result := false; // Start our Receive thread. if (Result and createAndResumeRecvThread(FSocket)) then begin // Use the KeepAlive that we just sent to determine our ping timer. FKeepAliveTimer.Interval := (Round((Msg.VariableHeader as TMQTTConnectVarHeader).KeepAlive * 0.80)) * 1000; FKeepAliveTimer.Enabled := true; end; finally Msg.Free; end; end; end; function TMQTT.ConnectMessage: TMQTTMessage; begin Result := TMQTTMessage.Create; Result.VariableHeader := TMQTTConnectVarHeader.Create; Result.Payload := TMQTTPayload.Create; Result.FixedHeader.MessageType := Ord(TMQTTMessageType.CONNECT); Result.FixedHeader.Retain := 0; Result.FixedHeader.QoSLevel := 0; Result.FixedHeader.Duplicate := 0; end; constructor TMQTT.Create(hostName: string; port: integer); begin inherited Create; Self.FisConnected := false; Self.FHostname := Hostname; Self.FPort := Port; Self.FMessageID := 1; // Randomise and create a random client id. Randomize; Self.FClientID := 'TMQTT' + IntToStr(Random(1000) + 1); FCSSock := TCriticalSection.Create; // Create the timer responsible for pinging. FKeepAliveTimer := TTimer.Create(nil); FKeepAliveTimer.Enabled := false; FKeepAliveTimer.OnTimer := KeepAliveTimer_Event; end; function TMQTT.createAndResumeRecvThread(Socket: TTCPBlockSocket): boolean; begin Result := false; try FRecvThread := TMQTTReadThread.Create(Socket, FCSSock); { Todo: Assign Event Handlers here. } FRecvThread.OnConnAck := Self.GotConnAck; FRecvThread.OnPublish := Self.GotPub; FRecvThread.OnPingResp := Self.GotPingResp; FRecvThread.OnSubAck := Self.GotSubAck; FRecvThread.OnPubAck := Self.GotPubAck; Result := true; except Result := false; end; end; destructor TMQTT.Destroy; begin if Assigned(FSocket) then begin Disconnect; end; if Assigned(FKeepAliveTimer) then begin FreeAndNil(FKeepAliveTimer); end; if Assigned(FRecvThread) then begin FreeAndNil(FRecvThread); end; if Assigned(FCSSock) then begin FreeAndNil(FCSSock); end; inherited; end; function TMQTT.Disconnect: boolean; var Msg: TMQTTMessage; begin Result := false; if isConnected then begin FKeepAliveTimer.Enabled := false; Msg := DisconnectMessage; if WriteData(Msg.ToBytes) then Result := true else Result := false; Msg.Free; // Terminate our socket receive thread. FRecvThread.Terminate; FRecvThread.WaitFor; // Close our socket. FSocket.CloseSocket; FisConnected := False; // Free everything. if Assigned(FRecvThread) then FreeAndNil(FRecvThread); if Assigned(FSocket) then FreeAndNil(FSocket); end; end; function TMQTT.DisconnectMessage: TMQTTMessage; begin Result := TMQTTMessage.Create; Result.FixedHeader.MessageType := Ord(TMQTTMessageType.DISCONNECT); end; function TMQTT.getNextMessageId: integer; begin // If we've reached the upper bounds of our 16 bit unsigned message Id then // start again. The spec says it typically does but is not required to Inc(MsgId,1). if (FMessageID = 65535) then begin FMessageID := 1; end; // Return our current message Id Result := FMessageID; // Increment message Id Inc(FMessageID); end; function TMQTT.hasWill: boolean; begin if ((Length(FWillTopic) < 1) and (Length(FWillMsg) < 1)) then begin Result := false; end else Result := true; end; procedure TMQTT.KeepAliveTimer_Event(sender: TObject); begin if Self.isConnected then begin PingReq; end; end; function TMQTT.PingReq: boolean; var Msg: TMQTTMessage; begin Result := false; if isConnected then begin Msg := PingReqMessage; if WriteData(Msg.ToBytes) then Result := true else Result := false; Msg.Free; end; end; function TMQTT.PingReqMessage: TMQTTMessage; begin Result := TMQTTMessage.Create; Result.FixedHeader.MessageType := Ord(TMQTTMessageType.PINGREQ); end; procedure TMQTT.GotPingResp(Sender: TObject); begin if Assigned(FPingRespEvent) then OnPingResp(Self); end; function TMQTT.Publish(Topic, sPayload: Ansistring; Retain: boolean): boolean; begin Result := Publish(Topic, sPayload, Retain, 0); end; function TMQTT.Publish(Topic, sPayload: Ansistring): boolean; begin Result := Publish(Topic, sPayload, false, 0); end; function TMQTT.Publish(Topic, sPayload: Ansistring; Retain: boolean; QoS: integer): boolean; var Msg: TMQTTMessage; begin if ((QoS > -1) and (QoS <= 3)) then begin if isConnected then begin Msg := PublishMessage; Msg.FixedHeader.QoSLevel := QoS; (Msg.VariableHeader as TMQTTPublishVarHeader).QoSLevel := QoS; (Msg.VariableHeader as TMQTTPublishVarHeader).Topic := Topic; if (QoS > 0) then begin (Msg.VariableHeader as TMQTTPublishVarHeader).MessageID := getNextMessageId; end; Msg.Payload.Contents.Add(sPayload); Msg.Payload.PublishMessage := true; if WriteData(Msg.ToBytes) then Result := true else Result := false; Msg.Free; end; end else raise EInvalidOp.Create('QoS level can only be equal to or between 0 and 3.'); end; function TMQTT.PublishMessage: TMQTTMessage; begin Result := TMQTTMessage.Create; Result.FixedHeader.MessageType := Ord(TMQTTMessageType.PUBLISH); Result.VariableHeader := TMQTTPublishVarHeader.Create(0); Result.Payload := TMQTTPayload.Create; end; procedure TMQTT.GotPubRec(Sender: TObject; MessageID: integer); begin if Assigned(FPubRecEvent) then OnPubRec(Self, MessageID); end; procedure TMQTT.GotPubRel(Sender: TObject; MessageID: integer); begin if Assigned(FPubRelEvent) then OnPubRel(Self, MessageID); end; function TMQTT.Subscribe(Topic: Ansistring; RequestQoS: integer): integer; var dTopics: TDictionary<Ansistring, integer>; begin dTopics := TDictionary<Ansistring, integer>.Create; dTopics.Add(Topic, RequestQoS); Result := Subscribe(dTopics); dTopics.Free; end; procedure TMQTT.GotSubAck(Sender: TObject; MessageID: integer; GrantedQoS: array of integer); begin if Assigned(FSubAckEvent) then OnSubAck(Self, MessageID, GrantedQoS); end; function TMQTT.Subscribe(Topics: TDictionary<Ansistring, integer>): integer; var Msg: TMQTTMessage; MsgId: Integer; sTopic: AnsiString; data: TBytes; begin Result := -1; if isConnected then begin Msg := SubscribeMessage; MsgId := getNextMessageId; (Msg.VariableHeader as TMQTTSubscribeVarHeader).MessageID := MsgId; for sTopic in Topics.Keys do begin Msg.Payload.Contents.Add(sTopic); Msg.Payload.Contents.Add(IntToStr(Topics.Items[sTopic])) end; // the subscribe message contains integer literals not encoded as strings. Msg.Payload.ContainsIntLiterals := true; data := Msg.ToBytes; if WriteData(data) then Result := MsgId; Msg.Free; end; end; function TMQTT.SubscribeMessage: TMQTTMessage; begin Result := TMQTTMessage.Create; Result.FixedHeader.MessageType := Ord(TMQTTMessageType.SUBSCRIBE); Result.FixedHeader.QoSLevel := 0; Result.VariableHeader := TMQTTSubscribeVarHeader.Create; Result.Payload := TMQTTPayload.Create; end; function TMQTT.Unsubscribe(Topic: Ansistring): integer; var slTopics: TStringList; begin slTopics := TStringList.Create; slTopics.Add(Topic); Result := Unsubscribe(slTopics); slTopics.Free; end; procedure TMQTT.GotUnSubAck(Sender: TObject; MessageID: integer); begin if Assigned(FUnSubAckEvent) then OnUnSubAck(Self, MessageID); end; function TMQTT.Unsubscribe(Topics: TStringList): integer; var Msg: TMQTTMessage; MsgId: integer; sTopic: AnsiString; begin Result := -1; if isConnected then begin Msg := UnsubscribeMessage; MsgId := getNextMessageId; (Msg.VariableHeader as TMQTTSubscribeVarHeader).MessageID := MsgId; Msg.Payload.Contents.AddStrings(Topics); if WriteData(Msg.ToBytes) then Result := MsgId; Msg.Free; end; end; function TMQTT.UnsubscribeMessage: TMQTTMessage; var Msg: TMQTTMessage; begin Result := TMQTTMessage.Create; Result.FixedHeader.MessageType := Ord(TMQTTMessageType.UNSUBSCRIBE); Result.FixedHeader.QoSLevel := 1; Result.VariableHeader := TMQTTUnsubscribeVarHeader.Create; Result.Payload := TMQTTPayload.Create; end; function TMQTT.WriteData(AData: TBytes): boolean; var sentData: integer; attemptsToWrite: integer; begin Result := False; sentData := 0; attemptsToWrite := 1; if isConnected then begin repeat FCSSock.Acquire; try if FSocket.CanWrite(500 * attemptsToWrite) then begin sentData := sentData + FSocket.SendBuffer(Pointer(Copy(AData, sentData - 1, Length(AData) + 1)), Length(AData) - sentData); Inc(attemptsToWrite); end; finally FCSSock.Release; end; until ((attemptsToWrite = 3) or (sentData = Length(AData))); if sentData = Length(AData) then begin Result := True; FisConnected := true; end else begin Result := False; FisConnected := false; raise Exception.Create('Error Writing to Socket, it appears to be disconnected'); end; end; end; procedure TMQTT.GotPub(Sender: TObject; topic, payload: Ansistring); begin if Assigned(FPublishEvent) then OnPublish(Self, topic, payload); end; procedure TMQTT.GotPubAck(Sender: TObject; MessageID: integer); begin if Assigned(FPubAckEvent) then OnPubAck(Self, MessageID); end; procedure TMQTT.GotPubComp(Sender: TObject; MessageID: integer); begin if Assigned(FPubCompEvent) then OnPubComp(Self, MessageID); end; end.
28.221207
133
0.712315
6a7aa572dc5a29341d4c15acbe5b002116d50c1a
1,122
pas
Pascal
Tests/Sources/InternalTests/EmptyTests.pas
remobjects/RemObjects.Elements.EUnit
3aedbd0a453a3464f518ffe819341cc369607d48
[ "BSD-2-Clause" ]
null
null
null
Tests/Sources/InternalTests/EmptyTests.pas
remobjects/RemObjects.Elements.EUnit
3aedbd0a453a3464f518ffe819341cc369607d48
[ "BSD-2-Clause" ]
null
null
null
Tests/Sources/InternalTests/EmptyTests.pas
remobjects/RemObjects.Elements.EUnit
3aedbd0a453a3464f518ffe819341cc369607d48
[ "BSD-2-Clause" ]
null
null
null
namespace EUnit.Tests; interface uses RemObjects.Elements.EUnit; type _EmptyTest = public class (Test) private method Private1; empty; method Private2: Boolean; empty; method Private3(Parameter: Boolean); empty; method Private4(Parameter: Boolean): Boolean; empty; protected //method Protected1; empty; method Protected2: Boolean; empty; method Protected3(Parameter: Boolean); empty; method Protected4(Parameter: Boolean): Boolean; empty; public method Public1; virtual; empty; method Public2: Boolean; empty; method Public3(Parameter: Boolean); empty; method Public4(Parameter: Boolean): Boolean; empty; method Public5; empty; end; _SecondEmptyTest = public class (_EmptyTest) public method Public1; override; empty; method Public6; empty; end; _AbstractBaseTest = public abstract class (Test) public method AbstractMethod; virtual; abstract; end; _NonAbstractTest = public class (_AbstractBaseTest) public method AbstractMethod; override; empty; end; implementation end.
24.933333
59
0.696078
6a41586e7936753136f475a18dc798d61cac874c
979
pas
Pascal
Common/uRttiUtils.pas
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
null
null
null
Common/uRttiUtils.pas
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
null
null
null
Common/uRttiUtils.pas
Sembium/Sembium3
0179c38c6a217f71016f18f8a419edd147294b73
[ "Apache-2.0" ]
3
2021-06-30T10:11:17.000Z
2021-07-01T09:13:29.000Z
unit uRttiUtils; interface uses uNestProc, Rtti; type TRttiContextHelper = record helper for TRttiContext public class function Using: TNestProcRec; overload; static; class function Using<T>: TNestFuncRec<T>; overload; static; end; implementation uses SysUtils; class function TRttiContextHelper.Using: TNestProcRec; begin Result:= TNestProcRec.Create( procedure (AProc: TProc) var RttiContext: TRttiContext; begin RttiContext:= TRttiContext.Create; try AProc; finally RttiContext.Free; end; end); end; class function TRttiContextHelper.Using<T>: TNestFuncRec<T>; begin Result:= TNestFuncRec<T>.Create( function (AFunc: TFunc<T>): T var RttiContext: TRttiContext; begin RttiContext:= TRttiContext.Create; try Result:= AFunc; finally RttiContext.Free; end; end); end; end.
18.471698
64
0.630235
f150b1c556608f8d3291bfd51c535acbb556b456
316
pas
Pascal
DocVariant/D2010Up.pas
zhouzuoji/mORMotTest
93c3391130da1187a50f5d3ee15b6d7c3f154523
[ "Apache-2.0" ]
null
null
null
DocVariant/D2010Up.pas
zhouzuoji/mORMotTest
93c3391130da1187a50f5d3ee15b6d7c3f154523
[ "Apache-2.0" ]
null
null
null
DocVariant/D2010Up.pas
zhouzuoji/mORMotTest
93c3391130da1187a50f5d3ee15b6d7c3f154523
[ "Apache-2.0" ]
2
2019-12-07T09:47:13.000Z
2021-03-13T00:02:25.000Z
unit D2010Up; {$I Synopse.inc} {$I HPPas.inc} interface uses SysUtils, Math, {$ifdef MSWINDOWS} Windows, {$endif} Classes, TypInfo, Rtti, SynCommons, HPPas, HppTypeCast, HppSysUtils, HppScript, HppGoroutine, ParseNumberTest, JSONTest; implementation end.
10.896552
19
0.626582
83e0a2f125a147e06ca6a984d8b3deaed9e453e3
10,758
dfm
Pascal
src/gui-classic/UFRMAbout.dfm
CFTechno/PascalCoin
af9ca7f1e58b0afbabe965060cd36bdf05f5cfb6
[ "MIT" ]
1
2020-06-07T08:58:10.000Z
2020-06-07T08:58:10.000Z
src/gui-classic/UFRMAbout.dfm
CFTechno/PascalCoin
af9ca7f1e58b0afbabe965060cd36bdf05f5cfb6
[ "MIT" ]
null
null
null
src/gui-classic/UFRMAbout.dfm
CFTechno/PascalCoin
af9ca7f1e58b0afbabe965060cd36bdf05f5cfb6
[ "MIT" ]
null
null
null
object FRMAbout: TFRMAbout Left = 0 Top = 0 ActiveControl = bbClose BorderIcons = [biSystemMenu] BorderStyle = bsDialog Caption = 'About...' ClientHeight = 415 ClientWidth = 522 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poOwnerFormCenter OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object Image1: TImage Left = 15 Top = 15 Width = 64 Height = 64 AutoSize = True Picture.Data = { 0954506E67496D61676589504E470D0A1A0A0000000D49484452000000400000 00400806000000AA6971DE0000000467414D410000B18F0BFC61050000000970 48597300000EC200000EC20115284A800000001874455874536F667477617265 007061696E742E6E657420342E312E36FD4E09E800000AD54944415478DAD55B 0B7854C515FE67EEDD17848780402860B21BE4258A8116FD1004A4F889852282 A808A2541113146DB5AD521A3EABD54AA186243E2A55D17E060111A42A5A9487 F8E04D4185920DB18809280884ECFBCEF4DC0D6CB264F766B30F361EF86EF6EE 3DF3F8FF397BE6CCB9334C4A89944A415FB3BF93B79F4F139733C97A32862C06 7402581B6AD9060649FF3C7439C1192A85645F7326BFD2A0ED6AF95DD65E14AC 0FA4B27B2C1504B84B72BA494DDEC0384613B8218CB116F1D4437DAB26823630 897F694C7BAB655E4555B32560FB0B034D7D7CC7C7017C06757A388D324F6647 C9420290EC7D29C4732D320FBE8389526B1E0410708FF7C434C9E42334D259C9 041D950C29F7D3E54FB6CE075F4F94888408A829768CE6600B69B42F3E1FC023 50B15B61E27ED3BD07379C5F025EE8D9C1E50B1473C66E4A0FF07A14D06F839C E662B3C67FCDEE3B702AE504788A728651A97F52D12EE9061F4E842C975CDEDC E2DEF2AD292380C0CFA2DFFA0206A6A61B70441220BD749961CB77BE92640218 F314DBE7D3DF07530980B5EB09D6BE07E03D09ED7F1F074384FAC2330702199D 21ABBF85ACDA118584E0FFB9B6FCF2C71103B8180860CC5BEC2821AD7B52091E ADBBC17AEB0780526B5CBE8DF320F6BC5AD78B6E436119FB8F332825BC6F4D81 FCF633830AC553D6BCF2DF254C80A7C8B180387820A5E049949EE3601A393F74 EFDF58006DCF6BA17BF5CA87A0E6CE08DD7B57DE4A046C69041CE658F2CB1E8F 9B006F91E37EC9D8DF520D3E08F0AA39502F9B16BAF7AD980851B533746F1AF3 3294EE57D5DED0D4EFFE7B2E98BFC6B04E7D8600D36EB7E51D7C359A4E54023C 2539C3A5901F5070A3843DC8E802F3354F20E97EB0FDC5E0D676A15B51B51DD0 FC751DED781998C976E66100A2721BA4D0204F7E0D796417F98C4D80EBBB4835 BB158E21A69965DB6326E0F4B38E8EAA865D64FA99618CAA2D60B971297887DE C9059F0C21ABD00E6D46605B3164653856C25856E332E57678785F754C04B88B 1CCB68E427845542A1BDF9BA1228F691E986DA1813087CB914810DF3C852EA2C 88603E6FCB2F6BE0C81B10E02AB48FE10A5F7DAEA27AE5C3E484EE4E37BA9845 73AE85EFBDFCD0544A57012187DA6639374725E040610F4B572EF6D2E8E7D457 527A8D8769C453FA8C986E5C4D12DF477320BE2C0DDD13D4EDB6EF9D3F438114 1109A0606726851B25610C650E8069EC1270D5926E3C4D1671EA10BCAF8E080B A824B449342BBCD180802F0AFA9AB33B780F7086EE216D732B98473F0BD4F3CE CD4AAC6DC15B763454F1965E0F796C7F1D0152FE87A2C4FE417BA84F807B51CE 24C6518A1F91A8FDEF803AF851431DDFEAA910873E09FF528A51D6FCF20FC209 28767C448B9C61E906755E08805C61CD734E0811F04371F6455628E5C94E6335 5702F455A3D7AF756E3BBBE244900057916336676C6142BD69D515A621730C55 84F35D68FB57258D00A5DF6D300D2D683201B5246853F510394800053E6B69EA 1B954867F8C5E360FEF97C431DDFFBB3210EAC491E01974C86E9EA7971114052 6ACD2BBB85C93FF631BB3B787E8837757D56D42173A15E3AD550C7B3641850FD 4DF32040A2CA9A5F96C96A4A1C03B8C0B6443B631AFF0694CCDCA8CF85E738BC 8B073548722444C0A5B7D3CFEE0FF11110EC94DFCEDC85D9D3C1F98B89744472 132CBFDA096EB246D5D1576BFEB7EF481A785D4C239E84D27B82A18E110142CA F1CCBDC8F1171A968712EA49FBDEB0DEFCB6A18A9F5669DAE789F9D9FAC23AF6 83F986525A951B47A84604D06CF07B56B3C8BE34D1F436EF3309E6E1868917F8 B716421EFE2CC61AA3C2066CEDC0BB0C82AA8FBC6A6DB4846FD514886F3E8D4C 80C073CC55644F380052873D0EB5EFA404C1A5408420C73B04A83912F9B9C49B CCB5C8BE836680CB1369C77CD36AF00BFBA41B6E43FC95DBE17B33FAC05004B0 8E7C807D2F2D73FBC6DD8A6A83951CE0D96C6EB3111A7DEFAADB8C13A7526E60 1404EDA18F97C4DB0EEBD41F9609CBD30DF75C64F06F7E0ADAAE4626379D00D7 22C716C6F0D3789B52FA4DA570746EBA118744D41C4560D363C1B0BB719AE45A DD072414069B463E0DA5E70DE9451DF0401CDD0DEDBF6B68ADB132781F135914 0EEB16F01259C0B4B809B8652D94768EE88D545722F0C91361DFA9B9F790D33C E376C813F9D73F02E93B1D7A6ED6C3DB334918E9AD0E3E8F248CE63171EA30E4 0F6531830E17B940B780B96401F3E2281DCC1859A76FA74020FA2A5A94BD03DF DAFBC2BEB3DEBE31F87E21F8BCE63B785FBE1267B38DD2D412B6BB7610BADAD7 11DAE1CFE17F6B725CDD6B4CC84FCE623545D91338F8B2782AE03FB902E671AF 19EAF8373F19E68C180532963B3F07CE40D6BEDE00FF9AE975CF3BE7C2726328 6587C0AEC5086CFE734A08A058F81A76624177BBC56C72C6535EE97F174C837F 6BA873EE3B3C49D19B65D21AF0B659C19719BE0F1F81D8B7A2AE40ABAE304F5C 096EBB00D2EF868FD60FB232E1B55A03D1D3E4367FA03DA30F7A2C70989DF316 2816315D5B0825677474052D00F78BB960015778E364DEBC457B48FD77EB6DB8 A9432A16706B9B5ABFE077211522A5FCC296EFBC249810F1143996503034A589 0CC232652378EBE81B45C4F103F0BD7E5D4A00244C8010CFD86695CF3E9311B2 4F648CBFD1A41A6CED61BD535FDC447F5912D8B7128175892D345348C1486B9E 735D9080A3C57D335A4B4F25594146ACC579F7AB611EB3D850E7DC4D0ECD46A4 ACB2762AEFAA6FB1AB4B8B173916931FB833D63A948179300D32DE37E15D7E23 E491DDE9861B8981F934FA41D30C11E02A720C2402B630239BAE27A6D1CF43C9 BE26BA42C0470EF07230CD9B6EB4E7820F40E3BDACF71D708611A00B59C18744 C2F046AB208E2CD33E016F7961541DEDE85EF8978D4B37DA48BD5F46A31F4A00 8513509C3D948C7B7DA356909149D1DC264395C0DE52043618BF2738EFD0A5D4 1405FDCD339D7B2312102461916315E36CAC51453C7B14CCA34B8C546A039CAF 9A36B1A49C00E0255B5E59989F6B40C0C9C21E0EB322F7E8D9B76815A957FC06 EA00E35D73DED25F401EDB976ECCF5E11F0F04649F8CFBCBC3F26351B6C8D81F A4B8E0AFD1AA328D7D054AB7C1519B123E17BCBA034CCE8EF6E4C097725AA41D A49177892D638AFBA8FD3D06D6704310E3B04CDF0A666913B531AD7207FC6FA6 7D1F757DF0CB09FCC448CFA26E93AB29CEEAAC40D94A2A5DC30AB4C982E5B67F 1B3618D8FD0A021F3F966EDC67C1EFF79831E882BB9D279B44802EAE67730670 4DAE0F8B10DB66436D2403242AD641348B00481E637E31D832FBE0FE681A316C 95CDB95632B98A7E0E3FAE4D42529EA67865942DBFEC5323B598768B7B4BECD7 0BC1973386C65FC5340B91A768CDFD4B6B7ED9FAC634633E2FE029CC190E8E15 14225D906E788DC811C1C498580F4E34E9C0447549566F55282B295CEE996E94 9145EE845F1B6F9D5D51116B89261F993956D8A3754B2E4AC831A62653190F6C 7D57B814CFDB5A890730ADA249E9E1B84F8DB90AED13B8C29E49F7D921427E90 1CF4BDD6BCB2F7E2299FD0B1B95A6B908F4A865946A1734A80EBA74A81F9569F EF69F6E02177BCF524E5E468CDC28B32B9497D886689E95465EB14033F4E643F 6735AB0B71F7FEEF13AD2FA96787E5E25EADDC6EFF640E4C918C5D91AC7D87FA 32966C7D1311BCE4F8F7EEA55D0ABE4D5AAA382587A7839D2EEADEC50B55CF99 8FD0C9A0A6B262CD3605B7B6034EEADCA7F4F9434DC1BB19339D4753D1CF9411 D0405E70B471F9955E4C882CCE652721D13618589117231FE2A1CB0972665592 6B15AED3E67D914E77A442FE0F6724BE5B75E29AC60000000049454E44AE4260 82} end object Label1: TLabel Left = 90 Top = 15 Width = 384 Height = 25 Caption = 'Pascal full node Wallet (Classic GUI)' Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -21 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False end object lblBuild: TLabel Left = 15 Top = 356 Width = 30 Height = 13 Caption = 'Build:' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False end object lblProtocolVersion: TLabel Left = 15 Top = 375 Width = 50 Height = 13 Caption = 'Protocol:' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False end object Label2: TLabel Left = 90 Top = 320 Width = 65 Height = 13 Caption = 'Source Code:' end object Label3: TLabel Left = 90 Top = 339 Width = 135 Height = 13 Caption = 'Check For New Versions:' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False end object Label4: TLabel Left = 170 Top = 320 Width = 240 Height = 13 Cursor = crHandPoint Caption = 'https://github.com/PascalCoin/PascalCoin' Font.Charset = DEFAULT_CHARSET Font.Color = clBlue Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False OnClick = Label4Click end object Label5: TLabel Left = 237 Top = 339 Width = 253 Height = 13 Cursor = crHandPoint Caption = 'https://sourceforge.net/projects/pascalcoin' Font.Charset = DEFAULT_CHARSET Font.Color = clBlue Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False OnClick = Label5Click end object Memo1: TMemo Left = 90 Top = 46 Width = 401 Height = 275 BevelInner = bvNone BevelOuter = bvNone BorderStyle = bsNone Ctl3D = False Lines.Strings = ( 'Copyright (c) 2016 - 2019 PascalCoin developers' 'Based on Albert Molina original source code' '' 'Pascal (aka Pascal Coin) is P2P cryptocurrency without the need ' + 'for historical ' 'operations. This software comprises a node within the Pascal net' + 'work.' '' 'Distributed under the MIT software license, see the accompanying' + ' file LICENSE or ' 'visit http://www.opensource.org/licenses/mit-license.php.' '' 'THIS IS EXPERIMENTAL SOFTWARE. Use it for educational purposes o' + 'nly.' '' 'This product includes software developed by the OpenSSL Project ' + 'and Denis ' 'Grinyuk (https://github.com/Arvur/OpenSSL-Delphi), some cryptogr' + 'aphic ' 'functions inspirated in code written by Ladar Levison and Marco ' + 'Ferrante, and ' 'Synapse Socket code copyright of Lukas Gebauer.' 'Original source code is written in Pascal Language and is availa' + 'ble at ' 'https://github.com/PascalCoin/PascalCoin' '' 'If you like it, consider a donation using BitCoin:' '16K3HCZRhFUtM8GdWRcfKeaa6KsuyxZaYk') ParentColor = True ParentCtl3D = False ReadOnly = True TabOrder = 0 end object bbClose: TBitBtn Left = 380 Top = 358 Width = 111 Height = 31 Caption = 'Close' Kind = bkOK NumGlyphs = 2 TabOrder = 1 end end
39.551471
76
0.786206
6114fc0b5d168e8916fc9dd3e977d5e0285912bc
3,870
pas
Pascal
src/FormatConverterTester/U_FormatConverterTester.View.pas
bomrafinha/FormatConverter
44934332f34d4b6601aeae4a8ecdc5dc26528818
[ "MIT" ]
25
2020-04-13T06:19:16.000Z
2022-02-24T20:40:01.000Z
src/FormatConverterTester/U_FormatConverterTester.View.pas
bomrafinha/FormatConverter
44934332f34d4b6601aeae4a8ecdc5dc26528818
[ "MIT" ]
94
2020-03-06T15:41:54.000Z
2021-02-01T20:27:49.000Z
src/FormatConverterTester/U_FormatConverterTester.View.pas
bomrafinha/FormatConverter
44934332f34d4b6601aeae4a8ecdc5dc26528818
[ "MIT" ]
8
2020-04-17T16:28:19.000Z
2022-02-17T17:40:46.000Z
unit U_FormatConverterTester.View; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts, FMX.Objects, FMX.Effects, FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, FMX.StdCtrls, U_XML.JSON, Xml.XMLDoc, System.JSON, U_JSON.XML, Xml.xmldom, Xml.XmlTransform, Xml.XMLIntf; type TFormatConverter = class(TForm) Layout1: TLayout; Layout2: TLayout; Layout3: TLayout; Layout4: TLayout; Layout5: TLayout; Layout6: TLayout; Layout7: TLayout; Layout8: TLayout; Layout9: TLayout; Layout10: TLayout; textoTitulo: TText; textoOrigem: TText; textoResultado: TText; ShadowEffect1: TShadowEffect; ShadowEffect2: TShadowEffect; ShadowEffect3: TShadowEffect; memoOriginal: TMemo; memoResultado: TMemo; Layout11: TLayout; Layout12: TLayout; Layout13: TLayout; Layout14: TLayout; Layout15: TLayout; Layout16: TLayout; Layout17: TLayout; bJSONtoCSV: TButton; bJSONtoXML: TButton; bXMLtoCSV: TButton; bXMLtoJSON: TButton; bCSVtoXML: TButton; bCSVtoJSON: TButton; procedure FormShow(Sender: TObject); procedure bXMLtoJSONClick(Sender: TObject); procedure bCSVtoJSONClick(Sender: TObject); procedure bCSVtoXMLClick(Sender: TObject); procedure bJSONtoCSVClick(Sender: TObject); procedure bJSONtoXMLClick(Sender: TObject); procedure bXMLtoCSVClick(Sender: TObject); procedure FormCreate(Sender: TObject); private var XMLtoJSON : TXMLtoJSON; JSONtoXML : TJSONtoXML; procedure convertTest(); public { Public declarations } end; var FormatConverter: TFormatConverter; implementation {$R *.fmx} procedure TFormatConverter.bCSVtoJSONClick(Sender: TObject); begin convertTest(); end; procedure TFormatConverter.bCSVtoXMLClick(Sender: TObject); begin convertTest(); end; procedure TFormatConverter.bJSONtoCSVClick(Sender: TObject); begin convertTest(); end; procedure TFormatConverter.bJSONtoXMLClick(Sender: TObject); var xml : TXMLDocument; list : TStringList; json : TJSONObject; begin json := JSONtoXML.normalizeOrigin(memoOriginal.Text); list := JSONtoXML.normalizeOrigin(json); memoOriginal.Lines.Clear; memoOriginal.Lines := list; xml := JSONtoXML.originTypeToReturnType(json); list := JSONtoXML.normalizeReturn(xml); memoResultado.Lines.Clear; memoResultado.lines := list; end; procedure TFormatConverter.bXMLtoCSVClick(Sender: TObject); begin convertTest(); end; procedure TFormatConverter.bXMLtoJSONClick(Sender: TObject); var xml : TXMLDocument; list : TStringList; json : TJSONObject; begin xml := XMLtoJSON.normalizeOrigin(memoOriginal.Text); list := XMLtoJSON.normalizeOrigin(xml); memoOriginal.Lines.Clear; memoOriginal.Lines := list; json := XMLtoJSON.originTypeToReturnType(xml); list := XMLtoJSON.normalizeReturn(json); memoResultado.Lines.Clear; memoResultado.lines := list; end; procedure TFormatConverter.convertTest; begin memoResultado.Text := memoOriginal.Text; end; procedure TFormatConverter.FormCreate(Sender: TObject); begin XMLtoJSON := TXMLtoJSON.Create(); end; procedure TFormatConverter.FormShow(Sender: TObject); var ScreenSize: TSize; blocosConteudoWitdth : Integer; blocosBotoesWitdth : Integer; begin ScreenSize := Screen.Size; Self.Width := trunc(ScreenSize.Width * 0.8); Self.Height := trunc(ScreenSize.Height * 0.8); blocosBotoesWitdth := trunc(Self.ClientWidth * 0.15); blocosConteudoWitdth := trunc(Self.Layout3.Width / 2) - 10; Self.Layout2.Width := blocosBotoesWitdth; Self.Layout5.Width := blocosConteudoWitdth; Self.Layout7.Width := blocosConteudoWitdth; memoOriginal.Lines.Clear; memoResultado.Lines.Clear; end; end.
22.5
81
0.737468
8320f3ed63c0719e7b4ce9a37c47d220d8152ac2
1,949
dpr
Pascal
contrib/mORMot/SQLite3/Samples/03 - NamedPipe Client-Server/Project03Server.dpr
Razor12911/bms2xtool
0493cf895a9dbbd9f2316a3256202bcc41d9079c
[ "MIT" ]
11
2022-01-17T22:05:37.000Z
2022-02-23T19:18:19.000Z
contrib/mORMot/SQLite3/Samples/03 - NamedPipe Client-Server/Project03Server.dpr
Razor12911/xtool
4797195ad310e8f6dc2eae8eb86fe14683f77cf0
[ "MIT" ]
1
2022-02-17T07:17:16.000Z
2022-02-17T07:17:16.000Z
contrib/mORMot/SQLite3/Samples/03 - NamedPipe Client-Server/Project03Server.dpr
Razor12911/bms2xtool
0493cf895a9dbbd9f2316a3256202bcc41d9079c
[ "MIT" ]
2
2020-08-18T09:42:33.000Z
2021-04-22T08:15:27.000Z
{ Synopse mORMot framework Sample 03 - NamedPipe Client-Server purpose of this sample is to show Client/Server SQLite3 database usage: - a TSampleRecord class is defined in Unit1.pas - this sample uses down projects, Project03Client.dpr and Project03Server.dpr - a SQLite3 server is initialized in Project03Server - the CreateMissingTables method will create all necessary tables in the SQLite3 database - one or more client instances can be run in Project03Client - the purpose of the Client form in Unit1.pas is to add a record to the database; the Time field is filled with the current date and time - the 'Find a previous message' button show how to perform a basic query - since the framework use UTF-8 encoding, we use some basic functions for fast conversion to/from the User Interface; in real applications, you should better use our SQLite3i18n unit and the corresponding TLanguageFile.StringToUTF8() and TLanguageFile.UTF8ToString() methods - note that you didn't need to write any SQL statement, only define a class and call some methods; even the query was made very easy (just an obvious WHERE clause to write) - thanks to the true object oriented modeling of the framework, the same exact Unit1 is used for both static in-memory database engine, or with SQLite3 database storage: only the TForm1.Database object creation instance was modified - look at the tiny size of the EXE (even with SQLite3 engine embedded), less than 400KB for the server, and 80KB for the client, with LVCL :) Version 1.0 - January 24, 2010 } program Project03Server; uses {$I SynDprUses.inc} // use FastMM4 on older Delphi, or set FPC threads Forms, Unit2 in 'Unit2.pas' {Form1}, SampleData in '..\01 - In Memory ORM\SampleData.pas'; {$R *.res} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end.
39.77551
80
0.741406
83c73abc406329b9281f9fa928d31e81fccb4ace
10,165
pas
Pascal
windows/src/ext/jedi/jvcl/donations/DSMixAdvanced/cbAudioFileRead.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jvcl/donations/DSMixAdvanced/cbAudioFileRead.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
4,451
2017-05-29T02:52:06.000Z
2022-03-31T23:53:23.000Z
windows/src/ext/jedi/jvcl/donations/DSMixAdvanced/cbAudioFileRead.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
72
2017-05-26T04:08:37.000Z
2022-03-03T10:26:20.000Z
//////////////////////////////////////////////////// // // // cbDSMixer 1.5 // // // // Copyright (C) 1999, 2001 Carlos Barbosa // // email: delphi@carlosb.com // // Home Page: http://www.carlosb.com // // // // Last updated: September 6, 2001 // // // //////////////////////////////////////////////////// unit cbAudioFileRead; interface uses Windows, Classes, MMSystem, SysUtils, DirectShow9, Dialogs, ActiveX, Math; const MUNITS_PER_MSEC: int64 = 10000; MIN_SEL_LENGTH: int64 = 100000; // 0.01 secs MAX_SEL_LENGTH: int64 = 1000000000000000; DSUSER_HRESULT = HResult($08000000); DSUSER_INVALIDSIZE = DSUSER_HRESULT + 1; type EAudioReadError = class(Exception) private FErrorCode: HRESULT; public constructor Create( const Msg: String; const ErrorCode: HRESULT ); virtual; property ErrorCode: HRESULT read FErrorCode; end; TcbAudioFileReader = class(TObject) private FFormat: TWaveFormatEx; FFileName: TFileName; FAMMultiMediaStream: IAMMultiMediaStream; FGraphBuilder: IGraphBuilder; FMediaSeeking: IMediaSeeking; FMediaControl: IMediaControl; FAudioMediaStream: IAudioMediaStream; FMediaStream: IMediaStream; FAudioStreamSample: IAudioStreamSample; FAudioData: IAudioData; FBuffer: Pointer; FBufferSize: DWord; FDuration, FPosition, FSelStart, FSelLength, FLastReadingStartTime, FLastReadingEndTime: int64; procedure SetPosition( Value: int64 ); procedure SetSelLength( Value: int64 ); procedure SetSelStart( Value: int64 ); public constructor Create(const FileName: string); destructor Destroy; override; function Read( const Buffer; Size: DWord ): DWord; property Duration: int64 read FDuration; property FileName: TFileName read FFileName; property Format: TWaveFormatEx read FFormat; property LastReadingEndTime: int64 read FLastReadingEndTime; property LastReadingStartTime: int64 read FLastReadingStartTime; property Position: int64 read FPosition write SetPosition; property SelLength: int64 read FSelLength write SetSelLength; property SelStart: int64 read FSelStart write SetSelStart; end; function DirectShowPresent: Boolean; implementation constructor EAudioReadError.Create( const Msg: String; const ErrorCode: HRESULT ); begin inherited Create( Msg ); FErrorCode := ErrorCode; end; function SCheck( Value: HRESULT ): HRESULT; { Check the result of a COM operation } var S: String; S2: array [0..300] of Char; begin Result := Value; if (Value <> S_OK) then begin Case DWord(Value) of DSUSER_INVALIDSIZE: S:='Invalid buffer size.'; DWord(REGDB_E_CLASSNOTREG): S:='A specified class is not registered in the registration database.'; DWord(CLASS_E_NOAGGREGATION): S:='This class cannot be created as part of an aggregate.'; DWord(E_ABORT): S:='The update aborted.'; DWOrd(E_INVALIDARG): S:='One of the parameters is invalid.'; DWord(E_POINTER): S:='This method tried to access an invalid pointer.'; DWord(E_NOINTERFACE): S:='No interface.'; MS_S_PENDING: S:='The asynchronous update is pending.'; MS_S_NOUPDATE: S:='Sample was not updated after forced completion.'; MS_S_ENDOFSTREAM: S:='Reached the end of the stream; the sample wasn''t updated.'; MS_E_SAMPLEALLOC: S:='An IMediaStream object could not be removed from an IMultiMediaStream object because it still contains at least one allocated sample.'; MS_E_PURPOSEID: S:='The specified purpose ID can''t be used for the call.'; MS_E_NOSTREAM: S:='No stream can be found with the specified attributes.'; MS_E_NOSEEKING: S:='One or more media streams don''t support seeking.'; MS_E_INCOMPATIBLE: S:='The stream formats are not compatible.'; MS_E_BUSY: S:='This sample already has a pending update.'; MS_E_NOTINIT: S:='The object can''t accept the call because its initialize function or equivalent has not been called.'; MS_E_SOURCEALREADYDEFINED: S:='Source already defined.'; MS_E_INVALIDSTREAMTYPE: S:='The stream type is not valid for this operation.'; MS_E_NOTRUNNING: S:='The IMultiMediaStream object is not in running state.'; Else begin if AMGetErrorText( Value, s2, High(s2) ) = 0 then S:='Unrecognized error value.' else S:=StrPas( s2 ); end; end; raise EAudioReadError.Create(S, Value ); end; end ; function DirectShowPresent: Boolean; var AMovie: IGraphBuilder; begin Result := CoCreateInstance( CLSID_FilterGraph, nil, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, AMovie ) = S_OK; end; constructor TcbAudioFileReader.Create(const FileName: string); var v: WideString; begin inherited Create; // creates IAMMultiMediaStream instance SCheck( CoCreateInstance( CLSID_AMMultiMediaStream, nil, CLSCTX_INPROC_SERVER, IID_IAMMultiMediaStream, FAMMultiMediaStream ) ); SCheck( FAMMultiMediaStream.Initialize(STREAMTYPE_READ, AMMSF_NOGRAPHTHREAD, nil) ); // creates IMediaStream instance SCheck( FAMMultiMediaStream.AddMediaStream(nil, @MSPID_PrimaryAudio, 0, FMediaStream) ); SCheck( FAMMultiMediaStream.GetMediaStream(MSPID_PrimaryAudio, FMediaStream) ); // opens the file v := FileName; SCheck( FAMMultiMediaStream.OpenFile(PWideChar(v), 0) ); // Get IMediaControl instance SCheck( FAMMultiMediaStream.GetFilterGraph(FGraphBuilder) ); SCheck( FGraphBuilder.QueryInterface(IID_IMediaControl, FMediaControl) ); SCheck( FGraphBuilder.QueryInterface(IID_IMediaSeeking, FMediaSeeking) ); // creates IAudioMediaStream instance SCheck( FMediaStream.QueryInterface(IID_IAudioMediaStream, FAudioMediaStream) ); SCheck( FAudioMediaStream.GetFormat(FFormat) ); // creates IAudioData instance SCheck( CoCreateInstance(CLSID_AMAudioData, nil, CLSCTX_INPROC_SERVER, IID_IAudioData, FAudioData) ); SCheck( FAudioData.SetFormat(FFormat) ); // creates IAudioStreamSample instance SCheck( FAudioMediaStream.CreateSample(FAudioData, 0, FAudioStreamSample) ); SCheck( FAMMultiMediaStream.GetDuration(FDuration) ); SCheck( FAMMultiMediaStream.SetState( STREAMSTATE_RUN ) ); FFileName := FileName; FSelLength := 0; end; destructor TcbAudioFileReader.Destroy; begin if Assigned(FAMMultiMediaStream) then SCheck( FAMMultiMediaStream.SetState( STREAMSTATE_STOP ) ); FAudioStreamSample := nil; FAudioData := nil; FAudioMediaStream := nil; FMediaStream := nil; FMediaSeeking := nil; FMediaControl := nil; FGraphBuilder := nil; FAMMultiMediaStream := nil; inherited Destroy; end; function TcbAudioFileReader.Read(const Buffer; Size: DWord): DWord; // Reads <Size> bytes from audio file to <Buffer> // limited by the range [SelStart, SelStart + SelLength[ // // returns: number of actual bytes read var hr: DWord; Tmp: int64; begin Result := 0; if (Size <= 0) then SCheck(DSUSER_INVALIDSIZE); // if end reached exit without reading a thing if (FSelLength <> 0) and (FPosition >= FSelStart + FSelLength) then exit; // if buffer changed since last access changes the reference to it if (@Buffer <> FBuffer) or (Size <> FBufferSize) then begin FBuffer := @Buffer; FBufferSize := Size; SCheck( FAudioData.SetBuffer( FBufferSize, FBuffer, 0 ) ); end; // Read samples hr := FAudioStreamSample.Update(0, 0, nil, 0); // if end reached exit without reading a thing if (hr = MS_S_ENDOFSTREAM) or (hr = MS_E_NOSTREAM) then exit; // check for errors SCheck(hr); // get number of bytes read SCheck( FAudioData.GetInfo(FBufferSize, FBuffer, Result) ); // get position of samples read SCheck( FAudioStreamSample.GetSampleTimes( FLastReadingStartTime, FLastReadingEndTime, Tmp ) ); if FLastReadingStartTime > FLastReadingEndTime then // don't know why but this happens FLastReadingStartTime := FLastReadingEndTime; // something happened and start and end time are equal // Limit to selection upper limit if (FSelLength <> 0) and (FLastReadingEndTime > FLastReadingStartTime) and (FSelStart + FSelLength < FLastReadingEndTime) then begin Result := DWord(Trunc(((Result * (FSelStart + FSelLength - FLastReadingStartTime)) / (FLastReadingEndTime - FLastReadingStartTime)))) and (not(FFormat.nBlockAlign-1)); FLastReadingEndTime := FSelStart + FSelLength; end; FPosition := FLastReadingEndTime; end; procedure TcbAudioFileReader.SetPosition( Value: int64 ); var pfs: TFilter_State; begin if (Value <> FPosition) then begin if (Value < FSelStart) then Value := FSelStart else if (Value > FDuration) then Value := FDuration else if (FSelLength <> 0) and (Value > FSelStart + FSelLength) then Value := FSelStart + FSelLength; // Seeks to position SCheck( FMediaControl.StopWhenReady ); SCheck( FMediaSeeking.SetPositions(Value, AM_SEEKING_AbsolutePositioning, Value, AM_SEEKING_NoPositioning)); SCheck( FMediaControl.Run ); SCheck( FMediaControl.GetState(INFINITE, pfs) ); FPosition := Value; end; end; procedure TcbAudioFileReader.SetSelStart( Value: int64 ); begin if (Value <> FSelStart) then begin if (Value < 0) then Value := 0; if (FPosition < Value) then SetPosition( Value ); FSelStart := Value; end; end; procedure TcbAudioFileReader.SetSelLength( Value: int64 ); begin if (Value <> FSelLength) then begin if (Value <> 0) and (Value < MIN_SEL_LENGTH) then Value := MIN_SEL_LENGTH; if (Value > MAX_SEL_LENGTH) then Value := MAX_SEL_LENGTH; // usefull to avoid overflows if (FPosition > FSelStart + Value) then SetPosition( FSelStart ); FSelLength := Value; end; end; initialization CoInitialize(nil); finalization CoUninitialize(); end.
30.343284
163
0.689031
f124777396dc221752037997cbe142c149e147c3
17,537
pas
Pascal
src/core/UPCSafeBoxRootHash.pas
nummer8/PascalCoin
469e748c66d66a4989177e4874bb66da603ec2a7
[ "MIT" ]
1
2019-09-30T22:34:28.000Z
2019-09-30T22:34:28.000Z
src/core/UPCSafeBoxRootHash.pas
nummer8/PascalCoin
469e748c66d66a4989177e4874bb66da603ec2a7
[ "MIT" ]
null
null
null
src/core/UPCSafeBoxRootHash.pas
nummer8/PascalCoin
469e748c66d66a4989177e4874bb66da603ec2a7
[ "MIT" ]
null
null
null
unit UPCSafeBoxRootHash; { Copyright (c) 2019 by Albert Molina Acknowledgements: Herman Schoenfeld <herman@sphere10.com> author of PIP-0030 (2019) Distributed under the MIT software license, see the accompanying file LICENSE or visit http://www.opensource.org/licenses/mit-license.php. This unit is a part of the PascalCoin Project, an infinitely scalable cryptocurrency. Find us here: Web: https://www.pascalcoin.org Source: https://github.com/PascalCoin/PascalCoin If you like it, consider a donation using Bitcoin: 16K3HCZRhFUtM8GdWRcfKeaa6KsuyxZaYk THIS LICENSE HEADER MUST NOT BE REMOVED. } { This unit implements the PIP-0030 proposed by Herman Schoenfeld for the Safebox https://github.com/PascalCoin/PascalCoin/blob/master/PIP/PIP-0030.md Is based in: Each "Account segment" is stored in a RAW memory buffer of type TBytesBuffer Each "Account segment" is a 32 bytes value, that contains a SHA256 of the information contained in a TBlockAccount: SHA256 of ( TBlockAccount.blockchainInfo : TOperationBlock; TBlockAccount.accounts : Array[0..4] of TAccount; ) On current PascalCoin source code, this "Account Segment" hash is stored in a TBytesBuffer where each 32 bytes are a iIndex of the "Account Segment" hash Example: - Number of "Account segments" = 1000 (that means 1000 blocks and 5000 accounts) - TBytesBuffer size = 32 * 1000 = 32000 bytes - index of "Account segment" position: - Position 0 -> 0*32 = 0 - Position 123 -> 123 * 32 = 3936 - Position 1002 -> Out of range (max = 1000-1 = 999) Calling "TPCSafeboxRootHash.CalcSafeBoxRootHash" will obtain a single 32 bytes value as described at PIP that is the "SafeBoxRoot" Calling "TPCSafeboxRootHash.GetProof" will return an array of 32 bytes value that is the proof of each level that must be hashed. The 0-index is the hash of the "Account Segment" to get Proof, and the last item of the array will be the "SafeBoxRoot" value Example: Account Segments: 01 02 03 04 05 06 07 08 09 = 9 items Level 2 process: 11 12 13 14 09 = 5 items Level 3 process: 21 22 09 = 3 items Level 4 process: 31 09 = 2 items Level 5 process: 41 = 1 item = SafeBoxRoot The "GetProof" of account segment 03 will be: 03 04 11 22 09 41 - Note that first item 03 = same account to get proof of - Note that last item 41 = SafeBoxRoot The "GetProof" of account segment 09 will be: 09 09 09 09 31 41 - Note that will repeat 09 value needed times one for each level (base + 3 levels) Calling "TPCSafeboxRootHash.CheckProof" will validate a previous "GetProof" - If the array is length = 1 then there was only 1 "Account Segment" - The array must be: length=1 or length>2 (length=2 not allowed) - Length 1=single account segment, so, equal to SafeBoxRoot - 2 accounts segments: Need 3 hashes: The base, sibling and SafeBoxRoot Speed tests: Made on 2019-05-21 with a Intel i5-4460 CPU - 315000 blocks (aka "Account segments") -> Aprox 3 years of PascalCoin Safebox (2016..2019) CalcSafeBoxRootHash -> 170 ms using OpenSSL library for 32 bits - 630000 Blocks -> Aprox 6 years of PascalCoin Safebox (2016..2022) CalcSafeBoxRootHash -> 350 ms using OpenSSL library for 32 bits } {$IFDEF FPC} {$MODE Delphi} {$ENDIF} interface {$I ./../config.inc} uses Classes, SysUtils, UConst, UCrypto, SyncObjs, UThread, UBaseTypes, UPCOrderedLists, UPCDataTypes, {$IFNDEF FPC}System.Generics.Collections{$ELSE}Generics.Collections{$ENDIF}; type TProofLevels = Record Levels : Array of TRawBytes; End; TSafeboxHashCalcType = (sbh_Single_Sha256, sbh_Merkle_Root_Hash); { TBytesBuffer32Safebox is an extension of a TBytesBuffer that will automatically update and calc the SafeboxRootHash when SafeBoxHashCalcType = sbh_Merkle_Root_Hash This will increace speed because will only calculate modified blocks when used properly, mantaining integrity of the SafeBoxHash value When SafeBoxHashCalcType = sbh_Single_Sha256 (Default) then there is no change versus superclass type TBytesBuffer} TBytesBuffer32Safebox = Class(TBytesBuffer) private FNextLevelBytesBuffer : TBytesBuffer32Safebox; FSafeBoxHashCalcType: TSafeboxHashCalcType; procedure SetSafeBoxHashCalcType(const Value: TSafeboxHashCalcType); protected FCachedSafeboxHash : TRawBytes; procedure NotifyUpdated(AStartPos, ACountBytes : Integer); override; procedure RedoNextLevelsForMerkleRootHash; public constructor Create(ADefaultIncrement : Integer); override; destructor Destroy; override; function GetSafeBoxHash : TRawBytes; property SafeBoxHashCalcType : TSafeboxHashCalcType read FSafeBoxHashCalcType write SetSafeBoxHashCalcType; End; TPCSafeboxRootHash = Class class function CalcNextLevelHash(ABlocksHashBuffer : TBytesBuffer; AStartIndex, ABlocksCount : Integer; ANextLevel : TBytesBuffer) : Boolean; public class function CalcSafeBoxRootHash(ABlocksHashBuffer : TBytesBuffer; AStartIndex, ABlocksCount : Integer) : TRawBytes; overload; class function CalcSafeBoxRootHash(ABlocksHashBuffer : TBytesBuffer) : TRawBytes; overload; class function GetProof(ABlocksHashBuffer : TBytesBuffer; ABlockIndex : Integer; var AProofLevels : TProofLevels) : Boolean; class function CheckProof(ABlockIndex, ATotalBlocks : Integer; const AProofLevels : TProofLevels) : Boolean; End; implementation { TPCSafeboxRootHash } class function TPCSafeboxRootHash.CalcNextLevelHash(ABlocksHashBuffer: TBytesBuffer; AStartIndex, ABlocksCount: Integer; ANextLevel: TBytesBuffer): Boolean; var i, LLeft, LRight : Integer; LPByte : PByte; LSHA256 : TRawBytes; LTotalBlocks : Integer; begin Assert((ABlocksHashBuffer.Length MOD 32)=0,'ABlocksHashBuffer invalid length ('+IntToStr(ABlocksHashBuffer.Length)+') not modulo 32 = 0'); Assert((AStartIndex>=0) And (ABlocksCount>0) And (ABlocksHashBuffer.Length>0),Format('Invalid AStartIndex:%d or ACount:%d or Length:%d',[AStartIndex,ABlocksCount,ABlocksHashBuffer.Length])); LTotalBlocks := ABlocksHashBuffer.Length DIV 32; ANextLevel.Clear; if LTotalBlocks=1 then begin ANextLevel.CopyFrom(ABlocksHashBuffer); Exit(True); end; if (AStartIndex + ABlocksCount)>LTotalBlocks then Exit(False); // Invalid params for i := 0 to ((LTotalBlocks-1) DIV 2) do begin LLeft := i*64; LRight := (i+1)*64; LPByte := ABlocksHashBuffer.Memory; Inc(LPByte,LLeft); if (LRight>ABlocksHashBuffer.Length) then begin ANextLevel.Add(LPByte^,32); end else begin LSHA256 := TCrypto.DoSha256(PAnsiChar(LPByte),64); ANextLevel.Add(LSHA256); end; end; Result := True; end; class function TPCSafeboxRootHash.CalcSafeBoxRootHash(ABlocksHashBuffer: TBytesBuffer): TRawBytes; begin Result := CalcSafeBoxRootHash(ABlocksHashBuffer,0,ABlocksHashBuffer.Length DIV 32); end; class function TPCSafeboxRootHash.CalcSafeBoxRootHash(ABlocksHashBuffer: TBytesBuffer; AStartIndex, ABlocksCount: Integer): TRawBytes; // PRE: The ABlocksHashBuffer has a length MODULO 32 = 0 and size > 0, because contains X blocks of 32 bytes each // each 32 bytes of ABlocksHashBuffer contains a SHA256 of TBlockAccount, extracted from TBlockAccount.block_hash function CalculateSafeBoxRootHash(APreviousLevelBuffer : TBytesBuffer) : TRawBytes; // PRE: APreviousLevelBuffer contains a set of 32 bytes var LNextLevel : TBytesBuffer; i, LLeft, LRight : Integer; LPByte : PByte; LSHA256 : TRawBytes; LTotalBlocks : Integer; begin LTotalBlocks := APreviousLevelBuffer.Length DIV 32; if (LTotalBlocks)=1 then begin SetLength(Result,32); Move(APreviousLevelBuffer.Memory^,Result[0],32); Exit; end; LNextLevel := TBytesBuffer.Create(APreviousLevelBuffer.Length DIV 2); try for i := 0 to ((LTotalBlocks-1) DIV 2) do begin LLeft := i*64; LRight := (i+1)*64; LPByte := APreviousLevelBuffer.Memory; Inc(LPByte,LLeft); if (LRight>APreviousLevelBuffer.Length) then begin LNextLevel.Add(LPByte^,32); end else begin LSHA256 := TCrypto.DoSha256(PAnsiChar(LPByte),64); LNextLevel.Add(LSHA256); end; end; Result := CalculateSafeBoxRootHash(LNextLevel) finally LNextLevel.Free; end; end; var LHashBufferChunk : TBytesBuffer; LTotalBlocks : Integer; LPByte : PByte; begin // Protection Assert((ABlocksHashBuffer.Length MOD 32)=0,'ABlocksHashBuffer invalid length ('+IntToStr(ABlocksHashBuffer.Length)+') not modulo 32 = 0'); Assert((AStartIndex>=0) And (ABlocksCount>0) And (ABlocksHashBuffer.Length>0),Format('Invalid AStartIndex:%d or ACount:%d or Length:%d',[AStartIndex,ABlocksCount,ABlocksHashBuffer.Length])); LTotalBlocks := ABlocksHashBuffer.Length DIV 32; Assert((AStartIndex + ABlocksCount)<=LTotalBlocks,Format('Out of range AStartIndex:%d + ACount:%d > Blocks:%d',[AStartIndex,ABlocksCount,LTotalBlocks])); if (AStartIndex=0) And (ABlocksCount=LTotalBlocks) then begin Result := CalculateSafeBoxRootHash(ABlocksHashBuffer); end else begin LHashBufferChunk := TBytesBuffer.Create(LTotalBlocks*32); try LPByte := ABlocksHashBuffer.Memory; Inc(LPByte,32 * AStartIndex); LHashBufferChunk.Add(LPByte^, ABlocksCount*32); // Result := CalculateSafeBoxRootHash(LHashBufferChunk); finally LHashBufferChunk.Free; end; end; end; class function TPCSafeboxRootHash.CheckProof(ABlockIndex, ATotalBlocks: Integer; const AProofLevels: TProofLevels): Boolean; var iLevel : Integer; LLevelItemsCount : Integer; LLevelItemIndex : Integer; LRawToHash, LPreviousHashedValue : TRawBytes; begin // At least 1 level (single) or >2 levels where 0=leaf and Length-1 = RootHash if (Length(AProofLevels.Levels)=0) then Exit(False); if (Length(AProofLevels.Levels)=2) then Exit(False); Result := True; if (Length(AProofLevels.Levels)=1) then Exit(True); // If only 1 level, nothing to proof, is a single proof = True iLevel := 1; LLevelItemsCount := ATotalBlocks; LLevelItemIndex := ABlockIndex; SetLength(LRawToHash,32 * 2); LPreviousHashedValue := AProofLevels.Levels[0]; while (iLevel<Length(AProofLevels.Levels)) do begin // Left or right? if (LLevelItemIndex MOD 2)=0 then begin // Even if (LLevelItemIndex+1<LLevelItemsCount) then begin Move(LPreviousHashedValue[0],LRawToHash[0],32); Move(AProofLevels.Levels[iLevel][0],LRawToHash[32],32); LPreviousHashedValue := TCrypto.DoSha256(LRawToHash); end else begin LPreviousHashedValue := Copy(LPreviousHashedValue); end; end else begin // Odd, always on right side Move(LPreviousHashedValue[0],LRawToHash[32],32); Move(AProofLevels.Levels[iLevel][0],LRawToHash[0],32); LPreviousHashedValue := TCrypto.DoSha256(LRawToHash); end; LLevelItemIndex := LLevelItemIndex DIV 2; LLevelItemsCount := ((LLevelItemsCount-1) DIV 2)+1; inc(iLevel); end; Result := TBaseType.Equals(LPreviousHashedValue,AProofLevels.Levels[High(AProofLevels.Levels)]); end; class function TPCSafeboxRootHash.GetProof(ABlocksHashBuffer: TBytesBuffer; ABlockIndex: Integer; var AProofLevels: TProofLevels): Boolean; // PRE: ABlockIndex is 0 indexed. Range 0..Total-1 procedure AddToProofLevels(ABlockIndexToSave : Integer; const ABlocks : TBytesBuffer); var LPByte : PByte; LNewProof : TRawBytes; begin SetLength(LNewProof,32); LPByte := ABlocks.Memory; Inc(LPByte,ABlockIndexToSave * 32); Move(LPByte^,LNewProof[0],32); // SetLength(AProofLevels.Levels,Length(AProofLevels.Levels)+1); AProofLevels.Levels[High(AProofLevels.Levels)] := LNewProof; end; procedure GetLevelProof(APreviousLevelHashBuffer: TBytesBuffer; ALevelBlockIndex : Integer; var ALevels: TProofLevels); // PRE: At least we have 1 block var LTotalBlocks : Integer; LNextLevel : TBytesBuffer; begin LTotalBlocks := APreviousLevelHashBuffer.Length DIV 32; // Is top level? if LTotalBlocks=1 then begin // Include it at top AddToProofLevels(0, APreviousLevelHashBuffer); Exit; end; // Save current level // Even or Odd if (ALevelBlockIndex MOD 2)=0 then begin // Even = Left, put right one if ALevelBlockIndex+1<LTotalBlocks then begin AddToProofLevels(ALevelBlockIndex+1, APreviousLevelHashBuffer); end else begin // Last value, add itself AddToProofLevels(ALevelBlockIndex, APreviousLevelHashBuffer); end; end else begin // Odd = Right, put left one if (ALevelBlockIndex>0) then begin AddToProofLevels(ALevelBlockIndex-1, APreviousLevelHashBuffer); end else begin // First value, add itself AddToProofLevels(0, APreviousLevelHashBuffer); end; end; // Calculate next level LNextLevel := TBytesBuffer.Create(APreviousLevelHashBuffer.Length DIV 2); try CalcNextLevelHash(APreviousLevelHashBuffer,0,LTotalBlocks,LNextLevel); GetLevelProof(LNextLevel,(ALevelBlockIndex DIV 2),ALevels); finally LNextLevel.Free; end; end; var LTotalBlocks : Integer; begin // Protection Assert((ABlocksHashBuffer.Length MOD 32)=0,'ABlocksHashBuffer invalid length ('+IntToStr(ABlocksHashBuffer.Length)+') not modulo 32 = 0'); // Init SetLength(AProofLevels.Levels,0); LTotalBlocks := ABlocksHashBuffer.Length DIV 32; Result := False; AProofLevels.Levels := Nil; if LTotalBlocks<=ABlockIndex then Exit(False); if LTotalBlocks=0 then Exit(False); // First Result := True; AddToProofLevels(ABlockIndex,ABlocksHashBuffer); if LTotalBlocks>1 then begin GetLevelProof(ABlocksHashBuffer,ABlockIndex,AProofLevels); end; end; { TBytesBuffer32Safebox } constructor TBytesBuffer32Safebox.Create(ADefaultIncrement: Integer); begin FCachedSafeboxHash := Nil; FNextLevelBytesBuffer := Nil; FSafeBoxHashCalcType := sbh_Single_Sha256; inherited Create(ADefaultIncrement); end; destructor TBytesBuffer32Safebox.Destroy; begin FreeAndNil(FNextLevelBytesBuffer); inherited; end; function TBytesBuffer32Safebox.GetSafeBoxHash: TRawBytes; begin if System.Length(FCachedSafeboxHash)=32 then Exit(FCachedSafeboxHash); if (FSafeBoxHashCalcType = sbh_Single_Sha256) then begin if ((Self.Length MOD 32)=0) and (Self.Length>0) then begin Result := TCrypto.DoSha256(Self.Memory,Self.Length); end else begin Result := Nil; end; end else if (Self.Length=32) then begin System.SetLength(Result,32); Move(Self.Memory^,Result[0],32); end else if (Self.Length>32) and ((Self.Length MOD 32)=0) then begin if Not Assigned(FNextLevelBytesBuffer) then begin RedoNextLevelsForMerkleRootHash; end; Result := FNextLevelBytesBuffer.GetSafeBoxHash; end else begin Result := Nil; end; FCachedSafeboxHash := Result; // Save to a Cache end; procedure TBytesBuffer32Safebox.NotifyUpdated(AStartPos, ACountBytes: Integer); var LLevelItemIndex, LLevelItemsCount : Integer; LPByte : PByte; LSHA256 : TRawBytes; begin inherited; FCachedSafeboxHash := Nil; // Set my cahce to Nil if (FSafeBoxHashCalcType = sbh_Single_Sha256) or ((ACountBytes<>32) or ((AStartPos MOD 32)<>0)) or (Self.Length<64) or ((Self.Length MOD 32)<>0) then begin FreeAndNil(FNextLevelBytesBuffer); end else if Not Assigned(FNextLevelBytesBuffer) then begin // First time must "Redo" RedoNextLevelsForMerkleRootHash; end else begin LLevelItemIndex := AStartPos DIV 32; LLevelItemsCount := Self.Length DIV 32; LPByte := Self.Memory; inc(LPByte,AStartPos); // Left or right? if (LLevelItemIndex MOD 2)=0 then begin // Even, we are Left if (LLevelItemIndex+1<LLevelItemsCount) then begin LSHA256 := TCrypto.DoSha256(PAnsiChar(LPByte),64); FNextLevelBytesBuffer.Replace((AStartPos DIV 2),LSHA256); end else begin // No sheet on right, same value on next level FNextLevelBytesBuffer.Replace(AStartPos DIV 2,LPByte^,32); end; end else begin // Odd, is on right side Dec(LPByte,32); LSHA256 := TCrypto.DoSha256(PAnsiChar(LPByte),64); FNextLevelBytesBuffer.Replace(((AStartPos-32) DIV 2),LSHA256); end; end; end; procedure TBytesBuffer32Safebox.RedoNextLevelsForMerkleRootHash; var i : Integer; LNextDefaultIncrement : Integer; begin if (Self.Length<64) or ((Self.Length MOD 32)<>0) then begin FreeAndNil(FNextLevelBytesBuffer); Exit; end; if Not Assigned(FNextLevelBytesBuffer) then begin if (DefaultIncrement >= 64) then LNextDefaultIncrement := DefaultIncrement DIV 2 else LNextDefaultIncrement := 32; FNextLevelBytesBuffer := TBytesBuffer32Safebox.Create(LNextDefaultIncrement); FNextLevelBytesBuffer.SafeBoxHashCalcType := Self.SafeBoxHashCalcType; end; for i := 0 to (((Self.Length+32) DIV 64)-1) do begin NotifyUpdated( (i*64), 32); end; end; procedure TBytesBuffer32Safebox.SetSafeBoxHashCalcType(const Value: TSafeboxHashCalcType); begin if FSafeBoxHashCalcType=Value then Exit; FCachedSafeboxHash := Nil; FSafeBoxHashCalcType := Value; FreeAndNil(FNextLevelBytesBuffer); end; end.
36.084362
192
0.723613
f1539f7addc7a207643e1182a2b7de0cb727d7ad
15,988
pas
Pascal
windows/src/ext/jedi/jvcl/tests/RxLib/Source/JvDBLists.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jvcl/tests/RxLib/Source/JvDBLists.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/RxLib/Source/JvDBLists.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: JvDBLists.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: -----------------------------------------------------------------------------} {$A+,B-,C+,D+,E-,F-,G+,H+,I+,J+,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1} {$I JEDI.INC} unit JvDBLists; interface uses SysUtils, Classes, DB, DBTables, JvDBUtils, JvBdeUtils, {$IFDEF WIN32} Windows, Bde; {$ELSE} WinTypes, WinProcs, DbiTypes, DbiProcs, DbiErrs; {$ENDIF} type { TJvBDEItems } TBDEItemType = (bdDatabases, bdDrivers, bdLangDrivers, bdUsers {$IFDEF WIN32}, bdRepositories {$ENDIF}); TJvCustomBDEItems = class(TBDEDataSet) private FItemType: TBDEItemType; {$IFDEF WIN32} FSessionName: string; FSessionLink: TDatabase; function GetDBSession: TSession; procedure SetSessionName(const Value: string); {$ENDIF} procedure SetItemType(Value: TBDEItemType); protected {$IFDEF WIN32} function GetRecordCount: {$IFNDEF Delphi3_Up} Longint {$ELSE} Integer; override {$ENDIF}; procedure OpenCursor {$IFDEF Delphi3_Up}(InfoQuery: Boolean){$ENDIF}; override; procedure CloseCursor; override; {$ENDIF} function CreateHandle: HDBICur; override; property ItemType: TBDEItemType read FItemType write SetItemType default bdDatabases; public {$IFDEF WIN32} {$IFDEF Delphi3_Up} function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override; {$ENDIF} property DBSession: TSession read GetDBSession; {$IFNDEF Delphi3_Up} property RecordCount: Longint read GetRecordCount; {$ENDIF} published property SessionName: string read FSessionName write SetSessionName; {$ENDIF WIN32} end; TJvBDEItems = class(TJvCustomBDEItems) published property ItemType; end; { TJvDBListDataSet } TJvDBListDataSet = class(TDBDataSet) {$IFDEF WIN32} protected function GetRecordCount: {$IFNDEF Delphi3_Up} Longint {$ELSE} Integer; override {$ENDIF}; public {$IFDEF Delphi3_Up} function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override; {$ELSE} property RecordCount: Longint read GetRecordCount; {$ENDIF} {$ENDIF} end; { TJvDatabaseItems } TDBItemType = (dtTables, dtStoredProcs, dtFiles {$IFDEF WIN32}, dtFunctions {$ENDIF}); TJvCustomDatabaseItems = class(TJvDBListDataSet) private FExtended: Boolean; FSystemItems: Boolean; FFileMask: string; FItemType: TDBItemType; procedure SetFileMask(const Value: string); procedure SetExtendedInfo(Value: Boolean); procedure SetSystemItems(Value: Boolean); procedure SetItemType(Value: TDBItemType); protected function CreateHandle: HDBICur; override; function GetItemName: string; property ItemType: TDBItemType read FItemType write SetItemType default dtTables; property ExtendedInfo: Boolean read FExtended write SetExtendedInfo default False; property FileMask: string read FFileMask write SetFileMask; property SystemItems: Boolean read FSystemItems write SetSystemItems default False; public property ItemName: string read GetItemName; end; TJvDatabaseItems = class(TJvCustomDatabaseItems) published property ItemType; property ExtendedInfo; property FileMask; property SystemItems; end; { TJvTableItems } TTabItemType = (dtFields, dtIndices, dtValChecks, dtRefInt, dtSecurity, dtFamily); TJvCustomTableItems = class(TJvDBListDataSet) private FTableName: TFileName; FItemType: TTabItemType; FPhysTypes: Boolean; procedure SetTableName(const Value: TFileName); procedure SetItemType(Value: TTabItemType); procedure SetPhysTypes(Value: Boolean); protected function CreateHandle: HDBICur; override; property ItemType: TTabItemType read FItemType write SetItemType default dtFields; property PhysTypes: Boolean read FPhysTypes write SetPhysTypes default False; { for dtFields only } published property TableName: TFileName read FTableName write SetTableName; end; TJvTableItems = class(TJvCustomTableItems) published property ItemType; property PhysTypes; end; { TJvDatabaseDesc } TJvDatabaseDesc = class(TObject) private FDescription: DBDesc; public constructor Create(const DatabaseName: string); property Description: DBDesc read FDescription; end; { TJvDriverDesc } TJvDriverDesc = class(TObject) private FDescription: DRVType; public constructor Create(const DriverType: string); property Description: DRVType read FDescription; end; {*************************************************************************} {$IFNDEF CBUILDER} { Obsolete classes, for backward compatibility only } type TJvDatabaseList = class(TJvCustomBDEItems); TJvLangDrivList = class(TJvCustomBDEItems) constructor Create(AOwner: TComponent); override; end; TJvTableList = class(TJvCustomDatabaseItems) public function GetTableName: string; published property ExtendedInfo; property FileMask; property SystemItems; end; TJvStoredProcList = class(TJvCustomDatabaseItems) public constructor Create(AOwner: TComponent); override; published property ExtendedInfo; property SystemItems; end; TJvFieldList = class(TJvCustomTableItems); TJvIndexList = class(TJvCustomTableItems) constructor Create(AOwner: TComponent); override; end; {$ENDIF CBUILDER} implementation uses DBConsts, {$IFDEF Delphi3_Up} BDEConst, {$ENDIF} JvDConst; { Utility routines } function dsGetRecordCount(DataSet: TBDEDataSet): Longint; begin if DataSet.State = dsInactive then _DBError(SDataSetClosed); Check(DbiGetRecordCount(DataSet.Handle, Result)); end; {$IFDEF WIN32} type TJvSessionLink = class(TDatabase) private FList: TJvCustomBDEItems; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; end; constructor TJvSessionLink.Create(AOwner: TComponent); begin inherited Create(AOwner); if (AOwner <> nil) and (AOwner is TSession) then SessionName := TSession(AOwner).SessionName; Temporary := True; KeepConnection := False; end; destructor TJvSessionLink.Destroy; begin if FList <> nil then begin FList.FSessionLink := nil; FList.Close; end; inherited Destroy; end; {$ENDIF} { TJvCustomBDEItems } procedure TJvCustomBDEItems.SetItemType(Value: TBDEItemType); begin if ItemType <> Value then begin CheckInactive; FItemType := Value; end; end; function TJvCustomBDEItems.CreateHandle: HDBICur; begin case FItemType of bdDatabases: Check(DbiOpenDatabaseList(Result)); bdDrivers: Check(DbiOpenDriverList(Result)); bdLangDrivers: Check(DbiOpenLdList(Result)); bdUsers: Check(DbiOpenUserList(Result)); {$IFDEF WIN32} bdRepositories: Check(DbiOpenRepositoryList(Result)); {$ENDIF} end; end; {$IFDEF WIN32} function TJvCustomBDEItems.GetDBSession: TSession; begin Result := Sessions.FindSession(SessionName); if Result = nil then {$IFDEF Delphi3_Up} Result := DBTables.Session; {$ELSE} Result := DB.Session; {$ENDIF} end; procedure TJvCustomBDEItems.SetSessionName(const Value: string); begin CheckInactive; FSessionName := Value; DataEvent(dePropertyChange, 0); end; procedure TJvCustomBDEItems.OpenCursor; var S: TSession; begin S := Sessions.List[SessionName]; S.Open; Sessions.CurrentSession := S; FSessionLink := TJvSessionLink.Create(S); try TJvSessionLink(FSessionLink).FList := Self; inherited OpenCursor{$IFDEF Delphi3_Up}(InfoQuery){$ENDIF}; except FSessionLink.Free; FSessionLink := nil; raise; end; end; procedure TJvCustomBDEItems.CloseCursor; begin inherited CloseCursor; if FSessionLink <> nil then begin TJvSessionLink(FSessionLink).FList := nil; FSessionLink.Free; FSessionLink := nil; end; end; {$ENDIF WIN32} {$IFDEF WIN32} function TJvCustomBDEItems.GetRecordCount: {$IFNDEF Delphi3_Up} Longint {$ELSE} Integer {$ENDIF}; begin Result := dsGetRecordCount(Self); end; {$ENDIF WIN32} {$IFDEF Delphi3_Up} function TJvCustomBDEItems.Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; begin DoBeforeScroll; Result := DataSetLocateThrough(Self, KeyFields, KeyValues, Options); if Result then begin DataEvent(deDataSetChange, 0); DoAfterScroll; end; end; {$ENDIF Delphi3_Up} { TJvDBListDataSet } {$IFDEF Delphi3_Up} function TJvDBListDataSet.Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; begin DoBeforeScroll; Result := DataSetLocateThrough(Self, KeyFields, KeyValues, Options); if Result then begin DataEvent(deDataSetChange, 0); DoAfterScroll; end; end; {$ENDIF Delphi3_Up} {$IFDEF WIN32} function TJvDBListDataSet.GetRecordCount: {$IFNDEF Delphi3_Up} Longint {$ELSE} Integer {$ENDIF}; begin Result := dsGetRecordCount(Self); end; {$ENDIF WIN32} { TJvCustomDatabaseItems } procedure TJvCustomDatabaseItems.SetItemType(Value: TDBItemType); begin if ItemType <> Value then begin CheckInactive; FItemType := Value; DataEvent(dePropertyChange, 0); end; end; procedure TJvCustomDatabaseItems.SetFileMask(const Value: string); begin if FileMask <> Value then begin if Active and (FItemType in [dtTables, dtFiles]) then begin DisableControls; try Close; FFileMask := Value; Open; finally EnableControls; end; end else FFileMask := Value; DataEvent(dePropertyChange, 0); end; end; procedure TJvCustomDatabaseItems.SetExtendedInfo(Value: Boolean); begin if FExtended <> Value then begin CheckInactive; FExtended := Value; DataEvent(dePropertyChange, 0); end; end; procedure TJvCustomDatabaseItems.SetSystemItems(Value: Boolean); begin if FSystemItems <> Value then begin if Active and (FItemType in [dtTables, dtStoredProcs]) then begin DisableControls; try Close; FSystemItems := Value; Open; finally EnableControls; end; end else FSystemItems := Value; DataEvent(dePropertyChange, 0); end; end; function TJvCustomDatabaseItems.CreateHandle: HDBICur; var WildCard: PChar; Pattern: array[0..DBIMAXTBLNAMELEN] of Char; begin WildCard := nil; if FileMask <> '' then WildCard := AnsiToNative(DBLocale, FileMask, Pattern, SizeOf(Pattern) - 1); case FItemType of dtTables: Check(DbiOpenTableList(DBHandle, FExtended, FSystemItems, WildCard, Result)); dtStoredProcs: if DataBase.IsSQLBased then Check(DbiOpenSPList(DBHandle, FExtended, FSystemItems, nil, Result)) else DatabaseError(LoadStr(SLocalDatabase)); dtFiles: Check(DbiOpenFileList(DBHandle, WildCard, Result)); {$IFDEF WIN32} dtFunctions: if DataBase.IsSQLBased then Check(DbiOpenFunctionList(DBHandle, DBIFUNCOpts(FExtended), @Result)) else DatabaseError(LoadStr(SLocalDatabase)); {$ENDIF} end; end; function TJvCustomDatabaseItems.GetItemName: string; const sObjListNameField = 'NAME'; sFileNameField = 'FILENAME'; sTabListExtField = 'EXTENSION'; var Temp: string; Field: TField; begin Result := ''; if not Active then Exit; if FItemType = dtFiles then Field := FindField(sFileNameField) else Field := FindField(sObjListNameField); if Field = nil then Exit; Result := Field.AsString; if FItemType in [dtTables, dtFiles] then begin Field := FindField(sTabListExtField); if Field = nil then Exit; Temp := Field.AsString; if Temp <> '' then begin if Temp[1] <> '.' then Temp := '.' + Temp; Result := Result + Temp; end; end; end; { TJvCustomTableItems } procedure TJvCustomTableItems.SetItemType(Value: TTabItemType); begin if ItemType <> Value then begin CheckInactive; FItemType := Value; DataEvent(dePropertyChange, 0); end; end; procedure TJvCustomTableItems.SetPhysTypes(Value: Boolean); begin if Value <> PhysTypes then begin if Active and (ItemType = dtFields) then begin DisableControls; try Close; FPhysTypes := Value; Open; finally EnableControls; end; end else FPhysTypes := Value; DataEvent(dePropertyChange, 0); end; end; procedure TJvCustomTableItems.SetTableName(const Value: TFileName); begin if Value <> FTableName then begin if Active then begin DisableControls; try Close; FTableName := Value; if FTableName <> '' then Open; finally EnableControls; end; end else FTableName := Value; DataEvent(dePropertyChange, 0); end; end; function TJvCustomTableItems.CreateHandle: HDBICur; var STableName: PChar; begin if FTableName = '' then _DBError(SNoTableName); STableName := StrAlloc(Length(FTableName) + 1); try AnsiToNative(DBLocale, FTableName, STableName, Length(FTableName)); case FItemType of dtFields: while not CheckOpen(DbiOpenFieldList(DBHandle, STableName, nil, FPhysTypes, Result)) do {Retry}; dtIndices: while not CheckOpen(DbiOpenIndexList(DBHandle, STableName, nil, Result)) do {Retry}; dtValChecks: while not CheckOpen(DbiOpenVchkList(DBHandle, STableName, nil, Result)) do {Retry}; dtRefInt: while not CheckOpen(DbiOpenRintList(DBHandle, STableName, nil, Result)) do {Retry}; dtSecurity: while not CheckOpen(DbiOpenSecurityList(DBHandle, STableName, nil, Result)) do {Retry}; dtFamily: while not CheckOpen(DbiOpenFamilyList(DBHandle, STableName, nil, Result)) do {Retry}; end; finally StrDispose(STableName); end; end; { TJvDatabaseDesc } constructor TJvDatabaseDesc.Create(const DatabaseName: string); var Buffer: PChar; begin Buffer := StrPCopy(StrAlloc(Length(DatabaseName) + 1), DatabaseName); try Check(DbiGetDatabaseDesc(Buffer, @FDescription)); finally StrDispose(Buffer); end; end; { TJvDriverDesc } constructor TJvDriverDesc.Create(const DriverType: string); var Buffer: PChar; begin Buffer := StrPCopy(StrAlloc(Length(DriverType) + 1), DriverType); try Check(DbiGetDriverDesc(Buffer, FDescription)); finally StrDispose(Buffer); end; end; {*************************************************************************} {$IFNDEF CBUILDER} { TJvLangDrivList } constructor TJvLangDrivList.Create(AOwner: TComponent); begin inherited Create(AOwner); FItemType := bdLangDrivers; end; { TJvTableList } function TJvTableList.GetTableName: string; begin Result := ItemName; end; { TJvStoredProcList } constructor TJvStoredProcList.Create(AOwner: TComponent); begin inherited Create(AOwner); FItemType := dtStoredProcs; end; { TJvIndexList } constructor TJvIndexList.Create(AOwner: TComponent); begin inherited Create(AOwner); FItemType := dtIndices; end; {$ENDIF CBUILDER} end.
25.217666
97
0.708344
f13f860685b6a808c5e4f539dc7007f8465189b8
1,526
dpr
Pascal
Accepted_The 2000's ACM-ICPC/P2935 (Subway tree systems).dpr
peneksglazami/acm-icpc-training
a3c41b65b8f8523713f9859b076f300a12c4e7f3
[ "CC0-1.0" ]
null
null
null
Accepted_The 2000's ACM-ICPC/P2935 (Subway tree systems).dpr
peneksglazami/acm-icpc-training
a3c41b65b8f8523713f9859b076f300a12c4e7f3
[ "CC0-1.0" ]
null
null
null
Accepted_The 2000's ACM-ICPC/P2935 (Subway tree systems).dpr
peneksglazami/acm-icpc-training
a3c41b65b8f8523713f9859b076f300a12c4e7f3
[ "CC0-1.0" ]
null
null
null
{Problem: 2935 - Subway tree systems ACM ICPC - Europe - Northwestern - 2003/2004 Solved by Andrey Grigorov} {$A+,B-,C+,D-,E-,F-,G+,H+,I-,J-,K-,L-,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+} {$MINSTACKSIZE $00004000} {$MAXSTACKSIZE $00100000} program Problem2935; {$APPTYPE CONSOLE} const MaxL = 3000; type TStr = array [1..MaxL div 2] of String; var St1,St2: String; Test: Integer; procedure QuickSort(var a: TStr; N: Integer); procedure QSort(l,r: Integer); var i,j: Integer; buf,x: String; begin i:=l; j:=r; x:=a[(l+r) div 2]; repeat while a[i] < x do inc(i); while x < a[j] do dec(j); if i <= j then begin buf:=a[i]; a[i]:=a[j]; a[j]:=buf; inc(i); dec(j); end; until i > j; if i < r then QSort(i,r); if j > l then QSort(l,j); end; begin QSort(1,N); end; function Sort(St: String): String; var a: TStr; i,N,cnt: Integer; begin Result:=''; if St = '' then Exit; N:=0; repeat i:=0; cnt:=0; repeat inc(i); if St[i] = '1' then dec(cnt) else inc(cnt); until cnt = 0; inc(N); a[N]:='0'+Sort(Copy(St,2,i-2))+'1'; Delete(St,1,i); until St = ''; QuickSort(a,N); for i:=1 to N do Result:=Result+a[i]; end; begin ReadLn(Test); while Test > 0 do begin ReadLn(St1); ReadLn(St2); if Sort(St1) = Sort(St2) then WriteLn('same') else WriteLn('different'); Dec(Test); end; end.
17.54023
77
0.517693
f16311c0835f794f2db403ea2e5420b139d51e6c
2,594
pas
Pascal
src/thirdparty/pascal/dws2ConsoleAdapter.pas
atkins126/underscript
f6961044ca4fe87389e30c68acef2d5efed2c905
[ "MIT" ]
14
2018-05-26T19:34:13.000Z
2020-10-19T12:08:10.000Z
src/thirdparty/pascal/dws2ConsoleAdapter.pas
atkins126/underscript
f6961044ca4fe87389e30c68acef2d5efed2c905
[ "MIT" ]
null
null
null
src/thirdparty/pascal/dws2ConsoleAdapter.pas
atkins126/underscript
f6961044ca4fe87389e30c68acef2d5efed2c905
[ "MIT" ]
2
2020-12-18T21:33:46.000Z
2021-03-28T03:07:04.000Z
unit dws2ConsoleAdapter; interface uses Variants, Classes, {$IFDEF LINUX} Libc, {$ELSE} Windows, {$ENDIF} dws2Comp, dws2Exprs, dws2Errors, dws2Symbols, dws2Functions, dws2compiler; type TConsoleReadLnFunction = class(TInternalFunction) public procedure Execute; override; end; TConsoleWriteFunction = class(TInternalFunction) public procedure Execute; override; end; TConsoleWriteLnFunction = class(TInternalFunction) public procedure Execute; override; end; Tdws2ConsoleUnit = class(Tdws2UnitComponent) protected procedure AddUnitSymbols(SymbolTable: TSymbolTable); override; public constructor Create(AOwner: TComponent); override; destructor Destroy; end; implementation uses SysUtils, dws2Strings; { TConsoleReadLnFunction } procedure TConsoleReadLnFunction.Execute; var s: string; c: array [0..255] of Char; numRead, dummy: Cardinal; begin {$IFDEF LINUX} {$ELSE} s := VarToStr(Info['s']); WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), PChar(s), Length(s), dummy, nil); ReadConsole(GetStdHandle(STD_INPUT_HANDLE), @c, 255, numRead, nil); s := #10; WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), PChar(s), 1, dummy, nil); SetString(s, PChar(@c[0]), numRead); Info.Result := s; {$ENDIF} end; { TWriteFunction } procedure TConsoleWriteFunction.Execute; var s: string; dummy: Cardinal; begin {$IFDEF LINUX} {$ELSE} s := VarToStr(Info['s']); WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), PChar(s), Length(s), dummy, nil); {$ENDIF} end; { TWriteLnFunction } procedure TConsoleWriteLnFunction.Execute; var s: string; Dummy: Cardinal; begin {$IFDEF LINUX} {$ELSE} s := VarToStr(Info['s']) + #13#10; WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), PChar(s), Length(s), dummy, nil); {$ENDIF} end; { Tdws2ConsoleType } constructor Tdws2ConsoleUnit.Create(AOwner: TComponent); begin inherited; if not(csDesigning in ComponentState) then begin {$IFNDEF CONSOLE } Win32Check(AllocConsole); {$ENDIF} SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT or ENABLE_ECHO_INPUT); end; end; destructor Tdws2ConsoleUnit.Destroy; begin inherited; if not(csDesigning in ComponentState) then FreeConsole; end; procedure Tdws2ConsoleUnit.AddUnitSymbols(SymbolTable: TSymbolTable); begin TConsoleReadLnFunction.Create(SymbolTable, 'ReadLn', ['s', SYS_VARIANT], SYS_STRING); TConsoleWriteFunction.Create(SymbolTable, 'Write', ['s', SYS_VARIANT], ''); TConsoleWriteLnFunction.Create(SymbolTable, 'WriteLn', ['s', SYS_VARIANT], ''); end; end.
20.587302
91
0.731303
f10ebf396dae10b110031a63589489a3ea372cc9
2,187
pas
Pascal
Test/uWorkerTest.pas
Cladistics/Rosalind
09614bdf2b955ef338a5f516ab9cc3498988ae25
[ "MIT" ]
null
null
null
Test/uWorkerTest.pas
Cladistics/Rosalind
09614bdf2b955ef338a5f516ab9cc3498988ae25
[ "MIT" ]
null
null
null
Test/uWorkerTest.pas
Cladistics/Rosalind
09614bdf2b955ef338a5f516ab9cc3498988ae25
[ "MIT" ]
null
null
null
unit uWorkerTest; interface uses DUnitX.TestFramework, uWorker.Intf; type [TestFixture] TWorkerTest = class(TObject) strict private function TestWorker(const AWorker: IWorker; const AInput: string): string; public [Test] [TestCase('DNA Worker TestCase 1', 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC,20 12 17 21')] [TestCase('DNA Worker TestCase 2', ',0 0 0 0')] [TestCase('DNA Worker TestCase 3', 'ZZCT,0 1 0 1')] procedure TestDnaWorker(const AInput, AExpectedResult: string); [Test] [TestCase('FIBD Worker TestCase 1', '6 3,4')] [TestCase('FIBD Worker TestCase 2', '6 4,6')] [TestCase('FIBD Worker TestCase 3', '7 4,9')] [TestCase('FIBD Worker TestCase 4', '7 4,9')] [TestCase('FIBD Worker TestCase 5', '82 20,61190227951392303')] [TestCase('FIBD Worker TestCase 6', '88 17,1090086281966822291')] [TestCase('FIBD Worker TestCase 7', '100 20,2880780934725894724')] procedure TestFIBDWorker(const AInput, AExpectedResult: string); end; implementation uses System.Classes, System.SysUtils, uSimpleReaderWriter, uDNA, uFIBD; procedure TWorkerTest.TestDnaWorker(const AInput, AExpectedResult: string); var Worker: IWorker; ActualResult: string; begin Worker := TDNA_Worker.Create; ActualResult := TestWorker(Worker, AInput); Assert.AreEqual(AExpectedResult, ActualResult); end; procedure TWorkerTest.TestFIBDWorker(const AInput, AExpectedResult: string); var Worker: IWorker; ActualResult: string; begin Worker := TFIBD_Worker.Create; ActualResult := TestWorker(Worker, AInput); Assert.AreEqual(AExpectedResult, ActualResult); end; function TWorkerTest.TestWorker(const AWorker: IWorker; const AInput: string): string; var Writer: IWriter; StringWriter: TStringWriter; begin StringWriter := TStringWriter.Create; try Writer := TSimpleWriter.Create(StringWriter); AWorker.DoWork(TSimpleReader.Create(AInput), Writer); Result := StringWriter.ToString; finally FreeAndNil(StringWriter); end; end; initialization TDUnitX.RegisterTestFixture(TWorkerTest); end.
29.958904
126
0.715135
85d2ad64f8d129292e605597d7afb1b3ba59982a
12,483
pas
Pascal
Generics.Helpers.pas
randydom/commonx
2315f1acf41167bd77ba4d040b3f5b15a5c5b81a
[ "MIT" ]
48
2018-11-19T22:13:00.000Z
2021-11-02T17:25:41.000Z
Generics.Helpers.pas
randydom/commonx
2315f1acf41167bd77ba4d040b3f5b15a5c5b81a
[ "MIT" ]
6
2018-11-24T17:15:29.000Z
2019-05-15T14:59:56.000Z
Generics.Helpers.pas
adaloveless/commonx
ed37b239e925119c7ceb3ac7949eefb0259c7f77
[ "MIT" ]
12
2018-11-20T15:15:44.000Z
2021-09-14T10:12:43.000Z
{ * Copyright (c) 2013 Maciej Izak (aka. HNB or mrmizak) * * 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. * * Homepage: https://code.google.com/p/fpc-generics-collections/ * SVN: http://fpc-generics-collections.googlecode.com/svn/trunk/ * ZIP: https://code.google.com/p/fpc-generics-collections/downloads/list * * *LICENSE* to choose from: * -zlib * -beerware mixed with zlib * -postcardware mixed with zlib * * If you select beerware (preferred) or postcardware, please send me email * (hnb.code[at]gmail.com) to get my home address. } unit Generics.Helpers experimental; {$mode delphi}{$H+} interface uses Classes, SysUtils; type { TValueHelper } TValueHelper<T> = record private F: T; public class operator Implicit(const A: T): TValueHelper<T>; inline; class operator Implicit(const A: TValueHelper<T>): T; inline; function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueAnsiStringHelper } TValueAnsiStringHelper = record helper for AnsiString function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueUnicodeStringHelper } TValueUnicodeStringHelper = record helper for UnicodeString function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueShortStringHelper } TValueShortStringHelper = record helper for ShortString function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueUTF8StringHelper } TValueUTF8StringHelper = record helper for UTF8String function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueAnsiCharHelper } TValueAnsiCharHelper = record helper for AnsiChar function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueWideCharHelper } TValueWideCharHelper = record helper for WideChar function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueInt8Helper } TValueInt8Helper = record helper for Int8 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; function High: Integer; inline; function Low: Integer; inline; class function GetSignMask: UInt32; static; inline; end; { TValueInt16Helper } TValueInt16Helper = record helper for Int16 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; function High: Integer; inline; function Low: Integer; inline; class function GetSignMask: UInt32; static; inline; end; { TValueInt32Helper } TValueInt32Helper = record helper for Int32 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; function High: LongInt; inline; function Low: LongInt; inline; class function GetSignMask: UInt32; static; inline; end; { TValueUInt8Helper } TValueUInt8Helper = record helper for UInt8 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; function High: LongInt; inline; function Low: LongInt; inline; class function GetSignMask: UInt32; static; inline; end; { TValueUInt16Helper } TValueUInt16Helper = record helper for UInt16 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; function High: LongInt; inline; function Low: LongInt; inline; class function GetSignMask: UInt32; static; inline; end; { TValueUInt32Helper } TValueUInt32Helper = record helper for UInt32 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; class function GetSignMask: UInt32; static; inline; end; { TValueSingleHelper } TValueSingleHelper = record helper for Single function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueDoubleHelper } TValueDoubleHelper = record helper for Double function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueExtendedHelper } TValueExtendedHelper = record helper for Extended function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueCompHelper } TValueCompHelper = record helper for Comp function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueReal48Helper } TValueReal48Helper = record helper for Real48 function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueRealHelper } TValueRealHelper = record helper for Real function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueCurrencyHelper } TValueCurrencyHelper = record helper for Currency function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; { TValueVariantHelper } // TValueVariantHelper = record helper for Variant // function GetValueSize: Integer; inline; // function GetReferenceToValue: Pointer; inline; // end; { TValueTObjectHelper } TValueTObjectHelper = class helper for TObject function GetValueSize: Integer; inline; function GetReferenceToValue: Pointer; inline; end; implementation { TValueHelper<T> } class operator TValueHelper<T>.Implicit(const A: T): TValueHelper<T>; begin Result.F := A; end; class operator TValueHelper<T>.Implicit(const A: TValueHelper<T>): T; begin Result := A.F; end; function TValueHelper<T>.GetValueSize: Integer; begin Result := SizeOf(T); end; function TValueHelper<T>.GetReferenceToValue: Pointer; begin Result := @F; end; { TValueTObjectHelper } function TValueTObjectHelper.GetValueSize: Integer; begin Result := SizeOf(TObject); end; function TValueTObjectHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueWideCharHelper } function TValueWideCharHelper.GetValueSize: Integer; begin Result := SizeOf(WideChar); end; function TValueWideCharHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueAnsiCharHelper } function TValueAnsiCharHelper.GetValueSize: Integer; begin Result := SizeOf(Ansichar); end; function TValueAnsiCharHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueCurrencyHelper } function TValueCurrencyHelper.GetValueSize: Integer; begin Result := SizeOf(Currency); end; function TValueCurrencyHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueRealHelper } function TValueRealHelper.GetValueSize: Integer; begin Result := SizeOf(Real); end; function TValueRealHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueReal48Helper } function TValueReal48Helper.GetValueSize: Integer; begin Result := SizeOf(Real48); end; function TValueReal48Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueCompHelper } function TValueCompHelper.GetValueSize: Integer; begin Result := SizeOf(Comp); end; function TValueCompHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueUTF8StringHelper } function TValueUTF8StringHelper.GetValueSize: Integer; begin Result := Length(Self); end; function TValueUTF8StringHelper.GetReferenceToValue: Pointer; begin if Length(Self) = 0 then Result := nil else Result := @Self[1]; end; { TValueShortStringHelper } function TValueShortStringHelper.GetValueSize: Integer; begin Result := Length(Self); end; function TValueShortStringHelper.GetReferenceToValue: Pointer; begin if Length(Self) = 0 then Result := nil else Result := @Self[1]; end; { TValueExtendedHelper } function TValueExtendedHelper.GetValueSize: Integer; begin Result := SizeOf(Extended); end; function TValueExtendedHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueDoubleHelper } function TValueDoubleHelper.GetValueSize: Integer; begin Result := SizeOf(Double); end; function TValueDoubleHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueSingleHelper } function TValueSingleHelper.GetValueSize: Integer; begin Result := SizeOf(Single); end; function TValueSingleHelper.GetReferenceToValue: Pointer; begin Result := @Self; end; { TValueUnicodeStringHelper } function TValueUnicodeStringHelper.GetValueSize: Integer; begin Result := Length(Self) * SizeOf(UnicodeChar); end; function TValueUnicodeStringHelper.GetReferenceToValue: Pointer; begin if Length(Self) <> 0 then Result := @Self[1] else Result := nil; end; { TValueUInt32Helper } function TValueUInt32Helper.GetValueSize: Integer; begin Result := SizeOf(UInt32); end; function TValueUInt32Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; class function TValueUInt32Helper.GetSignMask: UInt32; begin Result := $80000000; end; { TValueUInt16Helper } function TValueUInt16Helper.GetValueSize: Integer; begin Result := SizeOf(UInt16); end; function TValueUInt16Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; function TValueUInt16Helper.High: LongInt; begin Result := System.High(UInt16); end; function TValueUInt16Helper.Low: LongInt; begin Result := System.Low(UInt16); end; class function TValueUInt16Helper.GetSignMask: UInt32; begin Result := $8000; end; { TValueUInt8Helper } function TValueUInt8Helper.GetValueSize: Integer; begin Result := SizeOf(UInt8); end; function TValueUInt8Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; function TValueUInt8Helper.High: LongInt; begin Result := System.High(UInt8); end; function TValueUInt8Helper.Low: LongInt; begin Result := System.Low(UInt8); end; class function TValueUInt8Helper.GetSignMask: UInt32; begin Result := $80; end; { TValueInt32Helper } function TValueInt32Helper.GetValueSize: Integer; begin Result := SizeOf(Int32); end; function TValueInt32Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; function TValueInt32Helper.High: LongInt; begin Result := System.High(Int32); end; function TValueInt32Helper.Low: LongInt; begin Result := System.Low(Int32); end; class function TValueInt32Helper.GetSignMask: UInt32; begin Result := $80000000; end; { TValueInt16Helper } function TValueInt16Helper.GetValueSize: Integer; begin Result := SizeOf(Int16); end; function TValueInt16Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; function TValueInt16Helper.High: Integer; begin Result := System.High(Int16); end; function TValueInt16Helper.Low: Integer; begin Result := System.Low(Int16); end; class function TValueInt16Helper.GetSignMask: UInt32; begin Result := $8000 end; { TValueInt8Helper } function TValueInt8Helper.GetValueSize: Integer; begin Result := SizeOf(Int8); end; function TValueInt8Helper.GetReferenceToValue: Pointer; begin Result := @Self; end; function TValueInt8Helper.High: Integer; begin Result := System.High(Int8); end; function TValueInt8Helper.Low: Integer; begin Result := System.Low(Int8); end; class function TValueInt8Helper.GetSignMask: UInt32; begin Result := $80; end; { TRawDataStringHelper } function TValueAnsiStringHelper.GetValueSize: Integer; begin Result := Length(Self) * SizeOf(AnsiChar); end; function TValueAnsiStringHelper.GetReferenceToValue: Pointer; begin if Length(Self) <> 0 then Result := @Self[1] else Result := nil; end; end.
21.086149
75
0.75022
afc5d1bc85c7ab2a72da7f6aacd3efa24d3ec9c9
2,729
pas
Pascal
comm/0043.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
11
2015-12-12T05:13:15.000Z
2020-10-14T13:32:08.000Z
comm/0043.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
null
null
null
comm/0043.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
8
2017-05-05T05:24:01.000Z
2021-07-03T20:30:09.000Z
{ Here's a TP function that will report the current UART baud rate for any serial port device (modem, mouse, etc.) ... } (*************************** GETBAUD.PAS ***************************) PROGRAM GetBaud; { compiler: Turbo Pascal 4.0+ } { Mar.23.94 Greg Vigneault } (*-----------------------------------------------------------------*) { get the current baud rate of a serial i/o port (reads the UART)...} FUNCTION SioRate (ComPort :WORD; VAR Baud :LONGINT) :BOOLEAN; CONST DLAB = $80; { divisor latch access bit } VAR BaseIO, { COM base i/o port address } BRGdiv, { baud rate generator divisor } regDLL, { BRG divisor, latched LSB } regDLM, { BRG divisor, latched MSB } regLCR :WORD; { line control register } BEGIN Baud := 0; { assume nothing } IF (ComPort IN [1..4]) THEN BEGIN { must be 1..4 } BaseIO := MemW[$40:(ComPort-1) SHL 1]; { fetch base i/o port } IF (BaseIO <> 0) THEN BEGIN { has BIOS seen it? } regDLL := BaseIO; { BRGdiv, latched LSB } regDLM := BaseIO + 1; { BRGdiv, latched MSB } regLCR := BaseIO + 3; { line control reg } Port[regLCR] := Port[regLCR] OR DLAB; { set DLAB } BRGdiv := WORD(Port[regDLL]); { BRGdiv LSB } BRGdiv := BRGdiv OR WORD(Port[regDLM]) SHL 8; { BRGdiv MSB } Port[regLCR] := Port[regLCR] AND NOT DLAB; { reset DLAB } IF (BRGdiv <> 0) THEN Baud := 1843200 DIV (LONGINT(BRGdiv) SHL 4); { calc bps } END; {IF BaseIO} END; {IF ComPort} SioRate := (Baud <> 0); { success || failure } END {SioRate}; (*-----------------------------------------------------------------*) VAR ComPort : WORD; { will be 1..4 } Baud : LONGINT; { as high as 115200 bps } BEGIN {GetBaud} REPEAT WriteLn; Write ('Read baud rate for which COM port [1..4] ?: '); ReadLn (ComPort); IF NOT SioRate (ComPort, Baud) THEN BEGIN Write ('!',CHR(7)); {!beep} CASE ComPort OF 1..4 : WriteLn ('COM',ComPort,' is absent; try another...'); ELSE WriteLn ('Choose a number: 1 through 4...'); END; {CASE} END; {IF} UNTIL (Baud <> 0); WriteLn ('-> COM',ComPort,' is set for ',Baud,' bits-per-second'); END {GetBaud}. 
44.016129
70
0.440454
6a938289d5caf6d143e4e79180037a5ba7664836
61,812
pas
Pascal
src/tests/testcases/6502/testcase.cwvirtualmachine.bytecode.mos6502.pas
atkins126/cwVirtualMachine
c3ef2095a07402b16685adb4dc4243b9b519b90a
[ "BSD-3-Clause" ]
null
null
null
src/tests/testcases/6502/testcase.cwvirtualmachine.bytecode.mos6502.pas
atkins126/cwVirtualMachine
c3ef2095a07402b16685adb4dc4243b9b519b90a
[ "BSD-3-Clause" ]
null
null
null
src/tests/testcases/6502/testcase.cwvirtualmachine.bytecode.mos6502.pas
atkins126/cwVirtualMachine
c3ef2095a07402b16685adb4dc4243b9b519b90a
[ "BSD-3-Clause" ]
null
null
null
{$ifdef license} (* Copyright 2020 ChapmanWorld LLC ( https://chapmanworld.com ) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 3. Neither the name of the copyright holder 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. *) {$endif} unit TestCase.cwVirtualMachine.ByteCode.Mos6502; {$ifdef fpc} {$mode delphiunicode} {$endif} {$M+} interface uses cwTest ; type TTest_6502ByteCode = class(TTestCase) published procedure ADC_abs_x; procedure ADC_abs_y; procedure ADC_abs; procedure ADC_imm; procedure ADC_ind_y; procedure ADC_x_ind; procedure ADC_zpg_x; procedure ADC_zpg; procedure AND_abs_x; procedure AND_abs_y; procedure AND_abs; procedure AND_imm; procedure AND_ind_y; procedure AND_x_ind; procedure AND_zpg_x; procedure AND_zpg; procedure ASL; procedure ASL_abs; procedure ASL_abs_x; procedure ASL_zpg_x; procedure ASL_zpg; procedure BCC_rel; procedure BCS_rel; procedure BEQ_rel; procedure BIT_abs; procedure BIT_zpg; procedure BMI_rel; procedure BNE_rel; procedure BPL_rel; procedure BRK; procedure BVC_rel; procedure BVS_rel; procedure CLC; procedure CLD; procedure CLI; procedure CLV; procedure CMP_abs_x; procedure CMP_abs_y; procedure CMP_abs; procedure CMP_imm; procedure CMP_ind_y; procedure CMP_x_ind; procedure CMP_zpg_x; procedure CMP_zpg; procedure CPX_abs; procedure CPX_imm; procedure CPX_zpg; procedure CPY_abs; procedure CPY_imm; procedure CPY_zpg; procedure DEC_abs_x; procedure DEC_abs; procedure DEC_zpg_x; procedure DEC_zpg; procedure DEX; procedure DEY; procedure EOR_abs_x; procedure EOR_abs_y; procedure EOR_abs; procedure EOR_imm; procedure EOR_ind_y; procedure EOR_X_ind; procedure EOR_zpg_x; procedure EOR_zpg; procedure INC_abs_x; procedure INC_abs; procedure INC_zpg_x; procedure INC_zpg; procedure INX; procedure INY; procedure JMP_abs; procedure JMP_ind; procedure JSR_abs; procedure LDA_abs_x; procedure LDA_abs_y; procedure LDA_abs; procedure LDA_imm; procedure LDA_ind_y; procedure LDA_x_ind; procedure LDA_zpg_x; procedure LDA_zpg; procedure LDX_zpg; procedure LDX_abs_y; procedure LDX_abs; procedure LDX_imm; procedure LDX_zpg_y; procedure LDY_abs_x; procedure LDY_abs; procedure LDY_imm; procedure LDY_zpg_x; procedure LDY_zpg; procedure LSR; procedure LSR_abs_x; procedure LSR_abs; procedure LSR_zpg_x; procedure LSR_zpg; procedure NOP; procedure ORA_abs_x; procedure ORA_abs_y; procedure ORA_abs; procedure ORA_imm; procedure ORA_ind_y; procedure ORA_x_ind; procedure ORA_zpg_x; procedure ORA_zpg; procedure PHA; procedure PHP; procedure PLA; procedure PLP; procedure ROL; procedure ROL_abs_x; procedure ROL_abs; procedure ROL_zpg_x; procedure ROL_zpg; procedure ROR; procedure ROR_abs_x; procedure ROR_abs; procedure ROR_zpg_x; procedure ROR_zpg; procedure RTI; procedure RTS; procedure SBC_abs_y; procedure SBC_abs_x; procedure SBC_abs; procedure SBC_imm; procedure SBC_ind_y; procedure SBC_x_ind; procedure SBC_zpg_x; procedure SBC_zpg; procedure SEC; procedure SED; procedure SEI; procedure STA_abs_x; procedure STA_abs_y; procedure STA_abs; procedure STA_ind_y; procedure STA_x_ind; procedure STA_zpg_x; procedure STA_zpg; procedure STX_abs; procedure STX_zpg_y; procedure STX_zpg; procedure STY_abs; procedure STY_zpg_x; procedure STY_zpg; procedure TAX; procedure TAY; procedure TSX; procedure TXA; procedure TXS; procedure TYA; end; implementation uses cwTest.Standard , cwVirtualMachine , cwVirtualMachine.Mos6502 ; procedure TTest_6502ByteCode.ADC_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_abs_x($FEDE); // Assert: TTest.Expect( $7D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ADC_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_abs_y($FEDE); // Assert: TTest.Expect( $79, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ADC_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_abs($FEDE); // Assert: TTest.Expect( $6D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ADC_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_imm($DE); // Assert: TTest.Expect( $69, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ADC_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_ind_y($DE); // Assert: TTest.Expect( $71, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ADC_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_x_ind($DE); // Assert: TTest.Expect( $61, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ADC_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_zpg_x($DE); // Assert: TTest.Expect( $75, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ADC_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ADC_zpg($DE); // Assert: TTest.Expect( $65, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.AND_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_abs_x($FEDE); // Assert: TTest.Expect( $3D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.AND_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_abs_y($FEDE); // Assert: TTest.Expect( $39, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.AND_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_abs($FEDE); // Assert: TTest.Expect( $2D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.AND_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_imm($DE); // Assert: TTest.Expect( $29, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.AND_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_ind_y($DE); // Assert: TTest.Expect( $31, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.AND_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_x_ind($DE); // Assert: TTest.Expect( $21, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.AND_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_zpg_x($DE); // Assert: TTest.Expect( $35, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.AND_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.AND_zpg($DE); // Assert: TTest.Expect( $25, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ASL; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ASL(); // Assert: TTest.Expect( $0A, Memory[0] ); end; procedure TTest_6502ByteCode.ASL_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ASL_abs($FEDE); // Assert: TTest.Expect( $0E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ASL_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ASL_abs_x($FEDE); // Assert: TTest.Expect( $1E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ASL_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ASL_zpg_x($DE); // Assert: TTest.Expect( $16, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ASL_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ASL_zpg($DE); // Assert: TTest.Expect( $06, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BCC_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BCC_rel($DE); // Assert: TTest.Expect( $90, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BCS_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BCS_rel($DE); // Assert: TTest.Expect( $B0, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BEQ_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BEQ_rel($DE); // Assert: TTest.Expect( $F0, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BIT_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BIT_abs($FEDE); // Assert: TTest.Expect( $2C, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.BIT_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BIT_zpg($DE); // Assert: TTest.Expect( $24, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BMI_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BMI_rel($DE); // Assert: TTest.Expect( $30, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BNE_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BNE_rel($DE); // Assert: TTest.Expect( $D0, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BPL_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BPL_rel($DE); // Assert: TTest.Expect( $10, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BRK; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BRK(); // Assert: TTest.Expect( $00, Memory[0] ); end; procedure TTest_6502ByteCode.BVC_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BVC_rel($DE); // Assert: TTest.Expect( $50, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.BVS_rel; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.BVS_rel($DE); // Assert: TTest.Expect( $70, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CLC; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CLC(); // Assert: TTest.Expect( $18, Memory[0] ); end; procedure TTest_6502ByteCode.CLD; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CLD(); // Assert: TTest.Expect( $D8, Memory[0] ); end; procedure TTest_6502ByteCode.CLI; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CLI(); // Assert: TTest.Expect( $58, Memory[0] ); end; procedure TTest_6502ByteCode.CLV; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CLV(); // Assert: TTest.Expect( $B8, Memory[0] ); end; procedure TTest_6502ByteCode.CMP_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_abs_x($FEDE); // Assert: TTest.Expect( $DD, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.CMP_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_abs_y($FEDE); // Assert: TTest.Expect( $D9, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.CMP_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_abs($FEDE); // Assert: TTest.Expect( $CD, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.CMP_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_imm($DE); // Assert: TTest.Expect( $C9, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CMP_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_ind_y($DE); // Assert: TTest.Expect( $D1, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CMP_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_x_ind($DE); // Assert: TTest.Expect( $C1, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CMP_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_zpg_x($DE); // Assert: TTest.Expect( $D5, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CMP_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CMP_zpg($DE); // Assert: TTest.Expect( $C5, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CPX_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CPX_abs($FEDE); // Assert: TTest.Expect( $EC, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.CPX_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CPX_imm($DE); // Assert: TTest.Expect( $E0, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CPX_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CPX_zpg($DE); // Assert: TTest.Expect( $E4, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CPY_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CPY_abs($FEDE); // Assert: TTest.Expect( $CC, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.CPY_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CPY_imm($DE); // Assert: TTest.Expect( $C0, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.CPY_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.CPY_zpg($DE); // Assert: TTest.Expect( $C4, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.DEC_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.DEC_abs_x($FEDE); // Assert: TTest.Expect( $DE, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.DEC_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.DEC_abs($FEDE); // Assert: TTest.Expect( $CE, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.DEC_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.DEC_zpg_x($DE); // Assert: TTest.Expect( $D6, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.DEC_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.DEC_zpg($DE); // Assert: TTest.Expect( $C6, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.DEX; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.DEX(); // Assert: TTest.Expect( $CA, Memory[0] ); end; procedure TTest_6502ByteCode.DEY; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.DEY(); // Assert: TTest.Expect( $88, Memory[0] ); end; procedure TTest_6502ByteCode.EOR_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_abs_x($FEDE); // Assert: TTest.Expect( $5D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.EOR_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_abs_y($FEDE); // Assert: TTest.Expect( $59, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.EOR_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_abs($FEDE); // Assert: TTest.Expect( $4D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.EOR_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_imm($DE); // Assert: TTest.Expect( $49, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.EOR_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_ind_y($DE); // Assert: TTest.Expect( $51, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.EOR_X_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_X_ind($DE); // Assert: TTest.Expect( $41, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.EOR_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_zpg_x($DE); // Assert: TTest.Expect( $55, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.EOR_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.EOR_zpg($DE); // Assert: TTest.Expect( $45, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.INC_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.INC_abs_x($FEDE); // Assert: TTest.Expect( $FE, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.INC_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.INC_abs($FEDE); // Assert: TTest.Expect( $EE, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.INC_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.INC_zpg_x($DE); // Assert: TTest.Expect( $F6, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.INC_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.INC_zpg($DE); // Assert: TTest.Expect( $E6, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.INX; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.INX(); // Assert: TTest.Expect( $E8, Memory[0] ); end; procedure TTest_6502ByteCode.INY; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.INY(); // Assert: TTest.Expect( $C8, Memory[0] ); end; procedure TTest_6502ByteCode.JMP_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.JMP_abs($FEDE); // Assert: TTest.Expect( $4C, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.JMP_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.JMP_ind($FEDE); // Assert: TTest.Expect( $6C, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.JSR_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.JSR_abs($FEDE); // Assert: TTest.Expect( $20, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDA_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_abs_x($FEDE); // Assert: TTest.Expect( $BD, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDA_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_abs_y($FEDE); // Assert: TTest.Expect( $B9, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDA_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_abs($FEDE); // Assert: TTest.Expect( $AD, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDA_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_imm($DE); // Assert: TTest.Expect( $A9, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDA_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_ind_y($DE); // Assert: TTest.Expect( $B1, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDA_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_x_ind($DE); // Assert: TTest.Expect( $A1, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDA_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_zpg_x($DE); // Assert: TTest.Expect( $B5, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDA_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDA_zpg($DE); // Assert: TTest.Expect( $A5, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDX_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDX_zpg($DE); // Assert: TTest.Expect( $A6, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDX_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDX_abs_y($FEDE); // Assert: TTest.Expect( $BE, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDX_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDX_abs($FEDE); // Assert: TTest.Expect( $AE, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDX_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDX_imm($DE); // Assert: TTest.Expect( $A2, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDX_zpg_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDX_zpg_y($DE); // Assert: TTest.Expect( $B6, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDY_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDY_abs_x($FEDE); // Assert: TTest.Expect( $BC, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDY_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDY_abs($FEDE); // Assert: TTest.Expect( $AC, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LDY_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDY_imm($DE); // Assert: TTest.Expect( $A0, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDY_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDY_zpg_x($DE); // Assert: TTest.Expect( $B4, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LDY_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LDY_zpg($DE); // Assert: TTest.Expect( $A4, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LSR; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LSR(); // Assert: TTest.Expect( $4A, Memory[0] ); end; procedure TTest_6502ByteCode.LSR_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LSR_abs_x($FEDE); // Assert: TTest.Expect( $5E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LSR_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LSR_abs($FEDE); // Assert: TTest.Expect( $4E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.LSR_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LSR_zpg_x($DE); // Assert: TTest.Expect( $56, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.LSR_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.LSR_zpg($DE); // Assert: TTest.Expect( $46, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.NOP; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.NOP(); // Assert: TTest.Expect( $EA, Memory[0] ); end; procedure TTest_6502ByteCode.ORA_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_abs_x($FEDE); // Assert: TTest.Expect( $1D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ORA_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_abs_y($FEDE); // Assert: TTest.Expect( $19, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ORA_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_abs($FEDE); // Assert: TTest.Expect( $0D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ORA_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_imm($DE); // Assert: TTest.Expect( $09, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ORA_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_ind_y($DE); // Assert: TTest.Expect( $11, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ORA_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_x_ind($DE); // Assert: TTest.Expect( $01, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ORA_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_zpg_x($DE); // Assert: TTest.Expect( $15, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ORA_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ORA_zpg($DE); // Assert: TTest.Expect( $05, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.PHA; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.PHA(); // Assert: TTest.Expect( $48, Memory[0] ); end; procedure TTest_6502ByteCode.PHP; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.PHP(); // Assert: TTest.Expect( $08, Memory[0] ); end; procedure TTest_6502ByteCode.PLA; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.PLA(); // Assert: TTest.Expect( $68, Memory[0] ); end; procedure TTest_6502ByteCode.PLP; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.PLP(); // Assert: TTest.Expect( $28, Memory[0] ); end; procedure TTest_6502ByteCode.ROL; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROL(); // Assert: TTest.Expect( $2A, Memory[0] ); end; procedure TTest_6502ByteCode.ROL_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROL_abs_x($FEDE); // Assert: TTest.Expect( $3E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ROL_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROL_abs($FEDE); // Assert: TTest.Expect( $2E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ROL_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROL_zpg_x($DE); // Assert: TTest.Expect( $36, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ROL_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROL_zpg($DE); // Assert: TTest.Expect( $26, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ROR; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROR(); // Assert: TTest.Expect( $6A, Memory[0] ); end; procedure TTest_6502ByteCode.ROR_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROR_abs_x($FEDE); // Assert: TTest.Expect( $7E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ROR_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROR_abs($FEDE); // Assert: TTest.Expect( $6E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.ROR_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROR_zpg_x($DE); // Assert: TTest.Expect( $76, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.ROR_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.ROR_zpg($DE); // Assert: TTest.Expect( $66, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.RTI; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.RTI(); // Assert: TTest.Expect( $40, Memory[0] ); end; procedure TTest_6502ByteCode.RTS; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.RTS(); // Assert: TTest.Expect( $60, Memory[0] ); end; procedure TTest_6502ByteCode.SBC_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_abs_y($FEDE); // Assert: TTest.Expect( $F9, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.SBC_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_abs_x($FEDE); // Assert: TTest.Expect( $FD, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.SBC_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_abs($FEDE); // Assert: TTest.Expect( $ED, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.SBC_imm; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_imm($DE); // Assert: TTest.Expect( $E9, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.SBC_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_ind_y($DE); // Assert: TTest.Expect( $F1, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.SBC_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_x_ind($DE); // Assert: TTest.Expect( $E1, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.SBC_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_zpg_x($DE); // Assert: TTest.Expect( $F5, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.SBC_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SBC_zpg($DE); // Assert: TTest.Expect( $E5, Memory[0] ); end; procedure TTest_6502ByteCode.SEC; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SEC; // Assert: TTest.Expect( $38, Memory[0] ); end; procedure TTest_6502ByteCode.SED; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SED(); // Assert: TTest.Expect( $F8, Memory[0] ); end; procedure TTest_6502ByteCode.SEI; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.SEI(); // Assert: TTest.Expect( $78, Memory[0] ); end; procedure TTest_6502ByteCode.STA_abs_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_abs_x($FEDE); // Assert: TTest.Expect( $9D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.STA_abs_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_abs_y($FEDE); // Assert: TTest.Expect( $99, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.STA_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_abs($FEDE); // Assert: TTest.Expect( $8D, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.STA_ind_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_ind_y($DE); // Assert: TTest.Expect( $91, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STA_x_ind; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_x_ind($DE); // Assert: TTest.Expect( $81, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STA_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_zpg_x($DE); // Assert: TTest.Expect( $95, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STA_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STA_zpg($DE); // Assert: TTest.Expect( $85, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STX_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STX_abs($FEDE); // Assert: TTest.Expect( $8E, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.STX_zpg_y; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STX_zpg_y($DE); // Assert: TTest.Expect( $96, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STX_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STX_zpg($DE); // Assert: TTest.Expect( $86, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STY_abs; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STY_abs($FEDE); // Assert: TTest.Expect( $8C, Memory[0] ); TTest.Expect( $DE, Memory[1] ); TTest.Expect( $FE, Memory[2] ); end; procedure TTest_6502ByteCode.STY_zpg_x; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STY_zpg_x($DE); // Assert: TTest.Expect( $94, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.STY_zpg; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.STY_zpg($DE); // Assert: TTest.Expect( $84, Memory[0] ); TTest.Expect( $DE, Memory[1] ); end; procedure TTest_6502ByteCode.TAX; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.TAX(); // Assert: TTest.Expect( $AA, Memory[0] ); end; procedure TTest_6502ByteCode.TAY; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.TAY(); // Assert: TTest.Expect( $A8, Memory[0] ); end; procedure TTest_6502ByteCode.TSX; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.TSX(); // Assert: TTest.Expect( $BA, Memory[0] ); end; procedure TTest_6502ByteCode.TXA; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.TXA(); // Assert: TTest.Expect( $8A, Memory[0] ); end; procedure TTest_6502ByteCode.TXS; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.TXS(); // Assert: TTest.Expect( $9A, Memory[0] ); end; procedure TTest_6502ByteCode.TYA; var Memory: I6502VirtualMemory; ByteCode: I6502ByteCode; begin // Arrange: Memory := T6502VirtualMemory.Create; ByteCode := T6502ByteCode.Create( Memory ); ByteCode.Cursor := $00; // Act: ByteCode.TYA(); // Assert: TTest.Expect( $98, Memory[0] ); end; initialization TestSuite.RegisterTestCase(TTest_6502ByteCode) end.
23.395912
100
0.661085
6a4221e6dd258c5f9b3cf40d282e7f29bd321039
599
dfm
Pascal
samples/layers/ado/Main.View.dfm
CloudDelphi/InfraFramework4Delphi
acb7455fae60616cabe542bb4894bd8653aa99d1
[ "Apache-2.0" ]
21
2016-08-23T11:57:42.000Z
2021-06-26T23:24:03.000Z
samples/layers/ado/Main.View.dfm
CloudDelphi/InfraFramework4Delphi
acb7455fae60616cabe542bb4894bd8653aa99d1
[ "Apache-2.0" ]
1
2017-09-26T16:42:26.000Z
2017-09-26T16:42:26.000Z
samples/layers/ado/Main.View.dfm
CloudDelphi/InfraFramework4Delphi
acb7455fae60616cabe542bb4894bd8653aa99d1
[ "Apache-2.0" ]
15
2015-02-28T00:59:10.000Z
2021-06-26T23:24:11.000Z
object MainView: TMainView Left = 0 Top = 0 Caption = 'Main View' ClientHeight = 240 ClientWidth = 495 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] Menu = MainMenu1 OldCreateOrder = False Position = poScreenCenter PixelsPerInch = 96 TextHeight = 13 object MainMenu1: TMainMenu Left = 72 Top = 32 object Cad1: TMenuItem Caption = 'Records' object Country1: TMenuItem Caption = 'Countries' OnClick = Country1Click end end end end
19.966667
32
0.654424
85bb68556b9e20fd02a5959cce7d693a573256b2
1,537
dfm
Pascal
src/views/bomba.cadastro.view.dfm
regyssilveira/ControleAbastecimento
7cc17c3a7bd6cb2105279038170fb180e7b63dca
[ "Apache-2.0" ]
2
2021-07-17T18:40:14.000Z
2021-07-19T11:26:31.000Z
src/views/bomba.cadastro.view.dfm
regyssilveira/ControleAbastecimento
7cc17c3a7bd6cb2105279038170fb180e7b63dca
[ "Apache-2.0" ]
null
null
null
src/views/bomba.cadastro.view.dfm
regyssilveira/ControleAbastecimento
7cc17c3a7bd6cb2105279038170fb180e7b63dca
[ "Apache-2.0" ]
1
2021-11-25T18:14:35.000Z
2021-11-25T18:14:35.000Z
inherited FrmBombaCadastroView: TFrmBombaCadastroView Caption = 'Bomba' ClientHeight = 284 ClientWidth = 441 ExplicitWidth = 447 ExplicitHeight = 313 PixelsPerInch = 96 TextHeight = 13 inherited Panel1: TPanel Top = 243 Width = 441 ExplicitTop = 243 ExplicitWidth = 441 inherited BtnGravar: TButton Left = 288 ExplicitLeft = 288 end end inherited PgcCadastro: TPageControl Width = 435 Height = 237 ExplicitWidth = 435 ExplicitHeight = 237 inherited TbsDadosCadastrais: TTabSheet ExplicitWidth = 427 ExplicitHeight = 209 object Label1: TLabel Left = 35 Top = 30 Width = 10 Height = 13 Caption = 'Id' end object Label2: TLabel Left = 35 Top = 76 Width = 36 Height = 13 Caption = 'Tanque' end object Label3: TLabel Left = 35 Top = 122 Width = 96 Height = 13 Caption = 'Descri'#231#227'o da Bomba' end object EdtID: TEdit Left = 35 Top = 49 Width = 121 Height = 21 TabOrder = 0 Text = 'EdtID' end object EdtTanque: TEdit Left = 35 Top = 95 Width = 121 Height = 21 TabOrder = 1 Text = 'Edit1' end object EdtDescricao: TEdit Left = 35 Top = 141 Width = 351 Height = 21 TabOrder = 2 Text = 'Edit1' end end end end
20.493333
53
0.536109
f138a54cbdd3387131e9951d5aad9df29893a3f5
1,704
pas
Pascal
PrintingProject/MainUnit.pas
rustkas/dephi_do
96025a01d5cb49136472b7e6bb5f037b27145fba
[ "MIT" ]
null
null
null
PrintingProject/MainUnit.pas
rustkas/dephi_do
96025a01d5cb49136472b7e6bb5f037b27145fba
[ "MIT" ]
null
null
null
PrintingProject/MainUnit.pas
rustkas/dephi_do
96025a01d5cb49136472b7e6bb5f037b27145fba
[ "MIT" ]
null
null
null
unit MainUnit; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TMainForm = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var MainForm: TMainForm; implementation {$R *.dfm} uses PrintMemo, FormPrintUnit, PrintImageUnit, GraphicsPaintUnit, PrintListViewUnit; procedure OpenForm(form: TForm); begin form.Left := (Screen.WorkAreaWidth - form.Width) div 2; form.Top := (Screen.WorkAreaHeight - form.Height) div 2; form.ShowModal; form.Free; end; procedure TMainForm.Button1Click(Sender: TObject); begin PrintMemoForm := TPrintMemoForm.Create(Owner); OpenForm(PrintMemoForm); end; procedure TMainForm.Button2Click(Sender: TObject); begin FormPrintForm := TFormPrintForm.Create(Owner); OpenForm(FormPrintForm); end; procedure TMainForm.Button3Click(Sender: TObject); begin PrintImageForm := TPrintImageForm.Create(Owner); OpenForm(PrintImageForm); end; procedure TMainForm.Button4Click(Sender: TObject); begin GraphicsPaintForm := TGraphicsPaintForm.Create(Owner); OpenForm(GraphicsPaintForm); end; procedure TMainForm.Button5Click(Sender: TObject); begin PrintListViewForm := TPrintListViewForm.Create(Owner); OpenForm(PrintListViewForm); end; end.
21.846154
68
0.755869
f118e6e2a3fd8950c68e6b12f7969fec9045ec80
481
pas
Pascal
Test/FailureScripts/abstract.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
79
2015-03-18T10:46:13.000Z
2022-03-17T18:05:11.000Z
Test/FailureScripts/abstract.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
6
2016-03-29T14:39:00.000Z
2020-09-14T10:04:14.000Z
Test/FailureScripts/abstract.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
25
2016-05-04T13:11:38.000Z
2021-09-29T13:34:31.000Z
type TTest1 = class abstract end; type TTest2 = class procedure Dummy; virtual; abstract; end; type TTest3 = class (TTest1) end; type TTest4 = class (TTest2) procedure Dummy; override; end; type TTest5 = class (TTest2) procedure Dummy; reintroduce; end; procedure TTest4.Dummy; begin end; procedure TTest5.Dummy; begin end; TTest1.Create; TTest2.Create; TTest3.Create; TTest4.Create; TTest5.Create;
15.03125
42
0.640333
f16b44382100a69abec54b4beb18ab6c81c48070
475
pas
Pascal
uspQuery.pas
DanubioFerrari/ProvaDelphiSP
e7e86148646da07d10465f94f49a460097bcf7cc
[ "MIT" ]
null
null
null
uspQuery.pas
DanubioFerrari/ProvaDelphiSP
e7e86148646da07d10465f94f49a460097bcf7cc
[ "MIT" ]
null
null
null
uspQuery.pas
DanubioFerrari/ProvaDelphiSP
e7e86148646da07d10465f94f49a460097bcf7cc
[ "MIT" ]
null
null
null
unit uspQuery; interface uses System.SysUtils, System.Classes, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client; type TspQuery = class(TFDQuery) private { Private declarations } protected { Protected declarations } public { Public declarations } published { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Samples', [TspQuery]); end; end.
15.322581
66
0.68
f13aaa4014148d252ddce279b7872d794f5e0fa2
735
pas
Pascal
public/code/Pascal/camel_case.pas
encap/coderush
e55f7d6d57465b93c7c376d90f22b1e79e04fc2b
[ "Unlicense" ]
45
2020-10-17T22:28:52.000Z
2022-02-28T12:36:40.000Z
public/code/Pascal/camel_case.pas
encap/coderush
e55f7d6d57465b93c7c376d90f22b1e79e04fc2b
[ "Unlicense" ]
33
2020-11-27T15:12:36.000Z
2022-02-27T10:24:40.000Z
public/code/Pascal/camel_case.pas
encap/coderush
e55f7d6d57465b93c7c376d90f22b1e79e04fc2b
[ "Unlicense" ]
5
2020-11-27T00:29:29.000Z
2022-03-21T15:53:04.000Z
program Camelcase; var text, cc: string; c: char; i: integer; lastSpace: boolean; begin readln(text); lastSpace := true; cc := ''; for i := 1 to Length(text) do begin c := text[i]; if ((c >= #65) and (c <= #90)) or ((c >= #97) and (c <= #122)) then begin if (lastSpace) then begin if ((c >= #97) and (c <= #122)) then c := chr(ord(c) - 32); end else if ((c >= #65) and (c <= #90)) then c := chr(ord(c) + 32); cc := cc + c; lastSpace := false; end else lastSpace := true; end; writeln(cc); end.
22.272727
75
0.386395
838e360295a0391905534bf17b8cdfcba46c19ff
7,877
dpr
Pascal
demos/GChartsDemo/GChartsDemo.dpr
fuadhs88/Delphi-GCharts
3ab84c0ac5c13386e9903f44dd7ef536b6e18733
[ "Apache-2.0" ]
40
2021-09-20T08:44:57.000Z
2022-02-20T17:43:50.000Z
demos/GChartsDemo/GChartsDemo.dpr
MorphineLLF/Delphi-GCharts
3ab84c0ac5c13386e9903f44dd7ef536b6e18733
[ "Apache-2.0" ]
1
2021-11-15T03:11:12.000Z
2021-12-18T01:58:46.000Z
demos/GChartsDemo/GChartsDemo.dpr
MorphineLLF/Delphi-GCharts
3ab84c0ac5c13386e9903f44dd7ef536b6e18733
[ "Apache-2.0" ]
7
2021-09-22T00:12:44.000Z
2022-02-28T12:43:29.000Z
program GChartsDemo; uses Forms, ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule}, MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule}, Main in 'Main.pas' {MainForm: TUniForm}, cfs.GCharts in '..\..\sources\cfs.GCharts.pas', cfs.GCharts.uniGUI in '..\..\sources\cfs.GCharts.uniGUI.pas', Demo.BaseFrame in 'Demo.BaseFrame.pas' {DemoBaseFrame: TUniFrame}, Demo.Overview in 'Demo.Overview.pas', Demo.AnnotationChart.Sample in 'Demo.AnnotationChart.Sample.pas', Demo.AreaChart.Sample in 'Demo.AreaChart.Sample.pas', Demo.AreaChart.Stacking in 'Demo.AreaChart.Stacking.pas', Demo.BarChart.Annotations in 'Demo.BarChart.Annotations.pas', Demo.BarChart.BarStyles in 'Demo.BarChart.BarStyles.pas', Demo.BarChart.ColoringBars in 'Demo.BarChart.ColoringBars.pas', Demo.BarChart.Customizable in 'Demo.BarChart.Customizable.pas', Demo.BarChart.LabelingBars in 'Demo.BarChart.LabelingBars.pas', Demo.BarChart.Sample in 'Demo.BarChart.Sample.pas', Demo.BarChart.Series in 'Demo.BarChart.Series.pas', Demo.BarChart.Stacked in 'Demo.BarChart.Stacked.pas', Demo.BarChart.Stacking in 'Demo.BarChart.Stacking.pas', Demo.BubbleChart.ColorByNumbers in 'Demo.BubbleChart.ColorByNumbers.pas', Demo.BubbleChart.CustomizingLabels in 'Demo.BubbleChart.CustomizingLabels.pas', Demo.BubbleChart.Sample in 'Demo.BubbleChart.Sample.pas', Demo.CalendarChart.MultiLanguage in 'Demo.CalendarChart.MultiLanguage.pas', Demo.CalendarChart.Sample in 'Demo.CalendarChart.Sample.pas', Demo.CandlestickChart.Sample in 'Demo.CandlestickChart.Sample.pas', Demo.CandlestickChart.Waterfall in 'Demo.CandlestickChart.Waterfall.pas', Demo.ColumnChart.Annotations in 'Demo.ColumnChart.Annotations.pas', Demo.ColumnChart.ColoringColumns in 'Demo.ColumnChart.ColoringColumns.pas', Demo.ColumnChart.ColumnStyles in 'Demo.ColumnChart.ColumnStyles.pas', Demo.ColumnChart.Customizable in 'Demo.ColumnChart.Customizable.pas', Demo.ColumnChart.LabelingColumns in 'Demo.ColumnChart.LabelingColumns.pas', Demo.ColumnChart.Sample in 'Demo.ColumnChart.Sample.pas', Demo.ColumnChart.Series in 'Demo.ColumnChart.Series.pas', Demo.ColumnChart.Stacked in 'Demo.ColumnChart.Stacked.pas', Demo.ColumnChart.Stacking in 'Demo.ColumnChart.Stacking.pas', Demo.ColumnChart.Trendlines in 'Demo.ColumnChart.Trendlines.pas', Demo.ComboChart.Sample in 'Demo.ComboChart.Sample.pas', Demo.DiffChart.Column in 'Demo.DiffChart.Column.pas', Demo.DiffChart.Pie in 'Demo.DiffChart.Pie.pas', Demo.GanttChart.ComputingStartEndDuration in 'Demo.GanttChart.ComputingStartEndDuration.pas', Demo.GanttChart.CriticalPath in 'Demo.GanttChart.CriticalPath.pas', Demo.GanttChart.GroupingResources in 'Demo.GanttChart.GroupingResources.pas', Demo.GanttChart.NoDependencies in 'Demo.GanttChart.NoDependencies.pas', Demo.GanttChart.Sample in 'Demo.GanttChart.Sample.pas', Demo.GanttChart.StylingArrows in 'Demo.GanttChart.StylingArrows.pas', Demo.GanttChart.StylingTracks in 'Demo.GanttChart.StylingTracks.pas', Demo.GaugeChart.Sample in 'Demo.GaugeChart.Sample.pas', Demo.GeoChart.Coloring in 'Demo.GeoChart.Coloring.pas', Demo.GeoChart.Marker in 'Demo.GeoChart.Marker.pas', Demo.GeoChart.ProportionalMarkers in 'Demo.GeoChart.ProportionalMarkers.pas', Demo.GeoChart.Sample in 'Demo.GeoChart.Sample.pas', Demo.Histogram.MultipleSeries in 'Demo.Histogram.MultipleSeries.pas', Demo.Histogram.Sample in 'Demo.Histogram.Sample.pas', Demo.Intervals.Sample in 'Demo.Intervals.Sample.pas', Demo.Intervals.Styles in 'Demo.Intervals.Styles.pas', Demo.LineChart.Crosshairs in 'Demo.LineChart.Crosshairs.pas', Demo.LineChart.CurvingLines in 'Demo.LineChart.CurvingLines.pas', Demo.LineChart.LogScales in 'Demo.LineChart.LogScales.pas', Demo.LineChart.Sample in 'Demo.LineChart.Sample.pas', Demo.LineChart.Styles in 'Demo.LineChart.Styles.pas', Demo.LineChart.TrendLines in 'Demo.LineChart.TrendLines.pas', Demo.Material.LineChart.DualY in 'Demo.Material.LineChart.DualY.pas', Demo.Material.LineChart.Sample in 'Demo.Material.LineChart.Sample.pas', Demo.Material.LineChart.TopX in 'Demo.Material.LineChart.TopX.pas', Demo.MaterialBarChart.DualX in 'Demo.MaterialBarChart.DualX.pas', Demo.MaterialBarChart.RightY in 'Demo.MaterialBarChart.RightY.pas', Demo.MaterialBarChart.Sample in 'Demo.MaterialBarChart.Sample.pas', Demo.MaterialColumnChart.DualY in 'Demo.MaterialColumnChart.DualY.pas', Demo.MaterialColumnChart.RightY in 'Demo.MaterialColumnChart.RightY.pas', Demo.MaterialColumnChart.Sample in 'Demo.MaterialColumnChart.Sample.pas', Demo.MaterialScatterChart.DualY in 'Demo.MaterialScatterChart.DualY.pas', Demo.MaterialScatterChart.Sample in 'Demo.MaterialScatterChart.Sample.pas', Demo.MaterialScatterChart.TopX in 'Demo.MaterialScatterChart.TopX.pas', Demo.Miscellaneous.Animation in 'Demo.Miscellaneous.Animation.pas', Demo.Miscellaneous.AxisNumberFormat in 'Demo.Miscellaneous.AxisNumberFormat.pas', Demo.Miscellaneous.AxisNumberFormatLang in 'Demo.Miscellaneous.AxisNumberFormatLang.pas', Demo.Miscellaneous.Crosshairs in 'Demo.Miscellaneous.Crosshairs.pas', Demo.Miscellaneous.Customize in 'Demo.Miscellaneous.Customize.pas', Demo.Miscellaneous.CustomizeLines in 'Demo.Miscellaneous.CustomizeLines.pas', Demo.Miscellaneous.CustomizePoints in 'Demo.Miscellaneous.CustomizePoints.pas', Demo.Miscellaneous.CustomizeTooltips in 'Demo.Miscellaneous.CustomizeTooltips.pas', Demo.Miscellaneous.Formatters in 'Demo.Miscellaneous.Formatters.pas', Demo.Miscellaneous.Overlays in 'Demo.Miscellaneous.Overlays.pas', Demo.OrgChart.Sample in 'Demo.OrgChart.Sample.pas', Demo.PieChart.Donut in 'Demo.PieChart.Donut.pas', Demo.PieChart.Exploding_a_Slice in 'Demo.PieChart.Exploding_a_Slice.pas', Demo.PieChart.Removing_Slices in 'Demo.PieChart.Removing_Slices.pas', Demo.PieChart.Rotating in 'Demo.PieChart.Rotating.pas', Demo.PieChart.Sample in 'Demo.PieChart.Sample.pas', Demo.PieChart_3D in 'Demo.PieChart_3D.pas', Demo.SankeyDiagram.MultiLevels in 'Demo.SankeyDiagram.MultiLevels.pas', Demo.SankeyDiagram.Sample in 'Demo.SankeyDiagram.Sample.pas', Demo.ScatterChart.DualY in 'Demo.ScatterChart.DualY.pas', Demo.ScatterChart.Sample in 'Demo.ScatterChart.Sample.pas', Demo.SteppedAreaChart.Custom in 'Demo.SteppedAreaChart.Custom.pas', Demo.SteppedAreaChart.Sample in 'Demo.SteppedAreaChart.Sample.pas', Demo.SteppedAreaChart.Stacked in 'Demo.SteppedAreaChart.Stacked.pas', Demo.TableChart.Sample in 'Demo.TableChart.Sample.pas', Demo.TimelineChart.Advanced in 'Demo.TimelineChart.Advanced.pas', Demo.TimelineChart.ClassroomSchedules in 'Demo.TimelineChart.ClassroomSchedules.pas', Demo.TimelineChart.ClassroomSchedulesCtrlColors in 'Demo.TimelineChart.ClassroomSchedulesCtrlColors.pas', Demo.TimelineChart.ClassroomSchedulesSingleColor in 'Demo.TimelineChart.ClassroomSchedulesSingleColor.pas', Demo.TimelineChart.LabelingTheBars in 'Demo.TimelineChart.LabelingTheBars.pas', Demo.TimelineChart.Sample in 'Demo.TimelineChart.Sample.pas', Demo.TreeMapChart.Sample in 'Demo.TreeMapChart.Sample.pas', Demo.Trendlines.Exponential in 'Demo.Trendlines.Exponential.pas', Demo.Trendlines.Polynomial in 'Demo.Trendlines.Polynomial.pas', Demo.Trendlines.Sample in 'Demo.Trendlines.Sample.pas', Demo.WordTrees.Sample in 'Demo.WordTrees.Sample.pas', Demo.MaterialColumnChart.TopX in 'Demo.MaterialColumnChart.TopX.pas', Demo.MaterialBarChart.TopX in 'Demo.MaterialBarChart.TopX.pas', Demo.LineChart.Bitcoin in 'Demo.LineChart.Bitcoin.pas', Demo.Miscellaneous.DateTimes in 'Demo.Miscellaneous.DateTimes.pas', Demo.Miscellaneous.AxisScale in 'Demo.Miscellaneous.AxisScale.pas'; {$R *.res} begin ReportMemoryLeaksOnShutdown := True; Application.Initialize; TUniServerModule.Create(Application); Application.Run; end.
61.062016
109
0.803352
f154e9d8c028d93dda4b483f49fe3287a109a1ac
2,795
pas
Pascal
Chapter 2/FibonacciMain.pas
PacktPublishing/Delphi-High-Performance
bcb84190e8660a28cbc0caada2e1bed3b8adfe42
[ "MIT" ]
45
2018-04-08T07:01:13.000Z
2022-02-18T17:28:10.000Z
Chapter 2/FibonacciMain.pas
anomous/Delphi-High-Performance
051a8f7d7460345b60cb8d2a10a974ea8179ea41
[ "MIT" ]
null
null
null
Chapter 2/FibonacciMain.pas
anomous/Delphi-High-Performance
051a8f7d7460345b60cb8d2a10a974ea8179ea41
[ "MIT" ]
17
2018-03-21T11:22:15.000Z
2022-03-16T05:55:54.000Z
unit FibonacciMain; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Samples.Spin; type TFiboFunc = function (element: int64): int64 of object; TfrmFibonacci = class(TForm) Label1: TLabel; SpinEdit1: TSpinEdit; Button1: TButton; Button2: TButton; Button3: TButton; ListBox1: TListBox; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); private FFibonacciTable: TArray<int64>; function FibonacciRecursiveMemoized(element: int64): int64; function FibonacciIterative(element: int64): int64; function FibonacciMemoized(element: int64): int64; function FibonacciRecursive(element: int64): int64; procedure Time(fibonacci: TFiboFunc); public end; var frmFibonacci: TfrmFibonacci; implementation uses System.Diagnostics; {$R *.dfm} procedure TfrmFibonacci.Button1Click(Sender: TObject); begin Time(FibonacciRecursive); end; procedure TfrmFibonacci.Button2Click(Sender: TObject); begin Time(FibonacciMemoized); end; procedure TfrmFibonacci.Button3Click(Sender: TObject); begin Time(FibonacciIterative); end; function TfrmFibonacci.FibonacciIterative(element: int64): int64; var a,b: int64; begin a := 1; b := 0; repeat if element = 1 then Exit(a); b := b + a; if element = 2 then Exit(b); a := a + b; Dec(element, 2); until false; end; function TfrmFibonacci.FibonacciRecursiveMemoized(element: int64): int64; begin if FFibonacciTable[element] >= 0 then Result := FFibonacciTable[element] else begin if element < 3 then Result := 1 else Result := FibonacciRecursiveMemoized(element - 1) + FibonacciRecursiveMemoized(element - 2); FFibonacciTable[element] := Result; end; end; function TfrmFibonacci.FibonacciMemoized(element: int64): int64; var i: Integer; begin SetLength(FFibonacciTable, element+1); for i := Low(FFibonacciTable) to High(FFibonacciTable) do FFibonacciTable[i] := -1; Result := FibonacciRecursiveMemoized(element); end; function TfrmFibonacci.FibonacciRecursive(element: int64): int64; begin if element < 3 then Result := 1 else Result := FibonacciRecursive(element - 1) + FibonacciRecursive(element - 2); end; procedure TfrmFibonacci.Time(fibonacci: TFiboFunc); var element: Integer; stopwatch: TStopwatch; value: int64; begin element := SpinEdit1.Value; stopwatch := TStopwatch.StartNew; value := fibonacci(element); stopwatch.Stop; ListBox1.ItemIndex := ListBox1.Items.Add(Format('fib(%d) = %d in %d ms', [element, value, stopwatch.ElapsedMilliseconds])); end; end.
22.909836
98
0.720572
f14bdc6989bc8fceff8fe6d1be840d1e71d7ba30
28,189
dpr
Pascal
src-installer/RDPWInst.dpr
benzu99421/rdpwrap-1
263e1727aaf739b96bb8fe4e764b1a18dc48bafa
[ "Unlicense" ]
25
2020-05-15T03:49:41.000Z
2022-03-29T09:17:10.000Z
src-installer/RDPWInst.dpr
benzu99421/rdpwrap-1
263e1727aaf739b96bb8fe4e764b1a18dc48bafa
[ "Unlicense" ]
null
null
null
src-installer/RDPWInst.dpr
benzu99421/rdpwrap-1
263e1727aaf739b96bb8fe4e764b1a18dc48bafa
[ "Unlicense" ]
319
2020-05-13T04:13:35.000Z
2022-03-27T00:17:42.000Z
program RDPWInst; {$APPTYPE CONSOLE} {$R resource.res} uses SysUtils, Windows, Classes, WinSvc, Registry; function EnumServicesStatusEx( hSCManager: SC_HANDLE; InfoLevel, dwServiceType, dwServiceState: DWORD; lpServices: PByte; cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD; pszGroupName: PWideChar): BOOL; stdcall; external advapi32 name 'EnumServicesStatusExW'; type 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; SERVICE_STATUS_PROCESS = packed record dwServiceType, dwCurrentState, dwControlsAccepted, dwWin32ExitCode, dwServiceSpecificExitCode, dwCheckPoint, dwWaitHint, dwProcessId, dwServiceFlags: DWORD; end; PSERVICE_STATUS_PROCESS = ^SERVICE_STATUS_PROCESS; ENUM_SERVICE_STATUS_PROCESS = packed record lpServiceName, lpDisplayName: PWideChar; ServiceStatusProcess: SERVICE_STATUS_PROCESS; end; PENUM_SERVICE_STATUS_PROCESS = ^ENUM_SERVICE_STATUS_PROCESS; const SC_ENUM_PROCESS_INFO = 0; TermService = 'TermService'; var Installed: Boolean; WrapPath: String; Arch: Byte; OldWow64RedirectionValue: LongBool; TermServicePath: String; FV: FILE_VERSION; TermServicePID: DWORD; ShareSvc: Array of String; sShareSvc: String; function SupportedArchitecture: Boolean; var SI: TSystemInfo; begin GetNativeSystemInfo(SI); case SI.wProcessorArchitecture of 0: begin Arch := 32; Result := True; // Intel x86 end; 6: Result := False; // Itanium-based x64 9: begin Arch := 64; Result := True; // Intel/AMD x64 end; else Result := False; end; 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; procedure CheckInstall; var Code: DWORD; TermServiceHost: String; Reg: TRegistry; begin if Arch = 64 then Reg := TRegistry.Create(KEY_WOW64_64KEY) else Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; if not Reg.OpenKeyReadOnly('\SYSTEM\CurrentControlSet\Services\TermService') then begin Reg.Free; Code := GetLastError; Writeln('[-] OpenKeyReadOnly error (code ', Code, ').'); Halt(Code); end; TermServiceHost := Reg.ReadString('ImagePath'); Reg.CloseKey; if Pos('svchost.exe', LowerCase(TermServiceHost)) = 0 then begin Reg.Free; Writeln('[-] TermService is hosted in a custom application (BeTwin, etc.) - unsupported.'); Writeln('[*] ImagePath: "', TermServiceHost, '".'); Halt(ERROR_NOT_SUPPORTED); end; if not Reg.OpenKeyReadOnly('\SYSTEM\CurrentControlSet\Services\TermService\Parameters') then begin Reg.Free; Code := GetLastError; Writeln('[-] OpenKeyReadOnly error (code ', Code, ').'); Halt(Code); end; TermServicePath := Reg.ReadString('ServiceDll'); Reg.CloseKey; if (Pos('termsrv.dll', LowerCase(TermServicePath)) = 0) and (Pos('rdpwrap.dll', LowerCase(TermServicePath)) = 0) then begin Reg.Free; Writeln('[-] Another third-party TermService library is installed.'); Writeln('[*] ServiceDll: "', TermServicePath, '".'); Halt(ERROR_NOT_SUPPORTED); end; Reg.Free; Installed := Pos('rdpwrap.dll', LowerCase(TermServicePath)) > 0; end; function SvcGetStart(SvcName: String): Integer; var hSC: SC_HANDLE; hSvc: THandle; Code: DWORD; lpServiceConfig: PQueryServiceConfig; Buf: Pointer; cbBufSize, pcbBytesNeeded: Cardinal; begin Result := -1; Writeln('[*] Checking ', SvcName, '...'); hSC := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT); if hSC = 0 then begin Code := GetLastError; Writeln('[-] OpenSCManager error (code ', Code, ').'); Exit; end; hSvc := OpenService(hSC, PWideChar(SvcName), SERVICE_QUERY_CONFIG); if hSvc = 0 then begin CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] OpenService error (code ', Code, ').'); Exit; end; if QueryServiceConfig(hSvc, nil, 0, pcbBytesNeeded) then begin Writeln('[-] QueryServiceConfig failed.'); Exit; end; cbBufSize := pcbBytesNeeded; GetMem(Buf, cbBufSize); if not QueryServiceConfig(hSvc, Buf, cbBufSize, pcbBytesNeeded) then begin FreeMem(Buf, cbBufSize); CloseServiceHandle(hSvc); CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] QueryServiceConfig error (code ', Code, ').'); Exit; end else begin lpServiceConfig := Buf; Result := Integer(lpServiceConfig^.dwStartType); end; FreeMem(Buf, cbBufSize); CloseServiceHandle(hSvc); CloseServiceHandle(hSC); end; procedure SvcConfigStart(SvcName: String; dwStartType: Cardinal); var hSC: SC_HANDLE; hSvc: THandle; Code: DWORD; begin Writeln('[*] Configuring ', SvcName, '...'); hSC := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT); if hSC = 0 then begin Code := GetLastError; Writeln('[-] OpenSCManager error (code ', Code, ').'); Exit; end; hSvc := OpenService(hSC, PWideChar(SvcName), SERVICE_CHANGE_CONFIG); if hSvc = 0 then begin CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] OpenService error (code ', Code, ').'); Exit; end; if not ChangeServiceConfig(hSvc, SERVICE_NO_CHANGE, dwStartType, SERVICE_NO_CHANGE, nil, nil, nil, nil, nil, nil, nil) then begin CloseServiceHandle(hSvc); CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] ChangeServiceConfig error (code ', Code, ').'); Exit; end; CloseServiceHandle(hSvc); CloseServiceHandle(hSC); end; procedure SvcStart(SvcName: String); var hSC: SC_HANDLE; hSvc: THandle; Code: DWORD; pch: PWideChar; begin Writeln('[*] Starting ', SvcName, '...'); hSC := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT); if hSC = 0 then begin Code := GetLastError; Writeln('[-] OpenSCManager error (code ', Code, ').'); Exit; end; hSvc := OpenService(hSC, PWideChar(SvcName), SERVICE_START); if hSvc = 0 then begin CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] OpenService error (code ', Code, ').'); Exit; end; pch := nil; if not StartService(hSvc, 0, pch) then begin CloseServiceHandle(hSvc); CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] StartService error (code ', Code, ').'); Exit; end; CloseServiceHandle(hSvc); CloseServiceHandle(hSC); end; procedure CheckTermsrvProcess; label back; var hSC: SC_HANDLE; dwNeedBytes, dwReturnBytes, dwResumeHandle, Code: DWORD; Svc: Array of ENUM_SERVICE_STATUS_PROCESS; I: Integer; Found, Started: Boolean; TermServiceName: String; begin Started := False; back: hSC := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT or SC_MANAGER_ENUMERATE_SERVICE); if hSC = 0 then begin Code := GetLastError; Writeln('[-] OpenSCManager error (code ', Code, ').'); Halt(Code); end; SetLength(Svc, 1489); FillChar(Svc[0], sizeof(Svc[0])*Length(Svc), 0); if not EnumServicesStatusEx(hSC, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL, @Svc[0], sizeof(Svc[0])*Length(Svc), dwNeedBytes, dwReturnBytes, dwResumeHandle, nil) then begin Code := GetLastError; if Code <> ERROR_MORE_DATA then begin CloseServiceHandle(hSC); Writeln('[-] EnumServicesStatusEx error (code ', Code, ').'); Halt(Code); end else begin SetLength(Svc, 5957); FillChar(Svc[0], sizeof(Svc[0])*Length(Svc), 0); if not EnumServicesStatusEx(hSC, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL, @Svc[0], sizeof(Svc[0])*Length(Svc), dwNeedBytes, dwReturnBytes, dwResumeHandle, nil) then begin CloseServiceHandle(hSC); Code := GetLastError; Writeln('[-] EnumServicesStatusEx error (code ', Code, ').'); Halt(Code); end; end; end; CloseServiceHandle(hSC); Found := False; for I := 0 to Length(Svc) - 1 do begin if Svc[I].lpServiceName = nil then Break; if LowerCase(Svc[I].lpServiceName) = LowerCase(TermService) then begin Found := True; TermServiceName := Svc[I].lpServiceName; TermServicePID := Svc[I].ServiceStatusProcess.dwProcessId; Break; end; end; if not Found then begin Writeln('[-] TermService not found.'); Halt(ERROR_SERVICE_DOES_NOT_EXIST); end; if TermServicePID = 0 then begin if Started then begin Writeln('[-] Failed to set up TermService. Unknown error.'); Halt(ERROR_SERVICE_NOT_ACTIVE); end; SvcConfigStart(TermService, SERVICE_AUTO_START); SvcStart(TermService); Started := True; goto back; end else Writeln('[+] TermService found (pid ', TermServicePID, ').'); SetLength(ShareSvc, 0); for I := 0 to Length(Svc) - 1 do begin if Svc[I].lpServiceName = nil then Break; if Svc[I].ServiceStatusProcess.dwProcessId = TermServicePID then if Svc[I].lpServiceName <> TermServiceName then begin SetLength(ShareSvc, Length(ShareSvc)+1); ShareSvc[Length(ShareSvc)-1] := Svc[I].lpServiceName; end; end; sShareSvc := ''; for I := 0 to Length(ShareSvc) - 1 do if sShareSvc = '' then sShareSvc := ShareSvc[I] else sShareSvc := sShareSvc + ', ' + ShareSvc[I]; if sShareSvc <> '' then Writeln('[*] Shared services found: ', sShareSvc) else Writeln('[*] No shared services found.'); end; function AddPrivilege(SePriv: String): Boolean; var hToken: THandle; SeNameValue: Int64; tkp: TOKEN_PRIVILEGES; ReturnLength: Cardinal; ErrorCode: Cardinal; begin Result := False; if not OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, hToken) then begin ErrorCode := GetLastError; Writeln('[-] OpenProcessToken error (code ' + IntToStr(ErrorCode) + ').'); Exit; end; if not LookupPrivilegeValue(nil, PWideChar(SePriv), SeNameValue) then begin ErrorCode := GetLastError; Writeln('[-] LookupPrivilegeValue error (code ' + IntToStr(ErrorCode) + ').'); Exit; end; tkp.PrivilegeCount := 1; tkp.Privileges[0].Luid := SeNameValue; tkp.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED; if not AdjustTokenPrivileges(hToken, False, tkp, SizeOf(tkp), tkp, ReturnLength) then begin ErrorCode := GetLastError; Writeln('[-] AdjustTokenPrivileges error (code ' + IntToStr(ErrorCode) + ').'); Exit; end; Result := True; end; procedure KillProcess(PID: DWORD); var hProc: THandle; Code: DWORD; begin hProc := OpenProcess(PROCESS_TERMINATE, False, PID); if hProc = 0 then begin Code := GetLastError; Writeln('[-] OpenProcess error (code ', Code, ').'); Halt(Code); end; if not TerminateProcess(hProc, 0) then begin CloseHandle(hProc); Code := GetLastError; Writeln('[-] TerminateProcess error (code ', Code, ').'); Halt(Code); end; CloseHandle(hProc); end; function ExecWait(Cmdline: String): Boolean; var si: STARTUPINFO; pi: PROCESS_INFORMATION; begin Result := False; ZeroMemory(@si, sizeof(si)); si.cb := sizeof(si); UniqueString(Cmdline); if not CreateProcess(nil, PWideChar(Cmdline), nil, nil, True, 0, nil, nil, si, pi) then begin Writeln('[-] CreateProcess error (code: ', GetLastError, ').'); Exit; end; CloseHandle(pi.hThread); WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hProcess); Result := True; end; 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; procedure SetWrapperDll; var Reg: TRegistry; Code: DWORD; begin if Arch = 64 then Reg := TRegistry.Create(KEY_WRITE or KEY_WOW64_64KEY) else Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Services\TermService\Parameters', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteExpandString('ServiceDll', WrapPath); if (Arch = 64) and (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 0) then ExecWait('"'+ExpandPath('%SystemRoot%')+'\system32\reg.exe" add HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters /v ServiceDll /t REG_EXPAND_SZ /d "'+WrapPath+'" /f'); except Writeln('[-] WriteExpandString error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; Reg.Free; end; procedure ResetServiceDll; var Reg: TRegistry; Code: DWORD; begin if Arch = 64 then Reg := TRegistry.Create(KEY_WRITE or KEY_WOW64_64KEY) else Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Services\TermService\Parameters', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteExpandString('ServiceDll', '%SystemRoot%\System32\termsrv.dll'); except Writeln('[-] WriteExpandString error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; Reg.Free; end; procedure ExtractRes(ResName, Path: String); var ResStream: TResourceStream; begin ResStream := TResourceStream.Create(HInstance, ResName, RT_RCDATA); try ResStream.SaveToFile(Path); except Writeln('[-] Failed to extract file.'); Writeln('[*] Resource name: ' + ResName); Writeln('[*] Destination path: ' + Path); ResStream.Free; Exit; end; Writeln('[+] Extracted ', ResName, ' -> ', Path); ResStream.Free; end; procedure ExtractFiles; begin if not DirectoryExists(ExtractFilePath(ExpandPath(WrapPath))) then if ForceDirectories(ExtractFilePath(ExpandPath(WrapPath))) then Writeln('[+] Folder created: ', ExtractFilePath(ExpandPath(WrapPath))) else begin Writeln('[-] ForceDirectories error.'); Writeln('[*] Path: ', ExtractFilePath(ExpandPath(WrapPath))); Halt(0); end; case Arch of 32: begin ExtractRes('rdpw32', ExpandPath(WrapPath)); if not FileExists(ExpandPath('%SystemRoot%\System32\rdpclip.exe')) then ExtractRes('rdpclip32', ExpandPath('%SystemRoot%\System32\rdpclip.exe')); end; 64: begin ExtractRes('rdpw64', ExpandPath(WrapPath)); if not FileExists(ExpandPath('%SystemRoot%\System32\rdpclip.exe')) then ExtractRes('rdpclip64', ExpandPath('%SystemRoot%\System32\rdpclip.exe')); end; end; end; procedure DeleteFiles; var Code: DWORD; begin if not DeleteFile(PWideChar(ExpandPath(TermServicePath))) then begin Code := GetLastError; Writeln('[-] DeleteFile error (code ', Code, ').'); Exit; end; Writeln('[+] Removed file: ', ExpandPath(TermServicePath)); if not RemoveDirectory(PWideChar(ExtractFilePath(ExpandPath(TermServicePath)))) then begin Code := GetLastError; Writeln('[-] RemoveDirectory error (code ', Code, ').'); Exit; end; Writeln('[+] Removed folder: ', ExtractFilePath(ExpandPath(TermServicePath))); 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; Result := True; end; procedure CheckTermsrvVersion; var SuppLvl: Byte; begin GetFileVersion(ExpandPath(TermServicePath), FV); Writeln('[*] Terminal Services version: ', Format('%d.%d.%d.%d', [FV.Version.w.Major, FV.Version.w.Minor, FV.Release, FV.Build])); if (FV.Version.w.Major = 5) and (FV.Version.w.Minor = 1) then begin if Arch = 32 then begin Writeln('[!] Windows XP is not supported.'); Writeln('You may take a look at RDP Realtime Patch by Stas''M for Windows XP'); Writeln('Link: http://stascorp.com/load/1-1-0-62'); end; if Arch = 64 then Writeln('[!] Windows XP 64-bit Edition is not supported.'); Exit; end; if (FV.Version.w.Major = 5) and (FV.Version.w.Minor = 2) then begin if Arch = 32 then Writeln('[!] Windows Server 2003 is not supported.'); if Arch = 64 then Writeln('[!] Windows Server 2003 or XP 64-bit Edition is not supported.'); Exit; end; SuppLvl := 0; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 0) then begin SuppLvl := 1; if (Arch = 32) and (FV.Release = 6000) and (FV.Build = 16386) then begin Writeln('[!] This version of Terminal Services may crash on logon attempt.'); Writeln('It''s recommended to upgrade to Service Pack 1 or higher.'); end; if (FV.Release = 6000) and (FV.Build = 16386) then SuppLvl := 2; if (FV.Release = 6001) and (FV.Build = 18000) then SuppLvl := 2; if (FV.Release = 6002) and (FV.Build = 18005) then SuppLvl := 2; end; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then begin SuppLvl := 1; if (FV.Release = 7600) and (FV.Build = 16385) then SuppLvl := 2; if (FV.Release = 7601) and (FV.Build = 17514) then SuppLvl := 2; if (FV.Release = 7601) and (FV.Build = 18540) then SuppLvl := 2; if (FV.Release = 7601) and (FV.Build = 22750) then SuppLvl := 2; end; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 2) then begin if (FV.Release = 8102) and (FV.Build = 0) then SuppLvl := 2; if (FV.Release = 8250) and (FV.Build = 0) then SuppLvl := 2; if (FV.Release = 8400) and (FV.Build = 0) then SuppLvl := 2; if (FV.Release = 9200) and (FV.Build = 16384) then SuppLvl := 2; if (FV.Release = 9200) and (FV.Build = 17048) then SuppLvl := 2; if (FV.Release = 9200) and (FV.Build = 21166) then SuppLvl := 2; end; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 3) then begin if (FV.Release = 9431) and (FV.Build = 0) then SuppLvl := 2; if (FV.Release = 9600) and (FV.Build = 16384) then SuppLvl := 2; if (FV.Release = 9600) and (FV.Build = 17095) then SuppLvl := 2; end; if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 4) then begin if (FV.Release = 9841) and (FV.Build = 0) then SuppLvl := 2; end; case SuppLvl of 0: begin Writeln('[!] This version of Terminal Services is not supported.'); Writeln('Send your termsrv.dll to project developer for support.'); end; 1: begin Writeln('[!] This version of Terminal Services is supported partially.'); Writeln('It means you may have some limitations such as only 2 concurrent sessions.'); Writeln('Send your termsrv.dll to project developer for adding full support.'); end; end; end; procedure CheckTermsrvDependencies; const CertPropSvc = 'CertPropSvc'; SessionEnv = 'SessionEnv'; begin if SvcGetStart(CertPropSvc) = SERVICE_DISABLED then SvcConfigStart(CertPropSvc, SERVICE_DEMAND_START); if SvcGetStart(SessionEnv) = SERVICE_DISABLED then SvcConfigStart(SessionEnv, SERVICE_DEMAND_START); end; procedure TSConfigRegistry(Enable: Boolean); var Reg: TRegistry; Code: DWORD; begin if Arch = 64 then Reg := TRegistry.Create(KEY_WRITE or KEY_WOW64_64KEY) else Reg := TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteBool('fDenyTSConnections', not Enable); except Writeln('[-] WriteBool error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; if Enable then begin if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteBool('EnableConcurrentSessions', True); except Writeln('[-] WriteBool error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; if not Reg.OpenKey('\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteBool('AllowMultipleTSSessions', True); except Writeln('[-] WriteBool error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; if not Reg.KeyExists('\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns') then begin if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; Reg.CloseKey; if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\Clip Redirector', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteString('Name', 'RDPClip'); Reg.WriteInteger('Type', 3); except Writeln('[-] WriteInteger error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\DND Redirector', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteString('Name', 'RDPDND'); Reg.WriteInteger('Type', 3); except Writeln('[-] WriteInteger error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; if not Reg.OpenKey('\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\Dynamic VC', True) then begin Code := GetLastError; Writeln('[-] OpenKey error (code ', Code, ').'); Halt(Code); end; try Reg.WriteInteger('Type', -1); except Writeln('[-] WriteInteger error.'); Halt(ERROR_ACCESS_DENIED); end; Reg.CloseKey; end; end; Reg.Free; end; procedure TSConfigFirewall(Enable: Boolean); begin if Enable then ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow') else ExecWait('netsh advfirewall firewall delete rule name="Remote Desktop"'); end; var I: Integer; begin Writeln('RDP Wrapper Library v1.3'); Writeln('Installer v2.2'); Writeln('Copyright (C) Stas''M Corp. 2014'); Writeln(''); if (ParamCount < 1) or ( (ParamStr(1) <> '-i') and (ParamStr(1) <> '-u') and (ParamStr(1) <> '-r') ) then begin Writeln('USAGE:'); Writeln('RDPWInst.exe [-i[-s]|-u|-r]'); Writeln(''); Writeln('-i install wrapper to Program Files folder (default)'); Writeln('-i -s install wrapper to System32 folder'); Writeln('-u uninstall wrapper'); Writeln('-r force restart Terminal Services'); Exit; end; if not SupportedArchitecture then begin Writeln('[-] Unsupported processor architecture.'); Exit; end; CheckInstall; if ParamStr(1) = '-i' then begin if Installed then begin Writeln('[*] RDP Wrapper Library is already installed.'); Halt(ERROR_INVALID_FUNCTION); end; Writeln('[*] Installing...'); if ParamStr(2) = '-s' then WrapPath := '%SystemRoot%\system32\rdpwrap.dll' else WrapPath := '%ProgramFiles%\RDP Wrapper\rdpwrap.dll'; if Arch = 64 then DisableWowRedirection; CheckTermsrvVersion; CheckTermsrvProcess; Writeln('[*] Extracting files...'); ExtractFiles; Writeln('[*] Configuring service library...'); SetWrapperDll; Writeln('[*] Checking dependencies...'); CheckTermsrvDependencies; Writeln('[*] Terminating service...'); AddPrivilege('SeDebugPrivilege'); KillProcess(TermServicePID); Sleep(1000); if Length(ShareSvc) > 0 then for I := 0 to Length(ShareSvc) - 1 do SvcStart(ShareSvc[I]); Sleep(500); SvcStart(TermService); Sleep(500); Writeln('[*] Configuring registry...'); TSConfigRegistry(True); Writeln('[*] Configuring firewall...'); TSConfigFirewall(True); Writeln('[+] Successfully installed.'); if Arch = 64 then RevertWowRedirection; end; if ParamStr(1) = '-u' then begin if not Installed then begin Writeln('[*] RDP Wrapper Library is not installed.'); Halt(ERROR_INVALID_FUNCTION); end; Writeln('[*] Uninstalling...'); if Arch = 64 then DisableWowRedirection; CheckTermsrvProcess; Writeln('[*] Resetting service library...'); ResetServiceDll; Writeln('[*] Terminating service...'); AddPrivilege('SeDebugPrivilege'); KillProcess(TermServicePID); Sleep(1000); Writeln('[*] Removing files...'); DeleteFiles; if Length(ShareSvc) > 0 then for I := 0 to Length(ShareSvc) - 1 do SvcStart(ShareSvc[I]); Sleep(500); SvcStart(TermService); Sleep(500); Writeln('[*] Configuring registry...'); TSConfigRegistry(False); Writeln('[*] Configuring firewall...'); TSConfigFirewall(False); if Arch = 64 then RevertWowRedirection; Writeln('[+] Successfully uninstalled.'); end; if ParamStr(1) = '-r' then begin Writeln('[*] Restarting...'); CheckTermsrvProcess; Writeln('[*] Terminating service...'); AddPrivilege('SeDebugPrivilege'); KillProcess(TermServicePID); Sleep(1000); if Length(ShareSvc) > 0 then for I := 0 to Length(ShareSvc) - 1 do SvcStart(ShareSvc[I]); Sleep(500); SvcStart(TermService); Writeln('[+] Done.'); end; end.
27.827246
186
0.66306
834829deb213d8f65ecd3ca3d0fe74e2d9357743
5,715
pas
Pascal
package/UniSynEdit/Demos/CompletionProposalDemo/FormMain_ctCode.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
1
2022-02-28T11:28:18.000Z
2022-02-28T11:28:18.000Z
package/UniSynEdit/Demos/CompletionProposalDemo/FormMain_ctCode.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
null
null
null
package/UniSynEdit/Demos/CompletionProposalDemo/FormMain_ctCode.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
null
null
null
unit FormMain_ctCode; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, SynCompletionProposal, StdCtrls, SynEdit, ComCtrls; const cCaseSensitive = 1; cAnsiStrings = 2; cPrettyText = 3; cInsertList = 4; cMatchedText = 5; type TForm1 = class(TForm) scpDemo: TSynCompletionProposal; PageControl1: TPageControl; CodeCompletion: TTabSheet; TabSheet2: TTabSheet; mmoInsert: TMemo; mmoItem: TMemo; Label1: TLabel; Label2: TLabel; Button1: TButton; Button2: TButton; SynTest: TSynEdit; edBiggestWord: TEdit; Label3: TLabel; cbCase: TCheckBox; cbPrettyText: TCheckBox; cbUseInsertList: TCheckBox; cbLimitToMatchedText: TCheckBox; SynEdit1: TSynEdit; edTitle: TEdit; Label4: TLabel; Button3: TButton; Button4: TButton; FontDialog1: TFontDialog; procedure FormCreate(Sender: TObject); procedure CheckBoxClick(Sender: TObject); procedure edBiggestWordChange(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure edTitleChange(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure FormShow(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.FormCreate(Sender: TObject); begin with mmoInsert.Lines do begin Clear; Add('Create'); Add('Destroy'); Add('Add'); Add('ClearLine'); Add('Delete'); Add('First'); Add('GetMarksForLine'); Add('Insert'); Add('Last'); Add('Place'); Add('Remove'); Add('WMCaptureChanged'); Add('WMCopy'); Add('WMCut'); Add('WMDropFiles'); Add('WMEraseBkgnd'); Add('WMGetDlgCode'); Add('WMHScroll'); Add('WMPaste'); end; with mmoItem.Lines do begin Clear; Add('constructor \column{}\style{+B}Create\style{-B}(AOwner: TCustomSynEdit)'); Add('destructor \column{}\style{+B}Destroy\style{-B}'); Add('function \column{}\style{+B}Add\style{-B}(Item: TSynEditMark): Integer'); Add('procedure \column{}\style{+B}ClearLine\style{-B}(line: integer)'); Add('procedure \column{}\style{+B}Delete\style{-B}(Index: Integer)'); Add('function \column{}\style{+B}First\style{-B}: TSynEditMark'); Add('procedure \column{}\style{+B}GetMarksForLine\style{-B}(line: integer; var Marks: TSynEditMarks)'); Add('procedure \column{}\style{+B}Insert\style{-B}(Index: Integer; Item: TSynEditMark)'); Add('function \column{}\style{+B}Last\style{-B}: TSynEditMark'); Add('procedure \column{}\style{+B}Place\style{-B}(mark: TSynEditMark)'); Add('function \column{}\style{+B}Remove\style{-B}(Item: TSynEditMark): Integer'); Add('procedure \column{}\style{+B}WMCaptureChanged\style{-B}(var Msg: TMessage); message WM_CAPTURECHANGED'); Add('procedure \column{}\style{+B}WMCopy\style{-B}(var Message: TMessage); message WM_COPY'); Add('procedure \column{}\style{+B}WMCut\style{-B}(var Message: TMessage); message WM_CUT'); Add('procedure \column{}\style{+B}WMDropFiles\style{-B}(var Msg: TMessage); message WM_DROPFILES'); Add('procedure \column{}\style{+B}WMEraseBkgnd\style{-B}(var Msg: TMessage); message WM_ERASEBKGND'); Add('procedure \column{}\style{+B}WMGetDlgCode\style{-B}(var Msg: TWMGetDlgCode); message WM_GETDLGCODE'); Add('procedure \column{}\style{+B}WMHScroll\style{-B}(var Msg: TWMScroll); message WM_HSCROLL'); Add('procedure \column{}\style{+B}WMPaste\style{-B}(var Message: TMessage); message WM_PASTE'); end; scpDemo.InsertList.AddStrings(mmoInsert.Lines); scpDemo.ItemList.AddStrings(mmoItem.Lines); end; procedure TForm1.CheckBoxClick(Sender: TObject); begin if Sender is TCheckBox then begin if TCheckBox(Sender).Checked then begin Case TCheckBox(Sender).Tag of cCaseSensitive : scpDemo.Options := scpDemo.Options + [scoCaseSensitive]; cPrettyText : scpDemo.Options := scpDemo.Options + [scoUsePrettyText]; cInsertList : scpDemo.Options := scpDemo.Options + [scoUseInsertList]; cMatchedText : scpDemo.Options := scpDemo.Options + [scoLimitToMatchedText]; end; end else begin Case TCheckBox(Sender).Tag of cCaseSensitive : scpDemo.Options := scpDemo.Options - [scoCaseSensitive]; cPrettyText : scpDemo.Options := scpDemo.Options - [scoUsePrettyText]; cInsertList : scpDemo.Options := scpDemo.Options - [scoUseInsertList]; cMatchedText : scpDemo.Options := scpDemo.Options - [scoLimitToMatchedText]; end; end; end; end; procedure TForm1.edBiggestWordChange(Sender: TObject); begin scpDemo.Columns[0].BiggestWord := edBiggestWord.Text; end; procedure TForm1.Button1Click(Sender: TObject); begin scpDemo.InsertList.Clear; scpDemo.InsertList.AddStrings(mmoInsert.Lines); end; procedure TForm1.Button2Click(Sender: TObject); begin scpDemo.ItemList.Clear; scpDemo.ItemList.AddStrings(mmoItem.Lines); scpDemo.ResetAssignedList; end; procedure TForm1.edTitleChange(Sender: TObject); begin scpDemo.Title := edTitle.Text; end; procedure TForm1.Button3Click(Sender: TObject); begin FontDialog1.Font.Assign(scpDemo.Font); if FontDialog1.Execute then scpDemo.Font.Assign(FontDialog1.Font); end; procedure TForm1.Button4Click(Sender: TObject); begin FontDialog1.Font.Assign(scpDemo.TitleFont); if FontDialog1.Execute then scpDemo.TitleFont.Assign(FontDialog1.Font); end; procedure TForm1.FormShow(Sender: TObject); begin SynEdit1.SetFocus; end; end.
31.401099
113
0.697113
83d973b5e39073d628873b39b56418573650426e
8,421
pas
Pascal
src/Horse.Core.pas
mateusvicente100/horse
afd8e22c87b9ec954a7a8ab59c686a4cdd5f2650
[ "MIT" ]
4
2021-08-11T12:51:43.000Z
2022-02-27T16:44:12.000Z
src/Horse.Core.pas
mateusvicente100/horse
afd8e22c87b9ec954a7a8ab59c686a4cdd5f2650
[ "MIT" ]
null
null
null
src/Horse.Core.pas
mateusvicente100/horse
afd8e22c87b9ec954a7a8ab59c686a4cdd5f2650
[ "MIT" ]
null
null
null
unit Horse.Core; interface uses System.SysUtils, Web.HTTPApp, Horse.Router; type THorseCore = class private FRoutes: THorseRouterTree; procedure RegisterRoute(AHTTPType: TMethodType; APath: string; ACallback: THorseCallback); class var FInstance: THorseCore; protected procedure Initialize; virtual; public destructor Destroy; override; constructor Create; overload; class destructor UnInitialize; property Routes: THorseRouterTree read FRoutes write FRoutes; procedure Use(APath: string; ACallback: THorseCallback); overload; procedure Use(ACallback: THorseCallback); overload; procedure Use(APath: string; ACallbacks: array of THorseCallback); overload; procedure Use(ACallbacks: array of THorseCallback); overload; procedure Get(APath: string; ACallback: THorseCallback); overload; procedure Get(APath: string; AMiddleware, ACallback: THorseCallback); overload; procedure Get(APath: string; ACallbacks: array of THorseCallback); overload; procedure Get(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); overload; procedure Put(APath: string; ACallback: THorseCallback); overload; procedure Put(APath: string; AMiddleware, ACallback: THorseCallback); overload; procedure Put(APath: string; ACallbacks: array of THorseCallback); overload; procedure Put(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); overload; procedure Patch(APath: string; ACallback: THorseCallback); overload; procedure Patch(APath: string; AMiddleware, ACallback: THorseCallback); overload; procedure Patch(APath: string; ACallbacks: array of THorseCallback); overload; procedure Patch(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); overload; procedure Head(APath: string; ACallback: THorseCallback); overload; procedure Head(APath: string; AMiddleware, ACallback: THorseCallback); overload; procedure Head(APath: string; ACallbacks: array of THorseCallback); overload; procedure Head(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); overload; procedure Post(APath: string; ACallback: THorseCallback); overload; procedure Post(APath: string; AMiddleware, ACallback: THorseCallback); overload; procedure Post(APath: string; ACallbacks: array of THorseCallback); overload; procedure Post(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); overload; procedure Delete(APath: string; ACallback: THorseCallback); overload; procedure Delete(APath: string; AMiddleware, ACallback: THorseCallback); overload; procedure Delete(APath: string; ACallbacks: array of THorseCallback); overload; procedure Delete(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); overload; procedure Start; virtual; abstract; class function GetInstance: THorseCore; end; implementation { THorseCore } constructor THorseCore.Create; begin Initialize; end; procedure THorseCore.Delete(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Delete(APath, LCallback); Delete(APath, ACallback); end; destructor THorseCore.Destroy; begin FRoutes.free; inherited; end; procedure THorseCore.Delete(APath: string; AMiddleware, ACallback: THorseCallback); begin Delete(APath, [AMiddleware, ACallback]); end; procedure THorseCore.Delete(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Delete(APath, LCallback); end; procedure THorseCore.Delete(APath: string; ACallback: THorseCallback); begin RegisterRoute(mtDelete, APath, ACallback); end; procedure THorseCore.Initialize; begin FInstance := Self; FRoutes := THorseRouterTree.Create; end; procedure THorseCore.Head(APath: string; ACallback: THorseCallback); begin RegisterRoute(mtHead, APath, ACallback); end; procedure THorseCore.Get(APath: string; ACallback: THorseCallback); begin RegisterRoute(mtGet, APath, ACallback); end; procedure THorseCore.Head(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Head(APath, LCallback); end; procedure THorseCore.Get(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Get(APath, LCallback); end; procedure THorseCore.Head(APath: string; AMiddleware, ACallback: THorseCallback); begin Head(APath, [AMiddleware, ACallback]); end; procedure THorseCore.Get(APath: string; AMiddleware, ACallback: THorseCallback); begin Get(APath, [AMiddleware, ACallback]); end; class function THorseCore.GetInstance: THorseCore; begin Result := FInstance; end; procedure THorseCore.Post(APath: string; ACallback: THorseCallback); begin RegisterRoute(mtPost, APath, ACallback); end; procedure THorseCore.Patch(APath: string; ACallback: THorseCallback); begin RegisterRoute(mtPatch, APath, ACallback); end; procedure THorseCore.Put(APath: string; ACallback: THorseCallback); begin RegisterRoute(mtPut, APath, ACallback); end; procedure THorseCore.RegisterRoute(AHTTPType: TMethodType; APath: string; ACallback: THorseCallback); begin if APath.EndsWith('/') then APath := APath.Remove(High(APath) - 1, 1); if not APath.StartsWith('/') then APath := '/' + APath; FRoutes.RegisterRoute(AHTTPType, APath, ACallback); end; class destructor THorseCore.UnInitialize; begin if Assigned(FInstance) then FInstance.Free; end; procedure THorseCore.Use(ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Use(LCallback); end; procedure THorseCore.Use(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Use(APath, LCallback); end; procedure THorseCore.Use(ACallback: THorseCallback); begin FRoutes.RegisterMiddleware('/', ACallback); end; procedure THorseCore.Use(APath: string; ACallback: THorseCallback); begin FRoutes.RegisterMiddleware(APath, ACallback); end; procedure THorseCore.Post(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Post(APath, LCallback); end; procedure THorseCore.Post(APath: string; AMiddleware, ACallback: THorseCallback); begin Post(APath, [AMiddleware, ACallback]); end; procedure THorseCore.Patch(APath: string; AMiddleware, ACallback: THorseCallback); begin Patch(APath, [AMiddleware, ACallback]); end; procedure THorseCore.Put(APath: string; AMiddleware, ACallback: THorseCallback); begin Put(APath, [AMiddleware, ACallback]); end; procedure THorseCore.Patch(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Patch(APath, LCallback); end; procedure THorseCore.Put(APath: string; ACallbacks: array of THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Put(APath, LCallback); end; procedure THorseCore.Head(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Head(APath, LCallback); Head(APath, ACallback); end; procedure THorseCore.Get(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Get(APath, LCallback); Get(APath, ACallback); end; procedure THorseCore.Post(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Post(APath, LCallback); Post(APath, ACallback); end; procedure THorseCore.Patch(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Patch(APath, LCallback); Patch(APath, ACallback); end; procedure THorseCore.Put(APath: string; ACallbacks: array of THorseCallback; ACallback: THorseCallback); var LCallback: THorseCallback; begin for LCallback in ACallbacks do Put(APath, LCallback); Put(APath, ACallback); end; end.
29.037931
110
0.77188
f1029dbe3a34117504e906bc2b037b8940e2dab1
3,254
dpr
Pascal
EcoDistrictDebugger/EcodistrictDebugger.dpr
ecodistrict/DesignModule
edfb28b90e033ce5e8ad27c6054e5b5836654dd2
[ "MIT" ]
3
2017-04-03T08:32:37.000Z
2019-02-15T04:20:08.000Z
EcoDistrictDebugger/EcodistrictDebugger.dpr
ecodistrict/DesignModule
edfb28b90e033ce5e8ad27c6054e5b5836654dd2
[ "MIT" ]
70
2016-10-04T14:01:54.000Z
2018-10-26T14:47:30.000Z
EcoDistrictDebugger/EcodistrictDebugger.dpr
ecodistrict/DesignModule
edfb28b90e033ce5e8ad27c6054e5b5836654dd2
[ "MIT" ]
2
2018-08-09T13:45:23.000Z
2018-11-09T14:02:02.000Z
program EcodistrictDebugger; {$APPTYPE CONSOLE} {$R *.res} uses Logger, LogConsole, LogFile, imb4, System.JSON, Rest.JSON, //SuperObject, System.Classes, System.SysUtils; procedure HandleException(aConnection: TConnection; aException: Exception); begin Log.WriteLn('FATAL IMB4 connection exception: '+aException.Message, llError); end; procedure HandleDisconnect(aConnection: TConnection); begin Log.WriteLn('DISCONNECT from IMB4 connection', llError); end; function Subscribe(aConnection: TConnection; const aEventName: string): TEventEntry; begin Result := aConnection.eventEntry(aEventName).subscribe; if Result.OnString.Count=0 then begin // no handlers: add new Result.OnString.Add( procedure(aEventEntry: TEventEntry; const aString: string) var lines: TStringList; l: Integer; //lJSON : ISuperObject; jsonObject: TJSONObject; _type: string; _method: string; _eventId: string; begin try jsonObject := TJSONObject.Create; try jsonObject := TJSONObject.ParseJSONValue(aString) as TJSONObject; //lJSON := SO(aString); if not jsonObject.TryGetValue<string>('type', _type) then _type := '##'; if not jsonObject.TryGetValue<string>('method', _method) then _method := '##'; if jsonObject.TryGetValue<string>('eventId', _eventId) then begin if _eventId<>'' then Subscribe(aConnection, _eventId); end else _eventId:= ''; Log.WriteLn('on '+aEventName+': '+_type+', '+_method, llNormal, 0); lines := TStringList.Create; try lines.Text := REST.JSON.TJson.Format(jsonObject); for l := 0 to lines.Count-1 do begin Log.WriteLn(lines[l], llDump, 1); end; finally lines.Free; end; finally jsonObject.Free; end; except on e: Exception do Log.WriteLn('Exception in OnString: '+e.Message, llError); end; end); Result.OnStreamCreate := function(aEventyEntry: TEventEntry; const aStreamName: string): TStream begin Log.WriteLn(aEventName+': stream '+aStreamName, llNormal, 0); Result := nil; end; Log.WriteLn('listening on "'+aEventName+'"', llWarning); end; // else already have an handler on event end; var connection: TConnection; begin FileLogger.SetLogDef([llNormal, llWarning, llError], [llsTime]); ConsoleLogger.SetLogDef([llNormal, llWarning, llError], [llsTime]); try connection := TSocketConnection.Create('Debugger', 3, 'ecodistrict'); try connection.onDisconnect := HandleDisconnect; connection.onException := HandleException; Subscribe(connection, 'modules'); Subscribe(connection, 'dashboard'); Subscribe(connection, 'data'); Subscribe(connection, 'data-to-dashboard'); WriteLn('Press return to quit'); ReadLn; finally connection.Free; end; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
29.053571
100
0.614014
859de07463076ea63b15e610aceca9c5d376674c
284
dpr
Pascal
windows/src/ext/jedi/jcl/jcl/examples/windows/debug/framestrack/FramesTrackExample.dpr
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jcl/jcl/examples/windows/debug/framestrack/FramesTrackExample.dpr
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
4,451
2017-05-29T02:52:06.000Z
2022-03-31T23:53:23.000Z
windows/src/ext/jedi/jcl/jcl/examples/windows/debug/framestrack/FramesTrackExample.dpr
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
72
2017-05-26T04:08:37.000Z
2022-03-03T10:26:20.000Z
program FramesTrackExample; {$I jcl.inc} uses Forms, FramesTrackDemoMain in 'FramesTrackDemoMain.pas' {Form1}; {$R *.RES} {$R ..\..\..\..\source\windows\JclCommCtrlAsInvoker.res} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end.
16.705882
59
0.721831
83af39445001b79b1c59f9a589cef455af2c498d
1,521
pas
Pascal
windows/src/ext/jedi/jvcl/jvcl/examples/JvInterpreterDemos/JvInterpreterDynamicLoad/ScriptForm.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jvcl/jvcl/examples/JvInterpreterDemos/JvInterpreterDynamicLoad/ScriptForm.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
4,451
2017-05-29T02:52:06.000Z
2022-03-31T23:53:23.000Z
windows/src/ext/jedi/jvcl/jvcl/examples/JvInterpreterDemos/JvInterpreterDynamicLoad/ScriptForm.pas
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
72
2017-05-26T04:08:37.000Z
2022-03-03T10:26:20.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.delphi-jedi.org 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 ScriptForm; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, MyLabel; type TScript = class(TForm) MyLabel1: TMyLabel; Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Script: TScript; implementation {$R *.dfm} procedure TScript.Button1Click(Sender: TObject); begin MyLabel1.DoSomething; end; procedure TScript.Button2Click(Sender: TObject); begin MyLabel1.SomeProperty := 'SomeProperty'; end; end.
23.4
67
0.671269
8395d5f2c1973705deac284eec27378a6b322912
21,197
pas
Pascal
src/MonitorForm.pas
serbod/ZhdunQMS
fa530654f6359faef695d983be5ea6a83e107ea6
[ "Apache-2.0" ]
1
2020-11-04T15:04:54.000Z
2020-11-04T15:04:54.000Z
src/MonitorForm.pas
serbod/ZhdunQMS
fa530654f6359faef695d983be5ea6a83e107ea6
[ "Apache-2.0" ]
null
null
null
src/MonitorForm.pas
serbod/ZhdunQMS
fa530654f6359faef695d983be5ea6a83e107ea6
[ "Apache-2.0" ]
1
2021-11-06T00:17:40.000Z
2021-11-06T00:17:40.000Z
{ ZhdunQMS (C) Sergey Bodrov, 2020 } unit MonitorForm; {$mode objfpc}{$H+} interface uses {$ifdef WINDOWS}windows, comobj,{$endif} Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, Menus, Variants, LazUTF8, lNetComponents, ZhdunItems, ZhdunTicketManager, FPCanvas, lNet, RFUtils, logger; type { TFormMonitor } TFormMonitor = class(TForm) miListVoices: TMenuItem; pmMain: TPopupMenu; UDPUplink: TLUDPComponent; UDPListener: TLUDPComponent; PaintBox: TPaintBox; Timer100ms: TTimer; procedure FormResize(Sender: TObject); procedure miListVoicesClick(Sender: TObject); procedure UDPListenerError(const msg: string; aSocket: TLSocket); procedure UDPListenerReceive(aSocket: TLSocket); procedure PaintBoxMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure PaintBoxPaint(Sender: TObject); procedure Timer100msTimer(Sender: TObject); procedure UDPUplinkError(const msg: string; aSocket: TLSocket); procedure UDPUplinkReceive(aSocket: TLSocket); private FTicketManager: TTicketManager; FConfigFileName: string; FBGFileName: string; FBGImage: TImage; FHeaderText: string; FNeedRestartListener: Boolean; FSpVoice: Variant; procedure AfterResize(); procedure DrawBackground(AC: TCanvas); procedure DrawHeader(AC: TCanvas); procedure DrawOffice(AC: TCanvas; const AOffice: TVisualOffice); procedure DrawButton(AC: TCanvas; const AButton: TVisualButton); procedure DrawTicket(AC: TCanvas; const ATicket: TVisualTicket); procedure DrawFooter(AC: TCanvas); procedure ProcessClick(X, Y: Integer); procedure StartListener(); procedure PrepareVoice(); procedure UpdateAppIcon(); procedure OnSendCmdHandler(const ACmdText, AHostPort: string); procedure OnUplinkSendCmdHandler(const ACmdText, AHostPort: string); procedure OnSpeechText(const S: string); public procedure AfterConstruction; override; procedure BeforeDestruction; override; procedure UpdateView(); procedure TestTickets(); property TicketManager: TTicketManager read FTicketManager; end; var FormMonitor: TFormMonitor; resourcestring csHeaderText = 'СУО "Ждун" 2020 (С) serbod.com'; csTicketNoteText = 'Запишите номер билета'; implementation {$R *.lfm} { TFormMonitor } procedure TFormMonitor.PaintBoxPaint(Sender: TObject); var c: TCanvas; vt: TVisualOffice; i: Integer; begin c := PaintBox.Canvas; DrawBackground(c); DrawHeader(c); {vt.Pos.X := 10; vt.Pos.Y := 50; vt.OfficeText := 'Кабинет 234'; vt.TicketText := '123'; DrawOffice(c, vt);} for i := Low(TicketManager.VisualOffices) to High(TicketManager.VisualOffices) do begin DrawOffice(c, TicketManager.VisualOffices[i]); end; if zrKiosk in TicketManager.Roles then begin for i := Low(TicketManager.VisualButtons) to High(TicketManager.VisualButtons) do begin DrawButton(c, TicketManager.VisualButtons[i]); end; if TicketManager.VisTicket.Visible then begin DrawTicket(c, TicketManager.VisTicket); end; end; DrawFooter(c); end; procedure TFormMonitor.Timer100msTimer(Sender: TObject); begin UpdateView(); if FNeedRestartListener then begin FNeedRestartListener := False; StartListener(); end; TicketManager.Tick(); end; procedure TFormMonitor.UDPUplinkError(const msg: string; aSocket: TLSocket); begin _LogError('Uplink: ' + WinCPToUTF8(msg)); end; procedure TFormMonitor.UDPUplinkReceive(aSocket: TLSocket); var s, ss, sHostPort: string; begin aSocket.GetMessage(ss); sHostPort := aSocket.PeerAddress + ':' + IntToStr(aSocket.PeerPort); if ss <> '' then begin _LogDebug('Uplink: ' + ss); while ss <> '' do begin s := ExtractFirstWord(ss, sLineBreak); TicketManager.ProcessCmd(s, sHostPort); end; end; end; procedure TFormMonitor.FormResize(Sender: TObject); begin AfterResize(); end; procedure TFormMonitor.miListVoicesClick(Sender: TObject); var SpVoice, SpVoicesList, SpVoiceToken: Variant; //VoiceString: WideString; // WideString must be used to assign variable for speech to function, can be Global. i: Integer; sl: TStringList; begin SpVoice := CreateOleObject('SAPI.SpVoice'); // Can be assigned in form.create //VoiceString := S; // variable assignment //SpVoice.Speak(VoiceString, 0); sl := TStringList.Create(); try SpVoicesList := SpVoice.GetVoices(); for i := 0 to SpVoicesList.Count-1 do begin SpVoiceToken := SpVoicesList.Item(i); sl.Add(SpVoiceToken.GetDescription()); end; ShowMessage(sl.Text); finally sl.Free(); end; end; procedure TFormMonitor.UDPListenerError(const msg: string; aSocket: TLSocket); begin _LogError('Listener: ' + WinCPToUTF8(msg)); FNeedRestartListener := True; end; procedure TFormMonitor.UDPListenerReceive(aSocket: TLSocket); var s, sHostPort: string; begin aSocket.GetMessage(s); sHostPort := aSocket.PeerAddress + ':' + IntToStr(aSocket.PeerPort); if s <> '' then begin _LogDebug('Listener: ' + s); TicketManager.ProcessCmd(s, sHostPort); end; end; procedure TFormMonitor.PaintBoxMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin ProcessClick(X, Y); end; procedure TFormMonitor.AfterResize(); begin // x = 10 .. (2/3) - 20 TicketManager.VisOfficesArea.Left := 10; TicketManager.VisOfficesArea.Right := ((Width div 3) * 2) - 20; // y = 50 .. Max-100 TicketManager.VisOfficesArea.Top := 50; TicketManager.VisOfficesArea.Bottom := Height - 50; // x = (2/3)+10 .. Max-10 TicketManager.VisButtonsArea.Left := ((Width div 3) * 2) + 10; TicketManager.VisButtonsArea.Right := Width - 10; // y = 50 .. Max-100 TicketManager.VisButtonsArea.Top := 50; TicketManager.VisButtonsArea.Bottom := Height - 50; end; procedure TFormMonitor.DrawBackground(AC: TCanvas); begin // background if (FBGFileName <> '') and Assigned(FBGImage) then begin // image //AC.CopyRect(AC.ClipRect, FBGImage.Canvas, FBGImage.Canvas.ClipRect); //FBGImage.Picture.Bitmap.; AC.Draw(0, 0, FBGImage.Picture.Graphic); end else begin // color fill AC.Brush.Style := bsSolid; AC.Brush.Color := clMoneyGreen; AC.FillRect(AC.ClipRect); end; end; procedure TFormMonitor.DrawHeader(AC: TCanvas); var sTime: string; te: TSize; begin AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := 10; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; AC.Font.Color := clLtGray; AC.TextOut(5, 5, FHeaderText); AC.Font.Color := clBlack; AC.TextOut(4, 4, FHeaderText); // == clock sTime := FormatDateTime('HH:NN:SS', Now()); AC.Font.Name := 'Terminal'; AC.Font.Size := Height div 25; te := AC.TextExtent(sTime); AC.Font.Color := clLtGray; AC.TextOut(Width - te.cx - 5, 5, sTime); AC.Font.Color := clBlack; AC.TextOut(Width - te.cx - 4, 4, sTime); end; {Procedure SetAlpha(bmp: TBitMap; Alpha: Byte; R: TRect); type pRGBQuadArray = ^TRGBQuadArray; TRGBQuadArray = ARRAY [0 .. $EFFFFFF] OF TRGBQuad; var pscanLine32: pRGBQuadArray; i, j: Integer; begin bmp.PixelFormat := pf32Bit; bmp.HandleType := bmDIB; //bmp.ignorepalette := true; //bmp.alphaformat := afDefined; for i := 0 to bmp.Height - 1 do begin pscanLine32 := bmp.Scanline[i]; for j := 0 to bmp.Width - 1 do begin if (j >= R.Left) and (j <= R.Right) and (i >= R.Top) and (i <= R.Bottom) then begin pscanLine32[j].rgbReserved := 0; pscanLine32[j].rgbBlue := 0; pscanLine32[j].rgbRed := 0; pscanLine32[j].rgbGreen := 0; end else begin pscanLine32[j].rgbReserved := Alpha; pscanLine32[j].rgbBlue := Alpha; pscanLine32[j].rgbRed := Alpha; pscanLine32[j].rgbGreen := Alpha; end; end; end; end; } procedure TFormMonitor.DrawOffice(AC: TCanvas; const AOffice: TVisualOffice); var r: TRect; s: string; rr: Integer; iYShift: Integer; begin // frame AC.DrawingMode := dmAlphaBlend; //AC.Brush.Style := bsSolid; AC.Brush.Style := bsClear; AC.Brush.Color := clWhite; if AOffice.State = osLost then AC.Brush.Color := clGray; AC.Pen.Width := Min(Width div 200, Height div 200); if AOffice.Marked then begin AC.Pen.Style := psDash; AC.Pen.Color := clRed end else begin AC.Pen.Style := psSolid; AC.Pen.Color := clBlack; end; r := AOffice.Rect; //AC.FillRect(r); rr := Min((r.Width div 5), (r.Height div 5)); AC.RoundRect(r, rr, rr); // == Office text AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := r.Height div 2; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; //AC.Font.Color := clLtGray; //AC.TextOut(5, 5, FHeaderText); iYShift := (AC.Font.Size div 3); AC.Font.Color := clBlack; AC.TextOut(r.Left + 10, r.Top + iYShift, AOffice.OfficeText); AC.Font.Color := clBlack; AC.TextOut(r.Left + ((r.Width div 3) * 2), r.Top + iYShift, AOffice.TicketText); end; procedure TFormMonitor.DrawButton(AC: TCanvas; const AButton: TVisualButton); var r: TRect; s: string; rr: Integer; ts: TTextStyle; begin // frame AC.DrawingMode := dmAlphaBlend; //AC.Brush.Style := bsSolid; AC.Brush.Style := bsClear; AC.Brush.Color := clWhite; AC.Pen.Style := psSolid; AC.Pen.Color := clBlack; r := AButton.Rect; //AC.FillRect(r); rr := Min((r.Width div 5), (r.Height div 5)); AC.RoundRect(r, rr, rr); if AButton.Marked then begin // border for selected item AC.Pen.Style := psDash; AC.Pen.Color := clBlue; AC.Pen.Width := 4; AC.Rectangle(R); end; // shrink rect for text rr := Min((r.Width div 10), (r.Height div 10)); r.Left := r.Left + (rr div 2); r.Width := r.Width - rr; r.Top := r.Top + (rr div 2); r.Height := r.Height - rr; // == Office text AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := r.Height div 4; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; //AC.Font.Color := clLtGray; //AC.TextOut(5, 5, FHeaderText); // text style ts := AC.TextStyle; ts.SingleLine := False; ts.Wordbreak := True; //ts.Alignment := taLeftJustify; ts.Layout := tlTop; ts.Alignment := taCenter; //ts.Clipping := False; //ts.SystemFont := True; AC.Font.Color := clBlack; //AC.TextOut(r.Left + 10, r.Top + 10, AButton.Text); AC.TextRect(r, r.Left, r.Top, AButton.Text, ts); if AButton.SubText <> '' then begin AC.Font.Color := clBlack; AC.Font.Size := r.Height div 8; //AC.TextOut(r.Left + 10, r.Top + ((r.Height div 3) * 2), AButton.SubText); ts.Layout := tlBottom; AC.TextRect(r, r.Left, r.Top, AButton.SubText, ts); end; end; procedure TFormMonitor.DrawTicket(AC: TCanvas; const ATicket: TVisualTicket); var r: TRect; te, teo: TSize; x, y, nx, ny, rr: Integer; s: string; ts: TTextStyle; begin // frame AC.DrawingMode := dmAlphaBlend; //AC.Brush.Style := bsSolid; AC.Brush.Style := bsClear; AC.Brush.Color := clWhite; AC.Pen.Style := psSolid; AC.Pen.Color := clBlack; r := ATicket.Rect; rr := Min((r.Width div 5), (r.Height div 10)); //AC.FillRect(r); AC.RoundRect(r, rr, rr); // shrink rect for text rr := Min((r.Width div 10), (r.Height div 10)); r.Left := r.Left + (rr div 2); r.Width := r.Width - rr; r.Top := r.Top + (rr div 2); r.Height := r.Height - rr; // text style ts := AC.TextStyle; ts.SingleLine := False; ts.Wordbreak := True; ts.Layout := tlTop; ts.Alignment := taCenter; // == Office text AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := r.Width div 10; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; //AC.Font.Color := clLtGray; //AC.TextOut(5, 5, FHeaderText); AC.Font.Color := clBlack; teo := AC.TextExtent(ATicket.OfficeText); //AC.TextOut(r.Left + 10, r.Top + 10, ATicket.OfficeText); AC.TextRect(r, r.Left + 10, r.Top + 10, ATicket.OfficeText, ts); // === ticket text AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := r.Width div 5; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; //AC.Font.Color := clLtGray; //AC.TextOut(5, 5, FHeaderText); AC.Font.Color := clBlack; te := AC.TextExtent(ATicket.TicketText); x := r.Left + ((ATicket.Rect.Width - te.cx) div 2); y := r.Top + 10 + teo.Height + 10; //AC.TextOut(x, y, ATicket.TicketText); AC.TextRect(r, x, y, ATicket.TicketText, ts); // === note text AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := r.Width div 10; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; //AC.Font.Color := clLtGray; //AC.TextOut(5, 5, FHeaderText); AC.Font.Color := clBlack; //ts := AC.TextExtent(csTicketNoteText); nx := r.Left + 10; ny := y + te.Height + 10; //AC.TextOut(nx, ny, csTicketNoteText); AC.TextRect(r, nx, ny, csTicketNoteText, ts); end; procedure TFormMonitor.DrawFooter(AC: TCanvas); var r: TRect; ts: TTextStyle; w: Integer; begin if TicketManager.FooterText = '' then Exit; r.Top := Height - 50; r.Bottom := Height; r.Left := 0; r.Width := Width; // == background AC.Brush.Style := bsClear; AC.Brush.Color := clWhite; AC.Pen.Style := psSolid; AC.Pen.Color := clBlack; AC.FillRect(r); // text style ts := AC.TextStyle; ts.SingleLine := False; ts.Wordbreak := True; ts.Layout := tlTop; ts.Alignment := taCenter; // == text AC.Brush.Style := bsClear; AC.Font.Name := 'Tahoma'; AC.Font.Size := 28; //AC.Font.Quality := fqCleartypeNatural; AC.Font.Quality := fqAntialiased; // decrease font if needed w := AC.TextWidth(TicketManager.FooterText); while w > (r.Width - 20) do begin AC.Font.Size := AC.Font.Size - 2; w := AC.TextWidth(TicketManager.FooterText); end; AC.Font.Color := clLtGray; AC.Font.Style := [fsBold]; //AC.TextOut(5, 5, FHeaderText); AC.TextRect(r, r.Left+2, r.Top+2, TicketManager.FooterText, ts); AC.Font.Color := clGray; //AC.TextOut(4, 4, FHeaderText); AC.TextRect(r, r.Left, r.Top, TicketManager.FooterText, ts); end; procedure TFormMonitor.ProcessClick(X, Y: Integer); var i: Integer; pTmpVisButton: PVisualButton; OfficeItem: TOffice; TmpTicket: TTicket; begin for i := Low(TicketManager.VisualButtons) to High(TicketManager.VisualButtons) do begin pTmpVisButton := Addr(TicketManager.VisualButtons[i]); if pTmpVisButton^.Rect.Contains(Point(X, Y)) then begin OfficeItem := TicketManager.OfficeList.GetByNum(pTmpVisButton^.OfficeNum); if Assigned(OfficeItem) then begin TmpTicket := TicketManager.CreateTicket(OfficeItem.Num); if Assigned(TmpTicket) then begin TicketManager.VisTicket.OfficeNum := TmpTicket.OfficeNum; TicketManager.VisTicket.TicketNum := TmpTicket.Num; TicketManager.VisTicket.TimeCreate := TmpTicket.TimeCreate; TicketManager.VisTicket.OfficeText := OfficeItem.Caption; TicketManager.VisTicket.TicketText := TmpTicket.Caption; TicketManager.VisTicket.Visible := True; end; end; end; end; end; procedure TFormMonitor.StartListener(); begin if (zrServer in TicketManager.Roles) then UDPListener.Listen(TicketManager.UDPPort); end; procedure TFormMonitor.PrepareVoice(); var SpVoicesList, SpVoiceToken: Variant; s: string; i: Integer; begin FSpVoice := CreateOleObject('SAPI.SpVoice'); //{$ifdef WIN32} SpVoicesList := FSpVoice.GetVoices(); for i := 0 to SpVoicesList.Count-1 do begin //SpVoiceToken := SpVoicesList.Item(i); s := SpVoicesList.Item(i).GetDescription(); if Pos('Russian', s) > 0 then begin FSpVoice.Voice := SpVoicesList.Item(i); //FSpVoice.SetVoice(SpVoiceToken); end; end; //{$endif} end; procedure TFormMonitor.UpdateAppIcon(); var s: string; TmpImg: TImage; Bitmap: TBitmap; TmpIcon: TIcon; begin if zrServer in TicketManager.Roles then s := 'S' else if zrOperator in TicketManager.Roles then s := 'O' else if zrMonitor in TicketManager.Roles then s := 'M' else s := ''; Bitmap := TBitmap.Create; try Bitmap.Width := Application.Icon.Width; Bitmap.Height := Application.Icon.Height; Bitmap.Canvas.Draw(0, 0, Application.Icon); Bitmap.Canvas.Brush.Style := bsClear; Bitmap.Canvas.Font.Name := 'Tahoma'; //Bitmap.Canvas.Font.Size := 8; Bitmap.Canvas.Font.Size := 40; Bitmap.Canvas.Font.Color := clLime; Bitmap.Canvas.Font.Style := [fsBold]; Bitmap.Canvas.TextOut(0, 0, s); Bitmap.Masked := True; Bitmap.Mask(Bitmap.Canvas.Pixels[0, 0]); Application.Icon.Assign(Bitmap); finally Bitmap.Free; end; {TmpIcon := Application.Icon; TmpIcon.Canvas.Brush.Style := bsClear; TmpIcon.Canvas.Font.Name := 'Tahoma'; TmpIcon.Canvas.Font.Size := 16; TmpIcon.Canvas.Font.Color := clGreen; TmpIcon.Canvas.TextOut(0, 0, s); //Application.Icon := TmpImg.Picture.Icon; } InvalidateRect(Application.Handle, nil, True); end; procedure TFormMonitor.OnSendCmdHandler(const ACmdText, AHostPort: string); begin if (ACmdText <> '') and (AHostPort <> '') then begin UDPListener.SendMessage(ACmdText, AHostPort); end; end; procedure TFormMonitor.OnUplinkSendCmdHandler(const ACmdText, AHostPort: string); begin Assert(Length(ACmdText) <= 500); if FTicketManager.UplinkHost = '' then Exit; if Length(ACmdText) <= 500 then begin if not (FTicketManager.IsUplinkConnected) then begin UDPUplink.Disconnect(True); UDPUplink.Connect(FTicketManager.UplinkHost, FTicketManager.UplinkPort); end; UDPUplink.SendMessage(ACmdText, FTicketManager.UplinkHost + ':' + IntToStr(FTicketManager.UplinkPort)); end; end; procedure TFormMonitor.OnSpeechText(const S: string); const SVSFDefault = 0; SVSFlagsAsync = 1; SVSFPurgeBeforeSpeak = 2; SVSFIsFilename = 4; var VoiceString: WideString; // WideString must be used to assign variable for speech to function, can be Global. begin if VarIsEmpty(FSpVoice) then Exit; VoiceString := S; // variable assignment FSpVoice.Speak(VoiceString, SVSFlagsAsync); end; procedure TFormMonitor.AfterConstruction; var s: string; begin inherited AfterConstruction; FConfigFileName := 'zhdun.ini'; // parse options if ParamCount >= 1 then begin FConfigFileName := ParamStr(1); // name without extension s := ExtractFileName(FConfigFileName); s := Copy(s, 1, Length(s) - Length(ExtractFileExt(s))); DLogger.LogFileName := s; end; FTicketManager := TTicketManager.Create; FTicketManager.MaxVisOffices := 6; FTicketManager.VisOfficeBorderSize := 5; FTicketManager.VisButtonBorderSize := 5; FTicketManager.MaxVisButtons := 3; FTicketManager.UDPPort := 4444; FTicketManager.OnSendCmd := @OnSendCmdHandler; FTicketManager.OnUplinkSendCmd := @OnUplinkSendCmdHandler; FTicketManager.OnSpeechText := @OnSpeechText; FTicketManager.LoadConfig(FConfigFileName); FHeaderText := csHeaderText; if FileExists('bg.png') then begin FBGFileName := 'bg.png'; FBGImage := TImage.Create(Self); try FBGImage.Picture.LoadFromFile(FBGFileName); except FreeAndNil(FBGImage); FBGFileName := ''; end; end else FBGFileName := ''; UpdateAppIcon(); PrepareVoice(); StartListener(); TestTickets(); end; procedure TFormMonitor.BeforeDestruction; begin FreeAndNil(FTicketManager); inherited BeforeDestruction; end; procedure TFormMonitor.UpdateView(); begin FTicketManager.UpdateVisualOffices(); FTicketManager.UpdateVisualButtons(); Invalidate(); end; procedure TFormMonitor.TestTickets(); var OfficeIterator: TOfficeListIterator; OfficeItem: TOffice; begin OfficeIterator.Init(FTicketManager.OfficeList); while OfficeIterator.Next(OfficeItem) do begin FTicketManager.CreateTicket(OfficeItem.Num); FTicketManager.CreateTicket(OfficeItem.Num); FTicketManager.CreateTicket(OfficeItem.Num); OfficeItem.State := osLost; end; end; end.
25.662228
114
0.648818
bc417bad8a0ede957f670f11bf9948eca0f49f10
1,956
dfm
Pascal
Demos/Controls/DomainUpDown/uDomainUpDowns.dfm
CrystalNet-Tech/dotNetVCL4Delphi_Tutorials
4260109349279a71401d80b92c6a7d76c9c6d4d1
[ "Apache-2.0" ]
1
2020-12-31T11:25:23.000Z
2020-12-31T11:25:23.000Z
Demos/Controls/DomainUpDown/uDomainUpDowns.dfm
CrystalNet-Tech/dotNetVCL4Delphi
4260109349279a71401d80b92c6a7d76c9c6d4d1
[ "Apache-2.0" ]
null
null
null
Demos/Controls/DomainUpDown/uDomainUpDowns.dfm
CrystalNet-Tech/dotNetVCL4Delphi
4260109349279a71401d80b92c6a7d76c9c6d4d1
[ "Apache-2.0" ]
2
2020-09-26T09:03:17.000Z
2021-02-26T11:26:25.000Z
object Form10: TForm10 Left = 0 Top = 0 BorderStyle = bsDialog Caption = '.Net DomainUpDown in Delphi' ClientHeight = 253 ClientWidth = 295 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 CnDomainUpDown1: TCnDomainUpDown Left = 88 Top = 72 Width = 105 Height = 20 Location.X = 88 Location.Y = 72 Size.Width = 105 TabOrder = 0 OnDoubleClick = CnDomainUpDown1DoubleClick Items.Strings = ( '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' '11' '12' '13' '14' '15' '16') Text = '1' OnSelectedItemChanged = CnDomainUpDown1SelectedItemChanged OnTextChanged = CnDomainUpDown1TextChanged end object CnDomainUpDown2: TCnDomainUpDown Left = 88 Top = 106 Width = 105 Height = 20 Location.X = 88 Location.Y = 106 Size.Width = 105 TabOrder = 1 TextAlign = haCenter UpDownAlign = lraLeft Items.Strings = ( '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' '11' '12' '13' '14' '15' '16') Text = '1' end object CnDomainUpDown3: TCnDomainUpDown Left = 88 Top = 144 Width = 105 Height = 20 Location.X = 88 Location.Y = 144 Size.Width = 105 TabOrder = 2 BackColor.HexCode = 'DarkTurquoise' BackColor.Name = 'DarkTurquoise' Font.Style = [fsRegular, fsBold] ForeColor.HexCode = 'Maroon' ForeColor.Name = 'Maroon' Items.Strings = ( '.Net' 'Delphi' 'C#' 'Java' 'C++' '') Text = '.Net' end end
18.990291
63
0.51227
83d5c280637b2815dc22e8e11d960ee1910de34d
26,124
pas
Pascal
CPRSChart/OR_30_377V9_SRC/OrderCom/BCMA/VHA_Objects.pas
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
1
2015-11-03T14:56:42.000Z
2015-11-03T14:56:42.000Z
CPRSChart/OR_30_377V9_SRC/OrderCom/BCMA/VHA_Objects.pas
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
null
null
null
CPRSChart/OR_30_377V9_SRC/OrderCom/BCMA/VHA_Objects.pas
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
null
null
null
unit VHA_Objects; { ================================================================================ * File: VHA_Objects.PAS * * Application: Bar Code Medication Administration * Revision: $Revision: 23 $ $Modtime: 5/08/02 3:50p $ * * Description: This is a unit which contains VHA Objects developed for the * BCMA application. * * Notes: * * ================================================================================ } interface uses SysUtils, Classes, Controls, Windows, Forms, TRPCB, ComOBJ, ORNet; const VersionInfoKeys: array[1..10] of string = ( 'CompanyName', 'FileDescription', 'FileVersion', 'InternalName', 'LegalCopyRight', 'OriginalFileName', 'ProductName', 'ProductVersion', 'Comments', 'ReleaseDate' ); USEnglish = $040904E4; type PTransBuffer = ^TTransBuffer; TTransBuffer = array[1..13] of smallint; const CInfoStr: array[1..13] of string = ('FileVersion', 'CompanyName', 'FileDescription', 'InternalName', 'LegalCopyright', 'LegalTradeMarks', 'OriginalFileName', 'ProductName', 'ProductVersion', 'Comments', 'CurrentProgramVersion', 'CurrentDatabaseVersion', 'VersionDetails'); function BrokerErrorMessages(errorCode: integer; defString: string): string; (* A function which translates numerical Error Codes into English. *) type TLogErrorProc = procedure(msg: string; ex: exception; Msg2: TStrings = nil); EBrokerConnectionError = class(Exception) (* A replacement for EBrokerError which displays English error messages instead of acronyms. Writes all messages to an error log file, if one exists. *) ErrorCode: integer; Mnemonic: string; constructor Create(eCode: integer; shortMsg, longMsg: string; LogErrorProc: TLogErrorProc); (* Allocates memory for the exception, uses method BrokerErrorMessages to replace errorcodes with English, writes errors to a log file, if one is assigned, and displays the English error messages. *) end; TVersionInfo = class(TComponent) private FFileName: string; FLanguageID: DWord; FInfo: pointer; FInfoSize: longint; FCtlCompanyName: TControl; FCtlFileDescription: TControl; FCtlFileVersion: TControl; FCtlInternalName: TControl; FCtlLegalCopyRight: TControl; FCtlOriginalFileName: TControl; FCtlProductName: TControl; FCtlProductVersion: TControl; FCtlComments: TControl; FCtlReleaseDate: TControl; procedure SetFileName(Value: string); procedure SetVerProp(index: integer; value: TControl); function GetVerProp(index: integer): TControl; function GetIndexKey(index: integer): string; function GetKey(const KName: string): string; procedure Refresh; protected procedure Notification(AComponent: TComponent; Operation: TOperation); override; public property CompanyName: string index 1 read GetIndexKey; property FileDescription: string index 2 read GetIndexKey; property FileVersion: string index 3 read GetIndexKey; property InternalName: string index 4 read GetIndexKey; property LegalCopyRight: string index 5 read GetIndexKey; property OriginalFileName: string index 6 read GetIndexKey; property ProductName: string index 7 read GetIndexKey; property ProductVersion: string index 8 read GetIndexKey; property Comments: string index 9 read GetIndexKey; property ReleaseDate: string index 10 read GetIndexKey; property FileName: string read FFileName write SetFileName; property LanguageID: DWord read FLanguageID write FLanguageID; constructor Create(AOwner: TComponent); override; (* Allocates memory and initializes variables for the object. *) destructor Destroy; override; (* Releases all memory allocated for the object. *) procedure OpenFile(FName: string); (* Uses method GetFileVersionInfo to retrieve version information for file FName. If FName is blank, version information is obtained for the current executable (Application.ExeName). *) procedure Close; (* Releases memory allocated and clears all storage variables. *) published property CtlCompanyName: TControl index 1 read GetVerProp write SetVerProp; property CtlFileDescription: TControl index 2 read GetVerProp write SetVerProp; property CtlFileVersion: TControl index 3 read GetVerProp write SetVerProp; property CtlInternalName: TControl index 4 read GetVerProp write SetVerProp; property CtlLegalCopyRight: TControl index 5 read GetVerProp write SetVerProp; property CtlOriginalFileName: TControl index 6 read GetVerProp write SetVerProp; property CtlProductName: TControl index 7 read GetVerProp write SetVerProp; property CtlProductVersion: TControl index 8 read GetVerProp write SetVerProp; property CtlComments: TControl index 9 read GetVerProp write SetVerProp; property CtlReleaseDate: TControl index 10 read GetVerProp write SetVerProp; end; TBCMA_Broker = class(TRPCBroker) // TBCMA_Broker = class (tRPCBroker) (* A desendant of TRPCBroker that provides enhanced RPC parameter handling, debugging and error trapping capabilities. *) private {Private Stuff} FLogErrorProc: TLogErrorProc; public {Public Stuff} property LogErrorProc: TLogErrorProc read FLogErrorProc write FLogErrorProc; (* Pointer to an optional, external procedure which writes error information into an application errorlog file. *) function CallServer(RPC: string; callingParams: array of string; MultList: TStrings; TrueNull: Boolean = False): boolean; (* Uses: TfrmDebug = class(TForm); This is a wrapper around the inherited Call procedure. Enhancements are: - This is a function, rather than a procedure, which returns a True value only if there are no Broker Errors. - If DebugMode is True, then Call input arguments are displayed and then the output results shown. - The Call itself is in a try/except block so that Broker Errors can be trapped and handled in a user friendly form and detailed error info can be entered into an application error log file, if one has been assigned. *) end; TBCMA_User = class(TObject) (* An class that holds User data and handles all User interaction with the VistA server. *) private FRPCBroker: TBCMA_Broker; FDUZ: string; FUserName: string; FIsManager: Boolean; FIsStudent: Boolean; FIsMOButtonUser: Boolean; FIsReadOnly, FUnableToScanKey: Boolean; FOrderRole: Integer; FDivisionIEN, FSiteIEN, FDivisionName, FInstructorDUZ: string; //If this is a student, then this contains the DUZ of the instructor FESigRequired: boolean; FOnLine: boolean; FDTime: string; //User timeout interval in seconds. FChanged: boolean; FProductionAccount: Boolean; protected { set to read only! procedure setUserName(newValue: string); procedure setIsManager(newValue: Boolean); procedure setIsStudent(newValue: Boolean); procedure setCanOverrideOrder(newValue: Boolean); } function getDTime: integer; public property DUZ: string read FDUZ; property UserName: string read FUserName; property IsManager: Boolean read FIsManager; property IsStudent: Boolean read FIsStudent; property IsMOButtonUser: Boolean read FIsMOButtonUser; property IsReadOnly: Boolean read FIsReadOnly write FIsReadOnly; property UnableToScanKey: Boolean read FUnableToScanKey; property DivisionIEN: string read FDivisionIEN; property ProductionAccount: Boolean read FProductionAccount; property SiteIEN: string read FSiteIEN; property DivisionName: string read FDivisionName; property InstructorDUZ: string read FInstructorDUZ write FInstructorDUZ; property ESigRequired: boolean read FESigRequired; property OnLine: boolean read FOnLine; property DTime: integer read getDTime; //User Timeout interval property OrderRole: integer read FOrderRole; property Changed: boolean read FChanged; constructor Create(RPCBroker: TBCMA_Broker); virtual; (* Allocates memory, initializes storage variables and saves a pointer to a global copy of the TBCMA_Broker object *) destructor Destroy; override; (* Deallocates memory and sets FRPCBroker := nil; *) procedure Clear; (* Intitalizes internal storage variables. *) function LoadData: boolean; (* Creates user context 'PSB GUI CONTEXT - USER' then uses RPC 'PSB USERLOAD' to retrieve user data fron the server, *) procedure SaveData; (* If any of the User properties have changed, the changes will be saved to the server. *) function isValidESig(ESig: string): boolean; (* Uses RPC 'PSB VALIDATE ESIG' to validate an Electronic Signature, ESig. If valid, the return value is True. *) end; implementation uses Dialogs, TypInfo, {Debug,} MFunStr, {BCMA_Startup,} Hash, BCMA_Util; function BrokerErrorMessages(errorCode: integer; defString: string): string; begin case ErrorCode of 10013: result := 'Winsock Error!' + #13 + 'Permission denied.'; 10048: result := 'Winsock Error!' + #13 + 'Address already in use.'; 10049: result := 'Winsock Error!' + #13 + 'Cannot assign requested address.'; 10047: result := 'Winsock Error!' + #13 + 'Address family not supported by protocol family.'; 10037: result := 'Winsock Error!' + #13 + 'Operation already in progress.'; 10053: result := 'Winsock Error!' + #13 + 'Connection aborted by host.'; 10061: result := 'Winsock Error!' + #13 + 'Connection refused by host.'; 10054: result := 'Winsock Error!' + #13 + 'Connection reset by host.'; 10039: result := 'Winsock Error!' + #13 + 'Destination address required.'; 10014: result := 'Winsock Error!' + #13 + 'Bad address.'; 10064: result := 'Winsock Error!' + #13 + 'Host is down.'; 10065: result := 'Winsock Error!' + #13 + 'No route to host.'; 10036: result := 'Winsock Error!' + #13 + 'Operation now in progress.'; 10004: result := 'Winsock Error!' + #13 + 'Interrupted function call.'; 10022: result := 'Winsock Error!' + #13 + 'Invalid argument.'; 10056: result := 'Winsock Error!' + #13 + 'Socket already connected.'; 10024: result := 'Winsock Error!' + #13 + 'Too many open files.'; 10040: result := 'Winsock Error!' + #13 + 'Message too long.'; 10050: result := 'Winsock Error!' + #13 + 'Network is down.'; 10052: result := 'Winsock Error!' + #13 + 'Network dropped connection on reset.'; 10051: result := 'Winsock Error!' + #13 + 'Network is unreachable.'; 10055: result := 'Winsock Error!' + #13 + 'No buffer space available.'; 10042: result := 'Winsock Error!' + #13 + 'Bad protocol option.'; 10057: result := 'Winsock Error!' + #13 + 'Socket is not connected.'; 10038: result := 'Winsock Error!' + #13 + 'Socket operation on non-socket.'; 10045: result := 'Winsock Error!' + #13 + 'Operation not supported.'; 10046: result := 'Winsock Error!' + #13 + 'Protocol family not supported.'; 10067: result := 'Winsock Error!' + #13 + 'Too many processes.'; 10043: result := 'Winsock Error!' + #13 + 'Protocol not supported.'; 10041: result := 'Winsock Error!' + #13 + 'Protocol wrong type for socket.'; 10058: result := 'Winsock Error!' + #13 + 'Cannot send after socket shutdown.'; 10044: result := 'Winsock Error!' + #13 + 'Socket type not supported.'; 10060: result := 'Winsock Error!' + #13 + 'Connection timed out.'; 10035: result := 'Winsock Error!' + #13 + 'Resource temporarily unavailable.'; 11001: result := 'Winsock Error!' + #13 + 'Host not found.'; 10093: result := 'Winsock Error!' + #13 + 'Successful WSAStartup() not yet performed.'; 11004: result := 'Winsock Error!' + #13 + 'Valid name, no data record of requested type.'; 11003: result := 'Winsock Error!' + #13 + 'This is a non-recoverable error.'; 10091: result := 'Winsock Error!' + #13 + 'Network subsystem is unavailable.'; 11002: result := 'Winsock Error!' + #13 + 'Non-authoritative host not found.'; 10092: result := 'Winsock Error!' + #13 + 'WINSOCK.DLL version out of range.'; 10094: result := 'Winsock Error!' + #13 + 'Graceful shutdown in progress.'; else result := defString; end; end; ////////// EBrokerConnectionError Mthods //////////////////////////// constructor EBrokerConnectionError.Create(eCode: integer; shortMsg, longMsg: string; LogErrorProc: TLogErrorProc); begin ErrorCode := eCode; Message := longMsg; Mnemonic := BrokerErrorMessages(ErrorCode, shortMsg); if Mnemonic = '' then Mnemonic := 'Broker Connection Error'; if Message = '' then Message := Mnemonic; case ErrorCode of 10013, 10048, 10049, 10047, 10037, 10053, 10061, 10054, 10039, 10014, 10064, 10065, 10036, 10004, 10022, 10056, 10024, 10040, 10050, 10052, 10051, 10055, 10042, 10057, 10038, 10045, 10046, 10067, 10043, 10041, 10058, 10044, 10060, 10035, 11001, 10093, 11004, 11003, 10091, 11002, 10092, 10094: Message := Mnemonic + #13 + Message; else end; if assigned(LogErrorProc) then begin LogErrorProc('Connection to server not established!', self); DefMessageDlg(Mnemonic, mtError, [mbOK], 0); end; end; ///// TVersionInfo Methods ////////////////////////////////////////// constructor TVersionInfo.Create(AOwner: TComponent); begin inherited Create(AOwner); FLanguageID := USEnglish; SetFileName(EmptyStr); end; destructor TVersionInfo.Destroy; begin if FInfoSize > 0 then FreeMem(FInfo, FInfoSize); inherited Destroy; end; procedure TVersionInfo.SetFileName(Value: string); begin FFileName := Value; if Value = EmptyStr then // default to self FFileName := ExtractFileName(Application.ExeName); // FFileName := ExtractFilePath(Application.ExeName); if csDesigning in ComponentState then begin Refresh end else OpenFile(Value); end; procedure TVersionInfo.OpenFile(FName: string); var vlen: DWord; begin if FInfoSize > 0 then FreeMem(FInfo, FInfoSize); if Length(FName) <= 0 then FName := Application.ExeName; FInfoSize := GetFileVersionInfoSize(pchar(fname), vlen); if FInfoSize > 0 then begin GetMem(FInfo, FInfoSize); if not GetFileVersionInfo(pchar(fname), vlen, FInfoSize, FInfo) then raise Exception.Create('Cannot retrieve Version Information for ' + fname); Refresh; end; end; procedure TVersionInfo.Close; begin if FInfoSize > 0 then FreeMem(FInfo, FInfoSize); FInfoSize := 0; FFileName := EmptyStr; end; const vqvFmt = '\StringFileInfo\%8.8x\%s'; function TVersionInfo.GetKey(const KName: string): string; var //vptr: pchar; vlen: DWord; //Added the following transStr: string; vptr: PTransBuffer; value: PChar; begin Result := EmptyStr; if FInfoSize <= 0 then exit; // If VerQueryValue(FInfo, pchar(Format(vqvFmt, [FLanguageID, KName])), pointer(vptr), vlen) Then if VerQueryValue(FInfo, PChar('\VarFileInfo\Translation'), Pointer(vptr), vlen) then begin //Added the following two lines: transStr := IntToHex(vptr^[1], 4) + IntToHex(vptr^[2], 4); if VerQueryValue(FInfo, pchar('StringFileInfo\' + transStr + '\' + KName), pointer(value), vlen) then //Result := vptr; Result := Value; end; end; function TVersionInfo.GetIndexKey(index: integer): string; begin Result := GetKey(VersionInfoKeys[index]); end; function TVersionInfo.GetVerProp(index: integer): TControl; begin case index of 1: Result := FCtlCompanyName; 2: Result := FCtlFileDescription; 3: Result := FCtlFileVersion; 4: Result := FCtlInternalName; 5: Result := FCtlLegalCopyRight; 6: Result := FCtlOriginalFileName; 7: Result := FCtlProductName; 8: Result := FCtlProductVersion; 9: Result := FCtlComments; 10: Result := FCtlReleaseDate; else Result := nil; end; end; procedure TVersionInfo.SetVerProp(index: integer; value: TControl); begin case index of 1: FCtlCompanyName := Value; 2: FCtlFileDescription := Value; 3: FCtlFileVersion := Value; 4: FCtlInternalName := Value; 5: FCtlLegalCopyRight := Value; 6: FCtlOriginalFileName := Value; 7: FCtlProductName := Value; 8: FCtlProductVersion := Value; 9: FCtlComments := Value; 10: FCtlReleaseDate := Value; end; Refresh; end; procedure TVersionInfo.Notification(AComponent: TComponent; Operation: TOperation); begin if Operation = opRemove then begin if AComponent = FCtlCompanyName then FCtlCompanyName := nil else if AComponent = FCtlFileDescription then FCtlFileDescription := nil else if AComponent = FCtlFileVersion then FCtlFileVersion := nil else if AComponent = FCtlInternalName then FCtlInternalName := nil else if AComponent = FCtlLegalCopyRight then FCtlLegalCopyRight := nil else if AComponent = FCtlOriginalFileName then FCtlOriginalFileName := nil else if AComponent = FCtlProductName then FCtlProductName := nil else if AComponent = FCtlProductVersion then FCtlProductVersion := nil else if AComponent = FCtlComments then FCtlComments := nil else if AComponent = FCtlReleaseDate then FCtlReleaseDate := nil; end; end; procedure TVersionInfo.Refresh; var PropInfo: PPropInfo; procedure AssignText(Actl: TComponent; txt: string); begin if Assigned(ACtl) then begin PropInfo := GetPropInfo(ACtl.ClassInfo, 'Caption'); if PropInfo <> nil then SetStrProp(ACtl, PropInfo, txt) else begin PropInfo := GetPropInfo(ACtl.ClassInfo, 'Text'); if PropInfo <> nil then SetStrProp(ACtl, PropInfo, txt) end; end; end; begin if csDesigning in ComponentState then begin AssignText(FCtlCompanyName, VersionInfoKeys[1]); AssignText(FCtlFileDescription, VersionInfoKeys[2]); AssignText(FCtlFileVersion, VersionInfoKeys[3]); AssignText(FCtlInternalName, VersionInfoKeys[4]); AssignText(FCtlLegalCopyRight, VersionInfoKeys[5]); AssignText(FCtlOriginalFileName, VersionInfoKeys[6]); AssignText(FCtlProductName, VersionInfoKeys[7]); AssignText(FCtlProductVersion, VersionInfoKeys[8]); AssignText(FCtlComments, VersionInfoKeys[9]); AssignText(FCtlReleaseDate, VersionInfoKeys[10]); end else begin AssignText(FCtlCompanyName, CompanyName); AssignText(FCtlFileDescription, FileDescription); AssignText(FCtlFileVersion, FileVersion); AssignText(FCtlInternalName, InternalName); AssignText(FCtlLegalCopyRight, LegalCopyRight); AssignText(FCtlOriginalFileName, OriginalFileName); AssignText(FCtlProductName, ProductName); AssignText(FCtlProductVersion, ProductVersion); AssignText(FCtlComments, Comments); AssignText(FCtlReleaseDate, ReleaseDate); end; end; ///////////////////////////// TBCMA_Broker function TBCMA_Broker.CallServer(RPC: string; callingParams: array of string; MultList: TStrings; TrueNull: Boolean = False): boolean; const ParamTypeStrings: array[TParamType] of string = ('Literal', 'Reference', 'List', 'Global', 'Empty', 'Stream', 'Undefined'); var i, j: integer; emsg: string; begin result := False; if socket = -1 then DefMessageDlg('No VistA server connection!', mtWarning, [mbOK], 0) else if connected = False then exit else begin Screen.Cursor := crHourglass; RemoteProcedure := RPC; if TrueNull = false then begin //an empty array can't be passed, if we recieve #127#127#, don't create any literals if callingParams[0] <> '~!#null#~!' then for i := 0 to High(callingParams) do begin Param[i].Value := callingParams[i]; Param[i].PType := Literal; end; eMsg := 'RPC: ' + RPC; for i := 0 to Param.count - 1 do eMsg := eMsg + #13#10 + 'Param[' + intToStr(i) + ']=' + ParamTypeStrings[Param[i].ptype] + #9 + Param[i].value; i := Param.Count; // In case we have to add a list to the end.... if MultList <> nil then begin for j := 0 to MultList.Count - 1 do begin Param[i].Mult[IntToStr(j)] := MultList[j]; eMsg := eMsg + #13#10 + 'List[' + intToStr(j) + ']=' + #9 + MultList[j]; end; Param[i].PType := List; end; end; // if DebugMode then // frmDebug.Execute('Calling RPC Broker', eMsg, nil); // // if useDebugLog then // begin // writeLogMessageProc('', nil); // writeLogMessageProc(eMsg, nil); // end; try call; // if DebugMode then // frmDebug.Execute('RPC Broker Return Values', 'RPC Call: ' + RPC, Results); // // if useDebugLog then // begin // writeLogMessageProc('', nil); // writeLogMessageProc(RPC + ', RPC Return Values:', nil, Results); // end; result := True; except on E: EBrokerError do begin result := False; eMsg := eMsg + #13#10 + BrokerErrorMessages(E.Code, E.Mnemonic) + #13 + E.Message + #13#13 + 'BCMA failed to communicate with VistA and is unable' + #13#10 + 'to continue. BCMA will now terminate.'; DefMessageDlg('Broker RPC Error:' + #13 + eMsg, mtError, [mbOK], 0); E.message := eMsg + #13#10 + E.message; if assigned(FLogErrorProc) then FLogErrorProc('Broker RPC Error:', E); // Connected := False; // ShutDown := True; // application.terminate; // abort; end; end; Screen.Cursor := crDefault; end; end; ///////////////////////////// TBCMA_User constructor TBCMA_User.Create(RPCBroker: TBCMA_Broker); begin inherited Create; if RPCBroker <> nil then FRPCBroker := RPCBroker; Clear; end; destructor TBCMA_User.Destroy; begin (* if FChanged then if DefMessageDlg('The Current User data has been changed!'+#13#13+'Do you wish save your changes?', mtConfirmation, [mbYes, mbNo], 0) = idYes then SaveData; *) inherited Destroy; end; procedure TBCMA_User.Clear; begin FDUZ := ''; FUserName := ''; FIsManager := False; FIsStudent := False; FIsMOButtonUser := False; FIsReadOnly := False; FUnableToScanKey := False; FDivisionIEN := ''; FSiteIEN := ''; FDivisionName := ''; FESigRequired := False; FOnLine := False; FDTime := ''; FOrderRole := -1; FChanged := False; FProductionAccount := False; end; function TBCMA_User.LoadData: boolean; begin result := False; try if FRPCBroker <> nil then with FRPCBroker do begin if FChanged then if DefMessageDlg('The Current User data has been changed!' + #13#13 + 'Do you wish save your changes?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then SaveData; Clear; if CreateContext('PSB GUI CONTEXT - USER') then // this is a user begin //if CheckVersion then exit; if CallServer('PSB USERLOAD', [''], nil) then begin if piece(FRPCBroker.Results[0], '^', 1) = '-1' then begin DefMessageDlg('Cannot load user parameters', mtError, [mbOK], 0); Exit; end; FDUZ := Results[0]; FUserName := Results[1]; FIsMOButtonUser := (StrToIntDef(Results[4], 0) = 1); FIsReadOnly := (StrToIntDef(Results[18], 0) = 1); FIsStudent := (StrToIntDef(Results[2], 0) = 1); //msf disable //FUnableToScanKey := (StrToIntDef(Results[24], 0) = 1); if FIsStudent then begin // Load as a student FIsManager := False; FIsMOButtonUser := False; FUnableToScanKey := False; end else begin // Manager? FIsManager := (StrToIntDef(Results[3], 0) = 1); end; FDivisionIEN := piece(Results[7], '^', 1); FSiteIEN := piece(Results[7], '^', 2); FProductionAccount := (StrToIntDef(piece(Results[7], '^', 3), 0) = 1); FDivisionName := Results[8]; FESigRequired := (Results[9] = '1'); FOnLine := (Results[10] = '1'); FDTime := Results[11]; Result := True; // User is considered loaded FChanged := False; if CallServer('ORWUBCMA USERINFO', [''], nil, True) then FOrderRole := StrToIntDef(Piece(Results[0], '^', 6), 0); end end else begin if assigned(FLogErrorProc) then FLogErrorProc('User Does Not Have Access To BCMA!', nil); DefMessageDlg('User Does Not Have Access To BCMA!', mtError, [mbok], 0); end; end; except on e: EOleException do begin DefMessageDlg(e.message, mtError, [mbok], 0); if assigned(FRPCBroker.FLogErrorProc) then FRPCBroker.FLogErrorProc(e.message, nil); Result := False; end; end; end; procedure TBCMA_User.SaveData; begin if FRPCBroker <> nil then if FChanged then begin (* Need an RPC to save VistA data for current user. *) FChanged := False; end; end; function TBCMA_User.isValidESig(ESig: string): boolean; begin result := False; if FRPCBroker <> nil then with FRPCBroker do if CallServer('PSB VALIDATE ESIG', ['^' + encrypt(ESig)], nil) then // If CallServer('PSB VALIDATE ESIG', [ESig], Nil) Then result := (piece(Results[0], '^', 1) = '1'); end; function TBCMA_User.getDTime: integer; begin result := 0; if FDTime <> '' then result := strToIntDef(FDTime, 0); end; end.
30.806604
134
0.652771
6a19944d4e29ee4286b4b68ca5eb65590e796649
268
pas
Pascal
Test/GenericsFail/implem_mismatch1.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
1
2022-02-18T22:14:44.000Z
2022-02-18T22:14:44.000Z
Test/GenericsFail/implem_mismatch1.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
Test/GenericsFail/implem_mismatch1.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
type TTest1<T> = class procedure Dummy; end; type TTest2<T, U> = class procedure Dummy; end; procedure TTest1<t>.Dummy; begin end; procedure TTest1<u>.Dummy; begin end; procedure TTest2<T>.Dummy; begin end; procedure TTest2<T,v,w.Dummy; begin end;
17.866667
40
0.690299
f15a3029e90a9018e5aa6eb3cf9ca9e1dfce0f92
1,101
dfm
Pascal
Log.dfm
5cript/wiki-editor-vcl
273261ed92b653b06b9fe2cd90c52629d32f8abe
[ "MIT" ]
1
2016-12-14T07:12:11.000Z
2016-12-14T07:12:11.000Z
Log.dfm
5cript/wiki-editor-vcl
273261ed92b653b06b9fe2cd90c52629d32f8abe
[ "MIT" ]
8
2017-03-23T11:48:12.000Z
2017-03-25T18:04:38.000Z
Log.dfm
5cript/wiki-editor-vcl
273261ed92b653b06b9fe2cd90c52629d32f8abe
[ "MIT" ]
null
null
null
object LogWindow: TLogWindow Left = 0 Top = 0 Caption = 'Log' ClientHeight = 289 ClientWidth = 619 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] Menu = LogWindowMenu OldCreateOrder = False OnCreate = FormCreate OnResize = FormResize PixelsPerInch = 96 TextHeight = 13 object Log: TRichEdit Left = 0 Top = 0 Width = 619 Height = 289 Font.Charset = ANSI_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False PlainText = True ScrollBars = ssVertical TabOrder = 0 Zoom = 100 end object LogWindowMenu: TMainMenu Left = 384 Top = 128 object File1: TMenuItem Caption = '$File' object SaveLog1: TMenuItem Caption = '$SaveLog' OnClick = SaveLog1Click end object ClearLog1: TMenuItem Caption = '$ClearLog' OnClick = ClearLog1Click end end end end
21.588235
34
0.601272
f13d72beda7d2be954a23377264eaf62a6a5b703
2,862
pas
Pascal
Model/Conexoes/Zeos/Menus.Model.Conexoes.Zeos.Conexao.pas
FranlleyGomes/CertificacaoMVC
d62983ca106a8e9feee1df6a0d81bdad3798f07c
[ "MIT" ]
null
null
null
Model/Conexoes/Zeos/Menus.Model.Conexoes.Zeos.Conexao.pas
FranlleyGomes/CertificacaoMVC
d62983ca106a8e9feee1df6a0d81bdad3798f07c
[ "MIT" ]
null
null
null
Model/Conexoes/Zeos/Menus.Model.Conexoes.Zeos.Conexao.pas
FranlleyGomes/CertificacaoMVC
d62983ca106a8e9feee1df6a0d81bdad3798f07c
[ "MIT" ]
null
null
null
unit Menus.Model.Conexoes.Zeos.Conexao; interface uses Menus.Model.Conexoes.Interfaces, System.Classes, Data.DB, ZAbstractConnection, ZConnection; Type TModelConexaoZeos = class(TInterfacedObject, iModelConexao, iModelConexaoParametros) private FConexao: TZConnection; FDatabase: String; FUserName: String; FPassword: String; FDriverId: String; FServer: String; FPorta: Integer; procedure LerParametros; public constructor Create; destructor Destroy; override; class function New: iModelConexao; function Database(Value: String): iModelConexaoParametros; function UserName(Value: String): iModelConexaoParametros; function Password(Value: String): iModelConexaoParametros; function DriverId(Value: String): iModelConexaoParametros; function Server(Value: String): iModelConexaoParametros; function Porta(Value: Integer): iModelConexaoParametros; function EndParametros: iModelConexao; function Conectar : iModelConexao; function Parametros: iModelConexaoParametros; function EndConexao: TComponent; end; implementation uses System.SysUtils; { TModelConexaoZeos } function TModelConexaoZeos.Conectar: iModelConexao; begin Result := Self; LerParametros; FConexao.Connected := true; end; constructor TModelConexaoZeos.Create; begin FConexao := TZConnection.Create(nil); end; function TModelConexaoZeos.Database(Value: String): iModelConexaoParametros; begin Result := Self; FDatabase := Value; end; destructor TModelConexaoZeos.Destroy; begin FConexao.Free; inherited; end; function TModelConexaoZeos.DriverId(Value: String): iModelConexaoParametros; begin Result := Self; FDriverId := Value; end; function TModelConexaoZeos.EndParametros: iModelConexao; begin Result := Self; end; procedure TModelConexaoZeos.LerParametros; begin FConexao.HostName := FServer; FConexao.Port := FPorta; FConexao.Database := FDatabase; FConexao.User := FUserName; FConexao.Password := FPassword; FConexao.Protocol := FDriverId; end; function TModelConexaoZeos.EndConexao: TComponent; begin Result := FConexao; end; class function TModelConexaoZeos.New: iModelConexao; begin Result := Self.Create; end; function TModelConexaoZeos.Parametros: iModelConexaoParametros; begin Result := Self; end; function TModelConexaoZeos.Password(Value: String): iModelConexaoParametros; begin Result := Self; FPassword := Value; end; function TModelConexaoZeos.Porta(Value: Integer): iModelConexaoParametros; begin Result := Self; FPorta := Value; end; function TModelConexaoZeos.Server(Value: String): iModelConexaoParametros; begin Result := Self; FServer := Value; end; function TModelConexaoZeos.UserName(Value: String): iModelConexaoParametros; begin Result := Self; FUserName := Value; end; end.
20.589928
76
0.761705
6ac5c0e72a350bc60d97f065a1e84bbd8408d2fc
2,728
dpr
Pascal
Components/Innerfuse Pascal Script/help/sample3.dpr
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/Innerfuse Pascal Script/help/sample3.dpr
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/Innerfuse Pascal Script/help/sample3.dpr
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
1
2019-12-24T08:39:18.000Z
2019-12-24T08:39:18.000Z
program sample3; uses ifpscomp, ifps3, ifpidll2, ifpidll2runtime ; function ScriptOnUses(Sender: TIFPSPascalCompiler; const Name: string): Boolean; { the OnUses callback function is called for each "uses" in the script. It's always called with the parameter 'SYSTEM' at the top of the script. For example: uses ii1, ii2; This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'. } begin if Name = 'SYSTEM' then begin Sender.OnExternalProc := @DllExternalProc; { Assign the dll library to the script engine. This function can be found in the ifpidll2.pas file. When you have assigned this, it's possible to do this in the script: Function FindWindow(c1, c2: PChar): Cardinal; external 'FindWindow@user32.dll stdcall'; The syntax for the external string is 'functionname@dllname callingconvention'. } Result := True; end else Result := False; end; procedure ExecuteScript(const Script: string); var Compiler: TIFPSPascalCompiler; { TIFPSPascalCompiler is the compiler part of the scriptengine. This will translate a Pascal script into a compiled for the executer understands. } Exec: TIFPSExec; { TIFPSExec is the executer part of the scriptengine. It uses the output of the compiler to run a script. } Data: string; begin Compiler := TIFPSPascalCompiler.Create; // create an instance of the compiler. Compiler.OnUses := ScriptOnUses; // assign the OnUses event. if not Compiler.Compile(Script) then // Compile the Pascal script into bytecode. begin Compiler.Free; // You could raise an exception here. Exit; end; Compiler.GetOutput(Data); // Save the output of the compiler in the string Data. Compiler.Free; // After compiling the script, there is no need for the compiler anymore. Exec := TIFPSExec.Create; // Create an instance of the executer. RegisterDLLRuntime(Exec); { Register the DLL runtime library. This can be found in the ifpidll2runtime.pas file.} if not Exec.LoadData(Data) then // Load the data from the Data string. begin { For some reason the script could not be loaded. This is usually the case when a library that has been used at compile time isn't registered at runtime. } Exec.Free; // You could raise an exception here. Exit; end; Exec.RunScript; // Run the script. Exec.Free; // Free the executer. end; const Script = 'function MessageBox(hWnd: Longint; lpText, lpCaption: PChar; uType: Longint): Longint; external ''MessageBoxA@user32.dll stdcall'';'#13#10 + 'var s: string; begin s := ''Test''; MessageBox(0, s, ''Caption Here!'', 0);end.'; begin ExecuteScript(Script); end.
32.47619
145
0.708578
f16bfb8450ae5d4b434be4ce6303a39fd54426f5
116
pas
Pascal
Test/FailureScripts/func_ptr_var_param.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
79
2015-03-18T10:46:13.000Z
2022-03-17T18:05:11.000Z
Test/FailureScripts/func_ptr_var_param.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
6
2016-03-29T14:39:00.000Z
2020-09-14T10:04:14.000Z
Test/FailureScripts/func_ptr_var_param.pas
skolkman/dwscript
b9f99d4b8187defac3f3713e2ae0f7b83b63d516
[ "Condor-1.1" ]
25
2016-05-04T13:11:38.000Z
2021-09-29T13:34:31.000Z
Type TProc = Procedure; Procedure Test(Var AProc : TProc); Begin End; Var p : TProc; Test(p); Test(p());
11.6
35
0.612069
8336f9464fddd14515ba3d263a0ba391ebfc7d4b
6,054
pas
Pascal
Components/JVCL/run/JvBDESecurity.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/run/JvBDESecurity.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/JVCL/run/JvBDESecurity.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: JvDBSecur.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. Contributor(s): Hofi Last Modified: 2004-10-07 Changes: 2004-10-07: * Added TJvCustomLogin property Caption to support a custom dialog Caption. 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: JvBDESecurity.pas,v 1.15 2005/02/17 10:19:59 marquardt Exp $ unit JvBDESecurity; {$I jvcl.inc} interface uses {$IFDEF UNITVERSIONING} JclUnitVersioning, {$ENDIF UNITVERSIONING} SysUtils, Classes, DBTables, JvLoginForm, JvBDELoginDialog, JvBDECheckPasswordForm; type TCheckUserEvent = function(UsersTable: TTable; const Password: string): Boolean of object; TJvDBSecurity = class(TJvCustomLogin) private FDatabase: TDatabase; FUsersTableName: TFileName; FLoginNameField: string; FSelectAlias: Boolean; FOnCheckUser: TCheckUserEvent; FOnChangePassword: TChangePasswordEvent; FOnLoginFailure: TJvDBLoginEvent; procedure SetDatabase(Value: TDatabase); procedure SetUsersTableName(const Value: TFileName); function GetLoginNameField: string; procedure SetLoginNameField(const Value: string); protected function DoCheckUser(UsersTable: TTable; const UserName, Password: string): Boolean; dynamic; function DoLogin(var UserName: string): Boolean; override; procedure Loaded; override; procedure Notification(AComponent: TComponent; Operation: TOperation); override; public constructor Create(AOwner: TComponent); override; function ChangePassword: Boolean; published property Database: TDatabase read FDatabase write SetDatabase; property LoginNameField: string read GetLoginNameField write SetLoginNameField; property SelectAlias: Boolean read FSelectAlias write FSelectAlias default False; property UsersTableName: TFileName read FUsersTableName write SetUsersTableName; property Active; property AllowEmptyPassword; property AppStorage; property AppStoragePath; property AttemptNumber; property Caption; property MaxPasswordLen; property UpdateCaption; property OnCheckUser: TCheckUserEvent read FOnCheckUser write FOnCheckUser; property OnChangePassword: TChangePasswordEvent read FOnChangePassword write FOnChangePassword; property AfterLogin; property BeforeLogin; property OnUnlock; property OnUnlockApp; property OnIconDblClick; property OnLoginFailure: TJvDBLoginEvent read FOnLoginFailure write FOnLoginFailure; end; {$IFDEF UNITVERSIONING} const UnitVersioning: TUnitVersionInfo = ( RCSfile: '$RCSfile: JvBDESecurity.pas,v $'; Revision: '$Revision: 1.15 $'; Date: '$Date: 2005/02/17 10:19:59 $'; LogPath: 'JVCL\run' ); {$ENDIF UNITVERSIONING} implementation constructor TJvDBSecurity.Create(AOwner: TComponent); begin inherited Create(AOwner); FSelectAlias := False; FLoginNameField := ''; end; procedure TJvDBSecurity.Notification(AComponent: TComponent; Operation: TOperation); begin inherited Notification(AComponent, Operation); if (Operation = opRemove) and (AComponent = Database) then Database := nil; end; procedure TJvDBSecurity.Loaded; begin inherited Loaded; if not (csDesigning in ComponentState) and Active and (Database <> nil) then begin Database.LoginPrompt := True; if not Login then TerminateApplication; end; end; procedure TJvDBSecurity.SetDatabase(Value: TDatabase); begin if FDatabase <> Value then begin FDatabase := Value; if Value <> nil then Value.FreeNotification(Self); end; end; procedure TJvDBSecurity.SetUsersTableName(const Value: TFileName); begin if FUsersTableName <> Value then FUsersTableName := Value; end; function TJvDBSecurity.GetLoginNameField: string; begin Result := FLoginNameField; end; procedure TJvDBSecurity.SetLoginNameField(const Value: string); begin FLoginNameField := Value; end; function TJvDBSecurity.DoCheckUser(UsersTable: TTable; const UserName, Password: string): Boolean; var SaveLoggedUser: string; begin if Assigned(FOnCheckUser) then begin SaveLoggedUser := LoggedUser; try SetLoggedUser(UserName); Result := FOnCheckUser(UsersTable, Password); finally SetLoggedUser(SaveLoggedUser); end; end else Result := True; end; function TJvDBSecurity.DoLogin(var UserName: string): Boolean; var IconClick: TNotifyEvent; begin IconClick := OnIconDblClick; if Assigned(IconClick) then IconClick := DoIconDblClick; Result := LoginDialog(Database, AttemptNumber, UsersTableName, LoginNameField, MaxPasswordLen, DoCheckUser, IconClick, UserName, AppStorage, AppStoragePath, SelectAlias,FOnLoginFailure ); end; function TJvDBSecurity.ChangePassword: Boolean; begin Result := ChangePasswordDialog(Database, AttemptNumber, UsersTableName, LoginNameField, LoggedUser, MaxPasswordLen, AllowEmptyPassword, FOnChangePassword); end; {$IFDEF UNITVERSIONING} initialization RegisterUnitVersion(HInstance, UnitVersioning); finalization UnregisterUnitVersion(HInstance); {$ENDIF UNITVERSIONING} end.
28.828571
97
0.743641
83a30704399b4f154d26af317d86c7aec2e8b87c
2,261
pas
Pascal
src/migration.core/model.init.pas
Valdeirsk8/migrationFirebird
fd5071f93d197d0fc52e8a7602237309ec01b8d8
[ "MIT" ]
1
2020-09-10T14:49:25.000Z
2020-09-10T14:49:25.000Z
src/migration.core/model.init.pas
Valdeirsk8/migrationFirebird
fd5071f93d197d0fc52e8a7602237309ec01b8d8
[ "MIT" ]
null
null
null
src/migration.core/model.init.pas
Valdeirsk8/migrationFirebird
fd5071f93d197d0fc52e8a7602237309ec01b8d8
[ "MIT" ]
2
2021-02-04T21:40:08.000Z
2021-03-04T06:36:41.000Z
unit model.init; interface uses System.Classes, System.SysUtils, System.IoUtils, Common.Types, JsonDataObjects; type TInit = class private FDataBase: String; FPort: Integer; FuserName: string; FPassword: string; FcharSet: string; FServer: String; public property DataBase: String read FDataBase write FDataBase; property Server: String read FServer write FServer; property Port: Integer read FPort write FPort; property userName: string read FuserName write FuserName; property Password: string read FPassword write FPassword; property charSet: string read FcharSet write FcharSet; function LoadFromFile(aFileName:String = ''): TInit; function SaveToFile(aFileName:String): Tinit; class function new():Tinit; end; implementation { TInit } function TInit.LoadFromFile(aFileName: String):TInit; var aJson :TJsonObject; begin Result := Self; aJson := TJsonObject.Create(); try if aFileName.isEmpty then begin var ArrayOfFiles : TArray<String> := TDirectory.GetFiles(GetCurrentDir, TFindFileExpression.ConfigMigration); if Length(ArrayOfFiles) > 0 then aFileName := ArrayOfFiles[0]; end; if aFileName.isEmpty then raise EFilerError.CreateFMT('[TInit][LoadFromFile] ' + msgFileNotFoundByExt, [TMigrationFileExt.ConfigMigration]); aJson.LoadFromFile(aFileName); self.DataBase := aJson.Values['database'].Value; self.Server := aJson.Values['server'].Value; self.Port := aJson.Values['port'].IntValue; self.userName := aJson.Values['username'].Value; self.Password := aJson.Values['password'].Value; self.charSet := aJson.Values['charset'].Value; finally aJson.Free; end; end; class function TInit.new: Tinit; begin Result := TInit.Create(); end; function TInit.SaveToFile(aFileName: String):TInit; var aJson : TJsonObject; begin Result := Self; aJson := TJsonObject.Create(); try aJson.S['database'] := EmptyStr; aJson.s['server'] := EmptyStr; aJson.i['port'] := 3050; aJson.S['username'] := EmptyStr; aJson.S['password'] := EmptyStr; aJson.S['charset'] := EmptyStr; aJson.SaveToFile(aFileName, False); finally aJson.Free; end; end; end.
23.309278
121
0.693498
83f93786ba663343e992633cc3fe8c776a12f917
274
pas
Pascal
protoc-gen-delphi.tests/test-vectors/known-protoc-outputs/empty_schema.protoc-output/uEmptySchema.pas
connor-work/protoc-gen-delphi
0cc17fefa769b47c7d802ebb69e694160ff63d7a
[ "Apache-2.0" ]
1
2021-01-08T01:47:56.000Z
2021-01-08T01:47:56.000Z
protoc-gen-delphi.tests/test-vectors/known-protoc-outputs/empty_schema.protoc-output/uEmptySchema.pas
connor-work/protoc-gen-delphi
0cc17fefa769b47c7d802ebb69e694160ff63d7a
[ "Apache-2.0" ]
54
2020-09-03T13:22:42.000Z
2021-11-14T11:19:22.000Z
protoc-gen-delphi.tests/test-vectors/known-protoc-outputs/empty_schema.protoc-output/uEmptySchema.pas
connor-work/protoc-gen-delphi
0cc17fefa769b47c7d802ebb69e694160ff63d7a
[ "Apache-2.0" ]
3
2020-08-27T07:56:29.000Z
2021-01-08T01:47:59.000Z
/// <remarks> /// This unit corresponds to the protobuf schema definition (.proto file) <c>empty_schema.proto</c>. /// </remarks> unit uEmptySchema; {$INCLUDE Work.Connor.Delphi.CompilerFeatures.inc} {$IFDEF FPC} {$MODE DELPHI} {$ENDIF} interface implementation end.
16.117647
100
0.718978
851c48458431113aa676d3bca06d66ba7e42a869
336,360
dfm
Pascal
Delphi/Unit11.dfm
adityapramudit8/Drakuli
56b9676838f7532760993811e330e88b04c6dc5b
[ "MIT" ]
null
null
null
Delphi/Unit11.dfm
adityapramudit8/Drakuli
56b9676838f7532760993811e330e88b04c6dc5b
[ "MIT" ]
null
null
null
Delphi/Unit11.dfm
adityapramudit8/Drakuli
56b9676838f7532760993811e330e88b04c6dc5b
[ "MIT" ]
null
null
null
object MengirimBarang: TMengirimBarang Left = 202 Top = 139 Width = 1295 Height = 621 Caption = 'MengirimBarang' 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 object dxRibbon1: TdxRibbon Left = 0 Top = 0 Width = 1287 Height = 126 BarManager = dxBarManager1 ColorSchemeName = 'Black' Contexts = <> TabOrder = 0 TabStop = False object dxRibbon1Tab1: TdxRibbonTab Active = True Caption = 'Home' Groups = < item ToolbarName = 'dxBarManager1Bar1' end item ToolbarName = 'dxBarManager1Bar2' end item ToolbarName = 'dxBarManager1Bar3' end item ToolbarName = 'dxBarManager1Bar4' end item ToolbarName = 'dxBarManager1Bar5' end item ToolbarName = 'dxBarManager1Bar6' end item ToolbarName = 'dxBarManager1Bar7' end item ToolbarName = 'dxBarManager1Bar8' end item ToolbarName = 'dxBarManager1Bar9' end item ToolbarName = 'dxBarManager1Bar10' end item ToolbarName = 'dxBarManager1Bar11' end item ToolbarName = 'dxBarManager1Bar12' end item ToolbarName = 'dxBarManager1Bar13' end item ToolbarName = 'dxBarManager1Bar14' end item ToolbarName = 'dxBarManager1Bar15' end> Index = 0 end end object GroupBox1: TGroupBox Left = 16 Top = 160 Width = 329 Height = 201 Caption = 'DATA PENGIRIMAN PRODUK' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Segoe UI' Font.Style = [fsBold] ParentFont = False TabOrder = 1 object Label1: TLabel Left = 16 Top = 40 Width = 41 Height = 13 Caption = 'ID JASA' end object Label2: TLabel Left = 16 Top = 64 Width = 59 Height = 13 Caption = 'ID PRODUK' end object Label3: TLabel Left = 16 Top = 88 Width = 126 Height = 13 Caption = 'TANGGAL PENGIRIMAN' end object Label4: TLabel Left = 16 Top = 112 Width = 97 Height = 13 Caption = 'TANGGAL SAMPAI' end object Label5: TLabel Left = 16 Top = 136 Width = 78 Height = 13 Caption = 'LAMA SAMPAI' end object DBEdit2: TDBEdit Left = 176 Top = 56 Width = 121 Height = 21 DataField = 'ID_PRODUK' DataSource = DataModule1.DataSource10 TabOrder = 0 end object DBEdit5: TDBEdit Left = 176 Top = 128 Width = 121 Height = 21 DataField = 'LAMA_SAMPAI' DataSource = DataModule1.DataSource10 TabOrder = 1 end object DBEdit3: TDBEdit Left = 176 Top = 80 Width = 121 Height = 21 DataField = 'TANGGAL_PENGIRIMAN' DataSource = DataModule1.DataSource10 TabOrder = 2 end object DBEdit4: TDBEdit Left = 176 Top = 104 Width = 121 Height = 21 DataField = 'TANGGAL_SAMPAI' DataSource = DataModule1.DataSource10 TabOrder = 3 end object DBComboBox1: TDBComboBox Left = 176 Top = 32 Width = 121 Height = 21 DataField = 'ID_JASA' DataSource = DataModule1.DataSource10 ItemHeight = 13 TabOrder = 4 end end object DBGrid1: TDBGrid Left = 40 Top = 384 Width = 561 Height = 120 DataSource = DataModule1.DataSource10 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Segoe UI' Font.Style = [fsBold] ParentFont = False TabOrder = 2 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [] end object DBNavigator1: TDBNavigator Left = 40 Top = 512 Width = 400 Height = 25 DataSource = DataModule1.DataSource10 TabOrder = 3 end object GroupBox2: TGroupBox Left = 352 Top = 160 Width = 329 Height = 201 Caption = 'EDIT DATA PENGIRIMAN PRODUK' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Segoe UI' Font.Style = [fsBold] ParentFont = False TabOrder = 4 object Label6: TLabel Left = 16 Top = 32 Width = 41 Height = 13 Caption = 'ID JASA' end object Label7: TLabel Left = 16 Top = 56 Width = 59 Height = 13 Caption = 'ID PRODUK' end object Label8: TLabel Left = 16 Top = 80 Width = 126 Height = 13 Caption = 'TANGGAL PENGIRIMAN' end object Label9: TLabel Left = 16 Top = 104 Width = 97 Height = 13 Caption = 'TANGGAL SAMPAI' end object Label10: TLabel Left = 16 Top = 128 Width = 78 Height = 13 Caption = 'LAMA SAMPAI' end object Button2: TButton Left = 24 Top = 160 Width = 75 Height = 25 Caption = 'Add' TabOrder = 0 OnClick = Button2Click end object Button3: TButton Left = 120 Top = 160 Width = 75 Height = 25 Caption = 'Delete' TabOrder = 1 OnClick = Button3Click end object Button4: TButton Left = 208 Top = 160 Width = 75 Height = 25 Caption = 'Update' TabOrder = 2 OnClick = Button4Click end object Edit6: TEdit Left = 168 Top = 24 Width = 121 Height = 21 TabOrder = 3 end object Edit7: TEdit Left = 168 Top = 48 Width = 121 Height = 21 TabOrder = 4 end object Edit8: TEdit Left = 168 Top = 72 Width = 121 Height = 21 TabOrder = 5 end object Edit9: TEdit Left = 168 Top = 96 Width = 121 Height = 21 TabOrder = 6 end object Edit10: TEdit Left = 168 Top = 120 Width = 121 Height = 21 TabOrder = 7 end end object GroupBox3: TGroupBox Left = 696 Top = 160 Width = 329 Height = 201 Caption = 'MENCARI DATA PENGIRIMAN PRODUK' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Segoe UI' Font.Style = [fsBold] ParentFont = False TabOrder = 9 object CheckBox1: TCheckBox Left = 8 Top = 32 Width = 97 Height = 17 Caption = 'ID JASA' TabOrder = 0 end object CheckBox2: TCheckBox Left = 8 Top = 56 Width = 97 Height = 17 Caption = 'ID PRODUK' TabOrder = 1 end object CheckBox3: TCheckBox Left = 8 Top = 80 Width = 153 Height = 17 Caption = 'TANGGAL PENGIRIMAN' TabOrder = 2 end object CheckBox4: TCheckBox Left = 8 Top = 104 Width = 121 Height = 17 Caption = 'TANGGAL SAMPAI' TabOrder = 3 end object CheckBox5: TCheckBox Left = 8 Top = 128 Width = 113 Height = 17 Caption = 'LAMA SAMPAI' TabOrder = 4 end object Button1: TButton Left = 208 Top = 152 Width = 75 Height = 25 Caption = 'Search' TabOrder = 5 OnClick = Button1Click end object Edit1: TEdit Left = 176 Top = 24 Width = 121 Height = 21 TabOrder = 6 end object Edit2: TEdit Left = 176 Top = 48 Width = 121 Height = 21 TabOrder = 7 end object Edit3: TEdit Left = 176 Top = 72 Width = 121 Height = 21 TabOrder = 8 end object Edit4: TEdit Left = 176 Top = 96 Width = 121 Height = 21 TabOrder = 9 end object Edit5: TEdit Left = 176 Top = 120 Width = 121 Height = 21 TabOrder = 10 end end object dxBarManager1: TdxBarManager Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -12 Font.Name = 'Segoe UI' Font.Style = [] Categories.Strings = ( 'Default') Categories.ItemsVisibles = ( 2) Categories.Visibles = ( True) PopupMenuLinks = <> UseSystemFont = True Left = 8 Top = 384 DockControlHeights = ( 0 0 0 0) object dxBarManager1Bar1: TdxBar Caption = 'Home' CaptionButtons = <> DockedLeft = 0 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton1' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar2: TdxBar Caption = 'User' CaptionButtons = <> DockedLeft = 67 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton2' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar3: TdxBar Caption = 'Profile' CaptionButtons = <> DockedLeft = 134 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton3' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar4: TdxBar Caption = 'Produk' CaptionButtons = <> DockedLeft = 201 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton4' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar5: TdxBar Caption = 'Penjual' CaptionButtons = <> DockedLeft = 268 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton5' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar6: TdxBar Caption = 'Pembeli' CaptionButtons = <> DockedLeft = 335 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton6' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar7: TdxBar Caption = 'Pembelanjaan' CaptionButtons = <> DockedLeft = 403 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton7' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar8: TdxBar Caption = 'Pembelanjaan Produk' CaptionButtons = <> DockedLeft = 503 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton8' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar9: TdxBar Caption = 'Pembayaran' CaptionButtons = <> DockedLeft = 628 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton9' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar10: TdxBar Caption = 'Kategori' CaptionButtons = <> DockedLeft = 719 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton10' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar11: TdxBar Caption = 'Jasa Pengiriman' CaptionButtons = <> DockedLeft = 788 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton11' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar12: TdxBar Caption = 'Mengirim Barang' CaptionButtons = <> DockedLeft = 882 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton12' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar13: TdxBar Caption = 'Pengecekan' CaptionButtons = <> DockedLeft = 983 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton13' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar14: TdxBar Caption = 'Admin' CaptionButtons = <> DockedLeft = 1072 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton14' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarManager1Bar15: TdxBar Caption = 'Admin Pengecekan' CaptionButtons = <> DockedLeft = 1139 DockedTop = 0 FloatLeft = 139 FloatTop = 120 FloatClientWidth = 0 FloatClientHeight = 0 ItemLinks = < item Visible = True ItemName = 'dxBarLargeButton15' end> OneOnRow = False Row = 0 UseOwnFont = False Visible = True WholeRow = False end object dxBarLargeButton1: TdxBarLargeButton Caption = 'Home' Category = 0 Hint = 'Home' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000C5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000C5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000C5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000C5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFC5BEB0FFC5BEB0FFC5BE B0FFC5BEB0FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF7F7661FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FFAEA490FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2 E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FFAEA490FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF7F7661FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE5881EFFE588 1EFFE5881EFFE5881EFFE5881EFFE5881EFFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFFDF2 E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2 E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFFDF2E3FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000DCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8CFFFDCD8 CFFFDCD8CFFF0000000000000000000000000000000000000000000000000000 000000000000000A1010005A90900DA3FCFF0DA3FCFF60B8EAFFCED4D2FFD1D3 C7FF64A37AFF398F5CFF2F8B55FF6FA882FFD1D3C7FFCED4D2FF44B1F0FF0DA3 FCFF00A0FFFF52B5EDFFCED4D2FFD1D3C7FF64A37AFF398F5CFF2F8B55FF6FA8 82FFD1D3C7FFCED4D2FF44B1F0FF0DA3FCFF00A0FFFF52B5EDFFCED4D2FFD1D3 C7FF64A37AFF398F5CFF2F8B55FF6FA882FFD1D3C7FFCED4D2FF60B8EAFF0DA3 FCFF0DA3FCFF005A9090000A1010000000000000000000000000000000000000 000000000000005A909000A0FFFF00A0FFFF00A0FFFF00A0FFFF60B8EAFF64A3 7AFF2F8B55FF2F8B55FF2F8B55FF2F8B55FF6FA882FF44B1F0FF00A0FFFF00A0 FFFF00A0FFFF00A0FFFF52B5EDFF64A37AFF2F8B55FF2F8B55FF2F8B55FF2F8B 55FF6FA882FF44B1F0FF00A0FFFF00A0FFFF00A0FFFF00A0FFFF52B5EDFF64A3 7AFF2F8B55FF2F8B55FF2F8B55FF2F8B55FF6FA882FF60B8EAFF00A0FFFF00A0 FFFF00A0FFFF00A0FFFF005A9090000000000000000000000000000000000000 0000000000000096F0F000A0FFFF00A0FFFF00A0FFFF00A0FFFF0DA3FCFF2F8B 55FF2F8B55FF2F8B55FF2F8B55FF2F8B55FF398F5CFF00A0FFFF00A0FFFF00A0 FFFF00A0FFFF00A0FFFF0DA3FCFF2F8B55FF2F8B55FF2F8B55FF2F8B55FF2F8B 55FF398F5CFF00A0FFFF00A0FFFF00A0FFFF00A0FFFF00A0FFFF0DA3FCFF2F8B 55FF2F8B55FF2F8B55FF2F8B55FF2F8B55FF398F5CFF0DA3FCFF00A0FFFF00A0 FFFF00A0FFFF00A0FFFF0096F0F0000000000000000000000000000000000000 00000000000005A8E2E207C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF37B0 87FF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF36AE87FD07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF05AFEDED000000000000000000000000000000000000 0000000000000355707007C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF23A5 9DED42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF06B0EEF107C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF06AEEAEE42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF21A39CE907C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF03557070000000000000000000000000000000000000 000000000000000C101007C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0D94 B2C742B37CFF42B37CFF42B37CFF42B37CFF42B37CFF089ECBD307C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF089ECBD342B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF0D94B2C707C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF000C1010000000000000000000000000000000000000 000000000000000000000485B0B007C1FFFF07C1FFFF07C1FFFF07C1FFFF07AB E1E442B37CFF42B37CFF42B37CFF42B37CFF42B37CFF138E9FC007C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF138E9FC042B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF07ABE1E407C1FFFF07C1FFFF07C1 FFFF07C1FFFF0485B0B000000000000000000000000000000000000000000000 00000000000000000000023D505007C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF32A17EE442B37CFF42B37CFF42B37CFF42B37CFF138E9FC007C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF138E9FC042B3 7CFF42B37CFF42B37CFF42B37CFF31A07EE307C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF023D505000000000000000000000000000000000000000000000 000000000000000000000000000006B5F0F007C1FFFF07C1FFFF07C1FFFF07C1 FFFF1B8F90C442B37CFF42B37CFF42B37CFF42B37CFF259585D007C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF259585D042B3 7CFF42B37CFF42B37CFF42B37CFF1B8F90C407C1FFFF07C1FFFF07C1FFFF07C1 FFFF06B4EFEF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000036D909007C1FFFF07C1FFFF07C1FFFF07C1 FFFF0D92B1C442B37CFF42B37CFF42B37CFF42B37CFF259585D007C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF259585D042B3 7CFF42B37CFF42B37CFF42B37CFF0D92B1C407C1FFFF07C1FFFF07C1FFFF07C1 FFFF036D90900000000000000000000000000000000000000000000000000000 00000000000000000000000000000124303007C1FFFF07C1FFFF07C1FFFF07C1 FFFF07ABE1E442B37CFF42B37CFF42B37CFF42B37CFF42B37CFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF07ABE1E407C1FFFF07C1FFFF07C1FFFF07C1 FFFF012430300000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000042B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000042B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000042B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000399C6CDF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF399C 6CDF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000102D1F40399C6CDF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B3 7CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF42B37CFF399C6CDF102D 1F40000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton1Click end object dxBarLargeButton2: TdxBarLargeButton Caption = 'User' Category = 0 Hint = 'User' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000F7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFF000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000F7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFF000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000BA933BC0F7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFBA933BC0000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000008B6E2C90F7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFF8B6E2C90000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000004E3D1850F7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFF3E311440000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000D9AB 45E0F7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFD8AA45DF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000005D49 1D60F7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFF5D491D6000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000BA933BC0F7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFEBB545FFA78135FF8C6525FF9B5701FF9B5701FF8C65 25FFA78135FFEBB545FFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFF7C34FFFA98636AF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000100C0510C89E40CFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFC38622FF9B5701FF9B5701FF9B5701FF9B5701FF9B5701FF9B57 01FF9B5701FF9B5701FFC38622FFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFF7C34FFFC89E40CF100C05100000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000100C0510C89E40CFF7C34FFFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFC38622FF9B5701FF9B5701FF6A6B50FF3084B0FF0098FFFF0098FFFF3183 AFFF6A6B50FF9B5701FF9B5701FFC38622FFF7C34FFFF7C34FFFF7C34FFFF7C3 4FFFF7C34FFFC89E40CF100C0510000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000100C05108A6D2C8FF7C34FFFF7C34FFFF7C34FFFE0A8 3BFF9B5701FF9B5701FF3A7F9FFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF3A7F9FFF9B5701FF9B5701FFE0A83BFFF7C34FFFF7C34FFFF7C3 4FFF8A6D2C8F100C051000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003E311440B9923BBFF7C34FFFB878 18FF9B5701FF736A44FA0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF746A44FB9B5701FFB87818FFF7C34FFFB9923BBF3E31 1440000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F250F309A63 12DBA26108FB1D8BCFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF1D8BCFFFA26108FB9B6718CF2F250F30000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF13A0FFFF30ACFFFF3EB1FFFF4DB7FFFF4DB7FFFF3EB1 FFFF30ACFFFF13A0FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000E2330303AAFFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF3AAFFFFF0E2330300000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000E23 303048ACF0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F00E23303000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000E23303048AC F0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F00E233030000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000003A89C0C04DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3A89C0C0000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000132E40404DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF132E40400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003073A0A04DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3073A0A00000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003E95D0D04DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E95D0D00000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000092A40402192E0E04DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2192 E0E0092A40400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000239DF0F026A7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225B90FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225B90FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7 FFFF2192E0E00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002192E0E026A7FFFF456D88FF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225C91FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225C91FF4DB7FFFF4DB7FFFF4DB7FFFF456D88FF26A7 FFFF2192DFDF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000092A4040375A72F5424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF355F 7CF3092A40400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003A3A3AE0424242FF435059FF4675 94FF4AA0DBFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF498BB8FF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000313131C0424242FF424242FF4242 42FF424242FF435059FF467594FF4AA0DBFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF498BB8FF424242FF424242FF3131 31C0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000021212180424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF435059FF467594FF4AA0DBFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF498BB8FF424242FF424242FF424242FF2929 29A0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000C0C0C30424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4350 59FF467594FF4AA0DBFF498BB8FF424242FF424242FF424242FF424242FF1919 1960000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000313131C0424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF393939DF0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000C0C0C30424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF101010400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000212121804242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF3D3D3DEF19191960000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000002121 2180424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF393939DF2525258F0404041000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000014141450393939DF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF313131BF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000040404101818185F2D2D2DAF353535CF424242FF424242FF4242 42FF424242FF1010104000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton2Click end object dxBarLargeButton3: TdxBarLargeButton Caption = 'User Profile' Category = 0 Hint = 'User Profile' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000013162157292F45C02F37 50EF303651FB2E344EFF2E344EFF2E344EFF2E344EFF2F354FF72F3750EF292F 45C01A1E2D7C07080D1F00000000000000000000000000000000000000000000 0000000000000000000007080D1F1D223287292F45C02F3750EF2F3750EF2E34 4EFF2E344EFF2E344EFF2E344EFF313852F9303751EB282E44B810141E4A0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000131621572F3750EF2E344EFF2E344EFF333A 56FF363E5BFF3B4564FF3B4564FF3B4564FF3B4564FF343C58FF333A56FF2E34 4EFF2E344EFF2E344EFF2D334CE1151924640000000000000000000000000000 0000191D2A702D344DDB2E344EFF2E344EFF2E344EFF313853FF343C58FF3B45 64FF3B4564FF3B4564FF3B4564FF363E5BFF343C58FF2E344EFF2E344EFF2F37 50EF0F121B3D0000000000000000000000000000000000000000000000000000 000000000000000000000D0F173C2F3550FE2E344EFF3B4564FF475376FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF404B6CFF37405DFF303551FF2E344EFF2D344DE707080D1F07080D1F2D34 4DDB2E344EFF2E344EFF37405DFF404B6CFF475376FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF475376FF3D4667FF3035 51FF2F3550FE0B0C132E00000000000000000000000000000000000000000000 000000000000000000002E354FE62E344EFF3E4869FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF475376FF3B4564FF2E344EFF303751F6303751F62E34 4EFF363E5BFF445074FF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF414D 6EFF2E344EFF2E3650E100000000000000000000000000000000000000000000 000000000000000000002F3550FE313853FF1F25346F0405081000000000090A 0F201B1F2D5F3F4A69DF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF414D6EFF303551FF2E344EFF3E48 69FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF3F4A69DF1B1F2D5F0405081000000000040508102D35 4B9F343C58FF303752FD00000000000000000000000000000000000000000000 000000000000000000002E344EFF2D334DF30000000000000000000000000000 000000000000000000002D354B9F485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF3B4463FF363E5BFF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF1F25346F00000000000000000000000000000000000000000000 0000303852F3303551FF00000000000000000000000000000000000000000000 000000000000000000002E354FE62E344EFF0303051000000000000000000000 00000000000000000000000000002D354B9F485579FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF475376FF414D6EFF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF1F2535700000000000000000000000000000000000000000000000000000 0000303751F62E354FE600000000000000000000000000000000000000000000 0000000000000000000007080D1F2D344DDB262B40BA05060A20000000000000 0000000000000000000000000000040508103A4562CF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF475376FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF313A 53AF00000000000000000000000000000000000000000000000007080D1F282E 45CA2E354FE607080D1F00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000D101730485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF434F71EF0405 0810000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001B202D60485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF485579FF485579FF4855 79FF485579FF485579FF485579FF485579FF485579FF434F71EF0D1017300000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001B202D604855 79FF485579FF485579FF485579FF485579FF485579FF434F71EF485579FF4855 79FF485579FF485579FF485579FF485579FF434F71EF161A2650000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000090A 0F202D354B9F3A4562CF485579FF3F4A69DF2D354B9F090A0F2012151E40313A 53AF485579FF485579FF363F5ABF242A3C7F090A0F2000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000151300204942 00707D7100C0A79700FFA79700FFA79700FFA79700FF887B00D0695E00A02A26 0040000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000015130020494200707D7100C0A79700FFA797 00FFA79700FFA79700FF887B00D0695E00A02A26004000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000049420070A79700FFA797 00FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FF887B00D01F1C003000000000000000000000000000000000000000000000 0000000000000000000049420070A79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFA79700FFA79700FFA79700FF887B00D01F1C00300000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000049420070A79700FFA79700FFC6B1 46FFE6CC8DFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFE6CC8DFFCBB552FFAC9B 0CFFA79700FFA79700FF1F1C0030000000000000000000000000000000000000 00000000000049420070A79700FFA79700FFC6B146FFE6CC8DFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFE6CC8DFFCBB552FFAC9B0CFFA79700FFA79700FF1F1C 0030000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000015130020A79700FFA79700FFE6CD8CFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFF6DA AFFFC0AC3AFFA79700FF9D8E00F00B0A00100000000000000000000000000000 000015130020A79700FFA79700FFE6CD8CFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFF6DAAFFFC0AC3AFFA79700FF9D8E 00F00B0A00100000000000000000000000000000000000000000000000000000 0000000000000000000000000000544C0080A79700FFD1BA5DFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFB6A423FFA79700FF5E5500900000000000000000000000000000 0000544C0080A79700FFD1BA5DFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFB6A423FFA797 00FF5E5500900000000000000000000000000000000000000000000000000000 00000000000000000000000000007D7100C0A79700FFEBD098FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFE1C881FFA79700FF9D8E00F00000000000000000000000000000 00007D7100C0A79700FFEBD098FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFE1C881FFA797 00FF9D8E00F00000000000000000000000000000000000000000000000000000 0000000000000000000000000000887B00D0A79700FFFBDEBBFFFBDEBBFFFEF7 EEFFFEF7EEFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFA79700FFA79700FF0000000000000000000000000000 0000887B00D0A79700FFFBDEBBFFFBDEBBFFFEF7EEFFFEF7EEFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFA797 00FFA79700FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000A79700FFA79700FFFBDEBBFFFBDEBBFFFFFD FBFFFFFFFFFFFDECD9FFFBE0BFFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFA79700FFA79700FF0000000000000000000000000000 0000928400DFA79700FFFBDEBBFFFBDEBBFFFFFDFBFFFFFFFFFFFDECD9FFFBE0 BFFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFA797 00FFA79700FF0000000000000000000000000000000000000000000000000000 00000000000000000000342F0050A79700FFA79700FFFBDEBBFFFBDEBBFFFDF1 E1FFFFFFFFFFFFFFFFFFFFFFFFFFFEF7EEFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFA79700FFA79700FF342F005000000000000000001F1C 0030928400E0A79700FFFBDEBBFFFBDEBBFFFDF1E1FFFFFFFFFFFFFFFFFFFFFF FFFFFEF7EEFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFA797 00FFA79700FF544C008000000000000000000000000000000000000000000000 00007D7100C0A79700FFA79700FFA79700FFA79700FFE6CD8CFFFBDEBBFFFBDE BBFFFDEFDDFFFFF9F2FFFFFFFFFFFEF7EEFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFE6CD8CFFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFE1C881FFFBDEBBFFFBDEBBFFFDEFDDFFFFF9F2FFFFFF FFFFFEF7EEFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFE6CD8CFFA797 00FFA79700FFA79700FFA79700FF928400E00000000000000000000000000000 0000A79700FFA79700FFA79700FFA79700FFA79700FFBBA82EFFF6DAAFFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFC0AD3AFFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFB6A422FFF6DAAFFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFF6DAAFFFBBA82EFFA797 00FFA79700FFA79700FFA79700FFA79700FF0000000000000000000000000000 00007D7100BFA79700FFA79700FFA79700FFA79700FFA79700FFB09F17FFDCC4 75FFE6CD8CFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFEBD098FFD6BF 69FFB09F17FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFA79700FFB09F17FFD6BF69FFE6CD8CFFF6DAAFFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFE6CD8CFFDCC475FFB09F17FFA79700FFA797 00FFA79700FFA79700FFA79700FF7D7100BF0000000000000000000000000000 0000000000002A260040726700AFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFA79700FF7D7100BF342F004F0000000000000000342F 004F726700AFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FFA797 00FFA79700FF7D7100BF342F0050000000000000000000000000000000000000 00000000000000000000000000000B0A0010342F004F534B007F7D7100BF7D71 00BFA79700FFA79700FFA79700FFA79700FFA79700FFA79700FF9C8D00EF7D71 00BF726700AF534B007F15130020000000000000000000000000000000000000 0000000000000B0A00103E38005F534B007F7D7100BF7D7100BF9C8D00EFA797 00FFA79700FFA79700FFA79700FFA79700FF7D7100BF7D7100BF534B007F3E38 005F151300200000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton3Click end object dxBarLargeButton4: TdxBarLargeButton Caption = 'Produk' Category = 0 Hint = 'Produk' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000B0B35402929 B9E02F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2929B9E00B0B3540000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002C2CC6F02F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2929B9E0000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF008FFFFF008FFFFF008FFFFF008F FFFF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000002F3AD5DF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF2F3A D5DF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000D113D402F3AD5DF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF2F3AD5DF0D11 3D40000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000249606007C1FFFF07C1FFFF07C1FFFF04AE FFFF0059A0A00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000249606007C1FFFF07C1FFFF07C1FFFF04AEFFFF008F FFFF008FFFFF0059A0A000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000249606007C1FFFF07C1FFFF07C1FFFF04789F9F00366060008F FFFF008FFFFF008FFFFF0059A0A0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000249606007C1FFFF07C1FFFF07C1FFFF04789F9F00000000000000000036 6060008FFFFF008FFFFF008FFFFF0059A0A00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000249 606007C1FFFF07C1FFFF07C1FFFF04789F9F0000000000000000000000000000 000000366060008FFFFF008FFFFF008FFFFF0059A0A000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000249606007C1 FFFF07C1FFFF07C1FFFF04789F9F000000000000000000000000000000000000 00000000000000366060008FFFFF008FFFFF008FFFFF0059A0A0000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton4Click end object dxBarLargeButton5: TdxBarLargeButton Caption = 'Penjual' Category = 0 Hint = 'Penjual' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000007A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000007A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF6B6158E76B6158E77A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000005B523FC07A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF544F9FF8544F9FF87A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF5B523FC0000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000453E2F907A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF736852F42F2FD3FF2F2FD3FF7368 53F47A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF453E2F90000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000026221A507A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF625B7DEC2F2FD3FF2F2FD3FF625B 7DEC7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF26221A50000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000006B60 49E07A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF8584C8F22F2FD3FF2F2FD3FF8584 C8F27A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF6A6049DF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000002E29 1F607A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF6D6553C9B0B0EEFF2F2FD3FF2F2FD3FFB0B0 EEFF6D6553C97A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF2E291F6000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00005B523FC07A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF9F9B93C9CACAF4FF2F2FD3FF2F2FD3FFCACA F4FF9F9B93C97A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF534B39AF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000008070510635944CF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF6E644DE3FFFFFFFFF2F2FDFF2F2FD3FF2F2FD3FFF2F2 FDFFFFFFFFFF6F644DE47A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF635944CF080705100000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000008070510635944CF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF868176C1FFFFFFFFB0B0EEFF2F2FD3FF2F2FD3FF7C7C E3FFFFFFFFFF868176C17A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF635944CF08070510000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000008070510443D2F8F7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FFE9E8E6F1FFFFFFFFB0B0EEFF2F2FD3FF2F2FD3FF7D7D E3FFFFFFFFFFE9E8E6F17A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF443D2F8F0807051000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000001E1B15405B523FBF7A6E54FF7A6E 54FF7A6E54FF706958C4FFFFFFFFFFFFFFFFFFFFFFFFB0B0EEFF7D7DE3FFFFFF FFFFFFFFFFFFFFFFFFFF706958C47A6E54FF7A6E54FF7A6E54FF5B523FBF1E1B 1540000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000171510304C44 349F6A6049DFB3C3CCECBFE5FFFF7FCBFFFF4FB8FFFF20A5FFFF109EFFFF3FB1 FFFF7FCBFFFFAFDFFFFFA6BBC7E76A6049DF4C44349F17151030000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF13A0FFFF30ACFFFF3EB1FFFF4DB7FFFF4DB7FFFF3EB1 FFFF30ACFFFF13A0FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000E2330303AAFFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF3AAFFFFF0E2330300000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000132E 404048ACF0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F00E23303000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000E23303048AC F0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F00E233030000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000003A89C0C04DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3A89C0C0000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000132E40404DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF132E40400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003073A0A04DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3073A0A00000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003E95D0D04DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E95D0D00000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000C3450501F88D0D04DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2192 E0E00C3450500000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002192E0E026A7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF256299FF256299FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF256299FF256299FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7 FFFF1F88D0D00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002192E0E026A7FFFF456D88FF4DB7FFFF4DB7 FFFF4DB7FFFF256299FF25639AFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF256299FF25639AFF4DB7FFFF4DB7FFFF4DB7FFFF456D88FF26A7 FFFF1E87CFCF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000C34505036576DF0424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF375A 72F50C3450500000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003E3E3EF0424242FF435059FF4675 94FF4AA0DBFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF498BB8FF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000313131C0424242FF424242FF4242 42FF424242FF435059FF467594FF4AA0DBFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF498BB8FF424242FF424242FF3131 31C0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000021212180424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF435059FF467594FF4AA0DBFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF498BB8FF424242FF424242FF424242FF2929 29A0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000C0C0C30424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4350 59FF467594FF4AA0DBFF498BB8FF424242FF424242FF424242FF424242FF1919 1960000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000313131C0424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF393939DF0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000C0C0C30424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF424242FF424242FF101010400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000212121804242 42FF424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF424242FF424242FF3D3D3DEF19191960000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000002525 2590424242FF424242FF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF424242FF393939DF2525258F0404041000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000014141450393939DF424242FF424242FF424242FF424242FF424242FF4242 42FF424242FF313131BF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000040404101818185F2D2D2DAF353535CF424242FF424242FF4242 42FF424242FF1010104000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton5Click end object dxBarLargeButton6: TdxBarLargeButton Caption = 'Pembeli' Category = 0 Hint = 'Pembeli' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000003643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000003643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002832B7C03643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF323DD8E34C53B6C08286BCC8BEBFD4E4F1EFECFFF1EFECFFBEBF D4E48286BCC84C53B6C0323DD8E33643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF2832B7C0000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001E258A903643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF323D D8E37277B8C3F1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EF ECFFF1EFECFFF1EFECFFF1EFECFF7276B8C4333EE4F03643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF1E258A90000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000011154D503643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF434BB9C3D6D6 E0F1F1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFBDBAB3FFBDBAB3FFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFD6D6E0F1434BB9C33643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF11154D50000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000002F3A D6E03643F4FF3643F4FF3643F4FF3643F4FF3643F4FF434BB9C3F1EFECFFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFF635B4DFF635B4DFFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFF434BBAC43643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF2F3AD5DF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001419 5C603643F4FF3643F4FF3643F4FF3643F4FF434BB9C3F1EFECFFF1EFECFFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFF6D6558FF6E6659FFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFF3C45 BFC93643F4FF3643F4FF3643F4FF3643F4FF11154D5000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00002832B7C03643F4FF3643F4FF333EE4F0D6D6E0F1F1EFECFFBDBAB3FFBDBA B3FFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFBDBAB3FFBDBAB3FFF1EFECFFD6D6 E0F1333EE4F03643F4FF3643F4FF252EA7AF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000030410102B36C6CF3643F4FF7276B8C4F1EFECFFF1EFECFF635B4DFF635B 4DFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EF ECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFF635B4DFF635B4DFFF1EFECFFF1EF ECFF7276B8C43643F4FF2B36C6CF030410100000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000030410102E37B0B9F1EFECFFF1EFECFFF1EFECFF6D6558FF6E66 59FFF1EFECFFF1EFECFFF1EFECFFA5D4F2FF4BB3F9FF0098FFFF0098FFFF4CB3 F9FFA5D4F2FFF1EFECFFF1EFECFFF1EFECFF6D6558FF6E6659FFF1EFECFFF1EF ECFFF1EFECFF2E37B1BA03041010000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000100F0F108786848FF1EFECFFF1EFECFFF1EFECFFF1EF ECFFF1EFECFFF1EFECFF5BB9F8FF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF5BB9F8FFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EFECFFF1EF ECFF8786848F100F0F1000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003D3C3B40B4B3B1BFF1EFECFFF1EF ECFFF1EFECFFA5CBE3F00098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFFA6CBE4F1F1EFECFFF1EFECFFF1EFECFFB4B3B1BF3D3C 3B40000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002E2D2D309695 939FD2D1CEDF2EA8FCFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF2EA8FCFFD2D1CEDF8786848F2E2D2D30000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000098FFFF13A0FFFF30ACFFFF3EB1FFFF4DB7FFFF4DB7FFFF3EB1 FFFF30ACFFFF13A0FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000E2330303AAFFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF3AAFFFFF0E2330300000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000E23 303048ACF0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F00E23303000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000E23303048AC F0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F00E233030000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000003A89C0C04DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3A89C0C0000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000132E40404DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF132E40400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003073A0A04DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3073A0A00000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003E95D0D04DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E95D0D00000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000092A40402192E0E04DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2192 E0E0092A40400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000239DF0F026A7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225B90FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225B90FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7 FFFF2192E0E00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002192E0E026A7FFFF456D88FF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225C91FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF225B90FF225C91FF4DB7FFFF4DB7FFFF4DB7FFFF456D88FF26A7 FFFF2192DFDF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000092A4040375A72F5424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF355F 7CF3092A40400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424242FF424242FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF424242FF4242 42FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000082EAEBFF75C4C4FF68A8ACFF5CA0 B5FF5AB8E4FF55C0FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF5CC9FFFF5CC9FFFF65D2FFFF6BC5DCFF7AD0D0FF82EA EBFF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000008DFFFFFF8DFFFFFF8DFFFFFF8DFF FFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFF FFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFF FFFF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000B303F4044D0FCFF56DBFDFF69E7FEFF74EF FEFF80F7FFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFFFFFF8DFF FFFF8DFFFFFF8DFFFFFF86FBFFFF74EFFEFF6EEBFEFF5CDFFDFF4BD3FCFF3ECC FBFF0B303F400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000B303F402DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF39C8FBFF44CFFCFF39C8FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF0B303F400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000011485F602DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF0E3C4F500000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000016607E802DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF16607E800000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000016607E802DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF16607E800000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000001F84ADB02DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF1F84ADB00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002190BDC02DC0FBFF2DC0FBFF2DC0FBFF2190 BCBF0B303F4011485F602DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF2DC0FBFF1C789C9F0B303F402190BCBF2DC0FBFF2DC0FBFF2DC0 FBFF2190BDC00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000249CCCD02DC0FBFF2190BCBF0B303F400000 0000000000000000000011485F602DC0FBFF2DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF2DC0FBFF1C789C9F0000000000000000000000000B303F402190BCBF2DC0 FBFF249CCCD00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002190BDC00B303F4000000000000000000000 000000000000000000000000000011485F602DC0FBFF2DC0FBFF2DC0FBFF2DC0 FBFF1C789C9F0000000000000000000000000000000000000000000000000B30 3F402190BCBF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000011485F602DC0FBFF2DC0FBFF1C78 9C9F000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000011485F601C789C9F0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton6Click end object dxBarLargeButton7: TdxBarLargeButton Caption = 'Pembelanjaan' Category = 0 Hint = 'Pembelanjaan' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001A1A 77902F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF1A1A779000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000011114F602F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF08082830000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001A1A77902F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF17176A80000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000023239FC02F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF202091B0000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF17178DFF17178DFF2F2F D3FF2F2FD3FF17178DFF17178DFF2F2FD3FF2F2FD3FF17178DFF17178DFF2F2F D3FF2F2FD3FF17178DFF17178DFF2F2FD3FF2F2FD3FF17178DFF17178DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2929B9E0000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000080828302F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF03030E100000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000011114F602F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF0B0B35400000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001A1A77902F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF17176A800000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000023239FC02F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF202091B00000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000002C2CC6F02F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2929B9E00000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000006061B202F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF0303 0E10000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000E0E42502F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF0B0B 3540000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000017176A802F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF1717 6A80000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000023239FC02F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2020 91B0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000002C2CC6F02F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2929 B9E0000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000006061B202F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF13137DFF13137DFF2F2FD3FF2F2FD3FF13137DFF13137DFF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF03030E100000000000000000000000000000000000000000000000000000 00000000000000000000000000000E0E42502F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF0B0B35400000000000000000000000000000000000000000000000000000 000000000000000000000000000017176A802F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2FD3FF2F2F D3FF17176A800000000000000000000000000000000000000000000000000000 0000000000000D113D402F3AD6E03643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF2F3AD6E00D113D40000000000000000000000000000000000000 000000000000323FE5F03643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF2F3AD6E0000000000000000000000000000000000000 0000000000003643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF000000000000000000000000000000000000 0000000000003643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF000000000000000000000000000000000000 0000000000002F3AD5DF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF2F3AD5DF000000000000000000000000000000000000 0000000000000D113D402F3AD5DF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643F4FF3643 F4FF3643F4FF2F3AD5DF0D113D40000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000342F24608B7D60FF8B7D60FF8B7D60FF8B7D60FF8B7D60FF342F 2460000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000025221A60645A45FF645A45FF645A 45FF645A45FF645A45FF25221A60000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000342F24608B7D60FF8B7D60FF8B7D60FF8B7D60FF8B7D 60FF342F24600000000000000000000000000000000000000000000000000000 000000000000000000000000000025221A60645A45FF645A45FF645A45FF645A 45FF645A45FF25221A6000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000342F24608B7D60FF8B7D60FF8B7D60FF8B7D 60FF8B7D60FF342F246000000000000000000000000000000000000000000000 0000000000000000000025221A60645A45FF645A45FF645A45FF645A45FF645A 45FF25221A600000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000342F24608B7D60FF8B7D60FF8B7D 60FF8B7D60FF8B7D60FF342F2460000000000000000000000000000000000000 00000000000025221A60645A45FF645A45FF645A45FF645A45FF645A45FF2522 1A60000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000342F24608B7D60FF8B7D 60FF8B7D60FF8B7D60FF8B7D60FF342F24600000000000000000000000000000 000025221A60645A45FF645A45FF645A45FF645A45FF645A45FF25221A600000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000342F24608B7D 60FF8B7D60FF8B7D60FF8B7D60FF8B7D60FF342F246000000000000000002522 1A60645A45FF645A45FF645A45FF645A45FF645A45FF25221A60000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000342F 24608B7D60FF8B7D60FF8B7D60FF8B7D60FF8B7D60FF342F246025221A60645A 45FF645A45FF645A45FF645A45FF645A45FF25221A6000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000342F24608B7D60FF8B7D60FF8B7D60FF8B7D60FF7B7056FF645A45FF645A 45FF645A45FF645A45FF645A45FF25221A600000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000342F24608B7D60FF8B7D60FF7E7157FF645A45FF645A45FF645A 45FF645A45FF645A45FF25221A60000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000342F24608B7D60FF665B46FF645A45FF645A45FF645A 45FF645A45FF25221A6000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000342F2460665B46FF645A45FF645A45FF645A 45FF25221A600000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003933277C665C46FB665C46FB3731 257C000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton7Click end object dxBarLargeButton8: TdxBarLargeButton Caption = 'Shoping Cart' Category = 0 Hint = 'Shoping Cart' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000050403103631 26B04A4233F04F4737FF312C22A0050403100000000000000000000000000000 0000000000000000000000000000000000000000000005040310363126B04A42 33F04F4737FF312C22A005040310000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000363126B04F47 37FF4F4737FF4F4737FF4F4737FF312C22A00000000000000000000000000000 00000000000000000000000000000000000000000000363126B04F4737FF4F47 37FF4F4737FF4F4737FF312C22A0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000004F4737FF4F47 37FF7B6F55FF7B6F55FF4F4737FF4A4233F00000000000000000000000000000 000000000000000000000000000000000000000000004F4737FF4F4737FF7B6F 55FF7B6F55FF4F4737FF4A4233F0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000004F4737FF4F47 37FF7B6F55FF7C6F55FF4F4737FF4A4233EF0000000000000000000000000000 000000000000000000000000000000000000000000004F4737FF4F4737FF7B6F 55FF7C6F55FF4F4737FF4A4233EF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000363126B04F47 37FF4F4737FF4F4737FF4F4737FF312C22A00000000000000000000000000000 00000000000000000000000000000000000000000000363126B04F4737FF4F47 37FF4F4737FF4F4737FF312C22A0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000005040310312C 229F4A4233EF4F4737FF312C229F050403100000000000000000000000000000 0000000000000000000000000000000000000000000005040310312C229F4A42 33EF4F4737FF312C229F05040310000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000333800606F7A00D08896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000090900106F7A00D0889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000006F7A00D0889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000033380060889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000006F7A00D0889600FF889600FF889600FF667000BF1113 0020000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF889600FF889600FF090900100000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF889600FF889600FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF889600FF889600FF000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF899600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF808D00F022260040000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF778300E0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF899600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF333800600000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF879600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF778300E00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF2226004000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000899600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF667100C000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000879600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF1A1C0030000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF555E00A0000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000002B2F0050889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF111300200000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000555E00A0889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF4D5400900000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000808D00F0889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF808D00F00909 0010000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00002B2F0050889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF3C42 0070000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00004D540090889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF7783 00E0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000778300E0889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF333800600000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001A1C 0030889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF6F7A00D00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004D54 0090889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF2226004000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007783 00E0889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF667100C000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001A1C00308896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF889600FF889600FF889600FF889600FF889600FF8896 00FF889600FF889600FF11130020000000000000000000000000000000000000 0000000000001D2100504B5500D0616E00FF7A8800FF889600FF889600FF8896 00FF889600FF889600FF555E00A00000000000000000005FA0A00098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF008DFBFF007CF5FF007CF5FF007C F5FF007CF5FF007CF5FF004D999F000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000505C00E05C6900FF5C6900FF647100FF889600FF889600FF8896 00FF889600FF889600FF22260040000000000000000000000000005FA0A00098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF008DFBFF007CF5FF007CF5FF007CF5FF007C F5FF007CF5FF004D999F00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000505C00E05C6900FF5C6900FF647100FF889600FF889600FF8896 00FF889600FF555D009F0000000000000000000000000000000000000000005F A0A00098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF005F9F9F004D9AA0007CF5FF007CF5FF007CF5FF007C F5FF004D999F0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000001D2100504A5500CF616E00FF7A8800FF889600FF889600FF7783 00DF444B007F0000000000000000000000000000000000000000000000000000 0000005FA0A00098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF005F9F9F0000000000000000004D9AA0007CF5FF007CF5FF004D 999F000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000005FA0A00098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF005F9F9F00000000000000000000000000000000004D9AA0004D999F0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000005FA0A00098FFFF0098FFFF0098FFFF0098FFFF005F 9F9F000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000005FA0A00098FFFF0098FFFF005F9F9F0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000005FA0A0005F9F9F000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton8Click end object dxBarLargeButton9: TdxBarLargeButton Caption = 'Pembayaran' Category = 0 Hint = 'Pembayaran' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000574F3CE0645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF574E3CDF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000025221A60574E3CDF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF574E 3CDF25221A600000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFF5C5142FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF5C5142FFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FF383226FF383226FF383226FF383226FF3832 26FF383226FF383226FF383226FFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFF383226FF383226FF327D2EFF327D2EFF6ABB66FF6ABB66FF6ABB 66FF337F2FFF327D2EFF327D2EFF327D2EFF327D2EFF327D2EFF327D2EFF327D 2EFF327D2EFF327D2EFF327D2EFF33802FFF6ABB66FF6ABB66FF6ABB66FF327D 2EFF327D2EFF383226FF383226FFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFF383226FF383226FF327D2EFF327D2EFF6ABB66FF6ABB66FF6ABB 66FF459441FF327D2EFF327D2EFF327D2EFF327D2EFF327D2EFF327D2EFF327D 2EFF327D2EFF327D2EFF327D2EFF459441FF6ABB66FF6ABB66FF6ABB66FF327D 2EFF327D2EFF383226FF383226FFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFF5C5142FF383226FF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FF4F9B4BFF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF3C8E38FF4F9B4CFFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FF383226FF5D5241FFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FF99CD97FF4F9B4CFF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF4F9B4CFF99CD97FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FF9FD19DFF78B775FF57A053FF3C8E38FF3C8E38FF57A0 53FF78B775FF9FD19DFFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FFFBDEBBFFFBDE BBFFFBDEBBFFFBDEBBFFFBDEBBFF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFFFBDEBBFF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF84BF82FF4F9B4BFF489645FF84BF 82FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000007A6E54FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF489645FF3C8E38FF3C8E38FF4F9B 4BFFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E 54FF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF489645FF3C8E38FF3C8E38FF4F9B 4CFFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF56A053FF8CC4 89FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF84BF82FF4F9B4CFF499746FF84BF 82FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FF84BF82FF56A053FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF71B26EFFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FFA7D6A5FF63A960FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF8CC489FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FF84BF82FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF56A053FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FF56A053FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF3C8E38FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6A5FFA7D6 A5FFA7D6A5FFA7D6A5FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E38FF3C8E 38FF3C8E38FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton9Click end object dxBarLargeButton10: TdxBarLargeButton Caption = 'Kategori' Category = 0 Hint = 'Kategori' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000002640400085E0E00098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0085E0E0002640400000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000008FF0F00098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0085E0E00000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF004675FF004675FF004675FF004675FF004675FF0046 75FF004675FF004675FF004675FF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF004675FF004675FF0098FFFF0098FFFF0098 FFFF004675FF004675FF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF004675FF004675FF0098FFFF0098FFFF0098 FFFF004675FF004675FF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF004675FF004675FF0098FFFF0098FFFF0098 FFFF004675FF004675FF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF005F9FFF004675FF004675FF0060A0FF0098FFFF005F 9FFF004675FF004675FF0060A0FF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0092F6FF004B7DFF004B7DFF0092F6FF0098FFFF0092 F6FF004B7DFF004B7DFF0092F6FF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF007ED4FF007ED4FF0098FFFF0098FFFF0098 FFFF007ED4FF007ED4FF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0098FFFF0000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000000000002EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000000000002EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000000000002EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000000000002EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000000000002EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF0000000000000000000000000000000000000000000000000000 00000000000000000000000000002894DFDF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2894DFDF0000000000000000000000000000000000000000000000000000 00000000000000000000000000000B2B40402894DFDF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAA FFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2EAAFFFF2894 DFDF0B2B40400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton10Click end object dxBarLargeButton11: TdxBarLargeButton Caption = 'Jasa Pengiriman' Category = 0 Hint = 'Jasa Pengiriman' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000014120D403B3529C04A4233F04A4233F03B35 29C014120D400000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000014120D403B3529C04A4233F04A4233F03B3529C01412 0D40000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000027231B804F4737FF4F4737FF4F4737FF4F4737FF4F47 37FF4F4737FF27231B8000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000027231B804F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F47 37FF27231B800000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000014120D404F4737FF4F4737FF59503FFF706652FF756B57FF5950 3FFF4F4737FF4F4737FF14120D40000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000014120D404F4737FF4F4737FF59503FFF706652FF756B57FF59503FFF4F47 37FF4F4737FF14120D4000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000003B3529C04F4737FF59503FFF9C9078FF9C9078FF9C9078FF968B 73FF59503FFF4F4737FF3B3529C0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00003B3529C04F4737FF59503FFF9C9078FF9C9078FF9C9078FF968B73FF5950 3FFF4F4737FF3B3529C000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004A4233F04F4737FF756B57FF9C9078FF9C9078FF9C9078FF9C90 78FF706652FF4F4737FF4A4233F0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00004A4233F04F4737FF756B57FF9C9078FF9C9078FF9C9078FF9C9078FF7066 52FF4F4737FF4A4233F000000000000000000000000000000000000000000000 00000000000000000000000000001A0F13208D5067B0B46682E0CD7595FFCD75 95FFCD7595FF56493CFF4F4737FF706652FF9C9078FF9C9078FF9C9078FF9C90 78FF706652FF4F4737FF57493CFFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF4A4E42FF4F4737FF706652FF9C9078FF9C9078FF9C9078FF9C9078FF7066 52FF4F4737FF4A4E43FF06A9E0E00485B0B00018202000000000000000000000 000000000000000000001A0F1320C06E8CF0CD7595FFCD7595FFCD7595FFCD75 95FFCD7595FF6E524EFF4F4737FF59503FFF9C9078FF9C9078FF9C9078FF978B 73FF59503FFF4F4737FF6E524EFFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF3C6568FF4F4737FF59503FFF9C9078FF9C9078FF9C9078FF978B73FF5950 3FFF4F4737FF3C6568FF07C1FFFF07C1FFFF06B5F0F000182020000000000000 000000000000000000008D5067B0CD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFAD697CFF4F4737FF4F4737FF59503FFF706753FF756B57FF5950 3FFF4F4737FF4F4737FFAD697CFFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF19A2CCFF4F4737FF4F4737FF59503FFF706753FF756B57FF59503FFF4F47 37FF4F4737FF19A2CCFF07C1FFFF07C1FFFF07C1FFFF0485B0B0000000000000 00000000000000000000C06E8CF0CD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF8D5D65FF4F4737FF4F4737FF4F4737FF4F4737FF4F47 37FF4F4737FF8D5D65FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF2A839AFF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F47 37FF2A839AFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF06A9E0E0000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFAD697CFF6F524EFF57493CFF57493CFF6F52 4EFFAD697CFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF19A2CCFF3C6669FF4A4E43FF4A4E43FF3C6669FF19A2 CCFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF299AB9FF645A45FF645A 45FF645A45FF645A45FF526D67FF07C1FFFF07C1FFFF07C1FFFFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF2F93ADFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF526D 67FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF07C1FFFF07C1FFFF07C1FFFF000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF07C1FFFF07C1FFFF036D9090000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF645A45FF3B8696FF07C1FFFF059CCFCF00000000CD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF467A7FFF07C1FFFF06B4EFEF0018202000000000CD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF526D68FF0CB9F3FF07C1FFFF013140400000000000000000000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF5D60 50FF12B3E7FF07C1FFFF03618080000000000000000000000000000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF18AD DCFF07C1FFFF0484AFAF00000000000000000000000000000000000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF526D 67FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF299AB9FF07C1 FFFF06A8DFDF000C101000000000000000000000000000000000CD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF06A9E0E007C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF06B4 EFEF012430300000000000000000000000000000000000000000CD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF0131404006A8DFDF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF06A8DFDF023D 5050000000000000000000000000000000000000000000000000000000000000 00000000000000000000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFB36682DF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000C2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC2577EFFC257 7EFFC2577EFFC2577EFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FF8D5067B00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000CD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFC06D8BEF1A0F13200000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000CD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFB36682DF8C5066AF1A0F1320000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton11Click end object dxBarLargeButton12: TdxBarLargeButton Caption = 'Pengiriman Produk' Category = 0 Hint = 'Pengiriman Produk' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000014120D403B3529C04A4233F04A4233F03B3529C014120D400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000014120D403B3529C04A4233F04A4233F03B3529C014120D40000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000027231B804F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF2723 1B80000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000002723 1B804F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF27231B800000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001412 0D404F4737FF4F4737FF59503FFF706652FF756B57FF59503FFF4F4737FF4F47 37FF14120D400000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000014120D404F47 37FF4F4737FF59503FFF706652FF756B57FF59503FFF4F4737FF4F4737FF1412 0D40000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000003B35 29C04F4737FF59503FFF9C9078FF9C9078FF9C9078FF968B73FF59503FFF4F47 37FF3B3529C00000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000003B3529C04F47 37FF59503FFF9C9078FF9C9078FF9C9078FF968B73FF59503FFF4F4737FF3B35 29C0000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000004A42 33F04F4737FF756B57FF9C9078FF9C9078FF9C9078FF9C9078FF706652FF4F47 37FF4A4233F00000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000004A4233F04F47 37FF756B57FF9C9078FF9C9078FF9C9078FF9C9078FF706652FF4F4737FF4A42 33F0000000000000000000000000000000000000000000000000000000000000 0000000000001A0F13208D5067B0B46682E0CD7595FFCD7595FFCD7595FF5649 3CFF4F4737FF706652FF9C9078FF9C9078FF9C9078FF9C9078FF706652FF4F47 37FF57493CFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF4A4E42FF4F47 37FF706652FF9C9078FF9C9078FF9C9078FF9C9078FF706652FF4F4737FF4A4E 43FF06A9E0E00485B0B000182020000000000000000000000000000000000000 00001A0F1320C06E8CF0CD7595FFCD7595FFCD7595FFCD7595FFCD7595FF6E52 4EFF4F4737FF59503FFF9C9078FF9C9078FF9C9078FF978B73FF59503FFF4F47 37FF6E524EFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF3C6568FF4F47 37FF59503FFF9C9078FF9C9078FF9C9078FF978B73FF59503FFF4F4737FF3C65 68FF07C1FFFF07C1FFFF06B5F0F0001820200000000000000000000000000000 00008D5067B0CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFAD69 7CFF4F4737FF4F4737FF59503FFF706753FF756B57FF59503FFF4F4737FF4F47 37FFAD697CFFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF19A2CCFF4F47 37FF4F4737FF59503FFF706753FF756B57FF59503FFF4F4737FF4F4737FF19A2 CCFF07C1FFFF07C1FFFF07C1FFFF0485B0B00000000000000000000000000000 0000C06E8CF0CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FF8D5D65FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF8D5D 65FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF2A83 9AFF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF2A839AFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF06A9E0E00000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFAD697CFF6F524EFF57493CFF57493CFF6F524EFFAD697CFFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF19A2CCFF3C6669FF4A4E43FF4A4E43FF3C6669FF19A2CCFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF299AB9FF645A45FF645A45FF645A45FF645A 45FF526D67FF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFE6BACAFFCD7595FFCD7595FFCD75 95FFF3DDE5FFE6BACAFFCD7595FFF6E5EBFFF0D4DEFFCD7595FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFCD7595FFE6BACAFFFFFFFFFFFFFFFFFFFFFFFFFFE6BA CAFFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF2F93ADFF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFE6BACAFFCD7595FFCD7595FFCD75 95FFF3DDE5FFE6BACAFFD997AFFFFFFFFFFFD997AFFFCD7595FFFFFFFFFFE6BA CAFFCD7595FFCD7595FFCD7595FFE6BACAFFFFFFFFFFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF526D67FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF07C1FFFF07C1FFFF07C1FFFF0000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFE6BACAFFCD7595FFCD7595FFCD75 95FFF3DDE5FFF3DDE5FFF3DDE5FFF9EEF2FFCD7595FFCD7595FFFFFFFFFFE6BA CAFFCD7595FFCD7595FFCD7595FFE6BACAFFFFFFFFFFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF645A45FF07C1FFFF07C1FFFF036D90900000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFFFFFFFFFFFFFFFFFE6BACAFFCD75 95FFF3DDE5FFF9EEF2FFF3DCE4FFFFFFFFFFD997AFFFCD7595FFFFFFFFFFFFFF FFFFFFFFFFFFF3DDE5FFCD7595FFE6BACAFFFFFFFFFFFFFFFFFFFFFFFFFFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A 45FF3B8696FF07C1FFFF059CCFCF000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFE6BACAFFCD7595FFCD7595FFCD75 95FFF3DDE5FFE6BACAFFCD7595FFF6E5EBFFECCBD7FFCD7595FFFFFFFFFFE6BA CAFFCD7595FFCD7595FFCD7595FFE6BACAFFFFFFFFFFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF467A 7FFF07C1FFFF06B4EFEF00182020000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFECCBD7FFD997AFFFD997AFFFCD75 95FFF3DDE5FFECCBD7FFD997AFFFFCF7F9FFE9C3D1FFCD7595FFFFFFFFFFECCB D7FFD997AFFFD997AFFFCD7595FFE6BACAFFFFFFFFFFD997AFFFD997AFFFD386 A2FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF645A45FF526D68FF0CB9 F3FF07C1FFFF0131404000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCD75 95FFF3DDE5FFFFFFFFFFFFFFFFFFF3DCE4FFD386A2FFCD7595FFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFCD7595FFE6BACAFFFFFFFFFFFFFFFFFFFFFFFFFFE6BA CAFFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF5D6050FF12B3E7FF07C1 FFFF036180800000000000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF645A45FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF645A45FF18ADDCFF07C1FFFF0484 AFAF000000000000000000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF07C1FFFF07C1FFFF07C1FFFF526D67FF645A45FF645A 45FF645A45FF645A45FF645A45FF645A45FF299AB9FF07C1FFFF06A8DFDF000C 1010000000000000000000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF06A9E0E007C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF06B4EFEF012430300000 0000000000000000000000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF0131404006A8DFDF07C1FFFF07C1FFFF07C1FFFF07C1 FFFF07C1FFFF07C1FFFF07C1FFFF07C1FFFF06A8DFDF023D5050000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00009A5870C0CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFB36682DF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000040252F50CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FF8D5067B000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000080495DA0CD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFC06D8BEF1A0F132000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000040252F5099576FBFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD75 95FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFCD7595FFB36682DF8C50 66AF1A0F13200000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton12Click end object dxBarLargeButton13: TdxBarLargeButton Caption = 'Pengecekan' Category = 0 Hint = 'Pengecekan' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000413E3660413E 3660000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000016151220AEA490FFAEA4 90FF413E36600000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000012052C305018BED0631EE9FF5018BED012052C30413E3660AEA4 90FFAEA490FF413E366000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004A16AFC0631EE9FF631EE9FF631EE9FF5D1CDBF03726457E8D82 6AFFAEA490FFAEA490FF413E3660000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000631EE9FF631EE9FF631EE9FF631EE9FF631EE9FF6422E0FF755E 70FF5D57499CAEA490FFAEA490FF413E36600000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004414A1B0631EE9FF631EE9FF631EE9FF631EE9FF631EE9FF5F1E DCF612052C30413E3660AEA490FFAEA490FF413E366000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000006010F105018BDCF631EE9FF631EE9FF631EE9FF631EE9FF631E E9FF5D1CDBF012052C30413E3660AEA490FFAEA490FF413E3660000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000006010F105018BDCF631EE9FF631EE9FF631EE9FF631E E9FF631EE9FF5D1CDBF012052C30413E3660AEA490FFAEA490FF413E36600000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000006010F105018BDCF631EE9FF631EE9FF631E E9FF631EE9FF631EE9FF5D1CDBF00F1C464A413E3660AEA490FF413E36600000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000006010F105018BDCF631EE9FF631E E9FF631EE9FF631EE9FF2984F7FF09B5F7F70F28535716151220000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000006010F105018BDCF631E E9FF631EE9FF2984F7FF07C1FFFF07C1FFFF3C5AE8F612052C30000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000006010F105018 BDCF2984F7FF07C1FFFF07C1FFFF3F5BF1FF631EE9FF5D1CDBF012052C300000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000050C 1E1F0D9EE2E407C1FFFF3F5BF1FF631EE9FF631EE9FF631EE9FF5D1CDBF01205 2C30000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000050C1E1F394DD1DE631EE9FF631EE9FF631EE9FF631EE9FF631EE9FF5D1C DBF012052C300000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000006010F105018BDCF631EE9FF631EE9FF631EE9FF631EE9FF631E E9FF5D1CDBF012052C3000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000934233D0B5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFAF4C4AFF7227C9FF631EE9FF631EE9FF631EE9FF631E E9FF631EE9FF6821DEFFA5465FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFF934233D0000000000000000000000000000000000000 000000000000B5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFAF4C4AFF7227C9FF631EE9FF631EE9FF631E E9FF631EE9FF631EE9FF6821DEFFA5465FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFECDCE8FF7F44E9FF631EE9FF631E E9FF631EE9FF631EE9FF631EE9FF6C2AE9FFD9C3E8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFECDCE8FF7F44E9FF631E E9FF631EE9FF631EE9FF631EE9FF631EE9FF6C2AE9FFECDCE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFECDCE8FF7F44 E9FF631EE9FF631EE9FF631EE9FF631EE9FF631EE9FF905DE9FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFECDC E8FF7F44E9FF631EE9FF631EE9FF631EE9FF631EE9FF631EE9FFD1B6E9FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFECDCE8FF7F44E9FF631EE9FF631EE9FF631EE9FF631EE9FF702ADBFFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFF6EAE8FFECDCE8FFA377E9FF631EE9FF631EE9FF631EE9FF631EE9FF9F5C A1FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFD9C3E8FF8851E8FF631EE9FF631EE9FF7453 95FFECE0DDFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFCAAFE0FF77598DFF645A 45FF887D6EFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFECE0DDFF897E 6DFFDACFC9FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFCB8679FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB86 79FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFCB8679FFCB8679FFCB86 79FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFCB8679FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EAE8FFF6EA E8FFF6EAE8FFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000B5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFF000000000000000000000000000000000000 000000000000934133CFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB5513FFFB551 3FFFB5513FFFB5513FFF934133CF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton13Click end object dxBarLargeButton14: TdxBarLargeButton Caption = 'Admin' Category = 0 Hint = 'Admin' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000E2330302B6790903A89C0C03E95D0D04DB7FFFF4DB7FFFF3E95 D0D03A89C0C02B6790900E233030000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000050C1010265C 808048ACF0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F0265C8080050C1010000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001839505043A0E0E04DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF43A0E0E0183950500000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000002B6790904DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2B67 9090000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000003073A0A04DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4C93C0FF4E5B5BFF4E544FFF4C93 C0FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF3073A0A00000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000002B6790904DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4E544FFF4F4737FF4F4737FF554E 41FF757575FF757575FF757575FF757575FF757575FF757575FF757575FF7575 75FF757575FF757575FF5F5F5FD0494949A01D1D1D4000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000183950504DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4E544FFF4F4737FF4F4737FF564F 42FF757575FF757575FF757575FF757575FF757575FF757575FF757575FF7575 75FF757575FF757575FF757575FF757575FF757575FF585858C0161616300000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000050C101043A0E0E04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4C93C0FF4E5C5CFF4E5550FF4C93 C0FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4C98CCE63333336F6D6D6DEF757575FF6E6E6EF01616 1630000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000265C80804DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF265C8080070707104949499F757575FF6E6E 6EF0161616300000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000048ACF0F04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F000000000000000004949499F7575 75FF585858C00000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000132E 40404DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0E23303000000000070707106D6D 6DEF757575FF1D1D1D4000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000002B67 90904DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2B67909000000000000000003333 3370757575FF494949A000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000003A89 C0C04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3A89C0C000000000000000001616 1630757575FF5F5F5FD000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000003E95 D0D04DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E95D0D000000000000000000000 0000757575FF757575FF00000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000C3450501C7DC0C04DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF1C7DC0C01A313D70453E 30E04F4737FF534C3EFF14120D40000000000000000000000000000000000000 0000000000000000000000000000000000000C34505026A7FFFF26A7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7FFFF50493BFF4F47 37FF4F4737FF4F4737FF453E30E0000000000000000000000000000000000000 0000000000000000000000000000000000001C7DC0C026A7FFFF26A7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3B93D4FF225B90FF1E54 88FF3B93D4FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3B93D4FF225B90FF1E5488FF3B93D4FF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7FFFF4F4737FF4F47 37FF4F4737FF4F4737FF4F4737FF000000000000000000000000000000000000 00000000000000000000000000000000000026A7FFFF26A7FFFF26A7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF1E5488FF194778FF1947 78FF225B90FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF1E5488FF194778FF194778FF225B90FF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7FFFF4F4737FF4F47 37FF4F4737FF4F4737FF4F4737FF000000000000000000000000000000000000 00000000000000000000000000000000000026A7FFFF26A7FFFF26A7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF1E5488FF194778FF1947 78FF225C91FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF1E5488FF194778FF194778FF225C91FF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF26A7FFFF4F4737FF4F47 37FF4F4737FF4F4737FF4F4737FF000000000000000000000000000000000000 0000000000000000000000000000000000001C7DC0C026A7FFFF2374FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3B93D4FF225C91FF1E55 89FF3B93D4FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3B93D4FF225C91FF1E5589FF3B93D4FF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2374FFFF4F4737FF4F47 37FF4F4737FF4F4737FF4F4737FF000000000000000000000000000000000000 0000000000000000000000000000000000000C3450502266FFFF2257FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2257FFFF534C3EFF4F47 37FF4F4737FF4F4737FF453E30DF000000000000000000000000000000000000 000000000000000000000000000000000000000000002257FFFF2257FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2257FFFF6B6964FF544D 3FFF4F4737FF453E30DF14120D40000000000000000000000000000000000000 000000000000000000000000000000000000000000002257FFFF2257FFFF2C6E FFFF429FFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3C92FFFF2257FFFF757575FF7575 75FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000002257FFFF2257FFFF2257 FFFF2257FFFF2662FFFF3C92FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3C92FFFF2257FFFF2257FFFF757575FF7575 75FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000002257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2662FFFF3C92FFFF4AB1FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF3C92FFFF2257FFFF2257FFFF2257FFFF757575FF7575 75FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001B46CFCF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF255CFFFF3786FFFF4AB1 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF45A5FFFF255CFFFF2257FFFF2257FFFF2257FFFF757575FF7575 75FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001941C0C02257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF255C FFFF3480FFFF47ABFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF45A5FFFF255CFFFF2257FFFF2257FFFF2257FFFF2257FFFF757575FF7575 75FF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001536A0A02257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF327AFFFF47ABFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF45A5 FFFF255CFFFF2257FFFF2257FFFF2257FFFF2257FFFF325DE5FF757575FF5F5F 5FCF000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000A1B50502257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2F74FFFF429FFFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4AB1FFFF2662 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF375EDCFF757575FF5858 58C0000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000020510102257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2C6EFFFF429F FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4AB1FFFF2969FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF4B65B9FF757575FF4242 4290000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000173CB0B02257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2662FFFF3C92FFFF4DB7FFFF4DB7FFFF4AB1FFFF2969FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF646B82F3757575FF2525 2550000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000081640402257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2662FFFF3C92FFFF2F74FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2D5BEEFF757575FF6D6D6DEF0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001536 A0A02257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF58648BEB757575FF424242900000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000040B 20201F51EFEF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF375EDCFF757575FF6D6D6DEF070707100000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000A1B50502257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2759F6FF686B74EE757575FF3A3A3A80000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000F2670702257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF63697CED757575FF5F5F5FCF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000E266F6F2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2759F6FF63697CED757575FF666666DF0707071000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000A1B50501F51EFEF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF375E DCFF686C77F1757575FF666666DF161616300000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000040B202015369F9F2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2D5BEEFF586690F07575 75FF757575FF5F5F5FCF07070710000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000008164040173B AFAF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF325DE5FF375EDCFF4B65B9FF646C85F6757575FF757575FF6D6D 6DEF3A3A3A7F0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00005F6062D3757575FF757575FF757575FF757575FF757575FF757575FF7575 75FF757575FF757575FF757575FF757575FF757575FF6D6D6DEF4949499F0707 0710000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00005F5F5FCF757575FF757575FF757575FF757575FF757575FF757575FF7575 75FF757575FF5F5F5FCF575757BF4141418F2424244F00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton14Click end object dxBarLargeButton15: TdxBarLargeButton Caption = 'Admin Pengecekan' Category = 0 Hint = 'Admin Pengecekan' Visible = ivAlways LargeGlyph.Data = { 36240000424D3624000000000000360000002800000030000000300000000100 2000000000000024000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF0098FFFF0098FFFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000004DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0098FFFF0098FFFF0098FFFF0098 FFFF0098FFFF059AFFFF13A0FFFF265C8080357EB0B043A0E0E04DB7FFFF3E95 D0D02B679090050C101000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000002969FFFF3A8DFFFF47ABFFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF049AFFFF13A0FFFF26A8FFFF35AD FFFF43B3FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF43A0E0E0050C1010000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000D234A4A2257FFFF2257FFFF2257FFFF2F74FFFF45A5FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF3A89C0C0000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000173B7C7C2257FFFF2257FFFF2257FFFF2257FFFF255CFFFF3C92FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF091720200000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00002358D0D02257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF45A5 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4C93C0FF4E5B5BFF48463CEC1816115000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000205 1010245AFCFC2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2662 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF50B2F4FF5A9FC9FF668E 9EFF6E7F7EFF524D3FFF4F4737FF4F4737FF40392CD000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001536 90902257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF3C92FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF57A4D4FF688993FF7A6E54FF7A6E54FF7A6E 54FF7A6E54FF544B3AFF4F4737FF4F4737FF40392CCF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000061030302257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2969FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF50B2F4FF688993FF7A6E54FF7A6E54FF7A6E54FF6E807FFF6393 AAFF58A4D5FF5486A3FF4F5A58FF4C4F48F71816115000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001C4ACCCC2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF45A5FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF55A9DFFF717B73FF7A6E54FF77735EFF6393AAFF52AEE9FF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3A89C0C00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000C2060602257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2455 F2FF354FA7FF475368FF4E4D42FF4E4D42FF4E6268FF4D85A7FF4DAFF2FF50B2 F4FF76725EFF7A6E54FF717C74FF52AEE9FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E95D0D00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000020510102256F7F72257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2D53CCFF4948 4FFF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4E544FFF6671 6BFF7A6E54FF717C74FF50B2F4FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000F286A6A2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2D53CCFF4F4737FF4F47 37FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F47 37FF6A6B5BFF50B2F4FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E95D0D01D456060000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000002257F0F02257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2455F2FF49484FFF4F4737FF4F47 37FF5C523FFF6E634CFF766B52FF7A6E54FF6E634CFF59503EFF4F4737FF4F47 37FF4F524AFF4DAFF2FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ACF0F01D45 6060000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000061030302257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF354FA7FF4F4737FF4F4737FF5C52 3FFF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF59503EFF4F47 37FF4F4737FF4D85A7FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF48AC F0F0000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000001D469D9D2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF434A68FF4F4737FF4F4737FF6E63 4CFF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF6E634CFF4F47 37FF4F4737FF4E6268FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF3E94 CFCF000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000255CD5D52257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF4C4742FF4F4737FF4F4737FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF766B52FF4F47 37FF4F4737FF4E4D42FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF132E 4040000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002763EFEF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF4C4742FF4F4737FF4F4737FF7A6E 54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF776B51FF4F47 37FF4F4737FF4F4E43FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF2F78B2FF1B4D 7FFF327EBBFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF347DAFAF0000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002764F9F92257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF434A68FF4F4737FF4F4737FF6E63 4CFF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF6E634CFF4F47 37FF4F4737FF4E6268FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF194778FF1947 78FF1E5488FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ABEFEF091720200000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF354FA7FF4F4737FF4F4737FF5C52 3FFF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF7A6E54FF59503EFF4F47 37FF4F4737FF4D85A7FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF327EBBFF1C4E 80FF2F78B2FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF265C8080000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2455F2FF494950FF4F4737FF4F47 37FF5C523FFF6F644CFF776B51FF7A6E54FF6F644CFF59503EFF4F4737FF4F47 37FF494950FF4DAFF2FF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF43A0DFDF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2D53CCFF4F4737FF4F47 37FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F47 37FF2D53CCFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF132E404000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002763EFEF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2D53CCFF4949 50FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF4F4737FF494950FF2D53 CCFF2257FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF48ABEFEF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002660EBEB2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2455 F2FF3550A8FF434B69FF524938FF524938FF434B69FF3550A8FF2455F2FF2257 FFFF2257FFFF2F74FFFF4AB1FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3A89C0C00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000002153B8B82257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF255CFFFF45A5FFFF4DB7FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF3073A0A00000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000D234A4A2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF255CFFFF3F99FFFF4DB7FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF1D4560600000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000002560FBFB2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF255CFFFF45A5FFFF4DB7FFFF4DB7 FFFF4DB7FFFF4DB7FFFF4DB7FFFF091720200000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000001F4DB0B02257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF255CFFFF4AB1FFFF4DB7 FFFF4DB7FFFF4DB7FFFF3E94CFCF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000002661FDFD2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF327AFFFF4DB7 FFFF4DB7FFFF4DB7FFFF1D456060000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000001E4B9C9C2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF47AB FFFF4DB7FFFF43A0DFDF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000002965E1E12257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF3786 FFFF4DB7FFFF1839505000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000050C10102762 F6F62257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2C6E FFFF2B6790900000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000710 1F1F2762F6F62257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2358 FAFA000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000050C10102C6EEDED2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF1536 9F9F000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000001E4B9B9B2661FDFD2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF2257FFFF2257FFFF2257FFFF2053E1E1081640400000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000050C10102459BFBF2560FBFB2257FFFF2257 FFFF2257FFFF2257FFFF7A6E54FF7A6E54FF2257FFFF2257FFFF2257FFFF2257 FFFF2257FFFF2257FFFF235BFDFD2358CFCF0C1F4C4C00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000D234A4A2253 B7B72763EFEF2763EFEF7A6E54FF7A6E54FF2257FFFF2864F9F92763EFEF2A69 E7E72153AEAE132F636300000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000005B523FC05B523FBF0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000} OnClick = dxBarLargeButton15Click end end end
64.659746
72
0.858928
6a1bc74c201e6f93f6aafabc300c759653d8c232
15,263
dfm
Pascal
UFrmRelSaidaData.dfm
PaulohSouza/SisConv-Conveniencia-Delphi
5e1c83f9d152f8bad169da89dd0d9f6223295428
[ "MIT" ]
null
null
null
UFrmRelSaidaData.dfm
PaulohSouza/SisConv-Conveniencia-Delphi
5e1c83f9d152f8bad169da89dd0d9f6223295428
[ "MIT" ]
1
2020-04-03T23:39:27.000Z
2020-04-03T23:39:27.000Z
UFrmRelSaidaData.dfm
PaulohSouza/SisConv-Conveniencia-Delphi
5e1c83f9d152f8bad169da89dd0d9f6223295428
[ "MIT" ]
null
null
null
object FrmRelSaidaData: TFrmRelSaidaData Left = 192 Top = 107 Width = 901 Height = 480 Caption = 'Relat'#243'rio de Vendas' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False Scaled = False PixelsPerInch = 96 TextHeight = 13 object QuickRep1: TQuickRep Left = 56 Top = 16 Width = 794 Height = 1123 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False DataSet = UDMDados.SqlConsultaSaidaData Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -13 Font.Name = 'Arial' Font.Style = [] Functions.Strings = ( 'PAGENUMBER' 'COLUMNNUMBER' 'REPORTTITLE') Functions.DATA = ( '0' '0' #39#39) Options = [FirstPageHeader, LastPageFooter] Page.Columns = 1 Page.Orientation = poPortrait Page.PaperSize = A4 Page.Values = ( 100.000000000000000000 2970.000000000000000000 100.000000000000000000 2100.000000000000000000 100.000000000000000000 100.000000000000000000 0.000000000000000000) PrinterSettings.Copies = 1 PrinterSettings.Duplex = False PrinterSettings.FirstPage = 0 PrinterSettings.LastPage = 0 PrinterSettings.OutputBin = Auto PrintIfEmpty = True SnapToGrid = True Units = MM Zoom = 100 object PageHeaderBand1: TQRBand Left = 38 Top = 38 Width = 718 Height = 40 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False AlignToBottom = False Color = clWhite ForceNewColumn = False ForceNewPage = False Size.Values = ( 105.833333333333300000 1899.708333333333000000) BandType = rbPageHeader object QRLabel1: TQRLabel Left = 216 Top = 8 Width = 313 Height = 19 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 50.270833333333330000 571.500000000000000000 21.166666666666670000 828.145833333333200000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'RELAT'#211'RIO DE SAIDA - TOTAL DE VENDAS' Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = clRed Font.Height = -15 Font.Name = 'Arial' Font.Style = [fsBold] ParentFont = False Transparent = False WordWrap = True FontSize = 11 end object QRSysData1: TQRSysData Left = 656 Top = 16 Width = 46 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 1735.666666666667000000 42.333333333333340000 121.708333333333300000) Alignment = taLeftJustify AlignToBand = False AutoSize = True Color = clWhite Data = qrsPageNumber Transparent = False FontSize = 10 end end object ColumnHeaderBand1: TQRBand Left = 38 Top = 78 Width = 718 Height = 75 Frame.Color = clBlack Frame.DrawTop = True Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False AlignToBottom = False Color = clWhite ForceNewColumn = False ForceNewPage = False Size.Values = ( 198.437500000000000000 1899.708333333333000000) BandType = rbColumnHeader object QRLabel2: TQRLabel Left = 8 Top = 24 Width = 45 Height = 20 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 52.916666666666660000 21.166666666666670000 63.500000000000000000 119.062500000000000000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'DATA' Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -16 Font.Name = 'Arial' Font.Style = [fsBold] ParentFont = False Transparent = False WordWrap = True FontSize = 12 end object QRLabel3: TQRLabel Left = 160 Top = 24 Width = 86 Height = 20 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 52.916666666666660000 423.333333333333300000 63.500000000000000000 227.541666666666700000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'Nota Fiscal' Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -16 Font.Name = 'Arial' Font.Style = [fsBold] ParentFont = False Transparent = False WordWrap = True FontSize = 12 end object QRLabel4: TQRLabel Left = 352 Top = 24 Width = 83 Height = 20 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 52.916666666666660000 931.333333333333500000 63.500000000000000000 219.604166666666700000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'Valor Total' Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -16 Font.Name = 'Arial' Font.Style = [fsBold] ParentFont = False Transparent = False WordWrap = True FontSize = 12 end object QRLabel6: TQRLabel Left = 584 Top = 24 Width = 46 Height = 20 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 52.916666666666660000 1545.166666666667000000 63.500000000000000000 121.708333333333300000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'Lucro' Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -16 Font.Name = 'Arial' Font.Style = [fsBold] ParentFont = False Transparent = False WordWrap = True FontSize = 12 end end object DetailBand1: TQRBand Left = 38 Top = 153 Width = 718 Height = 40 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False AlignToBottom = False Color = clWhite ForceNewColumn = False ForceNewPage = False Size.Values = ( 105.833333333333300000 1899.708333333333000000) BandType = rbDetail object QRDBText7: TQRDBText Left = -1 Top = 16 Width = 123 Height = 18 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 47.625000000000000000 -2.645833333333333000 42.333333333333340000 325.437500000000000000) Alignment = taCenter AlignToBand = False AutoSize = True AutoStretch = False Color = clWhite DataSet = UDMDados.SqlConsultaSaidaData DataField = 'SaiPai_DataVenda' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -15 Font.Name = 'Arial' Font.Style = [] ParentFont = False Transparent = False WordWrap = True FontSize = 11 end object QRDBText8: TQRDBText Left = 145 Top = 16 Width = 94 Height = 18 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 47.625000000000000000 383.645833333333400000 42.333333333333340000 248.708333333333300000) Alignment = taCenter AlignToBand = False AutoSize = True AutoStretch = False Color = clWhite DataSet = UDMDados.SqlConsultaSaidaData DataField = 'SaiPai_codigo' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -15 Font.Name = 'Arial' Font.Style = [] ParentFont = False Transparent = False WordWrap = True FontSize = 11 end object QRDBText9: TQRDBText Left = 334 Top = 16 Width = 116 Height = 18 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 47.625000000000000000 883.708333333333400000 42.333333333333340000 306.916666666666700000) Alignment = taCenter AlignToBand = False AutoSize = True AutoStretch = False Color = clWhite DataSet = UDMDados.SqlConsultaSaidaData DataField = 'SaiPai_ValorTotal' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -15 Font.Name = 'Arial' Font.Style = [] ParentFont = False Transparent = False WordWrap = True FontSize = 11 end object QRDBText11: TQRDBText Left = 568 Top = 16 Width = 79 Height = 18 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 47.625000000000000000 1502.833333333333000000 42.333333333333340000 209.020833333333300000) Alignment = taCenter AlignToBand = False AutoSize = True AutoStretch = False Color = clWhite DataSet = UDMDados.SqlConsultaSaidaData DataField = 'SaiPai_Obs' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -15 Font.Name = 'Arial' Font.Style = [] ParentFont = False Transparent = False WordWrap = True FontSize = 11 end end object QRSysData2: TQRSysData Left = 680 Top = 1064 Width = 68 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 1799.166666666667000000 2815.166666666667000000 179.916666666666700000) Alignment = taLeftJustify AlignToBand = False AutoSize = True Color = clWhite Data = qrsDateTime Transparent = False FontSize = 10 end object QRExpr1: TQRExpr Left = 224 Top = 1080 Width = 115 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 592.666666666666800000 2857.500000000000000000 304.270833333333400000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Color = clWhite ResetAfterPrint = False Transparent = False WordWrap = True Expression = 'SUM(SAIPAI_OBS)' FontSize = 10 end object QRLabel8: TQRLabel Left = 56 Top = 1080 Width = 161 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 148.166666666666700000 2857.500000000000000000 425.979166666666700000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'SOMAT'#211'RIA DE lUCROS.:' Color = clWhite Transparent = False WordWrap = True FontSize = 10 end object QRLabel9: TQRLabel Left = 56 Top = 1104 Width = 97 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 148.166666666666700000 2921.000000000000000000 256.645833333333400000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'VALOR TOTAL.:' Color = clWhite Transparent = False WordWrap = True FontSize = 10 end object QRExpr2: TQRExpr Left = 168 Top = 1104 Width = 171 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 444.500000000000000000 2921.000000000000000000 452.437500000000000000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Color = clWhite ResetAfterPrint = False Transparent = False WordWrap = True Expression = 'SUM(SAIPAI_VALORTOTAL)' FontSize = 10 end object QRLabel10: TQRLabel Left = 632 Top = 1096 Width = 59 Height = 17 Frame.Color = clBlack Frame.DrawTop = False Frame.DrawBottom = False Frame.DrawLeft = False Frame.DrawRight = False Size.Values = ( 44.979166666666670000 1672.166666666667000000 2899.833333333334000000 156.104166666666700000) Alignment = taLeftJustify AlignToBand = False AutoSize = True AutoStretch = False Caption = 'SISCONV' Color = clWhite Transparent = False WordWrap = True FontSize = 10 end end end
26.45234
61
0.578785
83c62525f423a11586565a40ba81f54b3c1a7337
2,213
pas
Pascal
ufrmDespertador.pas
ViniMilagres/Despertador
142bccd956a7e20421f294e67cc073d352e075f0
[ "MIT" ]
null
null
null
ufrmDespertador.pas
ViniMilagres/Despertador
142bccd956a7e20421f294e67cc073d352e075f0
[ "MIT" ]
null
null
null
ufrmDespertador.pas
ViniMilagres/Despertador
142bccd956a7e20421f294e67cc073d352e075f0
[ "MIT" ]
null
null
null
unit ufrmDespertador; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Mask; type Tfrm_Despertador = class(TForm) btnAtivar: TButton; btnDesativar: TButton; MaskHora: TMaskEdit; Timer1: TTimer; Label1: TLabel; Label3: TLabel; StatusBar1: TStatusBar; procedure FormCreate(Sender: TObject); procedure btnDesativarClick(Sender: TObject); procedure btnAtivarClick(Sender: TObject); procedure MaskHoraKeyPress(Sender: TObject; var Key: Char); procedure Timer1Timer(Sender: TObject); procedure Label3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frm_Despertador: Tfrm_Despertador; Ativar : Boolean; Tecla : Char; implementation {$R *.dfm} procedure Tfrm_Despertador.btnAtivarClick(Sender: TObject); begin Ativar := True; Label3.Caption :='Alarme Ativado'; end; procedure Tfrm_Despertador.btnDesativarClick(Sender: TObject); begin Ativar := False; MaskHora.Text := ''; MessageDlg('Seu Alarme foi desativado!', mtConfirmation, [mbOK], 0); Label3.Caption:='Desativado' end; procedure Tfrm_Despertador.FormCreate(Sender: TObject); begin Ativar := False; StatusBar1.Panels[0].Text :=FormatDateTime('dddd,dd "de" mmmm "de" yyy', Date); Label3.Caption:='Alarme Desativado'; end; procedure Tfrm_Despertador.Label3Click(Sender: TObject); begin Label3.Caption :='Alarme Desativado'; end; procedure Tfrm_Despertador.MaskHoraKeyPress(Sender: TObject; var Key: Char); begin Tecla := (Key); if ((Tecla <'0') or (Tecla > '9')) and (Tecla <> ':') then begin MessageBeep(48); Application.MessageBox ('Seu Alarme foi ativado', MB_OK+MB_ICONQUESTION) MessageBox('Seu alarme foi ativado'); Key := chr(0); end; end; procedure Tfrm_Despertador.Timer1Timer(Sender: TObject); begin StatusBar1.Panels[1].Text :=TimeToStr(Time); if (MaskHora.Text <= TimeToStr(Time)) and (Ativar) then MessageBeep (10); end; end.
24.588889
99
0.692273
f103edc019bb43566bd55ecae8766b2e6f46b09f
2,222
pas
Pascal
chars/0001.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
11
2015-12-12T05:13:15.000Z
2020-10-14T13:32:08.000Z
chars/0001.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
null
null
null
chars/0001.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
8
2017-05-05T05:24:01.000Z
2021-07-03T20:30:09.000Z
{ DAVID DRZYZGA > Is there any way to create or use your own fonts in > regular Text mode With Pascal? Here's a demo of a routine originally posted by Bernie P and revised by me: } Program UpsideDown; {-upsidedown and backwards Text aka redefining the Text mode font} Var newCharset, oldCharset : Array[0..255,1..16] of Byte; Procedure getoldCharset; Var b : Byte; w : Word; begin For b := 0 to 255 do begin w := b * 32; Inline($FA); PortW[$3C4] := $0402; PortW[$3C4] := $0704; PortW[$3CE] := $0204; PortW[$3CE] := $0005; PortW[$3CE] := $0006; Move(Ptr($A000, w)^, oldCharset[b, 1], 16); PortW[$3C4] := $0302; PortW[$3C4] := $0304; PortW[$3CE] := $0004; PortW[$3CE] := $1005; PortW[$3CE] := $0E06; Inline($FB); end; end; Procedure restoreoldCharset; Var b : Byte; w : Word; begin For b := 0 to 255 do begin w := b * 32; Inline($FA); PortW[$3C4] := $0402; PortW[$3C4] := $0704; PortW[$3CE] := $0204; PortW[$3CE] := $0005; PortW[$3CE] := $0006; Move(oldCharset[b, 1], Ptr($A000, w)^, 16); PortW[$3C4] := $0302; PortW[$3C4] := $0304; PortW[$3CE] := $0004; PortW[$3CE] := $1005; PortW[$3CE] := $0E06; Inline($FB); end; end; Procedure setasciiChar(Charnum : Byte; Var data); Var offset : Word; begin offset := CharNum * 32; Inline($FA); PortW[$3C4] := $0402; PortW[$3C4] := $0704; PortW[$3CE] := $0204; PortW[$3CE] := $0005; PortW[$3CE] := $0006; Move(data, Ptr($A000, offset)^, 16); PortW[$3C4] := $0302; PortW[$3C4] := $0304; PortW[$3CE] := $0004; PortW[$3CE] := $1005; PortW[$3CE] := $0E06; Inline($FB); end; Procedure newWriteln(s : String); {- Reverses order of Characters written} Var b : Byte; begin For b := length(s) downto 1 do Write(s[b]); Writeln; end; Var b, c : Byte; begin getoldCharset; For b := 0 to 255 do For c := 1 to 16 do newCharset[b, c] := oldCharset[b, (17 - c)]; For b := 0 to 255 do setasciiChar(b, newCharset[b, 1]); newWriteln('Hello World!'); readln; restoreoldCharset; end. 
20.574074
76
0.545005
83aa2d090b0de047fc3d9f9e64c3333283e45d70
1,661
pas
Pascal
MainForm.pas
ngeor/VFretboard
be921ab8006efaa73bd69a6bcec11ce4bd31db77
[ "MIT" ]
2
2019-04-27T04:39:56.000Z
2021-11-02T18:24:37.000Z
MainForm.pas
ngeor/VFretboard
be921ab8006efaa73bd69a6bcec11ce4bd31db77
[ "MIT" ]
null
null
null
MainForm.pas
ngeor/VFretboard
be921ab8006efaa73bd69a6bcec11ce4bd31db77
[ "MIT" ]
2
2019-04-27T04:39:56.000Z
2021-11-02T18:24:38.000Z
unit MainForm; {$MODE Delphi} interface uses LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Fretboard; type TDynamicIntArray = array of integer; TForm1 = class(TForm) cmbNotes: TComboBox; Label1: TLabel; cmbKey: TComboBox; txtScale: TEdit; Label2: TLabel; Label3: TLabel; Label4: TLabel; Fretboard1: TFretboard; Fretboard2: TFretboard; procedure FormCreate(Sender: TObject); procedure cmbNotesChange(Sender: TObject); private function GetScale: string; public { Public declarations } end; var Form1: TForm1; implementation {$R *.lfm} procedure TForm1.FormCreate(Sender: TObject); var i: TNote; begin for i := C to B do cmbNotes.Items.Add(Fretboard1.GetNoteName(i)); end; procedure TForm1.cmbNotesChange(Sender: TObject); begin txtScale.Text := GetScale; end; function TForm1.GetScale: string; var i: integer; notes: TNotesArray; key: TNote; tones: TTonesArray; begin Result := ''; key := IntToNote(cmbNotes.ItemIndex); if cmbNotes.ItemIndex <> -1 then begin case cmbKey.ItemIndex of 0: tones := Fretboard1.GetKnownScale(ksMajor); 1: tones := Fretboard1.GetKnownScale(ksMinor); 2: tones := Fretboard1.GetKnownScale(ksPentatonic); else Exit; end; notes := Fretboard1.FormScale(key, tones); for i := 0 to Length(notes) - 2 do Result := Result + Fretboard1.GetNoteName(notes[i]) + ' - '; Result := Result + Fretboard1.GetNoteName(notes[Length(notes) - 1]); Fretboard2.Filter := FormScaleSet(key, tones); end; end; end.
19.091954
72
0.677905
83e60483ffb80eb458e01733336336fe1e00417e
10,305
pas
Pascal
Projects/Genealogie/Source/TstHTMLParser/Frm_TstHTMLParser2a.pas
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
11
2017-06-17T05:13:45.000Z
2021-07-11T13:18:48.000Z
Projects/Genealogie/Source/TstHTMLParser/Frm_TstHTMLParser2a.pas
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
2
2019-03-05T12:52:40.000Z
2021-12-03T12:34:26.000Z
Projects/Genealogie/Source/TstHTMLParser/Frm_TstHTMLParser2a.pas
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
6
2017-09-07T09:10:09.000Z
2022-02-19T20:19:58.000Z
unit Frm_TstHTMLParser2a; {$IFDEF FPC} {$MODE Delphi} {$ENDIF} interface uses {$IFnDEF FPC} Windows, {$ELSE} LCLIntf, LCLType, {$ENDIF} SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ComCtrls, ExtCtrls, Unt_Config, FileUtil, VisualHTTPClient, htmlview, fra_HtmlImp; type { TfrmTestHtmlParsingMain } TfrmTestHtmlParsingMain = class(TForm) btnBrowseSchema: TBitBtn; btnLoadSchema: TBitBtn; btnSave: TBitBtn; btnSaveSchema: TBitBtn; btnWWW: TBitBtn; btnBrowseHtml: TBitBtn; btnDoParse: TBitBtn; btnLoadFile: TBitBtn; cbxFilename: TComboBox; cbxFilenameSchema: TComboBox; chbVerbose: TCheckBox; Config1: TConfig; FraHtmlImport1: TFraHtmlImport; ListBox1: TListBox; mOutput: TMemo; OpenDialog1: TOpenDialog; pnlBottomRight: TPanel; pnlBottomRight2: TPanel; pnlTopRight2: TPanel; pnlTopRight: TPanel; pnlBottom: TPanel; pnlTop: TPanel; SaveDialog1: TSaveDialog; splLeft: TSplitter; splRight: TSplitter; VisualHTTPClient1: TVisualHTTPClient; procedure btnWWWClick(Sender: TObject); procedure btnBrowseSchemaClick(Sender: TObject); procedure btnDoParseClick(Sender: TObject); procedure btnLoadSchemaClick(Sender: TObject); procedure btnSaveClick(Sender: TObject); procedure btnLoadFileClick(Sender: TObject); procedure btnBrowseHtmlClick(Sender: TObject); procedure btnSaveSchemaClick(Sender: TObject); procedure chbVerboseChange(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDeactivate(Sender: TObject); procedure FormShow(Sender: TObject); procedure ListBox1DblClick(Sender: TObject); procedure splRightMoved(Sender: TObject); private { Private-Deklarationen } FlastTick: QWord; FDataPath: String; procedure FillFileList(Data: PtrInt); procedure HTMLImPSplitterMove(Sender: TObject); procedure LoadSchema(const lFilename: string); procedure OnFileFound(FileIterator: TFileIterator); public { Public-Deklarationen } Procedure ComputeFiltered(CType:byte;Text:String); procedure LoadFile(const lFilename: String); end; var frmTestHtmlParsingMain: TfrmTestHtmlParsingMain; implementation uses Unt_FileProcs; {$IFnDEF FPC} {$R *.lfm} {$ELSE} {$R *.lfm} {$ENDIF} {$if FPC_FULLVERSION = 30200 } {$WARN 6058 OFF} {$ENDIF} procedure TfrmTestHtmlParsingMain.btnBrowseSchemaClick(Sender: TObject); var lRelp: String; begin OpenDialog1.FileName:=FDatapath+cbxFilenameSchema.text; if OpenDialog1.Execute then begin lRelp:= ExtractRelativepath(ExpandFileName(FDatapath+DirectorySeparator),OpenDialog1.FileName); if not charinset(copy(lRelp,2,1)[1],['.',':',DirectorySeparator]) then cbxFilenameSchema.text:=lRelp else cbxFilenameSchema.text:=OpenDialog1.FileName; btnLoadSchemaClick(sender); end; end; procedure TfrmTestHtmlParsingMain.btnDoParseClick(Sender: TObject); begin FraHtmlImport1.DoParse(sender); end; procedure TfrmTestHtmlParsingMain.btnWWWClick(Sender: TObject); var sHTML: TCaption; begin try sHTML := VisualHTTPClient1.Get(cbxFilename.Text); FraHtmlImport1.SetHtmlText( sHTML, cbxFilename.Text); finally end; end; procedure TfrmTestHtmlParsingMain.btnLoadSchemaClick(Sender: TObject); var i: Integer; begin if cbxFilenameSchema.ItemIndex > -1 then cbxFilenameSchema.Items.Delete(cbxFilenameSchema.ItemIndex); cbxFilenameSchema.Items.Insert(0,cbxFilenameSchema.Text); Config1.Value[cbxFilenameSchema, 'ICount'] := cbxFilenameSchema.Items.count; For i := 0 To cbxFilenameSchema.Items.count - 1 Do config1.Value[cbxFilenameSchema, inttostr(i)] := cbxFilenameSchema.Items[i]; LoadSchema(cbxFilenameSchema.text); end; procedure TfrmTestHtmlParsingMain.btnLoadFileClick(Sender: TObject); var i: Integer; lFilename: String; begin if cbxFilename.ItemIndex = -1 then begin cbxFilename.Items.add(cbxFilename.Text); Config1.Value[cbxFilename, 'ICount'] := cbxFilename.Items.count; For i := 0 To cbxFilename.Items.count - 1 Do config1.Value[cbxFilename, inttostr(i)] := cbxFilename.Items[i]; end; lFilename := cbxFilename.Text; LoadFile(lFilename); Application.QueueAsyncCall(FillFileList,0); end; procedure TfrmTestHtmlParsingMain.btnBrowseHtmlClick(Sender: TObject); begin OpenDialog1.FileName:=cbxFilename.text; if OpenDialog1.Execute then begin cbxFilename.text:=OpenDialog1.FileName; btnLoadFileClick(sender); end; end; procedure TfrmTestHtmlParsingMain.btnSaveSchemaClick(Sender: TObject); var i: Integer; lRelp: String; begin if not charinset(copy(cbxFilenameSchema.Text,2,1)[1],['.',':',DirectorySeparator]) then SaveDialog1.FileName := FDataPath+DirectorySeparator+ cbxFilenameSchema.Text else SaveDialog1.FileName := cbxFilenameSchema.Text; SaveDialog1.DefaultExt:='.txt'; if SaveDialog1.Execute then begin SaveFile(FraHtmlImport1.SchemaSaveToFile,SaveDialog1.FileName); lRelp:= ExtractRelativepath(ExpandFileName(FDatapath+DirectorySeparator),SaveDialog1.FileName); if not charinset(copy(lRelp,2,1)[1],['.',':',DirectorySeparator]) then cbxFilenameSchema.text:=lRelp else cbxFilenameSchema.text:=SaveDialog1.FileName; if cbxFilenameSchema.ItemIndex = -1 then begin cbxFilenameSchema.Items.add(cbxFilenameSchema.Text); Config1.Value[cbxFilenameSchema, 'ICount'] := cbxFilenameSchema.Items.count; For i := 0 To cbxFilenameSchema.Items.count - 1 Do config1.Value[cbxFilenameSchema, inttostr(i)] := cbxFilenameSchema.Items[i]; end; end; end; procedure TfrmTestHtmlParsingMain.chbVerboseChange(Sender: TObject); begin FraHtmlImport1.Verbose := chbVerbose.Checked; end; procedure TfrmTestHtmlParsingMain.FormCreate(Sender: TObject); var i: Integer; begin FraHtmlImport1.OnComputeOutput:=ComputeFiltered; FraHtmlImport1.OnSplitterMove:=HTMLImPSplitterMove; FDatapath := 'Data'; for i := 0 to 2 do if DirectoryExists(FDataPath) then Break else FDataPath:='..'+DirectorySeparator+FDataPath; end; procedure TfrmTestHtmlParsingMain.FormDeactivate(Sender: TObject); begin end; procedure TfrmTestHtmlParsingMain.FormShow(Sender: TObject); Var CBCount, i: Integer; Begin CBCount := Config1.getValue(cbxFilename, 'ICount', 0); For i := 0 To CBCount - 1 Do begin cbxFilename.Items.Add(Config1.getValue(cbxFilename, inttostr(i), '')); if i=0 then begin cbxFilename.ItemIndex :=i; LoadFile(cbxFilename.text); end end; CBCount := Config1.getValue(cbxFilenameSchema, 'ICount', 0); For i := 0 To CBCount - 1 Do begin cbxFilenameSchema.Items.Add(Config1.getValue(cbxFilenameSchema, inttostr(i), '')); if i=0 then begin cbxFilenameSchema.ItemIndex :=i; LoadSchema(cbxFilenameSchema.text); end end; end; procedure TfrmTestHtmlParsingMain.ListBox1DblClick(Sender: TObject); var lFilename: string; begin lFilename := ExtractFilePath(cbxFilename.text)+ListBox1.Items[ListBox1.ItemIndex]; LoadFile(lfilename); FraHtmlImport1.DoParse(Sender); end; procedure TfrmTestHtmlParsingMain.splRightMoved(Sender: TObject); begin pnlTopRight2.Width:=mOutput.Width+splRight.width div 2; pnlBottomRight2.Width:=mOutput.Width+splRight.width div 2; end; procedure TfrmTestHtmlParsingMain.FillFileList(Data: PtrInt); var lFileSearcher: TFileSearcher; lSearchPath, lSearchMask: string; begin lFileSearcher:= TFileSearcher.Create ; ListBox1.Clear; try lFileSearcher.OnFileFound:=OnFileFound; lSearchPath := ExtractFilePath(cbxFilename.Text)+'..' ; lSearchMask := copy(ExtractFileName(cbxFilename.Text),1,1)+'*'+ExtractFileExt(cbxFilename.Text); lFileSearcher.Search( lSearchPath, lSearchMask , true, false); finally freeandnil(lFileSearcher); end; end; procedure TfrmTestHtmlParsingMain.HTMLImPSplitterMove(Sender: TObject); begin pnlTopRight.Width:=FraHtmlImport1.mSchema.Width+2; pnlBottomRight.Width:=FraHtmlImport1.mSchema.Width+2; end; procedure TfrmTestHtmlParsingMain.LoadSchema(const lFilename: string); var s: string = ''; sf: TFileStream; begin if not charinset(copy(lFilename,2,1)[1],['.',':',DirectorySeparator]) then sf := TFileStream.Create( FDataPath+DirectorySeparator+ lFilename , fmOpenRead) else sf := TFileStream.Create(lFilename, fmOpenRead); try setlength(s, sf.Size); sf.ReadBuffer(s[1], sf.Size); finally FreeAndNil(sf); end; FraHtmlImport1.SetSchema(s); end; procedure TfrmTestHtmlParsingMain.OnFileFound(FileIterator: TFileIterator); begin Listbox1.AddItem(ExtractRelativepath(ExtractFilePath(cbxFilename.Text), FileIterator.FileName),nil); if FlastTick+500< GetTickCount64 then begin Application.ProcessMessages; FlastTick := GetTickCount64; end; end; procedure TfrmTestHtmlParsingMain.btnSaveClick(Sender: TObject); begin SaveDialog1.FileName := cbxFilename.Text; if SaveDialog1.Execute then begin if fileexists(SaveDialog1.FileName) then RenameFile(SaveDialog1.FileName, ChangeFileExt(SaveDialog1.FileName, '.bak')); mOutput.Lines.SaveToFile(SaveDialog1.FileName); end; end; procedure TfrmTestHtmlParsingMain.ComputeFiltered(CType: byte; Text: String); begin if ctype in [0,2,3] then mOutput.Lines.add(inttostr(CType)+': '+text); end; procedure TfrmTestHtmlParsingMain.LoadFile(const lFilename: String); var s: string = ''; sf: TFileStream; begin if not FileExists(lFilename) then exit; sf := TFileStream.Create(lFilename, fmOpenRead); try setlength(s, sf.Size); sf.ReadBuffer(s[1], sf.Size); finally FreeAndNil(sf); end; FraHtmlImport1.SetHtmlText(s, lFilename); end; end.
28.865546
103
0.709073
f12268c5fae6cf42c8877397f8a86550ba31d280
3,049
pas
Pascal
LazUnits/Indy10/Demos/TCP_HTTP/Server/Unit1.pas
jasc2v8/Pascal
11a18048a059db9037dec9c67fd00740f5bb8807
[ "Unlicense" ]
1
2019-04-11T05:53:19.000Z
2019-04-11T05:53:19.000Z
LazUnits/Indy10/Demos/TCP_HTTP/Server/Unit1.pas
jasc2v8/Pascal
11a18048a059db9037dec9c67fd00740f5bb8807
[ "Unlicense" ]
null
null
null
LazUnits/Indy10/Demos/TCP_HTTP/Server/Unit1.pas
jasc2v8/Pascal
11a18048a059db9037dec9c67fd00740f5bb8807
[ "Unlicense" ]
1
2020-06-23T22:23:44.000Z
2020-06-23T22:23:44.000Z
unit Unit1; {$MODE Delphi} { 03.07.2019 Updated for Indy 10.6 by jasc2v8@yahoo.com Replaced: TIdTextEncoding.Default With: IndyTextEncoding_OSDefault 03.03.2012 String Exchange Server Demo INDY10.5.X It just shows how to send and receive String. No error handling Most of the code is bdlm's. Adnan, Email: helloy72@yahoo.com compile and execute with DELPHI XE 2 is OK (bdlm 06.11.2011& 06.03.2012) add TEncoding (change according to your needs) } interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdContext, IdSync, IdBaseComponent, IdComponent, IdCustomTCPServer, IdTCPServer, IdGlobal; type TStringServerForm = class(TForm) CheckBox1: TCheckBox; Memo1: TMemo; IdTCPServer1: TIdTCPServer; procedure CheckBox1Click(Sender: TObject); procedure IdTCPServer1Execute(AContext: TIdContext); procedure IdTCPServer1Connect(AContext: TIdContext); procedure FormCreate(Sender: TObject); procedure IdTCPServer1Disconnect(AContext: TIdContext); procedure IdTCPServer1Exception(AContext: TIdContext; AException: Exception); private procedure ShowStartServerdMessage; procedure StopStartServerdMessage; { Private declarations } public { Public declarations } end; var StringServerForm: TStringServerForm; implementation {$R *.lfm} procedure TStringServerForm.CheckBox1Click(Sender: TObject); begin if ( CheckBox1.Checked = True ) then IdTCPServer1.Active := True else IdTCPServer1.Active := False; end; procedure TStringServerForm.FormCreate(Sender: TObject); begin IdTCPServer1:=TIdTCPServer.Create; with IdTCPServer1 do begin DefaultPort := 0; OnConnect := IdTCPServer1Connect; OnDisconnect := IdTCPServer1Disconnect; OnException := IdTCPServer1Exception; OnExecute := IdTCPServer1Execute; end; IdTCPServer1.Bindings.Add.IP := '127.0.0.1'; IdTCPServer1.Bindings.Add.Port := 6000; end; procedure TStringServerForm.IdTCPServer1Connect(AContext: TIdContext); begin Memo1.Lines.Add('A client connected'); end; procedure TStringServerForm.IdTCPServer1Disconnect(AContext: TIdContext); begin Memo1.Lines.Add('A client disconnected'); end; procedure TStringServerForm.IdTCPServer1Exception(AContext: TIdContext; AException: Exception); begin Memo1.Lines.Add('A exception happend !'); end; procedure TStringServerForm.ShowStartServerdMessage; begin Memo1.Lines.Add('START SERVER @' + TimeToStr(now)); end; procedure TStringServerForm.StopStartServerdMessage; begin Memo1.Lines.Add('STOP SERVER @' + TimeToStr(now)); end; procedure TStringServerForm.IdTCPServer1Execute(AContext: TIdContext); var LLine: String; begin TIdNotify.NotifyMethod( ShowStartServerdMessage ); LLine := AContext.Connection.IOHandler.ReadLn(IndyTextEncoding_OSDefault); Memo1.Lines.Add(LLine); AContext.Connection.IOHandler.WriteLn('OK'); TIdNotify.NotifyMethod( StopStartServerdMessage ); end; end.
25.838983
88
0.753034
cd89ce47d67fb033ba8d620de44cbf3f596d566c
8,770
pas
Pascal
shared/Parts.pas
zenyd/soldat
36484aa5ff2d7be523abb32adbd7aeeee1a395c9
[ "MIT" ]
2
2020-05-26T16:44:23.000Z
2020-10-08T16:58:11.000Z
shared/Parts.pas
Shoozza/soldat
7b123618eadbd20a314ea4a389e8391cdd600725
[ "MIT" ]
null
null
null
shared/Parts.pas
Shoozza/soldat
7b123618eadbd20a314ea4a389e8391cdd600725
[ "MIT" ]
2
2021-01-11T17:49:23.000Z
2021-01-19T19:57:21.000Z
{*******************************************************} { } { Particle Unit for SOLDAT } { } { Copyright (c) 2001-02 Michal Marcinkowski } { } { PARTS ver. 1.0.7 } { PARTICLE & CONSTRAINT PHYSICS MODULE FOR DELPHI 2D } { by Michal Marcinkowski } { } { version history: } { Current - Modified for SOLDAT } { 1.0.7 - Changed to 2D } { 1.0.6 - Added Constraint Active variable } { 1.0.5 - Added PO Constraints only loading } { 1.0.4 - Changed to D3DX Vectors } { 1.0.3 - Added PO loader scaling } { 1.0.2 - Added Euler Integrator } { 1.0.1 - Added PO files loading } { } {*******************************************************} unit Parts; interface uses Vector; const NUM_PARTICLES = 560; RKV = 0.98; type Constraint = record Active: Boolean; PartA, PartB: Integer; Restlength: Single; end; ParticleSystem = object Active: array[1..NUM_PARTICLES] of Boolean; Pos: array[1..NUM_PARTICLES] of TVector2; Velocity: array[1..NUM_PARTICLES] of TVector2; OldPos: array[1..NUM_PARTICLES] of TVector2; Forces: array[1..NUM_PARTICLES] of TVector2; OneOverMass: array[1..NUM_PARTICLES] of Single; TimeStep: Single; Gravity, VDamping, EDamping: Single; ConstraintCount: Integer; PartCount: Integer; Constraints: array[1..NUM_PARTICLES] of Constraint; public procedure DoVerletTimeStep; procedure DoVerletTimeStepFor(I, J: Integer); procedure DoEulerTimeStep; procedure DoEulerTimeStepFor(I: Integer); procedure CreatePart(Start, Vel: TVector2; Mass: Single; Num: Integer); procedure MakeConstraint(PA, PB: Integer; Rest: Single); procedure Clone(Other: ParticleSystem); procedure LoadPOObject(Filename: string; Scale: Single); procedure StopAllParts; procedure Destroy; procedure SatisfyConstraints; private procedure Verlet(I: Integer); procedure Euler(I: Integer); procedure SatisfyConstraintsFor(I: Integer); end; implementation uses SysUtils, PhysFS; procedure ParticleSystem.DoVerletTimeStep; var I: Integer; begin for I := 1 to NUM_PARTICLES do if Active[I] then Verlet(I); SatisfyConstraints; end; procedure ParticleSystem.DoVerletTimeStepFor(I, J: Integer); begin Verlet(I); SatisfyConstraintsFor(J); end; procedure ParticleSystem.DoEulerTimeStepFor(I: Integer); begin Euler(I); end; procedure ParticleSystem.DoEulerTimeStep; var I: Integer; begin for I := 1 to NUM_PARTICLES do if Active[I] then Euler(I); end; procedure ParticleSystem.Euler(I: Integer); var TempPos, S: TVector2; begin // Accumulate Forces Forces[I].Y := Forces[I].Y + Gravity; TempPos := Pos[I]; Vec2Scale(S, Forces[I], OneOverMass[I]); Vec2Scale(S, S, Sqr(TimeStep)); Velocity[I] := Vec2Add(Velocity[I], S); Pos[I] := Vec2Add(Pos[I], Velocity[I]); Vec2Scale(Velocity[I], Velocity[I], EDamping); OldPos[I] := TempPos; Forces[I].X := 0; Forces[I].Y := 0; end; procedure ParticleSystem.Verlet(I: Integer); var TempPos, S1, S2, D: TVector2; begin // Accumulate Forces Forces[I].Y := Forces[I].Y + Gravity; TempPos := Pos[I]; // Pos[I]:= 2 * Pos[I] - OldPos[I] + Forces[I]{ / Mass} * TimeStep * TimeStep; {Verlet integration} Vec2Scale(S1, Pos[I], 1.0 + VDamping); Vec2Scale(S2, OldPos[I], VDamping); D := Vec2Subtract(S1, S2); Vec2Scale(S1, Forces[I], OneOverMass[I]); Vec2Scale(S2, S1, Sqr(TimeStep)); Pos[I] := Vec2Add(D, S2); OldPos[I] := TempPos; Forces[I].X := 0; Forces[I].Y := 0; end; procedure ParticleSystem.SatisfyConstraints; var I: Integer; Delta, D: TVector2; Deltalength, Diff: Single; begin if ConstraintCount > 0 then for I := 1 to ConstraintCount do with Constraints[I] do if Active then begin Diff := 0; Delta := Vec2Subtract(Pos[PartB], Pos[PartA]); Deltalength := Sqrt(Vec2Dot(Delta, Delta)); if Deltalength <> 0 then Diff := (Deltalength - Restlength) / Deltalength; if OneOverMass[PartA] > 0 then begin Vec2Scale(D, Delta, 0.5 * Diff); Pos[PartA] := Vec2Add(Pos[PartA], D); end; if OneOverMass[PartB] > 0 then begin Vec2Scale(D, Delta, 0.5 * Diff); Pos[PartB] := Vec2Subtract(Pos[PartB], D); end; end; end; procedure ParticleSystem.SatisfyConstraintsFor(I: Integer); var Delta, D: TVector2; Deltalength, Diff: Single; begin with Constraints[i] do begin Diff := 0; Delta := Vec2Subtract(Pos[PartB], Pos[PartA]); Deltalength := Sqrt(Vec2Dot(Delta, Delta)); if Deltalength <> 0 then Diff := (deltalength - Restlength) / Deltalength; if OneOverMass[PartA] > 0 then begin Vec2Scale(D, Delta, 0.5 * Diff); Pos[PartA] := Vec2Add(Pos[PartA], D); end; if OneOverMass[PartB] > 0 then begin Vec2Scale(D, Delta, 0.5 * Diff); Pos[PartB] := Vec2Subtract(Pos[PartB], D); end; end; end; procedure ParticleSystem.CreatePart(Start, Vel: TVector2; Mass: Single; Num: Integer); begin // Num is now the active Part Active[Num] := True; Pos[Num] := Start; Velocity[Num] := Vel; OldPos[Num] := Start; OneOverMass[Num] := 1 / Mass; end; procedure ParticleSystem.MakeConstraint(PA, PB: Integer; Rest: Single); begin Inc(ConstraintCount); with Constraints[ConstraintCount] do begin Active := True; PartA := PA; PartB := PB; Restlength := Rest; end; end; procedure ParticleSystem.Clone(Other: ParticleSystem); var I: Integer; OtherConstraint: ^Constraint; begin ConstraintCount := Other.ConstraintCount; PartCount := Other.PartCount; Move(Other.Active, Active, PartCount * SizeOf(Active[1])); Move(Other.Pos, Pos, PartCount * SizeOf(Pos[1])); Move(Other.Velocity, Velocity, PartCount * SizeOf(Velocity[1])); Move(Other.OldPos, OldPos, PartCount * SizeOf(OldPos[1])); Move(Other.OneOverMass, OneOverMass, PartCount * SizeOf(OneOverMass[1])); for I := 1 to ConstraintCount do begin OtherConstraint := @Other.Constraints[I]; with Constraints[I] do begin Active := OtherConstraint.Active; PartA := OtherConstraint.PartA; PartB := OtherConstraint.PartB; Restlength := OtherConstraint.Restlength; end; end; end; procedure ParticleSystem.LoadPOObject(Filename: string; Scale: Single); var F: PHYSFS_File; Nm: string = ''; X: string = ''; Y: string = ''; Z: string = ''; A: string = ''; B: string = ''; P, Delta, V: TVector2; Pa, Pb: Integer; I: Integer; begin if not PHYSFS_Exists(PChar(Filename)) then Exit; V.X := 0; V.Y := 0; I := 0; ConstraintCount := 0; {$I-} F := PHYSFS_openRead(PChar(Filename)); if IOResult <> 0 then Exit; repeat PhysFS_ReadLN(F, Nm); // name if Nm <> 'CONSTRAINTS' then begin PhysFS_ReadLN(F, X); // X PhysFS_ReadLN(F, Y); // Y PhysFS_ReadLN(F, Z); // Z // make object P.X := -StrToFloat(X) * Scale / 1.2; P.Y := -StrToFloat(Z) * Scale; Inc(I); CreatePart(P, V, 1, I); end; until Nm = 'CONSTRAINTS'; PartCount := I; repeat // CONSTRAINTS PhysFS_ReadLN(F, A); // Part A if A = 'ENDFILE' then Break; PhysFS_ReadLN(F, B); // Part B {if not Eof(F) then begin} Delete(A, 1, 1); Delete(B, 1, 1); Pa := StrToInt(A); Pb := StrToInt(B); Delta := Vec2Subtract(Pos[Pa], Pos[Pb]); MakeConstraint(Pa, Pb, Sqrt(Vec2Dot(Delta, Delta))); {end;} until A = 'ENDFILE'; PHYSFS_close(F); {$I+} end; procedure ParticleSystem.StopAllParts; var I: Integer; begin for I := 1 to NUM_PARTICLES do if Active[I] then begin Velocity[I].X := 0; Velocity[I].Y := 0; OldPos[I] := Pos[I]; end; end; procedure ParticleSystem.Destroy; var I: Integer; begin for I := 1 to NUM_PARTICLES do begin Active[I] := False; Pos[I].X := 0; Pos[I].Y := 0; OldPos[I] := Pos[i]; Velocity[I].X := 0; Velocity[I].Y := 0; Forces[I].X := 0; Forces[I].Y := 0; end; ConstraintCount := 0; end; end.
24.093407
102
0.578677
83673399d53779d94c6f4f805cdfa0a3e871e3ec
9
pas
Pascal
usuarios.pas
luisalvaradoar/Proyecto_Final_PM1
61cb400c5dc9a9d1588df9ea8480dc34d7a42f4f
[ "Apache-2.0" ]
null
null
null
usuarios.pas
luisalvaradoar/Proyecto_Final_PM1
61cb400c5dc9a9d1588df9ea8480dc34d7a42f4f
[ "Apache-2.0" ]
null
null
null
usuarios.pas
luisalvaradoar/Proyecto_Final_PM1
61cb400c5dc9a9d1588df9ea8480dc34d7a42f4f
[ "Apache-2.0" ]
null
null
null
ECFM ECFM
9
9
0.888889
6a178b963533cacaf958e7285033c6ad7f527389
5,219
pas
Pascal
memory/0088.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
11
2015-12-12T05:13:15.000Z
2020-10-14T13:32:08.000Z
memory/0088.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
null
null
null
memory/0088.pas
nickelsworth/swag
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
[ "BSD-2-Clause" ]
8
2017-05-05T05:24:01.000Z
2021-07-03T20:30:09.000Z
unit xms; interface type xmsmove_type=record len:longint; s_handle:word; s_offset:longint; d_handle:word; d_offset:longint; end; xmsmove_ptr=^xmsmove_type; { For some unknown purpose, varables of xmsmove_type must be global and not local varables } function xms_version:word; {returns version number in BCD style} function xms_enablea20:word; {Allows direct access to blocks} function xms_disablea20:word; function xms_statusa20:word; function xms_largestfree:longint; {Max amount that can be allocated} function xms_totalfree:longint; {Total free xms memory} function xms_getmem(len:longint):word; {returns handle to block allocated} function xms_freemem(buf:word):word; {frees allocated block} function xms_movemem(m:xmsmove_ptr):word;{moves data around for you, only even lengths are allowed} function xms_lock(buf:word):longint; {returns 32bit address} function xms_unlock(buf:word):word; function xms_getinfo(buf:word):longint; {low word is size in kb} implementation {$S-} {$I-} var xmm:pointer; xms_installed:boolean; function xms_version; var c:word; begin c:=0; asm mov ax,$4300 int $2f cmp al,80h jne @nodriver mov [c],1 @nodriver: end; if(c=1) then begin asm mov ax,$4310 int $2f mov word ptr [xmm],bx mov bx,es mov word ptr [xmm+2],bx xor ah,ah call dword ptr [xmm] mov [c],ax end; xms_version:=c; xms_installed:=true; end else xms_version:=0; end; function xms_enablea20; var c:word; begin xms_enablea20:=0; if(xms_installed) then begin asm mov ah,5 call dword ptr [xmm] mov [c],ax end; xms_enablea20:=c; end; end; function xms_disablea20; var c:word; begin xms_disablea20:=0; if(xms_installed) then begin asm mov ah,6 call dword ptr [xmm] mov [c],ax end; xms_disablea20:=c; end; end; function xms_statusa20; var c:word; begin xms_statusa20:=0; if(xms_installed) then begin asm mov ah,7 call dword ptr [xmm] mov [c],ax end; xms_statusa20:=c; end; end; function xms_largestfree; var c:word; begin xms_largestfree:=0; if(xms_installed) then begin asm mov ah,8 call dword ptr [xmm] mov [c],ax end; xms_largestfree:=longint(c) shl 10; end; end; function xms_totalfree; var c:word; begin xms_totalfree:=0; if(xms_installed) then begin asm mov ah,8 call dword ptr [xmm] mov [c],dx end; xms_totalfree:=longint(c) shl 10; end; end; function xms_getmem; var c:word; begin xms_getmem:=0; if(xms_installed) then begin c:=word((len shr 10)+1); asm mov dx,[c] mov ah,9 call dword ptr [xmm] mov [c],dx end; xms_getmem:=c; end; end; function xms_freemem; var c:word; begin xms_freemem:=0; if(xms_installed) then begin asm mov dx,[buf] mov ah,10 call dword ptr [xmm] mov [c],ax end; xms_freemem:=c; end; end; function xms_movemem; var c:word; begin xms_movemem:=0; if(xms_installed) then begin asm push ds push si mov bx,word ptr [m+2] mov si,word ptr [m] mov ds,bx mov ah,11 call dword ptr [xmm] mov [c],ax pop si pop ds end; xms_movemem:=c; end; end; function xms_lock; var c:longint; begin xms_lock:=0; if(xms_installed) then begin asm mov dx,[buf] mov ah,12 call dword ptr [xmm] mov word ptr [c],bx mov word ptr [c+2],dx end; xms_lock:=c; end; end; function xms_unlock; var c:word; begin xms_unlock:=0; if(xms_installed) then begin asm mov dx,[buf] mov ah,13 call dword ptr [xmm] mov [c],ax end; xms_unlock:=c; end; end; function xms_getinfo; var c:longint; begin xms_getinfo:=0; if(xms_installed) then begin asm mov dx,[buf] mov ah,14 call dword ptr [xmm] mov word ptr [c],dx mov word ptr [c+2],bx end; xms_getinfo:=c; end; end; begin xms_installed:=false; xms_version; end. 
18.773381
79
0.50182
85e6f92d216c3e3f61dad8d77e10e8a989fe3771
1,059
pas
Pascal
uConsts.pas
DanScottNI/delphi-cowabunga
5a1eecdb85406bd6f6b470de37ed0f31349758ca
[ "MIT" ]
null
null
null
uConsts.pas
DanScottNI/delphi-cowabunga
5a1eecdb85406bd6f6b470de37ed0f31349758ca
[ "MIT" ]
null
null
null
uConsts.pas
DanScottNI/delphi-cowabunga
5a1eecdb85406bd6f6b470de37ed0f31349758ca
[ "MIT" ]
null
null
null
unit uConsts; interface uses GR32; type TObjDetect = record ObjType : integer; ObjIndex : Integer; end; const DEBUG : Boolean = True; CRLF : String = Chr(13) + Chr(10); { SolidityColours : Array [0..15] of TColor32 = (clBlue32,clLightGray32, clYellow32,clMaroon32,clGreen32,clOlive32,clNavy32,clPurple32,clTeal32, clRed32,clLime32,clBlue32,clFuchsia32,clAqua32,$FFD09EF6,$FFA7F5F0);} // The editing modes. MAPEDITINGMODE : Byte = 0; OBJECTEDITINGMODE : Byte = 1; // The various types of objects. OBJENEMY : Integer = 1; OBJSPECIAL : Integer =2; OBJENTRANCE : Integer = 3; OBJBOSS : Integer = 4; // Used in list loading UNKNOWNENEMY : String = 'N\A'; // View Options VIEWENEMIES : Byte = 1; VIEWSPECIALOBJECTS : Byte = 2; VIEWBOSSDATA : Byte = 4; VIEWEXITDATA : Byte = 8; VIEWENTRANCEDATA : Byte =16; // The type of open dialog to use USECUSTOMOPENDIALOG : Byte = 0; USESTANDARDOPENDIALOG : Byte = 1; // The size of the level map blocks LEVELMAPBLOCKSIZE : Byte = 12; implementation end.
24.627907
75
0.687441
8358e5812d23d19d3eaf297975325e531077fdfe
4,682
pas
Pascal
Libraries/Spring4D/Source/Persistence/Criteria/Spring.Persistence.Criteria.Criterion.InExpression.pas
jpluimers/Concepts
78598ab6f1b4206bbc4ed9c7bc15705ad4ade1fe
[ "Apache-2.0" ]
2
2020-01-04T08:19:10.000Z
2020-02-19T22:25:38.000Z
Libraries/Spring4D/Source/Persistence/Criteria/Spring.Persistence.Criteria.Criterion.InExpression.pas
jpluimers/Concepts
78598ab6f1b4206bbc4ed9c7bc15705ad4ade1fe
[ "Apache-2.0" ]
null
null
null
Libraries/Spring4D/Source/Persistence/Criteria/Spring.Persistence.Criteria.Criterion.InExpression.pas
jpluimers/Concepts
78598ab6f1b4206bbc4ed9c7bc15705ad4ade1fe
[ "Apache-2.0" ]
1
2020-02-19T22:25:42.000Z
2020-02-19T22:25:42.000Z
{***************************************************************************} { } { Spring Framework for Delphi } { } { Copyright (c) 2009-2016 Spring4D Team } { } { http://www.spring4d.org } { } {***************************************************************************} { } { 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. } { } {***************************************************************************} {$I Spring.inc} unit Spring.Persistence.Criteria.Criterion.InExpression; interface uses Rtti, Spring, Spring.Collections, Spring.Persistence.Criteria.Criterion.SimpleExpression, Spring.Persistence.SQL.Commands, Spring.Persistence.SQL.Interfaces, Spring.Persistence.SQL.Params, Spring.Persistence.SQL.Types; type TInExpression = class(TSimpleExpression) private fValues: TArray<TValue>; fIgnoreCase: Boolean; function ValuesToSeparatedString: string; protected function ToSqlString(const params: IList<TDBParam>; const command: TWhereCommand; const generator: ISQLGenerator; addToCommand: Boolean): string; override; public constructor Create(const propertyName: string; const values: TArray<TValue>; whereOperator: TWhereOperator; ignoreCase: Boolean); reintroduce; end; TInExpression<T> = class(TInExpression) public constructor Create(const propertyName: string; const values: TArray<T>; whereOperator: TWhereOperator; caseSensitive: Boolean); reintroduce; end; implementation uses SysUtils, TypInfo; {$REGION 'TInExpression'} constructor TInExpression.Create(const propertyName: string; const values: TArray<TValue>; whereOperator: TWhereOperator; ignoreCase: Boolean); begin inherited Create(propertyName, TValue.Empty, whereOperator); fValues := values; fIgnoreCase := ignoreCase; end; function TInExpression.ToSqlString(const params: IList<TDBParam>; const command: TWhereCommand; const generator: ISQLGenerator; addToCommand: Boolean): string; var whereField: TSQLWhereField; begin whereField := TSQLWhereField.Create(PropertyName, GetCriterionTable(command), fIgnoreCase); whereField.WhereOperator := WhereOperator; whereField.RightSQL := ValuesToSeparatedString; Result := generator.GenerateWhere(whereField); if addToCommand then command.WhereFields.Add(whereField) else whereField.Free; end; function TInExpression.ValuesToSeparatedString: string; var i: Integer; value: TValue; s: string; begin if fValues = nil then Exit('NULL'); Result := '('; for i := Low(fValues) to High(fValues) do begin if i > 0 then Result := Result + ','; value := fValues[i]; if value.IsString then s := QuotedStr(value.AsString) else s := value.ToString; if fIgnoreCase then s := AnsiUpperCase(s); Result := Result + s; end; Result := Result + ')'; end; {$ENDREGION} {$REGION 'TInExpression<T>'} constructor TInExpression<T>.Create(const propertyName: string; const values: TArray<T>; whereOperator: TWhereOperator; caseSensitive: Boolean); var i: Integer; begin inherited Create(propertyName, nil, whereOperator, caseSensitive); SetLength(fValues, Length(values)); for i := Low(values) to High(values) do fValues[i] := TValue.From<T>(values[i]); end; {$ENDREGION} end.
32.289655
93
0.555318
f10ebd34554838e889f590869b0f848981b8398c
373
dpr
Pascal
Demos/Camera/CameraDemo.dpr
barlone/Kastri
fb12d9eba242e67efd87eb1cb7acd123601a58ed
[ "MIT" ]
259
2020-05-27T03:15:19.000Z
2022-03-24T16:35:02.000Z
Demos/Camera/CameraDemo.dpr
talentedexpert0057/Kastri
aacc0db96957ea850abb7b407be5a0722462eb5a
[ "MIT" ]
95
2020-06-16T09:46:06.000Z
2022-03-28T00:27:07.000Z
Demos/Camera/CameraDemo.dpr
talentedexpert0057/Kastri
aacc0db96957ea850abb7b407be5a0722462eb5a
[ "MIT" ]
56
2020-06-04T19:32:40.000Z
2022-03-26T15:32:47.000Z
program CameraDemo; {$R 'Data.res' 'Data.rc'} uses System.StartUpCopy, FMX.Forms, CD.View.Main in 'Views\CD.View.Main.pas' {MainView}, CD.View.Camera in 'Views\CD.View.Camera.pas' {CameraView}, CD.Types in 'Core\CD.Types.pas'; {$R *.res} begin Application.Initialize; Application.CreateForm(TMainView, MainView); Application.Run; end.
19.631579
61
0.670241
f16085240fc25dbacbc5c2f444c184544404d21a
279
dpr
Pascal
Projects/Lazarus_Bible/2010/Fishy.dpr
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
11
2017-06-17T05:13:45.000Z
2021-07-11T13:18:48.000Z
Projects/Lazarus_Bible/D24/Fishy.dpr
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
2
2019-03-05T12:52:40.000Z
2021-12-03T12:34:26.000Z
Projects/Lazarus_Bible/DXE2/Fishy.dpr
joecare99/Public
9eee060fbdd32bab33cf65044602976ac83f4b83
[ "MIT" ]
6
2017-09-07T09:10:09.000Z
2022-02-19T20:19:58.000Z
program Fishy; uses Forms, Frm_FishyMAIN in '..\Source\FISHY\Frm_FishyMAIN.PAS' {MainForm}; {$R *.RES} {$E EXE} begin Application.Initialize; Application.Title := 'Demo: Fishy'; Application.CreateForm(TMainForm, MainForm); Application.Run; end.
21.461538
68
0.663082
83afca03f60697a152dc250b68ae4a18c58cca48
13,808
pas
Pascal
src/core/USettings.pas
gabbieian38/PascalCoin
f33df61aa50e5280788f9f1f28c11f2de9a7a4dc
[ "MIT" ]
1
2020-06-07T08:58:10.000Z
2020-06-07T08:58:10.000Z
src/core/USettings.pas
Grumpy-Dwarf/PascalCoin
514d07d4d6c9238bc52350db842f0a77340861b8
[ "MIT" ]
null
null
null
src/core/USettings.pas
Grumpy-Dwarf/PascalCoin
514d07d4d6c9238bc52350db842f0a77340861b8
[ "MIT" ]
null
null
null
unit USettings; { Copyright (c) 2018 by Herman Schoenfeld Distributed under the MIT software license, see the accompanying file LICENSE or visit http://www.opensource.org/licenses/mit-license.php. This unit is a part of the PascalCoin Project, an infinitely scalable cryptocurrency. Find us here: Web: https://www.pascalcoin.org Source: https://github.com/PascalCoin/PascalCoin Acknowledgements - Albert Molina: this unit just wraps PascalCoin settings designed by Albert THIS LICENSE HEADER MUST NOT BE REMOVED. } {$IFDEF FPC} {$mode delphi} {$ENDIF} {$I ./../config.inc} interface uses UAppParams, UBaseTypes, UCommon; const // App Params CT_PARAM_GridAccountsStream = 'GridAccountsStreamV2'; CT_PARAM_DefaultFee = 'DefaultFee'; CT_PARAM_InternetServerPort = 'InternetServerPort'; {$IFDEF TESTNET}CT_PARAM_AutomaticMineWhenConnectedToNodes = 'AutomaticMineWhenConnectedToNodes';{$ENDIF} CT_PARAM_MinerPrivateKeyType = 'MinerPrivateKeyType'; CT_PARAM_MinerPrivateKeySelectedPublicKey = 'MinerPrivateKeySelectedPublicKey'; CT_PARAM_SaveLogFiles = 'SaveLogFiles'; CT_PARAM_SaveDebugLogs = 'SaveDebugLogs'; CT_PARAM_ShowLogs = 'ShowLogs'; CT_PARAM_MinerName = 'MinerName'; CT_PARAM_RunCount = 'RunCount'; CT_PARAM_FirstTime = 'FirstTime'; CT_PARAM_ShowModalMessages = 'ShowModalMessages'; {$IFDEF TESTNET}CT_PARAM_MaxCPUs = 'MaxCPUs'; {$ENDIF} //deprecated CT_PARAM_PeerCache = 'PeerCache'; CT_PARAM_TryToConnectOnlyWithThisFixedServers = 'TryToConnectOnlyWithFixedServers'; CT_PARAM_JSONRPCMinerServerPort = 'JSONRPCMinerServerPort'; CT_PARAM_JSONRPCMinerServerActive = 'JSONRPCMinerServerActive'; CT_PARAM_JSONRPCEnabled = 'JSONRPCEnabled'; CT_PARAM_JSONRPCAllowedIPs = 'JSONRPCAllowedIPs'; CT_PARAM_HashRateAvgBlocksCount = 'HashRateAvgBlocksCount'; CT_PARAM_ShowHashRateAs = 'ShowHashRateAs'; CT_PARAM_AllowDownloadNewCheckpointIfOlderThan = 'AllowDownloadNewCheckpointIfOlderThan'; CT_PARAM_MinFutureBlocksToDownloadNewSafebox = 'MinFutureBlocksToDownloadNewSafebox'; type { TMinerPrivateKeyType } TMinerPrivateKeyType = (mpk_NewEachTime, mpk_Random, mpk_Selected); { TSettings } TSettings = class private class var FOnChanged : TNotifyManyEvent; class var FAppParams : TAppParams; class function GetAllowDownloadNewCheckpointIfOlderThan: Boolean; static; class function GetInternetServerPort : Integer; static; class function GetMinFutureBlocksToDownloadNewSafebox: Integer; static; class procedure SetAllowDownloadNewCheckpointIfOlderThan(ABool: Boolean); static; class procedure SetInternetServerPort(AInt:Integer); static; class function GetRpcPortEnabled : boolean; static; class procedure SetMinFutureBlocksToDownloadNewSafebox(AInt: Integer); static; class procedure SetRpcPortEnabled(ABool: boolean); static; class function GetDefaultFee : Int64; static; class procedure SetDefaultFee(AInt64: Int64); static; class function GetMinerPrivateKeyType : TMinerPrivateKeyType; static; class procedure SetMinerPrivateKeyType(AType: TMinerPrivateKeyType); static; class function GetMinerSelectedPrivateKey : TRawBytes; static; class procedure SetMinerSelectedPrivateKey(AKey:TRawBytes); static; class function GetMinerServerRpcActive : boolean; static; class procedure SetMinerServerRpcActive(ABool: Boolean); static; class function GetMinerServerRpcPort : Integer; static; class procedure SetMinerServerRpcPort(APort: Integer); static; class function GetSaveLogFiles : boolean; static; class procedure SetSaveLogFiles(ABool: boolean); static; class function GetShowLogs : boolean; static; class procedure SetShowLogs(ABool: boolean); static; class function GetSaveDebugLogs : boolean; static; class procedure SetSaveDebugLogs(ABool: boolean); static; class function GetMinerName : string; static; class procedure SetMinerName(AName: string); static; class function GetRunCount : Integer; static; class procedure SetRunCount(AInt: Integer); static; class function GetShowModalMessages : boolean; static; class procedure SetShowModalMessages(ABool: boolean); static; class function GetRpcAllowedIPs : string; static; class procedure SetRpcAllowedIPs(AString: string); static; class function GetPeerCache : string; static; class procedure SetPeerCache(AString: string); static; class function GetTryConnectOnlyWithThisFixedServers : string; static; class procedure SetTryConnectOnlyWithThisFixedServers(AString: string); static; class procedure CheckLoaded; class procedure NotifyOnChanged; public class procedure Load; class procedure Save; class property OnChanged : TNotifyManyEvent read FOnChanged; class property InternetServerPort : Integer read GetInternetServerPort write SetInternetServerPort; class property RpcPortEnabled : boolean read GetRpcPortEnabled write SetRpcPortEnabled; class property RpcAllowedIPs : string read GetRpcAllowedIPs write SetRpcAllowedIPs; class property DefaultFee : Int64 read GetDefaultFee write SetDefaultFee; class property MinerPrivateKeyType : TMinerPrivateKeyType read GetMinerPrivateKeyType write SetMinerPrivateKeyType; class property MinerSelectedPrivateKey : TRawBytes read GetMinerSelectedPrivateKey write SetMinerSelectedPrivateKey; class property MinerServerRpcActive : boolean read GetMinerServerRpcActive write SetMinerServerRpcActive; class property MinerServerRpcPort : Integer read GetMinerServerRpcPort write SetMinerServerRpcPort; class property SaveLogFiles : boolean read GetSaveLogFiles write SetSaveLogFiles; class property ShowLogs : boolean read GetShowLogs write SetShowLogs; class property SaveDebugLogs : boolean read GetSaveDebugLogs write SetSaveDebugLogs; class property MinerName : string read GetMinerName write SetMinerName; class property RunCount : Integer read GetRunCount write SetRunCount; class property ShowModalMessages : boolean read GetShowModalMessages write SetShowModalMessages; class property PeerCache : string read GetPeerCache write SetPeerCache; class property TryConnectOnlyWithThisFixedServers : string read GetTryConnectOnlyWithThisFixedServers write SetTryConnectOnlyWithThisFixedServers; class property MinFutureBlocksToDownloadNewSafebox : Integer read GetMinFutureBlocksToDownloadNewSafebox write SetMinFutureBlocksToDownloadNewSafebox; class property AllowDownloadNewCheckpointIfOlderThan : Boolean read GetAllowDownloadNewCheckpointIfOlderThan write SetAllowDownloadNewCheckpointIfOlderThan; class property AppParams : TAppParams read FAppParams; end; implementation uses Classes, SysUtils, UConst, UNode; { TSettings } class procedure TSettings.Load; begin FAppParams := TAppParams.Create(nil); FAppParams.FileName := TNode.GetPascalCoinDataFolder+PathDelim+'AppParams.prm'; end; class procedure TSettings.Save; begin //TODO Update FAppParams to optionally save on set value, and make FApp.Save public and verify all AppParams updates in client code end; class function TSettings.GetInternetServerPort : Integer; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_InternetServerPort].GetAsInteger(CT_NetServer_Port); end; class function TSettings.GetAllowDownloadNewCheckpointIfOlderThan: Boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_AllowDownloadNewCheckpointIfOlderThan].GetAsBoolean(False); end; class function TSettings.GetMinFutureBlocksToDownloadNewSafebox: Integer; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_MinFutureBlocksToDownloadNewSafebox].GetAsInteger(0); end; class procedure TSettings.SetAllowDownloadNewCheckpointIfOlderThan(ABool: Boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_AllowDownloadNewCheckpointIfOlderThan].SetAsBoolean(ABool); end; class procedure TSettings.SetInternetServerPort(AInt:Integer); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_InternetServerPort].SetAsInteger(AInt); end; class function TSettings.GetRpcPortEnabled : boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_JSONRPCEnabled].GetAsBoolean(false); end; class procedure TSettings.SetMinFutureBlocksToDownloadNewSafebox(AInt: Integer); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_MinFutureBlocksToDownloadNewSafebox].SetAsInteger(AInt); end; class procedure TSettings.SetRpcPortEnabled(ABool: boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_JSONRPCEnabled].SetAsBoolean(ABool); end; class function TSettings.GetRpcAllowedIPs : string; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_JSONRPCAllowedIPs].GetAsString('127.0.0.1;'); end; class procedure TSettings.SetRpcAllowedIPs(AString: string); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_JSONRPCAllowedIPs].SetAsString(AString); end; class function TSettings.GetDefaultFee : Int64; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_DefaultFee].GetAsInt64(0); end; class procedure TSettings.SetDefaultFee(AInt64: Int64); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_DefaultFee].SetAsInt64(AInt64); end; class function TSettings.GetMinerServerRpcActive : boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_JSONRPCMinerServerActive].GetAsBoolean(true); end; class procedure TSettings.SetMinerServerRpcActive(ABool: Boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_JSONRPCMinerServerActive].SetAsBoolean(ABool); end; class function TSettings.GetMinerServerRpcPort : Integer; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_JSONRPCMinerServerPort].GetAsInteger(CT_JSONRPCMinerServer_Port); end; class procedure TSettings.SetMinerServerRpcPort(APort: Integer); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_JSONRPCMinerServerPort].SetAsInteger(APort) end; class function TSettings.GetMinerPrivateKeyType : TMinerPrivateKeyType; begin CheckLoaded; Result := TMinerPrivateKeyType(FAppParams.ParamByName[CT_PARAM_MinerPrivateKeyType].GetAsInteger(Integer(mpk_Random))) end; class procedure TSettings.SetMinerPrivateKeyType(AType: TMinerPrivateKeyType); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_MinerPrivateKeyType].SetAsInteger(Integer(AType)); end; class function TSettings.GetMinerSelectedPrivateKey : TRawBytes; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_MinerPrivateKeySelectedPublicKey].GetAsTBytes(Nil); end; class procedure TSettings.SetMinerSelectedPrivateKey(AKey:TRawBytes); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_MinerPrivateKeySelectedPublicKey].SetAsTBytes(AKey); end; class function TSettings.GetSaveLogFiles : boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_SaveLogFiles].GetAsBoolean(false); end; class procedure TSettings.SetSaveLogFiles(ABool: boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_SaveLogFiles].SetAsBoolean(ABool); end; class function TSettings.GetShowLogs : boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_ShowLogs].GetAsBoolean(false); end; class procedure TSettings.SetShowLogs(ABool: boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_ShowLogs].SetAsBoolean(ABool); end; class function TSettings.GetSaveDebugLogs : boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_SaveDebugLogs].GetAsBoolean(false); end; class procedure TSettings.SetSaveDebugLogs(ABool: boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_SaveDebugLogs].SetAsBoolean(ABool); end; class function TSettings.GetMinerName : string; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_MinerName].GetAsString('Anonymous Miner') end; class procedure TSettings.SetMinerName(AName: string); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_MinerName].SetAsString(AName); end; class function TSettings.GetRunCount : Integer; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_RunCount].GetAsInteger(0) end; class procedure TSettings.SetRunCount(AInt: Integer); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_RunCount].SetAsInteger(AInt) end; class function TSettings.GetShowModalMessages : boolean; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_ShowModalMessages].GetAsBoolean(false); end; class procedure TSettings.SetShowModalMessages(ABool: boolean); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_ShowModalMessages].SetAsBoolean(ABool); end; class function TSettings.GetPeerCache : string; begin CheckLoaded; Result := FAppParams.ParamByName[CT_PARAM_PeerCache].GetAsString(''); end; class procedure TSettings.SetPeerCache(AString: string); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_PeerCache].SetAsString(AString); end; class function TSettings.GetTryConnectOnlyWithThisFixedServers : string; begin CheckLoaded; Result := Trim(FAppParams.ParamByName[CT_PARAM_TryToConnectOnlyWithThisFixedServers].GetAsString('')); end; class procedure TSettings.SetTryConnectOnlyWithThisFixedServers(AString: string); begin CheckLoaded; FAppParams.ParamByName[CT_PARAM_TryToConnectOnlyWithThisFixedServers].SetAsString(Trim(AString)); end; class procedure TSettings.CheckLoaded; begin if not Assigned(FAppParams) then raise Exception.Create('Application settings have not been loaded'); end; class procedure TSettings.NotifyOnChanged; begin FOnChanged.Invoke(nil); end; initialization TSettings.FAppParams := nil; finalization if Assigned(TSettings.FAppParams) then FreeAndNil(TSettings.FAppParams); end.
35.587629
162
0.809386
f149e1911f3acf13aae0d144ebefb17481f275a0
1,535
pas
Pascal
Chapter10/RECIPE04/Delphi/MainFMX.pas
PacktPublishing/DelphiCookbookThirdEdition
760fd16277dd21a75320571c664553af33e29950
[ "MIT" ]
51
2018-08-03T06:27:36.000Z
2022-03-16T09:10:10.000Z
Chapter10/RECIPE04/Delphi/MainFMX.pas
PacktPublishing/DelphiCookbookThirdEdition
760fd16277dd21a75320571c664553af33e29950
[ "MIT" ]
1
2021-02-07T16:26:57.000Z
2021-03-02T06:36:26.000Z
Chapter10/RECIPE04/Delphi/MainFMX.pas
PacktPublishing/DelphiCookbookThirdEdition
760fd16277dd21a75320571c664553af33e29950
[ "MIT" ]
28
2018-08-03T22:20:00.000Z
2021-12-02T03:49:03.000Z
unit MainFMX; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, FMX.ScrollBox, FMX.Memo; type TMainForm = class(TForm) Switch1: TSwitch; ToolBar1: TToolBar; Label1: TLabel; Label2: TLabel; Memo1: TMemo; ToolBar2: TToolBar; procedure Switch1Switch(Sender: TObject); private { Private declarations } function SendCmd(PCMD: string): string; public { Public declarations } end; var MainForm: TMainForm; implementation uses System.StrUtils, IdException; {$R *.fmx} function TMainForm.SendCmd(PCMD: string): string; var LTCPClient: TIdTCPClient; begin Result := ''; LTCPClient := TIdTCPClient.Create(nil); try LTCPClient.Host := '192.168.1.83'; // change with your RPI ip address LTCPClient.Port := 8008; try LTCPClient.Connect; LTCPClient.SendCmd(PCMD); except on E: EIdConnClosedGracefully do begin end; on E: Exception do Memo1.Lines.Add(E.Message); end; if not LTCPClient.IOHandler.InputBufferIsEmpty then Result := LTCPClient.IOHandler.AllData; finally LTCPClient.Disconnect; LTCPClient.Free; end; end; procedure TMainForm.Switch1Switch(Sender: TObject); var LCMD: String; begin LCMD := 'L' + ifthen(Switch1.IsChecked, '1', '0'); SendCmd(LCMD); end; end.
20.743243
78
0.691857
830a29cc6a0a1d486551fd02f06ba3a8c81ebf84
19,255
pas
Pascal
include/epanet2.pas
owr7/EPANET
9572acd3771a301e41ba2dcf9620f6e1839275d8
[ "MIT" ]
7
2018-06-19T22:12:50.000Z
2019-06-05T14:19:47.000Z
include/epanet2.pas
owr7/EPANET
9572acd3771a301e41ba2dcf9620f6e1839275d8
[ "MIT" ]
5
2019-02-08T20:56:29.000Z
2019-09-19T13:13:16.000Z
include/epanet2.pas
owr7/EPANET
9572acd3771a301e41ba2dcf9620f6e1839275d8
[ "MIT" ]
1
2021-02-01T18:39:59.000Z
2021-02-01T18:39:59.000Z
unit epanet2; { Declarations of imported procedures from the EPANET PROGRAMMERs TOOLKIT } { (EPANET2.DLL) } {Last updated on 7/18/19} interface const { These are codes used by the DLL functions } EN_MAXID = 31; { Max. # characters in ID name } EN_MAXMSG = 255; { Max. # characters in strings } EN_ELEVATION = 0; { Node parameters } EN_BASEDEMAND = 1; EN_PATTERN = 2; EN_EMITTER = 3; EN_INITQUAL = 4; EN_SOURCEQUAL = 5; EN_SOURCEPAT = 6; EN_SOURCETYPE = 7; EN_TANKLEVEL = 8; EN_DEMAND = 9; EN_HEAD = 10; EN_PRESSURE = 11; EN_QUALITY = 12; EN_SOURCEMASS = 13; EN_INITVOLUME = 14; EN_MIXMODEL = 15; EN_MIXZONEVOL = 16; EN_TANKDIAM = 17; EN_MINVOLUME = 18; EN_VOLCURVE = 19; EN_MINLEVEL = 20; EN_MAXLEVEL = 21; EN_MIXFRACTION = 22; EN_TANK_KBULK = 23; EN_TANKVOLUME = 24; EN_MAXVOLUME = 25; EN_CANOVERFLOW = 26; EN_DEMANDDEFICIT = 27; EN_DIAMETER = 0; { Link parameters } EN_LENGTH = 1; EN_ROUGHNESS = 2; EN_MINORLOSS = 3; EN_INITSTATUS = 4; EN_INITSETTING = 5; EN_KBULK = 6; EN_KWALL = 7; EN_FLOW = 8; EN_VELOCITY = 9; EN_HEADLOSS = 10; EN_STATUS = 11; EN_SETTING = 12; EN_ENERGY = 13; EN_LINKQUAL = 14; EN_LINKPATTERN = 15; EN_PUMP_STATE = 16; EN_PUMP_EFFIC = 17; EN_PUMP_POWER = 18; EN_PUMP_HCURVE = 19; EN_PUMP_ECURVE = 20; EN_PUMP_ECOST = 21; EN_PUMP_EPAT = 22; EN_DURATION = 0; { Time parameters } EN_HYDSTEP = 1; EN_QUALSTEP = 2; EN_PATTERNSTEP = 3; EN_PATTERNSTART = 4; EN_REPORTSTEP = 5; EN_REPORTSTART = 6; EN_RULESTEP = 7; EN_STATISTIC = 8; EN_PERIODS = 9; EN_STARTTIME = 10; EN_HTIME = 11; EN_QTIME = 12; EN_HALTFLAG = 13; EN_NEXTEVENT = 14; EN_NEXTEVENTTANK = 15; EN_ITERATIONS = 0; { Analysis statistics } EN_RELATIVEERROR = 1; EN_MAXHEADERROR = 2; EN_MAXFLOWCHANGE = 3; EN_MASSBALANCE = 4; EN_DEFICIENTNODES = 5; EN_DEMANDREDUCTION = 6; EN_NODE = 0; { Component Types } EN_LINK = 1; EN_TIMEPAT = 2; EN_CURVE = 3; EN_CONTROL = 4; EN_RULE = 5; EN_NODECOUNT = 0; { Component counts } EN_TANKCOUNT = 1; EN_LINKCOUNT = 2; EN_PATCOUNT = 3; EN_CURVECOUNT = 4; EN_CONTROLCOUNT = 5; EN_RULECOUNT = 6; EN_JUNCTION = 0; { Node types } EN_RESERVOIR = 1; EN_TANK = 2; EN_CVPIPE = 0; { Link types } EN_PIPE = 1; EN_PUMP = 2; EN_PRV = 3; EN_PSV = 4; EN_PBV = 5; EN_FCV = 6; EN_TCV = 7; EN_GPV = 8; EN_CLOSED = 0; { Link status types } EN_OPEN = 1; EN_PUMP_XHEAD = 0; { Pump state types } EN_PUMP_CLOSED = 2; EN_PUMP_OPEN = 3; EN_PUMP_XFLOW = 5; EN_NONE = 0; { Quality analysis types } EN_CHEM = 1; EN_AGE = 2; EN_TRACE = 3; EN_CONCEN = 0; { Source quality types } EN_MASS = 1; EN_SETPOINT = 2; EN_FLOWPACED = 3; EN_HW = 0; { Head loss formulas } EN_DW = 1; EN_CM = 2; EN_CFS = 0; { Flow units types } EN_GPM = 1; EN_MGD = 2; EN_IMGD = 3; EN_AFD = 4; EN_LPS = 5; EN_LPM = 6; EN_MLD = 7; EN_CMH = 8; EN_CMD = 9; EN_DDA = 0; { Demand model types } EN_PDA = 1; EN_TRIALS = 0; { Option types } EN_ACCURACY = 1; EN_TOLERANCE = 2; EN_EMITEXPON = 3; EN_DEMANDMULT = 4; EN_HEADERROR = 5; EN_FLOWCHANGE = 6; EN_HEADLOSSFORM = 7; EN_GLOBALEFFIC = 8; EN_GLOBALPRICE = 9; EN_GLOBALPATTERN = 10; EN_DEMANDCHARGE = 11; EN_SP_GRAVITY = 12; EN_SP_VISCOS = 13; EN_EXTRA_ITER = 14; EN_CHECKFREQ = 15; EN_MAXCHECK = 16; EN_DAMPLIMIT = 17; EN_SP_DIFFUS = 18; EN_BULKORDER = 19; EN_WALLORDER = 20; EN_TANKORDER = 21; EN_CONCENLIMIT = 22; EN_LOWLEVEL = 0; { Control types } EN_HILEVEL = 1; EN_TIMER = 2; EN_TIMEOFDAY = 3; EN_SERIES = 0; { Report statistic types } EN_AVERAGE = 1; EN_MINIMUM = 2; EN_MAXIMUM = 3; EN_RANGE = 4; EN_MIX1 = 0; { Tank mixing models } EN_MIX2 = 1; EN_FIFO = 2; EN_LIFO = 3; EN_NOSAVE = 0; { Hydraulics flags } EN_SAVE = 1; EN_INITFLOW = 10; EN_SAVE_AND_INIT = 11; EN_CONST_HP = 0; { Pump curve types } EN_POWER_FUNC = 1; EN_CUSTOM = 2; EN_NOCURVE = 3; EN_VOLUME_CURVE = 0; { Curve types } EN_PUMP_CURVE = 1; EN_EFFIC_CURVE = 2; EN_HLOSS_CURVE = 3; EN_GENERIC_CURVE = 4; EN_UNCONDITIONAL = 0; { Deletion action codes } EN_CONDITIONAL = 1; EN_NO_REPORT = 0; { Status reporting levels } EN_NORMAL_REPORT = 1; EN_FULL_REPORT = 2; EN_R_NODE = 6; { Rule-based control objects } EN_R_LINK = 7; EN_R_SYSTEM = 8; EN_R_DEMAND = 0; { Rule-based control variables } EN_R_HEAD = 1; EN_R_GRADE = 2; EN_R_LEVEL = 3; EN_R_PRESSURE = 4; EN_R_FLOW = 5; EN_R_STATUS = 6; EN_R_SETTING = 7; EN_R_POWER = 8; EN_R_TIME = 9; EN_R_CLOCKTIME = 10; EN_R_FILLTIME = 11; EN_R_DRAINTIME = 12; EN_R_EQ = 0; { Rule-based control operators } EN_R_NE = 1; EN_R_LE = 2; EN_R_GE = 3; EN_R_LT = 4; EN_R_GT = 5; EN_R_IS = 6; EN_R_NOT = 7; EN_R_BELOW = 8; EN_R_ABOVE = 9; EN_R_IS_OPEN = 1; { Rule-based control link status } EN_R_IS_CLOSED = 2; EN_R_IS_ACTIVE = 3; EpanetLib = 'epanet2.dll'; {Project Functions} function ENepanet(F1: PAnsiChar; F2: PAnsiChar; F3: PAnsiChar; F4: Pointer): Integer; stdcall; external EpanetLib; function ENinit(F2: PAnsiChar; F3: PAnsiChar; UnitsType: Integer; HeadlossType: Integer): Integer; stdcall; external EpanetLib; function ENopen(F1: PAnsiChar; F2: PAnsiChar; F3: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetcount(Code: Integer; var Count: Integer): Integer; stdcall; external EpanetLib; function ENgettitle(Line1: PAnsiChar; Line2: PAnsiChar; Line3: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsettitle(Line1: PAnsiChar; Line2: PAnsiChar; Line3: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetcomment(ObjType: Integer; Index: Integer; Comment: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetcomment(ObjType: Integer; Index: Integer; Comment: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsaveinpfile(F: PAnsiChar): Integer; stdcall; external EpanetLib; function ENclose: Integer; stdcall; external EpanetLib; {Hydraulic Functions} function ENsolveH: Integer; stdcall; external EpanetLib; function ENsaveH: Integer; stdcall; external EpanetLib; function ENopenH: Integer; stdcall; external EpanetLib; function ENinitH(SaveFlag: Integer): Integer; stdcall; external EpanetLib; function ENrunH(var T: LongInt): Integer; stdcall; external EpanetLib; function ENnextH(var Tstep: LongInt): Integer; stdcall; external EpanetLib; function ENcloseH: Integer; stdcall; external EpanetLib; function ENsavehydfile(F: PAnsiChar): Integer; stdcall; external EpanetLib; function ENusehydfile(F: PAnsiChar): Integer; stdcall; external EpanetLib; {Quality Functions} function ENsolveQ: Integer; stdcall; external EpanetLib; function ENopenQ: Integer; stdcall; external EpanetLib; function ENinitQ(SaveFlag: Integer): Integer; stdcall; external EpanetLib; function ENrunQ(var T: LongInt): Integer; stdcall; external EpanetLib; function ENnextQ(var Tstep: LongInt): Integer; stdcall; external EpanetLib; function ENstepQ(var Tleft: LongInt): Integer; stdcall; external EpanetLib; function ENcloseQ: Integer; stdcall; external EpanetLib; {Reporting Functions} function ENwriteline(S: PAnsiChar): Integer; stdcall; external EpanetLib; function ENreport: Integer; stdcall; external EpanetLib; function ENcopyreport(F: PAnsiChar): Integer; stdcall; external EpanetLib; function ENclearreport: Integer; stdcall; external EpanetLib; function ENresetreport: Integer; stdcall; external EpanetLib; function ENsetreport(S: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetstatusreport(Code: Integer): Integer; stdcall; external EpanetLib; function ENgetversion(var Version: Integer): Integer; stdcall; external EpanetLib; function ENgeterror(Errcode: Integer; Errmsg: PAnsiChar; MaxLen: Integer): Integer; stdcall; external EpanetLib; function ENgetstatistic(StatType: Integer; var Value: Single): Integer; stdcall; external EpanetLib; {Analysis Options Functions} function ENgetoption(Code: Integer; var Value: Single): Integer; stdcall; external EpanetLib; function ENsetoption(Code: Integer; Value: Single): Integer; stdcall; external EpanetLib; function ENgetflowunits(var Code: Integer): Integer; stdcall; external EpanetLib; function ENsetflowunits(Code: Integer): Integer; stdcall; external EpanetLib; function ENgettimeparam(Code: Integer; var Value: LongInt): Integer; stdcall; external EpanetLib; function ENsettimeparam(Code: Integer; Value: LongInt): Integer; stdcall; external EpanetLib; function ENgetqualinfo(var QualType: Integer; ChemName: PAnsiChar; ChemUnits: PAnsiChar; var TraceNode: Integer): Integer; stdcall; external EpanetLib; function ENgetqualtype(var QualCode: Integer; var TraceNode: Integer): Integer; stdcall; external EpanetLib; function ENsetqualtype(QualCode: Integer; ChemName: PAnsiChar; ChemUnits: PAnsiChar; TraceNodeID: PAnsiChar): Integer; stdcall; external EpanetLib; {Node Functions} function ENaddnode(ID: PAnsiChar; NodeType: Integer): Integer; stdcall; external EpanetLib; function ENdeletenode(Index: Integer; ActionCode: Integer): Integer; stdcall; external EpanetLib; function ENgetnodeindex(ID: PAnsiChar; var Index: Integer): Integer; stdcall; external EpanetLib; function ENgetnodeid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetnodeid(Index: Integer; NewID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetnodetype(Index: Integer; var Code: Integer): Integer; stdcall; external EpanetLib; function ENgetnodevalue(Index: Integer; Code: Integer; var Value: Single): Integer; stdcall; external EpanetLib; function ENsetnodevalue(Index: Integer; Code: Integer; Value: Single): Integer; stdcall; external EpanetLib; function ENsetjuncdata(Index: Integer; Elev: Single; Dmnd: Single; DmndPat: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsettankdata(Index: Integer; Elev, InitLvl, MinLvl, MaxLvl, Diam, MinVol: Single; VolCurve: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetcoord(Index: Integer; var X: Double; var Y: Double): Integer; stdcall; external EpanetLib; function ENsetcoord(Index: Integer; X: Double; Y: Double): Integer; stdcall; external EpanetLib; {Demand Functions} function ENgetdemandmodel(var Model: Integer; var Pmin: Single; var Preq: Single; var Pexp: Single): Integer; stdcall; external EpanetLib; function ENsetdemandmodel(Model: Integer; Pmin: Single; Preq: Single; Pexp: Single): Integer; stdcall; external EpanetLib; function ENgetnumdemands(NodeIndex: Integer; var NumDemands: Integer): Integer; stdcall; external EpanetLib; function ENadddemand(NodeIndex: Integer; BaseDemand: Single; PatIndex: Integer; DemandName: PAnsiChar): Integer; stdcall; external EpanetLib; function ENdeletedemand(NodeIndex: Integer; DemandIndex: Integer): Integer; stdcall; external EpanetLib; function ENgetdemandindex(NodeIndex: Integer; DemandName: PAnsiString; var DemandIndex: Integer): Integer; stdcall; external EpanetLib; function ENgetbasedemand(NodeIndex: Integer; DemandIndex: Integer; var BaseDemand: Single): Integer; stdcall; external EpanetLib; function ENsetbasedemand(NodeIndex: Integer; DemandIndex: Integer; BaseDemand: Single): Integer; stdcall; external EpanetLib; function ENgetdemandpattern(NodeIndex: Integer; DemandIndex: Integer; var PatIndex: Integer): Integer; stdcall; external EpanetLib; function ENsetdemandpattern(NodeIndex: Integer; DemandIndex: Integer; PatIndex: Integer): Integer; stdcall; external EpanetLib; function ENgetdemandname(NodeIndex: Integer; DemandIndex: Integer; DemandName: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetdemandname(NodeIndex: Integer; DemandIndex: Integer; DemandName: PAnsiChar): Integer; stdcall; external EpanetLib; {Link Functions} function ENaddlink(ID: PAnsiChar; LinkType: Integer; FromNode: PAnsiChar; ToNode: PAnsiChar): Integer; stdcall; external EpanetLib; function ENdeletelink(Index: Integer; ActionCode: Integer): Integer; stdcall; external EpanetLib; function ENgetlinkindex(ID: PAnsiChar; var Index: Integer): Integer; stdcall; external EpanetLib; function ENgetlinkid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetlinkid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetlinktype(Index: Integer; var Code: Integer): Integer; stdcall; external EpanetLib; function ENsetlinktype(var Index: Integer; LinkType: Integer; ActionCode: Integer): Integer; stdcall; external EpanetLib; function ENgetlinknodes(Index: Integer; var Node1: Integer; var Node2: Integer): Integer; stdcall; external EpanetLib; function ENsetlinknodes(Index: Integer; Node1: Integer; Node2: Integer): Integer; stdcall; external EpanetLib; function ENgetlinkvalue(Index: Integer; Code: Integer; var Value: Single): Integer; stdcall; external EpanetLib; function ENsetlinkvalue(Index: Integer; Code: Integer; Value: Single): Integer; stdcall; external EpanetLib; function ENsetpipedata(Index: Integer; Length: Single; Diam: Single; Rough: Single; Mloss:Single): Integer; stdcall; external EpanetLib; {Pump Functions} function ENgetpumptype(LinkIndex: Integer; var PumpType: Integer): Integer; stdcall; external EpanetLib; function ENgetheadcurveindex(LinkIndex: Integer; var CurveIndex: Integer): Integer; stdcall; external EpanetLib; function ENsetheadcurveindex(LinkIndex: Integer; CurveIndex: Integer): Integer; stdcall; external EpanetLib; {Pattern Functions} function ENaddpattern(ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENdeletepattern(Index: Integer): Integer; stdcall; external EpanetLib; function ENgetpatternindex(ID: PAnsiChar; var Index: Integer): Integer; stdcall; external EpanetLib; function ENgetpatternid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetpatternid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetpatternlen(Index: Integer; var Len: Integer): Integer; stdcall; external EpanetLib; function ENgetpatternvalue(Index: Integer; Period: Integer; var Value: Single): Integer; stdcall; external EpanetLib; function ENsetpatternvalue(Index: Integer; Period: Integer; Value: Single): Integer; stdcall; external EpanetLib; function ENgetaveragepatternvalue(Index: Integer; var Value: Single): Integer; stdcall; external EpanetLib; function ENsetpattern(Index: Integer; F: array of Single; N: Integer): Integer; stdcall; external EpanetLib; {Curve Functions} function ENaddcurve(ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENdeletecurve(Index: Integer): Integer; stdcall; external EpanetLib; function ENgetcurveindex(ID: PAnsiChar; var Index: Integer): Integer; stdcall; external EpanetLib; function ENgetcurveid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENsetcurveid(Index: Integer; ID: PAnsiChar): Integer; stdcall; external EpanetLib; function ENgetcurvelen(Index: Integer; var Len: Integer): Integer; stdcall; external EpanetLib; function ENgetcurvetype(Index: Integer; var CurveType: Integer): Integer; stdcall; external EpanetLib; function ENgetcurvevalue(CurveIndex: Integer; PointIndex: Integer; var X: Single; var Y: Single): Integer; stdcall; external EpanetLib; function ENsetcurvevalue(CurveIndex: Integer; PointIndex: Integer; X: Single; Y: Single): Integer; stdcall; external EpanetLib; function ENgetcurve(Index: Integer; ID: PAnsiChar; var N: Integer; var X: array of Single; var Y: array of Single): Integer; stdcall; external EpanetLib; function ENsetcurve(Index: Integer; X: array of Single; Y: array of Single; N: Integer): Integer; stdcall; external EpanetLib; {Control Functions} function ENaddcontrol(Ctype: Integer; Link: Integer; Setting: Single; Node: Integer; Level: Single; var Index: Integer): Integer; stdcall; external EpanetLib; function ENdeletecontrol(Index: Integer): Integer; stdcall; external EpanetLib; function ENgetcontrol(Index: Integer; var Ctype: Integer; var Link: Integer; var Setting: Single; var Node: Integer; var Level: Single): Integer; stdcall; external EpanetLib; function ENsetcontrol(Index: Integer; Ctype: Integer; Link: Integer; Setting: Single; Node: Integer; Level: Single): Integer; stdcall; external EpanetLib; {Rule-Based Control Functions} function ENaddrule(Rule: PAnsiString): Integer; stdcall; external EpanetLib; function ENdeleterule(Index: Integer): Integer; stdcall; external EpanetLib; function ENgetrule(Index: Integer; var Npremises: Integer; var NthenActions: Integer; var NelseActions: Integer; var Priority: Single): Integer; stdcall; external EpanetLib; function ENgetruleID(Index: Integer; ID: PAnsiString): Integer; stdcall; external EpanetLib; function ENsetrulepriority(Index: Integer; Priority: Single): Integer; stdcall; external EpanetLib; function ENgetpremise(RuleIndex: Integer; PremiseIndex: Integer; var LogOp: Integer; var ObjType: Integer; var ObjIndex: Integer; var Param: Integer; var RelOp: Integer; var Status: Integer; var Value: Single): Integer; stdcall; external EpanetLib; function ENsetpremise(RuleIndex: Integer; PremiseIndex: Integer; LogOp: Integer; ObjType: Integer; ObjIndex: Integer; Param: Integer; RelOp: Integer; Status: Integer; Value: Single): Integer; stdcall; external EpanetLib; function ENsetpremiseindex(RuleIndex: Integer; PremiseIndex: Integer; ObjIndex: Integer): Integer; stdcall; external EpanetLib; function ENsetpremisestatus(RuleIndex: Integer; PremiseIndex: Integer; Status: Integer): Integer; stdcall; external EpanetLib; function ENsetpremisevalue(RuleIndex: Integer; PremiseIndex: Integer; Value: Single): Integer; stdcall; external EpanetLib; function ENgetthenaction(RuleIndex: Integer; ActionIndex: Integer; var LinkIndex: Integer; var Status: Integer; var Setting: Single): Integer; stdcall; external EpanetLib; function ENsetthenaction(RuleIndex: Integer; ActionIndex: Integer; LinkIndex: Integer; Status: Integer; Setting: Single): Integer; stdcall; external EpanetLib; function ENgetelseaction(RuleIndex: Integer; ActionIndex: Integer; var LinkIndex: Integer; var Status: Integer; var Setting: Single): Integer; stdcall; external EpanetLib; function ENsetelseaction(RuleIndex: Integer; ActionIndex: Integer; LinkIndex: Integer; Status: Integer; Setting: Single): Integer; stdcall; external EpanetLib; implementation end.
46.064593
176
0.725734
83ef866990c5d39723d4970ac8c9fa67ba542fc5
196
dpr
Pascal
demos/ListaImpresoras/PPrinterList.dpr
atkins126/GLibWMI
e719b0f8cff946675e09344aa8a4c2dac25c92de
[ "Apache-2.0" ]
87
2019-04-04T06:23:14.000Z
2022-03-19T16:44:26.000Z
demos/ListaImpresoras/PPrinterList.dpr
atkins126/GLibWMI
e719b0f8cff946675e09344aa8a4c2dac25c92de
[ "Apache-2.0" ]
2
2020-09-04T01:54:26.000Z
2020-10-27T15:52:04.000Z
demos/ListaImpresoras/PPrinterList.dpr
atkins126/GLibWMI
e719b0f8cff946675e09344aa8a4c2dac25c92de
[ "Apache-2.0" ]
14
2019-04-08T13:59:48.000Z
2022-01-13T08:12:38.000Z
program PPrinterList; uses Forms, FMainList in 'FMainList.pas' {FormMain}; {$R *.res} begin Application.Initialize; Application.CreateForm(TFormMain, FormMain); Application.Run; end.
14
46
0.734694
f11247e057dd219264340c8cf605c071d4a4b981
750
dfm
Pascal
windows/src/ext/jedi/jvcl/tests/restructured/examples/JvScreenCapture/fScreenCapture.dfm
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
219
2017-06-21T03:37:03.000Z
2022-03-27T12:09:28.000Z
windows/src/ext/jedi/jvcl/tests/restructured/examples/JvScreenCapture/fScreenCapture.dfm
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/examples/JvScreenCapture/fScreenCapture.dfm
bravogeorge/keyman
c0797e36292de903d7313214d1f765e3d9a2bf4d
[ "MIT" ]
72
2017-05-26T04:08:37.000Z
2022-03-03T10:26:20.000Z
object Form1: TForm1 Left = 200 Top = 157 Width = 703 Height = 587 Caption = 'Form1' 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 object Image1: TImage Left = 56 Top = 74 Width = 537 Height = 391 Stretch = True end object Button1: TButton Left = 84 Top = 20 Width = 75 Height = 25 Caption = 'Capture' TabOrder = 0 OnClick = Button1Click end object Button2: TButton Left = 168 Top = 18 Width = 139 Height = 25 Caption = 'Place on clipboard' TabOrder = 1 OnClick = Button2Click end end
17.857143
34
0.616
83daf4958088c0637625a4a634594d7fe331a74a
64,441
pas
Pascal
pa maps/diadem.pas
superouman/PAMaps
cb3f033ea91fc54fdc7611908df7f55306a00e5c
[ "Unlicense" ]
null
null
null
pa maps/diadem.pas
superouman/PAMaps
cb3f033ea91fc54fdc7611908df7f55306a00e5c
[ "Unlicense" ]
null
null
null
pa maps/diadem.pas
superouman/PAMaps
cb3f033ea91fc54fdc7611908df7f55306a00e5c
[ "Unlicense" ]
null
null
null
{ "name": "Diadem", "planets": [ { "name": "Diadem", "mass": 10000, "position_x": 91200, "position_y": -1300, "velocity_x": 1.0552821159362793, "velocity_y": 74.0323257446289, "required_thrust_to_move": 0, "starting_planet": true, "planet": { "seed": 123587, "radius": 500, "heightRange": 0, "waterHeight": 34, "waterDepth": 50, "temperature": 80, "metalDensity": 0, "metalClusters": 0, "biomeScale": 50, "biome": "tropical", "symmetryType": "terrain and CSG", "symmetricalMetal": true, "symmetricalStarts": false, "numArmies": 2, "landingZonesPerArmy": 0, "landingZoneSize": 0 }, "source": { "metal_spots": [ [ 337.85003662109375, -254.14242553710938, 331.562255859375 ], [ 337.85003662109375, -254.14242553710938, -331.562255859375 ], [ 399.97100830078125, -136.26519775390625, 332.7745361328125 ], [ 399.97100830078125, -136.26519775390625, -332.7745361328125 ], [ -174.826171875, -382.81719970703125, 334.9393005371094 ], [ -174.826171875, -382.81719970703125, -334.9393005371094 ], [ -49.29290771484375, -419.37518310546875, 335.95977783203125 ], [ -49.29290771484375, -419.37518310546875, -335.95977783203125 ], [ -407.9141845703125, 86.76522064208984, 340.2080993652344 ], [ -407.9141845703125, 86.76522064208984, -340.2080993652344 ], [ -415.1911315917969, -45.374671936035156, 341.0251159667969 ], [ -415.1911315917969, -45.374671936035156, -341.0251159667969 ], [ 317.7774658203125, 285.79620361328125, 324.93096923828125 ], [ 317.7774658203125, 285.79620361328125, -324.93096923828125 ], [ 215.63128662109375, 369.4425048828125, 322.8546142578125 ], [ 215.63128662109375, 369.4425048828125, -322.8546142578125 ], [ 75.93124389648438, -463.29998779296875, 177.6605224609375 ], [ 75.93124389648438, -463.29998779296875, -177.6605224609375 ], [ 187.86239624023438, -439.2626953125, 155.25633239746094 ], [ 187.86239624023438, -439.2626953125, -155.25633239746094 ], [ 280.70086669921875, -373.11669921875, 182.85841369628906 ], [ 280.70086669921875, -373.11669921875, -182.85841369628906 ], [ 128.70346069335938, -300.25390625, -376.8111572265625 ], [ 128.70346069335938, -300.25390625, 376.8111572265625 ], [ -251.76824951171875, -187.76654052734375, -386.6827392578125 ], [ -251.76824951171875, -187.76654052734375, 386.6827392578125 ], [ 317.95098876953125, 67.2939453125, -376.90521240234375 ], [ 317.95098876953125, 67.2939453125, 376.90521240234375 ], [ 478.9569091796875, 149.88739013671875, 0.6866788864135742 ], [ 476.828125, 149.693603515625, 45.6456298828125 ], [ 476.828125, 149.693603515625, -45.6456298828125 ], [ -440.1144104003906, -237.4561767578125, -0.05090522766113281 ], [ -439.27911376953125, -234.6346435546875, -45.994895935058594 ], [ -439.27911376953125, -234.6346435546875, 45.994895935058594 ], [ -42.755706787109375, 138.24267578125, -472.7205810546875 ], [ -42.755706787109375, 138.24267578125, 472.7205810546875 ], [ -73.01861572265625, 214.7327880859375, -439.7548828125 ], [ -73.01861572265625, 214.7327880859375, 439.7548828125 ], [ -10.41656494140625, 52.4854736328125, -492.2161865234375 ], [ -10.41656494140625, 52.4854736328125, 492.2161865234375 ], [ 45.286224365234375, 155.195068359375, -468.3446044921875 ], [ 45.286224365234375, 155.195068359375, 468.3446044921875 ], [ -108.25955200195312, 95.5379638671875, -473.6849365234375 ], [ -108.25955200195312, 95.5379638671875, 473.6849365234375 ], [ -173.20492553710938, 457.72216796875, 93.09257507324219 ], [ -173.20492553710938, 457.72216796875, -93.09257507324219 ], [ -229.77883911132812, 443.30078125, -1.1545867919921875 ], [ -133.5123291015625, 480.2406005859375, 1.3404388427734375 ], [ 343.62237548828125, 338.96844482421875, -133.07260131835938 ], [ 343.62237548828125, 338.96844482421875, 133.07260131835938 ], [ 257.627685546875, 406.540771484375, -134.09066772460938 ], [ 257.627685546875, 406.540771484375, 134.09066772460938 ], [ -472.2679443359375, 75.92341613769531, 150.03176879882812 ], [ -472.2679443359375, 75.92341613769531, -150.03176879882812 ], [ -477.62060546875, -38.02647399902344, 146.36473083496094 ], [ -477.62060546875, -38.02647399902344, -146.36473083496094 ], [ -309.75225830078125, -347.75531005859375, 180.11227416992188 ], [ -309.75225830078125, -347.75531005859375, -180.11227416992188 ], [ 465.3802490234375, -20.890167236328125, 181.7191162109375 ], [ 465.3802490234375, -20.890167236328125, -181.7191162109375 ], [ 419.116455078125, 206.92881774902344, 179.68099975585938 ], [ 419.116455078125, 206.92881774902344, -179.68099975585938 ], [ -424.783447265625, -184.86154174804688, 190.28514099121094 ], [ -424.783447265625, -184.86154174804688, -190.28514099121094 ], [ 241.433837890625, 295.59820556640625, 375.7586975097656 ], [ 241.433837890625, 295.59820556640625, -375.7586975097656 ], [ 332.066162109375, -174.9276123046875, 383.8232727050781 ], [ 332.066162109375, -174.9276123046875, -383.8232727050781 ], [ -100.835205078125, -365.46533203125, 382.33837890625 ], [ -100.835205078125, -365.46533203125, -382.33837890625 ], [ -367.8023681640625, 18.287723541259766, 391.61065673828125 ], [ -367.8023681640625, 18.287723541259766, -391.61065673828125 ] ], "landing_zones": [ [ -406.281494140625, -291.4329833984375, 9.657814025878906 ], [ 490.819091796875, 102.54656982421875, 6.410499572753906 ] ] }, "planetCSG": [ { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ -4.81758975982666, -0.8378430604934692, -1.0434799194335938, -104.34799194335938, 1.3382195234298706, -3.0162346363067627, -3.756527900695801, -375.6528015136719, 1.1920928955078125e-7, -3.8987631797790527, 3.130439519882202, 313.0439453125 ], "op": "BO_Add", "rotation": 2.870645761489868, "scale": [ 5, 5, 5 ], "height": 500, "position": [ -100, -360, 300 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ 0.25478166341781616, 3.191917896270752, -3.8401496410369873, -384.01495361328125, 4.993504524230957, -0.16285982728004456, 0.19593462347984314, 19.593461990356445, 2.086162567138672e-7, -3.8451449871063232, -3.1960697174072266, -319.6069641113281 ], "op": "BO_Add", "rotation": 1.51981782913208, "scale": [ 5, 5, 5 ], "height": 500, "position": [ -408.8524169921875, 20.860733032226562, -340.2786865234375 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ -4.81758975982666, 0.837842583656311, -1.0434798002243042, -104.34798431396484, 1.3382192850112915, 3.0162343978881836, -3.756527900695801, -375.6528015136719, 2.384185791015625e-7, -3.8987631797790527, -3.130438804626465, -313.04388427734375 ], "op": "BO_Add", "rotation": 2.870645761489868, "scale": [ 5, 5, 5 ], "height": 500, "position": [ -100, -360, -300 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ 2.320246696472168, -2.7756168842315674, 3.4514355659484863, 344.0252380371094, 4.429008483886719, 1.4378609657287598, -1.8211092948913574, -181.5208740234375, 0.01840353012084961, 3.902372121810913, 3.125884532928467, 311.57562255859375 ], "op": "BO_Add", "rotation": 1.0899993181228638, "scale": [ 5, 5, 5 ], "height": 498.37994384765625, "position": [ 344.02520751953125, -181.5208740234375, 311.57568359375 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ 2.346322536468506, 2.7536096572875977, 3.4514353275299072, 344.0252380371094, 4.415249824523926, -1.479570746421814, -1.8211092948913574, -181.5208740234375, 0.01840364933013916, 3.902371883392334, -3.125885009765625, -311.57568359375 ], "op": "BO_Add", "rotation": 1.0899993181228638, "scale": [ 5, 5, 5 ], "height": 498.37994384765625, "position": [ 344.02520751953125, -181.5208740234375, -311.57568359375 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ 0.2566767930984497, -3.1864635944366455, -3.8445498943328857, -384.1683044433594, 4.993407249450684, 0.16379432380199432, 0.1976218968629837, 19.747453689575195, 7.450580596923828e-8, -3.849625587463379, 3.190670967102051, 318.82916259765625 ], "op": "BO_Add", "rotation": 1.51943838596344, "scale": [ 5, 5, 5 ], "height": 499.62713623046875, "position": [ -409.772705078125, 21.0635986328125, 340.07879638671875 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_04.json", "proj": "BP_Bend", "transform": [ 0.20344668626785278, 0.39473363757133484, 0.8959882259368896, 448.5549011230469, -0.9787807464599609, 0.10484815388917923, 0.17605435848236084, 88.13736724853516, -0.024448126554489136, -0.9127936959266663, 0.4076887369155884, 204.0995330810547 ], "op": "BO_Add", "rotation": -1.3499988317489624, "scale": [ 1, 1, 1 ], "height": 500.6258850097656, "position": [ 448.55487060546875, 88.13735961914062, 204.0995330810547 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_04.json", "proj": "BP_Bend", "transform": [ 0.20344668626785278, 0.39473363757133484, 0.8959882259368896, 448.5549011230469, -0.9787807464599609, 0.10484815388917923, 0.17605435848236084, 88.13736724853516, 0.024448126554489136, 0.9127936959266663, -0.4076887369155884, -204.0995330810547 ], "op": "BO_Add", "rotation": -1.3499988317489624, "scale": [ 1, 1, 1 ], "height": 500.6258850097656, "position": [ 448.55487060546875, 88.13735961914062, 204.0995330810547 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_04.json", "proj": "BP_Bend", "transform": [ 0.9206336736679077, -0.1307232677936554, 0.3678927719593048, 184.55825805664062, 0.389226496219635, 0.3811524212360382, -0.8385854363441467, -420.68743896484375, -0.03060057759284973, 0.9152235984802246, 0.40178269147872925, 201.55958557128906 ], "op": "BO_Add", "rotation": 0.37999990582466125, "scale": [ 1, 1, 1 ], "height": 501.6631774902344, "position": [ 184.55825805664062, -420.6874694824219, 201.55953979492188 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_04.json", "proj": "BP_Bend", "transform": [ 0.9206336736679077, -0.1307232677936554, 0.3678927719593048, 184.55825805664062, 0.389226496219635, 0.3811524212360382, -0.8385854363441467, -420.68743896484375, 0.03060057759284973, -0.9152235984802246, -0.40178269147872925, -201.55958557128906 ], "op": "BO_Add", "rotation": 0.37999990582466125, "scale": [ 1, 1, 1 ], "height": 501.6631774902344, "position": [ 184.55825805664062, -420.6874694824219, 201.55953979492188 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_04.json", "proj": "BP_Bend", "transform": [ 0.6013585925102234, 0.2955734133720398, -0.742296576499939, -371.24273681640625, -0.797209620475769, 0.2837740182876587, -0.5328500866889954, -266.49285888671875, 0.05314815044403076, 0.9121999740600586, 0.4062838554382324, 203.19363403320312 ], "op": "BO_Add", "rotation": -0.8899994492530823, "scale": [ 1, 1, 1 ], "height": 500.12725830078125, "position": [ -371.2427673339844, -266.49285888671875, 203.19363403320312 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_04.json", "proj": "BP_Bend", "transform": [ 0.6013585925102234, 0.2955734133720398, -0.742296576499939, -371.24273681640625, -0.797209620475769, 0.2837740182876587, -0.5328500866889954, -266.49285888671875, -0.05314815044403076, -0.9121999740600586, -0.4062838554382324, -203.19363403320312 ], "op": "BO_Add", "rotation": -0.8899994492530823, "scale": [ 1, 1, 1 ], "height": 500.12725830078125, "position": [ -371.2427673339844, -266.49285888671875, 203.19363403320312 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ 3.8723015785217285, 1.9321067333221436, 2.5044445991516113, 249.19627380371094, -3.1631126403808594, 2.3652970790863037, 3.0659565925598145, 305.0675964355469, 0, -3.958829641342163, 3.0541229248046875, 303.89013671875 ], "op": "BO_Add", "rotation": -0.6849347352981567, "scale": [ 5, 5, 5 ], "height": 497.5080261230469, "position": [ 249.1962890625, 305.067626953125, 303.8901062011719 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_12.json", "proj": "BP_Bend", "transform": [ 3.8723015785217285, 1.9321067333221436, 2.5044445991516113, 249.19627380371094, -3.1631126403808594, 2.3652970790863037, 3.0659565925598145, 305.0675964355469, 0, 3.958829641342163, -3.0541229248046875, -303.89013671875 ], "op": "BO_Add", "rotation": -0.6849347352981567, "scale": [ 5, 5, 5 ], "height": 497.5080261230469, "position": [ 249.1962890625, 305.067626953125, 303.8901062011719 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": true, "mergeable": false, "no_features": true, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_05.json", "proj": "BP_Bend", "transform": [ 0.793495774269104, 0.561132550239563, -1.1914527416229248, -297.2259826660156, 0.0013342201709747314, 0.9540897607803345, 1.2300570011138916, 306.85638427734375, 0.9134889841079712, -0.48881733417510986, 1.0331504344940186, 257.73504638671875 ], "op": "BO_Add", "rotation": -0.3099993169307709, "scale": [ 1.2099997997283936, 1.2099997997283936, 2 ], "height": 498.93035888671875, "position": [ -297.2259826660156, 306.8564147949219, 257.7350769042969 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_05.json", "proj": "BP_Bend", "transform": [ 0.7934956550598145, 0.561132550239563, -1.1914527416229248, -297.2259826660156, 0.001334160566329956, 0.9540897607803345, 1.2300570011138916, 306.8564147949219, -0.9134889841079712, 0.4888172745704651, -1.0331504344940186, -257.73504638671875 ], "op": "BO_Add", "rotation": -0.30999934673309326, "scale": [ 1.2099997997283936, 1.2099997997283936, 2 ], "height": 498.93035888671875, "position": [ -297.2259826660156, 306.8564147949219, 257.7350769042969 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_05.json", "proj": "BP_Bend", "transform": [ 0.43220844864845276, -1.1278388500213623, -0.12004830688238144, -29.851551055908203, 0.5759596228599548, 0.15290287137031555, 1.7406387329101562, 432.8321533203125, -0.9724020957946777, -0.41073083877563477, 0.9776324033737183, 243.100830078125 ], "op": "BO_Add", "rotation": 1.2399991750717163, "scale": [ 1.2099997997283936, 1.2099997997283936, 2 ], "height": 497.3256530761719, "position": [ -29.851551055908203, 432.8321533203125, 243.100830078125 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_05.json", "proj": "BP_Bend", "transform": [ 0.43220844864845276, -1.1278388500213623, -0.12004830688238144, -29.851552963256836, 0.5759596228599548, 0.15290287137031555, 1.7406387329101562, 432.8321838378906, 0.9724020957946777, 0.41073083877563477, -0.9776324033737183, -243.100830078125 ], "op": "BO_Add", "rotation": 1.2399991750717163, "scale": [ 1.2099997997283936, 1.2099997997283936, 2 ], "height": 497.3256530761719, "position": [ -29.851551055908203, 432.8321533203125, 243.100830078125 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_05.json", "proj": "BP_Bend", "transform": [ 0.4214678406715393, -1.1318292617797852, -0.121768519282341, -29.54896354675293, 0.5774909257888794, 0.14649534225463867, 1.7407582998275757, 422.42120361328125, -0.9762012958526611, -0.401996910572052, 0.9772069454193115, 237.13397216796875 ], "op": "BO_Add", "rotation": 1.2499991655349731, "scale": [ 1.2099997997283936, 1.2099997997283936, 2 ], "height": 485.3301086425781, "position": [ -30.279571533203125, 432.86572265625, 242.99722290039062 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": false, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] }, { "weight": [ 1, 1, 1, 1 ], "spec": "/pa/terrain/metal/brushes/metal_structure_05.json", "proj": "BP_Bend", "transform": [ 0.4214678406715393, -1.1318292617797852, -0.121768519282341, -29.548961639404297, 0.5774909257888794, 0.14649534225463867, 1.7407582998275757, 422.4211730957031, 0.9762012958526611, 0.401996910572052, -0.9772069454193115, -237.1339569091797 ], "op": "BO_Add", "rotation": 1.2499991655349731, "scale": [ 1.2099997997283936, 1.2099997997283936, 2 ], "height": 485.3301086425781, "position": [ -30.279571533203125, 432.86572265625, 242.99722290039062 ], "weightHard": false, "weightScale": [ 1, 1, 1 ], "mirrored": true, "twinId": 0, "flooded": false, "pathable": false, "mergeable": false, "no_features": false, "biomeColor": [ 0, 0, 0, 1 ] } ], "metal_spots": [ [ 337.85003662109375, -254.14242553710938, 331.562255859375 ], [ 337.85003662109375, -254.14242553710938, -331.562255859375 ], [ 399.97100830078125, -136.26519775390625, 332.7745361328125 ], [ 399.97100830078125, -136.26519775390625, -332.7745361328125 ], [ -174.826171875, -382.81719970703125, 334.9393005371094 ], [ -174.826171875, -382.81719970703125, -334.9393005371094 ], [ -49.29290771484375, -419.37518310546875, 335.95977783203125 ], [ -49.29290771484375, -419.37518310546875, -335.95977783203125 ], [ -407.9141845703125, 86.76522064208984, 340.2080993652344 ], [ -407.9141845703125, 86.76522064208984, -340.2080993652344 ], [ -415.1911315917969, -45.374671936035156, 341.0251159667969 ], [ -415.1911315917969, -45.374671936035156, -341.0251159667969 ], [ 317.7774658203125, 285.79620361328125, 324.93096923828125 ], [ 317.7774658203125, 285.79620361328125, -324.93096923828125 ], [ 215.63128662109375, 369.4425048828125, 322.8546142578125 ], [ 215.63128662109375, 369.4425048828125, -322.8546142578125 ], [ 75.93124389648438, -463.29998779296875, 177.6605224609375 ], [ 75.93124389648438, -463.29998779296875, -177.6605224609375 ], [ 187.86239624023438, -439.2626953125, 155.25633239746094 ], [ 187.86239624023438, -439.2626953125, -155.25633239746094 ], [ 280.70086669921875, -373.11669921875, 182.85841369628906 ], [ 280.70086669921875, -373.11669921875, -182.85841369628906 ], [ 128.70346069335938, -300.25390625, -376.8111572265625 ], [ 128.70346069335938, -300.25390625, 376.8111572265625 ], [ -251.76824951171875, -187.76654052734375, -386.6827392578125 ], [ -251.76824951171875, -187.76654052734375, 386.6827392578125 ], [ 317.95098876953125, 67.2939453125, -376.90521240234375 ], [ 317.95098876953125, 67.2939453125, 376.90521240234375 ], [ 478.9569091796875, 149.88739013671875, 0.6866788864135742 ], [ 476.828125, 149.693603515625, 45.6456298828125 ], [ 476.828125, 149.693603515625, -45.6456298828125 ], [ -440.1144104003906, -237.4561767578125, -0.05090522766113281 ], [ -439.27911376953125, -234.6346435546875, -45.994895935058594 ], [ -439.27911376953125, -234.6346435546875, 45.994895935058594 ], [ -42.755706787109375, 138.24267578125, -472.7205810546875 ], [ -42.755706787109375, 138.24267578125, 472.7205810546875 ], [ -73.01861572265625, 214.7327880859375, -439.7548828125 ], [ -73.01861572265625, 214.7327880859375, 439.7548828125 ], [ -10.41656494140625, 52.4854736328125, -492.2161865234375 ], [ -10.41656494140625, 52.4854736328125, 492.2161865234375 ], [ 45.286224365234375, 155.195068359375, -468.3446044921875 ], [ 45.286224365234375, 155.195068359375, 468.3446044921875 ], [ -108.25955200195312, 95.5379638671875, -473.6849365234375 ], [ -108.25955200195312, 95.5379638671875, 473.6849365234375 ], [ -173.20492553710938, 457.72216796875, 93.09257507324219 ], [ -173.20492553710938, 457.72216796875, -93.09257507324219 ], [ -229.77883911132812, 443.30078125, -1.1545867919921875 ], [ -133.5123291015625, 480.2406005859375, 1.3404388427734375 ], [ 343.62237548828125, 338.96844482421875, -133.07260131835938 ], [ 343.62237548828125, 338.96844482421875, 133.07260131835938 ], [ 257.627685546875, 406.540771484375, -134.09066772460938 ], [ 257.627685546875, 406.540771484375, 134.09066772460938 ], [ -472.2679443359375, 75.92341613769531, 150.03176879882812 ], [ -472.2679443359375, 75.92341613769531, -150.03176879882812 ], [ -477.62060546875, -38.02647399902344, 146.36473083496094 ], [ -477.62060546875, -38.02647399902344, -146.36473083496094 ], [ -309.75225830078125, -347.75531005859375, 180.11227416992188 ], [ -309.75225830078125, -347.75531005859375, -180.11227416992188 ], [ 465.3802490234375, -20.890167236328125, 181.7191162109375 ], [ 465.3802490234375, -20.890167236328125, -181.7191162109375 ], [ 419.116455078125, 206.92881774902344, 179.68099975585938 ], [ 419.116455078125, 206.92881774902344, -179.68099975585938 ], [ -424.783447265625, -184.86154174804688, 190.28514099121094 ], [ -424.783447265625, -184.86154174804688, -190.28514099121094 ], [ 241.433837890625, 295.59820556640625, 375.7586975097656 ], [ 241.433837890625, 295.59820556640625, -375.7586975097656 ], [ 332.066162109375, -174.9276123046875, 383.8232727050781 ], [ 332.066162109375, -174.9276123046875, -383.8232727050781 ], [ -100.835205078125, -365.46533203125, 382.33837890625 ], [ -100.835205078125, -365.46533203125, -382.33837890625 ], [ -367.8023681640625, 18.287723541259766, 391.61065673828125 ], [ -367.8023681640625, 18.287723541259766, -391.61065673828125 ] ], "landing_zones": [ [ -406.281494140625, -291.4329833984375, 9.657814025878906 ], [ 490.819091796875, 102.54656982421875, 6.410499572753906 ] ] } ] }
34.186207
80
0.277634
83285dc3a70f502acdfc1ce0c6cf2da6c1c553ec
18,240
pas
Pascal
Source/PXL.Textures.DX7.pas
svn2github/AsphyrePXL
e29f402b27b3133e3971ecd4a7f14dddf81c2e34
[ "Apache-2.0" ]
33
2018-03-19T15:54:14.000Z
2021-03-09T15:58:05.000Z
Source/PXL.Textures.DX7.pas
svn2github/AsphyrePXL
e29f402b27b3133e3971ecd4a7f14dddf81c2e34
[ "Apache-2.0" ]
2
2019-01-13T23:05:21.000Z
2019-02-03T08:06:13.000Z
Source/PXL.Textures.DX7.pas
svn2github/AsphyrePXL
e29f402b27b3133e3971ecd4a7f14dddf81c2e34
[ "Apache-2.0" ]
2
2019-01-21T08:52:17.000Z
2020-08-30T15:16:58.000Z
unit PXL.Textures.DX7; (* * This file is part of Asphyre Framework, also known as Platform eXtended Library (PXL). * Copyright (c) 2015 - 2017 Yuriy Kotsarenko. All rights reserved. * * 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. *) interface {$INCLUDE PXL.Config.inc} uses Windows, PXL.Windows.DDraw, PXL.Windows.D3D7, PXL.Types, PXL.Surfaces, PXL.Textures, PXL.Types.DX7; type TDX7LockableTexture = class(TCustomLockableTexture) private {$IFDEF AUTOREFCOUNT}[weak]{$ENDIF} FContext: TDX7DeviceContext; FSurface: IDirectDrawSurface7; FSurfaceDesc: DDSURFACEDESC2; FLockedRect: TIntRect; FLockedRectPtr: Pointer; function InitSurfaceDesc: Boolean; function CreateTextureSurface: Boolean; procedure DestroyTextureSurface; function GetSubSurface(const Level: Integer): IDirectDrawSurface7; function GetSubSurfaceSize(const Level: Integer): TPoint2i; procedure IntToLockRect(const Rect: PIntRect; var LockRect: Windows.TRect; var LockRectPtr: Windows.PRect); function LockRect(const Rect: PIntRect; const Level: Integer; out LockedPixels: TLockedPixels): Boolean; function UnlockRect(const Rect: PIntRect; const Level: Integer): Boolean; function GetPixelData(const Level: Integer; const Surface: TPixelSurface): Boolean; function SetPixelData(const Level: Integer; const Surface: TPixelSurface): Boolean; protected function DoInitialize: Boolean; override; procedure DoFinalize; override; function DoLock(const Rect: TIntRect; out LockedPixels: TLockedPixels): Boolean; override; function DoUnlock: Boolean; override; function DoCopyRect(const Source: TCustomBaseTexture; const SourceRect: TIntRect; const DestPos: TPoint2i): Boolean; override; function UpdateMipMaps: Boolean; virtual; public function Bind(const Channel: Integer): Boolean; override; property Context: TDX7DeviceContext read FContext; property Surface: IDirectDrawSurface7 read FSurface; property SurfaceDesc: DDSURFACEDESC2 read FSurfaceDesc; end; TDX7DrawableTexture = class(TCustomDrawableTexture) private {$IFDEF AUTOREFCOUNT}[weak]{$ENDIF} FContext: TDX7DeviceContext; FSurface: IDirectDrawSurface7; FSurfaceDesc: DDSURFACEDESC2; FPrevSurface: IDirectDrawSurface7; FPrevViewport: D3DVIEWPORT7; function InitSurfaceDesc: Boolean; function CreateTextureSurface: Boolean; procedure DestroyTextureSurface; protected function DoInitialize: Boolean; override; procedure DoFinalize; override; function DoCopyRect(const Source: TCustomBaseTexture; const SourceRect: TIntRect; const DestPos: TPoint2i): Boolean; override; public function Bind(const Channel: Integer): Boolean; override; function Clear: Boolean; override; function DeviceRestore: Boolean; override; procedure DeviceRelease; override; function BeginDraw: Boolean; override; procedure EndDraw; override; property Context: TDX7DeviceContext read FContext; property Surface: IDirectDrawSurface7 read FSurface; property SurfaceDesc: DDSURFACEDESC2 read FSurfaceDesc; end; implementation uses Math, PXL.Formats; {$REGION 'Global Functions'} function ComputeMipLevels(Width, Height: Integer): Integer; begin Result := 1; while (Width > 1) and (Height > 1) and (Width and 1 = 0) and (Height and 1 = 0) do begin Width := Width div 2; Height := Height div 2; Inc(Result); end; end; function RectToWinRect(const Rect: TIntRect): Windows.TRect; begin Result.Left := Rect.Left; Result.Top := Rect.Top; Result.Right := Rect.Right; Result.Bottom := Rect.Bottom; end; {$ENDREGION} {$REGION 'TDX7LockableTexture'} function TDX7LockableTexture.InitSurfaceDesc: Boolean; begin FillChar(FSurfaceDesc, SizeOf(DDSURFACEDESC2), 0); FSurfaceDesc.dwSize := SizeOf(DDSURFACEDESC2); FSurfaceDesc.dwFlags := DDSD_CAPS or DDSD_HEIGHT or DDSD_WIDTH or DDSD_PIXELFORMAT or DDSD_TEXTURESTAGE; FSurfaceDesc.ddsCaps.dwCaps := DDSCAPS_TEXTURE; FSurfaceDesc.ddsCaps.dwCaps2 := DDSCAPS2_TEXTUREMANAGE; FSurfaceDesc.dwWidth := Width; FSurfaceDesc.dwHeight := Height; if MipMapping then begin FSurfaceDesc.dwFlags := FSurfaceDesc.dwFlags or DDSD_MIPMAPCOUNT; FSurfaceDesc.ddsCaps.dwCaps := FSurfaceDesc.ddsCaps.dwCaps or DDSCAPS_MIPMAP or DDSCAPS_COMPLEX; FSurfaceDesc.dwMipMapCount := ComputeMipLevels(Width, Height); end; Result := TDX7DeviceContext.NativeToFormat(FPixelFormat, FSurfaceDesc.ddpfPixelFormat); end; function TDX7LockableTexture.CreateTextureSurface: Boolean; begin if (FContext.DD7Object = nil) or (not InitSurfaceDesc) then Exit(False); if Failed(FContext.DD7Object.CreateSurface(FSurfaceDesc, FSurface, nil)) then Exit(False); if Failed(FSurface.GetSurfaceDesc(FSurfaceDesc)) then begin FSurface := nil; Exit(False); end; Result := True; end; procedure TDX7LockableTexture.DestroyTextureSurface; begin FSurface := nil; FillChar(FSurfaceDesc, SizeOf(DDSURFACEDESC2), 0); end; function TDX7LockableTexture.DoInitialize: Boolean; begin if (Device = nil) or (not (Device.Context is TDX7DeviceContext)) then Exit(False); FContext := TDX7DeviceContext(Device.Context); if FPixelFormat = TPixelFormat.Unknown then FPixelFormat := TPixelFormat.A8R8G8B8; FPixelFormat := FContext.FindTextureFormat(FPixelFormat); if FPixelFormat = TPixelFormat.Unknown then Exit(False); FBytesPerPixel := FPixelFormat.Bytes; Result := CreateTextureSurface; end; procedure TDX7LockableTexture.DoFinalize; begin DestroyTextureSurface; FContext := nil; end; function TDX7LockableTexture.Bind(const Channel: Integer): Boolean; begin if (FContext.D3D7Device <> nil) and (FSurface <> nil) then Result := Succeeded(FContext.D3D7Device.SetTexture(Channel, FSurface)) else Result := False; end; function TDX7LockableTexture.GetSubSurface(const Level: Integer): IDirectDrawSurface7; var CurSurface, TempSurface: IDirectDrawSurface7; SubLevel: Integer; Caps: DDSCAPS2; begin if (FSurface = nil) or (Level < 0) then Exit(nil); if Level = 0 then Exit(FSurface); CurSurface := FSurface; SubLevel := Level; repeat FillChar(Caps, SizeOf(DDSCAPS2), 0); Caps.dwCaps := DDSCAPS_MIPMAP; if Failed(CurSurface.GetAttachedSurface(Caps, TempSurface)) then Exit(nil); CurSurface := TempSurface; Dec(SubLevel); until SubLevel <= 0; Result := CurSurface; end; function TDX7LockableTexture.GetSubSurfaceSize(const Level: Integer): TPoint2i; var SubSurface: IDirectDrawSurface7; SubDesc: DDSURFACEDESC2; begin SubSurface := GetSubSurface(Level); if SubSurface = nil then Exit(ZeroPoint2i); FillChar(SubDesc, SizeOf(DDSURFACEDESC2), 0); SubDesc.dwSize := SizeOf(DDSURFACEDESC2); if Succeeded(SubSurface.GetSurfaceDesc(SubDesc)) then begin Result.X := SubDesc.dwWidth; Result.Y := SubDesc.dwHeight; end else Result := ZeroPoint2i; end; procedure TDX7LockableTexture.IntToLockRect(const Rect: PIntRect; var LockRect: Windows.TRect; var LockRectPtr: Windows.PRect); begin if Rect <> nil then begin LockRect.Left := Rect.Left; LockRect.Top := Rect.Top; LockRect.Right := Rect.Right; LockRect.Bottom := Rect.Bottom; LockRectPtr := @LockRect; end else LockRectPtr := nil; end; function TDX7LockableTexture.LockRect(const Rect: PIntRect; const Level: Integer; out LockedPixels: TLockedPixels): Boolean; var SubSurface: IDirectDrawSurface7; SubDesc: DDSURFACEDESC2; LockRect: Windows.TRect; LockRectPtr: Windows.PRect; begin SubSurface := GetSubSurface(Level); if SubSurface = nil then begin LockedPixels.Reset; Exit(False); end; FillChar(SubDesc, SizeOf(DDSURFACEDESC2), 0); SubDesc.dwSize := SizeOf(DDSURFACEDESC2); IntToLockRect(Rect, LockRect, LockRectPtr); Result := Succeeded(SubSurface.Lock(LockRectPtr, SubDesc, DDLOCK_SURFACEMEMORYPTR or DDLOCK_WAIT, 0)); if Result then begin LockedPixels.Bits := SubDesc.lpSurface; LockedPixels.Pitch := SubDesc.lPitch; LockedPixels.BytesPerPixel := FBytesPerPixel; LockedPixels.PixelFormat := FPixelFormat; if Rect <> nil then LockedPixels.LockedRect := Rect^ else LockedPixels.LockedRect := IntRect(0, 0, Width, Height); end else LockedPixels.Reset; end; function TDX7LockableTexture.UnlockRect(const Rect: PIntRect; const Level: Integer): Boolean; var SubSurface: IDirectDrawSurface7; LockRect: Windows.TRect; LockRectPtr: Windows.PRect; begin SubSurface := GetSubSurface(Level); if SubSurface <> nil then begin IntToLockRect(Rect, LockRect, LockRectPtr); Result := Succeeded(SubSurface.Unlock(LockRectPtr)); end else Result := False; end; function TDX7LockableTexture.DoLock(const Rect: TIntRect; out LockedPixels: TLockedPixels): Boolean; begin if not IsLockRectFull(Rect) then begin FLockedRect := Rect; FLockedRectPtr := @FLockedRect; end else FLockedRectPtr := nil; if not LockRect(FLockedRectPtr, 0, LockedPixels) then begin LockedPixels.Reset; Exit(False) end; Result := True; end; function TDX7LockableTexture.DoUnlock: Boolean; begin if not UnlockRect(FLockedRectPtr, 0) then Exit(False); if MipMapping and (FSurfaceDesc.dwMipMapCount > 1) then Result := UpdateMipMaps else Result := True; end; function TDX7LockableTexture.GetPixelData(const Level: Integer; const Surface: TPixelSurface): Boolean; var SubSize: TPoint2i; LockedPixels: TLockedPixels; I, CopyBytes: Integer; begin if Surface = nil then Exit(False); SubSize := GetSubSurfaceSize(Level); if (SubSize.X < 1) or (SubSize.Y < 1) then Exit(False); Surface.SetSize(SubSize, FPixelFormat); if Surface.PixelFormat <> FPixelFormat then Exit(False); if not LockRect(nil, Level, LockedPixels) then Exit(False); try CopyBytes := SubSize.X * FBytesPerPixel; for I := 0 to SubSize.Y - 1 do Move(LockedPixels.Scanline[I]^, Surface.Scanline[I]^, CopyBytes); finally Result := UnlockRect(nil, Level); end; end; function TDX7LockableTexture.SetPixelData(const Level: Integer; const Surface: TPixelSurface): Boolean; var SubSize: TPoint2i; LockedPixels: TLockedPixels; I, CopyBytes: Integer; begin if (Surface = nil) or (Surface.PixelFormat <> FPixelFormat) then Exit(False); SubSize := GetSubSurfaceSize(Level); if (SubSize.X < 1) or (SubSize.Y < 1) then Exit(False); if not LockRect(nil, Level, LockedPixels) then Exit(False); try CopyBytes := Min(SubSize.X, Surface.Width) * FBytesPerPixel; for I := 0 to Min(SubSize.Y, Surface.Height) - 1 do Move(Surface.Scanline[I]^, LockedPixels.Scanline[I]^, CopyBytes); finally Result := UnlockRect(nil, Level); end; end; function TDX7LockableTexture.UpdateMipMaps: Boolean; var MipSurface: TPixelMipMapSurface; SubSurface: TPixelSurface; I: Integer; begin if (FSurface = nil) or (FSurfaceDesc.dwMipMapCount < 2) then Exit(False); MipSurface := TPixelMipMapSurface.Create; try if not GetPixelData(0, MipSurface) then Exit(False); MipSurface.GenerateMipMaps; for I := 1 to FSurfaceDesc.dwMipMapCount - 1 do begin SubSurface := MipSurface.MipMaps[I - 1]; if SubSurface = nil then Break; if not SetPixelData(I, SubSurface) then Break; end; finally MipSurface.Free; end; Result := True; end; function TDX7LockableTexture.DoCopyRect(const Source: TCustomBaseTexture; const SourceRect: TIntRect; const DestPos: TPoint2i): Boolean; var WinDestRect, WinSourceRect: Windows.TRect; begin if (Device <> nil) and (Source.Device = Device) and (FSurface <> nil) then begin if Source is TDX7LockableTexture then begin WinSourceRect := RectToWinRect(SourceRect); WinDestRect := RectToWinRect(IntRect(DestPos, SourceRect.Size)); Result := Succeeded(FSurface.Blt(@WinDestRect, TDX7LockableTexture(Source).Surface, @WinSourceRect, DDBLT_WAIT, nil)); end else if Source is TDX7DrawableTexture then begin WinSourceRect := RectToWinRect(SourceRect); WinDestRect := RectToWinRect(IntRect(DestPos, SourceRect.Size)); Result := Succeeded(FSurface.Blt(@WinDestRect, TDX7DrawableTexture(Source).Surface, @WinSourceRect, DDBLT_WAIT, nil)); end else Result := inherited; end else Result := inherited; end; {$ENDREGION} {$REGION 'TDX7DrawableTexture'} function TDX7DrawableTexture.InitSurfaceDesc: Boolean; begin FillChar(FSurfaceDesc, SizeOf(DDSURFACEDESC2), 0); FSurfaceDesc.dwSize := SizeOf(DDSURFACEDESC2); FSurfaceDesc.dwFlags := DDSD_CAPS or DDSD_HEIGHT or DDSD_WIDTH or DDSD_PIXELFORMAT or DDSD_TEXTURESTAGE; FSurfaceDesc.ddsCaps.dwCaps := DDSCAPS_TEXTURE or DDSCAPS_3DDEVICE or DDSCAPS_VIDEOMEMORY; FSurfaceDesc.dwWidth := Width; FSurfaceDesc.dwHeight := Height; Result := TDX7DeviceContext.NativeToFormat(FPixelFormat, FSurfaceDesc.ddpfPixelFormat); end; function TDX7DrawableTexture.CreateTextureSurface: Boolean; begin if (FContext.DD7Object = nil) or (not InitSurfaceDesc) then Exit(False); if Failed(FContext.DD7Object.CreateSurface(FSurfaceDesc, FSurface, nil)) then Exit(False); if Failed(FSurface.GetSurfaceDesc(FSurfaceDesc)) then begin FSurface := nil; Exit(False); end; Result := True; end; procedure TDX7DrawableTexture.DestroyTextureSurface; begin FPrevSurface := nil; FSurface := nil; FillChar(FSurfaceDesc, SizeOf(DDSURFACEDESC2), 0); end; function TDX7DrawableTexture.DoInitialize: Boolean; begin if (Device = nil) or (not (Device.Context is TDX7DeviceContext)) then Exit(False); FContext := TDX7DeviceContext(Device.Context); FPixelFormat := FContext.FindTextureFormat(FPixelFormat); if FPixelFormat = TPixelFormat.Unknown then Exit(False); Result := CreateTextureSurface; end; procedure TDX7DrawableTexture.DoFinalize; begin DestroyTextureSurface; FContext := nil; end; function TDX7DrawableTexture.Bind(const Channel: Integer): Boolean; begin if (FContext.D3D7Device <> nil) and (FSurface <> nil) then Result := Succeeded(FContext.D3D7Device.SetTexture(Channel, FSurface)) else Result := False; end; function TDX7DrawableTexture.Clear: Boolean; var ClearFlags: Cardinal; begin if (FContext = nil) or (FContext.D3D7Device = nil) then Exit(False); if not BeginDraw then Exit(False); try ClearFlags := D3DCLEAR_TARGET; if FDepthStencil >= TDepthStencil.DepthOnly then ClearFlags := ClearFlags or D3DCLEAR_ZBUFFER; if FDepthStencil >= TDepthStencil.Full then ClearFlags := ClearFlags or D3DCLEAR_STENCIL; Result := Succeeded(FContext.D3D7Device.Clear(0, nil, ClearFlags, 0, 1.0, 0)); finally EndDraw; end; end; function TDX7DrawableTexture.DeviceRestore: Boolean; begin Result := CreateTextureSurface; end; procedure TDX7DrawableTexture.DeviceRelease; begin DestroyTextureSurface; end; function TDX7DrawableTexture.BeginDraw: Boolean; var Viewport: D3DVIEWPORT7; begin if (FContext.D3D7Device = nil) or (FSurface = nil) then Exit(False); FillChar(FPrevViewport, SizeOf(D3DVIEWPORT7), 0); if Failed(FContext.D3D7Device.GetViewport(FPrevViewport)) then Exit(False); if Failed(FContext.D3D7Device.GetRenderTarget(FPrevSurface)) then Exit(False); if Failed(FContext.D3D7Device.SetRenderTarget(FSurface, 0)) then begin FPrevSurface := nil; Exit(False); end; Viewport.dwX := 0; Viewport.dwY := 0; Viewport.dwWidth := Width; Viewport.dwHeight := Height; Viewport.dvMinZ := 0.0; Viewport.dvMaxZ := 1.0; Result := Succeeded(FContext.D3D7Device.SetViewport(Viewport)); end; procedure TDX7DrawableTexture.EndDraw; begin if FContext.D3D7Device <> nil then begin FContext.D3D7Device.SetRenderTarget(FPrevSurface, 0); FContext.D3D7Device.SetViewport(FPrevViewport); end; FPrevSurface := nil; FillChar(FPrevViewport, SizeOf(D3DVIEWPORT7), 0); end; function TDX7DrawableTexture.DoCopyRect(const Source: TCustomBaseTexture; const SourceRect: TIntRect; const DestPos: TPoint2i): Boolean; var WinDestRect, WinSourceRect: Windows.TRect; begin if (Device <> nil) and (Source.Device = Device) and (FSurface <> nil) then begin if Source is TDX7LockableTexture then begin WinSourceRect := RectToWinRect(SourceRect); WinDestRect := RectToWinRect(IntRect(DestPos, SourceRect.Size)); Result := Succeeded(FSurface.Blt(@WinDestRect, TDX7LockableTexture(Source).Surface, @WinSourceRect, DDBLT_WAIT, nil)); end else if Source is TDX7DrawableTexture then begin WinSourceRect := RectToWinRect(SourceRect); WinDestRect := RectToWinRect(IntRect(DestPos, SourceRect.Size)); Result := Succeeded(FSurface.Blt(@WinDestRect, TDX7DrawableTexture(Source).Surface, @WinSourceRect, DDBLT_WAIT, nil)); end else Result := inherited; end else Result := inherited; end; {$ENDREGION} end.
28.018433
118
0.709704
cdd1efeda67e05086d93be1cfa08fd361846706d
24,640
pas
Pascal
package/indy-10.2.0.3/fpc/IdEMailAddress.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/IdEMailAddress.pas
RonaldoSurdi/Sistema-gerenciamento-websites-delphi
8cc7eec2d05312dc41f514bbd5f828f9be9c579e
[ "MIT" ]
null
null
null
package/indy-10.2.0.3/fpc/IdEMailAddress.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$ } { Rev 1.13 10/26/2004 9:09:36 PM JPMugaas Updated references. Rev 1.12 24/10/2004 21:25:18 ANeillans Modifications to allow Username and Domain parts to be set. Rev 1.11 24.08.2004 17:29:30 Andreas Hausladen Fixed GetEMailAddresses Lots of simple but effective optimizations Rev 1.10 09/08/2004 08:17:08 ANeillans Rename username property to user Rev 1.9 08/08/2004 20:58:02 ANeillans Added support for Username extraction. Rev 1.8 23/04/2004 20:34:36 CCostelloe Clarified a question in the code as to why a code path ended there Rev 1.7 3/6/2004 5:45:00 PM JPMugaas Fixed problem obtaining the Text property for an E-Mail address with no domain. Rev 1.6 2004.02.03 5:45:08 PM czhower Name changes Rev 1.5 24/01/2004 19:12:10 CCostelloe Cleaned up warnings Rev 1.4 10/12/2003 7:51:50 PM BGooijen Fixed Range Check Error Rev 1.3 10/8/2003 9:50:24 PM GGrieve use IdDelete Rev 1.2 6/10/2003 5:48:50 PM SGrobety DotNet updates Rev 1.1 5/18/2003 02:30:36 PM JPMugaas Added some backdoors for the TIdDirectSMTP processing. Rev 1.0 11/14/2002 02:19:44 PM JPMugaas 2001-Aug-30 - Jim Gunkel Fixed bugs that would occur with group names containing spaces (box test 19) and content being located after the email address (box test 33) 2001-Jul-11 - Allen O'Neill Added hack to not allow recipient entries being added that are blank 2001-Jul-11 - Allen O'Neill Added hack to accomodate a PERIOD (#46) in an email address - this whole area needs to be looked at. 2001-Feb-03 - Peter Mee Overhauled TIdEMailAddressItem.GetText to support non-standard textual elements. 2001-Jan-29 - Peter Mee Overhauled TIdEMailAddressList.SetEMailAddresses to support comments and escaped characters and to ignore groups. 2001-Jan-28 - Peter Mee Overhauled TIdEMailAddressItem.SetText to support comments and escaped characters. 2000-Jun-10 - J. Peter Mugaas started this unit to facilitate some Indy work including the TIdEMailAddressItem and TIdEMailAddressList classes The GetText and SetText were originally the ToArpa and FromArpa functions in the TIdMessage component } unit IdEMailAddress; { Developer(s): J. Peter Mugaas Contributor(s): Ciaran Costelloe Bas Gooijen Grahame Grieve Stephane Grobety Jim Gunkel Andreas Hausladen Peter Mee Andy Neillans Allen O'Neill } interface {$i IdCompilerDefines.inc} uses Classes, IdException; type EIdEmailParseError = class(EIdException); { ToDo: look into alterations required for TIdEMailAddressItem.GetText } TIdEMailAddressItem = class(TCollectionItem) protected FAddress: string; FName: string; function GetText: string; procedure SetText(AText: string); function ConvertAddress: string; function GetDomain: string; procedure SetDomain(const ADomain: String); function GetUsername: string; procedure SetUsername(const AUsername: String); public procedure Assign(Source: TPersistent); override; constructor Create; reintroduce; overload; constructor Create(ACollection: TCollection); overload; override; constructor Create(const AText: string); reintroduce; overload; published {This is the E-Mail address itself } property Address: string read FAddress write FAddress; { This is the person's name } property Name: string read FName write FName; { This is the combined person's name and E-Mail address } property Text: string read GetText write SetText; {Extracted domain for some types of E-Mail processing} property Domain: string read GetDomain write SetDomain; property User: string read GetUsername write SetUsername; end; TIdEMailAddressList = class (TOwnedCollection) protected function GetItem(Index: Integer): TIdEMailAddressItem; procedure SetItem(Index: Integer; const Value: TIdEMailAddressItem); function GetEMailAddresses: string; procedure SetEMailAddresses(AList: string); public constructor Create(AOwner: TPersistent); reintroduce; { List of formated addresses including the names from the collection } procedure FillTStrings(AStrings: TStrings); function Add: TIdEMailAddressItem; reintroduce; procedure AddItems(AList: TIdEMailAddressList); { get all of the domains in the list so we can process individually } procedure GetDomains(AStrings: TStrings); { Sort by domains for making it easier to process E-Mails directly } procedure SortByDomain; { Gets all E-Mail addresses for a particular domain so we can send to recipients at one domain with only one connection } procedure AddressesByDomain(AList: TIdEMailAddressList; const ADomain: string); property Items[Index: Integer]: TIdEMailAddressItem read GetItem write SetItem; default; { Comma-separated list of formated addresses including the names from the collection } property EMailAddresses: string read GetEMailAddresses write SetEMailAddresses; end; implementation uses IdGlobal, IdGlobalProtocols, IdExceptionCore, IdResourceStringsProtocols, SysUtils; const // ATEXT without the double quote and space characters IETF_ATEXT: string = 'abcdefghijklmnopqrstuvwxyz' + {do not localize} 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + {do not localize} '1234567890!#$%&''*+-/=?_`{}|~'; {do not localize} // ATEXT without the double quote character IETF_ATEXT_SPACE: string = 'abcdefghijklmnopqrstuvwxyz' + {do not localize} 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + {do not localize} '1234567890!#$%&''*+-/=?_`{}|~ '; {do not localize} IETF_QUOTABLE: string = '\"'; {do not localize} { TIdEMailAddressItem } constructor TIdEMailAddressItem.Create; begin inherited Create(nil); end; constructor TIdEMailAddressItem.Create(ACollection: TCollection); begin inherited Create(ACollection); end; constructor TIdEMailAddressItem.Create(const AText: string); begin inherited Create(nil); Text := AText; end; procedure TIdEMailAddressItem.Assign(Source: TPersistent); var LAddr : TIdEMailAddressItem; begin if Source is TIdEMailAddressItem then begin LAddr := TIdEMailAddressItem(Source); Address := LAddr.Address; Name := LAddr.Name; end else begin inherited Assign(Source); end; end; function TIdEMailAddressItem.ConvertAddress: string; var i: Integer; domainPart, tempAddress, localPart: string; begin if FAddress = '' then begin if FName <> '' then begin Result := '<>'; {Do not Localize} end else begin Result := ''; {Do not Localize} end; Exit; end; // First work backwards to the @ sign. tempAddress := FAddress; domainPart := ''; for i := Length(FAddress) downto 1 do begin if FAddress[i] = '@' then {do not localize} begin domainPart := Copy(FAddress, i, MaxInt); tempAddress := Copy(FAddress, 1, i - 1); Break; end; end; i := FindFirstNotOf(IETF_ATEXT, tempAddress); // hack to accomodate periods in emailaddress if (i = 0) or CharEquals(tempAddress, i, #46) then begin if FName <> '' then begin Result := '<' + tempAddress + domainPart + '>'; {do not localize} end else begin Result := tempAddress + domainPart; end; end else begin localPart := '"'; {do not localize} while i > 0 do begin localPart := localPart + Copy(tempAddress, 1, i - 1); if IndyPos(tempAddress[i], IETF_QUOTABLE) > 0 then begin localPart := localPart + '\'; {do not localize} end; localPart := localPart + tempAddress[i]; IdDelete(tempAddress, 1, i); i := FindFirstNotOf(IETF_ATEXT, tempAddress); end; Result := '<' + localPart + tempAddress + '"' + domainPart + '>'; {do not localize} end; end; function TIdEMailAddressItem.GetDomain: string; var i: Integer; begin Result := ''; for i := Length(FAddress) downto 1 do begin if FAddress[i] = '@' then {do not localize} begin Result := Copy(FAddress, i + 1, MaxInt); Break; end; end; end; procedure TIdEMailAddressItem.SetDomain(const ADomain: String); var S : String; lPos: Integer; begin S := FAddress; // keep existing user info in the address... use new domain info lPos := IndyPos('@', S); {do not localize} if lPos > 0 then begin IdDelete(S, lPos, Length(S)); end; FAddress := S + '@' + ADomain; {do not localize} end; function TIdEMailAddressItem.GetUsername: string; var i: Integer; begin Result := ''; for i := Length(FAddress) downto 1 do begin if FAddress[i] = '@' then {do not localize} begin Result := Copy(FAddress, 1, i - 1); Break; end; end; end; procedure TIdEMailAddressItem.SetUsername(const AUsername: String); var S : String; lPos: Integer; begin S := FAddress; // discard old user info... keep existing domain in the address lPos := IndyPos('@', S); if lPos > 0 then begin IdDelete(S, 1, lPos); {do not localize} end; FAddress := AUsername + '@' + S; end; function TIdEMailAddressItem.GetText: string; var i: Integer; tempName, resName: string; begin if (FName <> '') and (not TextIsSame(FAddress, FName)) then begin i := FindFirstNotOf(IETF_ATEXT_SPACE, FName); if i > 0 then begin // Need to quote the FName. resName := '"' + Copy(FName, 1, i - 1); {do not localize} if IndyPos(FName[i], IETF_QUOTABLE) > 0 then begin resName := resName + '\'; {do not localize} end; resName := resName + FName[i]; tempName := Copy(FName, i + 1, MaxInt); while tempName <> '' do begin i := FindFirstNotOf(IETF_ATEXT_SPACE, tempName); if i = 0 then begin Result := resName + tempName + '" ' + ConvertAddress; {do not localize} Exit; end; resName := resName + Copy(tempName, 1, i - 1); if IndyPos(tempName[i], IETF_QUOTABLE) > 0 then begin resName := resName + '\'; {do not localize} end; resName := resName + tempName[i]; IdDelete(tempName, 1, i); end; Result := resName + '" ' + ConvertAddress; {do not localize} end else begin Result := FName + ' ' + ConvertAddress; {do not localize} end; end else begin Result := ConvertAddress; end; end; procedure TIdEMailAddressItem.SetText(AText: string); var nFirst, nBracketCount: Integer; bInAddress, bAddressInLT, bAfterAt, bInQuote : Boolean; begin FAddress := ''; FName := ''; AText := Trim(AText); if AText = '' then begin Exit; end; // Find the first known character type. nFirst := FindFirstOf('("< @' + TAB, AText); {do not localize} if nFirst <> 0 then begin nBracketCount := 0; bInAddress := False; bAddressInLT := False; bInQuote := False; bAfterAt := False; repeat case AText[nFirst] of ' ', TAB : {do not localize} begin if nFirst = 1 then begin IdDelete(AText, 1, 1); end else begin // Only valid if in a name not contained in quotes - keep the space. if bAfterAt then begin FAddress := FAddress + Trim(Copy(AText, 1, nFirst - 1)); end else begin FName := FName + Copy(AText, 1, nFirst); end; IdDelete(AText, 1, nFirst); end; end; '(' : {do not localize} begin Inc(nBracketCount); if nFirst > 1 then begin // There's at least one character to the name if bInAddress then begin FAddress := FAddress + Trim(Copy(AText, 1, nFirst - 1)); end else if nBracketCount = 1 then begin FName := FName + Copy(AText, 1, nFirst - 1); end; IdDelete(AText, 1, nFirst); end else begin IdDelete(AText, 1, 1); end; end; ')' : {do not localize} begin Dec(nBracketCount); IdDelete(AText, 1, nFirst); end; '"' : {do not localize} begin if bInQuote then begin if bAddressInLT then begin FAddress := FAddress + Trim(Copy(AText, 1, nFirst - 1)); end else begin FName := FName + Trim(Copy(AText, 1, nFirst - 1)); end; IdDelete(AText, 1, nFirst); bInQuote := False; end else begin bInQuote := True; IdDelete(AText, 1, 1); end; end; '<' : {do not localize} begin if nFirst > 1 then begin FName := FName + Copy(AText, 1, nFirst - 1); end; FName := TrimAllOf(' ' + TAB, Trim(FName)); {do not localize} bAddressInLT := True; bInAddress := True; IdDelete(AText, 1, nFirst); end; '>' : {do not localize} begin // Only searched for if the address starts with '<' bInAddress := False; bAfterAt := False; FAddress := FAddress + TrimAllOf(' ' + TAB, {do not localize} Trim(Copy(AText, 1, nFirst - 1))); IdDelete(AText, 1, nFirst); end; '@' : {do not localize} begin bAfterAt := True; if bInAddress then begin FAddress := FAddress + Copy(AText, 1, nFirst); IdDelete(AText, 1, nFirst); end else begin if bAddressInLT then begin { Strange use. For now raise an exception until a real-world example can be found. Basically, it's formatted as follows: <someguy@domain.example> some-text @ some-text or: some-text <someguy@domain.example> some-text @ some-text where some text may be blank. Note you used to arrive here if the From header in an email included more than one address (which was subsequently changed) because our code did not parse the From header for multiple addresses. That may have been the reason for this code. } //raise EIdEmailParseError.Create(RSEMailSymbolOutsideAddress); FName := FName + AText; Exit; end; { at this point, we're either supporting an e-mail address on it's own, or the old-style valid format: "Name" name@domain.example } bInAddress := True; FAddress := FAddress + Copy(AText, 1, nFirst); IdDelete(AText, 1, nFirst); end; end; '.' : {do not localize} begin // Must now be a part of the domain part of the address. if bAddressInLT then begin // Whitespace is possible around the parts of the domain. FAddress := FAddress + TrimAllOf(' ' + TAB, Trim(Copy(AText, 1, nFirst - 1))) + '.'; {do not localize} AText := TrimLeft(Copy(AText, nFirst + 1, MaxInt)); end else begin // No whitespace is allowed if no wrapping <> characters. FAddress := FAddress + Copy(AText, 1, nFirst); IdDelete(AText, 1, nFirst); end; end; '\' : {do not localize} begin { This will only be discovered in a bracketed or quoted section. It's an escape character indicating the next character is a literal. } if bInQuote then begin // Need to retain the second character if bInAddress then begin FAddress := FAddress + Copy(AText, 1, nFirst - 1); FAddress := FAddress + AText[nFirst + 1]; end else begin FName := FName + Copy(AText, 1, nFirst - 1); FName := FName + AText[nFirst + 1]; end; end; IdDelete(AText, 1, nFirst + 1); end; end; { Check for bracketted sections first: ("<>" <> "" <"">) - all is ignored } if nBracketCount > 0 then begin { Inside a bracket, only three characters are special. '(' Opens a nested bracket: (One (Two (Three ))) ')' Closes a bracket '\' Escape character: (One \) \( \\ (Two \) )) } nFirst := FindFirstOf('()\', AText); {do not localize} // Check if in quote before address: <"My Name"@domain.example> is valid end else if bInQuote then begin // Inside quotes, only the end quote and escape character are special. nFirst := FindFirstOf('"\', AText); {do not localize} // Check if after the @ of the address: domain.example> end else if bAfterAt then begin if bAddressInLT then begin { If the address is enclosed, then only the '(', '.' & '>' need be looked for, trimming all content when found: domain . example > } nFirst := FindFirstOf('.>(', AText); {do not localize} end else begin nFirst := FindFirstOf('.( ', AText); {Do not Localize} end; // Check if in address: <name@domain.example> end else if bInAddress then begin nFirst := FindFirstOf('"(@>', AText); {do not localize} // Not in anything - check for opening character end else begin // Outside brackets nFirst := FindFirstOf('("< @' + TAB, AText); {do not localize} end; until nFirst = 0; if bInAddress and (not bAddressInLT) then begin FAddress := FAddress + TrimAllOf(' ' + TAB, Trim(AText)); {do not localize} end; end else begin // No special characters, so assume a simple address FAddress := AText; end; end; { TIdEMailAddressList } constructor TIdEMailAddressList.Create(AOwner: TPersistent); begin inherited Create(AOwner, TIdEMailAddressItem); end; function TIdEMailAddressList.Add: TIdEMailAddressItem; begin Result := TIdEMailAddressItem(inherited Add); end; procedure TIdEMailAddressList.AddItems(AList: TIdEMailAddressList); var I: Integer; begin if AList <> nil then begin for I := 0 to AList.Count-1 do begin Add.Assign(AList[I]); end; end; end; procedure TIdEMailAddressList.FillTStrings(AStrings: TStrings); var idx: Integer; begin for idx := 0 to Count - 1 do begin AStrings.Add(GetItem(idx).Text); end; end; function TIdEMailAddressList.GetItem(Index: Integer): TIdEMailAddressItem; begin Result := TIdEMailAddressItem(inherited Items[Index]); end; function TIdEMailAddressList.GetEMailAddresses: string; var idx: Integer; begin Result := ''; {Do not Localize} for idx := 0 to Count - 1 do begin if Result = '' then Result := GetItem(idx).Text else Result := Result + ', ' + GetItem(idx).Text; {do not localize} end; end; procedure TIdEMailAddressList.SetItem(Index: Integer; const Value: TIdEMailAddressItem); begin inherited SetItem(Index, Value); end; procedure TIdEMailAddressList.SetEMailAddresses(AList: string); var EMail : TIdEMailAddressItem; iStart: Integer; sTemp: string; nInBracket: Integer; bInQuote : Boolean; begin Clear; if Trim(AList) = '' then begin {Do not Localize} Exit; end; iStart := FindFirstOf(':;(", ' + TAB, AList); {do not localize} if iStart = 0 then begin EMail := Add; EMail.Text := TrimLeft(AList); end else begin sTemp := ''; {do not localize} nInBracket := 0; bInQuote := False; repeat case AList[iStart] of ' ', TAB: {do not localize} begin if iStart = 1 then begin sTemp := sTemp + AList[iStart]; IdDelete(AList, 1, 1); end else begin sTemp := sTemp + Copy(AList, 1, iStart); IdDelete(AList, 1, iStart); end; end; ':' : {do not localize} begin // The start of a group - ignore the lot. IdDelete(AList, 1, iStart); sTemp := ''; end; ';' : {do not localize} begin { End of a group. If we have something (groups can be empty), then process it. } sTemp := sTemp + Copy(AList, 1, iStart - 1); if Trim(sTemp) <> '' then begin EMail := Add; EMail.Text := TrimLeft(sTemp); sTemp := ''; {do not localize} end; // Now simply remove the end of the group. IdDelete(AList, 1, iStart); end; '(': {do not localize} begin Inc(nInBracket); sTemp := sTemp + Copy(AList, 1, iStart); IdDelete(AList, 1, iStart); end; ')': {do not localize} begin Dec(nInBracket); sTemp := sTemp + Copy(AList, 1, iStart); IdDelete(AList, 1, iStart); end; '"': {do not localize} begin sTemp := sTemp + Copy(AList, 1, iStart); IdDelete(AList, 1, iStart); bInQuote := not bInQuote; end; ',': {do not localize} begin sTemp := sTemp + Copy(AList, 1, iStart - 1); EMail := Add; EMail.Text := sTemp; // added - Allen .. saves blank entries being added sTemp := Trim(Email.Text); if (sTemp = '') or (sTemp = '<>') then {do not localize} begin FreeAndNil(Email); end; sTemp := ''; IdDelete(AList, 1, iStart); end; '\': {do not localize} begin // Escape character - simply copy this char and the next to the buffer. sTemp := sTemp + Copy(AList, 1, iStart + 1); IdDelete(AList, 1, iStart + 1); end; end; if nInBracket > 0 then begin iStart := FindFirstOf('(\)', AList); {Do not Localize} end else if bInQuote then begin iStart := FindFirstOf('"\', AList); {Do not Localize} end else begin iStart := FindFirstOf(':;(", ' + TAB, AList); {Do not Localize} end; until iStart = 0; // Clean up the content in sTemp if (Trim(sTemp) <> '') or (Trim(AList) <> '') then begin sTemp := sTemp + AList; EMail := Add; EMail.Text := TrimLeft(sTemp); // added - Allen .. saves blank entries being added sTemp := Trim(Email.Text); if (sTemp = '') or (sTemp = '<>') then {do not localize} begin FreeAndNil(Email); end; end; end; end; procedure TIdEMailAddressList.SortByDomain; var i, j: Integer; LTemp: string; begin for i := Count-1 downto 0 do begin for j := 0 to Count-2 do begin if IndyCompareStr(Items[J].Domain, Items[J + 1].Domain) > 0 then begin LTemp := Items[j].Text; Items[j].Text := Items[j+1].Text; Items[j+1].Text := LTemp; end; end; end; end; procedure TIdEMailAddressList.GetDomains(AStrings: TStrings); var i: Integer; LCurDom: string; begin if Assigned(AStrings) then begin AStrings.Clear; for i := 0 to Count-1 do begin LCurDom := LowerCase(Items[i].Domain); if AStrings.IndexOf(LCurDom) = -1 then begin AStrings.Add(LCurDom); end; end; end; end; procedure TIdEMailAddressList.AddressesByDomain(AList: TIdEMailAddressList; const ADomain: string); var i: Integer; LEnt : TIdEMailAddressItem; begin AList.Clear; for i := 0 to Count-1 do begin if TextIsSame(Items[i].Domain, ADomain) then begin LEnt := AList.Add; LEnt.Text := Items[i].Text; end; end; end; end.
28.387097
93
0.594968
85d15cca092d5f650f99690fe68c92e8cb37984b
124,537
pas
Pascal
source/StyleUn.pas
coassoftwaresystems/HtmlViewer
0f605421b17c4246e6fff4a1fa26ac42f2f69646
[ "MIT" ]
3
2015-03-31T13:32:10.000Z
2017-10-13T07:51:58.000Z
source/StyleUn.pas
coassoftwaresystems/HtmlViewer
0f605421b17c4246e6fff4a1fa26ac42f2f69646
[ "MIT" ]
null
null
null
source/StyleUn.pas
coassoftwaresystems/HtmlViewer
0f605421b17c4246e6fff4a1fa26ac42f2f69646
[ "MIT" ]
1
2016-10-18T06:20:25.000Z
2016-10-18T06:20:25.000Z
{ Version 11.6 Copyright (c) 1995-2008 by L. David Baldwin, Copyright (c) 2008-2015 by HtmlViewer Team 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. Note that the source modules HTMLGIF1.PAS and DITHERUNIT.PAS are covered by separate copyright notices located in those modules. } {$I htmlcons.inc} unit StyleUn; interface uses {$ifdef LCL} LclIntf, LclType, HtmlMisc, {$else} Windows, {$endif} Classes, Graphics, SysUtils, Math, Forms, Contnrs, Variants, // HtmlBuffer, HtmlFonts, HtmlGlobals, HtmlSymb, StyleTypes; {$ifdef UseOldStyleTypes} type AlignmentType = ThtAlignmentStyle; BorderStyleType = ThtBorderStyle; ClearAttrType = ThtClearStyle; ListBulletType = ThtBulletStyle; PositionType = ThtBoxPositionStyle; TTextTransformStyle = ThtTextTransformStyle; TPropDisplay = ThtDisplayStyle; VisibilityType = ThtVisibilityStyle; TWhiteSpaceStyle = ThtWhiteSpaceStyle; {$endif} const CurColor_Val = 'currentColor'; CurColorStr = 'currentcolor'; varInt = [varInteger, varByte, varSmallInt, varShortInt, varWord, varLongWord, varInt64]; varFloat = [varSingle, varDouble, varCurrency]; varNum = varInt + varFloat; CrLf = #$D#$A; //BG, 16.09.2010: CSS2.2: same sizes like html font size: const FontConvBase: array[1..7] of Double = (8.0, 10.0, 12.0, 14.0, 18.0, 24.0, 36.0); PreFontConvBase: array[1..7] of Double = (7.0, 8.0, 10.0, 12.0, 15.0, 20.0, 30.0); var FontConv: array[1..7] of Double; PreFontConv: array[1..7] of Double; type // Notice: in TPropertyIndex order of rectangle properties required: // // Top, Right, Bottom, Left. // // Some code relies on this order. // ThtPropertyIndex = ( FontFamily, FontSize, FontStyle, FontWeight, TextAlign, TextDecoration, LetterSpacing, Color, // the below properties are in MarginArrays BackgroundColor, BackgroundImage, BackgroundPosition, BackgroundRepeat, BackgroundAttachment, piMinHeight, piMinWidth, piMaxHeight, piMaxWidth, BoxSizing, MarginTop, MarginRight, MarginBottom, MarginLeft, PaddingTop, PaddingRight, PaddingBottom, PaddingLeft, BorderTopWidth, BorderRightWidth, BorderBottomWidth, BorderLeftWidth, BorderTopColor, BorderRightColor, BorderBottomColor, BorderLeftColor, BorderTopStyle, BorderRightStyle, BorderBottomStyle, BorderLeftStyle, piWidth, piHeight, piTop, piRight, piBottom, piLeft, BorderSpacingHorz, BorderSpacingVert, //These two are internal // the above properties are in MarginArrays Visibility, LineHeight, VerticalAlign, Position, ZIndex, ListStyleType, ListStyleImage, Float, Clear, TextIndent, PageBreakBefore, PageBreakAfter, PageBreakInside, TextTransform, WordWrap, FontVariant, BorderCollapse, OverFlow, piDisplay, piEmptyCells, piWhiteSpace, // the below properties are short hands MarginX, PaddingX, BorderWidthX, BorderX, BorderTX, BorderRX, BorderBX, BorderLX, FontX, BackgroundX, ListStyleX, BorderColorX, BorderStyleX, // the above properties are short hands //the following have multiple values sometimes BorderSpacing //the above have multiple values sometimes ); TShortHand = MarginX..BorderSpacing;//BorderStyleX; ThtPropIndices = FontFamily..piWhiteSpace; ThtPropertyArray = array [ThtPropIndices] of Variant; ThtPropIndexSet = Set of ThtPropIndices; ThtMarginIndices = BackgroundColor..BorderSpacingVert; //piLeft; ThtVMarginArray = array [ThtMarginIndices] of Variant; ThtMarginArray = array [ThtMarginIndices] of Integer; const PropWords: array [ThtPropertyIndex] of ThtString = ( 'font-family', 'font-size', 'font-style', 'font-weight', 'text-align', 'text-decoration', 'letter-spacing', 'color', // these properties are in MarginArrays 'background-color', 'background-image', 'background-position', 'background-repeat', 'background-attachment', 'min-height', 'min-width', 'max-height', 'max-width', 'box-sizing', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width', 'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color', 'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style', 'width', 'height', 'top', 'right', 'bottom', 'left', 'thv-border-spacing-horz', 'thv-border-spacing-vert', //These two are for internal use only 'visibility', 'line-height', 'vertical-align', 'position', 'z-index', 'list-style-type', 'list-style-image', 'float', 'clear', 'text-indent', 'page-break-before', 'page-break-after', 'page-break-inside', 'text-transform', 'word-wrap', 'font-variant', 'border-collapse', 'overflow', 'display', 'empty-cells', 'white-space', // short hand names 'margin', 'padding', 'border-width', 'border', 'border-top', 'border-right', 'border-bottom', 'border-left', 'font', 'background', 'list-style', 'border-color', 'border-style', //multiple values 'border-spacing' ); type TStyleList = class; TPropStack = class; TProperties = class private FDefPointSize : Double; PropStack: TPropStack; // owner TheFont: ThtFont; InLink: Boolean; DefFontname: ThtString; FUseQuirksMode : Boolean; procedure AddPropertyByIndex(Index: ThtPropIndices; PropValue: ThtString); // procedure AssignCharSet(CS: TFontCharset); procedure AssignCodePage(const CP: Integer); procedure CalcLinkFontInfo(Styles: TStyleList; I: Integer); procedure GetSingleFontInfo(var Font: ThtFontInfo); public PropSym: TElemSymb; PropTag, PropClass, PropID, PropPseudo, PropTitle: ThtString; PropStyle: TProperties; FontBG: TColor; FCharSet: TFontCharSet; FCodePage: Integer; FEmSize, FExSize: Integer; {# pixels for Em and Ex dimensions} Props: ThtPropertyArray; Originals: array[ThtPropIndices] of Boolean; FIArray: TFontInfoArray; ID: Integer; constructor Create; overload; // for use in style list only constructor Create(const AUseQuirksMode : Boolean); overload; // for use in style list only constructor Create(APropStack: TPropStack; const AUseQuirksMode : Boolean); overload; // for use in property stack constructor CreateCopy(ASource: TProperties); destructor Destroy; override; function BorderStyleNotBlank: Boolean; function Collapse: Boolean; function GetBackgroundColor: TColor; function GetBackgroundImage(var Image: ThtString): Boolean; function GetBorderStyle(Index: ThtPropIndices; var BorderStyle: ThtBorderStyle): Boolean; function GetClear(var Clr: ThtClearStyle): Boolean; function GetDisplay: ThtDisplayStyle; //BG, 15.09.2009 function GetFloat(var Align: ThtAlignmentStyle): Boolean; function GetFont: ThtFont; function GetFontVariant: ThtString; function GetLineHeight(NewHeight: Integer): Integer; function GetListStyleImage: ThtString; function GetListStyleType: ThtBulletStyle; function GetOriginalForegroundColor: TColor; function GetPosition: ThtBoxPositionStyle; function GetTextIndent(out PC: Boolean): Integer; function GetTextTransform: ThtTextTransformStyle; function GetVertAlign(var Align: ThtAlignmentStyle): Boolean; function GetVisibility: ThtVisibilityStyle; function GetZIndex: Integer; function HasBorderStyle: Boolean; function HasBorderWidth: Boolean; function IsOverflowHidden: Boolean; function ShowEmptyCells: Boolean; procedure AddPropertyByName(const PropName, PropValue: ThtString); procedure SetPropertyDefault(Index: ThtPropIndices; const Value: Variant); procedure SetPropertyDefaults(Indexes: ThtPropIndexSet; const Value: Variant); procedure Assign(const Item: Variant; Index: ThtPropIndices); procedure AssignCharSetAndCodePage(CS: TFontCharset; CP: Integer); procedure Combine(Styles: TStyleList; const Tag, AClass, AnID, Pseudo, ATitle: ThtString; AProp: TProperties; ParentIndexInPropStack: Integer); procedure Copy(Source: TProperties); procedure CopyDefault(Source: TProperties); procedure GetBackgroundPos(EmSize, ExSize: Integer; out P: PtPositionRec); procedure GetFontInfo(AFI: TFontInfoArray); procedure GetPageBreaks(out Before, After, Intact: Boolean); function GetBoxSizing(var VBoxSizing : ThtBoxSizing) : Boolean; function GetBorderSpacingHorz: Integer; function GetBorderSpacingVert: Integer; procedure GetVMarginArrayDefBorder(var MArray: ThtVMarginArray; const ADefColor : Variant); procedure GetVMarginArray(var MArray: ThtVMarginArray); function HasBorderSpacing: Boolean; procedure Inherit(Tag: ThtString; Source: TProperties); procedure SetFontBG; procedure Update(Source: TProperties; Styles: TStyleList; I: Integer); //BG, 20.09.2009: property Display: ThtDisplayStyle read GetDisplay; property CharSet: TFontCharset read FCharSet write FCharSet; property CodePage: Integer read FCodePage write AssignCodePage; property DefPointSize : Double read FDefPointSize write FDefPointSize; property EmSize: Integer read FEmSize; property ExSize: Integer read FExSize; property UseQuirksMode : Boolean read FUseQuirksMode; end; TStyleList = class(ThtStringList) private SeqNo: Integer; FDefProp: TProperties; protected FDefPointSize : Double; //this must be protected so that the property can be changed in //a descendant while being read only. FUseQuirksMode : Boolean; procedure SetLinksActive(Value: Boolean); virtual; abstract; property LinksActive: Boolean write SetLinksActive; public constructor Create; overload; constructor Create(AUseQuirksMode : Boolean); overload; destructor Destroy; override; function AddDuplicate(const Tag: ThtString; Prop: TProperties): TProperties; function AddObject(const S: ThtString; AObject: TObject): Integer; override; function GetSeqNo: ThtString; procedure Clear; override; procedure AddModifyProp(const Selector, Prop, Value: ThtString); procedure FixupTableColor(BodyProp: TProperties); procedure Initialize(const FontName, PreFontName: ThtString; PointSize: Integer; AColor, AHotspot, AVisitedColor, AActiveColor: TColor; LinkUnderline: Boolean; ACodePage: TBuffCodePage; ACharSet: TFontCharSet; MarginHeight, MarginWidth: Integer); procedure ModifyLinkColor(Pseudo: ThtString; AColor: TColor); property UseQuirksMode : Boolean read FUseQuirksMode write FUseQuirksMode; property DefProp: TProperties read FDefProp; property DefPointSize : Double read FDefPointSize write FDefPointSize; end; TPropStack = class(TObjectList) private function GetProp(Index: Integer): TProperties; {$ifdef UseInline} inline; {$endif} public function Last: TProperties; {$ifdef UseInline} inline; {$endif} property Items[Index: Integer]: TProperties read GetProp; default; end; type ThtConvData = record BaseWidth, BaseHeight: Integer; EmSize, ExSize: Integer; BorderWidth: Integer; AutoCount: Integer; IsAutoParagraph: set of ThtPropertyIndex; end; const IntNull = -12345678; Auto = -12348765; AutoParagraph = -12348766; ParagraphSpace = 14; {default spacing between paragraphs, etc.} ImageSpace = 3; {extra space for left, right images} ListIndent = 40; EastEurope8859_2 = 31; {for 8859-2} // BG, 25.04.2012: Added: function IsAuto(const Value: Variant): Boolean; {$ifdef UseInline} inline; {$endif} //BG, 05.10.2010: added: function VarIsIntNull(const Value: Variant): Boolean; {$ifdef UseInline} inline; {$endif} function VarIsAuto(const Value: Variant): Boolean; {$ifdef UseInline} inline; {$endif} function VMargToMarg(const Value: Variant; Relative: Boolean; Base, EmSize, ExSize, Default: Integer): Integer; function ConvData(BaseWidth, BaseHeight, EmSize, ExSize, BorderWidth: Integer; AutoCount: Integer = 0): ThtConvData; procedure ConvMargProp(I: ThtPropIndices; const VM: ThtVMarginArray; var ConvData: ThtConvData; var M: ThtMarginArray); procedure ConvInlineMargArray(const VM: ThtVMarginArray; BaseWidth, BaseHeight, EmSize, ExSize: Integer; {BStyle: ThtBorderStyle;} out M: ThtMarginArray); procedure ConvMargArray(const VM: ThtVMarginArray; BaseWidth, BaseHeight, EmSize, ExSize, BorderWidth: Integer; out AutoCount: Integer; var M: ThtMarginArray); procedure ConvMargArrayForCellPadding(const VM: ThtVMarginArray; EmSize, ExSize: Integer; var M: ThtMarginArray); procedure ConvVertMargins(const VM: ThtVMarginArray; var CD: ThtConvData; var M: ThtMarginArray); function OpacityFromStr(S : ThtString) : Byte; function SortedColors: ThtStringList; function TryStrToColor(S: ThtString; NeedPound: Boolean; out Color: TColor): Boolean; function ColorAndOpacityFromString(S: ThtString; NeedPound: Boolean; out Color: TColor; out VOpacity : Byte): Boolean; function ReadURL(Item: Variant): ThtString; function LowerCaseUnquotedStr(const S : THtString) : THtString; function RemoveQuotes(const S: ThtString): ThtString; function ReadFontName(S: ThtString): ThtString; {$ifdef JPM_DEBUGGING} const CVis : array [0..2] of string = ('viInherit','viHidden','viVisible'); procedure LogProperties(AProp : TProperties; const APropName : String); procedure LogThtMarginArray(AMarg : ThtMarginArray; const AMargName : String); {$endif} procedure ApplyBoxWidthSettings(var AMarg : ThtMarginArray; var VMinWidth, VMaxWidth : Integer; const AUseQuirksMode : Boolean); procedure ApplyBoxSettings(var AMarg : ThtMarginArray; const AUseQuirksMode : Boolean); //here for inlining function SkipWhiteSpace(const S: ThtString; I, L: Integer): Integer; function FontSizeConv(const Str: ThtString; OldSize, DefPointSize: Double; const AUseQuirksMode : Boolean): Double; function LengthConv(const Str: ThtString; Relative: Boolean; Base, EmSize, ExSize, Default: Integer): Integer; implementation uses {$ifdef Compiler24_Plus} System.UITypes, {$endif} {$ifdef JPM_DEBUGGING} CodeSiteLogging, {$endif} HSLUtils; var // DefPointSize: Double; CharsetPerCharset: array [TFontCharset] of record Inited: Boolean; Charset: TFontCharset; end; {$ifdef JPM_DEBUGGING} function LogPropColor(const AInt : Integer): String; overload; {$ifdef UseInline} inline; {$endif} begin Result := Graphics.ColorToString( AInt); end; function LogPropColor(const AVar : Variant): String; overload; {$ifdef UseInline} inline; {$endif} begin if Variants.VarIsOrdinal(AVar) then Result := Graphics.ColorToString( AVar) else Result := VarToStr( AVar ); end; function LogPropDisplay(const AInt : Integer): String; overload; {$ifdef UseInline} inline; {$endif} begin Result := CDisplayStyle[ ThtDisplayStyle(AInt)]; end; function LogPropDisplay(const AVar : Variant): String; overload; {$ifdef UseInline} inline; {$endif} begin if Variants.VarIsOrdinal(AVar) then begin Result := CDisplayStyle[ ThtDisplayStyle(AVar)] + ' int = '+ IntToStr(AVar);; end else begin Result := VarToStr( AVar ); end; end; function LogPropBoxSizing(const AInt : Integer): String; overload; {$ifdef UseInline} inline; {$endif} begin case AInt of 0 : Result := CBoxSizing[ContentBox]; 1 : Result := CBoxSizing[BorderBox]; else Result := 'Error value is '+IntToStr(AInt); end; // Result := CBoxSizing[BoxSizingType (AInt)]; end; function LogPropBoxSizing(const AVar : Variant): String; overload; {$ifdef UseInline} inline; {$endif} begin if Variants.VarIsOrdinal(AVar) then begin Result := CBoxSizing[ThtBoxSizing (AVar)] + ' int = '+ IntToStr(AVar); end else begin Result := VarToStr( AVar ); end; end; function LogPropBorderStyle(const AInt : Integer): String; overload; {$ifdef UseInline} inline; {$endif} begin case AInt of 0 : Result := CBorderStyle[bssNone ]; 1 : Result := CBorderStyle[bssSolid ]; 2 : Result := CBorderStyle[ bssInset ]; 3 : Result := CBorderStyle[ bssOutset ]; 4 : Result := CBorderStyle[ bssGroove ]; 5 : Result := CBorderStyle[ bssRidge ]; 6 : Result := CBorderStyle[ bssDashed ]; 7 : Result := CBorderStyle[ bssDotted ]; 8 : Result := CBorderStyle[ bssDouble ]; else Result := 'Error value is '+IntToStr(AInt); end; end; function LogPropBorderStyle(const AVar : Variant): String; overload; {$ifdef UseInline} inline; {$endif} begin if Variants.VarIsOrdinal(AVar) then begin Result := CBorderStyle[ ThtBorderStyle ( AVar )] + ' int = '+ IntToStr(AVar); end else begin Result := VarToStr( AVar); end; end; function LogPropListStyle(const AInt : Integer): String; overload; {$ifdef UseInline} inline; {$endif} begin case AInt of 0 : Result := CBulletStyle[ lbBlank ]; 1 : Result := CBulletStyle[ lbCircle ]; 2 : Result := CBulletStyle[ lbDecimal ]; 3 : Result := CBulletStyle[ lbDisc ]; 4 : Result := CBulletStyle[ lbLowerAlpha ]; 5 : Result := CBulletStyle[ lbLowerRoman ]; 6 : Result := CBulletStyle[ lbNone ]; 7 : Result := CBulletStyle[ lbSquare ]; 8 : Result := CBulletStyle[ lbUpperAlpha ]; 9 : Result := CBulletStyle[ lbUpperRoman ]; else Result := 'Error value is '+IntToStr(AInt); end; // Result := CBoxSizing[BoxSizingType (AInt)]; end; function LogPropListStyle(const AVar : Variant): String; overload; {$ifdef UseInline} inline; {$endif} begin if Variants.VarIsOrdinal(AVar) then begin Result := CBulletStyle[ ThtBulletStyle ( AVar )] + ' int = '+ IntToStr(AVar);; end else begin Result := VarToStr( AVar); end; end; function LogVisibility(const AVar : Variant): String; {$ifdef UseInline} inline; {$endif} begin if Variants.VarIsOrdinal(AVar) then begin Result := CVis[Integer( AVar )] + ' int = '+ IntToStr(AVar); end else begin Result := VarToStr( AVar); end; end; procedure LogTVMarginArray(const AMarg : ThtVMarginArray; const AMargName : String); {$ifdef UseInline} inline; {$endif} var i : ThtPropIndices; begin for i := Low(AMarg) to High(AMarg) do case I of Color, BackgroundColor, BorderTopColor..BorderLeftColor : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropColor(AMarg[I])]); piDisplay : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropDisplay(AMarg[I])]); BoxSizing : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropBoxSizing(AMarg[I])]); BorderTopStyle..BorderLeftStyle : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropBorderStyle(AMarg[I])]); ListStyleType : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropListStyle(AMarg[I])]); Visibility : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogVisibility(AMarg[I])]); else CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i],VarToStr( AMarg[I])]); end; end; procedure LogThtMarginArray(AMarg : ThtMarginArray; const AMargName : String); {$ifdef UseInline} inline; {$endif} var i : ThtPropIndices; begin for i := Low(AMarg) to High(AMarg) do if VarIsIntNull(AMarg[I]) then begin CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], 'IntNul']); end else begin if VarIsAuto(AMarg[I]) then begin CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], 'Auto']); end else begin case I of Color, BackgroundColor, BorderTopColor..BorderLeftColor : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropColor(AMarg[I])]); piDisplay : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropDisplay(AMarg[I])]); BoxSizing : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropBoxSizing(AMarg[I])]); BorderTopStyle..BorderLeftStyle : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropBorderStyle(AMarg[I])]); ListStyleType : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogPropListStyle(AMarg[I])]); Visibility : CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i], LogVisibility(AMarg[I])]); else CodeSiteLogging.CodeSite.SendFmtMsg('%s[%s] = %s',[AMargName,PropWords[i],VarToStr( AMarg[I])]); end; end; end; end; procedure LogProperties(AProp : TProperties; const APropName : String); var i : ThtPropIndices; begin if not Assigned(AProp) then begin CodeSiteLogging.CodeSite.SendFmtMsg('%s = nil',[APropName]); exit; end; CodeSiteLogging.CodeSite.SendFmtMsg('%s.PropTag = %s',[APropName,AProp.PropTag ]); CodeSiteLogging.CodeSite.SendFmtMsg('%s.PropClass = %s',[APropName,AProp.PropClass ]); CodeSiteLogging.CodeSite.SendFmtMsg('%s.PropID = %s',[APropName,AProp.PropID ]); CodeSiteLogging.CodeSite.SendFmtMsg('%s.PropTitle = %s',[APropName,AProp.PropTitle ]); CodeSiteLogging.CodeSite.SendFmtMsg('%s.PropPseudo = %s',[APropName,AProp.PropPseudo ]); // for I := Low(TMainTextOpacities) to High(TMainTextOpacities) do begin // CodeSiteLogging.CodeSite.SendFmtMsg('%s.MainTextOpacities[%s] = %d',[APropName,PropWords[i],AProp.MainTextOpacities[I] ]); // end; // for I := Low(TBorderOpacities) to High(TBorderOpacities) do begin // CodeSiteLogging.CodeSite.SendFmtMsg('%s.BorderOpacities[%s] = %d',[APropName,PropWords[i],AProp.BorderOpacities[I]]); // end; for I := Low(AProp.Props) to High(AProp.Props) do begin if VarIsIntNull(AProp.Props[I]) then begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = null',[APropName,PropWords[i]]); end else begin if VarIsAuto(AProp.Props[I]) then begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = auto',[APropName,PropWords[i]]); end else begin case I of Color, BackgroundColor, BorderTopColor..BorderLeftColor : begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i],LogPropColor( AProp.Props[I])]); end; piDisplay : begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i], LogPropDisplay(AProp.Props[I])]); end; BoxSizing : begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i],LogPropBoxSizing( AProp.Props[I])]); end; BorderTopStyle..BorderLeftStyle : begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i], LogPropBorderStyle( AProp.Props[I])]); end; ListStyleType : begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i], LogPropListStyle( AProp.Props[I])]); end; Visibility : begin CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i],LogVisibility( AProp.Props[I])]); end; else CodeSiteLogging.CodeSite.SendFmtMsg('%s.TPropertyArray[%s] = %s',[APropName,PropWords[i],VarToStr( AProp.Props[I])]); end; end; end; end; end; {$endif} //-- BG ---------------------------------------------------------- 17.02.2011 -- function SkipWhiteSpace(const S: ThtString; I, L: Integer): Integer; {$ifdef UseInline} inline; {$endif} begin while I <= L do begin case S[I] of ' ', #10, #12, #13:; else break; end; Inc(I); end; Result := I; end; //-- BG ---------------------------------------------------------- 17.02.2011 -- function FindChar(const S: ThtString; C: ThtChar; I, L: Integer): Integer; {$ifdef UseInline} inline; {$endif} begin while (I <= L) and (S[I] <> C) do Inc(I); Result := I; end; {----------------ReadURL} function ReadURL(Item: Variant): ThtString; {$ifdef UseInline} inline; {$endif} { If Item is a string try to find and parse: url( ["<url>"|'<url>'|<url>] ) and if successful return the <url>. ReadURL tolerates - any substring before url - any substring after the (optionally quoted) <url> - nested '(' ')' pairs even in the unquoted <url> } var S: ThtString; I, J, L, N: Integer; Q: ThtChar; begin Result := ''; if VarIsStr(Item) then begin S := Item; I := Pos('url(', S); if I > 0 then begin L := Length(S); // optional white spaces I := SkipWhiteSpace(S, I + 4, L); // optional quote char Q := #0; if I < L then case S[I] of '''', '"': begin Q := S[I]; Inc(I); end; end; // read url if Q <> #0 then // up to quote char J := FindChar(S, Q, I, L) else begin // unquoted: up to whitespace or ')' // beyond CSS: tolerate nested '(' ')' pairs as part of the name. N := 0; J := I; while J <= L do begin case S[J] of ' ', #10, #12, #13: if N = 0 then break; '(': Inc(N); ')': begin if N = 0 then break; Dec(N); end; end; Inc(J); end; end; Result := Copy(S, I, J - I); // ignore the rest: optional whitespaces and ')' end; end; end; //-- BG ---------------------------------------------------------- 15.03.2011 -- var PropertyStrings: ThtStringList; function StyleProperties: ThtStringList; {$ifdef UseInline} inline; {$endif} var I: ThtPropertyIndex; begin // Put the Properties into a sorted StringList for faster access. if PropertyStrings = nil then begin PropertyStrings := ThtStringList.Create; for I := Low(I) to High(I) do PropertyStrings.AddObject(PropWords[I], Pointer(I)); PropertyStrings.Sort; end; Result := PropertyStrings; end; //-- BG ---------------------------------------------------------- 15.03.2011 -- function TryStrToPropIndex(const PropWord: ThtString; var PropIndex: ThtPropIndices): Boolean; {$ifdef UseInline} inline; {$endif} var I: Integer; P: ThtPropertyIndex; begin I := StyleProperties.IndexOf(PropWord); Result := I >= 0; if Result then begin P := ThtPropertyIndex(StyleProperties.Objects[I]); Result := P in [Low(ThtPropIndices)..High(ThtPropIndices)]; if Result then PropIndex := P; end; end; var Sequence: Integer; {----------------TProperties.Create} constructor TProperties.Create; var I: ThtPropIndices; begin inherited Create; ID := Sequence; Inc(Sequence); FontBG := clNone; for I := MarginTop to BorderSpacingVert do Props[I] := IntNull; Props[ZIndex] := 0; FUseQuirksMode := False; end; //-- BG ---------------------------------------------------------- 12.09.2010 -- constructor TProperties.Create(APropStack: TPropStack; const AUseQuirksMode : Boolean); begin Create; Self.PropStack := APropStack; FUseQuirksMode := AUseQuirksMode; end; constructor TProperties.Create(const AUseQuirksMode : Boolean); begin Create; FUseQuirksMode := AUseQuirksMode; end; //-- BG ---------------------------------------------------------- 20.01.2013 -- constructor TProperties.CreateCopy(ASource: TProperties); begin FDefPointSize := ASource.DefPointSize; PropStack := ASource.PropStack ; InLink := ASource.InLink ; DefFontname := ASource.DefFontname ; FUseQuirksMode := ASource.FUseQuirksMode; PropTag := ASource.PropTag ; PropClass := ASource.PropClass ; PropID := ASource.PropID ; PropPseudo := ASource.PropPseudo ; PropTitle := ASource.PropTitle ; PropStyle := ASource.PropStyle ; FontBG := ASource.FontBG ; FCharSet := ASource.FCharSet ; FCodePage := ASource.FCodePage ; FEmSize := ASource.FEmSize ; FExSize := ASource.FExSize ; Props := ASource.Props ; Originals := ASource.Originals ; ID := ASource.ID ; if ASource.FIArray <> nil then begin FIArray := TFontInfoArray.Create; FIArray.Assign(ASource.FIArray); end; if ASource.TheFont <> nil then begin TheFont := ThtFont.Create; TheFont.Assign(ASource.TheFont); end; end; destructor TProperties.Destroy; begin TheFont.Free; FIArray.Free; inherited; end; {----------------TProperties.Copy} procedure TProperties.Copy(Source: TProperties); var I: ThtPropIndices; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'Copy'); CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Source,'Source'); {$ENDIF} FDefPointSize := Source.DefPointSize; for I := Low(I) to High(I) do Props[I] := Source.Props[I]; {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.ExitMethod(Self,'Copy'); {$ENDIF} end; {----------------TProperties.CopyDefault} procedure TProperties.CopyDefault(Source: TProperties); var I: ThtPropIndices; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'CopyDefault'); CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Source,'Source'); {$ENDIF} for I := Low(I) to High(I) do Props[I] := Source.Props[I]; CodePage := Source.CodePage; DefFontname := Source.DefFontname; FDefPointSize := Source.DefPointSize; PropTag := 'default'; {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.ExitMethod(Self,'CopyDefault'); {$ENDIF} end; procedure TProperties.Inherit(Tag: ThtString; Source: TProperties); {copy the properties that are inheritable} var I: ThtPropIndices; Span, HBF: Boolean; isTable: Boolean; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TProperties.Inherit'); CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.SendFmtMsg('tag = [%s]',[Tag]); StyleUn.LogProperties(Source,'Source'); {$ENDIF} Span := Source.PropTag = 'span'; HBF := (Source.PropTag = 'thead') or (Source.PropTag = 'tbody') or (Source.PropTag = 'tfoot'); isTable := Tag = 'table'; for I := Low(I) to High(I) do if Span {and (I <> BorderStyle)} then {Borderstyle already acted on} Props[I] := Source.Props[I] else if HBF then begin Props[I] := Source.Props[I]; {tr gets them all} Originals[I] := Source.Originals[I]; end else case I of MarginTop..BorderLeftStyle, piWidth, piHeight, piTop..piLeft: Props[I] := IntNull; WordWrap: if isTable then Props[I] := 'normal' else Props[I] := Source.Props[I]; BackgroundColor, BackgroundImage, BackgroundPosition, BackgroundRepeat, BackgroundAttachment, //BorderColor, BorderStyle, BorderCollapse, PageBreakBefore, PageBreakAfter, PageBreakInside, Clear, Float, Position, OverFlow, piDisplay: ; {do nothing} else Props[I] := Source.Props[I]; end; DefPointSize := Source.DefPointSize; DefFontname := Source.DefFontname; FontBG := Source.FontBG; CodePage := Source.CodePage; PropTitle := Source.PropTitle; InLink := Source.InLink; if InLink then begin if not Assigned(FIArray) then FIArray := TFontInfoArray.Create; FIArray.Assign(Source.FIArray); end; FEmSize := Source.FEmSize; {actually this is calculated later } FExSize := Source.FExSize; {apparently correlates with what browsers are doing} {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.ExitMethod(Self,'TProperties.Inherit'); {$ENDIF} end; {----------------TProperties.Update} procedure TProperties.Update(Source: TProperties; Styles: TStyleList; I: Integer); {Change the inherited properties for this item to those of Source} var Index: ThtPropIndices; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TProperties.Update'); CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Source,'Source'); {$ENDIF} for Index := Low(Index) to High(Index) do if not Originals[Index] then Props[Index] := Source.Props[Index]; FreeAndNil(TheFont); {may no longer be good} if Assigned(FIArray) then if Source.Inlink then FIArray.Assign(Source.FIArray) else if PropPseudo = 'link' then {an <a href> tag} CalcLinkFontInfo(Styles, I) else begin {an <a href> tag has been removed} FreeAndNil(FIArray); Inlink := False; end; {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.ExitMethod(Self,'TProperties.Update'); {$ENDIF} end; {----------------TProperties.Assign} procedure TProperties.Assign(const Item: Variant; Index: ThtPropIndices); {Assignment should be made in order of importance as the first one in predominates} var I: FIIndex; begin if not Originals[Index] then begin Props[Index] := Item; Originals[Index] := True; if InLink then case Index of Color: for I := LFont to HVFont do FIArray.Ar[I].iColor := Item; FontSize: for I := LFont to HVFont do FIArray.Ar[I].iSize := Item; FontFamily: for I := LFont to HVFont do FIArray.Ar[I].iName := Item; end; end; end; function TProperties.GetBackgroundImage(var Image: ThtString): Boolean; begin if (VarIsStr(Props[BackgroundImage])) then if (Props[BackgroundImage] = 'none') then begin Image := ''; Result := True; end else begin Image := ReadUrl(Props[BackgroundImage]); Result := Image <> ''; end else Result := False; end; //procedure TProperties.AssignCharSet(CS: TFontCharset); //begin // AssignCharSetAndCodePage(CS, CharSetToCodePage(CS)); //end; //-- BG ---------------------------------------------------------- 30.01.2011 -- function TranslateCharset(CS: TFontCharset): TFontCharset; {$ifdef UseInline} inline; {$endif} // extracted from TProperties.AssignCharSetAndCodePage() var Save: THandle; tm: TTextmetric; DC: HDC; Font: TFont; begin if not CharsetPerCharset[CS].Inited then begin {the following makes sure the CharSet is available} CharsetPerCharset[CS].Inited := True; CharsetPerCharset[CS].Charset := CS; Font := TFont.Create; try Font.Name := ''; Font.CharSet := CS; DC := GetDC(0); try Save := SelectObject(DC, Font.Handle); try GetTextMetrics(DC, tm); CharsetPerCharset[CS].Charset := tm.tmCharSet; finally SelectObject(DC, Save); end; finally ReleaseDC(0, DC); end; finally Font.Free; end; end; Result := CharsetPerCharset[CS].Charset; end; //-- BG ---------------------------------------------------------- 25.12.2010 -- procedure TProperties.AssignCharSetAndCodePage(CS: TFontCharset; CP: Integer); var IX: FIIndex; begin if (FCharSet <> CS) or (FCodePage <> CP) then begin case CS of EastEurope8859_2: FCharSet := TranslateCharset(EASTEUROPE_CHARSET); DEFAULT_CHARSET: FCharSet := CS; else FCharSet := TranslateCharset(CS); end; if Assigned(FIArray) then for IX := LFont to HVFont do FIArray.Ar[IX].iCharset := CharSet; FCodePage := CP; end; end; procedure TProperties.AssignCodePage(const CP: Integer); begin case CP of CP_UTF8, CP_UTF16LE, CP_UTF16BE: AssignCharSetAndCodePage(DEFAULT_CHARSET, CP); else AssignCharSetAndCodePage(CodePageToCharSet(CP), CP); end; end; {----------------TProperties.GetBackgroundPos} procedure TProperties.GetBackgroundPos(EmSize, ExSize: Integer; out P: PtPositionRec); var S: array[1..2] of ThtString; Tmp: ThtString; I, N, XY: Integer; PXY: PPositionRec; begin //BG, 29.08.2009: thanks to SourceForge user 'bolex': 'not' was missing. if (not VarIsStr(Props[BackgroundPosition])) then begin P.X.PosType := bpDim; P.X.Value := 0; P.Y := P.X; end else begin Tmp := Trim(Props[BackgroundPosition]); N := Pos(' ', Tmp); if N > 0 then begin S[1] := System.Copy(Tmp, 1, N - 1); S[2] := Trim(system.Copy(Tmp, N + 1, 255)); N := 2; end else begin S[1] := Tmp; N := 1; end; I := 1; XY := 1; {X} while I <= N do begin if XY = 1 then PXY := @P.X else PXY := @P.Y; PXY.PosType := bpDim; if S[I] = 'center' then PXY.PosType := bpCenter else if Pos('%', S[I]) > 0 then PXY.PosType := bpPercent else if S[I] = 'left' then begin if XY = 2 then {entered in reverse direction} P.Y := P.X; P.X.PosType := bpLeft; end else if S[I] = 'right' then begin if XY = 2 then P.Y := P.X; P.X.PosType := bpRight; end else if S[I] = 'top' then begin P.Y.PosType := bpTop; if XY = 1 then Dec(XY); {read next one into X} end else if S[I] = 'bottom' then begin P.Y.PosType := bpBottom; if XY = 1 then Dec(XY); end; if PXY.PosType in [bpDim, bpPercent] then begin PXY.Value := LengthConv(S[I], False, 100, EmSize, ExSize, 0); end; Inc(I); Inc(XY); end; if N = 1 then if XY = 2 then P.Y.PosType := bpCenter else P.X.PosType := bpCenter; {single entry but it was a Y} end; P.X.RepeatD := True; P.Y.RepeatD := True; if (VarIsStr(Props[BackgroundRepeat])) then begin Tmp := Trim(Props[BackgroundRepeat]); if Tmp = 'no-repeat' then begin P.X.RepeatD := False; P.Y.RepeatD := False; end else if Tmp = 'repeat-x' then P.Y.RepeatD := False else if Tmp = 'repeat-y' then P.X.RepeatD := False; end; P.X.Fixed := False; if (VarIsStr(Props[BackgroundAttachment])) and (Trim(Props[BackgroundAttachment]) = 'fixed') then P.X.Fixed := True; P.Y.Fixed := P.X.Fixed; end; function TProperties.GetVertAlign(var Align: ThtAlignmentStyle): Boolean; {note: 'top' should have a catagory of its own} var S: ThtString; begin if (VarIsStr(Props[VerticalAlign])) then begin Result := True; S := Props[VerticalAlign]; if (S = 'top') or (S = 'text-top') then Align := ATop else if S = 'middle' then Align := AMiddle else if S = 'baseline' then Align := ABaseline else if (S = 'bottom') then Align := ABottom else if (S = 'sub') then Align := ASub else if (S = 'super') then Align := ASuper else Result := False; end else Result := False; end; function TProperties.IsOverflowHidden: Boolean; begin Result := (VarIsStr(Props[OverFlow])) and (Props[OverFlow] = 'hidden'); end; function TProperties.GetFloat(var Align: ThtAlignmentStyle): Boolean; var S: ThtString; begin if (VarIsStr(Props[Float])) then begin Result := True; S := Props[Float]; if S = 'left' then Align := ALeft else if S = 'right' then Align := ARight else if S = 'none' then Align := ANone else Result := False; end else Result := False; end; function TProperties.GetClear(var Clr: ThtClearStyle): Boolean; var S: ThtString; begin if (VarIsStr(Props[Clear])) then begin Result := True; S := Props[Clear]; if (S = 'left') then Clr := clLeft else if S = 'right' then Clr := clRight else if S = 'both' then Clr := clAll else if S = 'none' then Clr := clrNone else Result := False; Props[Clear] := Unassigned; {allow only one read} end else Result := False; end; //-- BG ---------------------------------------------------------- 15.09.2009 -- function TProperties.GetDisplay: ThtDisplayStyle; begin if VarIsStr(Props[piDisplay]) then if TryStrToDisplayStyle(Props[piDisplay], Result) then exit; Result := pdUnassigned; end; //-- BG ---------------------------------------------------------- 16.04.2011 -- function TProperties.GetListStyleType: ThtBulletStyle; begin if VarIsStr(Props[ListStyleType]) then if TryStrToBulletStyle(Props[ListStyleType], Result) then Exit; Result := lbBlank; end; function TProperties.GetListStyleImage: ThtString; begin Result := ReadURL(Props[ListStyleImage]) end; function TProperties.GetPosition: ThtBoxPositionStyle; begin Result := posStatic; if VarIsStr(Props[Position]) then begin if Props[Position] = 'absolute' then Result := posAbsolute else if Props[Position] = 'fixed' then Result := posFixed else if Props[Position] = 'relative' then Result := posRelative; end; end; function TProperties.GetVisibility: ThtVisibilityStyle; begin Result := viVisible; if VarType(Props[Visibility]) in varInt then if Props[Visibility] = viHidden then Result := viHidden; end; function TProperties.GetZIndex: Integer; begin Result := 0; if VarType(Props[ZIndex]) in VarInt then Result := Props[ZIndex] else if VarIsStr(Props[ZIndex]) then Result := StrToIntDef(Props[ZIndex], 0); end; //-- BG ---------------------------------------------------------- 15.10.2010 -- function TProperties.HasBorderWidth: Boolean; begin Result := not (VarIsIntNull(Props[BorderTopWidth]) or VarIsEmpty(Props[BorderTopWidth])) or not (VarIsIntNull(Props[BorderRightWidth]) or VarIsEmpty(Props[BorderRightWidth])) or not (VarIsIntNull(Props[BorderBottomWidth]) or VarIsEmpty(Props[BorderBottomWidth])) or not (VarIsIntNull(Props[BorderLeftWidth]) or VarIsEmpty(Props[BorderLeftWidth])); end; function TProperties.Collapse: Boolean; begin Result := (VarIsStr(Props[BorderCollapse])) and (Props[BorderCollapse] = 'collapse'); end; function TProperties.GetLineHeight(NewHeight: Integer): Integer; var V: Double; Code: Integer; begin if VarIsStr(Props[LineHeight]) then begin Val(Props[LineHeight], V, Code); if Code = 0 then {a numerical entry with no 'em', '%', etc. Use the new font height} Result := Round(V * NewHeight) else {note: 'normal' yields -1 in the next statement} Result := LengthConv(Props[LineHeight], True, EmSize, EmSize, ExSize, -1); end else Result := -1; end; function TProperties.GetTextIndent(out PC: Boolean): Integer; var I: Integer; begin PC := False; if VarIsStr(Props[TextIndent]) then begin I := Pos('%', Props[TextIndent]); if I > 0 then begin PC := True; {return value in percent} Result := LengthConv(Props[TextIndent], True, 100, 0, 0, 0); end else Result := LengthConv(Props[TextIndent], False, 0, EmSize, EmSize, 0); end else Result := 0; end; function TProperties.GetTextTransform: ThtTextTransformStyle; begin try if VarType(Props[TextTransform]) in VarInt then Result := Props[TextTransform] else Result := txNone; except Result := txNone; end; end; function TProperties.GetFontVariant: ThtString; begin try if VarIsStr(Props[FontVariant]) then Result := Props[FontVariant] else Result := 'normal'; except Result := 'normal'; end; end; procedure TProperties.GetPageBreaks(out Before, After, Intact: Boolean); begin Before := (VarIsStr(Props[PageBreakBefore])) and (Props[PageBreakBefore] = 'always'); After := (VarIsStr(Props[PageBreakAfter])) and (Props[PageBreakAfter] = 'always'); Intact := (VarIsStr(Props[PageBreakInside])) and (Props[PageBreakInside] = 'avoid'); end; function TProperties.GetBackgroundColor: TColor; begin if (VarType(Props[BackgroundColor]) in varInt) and Originals[BackgroundColor] then {Originals to prevent fonts from getting inherited background color} Result := Props[BackgroundColor] else Result := clNone; end; function TProperties.GetOriginalForegroundColor: TColor; begin {return a color only if it hasn't been inherited} if (VarType(Props[Color]) in varInt) and Originals[Color] then Result := Props[Color] else Result := clNone; end; //-- BG ---------------------------------------------------------- 12.03.2011 -- function TProperties.GetBorderStyle(Index: ThtPropIndices; var BorderStyle: ThtBorderStyle): Boolean; // Returns True, if there is a valid border style property. begin Result := False; if VarIsStr(Props[Index]) then Result := TryStrToBorderStyle(Props[Index], BorderStyle) else if VarType(Props[Index]) in varInt then if (Props[Index] >= Low(ThtBorderStyle)) and (Props[Index] <= High(ThtBorderStyle)) then begin BorderStyle := ThtBorderStyle(Props[Index]); Result := True; end; end; function TProperties.GetBoxSizing(var VBoxSizing: ThtBoxSizing): Boolean; begin Result := TryStrToBoxSizing(Props[BoxSizing], VBoxSizing); end; function TProperties.BorderStyleNotBlank: Boolean; {was a border of some type (including bssNone) requested?} var Dummy: ThtBorderStyle; begin Dummy := bssNone; Result := GetBorderStyle(BorderTopStyle, Dummy) or GetBorderStyle(BorderRightStyle, Dummy) or GetBorderStyle(BorderBottomStyle, Dummy) or GetBorderStyle(BorderLeftStyle, Dummy); end; //-- BG ---------------------------------------------------------- 12.03.2011 -- function TProperties.HasBorderStyle: Boolean; // Returns True, if at least one border has a style. var Dummy: ThtBorderStyle; begin Dummy := bssNone; GetBorderStyle(BorderTopStyle, Dummy); Result := Dummy <> bssNone; if Result then exit; GetBorderStyle(BorderRightStyle, Dummy); Result := Dummy <> bssNone; if Result then exit; GetBorderStyle(BorderBottomStyle, Dummy); Result := Dummy <> bssNone; if Result then exit; GetBorderStyle(BorderLeftStyle, Dummy); Result := Dummy <> bssNone; end; function TProperties.GetBorderSpacingHorz: Integer; var V: Double; Code: Integer; begin if VarIsStr(Props[BorderSpacingHorz]) then begin Val(Props[BorderSpacingHorz], V, Code); if Code = 0 then {a numerical entry with no 'em', '%', etc. } Result := Round(V) else {note: 'normal' yields -1 in the next statement} Result := LengthConv(Props[BorderSpacingHorz], True, EmSize, EmSize, ExSize, -1); end else Result := -1; end; function TProperties.GetBorderSpacingVert: Integer; var V: Double; Code: Integer; begin if VarIsStr(Props[BorderSpacingVert]) then begin Val(Props[BorderSpacingVert], V, Code); if Code = 0 then {a numerical entry with no 'em', '%', etc. } Result := Round(V) else {note: 'normal' yields -1 in the next statement} Result := LengthConv(Props[BorderSpacingVert], True, EmSize, EmSize, ExSize, -1); end else Result := -1; end; function TProperties.HasBorderSpacing: Boolean; begin Result := not (VarIsIntNull(Props[BorderSpacingHorz]) or VarIsEmpty(Props[BorderSpacingHorz])); end; procedure TProperties.SetFontBG; {called for font tags like <b>, <small>, etc. Sets the font background color.} begin if (VarType(Props[BackgroundColor]) in varInt) and Originals[BackgroundColor] then FontBG := Props[BackgroundColor]; end; //-- BG ---------------------------------------------------------- 20.01.2013 -- procedure TProperties.SetPropertyDefault(Index: ThtPropIndices; const Value: Variant); begin if (Props[Index] = Unassigned) or ((VarType(Props[Index]) in varInt) and (Props[Index] = IntNull)) then Props[Index] := Value; end; //-- BG ---------------------------------------------------------- 20.01.2013 -- procedure TProperties.SetPropertyDefaults(Indexes: ThtPropIndexSet; const Value: Variant); var Index: ThtPropIndices; begin for Index := Low(Index) to High(Index) do if Index in Indexes then SetPropertyDefault(Index, Value); end; //-- BG ---------------------------------------------------------- 23.11.2009 -- function TProperties.ShowEmptyCells: Boolean; begin {$ifdef EmptyCellsDefaultIsShow} Result := not (VarIsStr(Props[piEmptyCells]) and (Props[piEmptyCells] = 'hide')); {$else} Result := VarIsStr(Props[piEmptyCells]) and (Props[piEmptyCells] = 'show') ; {$endif} end; procedure ConvVertMargins(const VM: ThtVMarginArray; var CD: ThtConvData; var M: ThtMarginArray); begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod('ConvVertMargins'); CodeSiteLogging.CodeSite.Send('BaseHeight = [%d]',[BaseHeight]); CodeSiteLogging.CodeSite.Send('EmSize = [%d]',[EmSize]); CodeSiteLogging.CodeSite.Send('ExSize = [%d]',[ExSize]); StyleUn.LogTVMarginArray(VM,'VM'); {$ENDIF} ConvMargProp(MarginTop, VM, CD, M); ConvMargProp(MarginBottom, VM, CD, M); ConvMargProp(piMinHeight, VM, CD, M); {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.Send('Results'); CodeSiteLogging.CodeSite.ExitMethod('ConvVertMargins'); StyleUn.LogThtMarginArray(M,'M'); {$ENDIF} end; //-- BG ---------------------------------------------------------- 25.04.2012 -- function IsAuto(const Value: Variant): Boolean; {$ifdef UseInline} inline; {$endif} begin Result := Value = Auto; end; //-- BG ---------------------------------------------------------- 05.10.2010 -- function VarIsIntNull(const Value: Variant): Boolean; {$ifdef UseInline} inline; {$endif} begin Result := (VarType(Value) in varInt) and (Value = IntNull); end; //-- BG ---------------------------------------------------------- 05.10.2010 -- function VarIsAuto(const Value: Variant): Boolean; {$ifdef UseInline} inline; {$endif} begin Result := (VarType(Value) in varInt) and (Value = Auto); end; //-- BG ---------------------------------------------------------- 05.10.2010 -- function VMargToMarg(const Value: Variant; Relative: Boolean; Base, EmSize, ExSize, Default: Integer): Integer; {$ifdef UseInline} inline; {$endif} begin if VarIsStr(Value) then Result := LengthConv(Value, Relative, Base, EmSize, ExSize, Default) else if (VarType(Value) in varInt) and (Value <> IntNull) then Result := Value else Result := Default; end; procedure ApplyBoxWidthSettings(var AMarg : ThtMarginArray; var VMinWidth, VMaxWidth : Integer; const AUseQuirksMode : Boolean); {$ifdef UseInline} inline; {$endif} begin {Important!!! You have to do this with settings. This is only for FindWidth methods} if not AUseQuirksMode then begin if AMarg[piMaxWidth] > 0 then begin AMarg[piWidth] := Min(AMarg[piMaxWidth], AMarg[piWidth]); VMaxWidth := Min(AMarg[piMaxWidth], VMaxWidth); end; if AMarg[piMinWidth] > 0 then begin AMarg[piWidth] := Max(AMarg[piMinWidth], AMarg[piWidth]); VMinWidth := Max(AMarg[piMinWidth], VMinWidth); end; end; end; procedure ApplyBoxSettings(var AMarg : ThtMarginArray; const AUseQuirksMode : Boolean); procedure ApplyBorderBoxModel(var AMarg : ThtMarginArray); begin if AMarg[piWidth] > -1 then Dec(AMarg[piWidth], AMarg[BorderLeftWidth] + AMarg[PaddingLeft] + AMarg[PaddingRight] + AMarg[BorderRightWidth]); if AMarg[piHeight] > -1 then Dec(AMarg[piHeight], AMarg[BorderTopWidth] + AMarg[PaddingTop] + AMarg[PaddingBottom] + AMarg[BorderBottomWidth]); end; begin if AUseQuirksMode then ApplyBorderBoxModel(AMarg) else begin {JPM: This test is here to prevent AMarg[piWidth] from being ruined if it is set to Auto. If it is ruined, AutoCount might be incremented correctly causing a rendering bug. } //min max width if AMarg[piWidth] > -1 then begin if AMarg[piMaxWidth] > 0 then AMarg[piWidth] := Min(AMarg[piWidth], AMarg[piMaxWidth]); if AMarg[piMinWidth] > 0 then AMarg[piWidth] := Max(AMarg[piWidth], AMarg[piMinWidth]); end; //min max height if AMarg[piHeight] > -1 then begin if AMarg[piMaxHeight] > 0 then AMarg[piHeight] := Min(AMarg[piHeight], AMarg[piMaxHeight]); if AMarg[piMinHeight] > 0 then AMarg[piHeight] := Max(AMarg[piHeight], AMarg[piMinHeight]); end; case ThtBoxSizing(AMarg[BoxSizing]) of BorderBox: ApplyBorderBoxModel(AMarg); end; end; end; {----------------ConvMargArray} //-- BG ---------------------------------------------------------- 16.05.2014 -- function ConvData( BaseWidth, BaseHeight: Integer; EmSize, ExSize: Integer; BorderWidth: Integer; AutoCount: Integer = 0): ThtConvData; begin Result.BaseWidth := BaseWidth; Result.BaseHeight := BaseHeight; Result.EmSize := EmSize; Result.ExSize := ExSize; Result.BorderWidth := BorderWidth; Result.AutoCount := AutoCount; Result.IsAutoParagraph := []; end; //-- BG ---------------------------------------------------------- 16.05.2014 -- procedure ConvMargProp(I: ThtPropIndices; const VM: ThtVMarginArray; var ConvData: ThtConvData; var M: ThtMarginArray); function Base(I: ThtPropIndices): Integer; begin case I of BorderTopWidth, BorderBottomWidth, MarginTop, MarginBottom, piMinHeight, piMaxHeight, PaddingTop, PaddingBottom, LineHeight, piHeight, piTop: Base := ConvData.BaseHeight else Base := ConvData.BaseWidth; end; end; var LBoxSizing : ThtBoxSizing; begin with ConvData do begin case I of BackgroundColor, BorderTopColor..BorderLeftColor: begin if VarType(VM[I]) <= VarNull then M[I] := clNone else M[I] := VM[I]; end; BorderTopWidth..BorderLeftWidth: begin if VM[ThtPropIndices(Ord(BorderTopStyle) + (Ord(I) - Ord(BorderTopWidth)))] = bssNone then M[I] := 0 else begin if VarIsStr(VM[I]) then begin if VM[I] = 'thin' then M[I] := 2 else if VM[I] = 'medium' then M[I] := 4 else if VM[I] = 'thick' then M[I] := 6 else M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, BorderWidth); {Auto will be 4} end else if (VarType(VM[I]) in varInt) then begin if (VM[I] = IntNull) then M[I] := BorderWidth else M[I] := VM[I]; end; end; end; piMinHeight, piMaxHeight, piHeight: begin if VarIsStr(VM[I]) then begin M[I] := LengthConv(VM[I], False, Base(I), EmSize, ExSize, 0); {Auto will be 0} if Pos('%', VM[I]) > 0 then {include border in % heights} M[I] := M[I] - M[BorderTopWidth] - M[BorderBottomWidth] - M[PaddingTop] - M[PaddingBottom]; end else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := 0 else M[I] := VM[I]; end else M[I] := 0; end; PaddingTop..PaddingLeft,BorderSpacingHorz,BorderSpacingVert: begin if VarIsStr(VM[I]) then begin M[I] := LengthConv(VM[I], False, Base(I), EmSize, ExSize, 0); {Auto will be 0} end else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := 0 else M[I] := VM[I]; end else M[I] := 0; end; piTop..piLeft: begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, Base(I), EmSize, ExSize, Auto) {Auto will be Auto} else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := Auto else M[I] := VM[I]; end else M[I] := Auto; end; BoxSizing: if TryStrToBoxSizing(VM[I],LBoxSizing) then begin M[I] := Ord(LBoxSizing); end else begin //assume content-box M[I] := 0; end; MarginRight, MarginLeft: begin if VarIsStr(VM[I]) then begin if VM[I] = 'auto' then begin M[I] := Auto; Inc(AutoCount); end else M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, 0); end else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := 0 else M[I] := VM[I]; end else M[I] := 0; end; MarginTop, MarginBottom: begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, BaseHeight, EmSize, ExSize, 0) {Auto will be 0} else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := 0 else if VM[I] = AutoParagraph then begin M[I] := ParagraphSpace; Include(IsAutoParagraph, I); end else M[I] := VM[I]; end else M[I] := 0; end; piMinWidth, piMaxWidth: begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, Auto) else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := 0 else M[I] := VM[I]; end else M[I] := 0; end; piWidth: begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, Auto) else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := Auto else M[I] := VM[I]; end else M[I] := Auto; if M[I] = Auto then Inc(AutoCount); end; else begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, Base(I), EmSize, ExSize, 0) else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := 0 else M[I] := VM[I]; end else M[I] := 0; end; end; end; end; procedure ConvMargArray(const VM: ThtVMarginArray; BaseWidth, BaseHeight, EmSize, ExSize: Integer; BorderWidth: Integer; out AutoCount: Integer; var M: ThtMarginArray); {This routine does not do MarginTop and MarginBottom as they are done by ConvVertMargins} var I: ThtPropIndices; CD: ThtConvData; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod('ConvMargArray'); CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.Send('Input'); CodeSiteLogging.CodeSite.AddSeparator; LogTVMarginArray(VM,'VM'); CodeSiteLogging.CodeSite.Send('BaseWidth = [%d]',[BaseWidth]); CodeSiteLogging.CodeSite.Send('BaseHeight = [%d]',[BaseHeight]); CodeSiteLogging.CodeSite.Send('BorderWidth = [%d]',[BorderWidth]); CodeSiteLogging.CodeSite.Send('EmSize = [%d]',[EmSize]); CodeSiteLogging.CodeSite.Send('ExSize = [%d]',[ExSize]); CodeSiteLogging.CodeSite.Send('BorderWidth = [%d]',[BorderWidth]); {$ENDIF} CD := ConvData(BaseWidth, BaseHeight, EmSize, ExSize, BorderWidth); for I := Low(VM) to High(VM) do if not (I in [MarginTop, MarginBottom]) then ConvMargProp(I, VM, CD, M); AutoCount := CD.AutoCount; {count of 'auto's in width items} {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.Send('Results'); LogThtMarginArray(M,'M'); CodeSiteLogging.CodeSite.Send('AutoCount = [%d]',[AutoCount]); CodeSiteLogging.CodeSite.ExitMethod('ConvMargArray'); {$ENDIF} end; procedure ConvMargArrayForCellPadding(const VM: ThtVMarginArray; EmSize, ExSize: Integer; var M: ThtMarginArray); {Return negative for no entry or percent entry} var I: ThtPropIndices; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod('ConvMargArrayForCellPadding'); CodeSiteLogging.CodeSite.AddSeparator; LogTVMarginArray(VM,'VM'); CodeSiteLogging.CodeSite.Send('EmSize = [%d]',[EmSize]); CodeSiteLogging.CodeSite.Send('ExSize = [%d]',[ExSize]); {$ENDIF} for I := PaddingTop to PaddingLeft do if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, -100, EmSize, ExSize, 0) {Auto will be 0} else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := -1 else M[I] := VM[I]; end else M[I] := -1; {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; LogThtMarginArray(M,'M'); CodeSiteLogging.CodeSite.ExitMethod('ConvMargArrayForCellPadding'); {$ENDIF} end; {----------------ConvInlineMargArray} procedure ConvInlineMargArray(const VM: ThtVMarginArray; BaseWidth, BaseHeight, EmSize, ExSize: Integer; {BStyle: ThtBorderStyle;} out M: ThtMarginArray); {$ifdef UseInline} inline; {$endif} {currently for images, form controls. BaseWidth/Height and BStyle currently not supported} var I: ThtPropIndices; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod('ConvInlineMargArray'); CodeSiteLogging.CodeSite.AddSeparator; LogTVMarginArray(VM,'VM'); CodeSiteLogging.CodeSite.Send('BaseWidth = [%d]',[BaseWidth]); CodeSiteLogging.CodeSite.Send('BaseHeight = [%d]',[BaseHeight]); CodeSiteLogging.CodeSite.Send('EmSize = [%d]',[EmSize]); CodeSiteLogging.CodeSite.Send('ExSize = [%d]',[ExSize]); {$ENDIF} for I := Low(VM) to High(VM) do case I of piHeight, piWidth: begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, Auto) {Auto will be Auto} else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := IntNull else M[I] := VM[I]; end else M[I] := IntNull; end; piMinHeight, piMinWidth, piMaxHeight, piMaxWidth, MarginLeft, MarginRight, MarginTop, MarginBottom: begin if VarIsStr(VM[I]) then M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, 0) {auto is 0} else if VarType(VM[I]) in varInt then begin if VM[I] = IntNull then M[I] := IntNull else M[I] := VM[I]; end else M[I] := IntNull; end; BorderTopWidth..BorderLeftWidth: begin if VM[ThtPropIndices(Ord(BorderTopStyle) + (Ord(I) - Ord(BorderTopWidth)))] = bssNone then M[I] := 0 else begin if VarIsStr(VM[I]) then begin if VM[I] = 'thin' then M[I] := 2 else if VM[I] = 'medium' then M[I] := 4 else if VM[I] = 'thick' then M[I] := 6 else M[I] := LengthConv(VM[I], False, BaseWidth, EmSize, ExSize, 4); {Auto will be 4} end else if (VarType(VM[I]) in varInt) then begin if (VM[I] = IntNull) then M[I] := 4 else M[I] := VM[I]; end; end; end; else ; {remaining items unsupported/unused} end; {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; LogThtMarginArray(M,'M'); CodeSiteLogging.CodeSite.ExitMethod('ConvInlineMargArray'); {$ENDIF} end; {----------------TProperties.Combine} procedure TProperties.Combine(Styles: TStyleList; const Tag, AClass, AnID, PSeudo, ATitle: ThtString; AProp: TProperties; ParentIndexInPropStack: Integer); {When called, this TProperties contains the inherited properties. Here we add the ones relevant to this item. AProp are TProperties gleaned from the Style= attribute. AClass may be a multiple class like class="ab.cd"} procedure CombineX(Styles: TStyleList; const Tag, AClass, AnID, PSeudo, ATitle: ThtString; AProp: TProperties); {When called, this TProperties contains the inherited properties. Here we add the ones relevant to this item. AProp are TProperties gleaned from the Style= attribute.} var OldSize: Double; NoHoverVisited: Boolean; procedure Merge(Source: TProperties; Reverse: Boolean = False); var Index: ThtPropIndices; I: FIIndex; Wt: Integer; S1: ThtString; begin {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod('TProperties.Combine CombineX Merge'); CodeSiteLogging.CodeSite.Send('Parameters'); CodeSiteLogging.CodeSite.AddSeparator; LogProperties(Source,'Source'); {$endif} for Index := Low(Index) to High(ThtPropIndices) do begin if Reverse then begin if (Props[Index] <> Unassigned) and not VarIsIntNull(Props[Index]) then continue; end; if (VarType(Source.Props[Index]) <> varEmpty) and (Vartype(Source.Props[Index]) <> varNull) then case Index of MarginTop..BorderSpacingVert: if VarIsStr(Source.Props[Index]) then // if VarType(Source.Props[Index]) = VarString then begin Props[Index] := Source.Props[Index]; Originals[Index] := True; end else if Source.Props[Index] <> IntNull then begin Props[Index] := Source.Props[Index]; Originals[Index] := True; end; FontFamily, FontSize, FontStyle, FontWeight, Color, BackgroundColor, TextDecoration, LetterSpacing: begin Originals[Index] := True; Props[Index] := Source.Props[Index]; if InLink then for I := LFont to HVFont do with FIArray.Ar[I] do case Index of FontFamily: begin S1 := ReadFontName(Props[FontFamily]); if S1 <> '' then iName := S1; end; FontSize: iSize := FontSizeConv(Props[FontSize], iSize, DefPointSize, FUseQuirksMode); Color: iColor := Props[Color]; BackgroundColor: ibgColor := Props[BackgroundColor]; FontStyle: if (Props[FontStyle] = 'italic') or (Props[FontStyle] = 'oblique') then iStyle := iStyle + [fsItalic] else if Props[FontStyle] = 'normal' then iStyle := iStyle - [fsItalic]; FontWeight: if Pos('bold', Props[FontWeight]) > 0 then iStyle := iStyle + [fsBold] else if Pos('normal', Props[FontWeight]) > 0 then iStyle := iStyle - [fsBold] else begin Wt := StrToIntDef(Props[FontWeight], 0); if Wt >= 600 then iStyle := iStyle + [fsBold]; end; TextDecoration: if Props[TextDecoration] = 'underline' then iStyle := iStyle + [fsUnderline] else if Props[TextDecoration] = 'line-through' then iStyle := iStyle + [fsStrikeOut] else if Props[TextDecoration] = 'none' then iStyle := iStyle - [fsStrikeOut, fsUnderline]; LetterSpacing: iCharExtra := Props[LetterSpacing]; end; end else begin Props[Index] := Source.Props[Index]; Originals[Index] := True; {it's defined for this item, not inherited} end; end; end; {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.Send('Results'); CodeSiteLogging.CodeSite.AddSeparator; LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.ExitMethod('TProperties.Combine CombineX Merge'); {$endif} end; function CheckForContextual(I: Integer): Boolean; {process contextual selectors} var J, K, N: Integer; A: array[1..20] of record Tg, Cl, ID, PS: ThtString; gt: Boolean; end; MustMatchParent: Boolean; procedure Split(S: ThtString); var I, J: Integer; begin N := 1; {N is number of selectors in contextual ThtString} I := Pos(' ', S); while (I > 0) and (N < 20) do begin A[N].Tg := System.Copy(S, 1, I - 1); Delete(S, 1, I); S := Trim(S); Inc(N); I := Pos(' ', S); end; A[N].Tg := S; if N >= 2 then while Length(A[2].Tg) > 0 do begin case A[2].Tg[1] of '0'..'9': Delete(A[2].Tg, 1, 1); {remove the sort digit} else break; end; end; for I := 1 to N do begin J := Pos('>', A[I].Tg); if I > 1 then A[I - 1].gt := J > 0; if J > 0 then Delete(A[I].Tg, J, 1); J := Pos(':', A[I].Tg); if J > 0 then begin A[I].PS := System.Copy(A[I].Tg, J + 1, Length(A[I].Tg)); A[I].Tg := System.Copy(A[I].Tg, 1, J - 1); end else A[I].PS := ''; J := Pos('#', A[I].Tg); if J > 0 then begin A[I].ID := System.Copy(A[I].Tg, J + 1, Length(A[I].Tg)); A[I].Tg := System.Copy(A[I].Tg, 1, J - 1); end else A[I].ID := ''; J := Pos('.', A[I].Tg); if J > 0 then begin A[I].Cl := System.Copy(A[I].Tg, J + 1, Length(A[I].Tg)); A[I].Tg := System.Copy(A[I].Tg, 1, J - 1); end else A[I].Cl := ''; end; end; function PartOf(const S1, S2: ThtString): Boolean; {see if all classes in S1 are present in S2. Classes are separated by '.'} var SL1, SL2: ThtStringList; J, X: Integer; function FormStringList(S: ThtString): ThtStringList; {construct a ThtStringList from classes in ThtString S} var I: Integer; begin Result := ThtStringList.Create; Result.Sorted := True; I := Pos('.', S); while I >= 1 do begin Result.Add(System.Copy(S, 1, I - 1)); Delete(S, 1, I); I := Pos('.', S); end; Result.Add(S); end; begin {PartOf} SL1 := FormStringList(S1); try SL2 := FormStringList(S2); try Result := True; {assume all will be found} for J := 0 to SL1.Count - 1 do if not SL2.Find(SL1[J], X) then begin Result := False; {one is missing, return False} Break; end; finally SL2.Free; end; finally SL1.Free; end; end; begin Result := False; Split(Styles[I]); //split contextual selectors into parts in array A if (A[1].Tg <> Tag) and (A[1].Cl <> AClass) and (A[1].PS <> PSeudo) then Exit else Result := True; if (N > 1) //it's a contextual selector. N is count of selectors and ((A[1].Tg = Tag) or (A[1].Tg = '')) and ((A[1].Cl = AClass) or (A[1].Cl = '')) and ((A[1].ID = AnID) or (A[1].ID = '')) and ((A[1].PS = PSeudo) or (A[1].PS = '') and (PSeudo = 'link')) then begin //look thru the stack to see if this contextual selector is appropriate K := 2; //K is selector index in the sequence J := ParentIndexInPropStack; //PropStack.Count - 2; // start on stack item below this one MustMatchParent := A[1].gt; while (K <= N) and (J >= 1) do begin with PropStack[J] do if ((A[K].Tg = PropTag) or (A[K].Tg = '')) and ((A[K].Cl = PropClass) or (A[K].Cl = '') or PartOf(A[K].Cl, PropClass)) and ((A[K].ID = PropID) or (A[K].ID = '')) and ((A[K].PS = PropPseudo) or (A[K].PS = '')) then begin if K = N then //all parts of contextual selector match Merge(Styles.Objects[I] as TProperties); MustMatchParent := A[K].gt; Inc(K); end else if MustMatchParent then Break; {Didn't match} Dec(J); end; end end; procedure MergeItems(const Item: ThtString; Reverse: Boolean = False); {look up items in the Style list. If found, merge them in this TProperties. Items may be duplicated in which case the last has priority. Items may be simple tags like 'p', 'blockquote', 'em', etc or they may be more complex like p.class, em#id, a.class:link, etc} var X, Y: Integer; begin if Styles.Find(Item, X) then begin if Reverse then begin // Reverse is used to set unassigned values only. Y := X; Inc(X); while (X < Styles.Count) and (Styles[X] = Item) do begin //duplicates, last one has highest priority Inc(X); end; // merge in reverse order while X > Y do begin Dec(X); Merge(Styles.Objects[X] as TProperties, Reverse); end; end else begin Merge(Styles.Objects[X] as TProperties); Inc(X); while (X < Styles.Count) and (Styles[X] = Item) do begin //duplicates, last one has highest priority Merge(Styles.Objects[X] as TProperties); Inc(X); end; end; end; end; //BG, 09.09.2010: extracted from below procedure MergeContextuals(Style: ThtString); var IX: Integer; begin Styles.Find(Style, IX); //place to start try while (IX < Styles.Count) and (Pos(Style, Styles[IX]) = 1) and CheckForContextual(IX) do Inc(IX); except raise; end; end; begin if FUseQuirksMode then begin if (Tag = 'td') or (Tag = 'th') then begin OldSize := DefPointSize; end else begin if (VarType(Props[FontSize]) in VarNum) and (Props[FontSize] > 0.0) then {should be true} OldSize := Props[FontSize] else OldSize := DefPointSize; end; end else begin if (VarType(Props[FontSize]) in VarNum) and (Props[FontSize] > 0.0) then {should be true} OldSize := Props[FontSize] else OldSize := DefPointSize; end; {Some hover and visited items adequately taken care of when link processed} NoHoverVisited := (Pseudo = '') or ((Pseudo <> 'hover') and (Pseudo <> 'visited')); // in the following, lowest priority on top, highest towards bottom. if (Tag = 'a') and ((Pseudo = 'link') or (Pseudo = 'visited')) then MergeItems('::' + Pseudo); {default Pseudo definition} if NoHoverVisited then MergeItems(Tag); if Pseudo <> '' then MergeItems(':' + Pseudo); if (AClass <> '') and NoHoverVisited then begin MergeItems('.' + AClass); MergeItems(Tag + '.' + AClass); end; if Pseudo <> '' then begin MergeItems(Tag + ':' + Pseudo); if AClass <> '' then begin MergeItems('.' + AClass + ':' + Pseudo); MergeItems(Tag + '.' + AClass + ':' + Pseudo); end; end; if AnID <> '' then begin MergeItems('#' + AnID); MergeItems(Tag + '#' + AnID); if AClass <> '' then MergeItems('.' + AClass + '#' + AnID); if Pseudo <> '' then begin MergeItems('#' + AnID + ':' + Pseudo); MergeItems(Tag + '#' + AnID + ':' + Pseudo); end; if AClass <> '' then begin MergeItems(Tag + '.' + AClass + '#' + AnID); if Pseudo <> '' then begin MergeItems('.' + AClass + '#' + AnID + ':' + Pseudo); MergeItems(Tag + '.' + AClass + '#' + AnID + ':' + Pseudo); end; end; end; {process the entries in Styles to see if they are contextual selectors} if NoHoverVisited then MergeContextuals(Tag + ' '); if Pseudo <> '' then MergeContextuals(':' + Pseudo + ' '); if (AClass <> '') and NoHoverVisited then begin MergeContextuals('.' + AClass + ' '); MergeContextuals(Tag + '.' + AClass + ' '); end; if Pseudo <> '' then begin MergeContextuals(Tag + ':' + Pseudo + ' '); if AClass <> '' then begin MergeContextuals('.' + AClass + ':' + Pseudo + ' '); MergeContextuals(Tag + '.' + AClass + ':' + Pseudo + ' '); end; end; if AnID <> '' then begin MergeContextuals('#' + AnID + ' '); MergeContextuals(Tag + '#' + AnID + ' '); if AClass <> '' then MergeContextuals('.' + AClass + '#' + AnID + ' '); if Pseudo <> '' then begin MergeContextuals('#' + AnID + ':' + Pseudo + ' '); MergeContextuals(Tag + '#' + AnID + ':' + Pseudo + ' '); end; if AClass <> '' then begin MergeContextuals(Tag + '.' + AClass + '#' + AnID + ' '); if Pseudo <> '' then begin MergeContextuals('.' + AClass + '#' + AnID + ':' + Pseudo + ' '); MergeContextuals(Tag + '.' + AClass + '#' + AnID + ':' + Pseudo + ' '); end; end; end; if AProp <> nil then //the Style= attribute Merge(AProp); if (Tag = 'a') and not ((Pseudo = 'hover') or (Pseudo = 'active')) then // BG, 02.02.2013: github-issue 25: Multiple pseudo elements can apply // Just assign defaults for what is still unassigned: MergeItems('::' + Pseudo, True); {default Pseudo definition} if not (VarType(Props[FontSize]) in varNum) then {if still a ThtString, hasn't been converted} Props[FontSize] := FontSizeConv(Props[FontSize], OldSize, FDefPointSize, FUseQuirksMode); end; var BClass, S: ThtString; I: Integer; begin BClass := Trim(AClass); I := Pos('.', BClass); if I <= 0 then CombineX(Styles, Tag, BClass, AnID, PSeudo, '', AProp) {0 or 1 Class} else begin {more than one class} repeat S := System.Copy(BClass, 1, I - 1); CombineX(Styles, Tag, S, AnID, PSeudo, '', nil); Delete(BClass, 1, I); BClass := Trim(BClass); I := Pos('.', BClass); until I <= 0; CombineX(Styles, Tag, BClass, AnID, PSeudo, '', AProp); CombineX(Styles, Tag, AClass, AnID, PSeudo, '', AProp); end; PropTag := Tag; PropClass := AClass; PropID := AnID; PropPseudo := Pseudo; PropStyle := AProp; if ATitle <> '' then PropTitle := ATitle; if PSeudo = 'link' then begin if not Assigned(FIArray) then FIArray := TFontInfoArray.Create; CalcLinkFontInfo(Styles, PropStack.Count - 1); InLink := True; end; end; function TProperties.GetFont: ThtFont; var Font: ThtFontInfo; begin {call only if all things valid} if TheFont = nil then begin GetSingleFontInfo(Font); TheFont := AllMyFonts.GetFontLike(Font); FEmSize := TheFont.EmSize; FExSize := TheFont.ExSize; end; Result := ThtFont.Create; Result.Assign(TheFont); end; {----------------LowerCaseUnquotedStr} {Imporant: In many CSS values, a quoted string or anything in parathesis should be left in it's original case. Such a substring may be case-sensitive. Examples include URI filenames and Base64-encoded data. } function LowerCaseUnquotedStr(const S : THtString) : THtString; var Top: ThtChar; MoreStack: ThtString; LCh : ThtChar; idx, len : Integer; procedure Push(Ch: ThtChar); var I: Integer; begin if Top <> EofChar then begin I := Length(MoreStack) + 1; SetLength(MoreStack, I); MoreStack[I] := Top; end; Top := Ch; end; procedure Pop; var I: Integer; begin I := Length(MoreStack); if I > 0 then begin Top := MoreStack[I]; SetLength(MoreStack, I - 1); end else Top := EofChar; end; begin if (Pos('''',S) = 0) and (Pos('(',S)=0) and (Pos('"',S) = 0) then begin Result := LowerCase(S); exit; end; len := Length(S); SetLength(Result,len); for idx := 1 to Len do begin LCh := S[idx]; case LCh of '(' : begin if LCh = Top then Pop else Push(LCh); end; '''','"' : begin Push(LCh); end; ')' : begin if LCh = Top then Pop; end; 'A'..'Z' : begin if Top = EofChar then LCh := ThtChar(Word(LCh) or $0020); end; end; Result[idx] := LCh; end; end; {----------------RemoveQuotes} function RemoveQuotes(const S: ThtString): ThtString; {$ifdef UseInline} inline; {$endif} {if ThtString is a quoted ThtString, remove the quotes (either ' or ")} var L: Integer; begin L := Length(S); if (L >= 2) and (S[L] = S[1]) and ((S[1] = '''') or (S[1] = '"')) then Result := Copy(S, 2, Length(S) - 2) else Result := S; end; {----------------ReadFontName} function ReadFontName(S: ThtString): ThtString; const AMax = 5; var S1: ThtString; Done: Boolean; function NextFontName: ThtString; const Generic1: array[1..AMax] of ThtString = ('serif', 'monospace', 'sans-serif', 'cursive', 'Helvetica'); Generic2: array[1..AMax] of ThtString = ('Times New Roman', 'Courier New', 'Arial', 'Lucida Handwriting', 'Arial'); var I: Integer; begin I := Pos(',', S); {read up to the comma} if I > 0 then begin Result := Trim(System.Copy(S, 1, I - 1)); Delete(S, 1, I); end else begin {last item} Result := Trim(S); S := ''; end; for I := 1 to AMax do if CompareText(Result, Generic1[I]) = 0 then begin Result := Generic2[I]; break; end; Result := RemoveQuotes(Result); end; begin Done := False; S1 := NextFontName; while (S1 <> '') and not Done do begin Done := Screen.Fonts.IndexOf(S1) >= 0; if Done then Result := S1 else S1 := NextFontName; end; end; {----------------TProperties.GetSingleFontInfo} procedure TProperties.GetSingleFontInfo(var Font: ThtFontInfo); var Wt: Integer; Style: TFontStyles; begin {call only if all things valid} Font.ibgColor := FontBG; Font.iColor := Props[Color]; Style := []; if Pos('bold', Props[FontWeight]) > 0 then Include(Style, fsBold) else begin Wt := StrToIntDef(Props[FontWeight], 0); if Wt >= 600 then Include(Style, fsBold); end; if (Props[FontStyle] = 'italic') or (Props[FontStyle] = 'oblique') then Include(Style, fsItalic); if Props[TextDecoration] = 'underline' then Include(Style, fsUnderline) else if Props[TextDecoration] = 'line-through' then Include(Style, fsStrikeOut); Font.iStyle := Style; Font.iSize := Props[FontSize]; Font.iCharset := CharSet; Font.iCharExtra := Props[LetterSpacing]; Font.iName := ReadFontName(Props[FontFamily]); if Font.iName = '' then Font.iName := DefFontname; end; procedure TProperties.CalcLinkFontInfo(Styles: TStyleList; I: Integer); {I is index in PropStack for this item} procedure InsertNewProp(N: Integer; const Pseudo: ThtString); begin PropStack.Insert(N, TProperties.Create(PropStack,FUseQuirksMode)); PropStack[N].Inherit('', PropStack[N - 1]); PropStack[N].Combine(Styles, PropTag, PropClass, PropID, Pseudo, PropTitle, PropStyle, N - 1); end; begin PropStack[I].SetFontBG; GetSingleFontInfo(FIArray.Ar[LFont]); InsertNewProp(I + 1, 'visited'); PropStack[I + 1].SetFontBG; PropStack[I + 1].GetSingleFontInfo(FIArray.Ar[VFont]); InsertNewProp(I + 2, 'hover'); PropStack[I + 2].SetFontBG; PropStack[I + 2].GetSingleFontInfo(FIArray.Ar[HVFont]); PropStack.Delete(I + 2); PropStack.Delete(I + 1); InsertNewProp(I + 1, 'hover'); PropStack[I + 1].SetFontBG; PropStack[I + 1].GetSingleFontInfo(FIArray.Ar[HLFont]); PropStack.Delete(I + 1); end; procedure TProperties.GetFontInfo(AFI: TFontInfoArray); begin AFI.Assign(FIArray); end; procedure TProperties.GetVMarginArrayDefBorder(var MArray: ThtVMarginArray; const ADefColor : Variant); var I: ThtPropIndices; BS: ThtBorderStyle; NewColor : TColor; LVal : THtString; begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TProperties.GetVMarginArrayDefBorder'); LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.SendFmtMsg('ADefColor = %s',[LogPropColor( ADefColor )]); {$ENDIF} for I := Low(MArray) to High(MArray) do case I of BorderTopStyle..BorderLeftStyle: begin BS := MArray[I]; GetBorderStyle(I, BS); MArray[I] := BS; end; BorderTopColor..BorderLeftColor: begin if TryStrToColor(Props[I],False,NewColor) then begin MArray[I] := Props[I] end else begin LVal := Props[I]; if LVal = CurColor_Val then begin // 'currentColor' MArray[I] := Props[StyleUn.Color]; end else begin MArray[I] := ADefColor; end; end; end else MArray[I] := Props[I]; end; {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogTVMarginArray(MArray,'MArray'); CodeSiteLogging.CodeSite.ExitMethod(Self,'TProperties.GetVMarginArrayDefBorder'); {$ENDIF} end; procedure TProperties.GetVMarginArray(var MArray: ThtVMarginArray); {From: http://www.w3.org/TR/CSS21/box.html#x49 If an element's border color is not specified with a border property, user agents must use the value of the element's 'color' property as the computed value for the border color. } begin {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TProperties.GetVMarginArray'); LogProperties(Self,'Self'); {$ENDIF} GetVMarginArrayDefBorder(MArray,Props[StyleUn.Color]); {$IFDEF JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; StyleUn.LogTVMarginArray(MArray,'MArray'); CodeSiteLogging.CodeSite.ExitMethod(Self,'TProperties.GetVMarginArray'); {$ENDIF} end; procedure TProperties.AddPropertyByIndex(Index: ThtPropIndices; PropValue: ThtString); var NewColor: TColor; WhiteSpaceStyle : ThtWhiteSpaceStyle; begin {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TProperties.AddPropertyByIndex'); CodeSiteLogging.CodeSite.Send('Parameters'); CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.SendFmtMsg('Index = %s',[PropWords[Index]]); LogProperties(Self,'Self'); {$endif} case Index of // BorderColor: // if TryStrToColor(PropValue, False, NewColor) then // begin // Props[BorderColor] := NewColor; // Props[BorderLeftColor] := NewColor; // Props[BorderTopColor] := NewColor; // Props[BorderRightColor] := NewColor; // Props[BorderBottomColor] := NewColor; // end; BorderTopColor..BorderLeftColor: if TryStrToColor(PropValue, False, NewColor) then Props[Index] := NewColor else if LowerCase(PropValue) = CurColorStr then Props[Index] := CurColor_Val; Color, BackgroundColor: if TryStrToColor(PropValue, False, NewColor) then Props[Index] := NewColor else if Index = Color then Props[Index] := clBlack else Props[Index] := clNone; MarginTop..BorderLeftWidth, piWidth..BorderSpacingVert: Props[Index] := PropValue; FontSize: Props[FontSize] := PropValue; Visibility: if PropValue = 'visible' then Props[Visibility] := viVisible else if PropValue = 'hidden' then Props[Visibility] := viHidden; TextTransform: if PropValue = 'uppercase' then Props[TextTransform] := txUpper else if PropValue = 'lowercase' then Props[TextTransform] := txLower else Props[TextTransform] := txNone; WordWrap: if PropValue = 'break-word' then Props[WordWrap] := PropValue else Props[WordWrap] := 'normal'; piWhiteSpace: if TryStrToWhiteSpace(PropValue,WhiteSpaceStyle) then begin Props[piWhiteSpace] := PropValue; end; // if PropValue = 'nowrap' then // Props[piWhiteSpace] := PropValue // else if PropValue = 'normal' then // Props[piWhiteSpace] := 'normal'; FontVariant: if PropValue = 'small-caps' then Props[FontVariant] := PropValue else if PropValue = 'normal' then Props[FontVariant] := 'normal'; BorderTopStyle..BorderLeftStyle: begin // if PropValue <> 'none' then // Props[BorderStyle] := PropValue; Props[Index] := PropValue; end; // BorderStyle: // begin // Props[BorderStyle] := PropValue; // Props[BorderTopStyle] := PropValue; // Props[BorderRightStyle] := PropValue; // Props[BorderBottomStyle] := PropValue; // Props[BorderLeftStyle] := PropValue; // end; else Props[Index] := PropValue; end; {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.AddSeparator; CodeSiteLogging.CodeSite.Send('Results'); CodeSiteLogging.CodeSite.AddSeparator; LogProperties(Self,'Self'); CodeSiteLogging.CodeSite.ExitMethod(Self,'TProperties.AddPropertyByIndex'); {$endif} end; procedure TProperties.AddPropertyByName(const PropName, PropValue: ThtString); var Index: ThtPropIndices; begin {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TProperties.AddPropertyByName'); {$endif} if TryStrToPropIndex(PropName, Index) then AddPropertyByIndex(Index, PropValue); {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.ExitMethod(Self,'TProperties.AddPropertyByName'); {$endif} end; { TStyleList } constructor TStyleList.Create; begin inherited Create; Sorted := True; Duplicates := dupAccept; SeqNo := 10; FUseQuirksMode := False; end; constructor TStyleList.Create(AUseQuirksMode: Boolean); begin // Do not call the inherited constructor with 1 boolean parameter! // It's purpose is different (OwnsObjects: Boolean)! Create; FDefProp := nil; FUseQuirksMode := AUseQuirksMode; end; destructor TStyleList.Destroy; begin Clear; inherited Destroy; end; procedure TStyleList.Clear; var I: Integer; begin for I := 0 to Count - 1 do TProperties(Objects[I]).Free; SeqNo := 10; inherited; end; function TStyleList.GetSeqNo: ThtString; begin {used to help sort contextual items by entry sequence} // BG, 23.05.2013: Without fixed width for the number string entries 12 and 111 are sorted literally: // 'ul 111' // 'ul 12'. // With fixed width the sort order is: // 'ul 00012' // 'ul 00111' Result := Format('%.5d', [SeqNo]); Inc(SeqNo); end; procedure FixBordProps(AProp, BodyProp : TProperties); {$ifdef UseInline} inline; {$endif} var i : ThtPropIndices; begin for i := BorderTopColor to BorderLeftColor do AProp.Props[I] := BodyProp.Props[I]; end; procedure TStyleList.FixupTableColor(BodyProp: TProperties); {if Quirk is set, make sure that the table color is defined the same as the body color} var Propty1: TProperties; I: Integer; begin if Find('table', I) then begin Propty1 := TProperties(Objects[I]); Propty1.Props[FontSize] := BodyProp.Props[FontSize]; Propty1.Props[FontStyle] := BodyProp.Props[FontStyle]; Propty1.Props[FontWeight] := BodyProp.Props[FontWeight]; Propty1.Props[FontVariant] := BodyProp.Props[FontVariant]; Propty1.Props[Color] := BodyProp.Props[Color]; FixBordProps(Propty1,BodyProp); end; if Find('td', I) then begin Propty1 := TProperties(Objects[I]); Propty1.Props[Color] := BodyProp.Props[Color]; FixBordProps(Propty1,BodyProp); end; if Find('th', I) then begin Propty1 := TProperties(Objects[I]); Propty1.Props[Color] := BodyProp.Props[Color]; FixBordProps(Propty1,BodyProp); end; end; procedure TStyleList.AddModifyProp(const Selector, Prop, Value: ThtString); {strings are all lowercase here} var I: Integer; PropIndex: ThtPropIndices; Propty: TProperties; NewColor: TColor; NewProp: Boolean; WhiteSpaceStyle : ThtWhiteSpaceStyle; begin {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.EnterMethod(Self,'TStyleList.AddModifyProp'); CodeSiteLogging.CodeSite.Send('Parameters'); CodeSiteLogging.CodeSite.SendFmtMsg('Selector = %s',[Selector]); CodeSiteLogging.CodeSite.SendFmtMsg('Prop = %s',[Prop]); CodeSiteLogging.CodeSite.SendFmtMsg('Value = %s',[Value]); CodeSiteLogging.CodeSite.AddSeparator; {$endif} if TryStrToPropIndex(Prop, PropIndex) then begin if not Find(Selector, I) then begin NewProp := True; Propty := TProperties.Create(); {newly created property} Propty.DefPointSize := FDefPointSize; end else begin Propty := TProperties(Objects[I]); {modify existing property} NewProp := False; end; case PropIndex of Color: if TryStrToColor(Value, False, NewColor) then begin if Selector = ':link' then begin {changed the defaults to be the same as link} ModifyLinkColor('hover', NewColor); ModifyLinkColor('visited', NewColor); end else if Selector = ':visited' then ModifyLinkColor('hover', NewColor); Propty.Props[PropIndex] := NewColor; end; // BorderColor: // if TryStrToColor(Value, False, NewColor) then // begin // Propty.Props[BorderColor] := NewColor; // Propty.Props[BorderLeftColor] := NewColor; // Propty.Props[BorderTopColor] := NewColor; // Propty.Props[BorderRightColor] := NewColor; // Propty.Props[BorderBottomColor] := NewColor; // end; BorderTopColor..BorderLeftColor: if TryStrToColor(Value, False, NewColor) then Propty.Props[PropIndex] := NewColor else if LowerCase(Value) = CurColorStr then Propty.Props[PropIndex] := CurColor_Val; BackgroundColor: if TryStrToColor(Value, False, NewColor) then Propty.Props[PropIndex] := NewColor else Propty.Props[PropIndex] := clNone; Visibility: if Value = 'visible' then Propty.Props[Visibility] := viVisible else if Value = 'hidden' then Propty.Props[Visibility] := viHidden; TextTransform: if Value = 'uppercase' then Propty.Props[TextTransform] := txUpper else if Value = 'lowercase' then Propty.Props[TextTransform] := txLower else Propty.Props[TextTransform] := txNone; WordWrap: if Value = 'break-word' then Propty.Props[WordWrap] := Value else Propty.Props[WordWrap] := 'normal'; piWhiteSpace: if TryStrToWhiteSpace(Value,WhiteSpaceStyle) then begin Propty.Props[piWhiteSpace] := Value; end; // if Value = 'nowrap' then // Propty.Props[piWhiteSpace] := Value // else if Value = 'normal' then // Propty.Props[piWhiteSpace] := 'normal'; FontVariant: if Value = 'small-caps' then Propty.Props[FontVariant] := Value else if Value = 'normal' then Propty.Props[FontVariant] := 'normal'; BorderTopStyle..BorderLeftStyle: begin // if Value <> 'none' then // Propty.Props[BorderStyle] := Value; Propty.Props[PropIndex] := Value; end; // BorderStyle: // begin // Propty.Props[BorderStyle] := Value; // Propty.Props[BorderTopStyle] := Value; // Propty.Props[BorderRightStyle] := Value; // Propty.Props[BorderBottomStyle] := Value; // Propty.Props[BorderLeftStyle] := Value; // end; LineHeight: Propty.Props[PropIndex] := Value; else Propty.Props[PropIndex] := Value; end; if NewProp then AddObject(Selector, Propty); {it's a newly created property} if Pos(':hover', Selector) > 0 then LinksActive := True; if Selector = 'a' then begin AddModifyProp('::link', Prop, Value); {also applies to ::link} end; if UseQuirksMode then begin if (Selector = 'body') and (PropIndex = Color) then begin FixupTableColor(Propty); end; end; end; {$ifdef JPM_DEBUGGING} CodeSiteLogging.CodeSite.ExitMethod(Self,'TStyleList.AddModifyProp'); {$endif} end; function TStyleList.AddObject(const S: ThtString; AObject: TObject): Integer; begin Result := inherited AddObject(S, AObject); TProperties(AObject).PropTag := S; TProperties(AObject).FDefPointSize := DefPointSize; end; function TStyleList.AddDuplicate(const Tag: ThtString; Prop: TProperties): TProperties; begin Result := TProperties.Create(Prop.PropStack,FUseQuirksMode); Result.Copy(Prop); AddObject(Tag, Result); end; procedure TStyleList.ModifyLinkColor(Pseudo: ThtString; AColor: TColor); var I: Integer; begin if Find('::' + Pseudo, I) then {the defaults} with TProperties(Objects[I]) do Props[Color] := AColor; end; procedure TStyleList.Initialize(const FontName, PreFontName: ThtString; PointSize: Integer; AColor, AHotspot, AVisitedColor, AActiveColor: TColor; LinkUnderline: Boolean; ACodePage: TBuffCodePage; ACharSet: TFontCharSet; MarginHeight, MarginWidth: Integer); type ListTypes = (ul, ol, menu, dir, dl, dd, blockquote); const ListStr: array[Low(ListTypes)..High(ListTypes)] of ThtString = ('ul', 'ol', 'menu', 'dir', 'dl', 'dd', 'blockquote'); var HIndex: Integer; Properties: TProperties; J: ListTypes; //F: Double; begin Clear; DefPointSize := PointSize; Properties := TProperties.Create(UseQuirksMode); Properties.DefFontname := FontName; Properties.Props[FontFamily] := FontName; Properties.Props[FontSize] := PointSize; Properties.Props[FontStyle] := 'none'; Properties.Props[FontWeight] := 'normal'; Properties.Props[TextAlign] := 'left'; Properties.Props[TextDecoration] := 'none'; Properties.Props[TextTransform] := txNone; Properties.Props[WordWrap] := 'normal'; Properties.Props[piWhiteSpace] := 'normal'; Properties.Props[FontVariant] := 'normal'; Properties.Props[Color] := AColor; Properties.Props[MarginTop] := MarginHeight; Properties.Props[MarginBottom] := MarginHeight; Properties.Props[MarginLeft] := MarginWidth; Properties.Props[MarginRight] := MarginWidth; Properties.Props[Visibility] := viVisible; Properties.Props[LetterSpacing] := 0; Properties.Props[BoxSizing] := ContentBox; Properties.CodePage := ACodePage; Properties.CharSet := ACharSet; AddObject('default', Properties); FDefProp := Properties; if UseQuirksMode then begin Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontSize] := PointSize * 1.0; Properties.Props[FontStyle] := 'none'; Properties.Props[FontWeight] := 'normal'; Properties.Props[Color] := AColor; AddObject('td', Properties); Properties := AddDuplicate('table', Properties); Properties := AddDuplicate('th', Properties); Properties.Props[FontWeight] := 'bold'; end; Properties := TProperties.Create(UseQuirksMode); Properties.Props[Color] := AHotSpot or PalRelative; if LinkUnderline then Properties.Props[TextDecoration] := 'underline' else Properties.Props[TextDecoration] := 'none'; AddObject('::link', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[Color] := AVisitedColor or PalRelative; AddObject('::visited', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[Color] := AActiveColor or PalRelative; AddObject('::hover', Properties); Properties := TProperties.Create(UseQuirksMode); AddObject('null', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontFamily] := PreFontName; Properties.Props[FontSize] := PointSize * 10.0 / 12.0; Properties.Props[FontStyle] := 'none'; Properties.Props[FontWeight] := 'normal'; Properties.Props[TextDecoration] := 'none'; Properties.Props[piWhiteSpace] := 'pre'; AddObject('pre', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[MarginTop] := AutoParagraph; Properties.Props[MarginBottom] := AutoParagraph; AddObject('p', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[MarginTop] := 0; AddObject('p 11pre', Properties); for J := Low(ListTypes) to High(ListTypes) do begin Properties := TProperties.Create(UseQuirksMode); case J of ol, ul, menu, dir: begin Properties.Props[ListStyleType] := 'blank'; Properties.Props[MarginTop] := AutoParagraph; Properties.Props[MarginBottom] := AutoParagraph; Properties.Props[MarginLeft] := IntNull; Properties.Props[PaddingLeft] := ListIndent; end; dl: begin Properties.Props[ListStyleType] := 'none'; Properties.Props[MarginLeft] := 0; Properties.Props[MarginTop] := 0; Properties.Props[MarginBottom] := 0; Properties.Props[MarginLeft] := 0; end; blockquote: begin Properties.Props[MarginTop] := AutoParagraph; Properties.Props[MarginBottom] := ParagraphSpace; Properties.Props[MarginLeft] := ListIndent; end; dd: begin Properties.Props[MarginTop] := 0; Properties.Props[MarginBottom] := 0; Properties.Props[MarginLeft] := ListIndent; end; end; AddObject(ListStr[J], Properties); end; Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontFamily] := PrefontName; Properties.Props[FontSize] := '0.83em'; {10.0 / 12.0;} AddObject('code', Properties); AddDuplicate('tt', Properties); AddDuplicate('kbd', Properties); AddDuplicate('samp', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontWeight] := 'bold'; AddObject('b', Properties); AddDuplicate('strong', Properties); if UseQuirksMode = False then begin AddDuplicate('th', Properties); Properties := TProperties.Create; Properties.Props[TextAlign] := 'none'; AddObject('table', Properties); end; Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontSize] := '0.83em'; Properties.Props[VerticalAlign] := 'super'; AddObject('sup', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontSize] := '0.83em'; Properties.Props[VerticalAlign] := 'sub'; AddObject('sub', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontSize] := '1.17em'; AddObject('big', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontSize] := '0.83em'; AddObject('small', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontStyle] := 'italic'; AddObject('i', Properties); AddDuplicate('em', Properties); AddDuplicate('cite', Properties); AddDuplicate('var', Properties); AddDuplicate('dfn', Properties); AddDuplicate('address', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[TextDecoration] := 'underline'; AddObject('u', Properties); AddDuplicate('ins',Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[TextDecoration] := 'line-through'; AddObject('s', Properties); AddDuplicate('strike', Properties); AddDuplicate('del',Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[TextAlign] := 'center'; AddObject('center', Properties); AddDuplicate('caption', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[FontFamily] := 'Arial Unicode MS, Arial'; Properties.Props[FontSize] := '10pt'; Properties.Props[FontStyle] := 'none'; Properties.Props[FontWeight] := 'normal'; Properties.Props[TextAlign] := 'left'; Properties.Props[TextDecoration] := 'none'; Properties.Props[Color] := AColor; AddObject('input', Properties); AddDuplicate('select', Properties); Properties := AddDuplicate('textarea', Properties); if IsWin32Platform then Properties.Props[FontFamily] := 'Arial Unicode MS, Arial' else Properties.Props[FontFamily] := PreFontName; Properties := TProperties.Create(UseQuirksMode); Properties.Props[MarginLeft] := 0; Properties.Props[MarginRight] := 0; Properties.Props[MarginTop] := 10; Properties.Props[MarginBottom] := 10; AddObject('hr', Properties); for HIndex := 1 to 6 do begin Properties := TProperties.Create(UseQuirksMode); //F := PointSize / 12.0; case HIndex of 1: Properties.Props[FontSize] := '2em'; 2: Properties.Props[FontSize] := '1.5em'; 3: Properties.Props[FontSize] := '1.17em'; else Properties.Props[FontSize] := '1em'; end; case HIndex of 4: Properties.Props[MarginTop] := '1.67em'; 5: Properties.Props[MarginTop] := '1.5em'; 6: Properties.Props[MarginTop] := '1.12em'; else Properties.Props[MarginTop] := 19; end; Properties.Props[MarginBottom] := Properties.Props[MarginTop]; Properties.Props[FontWeight] := 'bolder'; AddObject('h' + IntToStr(HIndex), Properties); end; Properties := TProperties.Create; Properties.Props[FontStyle] := 'none'; Properties.Props[BackgroundColor] := $00FFFF; Properties.Props[Color] := $000000; AddObject('mark', Properties); Properties := TProperties.Create(UseQuirksMode); Properties.Props[ StyleUn.BorderBottomStyle ] := 'dotted'; Properties.Props[ StyleUn.BorderBottomWidth ] := '1px'; AddObject('abbr', Properties); AddDuplicate('acronym',Properties); end; { TPropStack } function TPropStack.GetProp(Index: Integer): TProperties; begin Result := Get(Index); //TProperties(inherited Items[Index]); end; function TPropStack.Last: TProperties; begin Result := Get(Count - 1); end; const NumColors = 178; Colors: array[1..NumColors] of ThtString = ( 'none', 'transparent', 'black', 'maroon', 'green', 'olive', 'navy', 'purple', 'teal', 'gray', 'silver', 'red', 'lime', 'yellow', 'blue', 'fuchsia', 'aqua', 'white', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgreen', 'lightgray', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'grey', 'darkgrey', 'darkslategrey', 'dimgrey', 'lightgrey', 'lightslategrey', 'slategrey', 'rebeccapurple', //CSS4 tribute to Eric Meyer's daughter, Rebecca, died of cancer on her sixth birthday 'background', 'activecaption', 'inactivecaption', 'menu', 'window', 'windowframe', 'menutext', 'windowtext', 'captiontext', 'activeborder', 'inactiveborder', 'appworkSpace', 'highlight', 'hightlighttext', 'buttonface', 'buttonshadow', 'graytext', 'buttontext', 'inactivecaptiontext', 'buttonhighlight', 'threeddarkshadow', 'threedlightshadow', 'infotext', 'infobackground', 'scrollbar', 'threedface', 'threedhighlight', 'threedshadow'); ColorValues: array[1..NumColors] of TColor = (clNone, clNone, clBLACK, clMAROON, clGREEN, clOLIVE, clNAVY, clPURPLE, clTEAL, clGRAY, clSILVER, clRED, clLIME, clYELLOW, clBLUE, clFUCHSIA, clAQUA, clWHITE, $FFF8F0, $D7EBFA, $D4FF7F, $FFFFF0, $DCF5F5, $C4E4FF, $CDEBFF, $E22B8A, $2A2AA5, $87B8DE, $A09E5F, $00FF7F, $1E69D2, $507FFF, $ED9564, $DCF8FF, $3614DC, $FFFF00, $8B0000, $8B8B00, $0B86B8, $A9A9A9, $006400, $6BB7BD, $8B008B, $2F6B55, $008CFF, $CC3299, $00008B, $7A96E9, $8FBC8F, $8B3D48, $4F4F2F, $D1CE00, $D30094, $9314FF, $FFBF00, $696969, $FF901E, $2222B2, $F0FAFF, $228B22, $DCDCDC, $FFF8F8, $00D7FF, $20A5DA, $2FFFAD, $F0FFF0, $B469FF, $5C5CCD, $82004B, $F0FFFF, $8CE6F0, $FAE6E6, $F5F0FF, $00FC7C, $CDFAFF, $E6D8AD, $8080F0, $FFFFE0, $D2FAFA, $90EE90, $D3D3D3, $C1B6FF, $7AA0FF, $AAB220, $FACE87, $998877, $DEC4B0, $E0FFFF, $32CD32, $E6F0FA, $FF00FF, $AACD66, $CD0000, $D355BA, $DB7093, $71B33C, $EE687B, $9AFA00, $CCD148, $8515C7, $701919, $FAFFF5, $E1E4FF, $B5E4FF, $ADDEFF, $E6F5FD, $238E6B, $00A5FF, $0045FF, $D670DA, $AAE8EE, $98FB98, $EEEEAF, $9370DB, $D5EFFF, $B9DAFF, $3F85CD, $CBC0FF, $DDA0DD, $E6E0B0, $8F8FBC, $E16941, $13458B, $7280FA, $60A4F4, $578B2E, $EEF5FF, $2D52A0, $EBCE87, $CD5A6A, $908070, $FAFAFF, $7FFF00, $B48246, $8CB4D2, $D8BFD8, $4763FF, $D0E040, $EE82EE, $B3DEF5, $F5F5F5, $32CD9A, clGray, $A9A9A9, $4F4F2F, $696969, $D3D3D3, $998877, $908070, $663399, clBackground, clActiveCaption, clInactiveCaption, clMenu, clWindow, clWindowFrame, clMenuText, clWindowText, clCaptionText, clActiveBorder, clInactiveBorder, clAppWorkSpace, clHighlight, clHighlightText, clBtnFace, clBtnShadow, clGrayText, clBtnText, clInactiveCaptionText, clBtnHighlight, cl3DDkShadow, clBtnHighlight, clInfoText, clInfoBk, clScrollBar, clBtnFace, cl3DLight, clBtnShadow); var ColorStrings: ThtStringList; function SortedColors: ThtStringList; var I: Integer; begin // Put the Colors into a sorted StringList for faster access. if ColorStrings = nil then begin ColorStrings := ThtStringList.Create; for I := 1 to NumColors do ColorStrings.AddObject(Colors[I], @ColorValues[I]); ColorStrings.Sort; end; Result := ColorStrings; end; function OpacityFromStr(S : ThtString) : Byte; {$ifdef UseInline} inline; {$endif} var LErr : Integer; LR : Real; begin Val(S,LR,LErr); if LErr <> 0 then begin Result := 255; end else begin Result := Trunc(255 * LR); end; end; function TryStrToColor(S: ThtString; NeedPound: Boolean; out Color: TColor): Boolean; {$ifdef UseInline} inline; {$endif} var LDummy : Byte; begin Result := ColorAndOpacityFromString(S,NeedPound,Color,LDummy); end; function ColorAndOpacityFromString(S: ThtString; NeedPound: Boolean; out Color: TColor; out VOpacity : Byte): Boolean; {Translate StyleSheet color ThtString to Color. If NeedPound is true, a '#' sign is required to preceed a hexidecimal value.} const LastS: ThtString = '?&%@'; LastColor: TColor = 0; var I, Rd, Bl: Integer; S1: ThtString; function FindHSLColor(S: ThtString): Boolean; type Colors = (hue, saturation, luminance); var I, J: Integer; var A: array[hue..luminance] of ThtString; C: array[hue..luminance] of Integer; K: Colors; begin I := Pos('(', S); J := Pos(')', S); if (I > 0) and (J > 0) then begin S := copy(S, 1, J - 1); S := Trim(Copy(S, I + 1, 255)); for K := hue to saturation do begin I := Pos(',', S); A[K] := Trim(copy(S, 1, I - 1)); S := Trim(Copy(S, I + 1, 255)); end; I := Pos(',', S); if I > 0 then begin A[luminance] := Trim(copy(S, 1, I - 1)); S := Trim(Copy(S, I + 1, 255)); VOpacity := OpacityFromStr(S); end else begin A[luminance] := S; VOpacity := 255; end; C[hue] := StrToIntDef(A[hue],0); while C[hue] >= 360 do begin C[hue] := C[hue] - 360; end; while C[hue] < 0 do begin C[hue] := C[hue] + 360; end; for K := saturation to luminance do begin I := Pos('%', A[K]); if I > 0 then begin Delete(A[K], I, 1); end; C[K] := StrToIntDef(A[K],0); if C[K] > 100 then begin C[K] := 100; end; if C[K] < 0 then begin C[K] := 0; end; end; Color := HSLUtils.HSLtoRGB(C[hue],C[saturation],C[luminance]); Result := True; end else Result := False; end; function FindRGBColor(S: ThtString): Boolean; type Colors = (red, green, blue); var A: array[red..blue] of ThtString; C: array[red..blue] of Integer; I, J: Integer; K: Colors; begin I := Pos('(', S); J := Pos(')', S); if (I > 0) and (J > 0) then begin S := copy(S, 1, J - 1); S := Trim(Copy(S, I + 1, 255)); for K := Red to Green do begin I := Pos(',', S); A[K] := Trim(copy(S, 1, I - 1)); S := Trim(Copy(S, I + 1, 255)); end; I := Pos(',', S); if I > 0 then begin A[blue] := Trim(copy(S, 1, I - 1)); S := Trim(Copy(S, I + 1, 255)); VOpacity := OpacityFromStr(S); end else begin A[blue] := S; VOpacity := 255; end; for K := Red to Blue do begin I := Pos('%', A[K]); if I > 0 then begin Delete(A[K], I, 1); try C[K] := Round(StrToFloat(A[K]) * 2.55); except C[K] := 0; end; end else C[K] := StrToIntDef(A[K], 0); C[K] := Max(0, Min(255, C[K])); end; Color := (C[Blue] shl 16) or (C[Green] shl 8) or C[Red]; Result := True; end else Result := False; end; //BG, 26.08.2009: exceptions are very slow var Int: Integer; Idx : Integer; //BG, 26.08.2009 begin //Opacity is not supported with # hexidecimal notation or color names VOpacity := 255; if S = '' then begin Result := False; Exit; end; S := Lowercase(Trim(S)); if S = LastS then begin {inquiries often come in pairs, this saves some recomputing} Color := LastColor; Result := True; Exit; end; I := Pos('hsl',S); if I > 0 then begin Result := FindHSLColor(Copy(S, I + 3, 255)); if Result then begin LastS := S1; LastColor := Color; end; exit; end; I := Pos('rgb', S); if (I = 0) and (S[1] <> '#') then begin if SortedColors.Find(S, Idx) then begin Color := PColor(SortedColors.Objects[Idx])^; Result := True; LastS := S; LastColor := Color; Exit; end; end; S1 := S; if (I > 0) then Result := FindRGBColor(Copy(S, I + 3, 255)) else begin // try I := Pos('#', S); if I > 0 then while I > 0 do {sometimes multiple ##} begin Delete(S, 1, I); I := Pos('#', S); end else if NeedPound then begin Result := False; Exit; end; S := Trim(S); if Length(S) <= 3 then for I := Length(S) downto 1 do Insert(S[I], S, I); {Double each character} Result := TryStrToInt('$' + S, Int); if Result then begin {ok, but bytes are backwards!} Rd := Int and $FF; Bl := Int and $FF0000; Color := (Int and $00FF00) + (Rd shl 16) + (Bl shr 16) or PalRelative; end; // except // Result := False; // end; end; if Result then begin LastS := S1; LastColor := Color; end; end; //BG, 14.07.2010: function decodeSize(const Str: ThtString; out V: extended; out U: ThtString): Boolean; {$ifdef UseInline} inline; {$endif} var I, J, L: Integer; begin U := ''; Val(Str, V, I); Result := I <> 1; if Result then begin L := Length(Str); if I = 0 then I := L + 1; J := Pos('e', Str); {'e' would be legal for Val but not for us} if (J > 0) and (I > J) then I := J; if I <= L then begin Val(Copy(Str, 1, I - 1), V, J); U := Trim(Copy(Str, I, L - I + 1)); // text after number, maybe a unit end; end; end; const f_cm = 1.0 / 2.54; f_px = 1.0 / 6.00; f_mm = 1.0 / 25.4; f_pt = 1.0 / 72.0; f_pc = 1.0 / 100.0; function IncFontSize(OldSize: Double; Increment: ThtFontSizeIncrement): Double; {$ifdef UseInline} inline; {$endif} var OldIndex, NewIndex: Byte; D1, D2: Double; begin // get nearest old font size index OldIndex := 4; D1 := OldSize - FontConv[OldIndex]; repeat case Sign(D1) of -1: begin Dec(OldIndex); D2 := OldSize - FontConv[OldIndex]; if D2 >= 0 then begin if Abs(D1) < Abs(D2) then Inc(OldIndex); break; end; D1 := D2; end; 1: begin Inc(OldIndex); D2 := OldSize - FontConv[OldIndex]; if D2 <= 0 then begin if Abs(D1) > Abs(D2) then Dec(OldIndex); break; end; D1 := D2; end; else break; end; until (OldIndex = 1) or (OldIndex = 7); NewIndex := OldIndex + Increment; if NewIndex < 1 then begin Inc(OldIndex, 1 - NewIndex); NewIndex := 1; end else if NewIndex > 7 then begin Dec(OldIndex, NewIndex - 7); NewIndex := 7; end; if OldIndex = NewIndex then Result := OldSize else Result := OldSize * FontConv[NewIndex] / FontConv[OldIndex]; end; function FontSizeConv(const Str: ThtString; OldSize, DefPointSize : Double; const AUseQuirksMode : Boolean): Double; {$ifdef UseInline} inline; {$endif} {given a font-size ThtString, return the point size} var V: extended; U: ThtString; i : Integer; begin if decodeSize(Str, V, U) then begin if U = 'in' then Result := V * 72.0 else if U = 'cm' then Result := V * 72.0 * f_cm else if U = 'mm' then Result := V * 72.0 * f_mm else if U = 'pt' then Result := V else if U = 'px' then Result := V * 72.0 / Screen.PixelsPerInch else if U = 'pc' then Result := V * 12.0 else if U = 'em' then Result := V * OldSize else if U = 'ex' then Result := V * OldSize * 0.5 {1/2 of em} else if U = '%' then Result := V * OldSize * f_pc else if U = '' then Result := V * 72.0 / Screen.PixelsPerInch {pixels by default} else Result := DefPointSize; {error, return 12pt} end else begin U := Str; if AUseQuirksMode then begin i := 1; end else begin i := 0; end; if U = 'smaller' then Result := IncFontSize(OldSize, -1) // CSS1: 0.75 * OldSize else if U = 'larger' then Result := IncFontSize(OldSize, 1) // CSS1: 1.25 * OldSize else if U = 'xx-small' then Result := FontConv[1 + i] else if U = 'x-small' then Result := FontConv[1 + i] // same size xx-small (IE and Firefox do it). else if U = 'small' then Result := FontConv[2 + i] else if U = 'medium' then // 'medium' is the user's preferred font size. Result := FontConv[3 + i] else if U = 'large' then Result := FontConv[4 + i] else if U = 'x-large' then Result := FontConv[5 + i] else if U = 'xx-large' then Result := FontConv[6] else Result := DefPointSize; end; end; {----------------LengthConv} function LengthConv(const Str: ThtString; Relative: Boolean; Base, EmSize, ExSize, Default: Integer): Integer; {$ifdef UseInline} inline; {$endif} {given a length ThtString, return the appropriate pixel value. Base is the base value for percentage. EmSize, ExSize for units relative to the font. Relative makes a numerical entry relative to Base. Default returned if no match.} var V: extended; U: ThtString; begin if decodeSize(Str, V, U) then begin {U the units} if U = '' then begin if Relative then V := V * Base; {relative} //else // V := V {same as pixels, at least for margins} end else if U = '%' then V := V * Base * f_pc else if U = 'in' then V := V * Screen.PixelsPerInch else if U = 'cm' then V := V * Screen.PixelsPerInch * f_cm else if U = 'mm' then V := V * Screen.PixelsPerInch * f_mm else if U = 'pt' then V := V * Screen.PixelsPerInch * f_pt else if U = 'px' then else if U = 'pc' then V := V * Screen.PixelsPerInch * f_px else if U = 'em' then V := V * EmSize else if U = 'ex' then V := V * ExSize else V := Default; Result := Trunc(V); // BG, 14.12.2011: issue 104: avoid too wide "50%". Replace Round() with Trunc(). end else // anything else but a number, maybe 'auto' Result := Default; end; initialization finalization FreeAndNil(ColorStrings); FreeAndNil(PropertyStrings); end.
30.818362
159
0.619816
832f0ff257743f71f63658b953c7d206ae19c326
12,558
pas
Pascal
Components/jcl/experts/debug/tools/TlbToMapMain.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/jcl/experts/debug/tools/TlbToMapMain.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
null
null
null
Components/jcl/experts/debug/tools/TlbToMapMain.pas
sabatex/Delphi
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
[ "MIT" ]
1
2019-12-24T08:39:18.000Z
2019-12-24T08:39:18.000Z
{**************************************************************************************************} { } { Project JEDI Code Library (JCL) } { } { 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/ } { } { 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. } { } { The Original Code is TlbToMapMain.pas. } { } { The Initial Developer of the Original Code is Petr Vones. } { Portions created by Petr Vones are Copyright (C) of Petr Vones. } { } {**************************************************************************************************} { } { Unit owner: Petr Vones } { Last modified: $Date: 2005/10/26 03:29:44 $ } { } {**************************************************************************************************} unit TlbToMapMain; interface {$I jcl.inc} uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ImgList, ActnList, Menus, ToolWin, StdCtrls, ExtCtrls; type TMainForm = class(TForm) ToolBar1: TToolBar; MainMenu1: TMainMenu; ActionList1: TActionList; ImageList1: TImageList; StatusBar1: TStatusBar; Exit1: TAction; Open1: TAction; CreateMAP1: TAction; File1: TMenuItem; Open2: TMenuItem; N1: TMenuItem; Exit2: TMenuItem; OpenDialog1: TOpenDialog; MethodsListView: TListView; ToolButton1: TToolButton; ToolButton2: TToolButton; ToolButton3: TToolButton; Run1: TMenuItem; Convert2: TMenuItem; CreateJDBG1: TAction; ToolButton4: TToolButton; CreateJDBGfile1: TMenuItem; VersionMemo: TMemo; Splitter1: TSplitter; procedure Exit1Execute(Sender: TObject); procedure Open1Execute(Sender: TObject); procedure CreateMAP1Execute(Sender: TObject); procedure CreateMAP1Update(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure MethodsListViewData(Sender: TObject; Item: TListItem); private FFileName: TFileName; FMembersList: TStringList; procedure SetFileName(const Value: TFileName); public procedure OpenTypeLibrary(const FileName: TFileName); end; var MainForm: TMainForm; implementation {$R *.DFM} uses ComObj, ActiveX, JclBase, JclDebug, JclFileUtils, JclPeImage, JclSysInfo, JclSysUtils; resourcestring RsReading = 'Reading type library ...'; RsNoTypeLib = 'The file does not contain valid Type Library.'; RsNoCoClass = 'Type library does not contain any CoClasses.'; // Reference: // Improve Your Debugging by Generating Symbols from COM Type Libraries // Matt Pietrek - Microsoft Systems Journal, March 1999 // http://msdn.microsoft.com/library/periodic/period99/comtype.htm type TJclTypeLibScanner = class (TObject) private FMembersList: TStrings; FModuleFileName: TFileName; FTypeLib: ITypeLib; FValidFormat: Boolean; protected procedure Scan; public constructor Create(const FileName: TFileName); destructor Destroy; override; property MembersList: TStrings read FMembersList; property ModuleFileName: TFileName read FModuleFileName; property ValidFormat: Boolean read FValidFormat; end; { TJclTypeLibScanner } constructor TJclTypeLibScanner.Create(const FileName: TFileName); begin FMembersList := TStringList.Create; FValidFormat := Succeeded(LoadTypeLib(PWideChar(WideString(FileName)), FTypeLib)); if FValidFormat then Scan; end; destructor TJclTypeLibScanner.Destroy; begin FreeAndNil(FMembersList); inherited; end; procedure TJclTypeLibScanner.Scan; var TypeInfondex, FuncIndex: Integer; TypeInfo: ITypeInfo; TypeAttr: PTypeAttr; RefType: HRefType; function GetTypeInfoName(TI: ITypeInfo; MemID: TMemberID): string; var Name: WideString; begin if Succeeded(TI.GetDocumentation(MemID, @Name, nil, nil, nil)) then Result := Name else Result := ''; end; procedure EnumTypeInfoMembers(MemTypeInfo: ITypeInfo; MemTypeAttr: PTypeAttr; MemUnknown: IUnknown); var VTable: DWORD; InterfaceName, MemberName, Name: string; I: Integer; FuncDesc: PFuncDesc; Addr: DWORD; begin VTable := PDWORD(MemUnknown)^; if MemTypeAttr.cFuncs = 0 then Exit; InterfaceName := GetTypeInfoName(MemTypeInfo, -1); for I := 0 to MemTypeAttr.cFuncs - 1 do begin MemTypeInfo.GetFuncDesc(I, FuncDesc); MemberName := GetTypeInfoName(MemTypeInfo, FuncDesc.memid); Addr := PDWORD(Integer(VTable) + FuncDesc.oVft)^; if FModuleFileName = '' then FModuleFileName := GetModulePath(ModuleFromAddr(Pointer(Addr))); Dec(Addr, ModuleFromAddr(Pointer(Addr))); Name := InterfaceName + '.' + MemberName; case FuncDesc.invkind of INVOKE_PROPERTYGET: Name := Name + '_Get'; INVOKE_PROPERTYPUT: Name := Name + '_Put'; INVOKE_PROPERTYPUTREF: Name := Name + '_PutRef'; end; MemTypeInfo.ReleaseFuncDesc(FuncDesc); FMembersList.AddObject(Name, Pointer(Addr)); end; end; procedure ProcessReferencedTypeInfo; var RefTypeInfo: ITypeInfo; RefTypeAttr: PTypeAttr; Unknown: IUnknown; R: HRESULT; begin if Succeeded(TypeInfo.GetRefTypeInfo(RefType, RefTypeInfo)) and Succeeded(RefTypeInfo.GetTypeAttr(RefTypeAttr)) then begin R := CoCreateInstance(TypeAttr.guid, nil, CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER, RefTypeAttr.guid, Unknown); if Succeeded(R) and (Unknown <> nil) then EnumTypeInfoMembers(RefTypeInfo, RefTypeAttr, Unknown); RefTypeInfo.ReleaseTypeAttr(RefTypeAttr); end; end; begin for TypeInfondex := 0 to FTypeLib.GetTypeInfoCount - 1 do begin FTypeLib.GetTypeInfo(TypeInfondex, TypeInfo); if Succeeded(TypeInfo.GetTypeAttr(TypeAttr)) then begin if TypeAttr.typeKind = TKIND_COCLASS then for FuncIndex := 0 to TypeAttr.cImplTypes - 1 do if Succeeded(TypeInfo.GetRefTypeOfImplType(FuncIndex, RefType)) then ProcessReferencedTypeInfo; TypeInfo.ReleaseTypeAttr(TypeAttr); end; end; FTypeLib := nil; end; { TMainForm } procedure TMainForm.FormCreate(Sender: TObject); begin FMembersList := TStringList.Create; end; procedure TMainForm.FormDestroy(Sender: TObject); begin FreeAndNil(FMembersList); end; procedure TMainForm.Exit1Execute(Sender: TObject); begin Close; end; procedure TMainForm.Open1Execute(Sender: TObject); begin with OpenDialog1 do begin FileName := ''; if Execute then OpenTypeLibrary(FileName); end; end; function SortPublicsByValue(List: TStringList; Index1, Index2: Integer): Integer; begin Result := DWORD(List.Objects[Index1]) - DWORD(List.Objects[Index2]); end; procedure TMainForm.CreateMAP1Execute(Sender: TObject); var MapList: TStringList; PeImage: TJclPeImage; LoAddress, HiAddress: DWORD; CodeSection: TImageSectionHeader; MapFileName: TFileName; procedure WriteList; var I: Integer; begin for I := 0 to FMembersList.Count - 1 do MapList.Add(Format(' 0001:%.8x %s', [DWORD(FMembersList.Objects[I]) - CodeSection.VirtualAddress, FMembersList[I]])); end; begin Screen.Cursor := crHourGlass; MapList := TStringList.Create; PeImage := TJclPeImage.Create; try PeImage.FileName := FFileName; CodeSection := PeImage.ImageSectionHeaders[0]; FMembersList.CustomSort(SortPublicsByValue); LoAddress := DWORD(FMembersList.Objects[0]); HiAddress := DWORD(FMembersList.Objects[FMembersList.Count - 1]); FMembersList.Sort; Assert(LoAddress >= CodeSection.VirtualAddress); MapList.Add(''); MapList.Add(' Start Length Name Class'); MapList.Add(Format(' %.4x:%.8x %.8xH %s CODE', [1, CodeSection.VirtualAddress, CodeSection.Misc.VirtualSize, PeImage.ImageSectionNames[0]])); MapList.Add(''); MapList.Add(''); MapList.Add('Detailed map of segments'); MapList.Add(''); MapList.Add(Format(' 0001:00000000 %.8xH C=CODE S=.text G=(none) M=%s', [HiAddress, PathExtractFileNameNoExt(FFileName)])); MapList.Add(''); MapList.Add(''); MapList.Add('Address Publics by Name'); MapList.Add(''); WriteList; MapList.Add(''); MapList.Add(''); FMembersList.CustomSort(SortPublicsByValue); MapList.Add('Address Publics by Value'); MapList.Add(''); WriteList; FMembersList.Sort; MapFileName := ChangeFileExt(FFileName, '.map'); MapList.SaveToFile(MapFileName); if TAction(Sender).Tag = 1 then begin ConvertMapFileToJdbgFile(MapFileName); DeleteFile(MapFileName); end; finally PeImage.Free; MapList.Free; Screen.Cursor := crDefault; end; end; procedure TMainForm.CreateMAP1Update(Sender: TObject); begin TAction(Sender).Enabled := MethodsListView.Items.Count > 0; end; procedure TMainForm.MethodsListViewData(Sender: TObject; Item: TListItem); begin with Item do begin Caption := FMembersList[Index]; SubItems.Add(Format('%p', [Pointer(FMembersList.Objects[Index])])); ImageIndex := 3; end; end; procedure TMainForm.OpenTypeLibrary(const FileName: TFileName); var TypeLibScanner: TJclTypeLibScanner; ErrorMsg: string; begin Screen.Cursor := crHourGlass; try FMembersList.Clear; MethodsListView.Items.Count := 0; MethodsListView.Repaint; StatusBar1.Panels[0].Text := RsReading; StatusBar1.Repaint; TypeLibScanner := TJclTypeLibScanner.Create(FileName); try if TypeLibScanner.ValidFormat and (TypeLibScanner.MembersList.Count > 0) then begin FMembersList.Assign(TypeLibScanner.MembersList); FMembersList.Sort; MethodsListView.Items.Count := FMembersList.Count; MethodsListView.Invalidate; SetFileName(TypeLibScanner.ModuleFileName); end else begin Screen.Cursor := crDefault; SetFileName(''); if TypeLibScanner.ValidFormat then ErrorMsg := RsNoCoClass else ErrorMsg := RsNoTypeLib; with Application do MessageBox(PChar(ErrorMsg), PChar(Title), MB_ICONERROR or MB_OK); end; finally TypeLibScanner.Free; end; finally Screen.Cursor := crDefault; end; end; procedure TMainForm.SetFileName(const Value: TFileName); begin FFileName := Value; StatusBar1.Panels[0].Text := Value; StatusBar1.Repaint; VersionMemo.Lines.Clear; if VersionResourceAvailable(Value) then with TJclFileVersionInfo.Create(Value) do try VersionMemo.Lines.Assign(Items); finally Free; end; DisableAlign; VersionMemo.Visible := VersionMemo.Lines.Count > 0; Splitter1.Visible := VersionMemo.Visible; EnableAlign; VersionMemo.Repaint; end; // History: // $Log: TlbToMapMain.pas,v $ // Revision 1.2 2005/10/26 03:29:44 rrossmair // - improved header information, added Date and Log CVS tags. // end.
31.632242
100
0.613155
85e4669965b33d023f0dd9e12c8f1d8ab8bf002f
3,348
dfm
Pascal
delphi-projects/Baharestan db convertor/mainU.dfm
zoghal/my-old-projects
0d505840a3b840af889395df669f91751f8a2d36
[ "MIT" ]
3
2017-09-18T15:20:15.000Z
2020-02-11T17:40:41.000Z
delphi-projects/Baharestan db convertor/mainU.dfm
zoghal/my-old-projects
0d505840a3b840af889395df669f91751f8a2d36
[ "MIT" ]
null
null
null
delphi-projects/Baharestan db convertor/mainU.dfm
zoghal/my-old-projects
0d505840a3b840af889395df669f91751f8a2d36
[ "MIT" ]
null
null
null
object Form1: TForm1 Left = 227 Top = 118 Width = 870 Height = 500 Caption = 'Form1' Color = clBtnFace Font.Charset = ARABIC_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnClose = FormClose OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel Left = 462 Top = 180 Width = 49 Height = 13 Caption = 'Record'#39's' Font.Charset = ARABIC_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False end object DBGrid1: TDBGrid Left = 24 Top = 8 Width = 809 Height = 121 BiDiMode = bdRightToLeft Font.Charset = ARABIC_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentBiDiMode = False ParentFont = False ReadOnly = True TabOrder = 0 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [] end object Button1: TButton Left = 376 Top = 136 Width = 75 Height = 25 Caption = #1575#1606#1578#1602#1575#1604 TabOrder = 1 OnClick = Button1Click end object Memo1: TMemo Left = 32 Top = 264 Width = 745 Height = 169 TabOrder = 2 end object ProgressBar1: TProgressBar Left = 48 Top = 208 Width = 729 Height = 33 TabOrder = 3 end object Edit1: TEdit Left = 336 Top = 176 Width = 121 Height = 21 TabOrder = 4 end object DataSource1: TDataSource DataSet = Table1 Left = 8 Top = 8 end object Table1: TTable AutoRefresh = True TableName = 'MPI.DBF' TableType = ttFoxPro Left = 8 Top = 64 object Table1PID: TFloatField DisplayWidth = 12 FieldName = 'PID' end object Table1LASTNAME: TStringField DisplayWidth = 18 FieldName = 'LASTNAME' Size = 15 end object Table1NAME: TStringField DisplayWidth = 12 FieldName = 'NAME' Size = 10 end object Table1FATHER: TStringField DisplayWidth = 12 FieldName = 'FATHER' Size = 10 end object Table1SEX: TBooleanField DisplayWidth = 6 FieldName = 'SEX' end object Table1SHENAS_NO: TFloatField DisplayWidth = 18 FieldName = 'SHENAS_NO' end object Table1ISSUED_AT: TStringField DisplayWidth = 23 FieldName = 'ISSUED_AT' Size = 10 end object Table1DOB: TStringField DisplayWidth = 10 FieldName = 'DOB' Size = 8 end object Table1BIRTH_PLAC: TStringField DisplayWidth = 13 FieldName = 'BIRTH_PLAC' Size = 10 end object Table1RELIGION: TStringField DisplayWidth = 10 FieldName = 'RELIGION' Size = 5 end end object ADOConnection1: TADOConnection Connected = True ConnectionString = 'Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initi' + 'al Catalog=his1;Data Source=ZOGHAL' LoginPrompt = False Provider = 'SQLOLEDB.1' Left = 24 Top = 328 end object ADOCommand1: TADOCommand Connection = ADOConnection1 Parameters = <> Left = 56 Top = 328 end end
21.189873
74
0.620968
f11de58b30c8b4f5bc293bb2d534d27063af9a34
4,084
dfm
Pascal
CPRSChart/OR_30_377V9_SRC/CPRS-chart/fDeferDialog.dfm
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
1
2015-11-03T14:56:42.000Z
2015-11-03T14:56:42.000Z
CPRSChart/OR_30_377V9_SRC/CPRS-chart/fDeferDialog.dfm
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
null
null
null
CPRSChart/OR_30_377V9_SRC/CPRS-chart/fDeferDialog.dfm
VHAINNOVATIONS/Transplant
a6c000a0df4f46a17330cec95ff25119fca1f472
[ "Apache-2.0" ]
null
null
null
object frmDeferDialog: TfrmDeferDialog Left = 0 Top = 0 BorderStyle = bsDialog Caption = 'Defer Item' ClientHeight = 265 ClientWidth = 516 Color = clWindow Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poOwnerFormCenter OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object pnlBottom: TPanel Left = 0 Top = 223 Width = 516 Height = 42 Align = alBottom BevelOuter = bvNone ParentBackground = False TabOrder = 0 ExplicitWidth = 419 DesignSize = ( 516 42) object cmdCancel: TButton Left = 427 Top = 9 Width = 75 Height = 25 Anchors = [akRight, akBottom] Caption = 'Cancel' ModalResult = 2 TabOrder = 0 ExplicitLeft = 330 end object cmdDefer: TButton Left = 346 Top = 9 Width = 75 Height = 25 Action = acDefer Anchors = [akRight, akBottom] TabOrder = 1 ExplicitLeft = 249 end end object gbxDeferBy: TGroupBox AlignWithMargins = True Left = 329 Top = 3 Width = 184 Height = 217 Align = alRight Caption = ' Defer Until ' TabOrder = 1 ExplicitLeft = 232 DesignSize = ( 184 217) object Bevel2: TBevel Left = 10 Top = 150 Width = 163 Height = 4 Anchors = [akLeft, akBottom] Shape = bsTopLine ExplicitTop = 136 end object lblDate: TLabel Left = 10 Top = 161 Width = 27 Height = 13 Anchors = [akLeft, akBottom] Caption = 'Date:' ExplicitTop = 147 end object lblTime: TLabel Left = 10 Top = 188 Width = 26 Height = 13 Anchors = [akLeft, akBottom] Caption = 'Time:' ExplicitTop = 181 end object lblCustom: TLabel Left = 10 Top = 130 Width = 36 Height = 13 Anchors = [akLeft, akBottom] Caption = 'Custom' Transparent = False ExplicitTop = 116 end object dtpDate: TDateTimePicker Left = 67 Top = 158 Width = 106 Height = 21 Anchors = [akLeft, akBottom] Date = 41835.573142557870000000 Time = 41835.573142557870000000 TabOrder = 0 end object dtpTime: TDateTimePicker Left = 67 Top = 185 Width = 106 Height = 21 Anchors = [akLeft, akBottom] Date = 41835.573435787040000000 Format = 'h:mm tt' Time = 41835.573435787040000000 Kind = dtkTime TabOrder = 1 end object cbxDeferBy: TComboBox Left = 10 Top = 25 Width = 163 Height = 21 Style = csDropDownList TabOrder = 2 OnChange = acNewDeferalClickedExecute end object stxtDeferUntilDate: TStaticText AlignWithMargins = True Left = 10 Top = 60 Width = 94 Height = 17 Caption = 'stxtDeferUntilDate' TabOrder = 3 end object stxtDeferUntilTime: TStaticText AlignWithMargins = True Left = 10 Top = 90 Width = 93 Height = 17 Caption = 'stxtDeferUntilTime' TabOrder = 4 end end object pnlLeft: TPanel Left = 0 Top = 0 Width = 326 Height = 223 Align = alClient BevelOuter = bvNone Caption = 'pnlLeft' ShowCaption = False TabOrder = 2 ExplicitWidth = 229 object stxtDescription: TStaticText AlignWithMargins = True Left = 10 Top = 10 Width = 76 Height = 17 Margins.Left = 10 Margins.Top = 10 Margins.Right = 10 Margins.Bottom = 10 Align = alClient Caption = 'stxtDescription' TabOrder = 0 end end object acList: TActionList Left = 40 Top = 56 object acNewDeferalClicked: TAction Caption = 'acNewDeferalClicked' OnExecute = acNewDeferalClickedExecute end object acDefer: TAction Caption = 'Defer' OnExecute = acDeferExecute end end end
21.160622
44
0.582027
f15f7d7ebc5b9f03d455d7d5b47b0fc855b92eab
5,392
pas
Pascal
source/uWVCoreWebView2ClientCertificate.pas
e-files/WebView4Delphi
01dade7a01a1d8b5c1b0ad131e237f18f8e650b5
[ "MIT" ]
99
2021-12-03T22:21:56.000Z
2022-03-26T20:19:23.000Z
source/uWVCoreWebView2ClientCertificate.pas
e-files/WebView4Delphi
01dade7a01a1d8b5c1b0ad131e237f18f8e650b5
[ "MIT" ]
20
2021-12-04T10:12:45.000Z
2022-03-01T09:37:51.000Z
source/uWVCoreWebView2ClientCertificate.pas
e-files/WebView4Delphi
01dade7a01a1d8b5c1b0ad131e237f18f8e650b5
[ "MIT" ]
17
2021-12-04T09:32:31.000Z
2022-03-24T15:15:44.000Z
unit uWVCoreWebView2ClientCertificate; {$IFDEF FPC}{$MODE Delphi}{$ENDIF} {$I webview2.inc} interface uses uWVTypeLibrary, uWVTypes; type TCoreWebView2ClientCertificate = class protected FBaseIntf : ICoreWebView2ClientCertificate; function GetInitialized : boolean; function GetSubject : wvstring; function GetIssuer : wvstring; function GetValidFrom : TDateTime; function GetValidTo : TDateTime; function GetDerEncodedSerialNumber : wvstring; function GetDisplayName : wvstring; function GetPemEncodedIssuerCertificateChain : ICoreWebView2StringCollection; function GetKind : TWVClientCertificateKind; public constructor Create(const aBaseIntf : ICoreWebView2ClientCertificate); reintroduce; destructor Destroy; override; function ToPemEncoding : wvstring; property Initialized : boolean read GetInitialized; property BaseIntf : ICoreWebView2ClientCertificate read FBaseIntf write FBaseIntf; property Subject : wvstring read GetSubject; property Issuer : wvstring read GetIssuer; property ValidFrom : TDateTime read GetValidFrom; property ValidTo : TDateTime read GetValidTo; property DerEncodedSerialNumber : wvstring read GetDerEncodedSerialNumber; property DisplayName : wvstring read GetDisplayName; property PemEncodedIssuerCertificateChain : ICoreWebView2StringCollection read GetPemEncodedIssuerCertificateChain; property Kind : TWVClientCertificateKind read GetKind; end; implementation uses {$IFDEF FPC} DateUtils, ActiveX; {$ELSE} System.DateUtils, Winapi.ActiveX; {$ENDIF} constructor TCoreWebView2ClientCertificate.Create(const aBaseIntf: ICoreWebView2ClientCertificate); begin inherited Create; FBaseIntf := aBaseIntf; end; destructor TCoreWebView2ClientCertificate.Destroy; begin FBaseIntf := nil; inherited Destroy; end; function TCoreWebView2ClientCertificate.GetInitialized : boolean; begin Result := assigned(FBaseIntf); end; function TCoreWebView2ClientCertificate.GetSubject : wvstring; var TempResult : PWideChar; begin Result := ''; TempResult := nil; if Initialized and succeeded(FBaseIntf.Get_Subject(TempResult)) and (TempResult <> nil) then begin Result := TempResult; CoTaskMemFree(TempResult); end; end; function TCoreWebView2ClientCertificate.GetIssuer : wvstring; var TempResult : PWideChar; begin Result := ''; TempResult := nil; if Initialized and succeeded(FBaseIntf.Get_Issuer(TempResult)) and (TempResult <> nil) then begin Result := TempResult; CoTaskMemFree(TempResult); end; end; function TCoreWebView2ClientCertificate.GetValidFrom : TDateTime; var TempResult : double; begin if Initialized and succeeded(FBaseIntf.Get_ValidFrom(TempResult)) then Result := UnixToDateTime(round(TempResult){$IFDEF DELPHI20_UP}, False{$ENDIF}) else Result := 0; end; function TCoreWebView2ClientCertificate.GetValidTo : TDateTime; var TempResult : double; begin if Initialized and succeeded(FBaseIntf.Get_ValidFrom(TempResult)) then Result := UnixToDateTime(round(TempResult){$IFDEF DELPHI20_UP}, False{$ENDIF}) else Result := 0; end; function TCoreWebView2ClientCertificate.GetDerEncodedSerialNumber : wvstring; var TempResult : PWideChar; begin Result := ''; TempResult := nil; if Initialized and succeeded(FBaseIntf.Get_DerEncodedSerialNumber(TempResult)) and (TempResult <> nil) then begin Result := TempResult; CoTaskMemFree(TempResult); end; end; function TCoreWebView2ClientCertificate.GetDisplayName : wvstring; var TempResult : PWideChar; begin Result := ''; TempResult := nil; if Initialized and succeeded(FBaseIntf.Get_DisplayName(TempResult)) and (TempResult <> nil) then begin Result := TempResult; CoTaskMemFree(TempResult); end; end; function TCoreWebView2ClientCertificate.GetPemEncodedIssuerCertificateChain : ICoreWebView2StringCollection; var TempResult : ICoreWebView2StringCollection; begin Result := nil; TempResult := nil; if Initialized and succeeded(FBaseIntf.Get_PemEncodedIssuerCertificateChain(TempResult)) and (TempResult <> nil) then Result := TempResult; end; function TCoreWebView2ClientCertificate.GetKind : TWVClientCertificateKind; var TempResult : COREWEBVIEW2_CLIENT_CERTIFICATE_KIND; begin if Initialized and succeeded(FBaseIntf.Get_Kind(TempResult)) then Result := TempResult else Result := 0; end; function TCoreWebView2ClientCertificate.ToPemEncoding : wvstring; var TempResult : PWideChar; begin Result := ''; TempResult := nil; if Initialized and succeeded(FBaseIntf.ToPemEncoding(TempResult)) and (TempResult <> nil) then begin Result := TempResult; CoTaskMemFree(TempResult); end; end; end.
26.96
143
0.682493
f17d3c9e6d80df89f00148ad925fbd95870189fa
314
dpr
Pascal
math/lsoda/Sidewinder.Test.LSODA.dpr
sys-bio/sidewinder
5b1083cc329086c51b849bbeb06322cffc281b9a
[ "Apache-2.0" ]
null
null
null
math/lsoda/Sidewinder.Test.LSODA.dpr
sys-bio/sidewinder
5b1083cc329086c51b849bbeb06322cffc281b9a
[ "Apache-2.0" ]
2
2022-03-25T23:15:54.000Z
2022-03-25T23:27:20.000Z
math/lsoda/Sidewinder.Test.LSODA.dpr
sys-bio/sidewinder
5b1083cc329086c51b849bbeb06322cffc281b9a
[ "Apache-2.0" ]
null
null
null
program Sidewinder.Test.LSODA; uses Vcl.Forms, WEBLib.Forms, ufTestLSODA in 'ufTestLSODA.pas' {Form1: TWebForm} {*.html}, LSODA.test in 'LSODA.test.pas'; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end.
18.470588
62
0.72293
f13750619a127688232f33044997b6b7365cdaa9
239,097
pas
Pascal
zeosdbo-7.2.4-stable/src/plain/ZPlainOracleDriver.pas
iauata/testedelphi
47c5e7a5759c9b55b3239eff54712d23d74ea757
[ "Apache-2.0" ]
null
null
null
zeosdbo-7.2.4-stable/src/plain/ZPlainOracleDriver.pas
iauata/testedelphi
47c5e7a5759c9b55b3239eff54712d23d74ea757
[ "Apache-2.0" ]
null
null
null
zeosdbo-7.2.4-stable/src/plain/ZPlainOracleDriver.pas
iauata/testedelphi
47c5e7a5759c9b55b3239eff54712d23d74ea757
[ "Apache-2.0" ]
null
null
null
{*********************************************************} { } { Zeos Database Objects } { Native Plain Drivers for Oracle } { } { Originally written by Sergey Seroukhov } { } {*********************************************************} {@********************************************************} { Copyright (c) 1999-2012 Zeos Development Group } { } { License Agreement: } { } { This library 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 Lesser General } { Public License for more details. } { } { The source code of the ZEOS Libraries and packages are } { distributed under the Library GNU General Public } { License (see the file COPYING / COPYING.ZEOS) } { with the following modification: } { As a special exception, the copyright holders of this } { library give you permission to link this library with } { independent modules to produce an executable, } { regardless of the license terms of these independent } { modules, and to copy and distribute the resulting } { executable under terms of your choice, provided that } { you also meet, for each linked independent module, } { the terms and conditions of the license of that module. } { An independent module is a module which is not derived } { from or based on this library. If you modify this } { library, you may extend this exception to your version } { of the library, but you are not obligated to do so. } { If you do not wish to do so, delete this exception } { statement from your version. } { } { } { The project web site is located on: } { http://zeos.firmos.at (FORUM) } { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)} { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) } { } { http://www.sourceforge.net/projects/zeoslib. } { } { } { Zeos Development Group. } {********************************************************@} unit ZPlainOracleDriver; interface {$I ZPlain.inc} {$J+} uses {$IFNDEF UNIX} // Windows, {$ENDIF} ZPlainLoader, ZCompatibility, ZPlainOracleConstants, ZPlainDriver; {***************** Plain API types definition ****************} const WINDOWS_DLL_LOCATION = 'oci.dll'; // WINDOWS_DLL_LOCATION = 'ora803.dll'; LINUX_DLL_LOCATION = 'libclntsh'+SharedSuffix; // LINUX_DLL_LOCATION = 'libwtc8.so'; type {** Represents a generic interface to Oracle native API. } IZOraclePlainDriver = interface (IZPlainDriver) ['{22404660-C95F-4346-A3DB-7C6DFE15F115}'] function EnvNlsCreate(var envhpp: POCIEnv; mode: ub4; ctxp: Pointer; malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer; xtramemsz: size_T; usrmempp: PPointer; charset, ncharset: ub2): sword; function ServerAttach(srvhp: POCIServer; errhp: POCIError; dblink: text; dblink_len: sb4; mode: ub4): sword; function ServerDetach(srvhp: POCIServer; errhp: POCIError; mode: ub4): sword; function ServerRelease(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1; version:pointer): sword; function ServerVersion(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1): sword; function SessionBegin(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; credt: ub4; mode: ub4):sword; function SessionEnd(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; mode: ub4): sword; function TransStart(svchp: POCISvcCtx; errhp: POCIError; timeout: word; flags: ub4): sword; function TransRollback(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function TransCommit(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function Ping(svchp: POCISvcCtx; errhp: POCIError; mode: ub4 = OCI_DEFAULT): sword; function PasswordChange(svchp: POCISvcCtx; errhp: POCIError; user_name: text; usernm_len: ub4; opasswd: text; opasswd_len: ub4; npasswd: text; npasswd_len: sb4; mode: ub4): sword; procedure ClientVersion(major_version, minor_version, update_num, patch_num, port_update_num: psword); function HandleAlloc(parenth: POCIHandle; var hndlpp: POCIHandle; atype: ub4; xtramem_sz: size_T; usrmempp: PPointer): sword; function HandleFree(hndlp: Pointer; atype: ub4): sword; function ErrorGet(hndlp: Pointer; recordno: ub4; sqlstate: text; var errcodep: sb4; bufp: text; bufsiz: ub4; atype: ub4): sword; function AttrSet(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; size: ub4; attrtype: ub4; errhp: POCIError): sword; function AttrGet(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; sizep: Pointer; attrtype: ub4; errhp: POCIError): sword; function NlsNumericInfoGet(envhp: POCIEnv; errhp: POCIError; val: psb4; item: ub2): sword; {statement api} function StmtPrepare(stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; language:ub4; mode: ub4):sword; function StmtPrepare2(svchp: POCISvcCtx; var stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; key: text; key_len: ub4; language:ub4; mode: ub4): sword; function StmtRelease(stmtp: POCIStmt; errhp: POCIError; key: text; key_len: ub4; mode: ub4):sword; function StmtExecute(svchp: POCISvcCtx; stmtp: POCIStmt; errhp: POCIError; iters: ub4; rowoff: ub4; snap_in: POCISnapshot; snap_out: POCISnapshot; mode: ub4): sword; function ParamGet(hndlp: Pointer; htype: ub4; errhp: POCIError; var parmdpp: Pointer; pos: ub4): sword; function StmtFetch(stmtp: POCIStmt; errhp: POCIError; nrows: ub4; orientation: ub2; mode: ub4): sword; function StmtFetch2(stmtp: POCIStmt; errhp: POCIError; const nrows: ub4; const orientation: ub2; const fetchOffset: sb4; const mode: ub4): sword; function DefineByPos(stmtp: POCIStmt; var defnpp: POCIDefine; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp: Pointer; rlenp: Pointer; rcodep: Pointer; mode: ub4): sword; function BindByPos(stmtp: POCIStmt; var bindpp: POCIBind; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp: Pointer; alenp: Pointer; rcodep: Pointer; maxarr_len: ub4; curelep: Pointer; mode: ub4): sword; function BindObject(bindp: POCIBind; errhp: POCIError; const _type: POCIType; pgvpp: PPointer; pvszsp: pub4; indpp: PPointer; indszp: pub4): sword; function ResultSetToStmt(rsetdp: POCIHandle; errhp: POCIError): sword; function DefineObject(defnpp: POCIDefine; errhp: POCIError; _type: POCIHandle; pgvpp, pvszsp, indpp, indszp: pointer): sword; {descriptors} function DescriptorAlloc(const parenth: POCIEnv; var descpp: POCIDescriptor; const htype: ub4; const xtramem_sz: integer; usrmempp: Pointer): sword; function DescriptorFree(const descp: Pointer; const htype: ub4): sword; {Lob} function LobOpen(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; mode: ub1): sword; function LobRead(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; function LobTrim(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; newlen: ub4): sword; function LobWrite(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; piece: ub1; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; function LobCreateTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; csid: ub2; csfrm: ub1; lobtype: ub1; cache: LongBool; duration: OCIDuration): sword; function LobIsTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var is_temporary: LongBool): sword; function LobFreeTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; function LobCharSetForm ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csfrm: pub1): sword; function LobCharSetId ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csid: pub2): sword; function LobClose(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; {DateTime api} function IntervalGetYearMonth(hndl: POCIHandle; err: POCIError; yr,mnth: psb4; const int_result: POCIInterval): sword; function IntervalGetDaySecond(hndl: POCIHandle; err: POCIError; dy: psb4; hr, mm, ss, fsec: psb4; const int_result: POCIInterval): sword; function DateTimeConstruct(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; year: sb2; month: ub1; day: ub1; hour: ub1; min: ub1; sec: ub1; fsec: ub4; timezone: text; timezone_length: size_t): sword; function DateTimeGetDate(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var year: sb2; var month: ub1; var day: ub1): sword; function DateTimeGetTime(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var hour: ub1; var minute: ub1; var sec: ub1; var fsec: ub4): sword; {object api} function TypeByRef(env: POCIEnv; err: POCIError; type_ref: POCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function ObjectNew(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; typecode: OCITypeCode; tdo: POCIType; table: Pointer; duration: OCIDuration; value: Longbool; instance: PPointer): sword; function ObjectPin(env: POCIEnv; err: POCIError; const object_ref: POCIRef; const corhdl: POCIComplexObject; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock_option: OCILockOpt; _object: PPointer): sword; function ObjectUnpin(env: POCIEnv; err: POCIError; const _object: Pointer): sword; function ObjectFree(hndl: POCIEnv; err: POCIError; instance: POCIHandle;flags :ub2):sword; function ObjectGetTypeRef(env: POCIEnv; err: POCIError; const instance:pointer; type_ref: POCIRef): sword; function DescribeAny(svchp: POCISvcCtx; errhp: POCIError; objptr: Pointer; objnm_len: ub4; objptr_typ: ub1; info_level: ub1; objtyp: ub1; dschp: POCIDescribe): sword; (* excluded unused api function TransDetach(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function TransPrepare(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function TransForget(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function Break(svchp: POCISvcCtx; errhp:POCIError): sword; function Reset(svchp: POCISvcCtx; errhp:POCIError): sword; function ObjectUnmark(env: POCIEnv; err: POCIError; const _object:pointer): sword; function ObjectUnmarkByRef(env: POCIEnv; err: POCIError; const ref: POCIRef): sword; function ObjectMarkDeleteByRef(env: POCIEnv; err: POCIError; const object_ref:POCIRef): sword; function ObjectMarkDelete(env: POCIEnv; err: POCIError; const instance:pointer): sword; function ObjectFlush(env: POCIEnv; err: POCIError; const _object: pointer): sword; function ObjectRefresh(env: POCIEnv; err: POCIError; _object: pointer): sword; function ObjectCopy(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const source, null_source, target, null_target: pointer; const tdo: POCIType; const duration: OCIDuration; const option: ub1): sword; function ObjectGetObjectRef(env: POCIEnv; err: POCIError; const _object: pointer; object_ref: POCIRef): sword; function ObjectMakeObjectRef(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const table: pointer; const values: PPointer; const array_len: ub4; object_ref: POCIRef): sword; function ObjectGetPrimaryKeyTypeRef(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const table: pointer; type_ref: POCIRef): sword; function ObjectGetInd(env: POCIEnv; err: POCIError; const instance: pointer; null_struct: PPointer): sword; function ObjectExists(env: POCIEnv; err: POCIError; const ins: pointer; exist: PBoolean): sword; function ObjectGetProperty(envh: POCIEnv; errh: POCIError; const obj: pointer; const propertyId: OCIObjectPropId; _property: pointer; size: Pub4): sword; function ObjectIsLocked(env: POCIEnv; err: POCIError; const ins: pointer; lock: Pboolean): sword; function ObjectIsDirty(env: POCIEnv; err: POCIError; const ins: pointer; dirty: PBoolean): sword; function ObjectPinTable(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const schema_name: Poratext; const s_n_length: ub4; const object_name: Poratext; const o_n_length:ub4; const scope_obj_ref: POCIRef; const pin_duration: OCIDuration; _object: PPointer): sword; function ObjectArrayPin(env: POCIEnv; err: POCIError; const ref_array: PPOCIRef; const array_size: ub4; const cor_array: PPOCIComplexObject; const cor_array_size: ub4; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock: OCILockOpt; obj_array: PPointer; pos: Pub4): sword; function CacheFlush(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const context: pointer; const get: TOCICacheFlushGet; ref: PPOCIRef): sword; function CacheRefresh(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const option: OCIRefreshOpt; const context: pointer; get: TOCICacheRefreshGet; ref: PPOCIRef): sword; function CacheUnpin(env: POCIEnv; err: POCIError; const svc:POCISvcCtx): sword; function CacheFree(env: POCIEnv; err: POCIError; const svc: POCISvcCtx): sword; function CacheUnmark(env: POCIEnv; err: POCIError; const svc: POCISvcCtx): sword; function DurationBegin(env: POCIEnv; err: POCIError; svc: POCISvcCtx; const parent: OCIDuration; dur: POCIDuration): sword; function DurationEnd(env: POCIEnv; err: POCIError; svc: POCISvcCtx; duration: OCIDuration): sword; { < ori.h} function DateTimeAssign(hndl: POCIEnv; err: POCIError; const from: POCIDateTime;_to: POCIDateTime): sword; function DateTimeCheck(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var valid: ub4): sword; function DateTimeCompare(hndl: POCIEnv; err: POCIError; const date1: POCIDateTime; const date2: POCIDateTime; var result: sword): sword; function DateTimeConvert(hndl: POCIEnv; err: POCIError; indate: POCIDateTime; outdate: POCIDateTime): sword; function DateTimeFromText(hndl: POCIEnv; err: POCIError; const date_str: text; d_str_length: size_t; const fmt: text; fmt_length: ub1; const lang_name: text; lang_length: size_t; date: POCIDateTime): sword; function DateTimeGetTimeZoneOffset(hndl: POCIEnv; err: POCIError; const datetime: POCIDateTime; var hour: sb1; var minute: sb1): sword; function DateTimeSysTimeStamp(hndl: POCIEnv; err: POCIError; sys_date: POCIDateTime): sword; function DateTimeToText(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; const fmt: text; fmt_length: ub1; fsprec: ub1; const lang_name: text; lang_length: size_t; var buf_size: ub4; buf: text): sword; function DateTimeGetTimeZoneName(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var buf: ub1; var buflen: ub4): sword; function LobAppend(svchp: POCISvcCtx; errhp: POCIError; dst_locp, src_locp: POCILobLocator): sword; function LobAssign(svchp: POCISvcCtx; errhp: POCIError; src_locp: POCILobLocator; var dst_locpp: POCILobLocator): sword; function LobCopy(svchp: POCISvcCtx; errhp: POCIError; dst_locp: POCILobLocator; src_locp: POCILobLocator; amount: ub4; dst_offset: ub4; src_offset: ub4): sword; function LobEnableBuffering(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; function LobDisableBuffering(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; function LobErase(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amount: ub4; offset: ub4): sword; function LobFileExists(svchp: POCISvcCtx; errhp: POCIError; filep: POCILobLocator; var flag: Boolean): sword; function LobFileGetName(envhp: POCIEnv; errhp: POCIError; filep: POCILobLocator; dir_alias: text; var d_length: ub2; filename: text; var f_length: ub2): sword; function LobFileSetName(envhp: POCIEnv; errhp: POCIError; var filep: POCILobLocator; dir_alias: text; d_length: ub2; filename: text; f_length: ub2): sword; function LobFlushBuffer(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; flag: ub4): sword; function LobGetLength(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var lenp: ub4): sword; function LobIsOpen(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var flag: LongBool): sword; function LobLoadFromFile(svchp: POCISvcCtx; errhp: POCIError; dst_locp: POCILobLocator; src_locp: POCILobLocator; amount: ub4; dst_offset: ub4; src_offset: ub4): sword; function LobLocatorIsInit(envhp: POCIEnv; errhp: POCIError; locp: POCILobLocator; var is_initialized: LongBool): sword; function StmtGetPieceInfo(stmtp: POCIStmt; errhp: POCIError; var hndlpp: Pointer; var typep: ub4; var in_outp: ub1; var iterp: ub4; var idxp: ub4; var piecep: ub1): sword; function StmtSetPieceInfo(handle: Pointer; typep: ub4; errhp: POCIError; buf: Pointer; var alenp: ub4; piece: ub1; indp: Pointer; var rcodep: ub2): sword; function NumberInc(err: POCIError; number: POCINumber): sword; function NumberDec(err: POCIError; number: POCINumber): sword; procedure NumberSetZero(err: POCIError; number: POCINumber); procedure NumberSetPi(err: POCIError; number: POCINumber); function NumberAdd(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberSub(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberMul(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberDiv(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberMod(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberIntPower(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberShift(err: POCIError; const number: POCINumber; const nDig: sword; _result: POCINumber): sword; function NumberNeg(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberToText(err: POCIError; const number: POCINumber; const fmt: Poratext; fmt_length: ub4; const nls_params: Poratext; nls_p_length: ub4; buf_size: pub4; buf: poratext): sword; function NumberFromText(err: POCIError; const str: poratext; str_length: ub4; const fmt: poratext; fmt_length: ub4; const nls_params: poratext; nls_p_length: ub4; number: POCINumber): sword; function NumberToInt(err: POCIError; const number: POCINumber; rsl_length: uword; rsl_flag: uword; rsl: Pointer): sword; function NumberFromInt(err: POCIError; const inum: Pointer; inum_length: uword; inum_s_flag: uword; number: POCINumber): sword; function NumberToReal(err: POCIError; const number: POCINumber; rsl_length: uword; rsl: Pointer): sword; function NumberToRealArray(err: POCIError; const number: PPOCINumber; elems: uword; rsl_length: uword; rsl: Pointer): sword; function NumberFromReal(err: POCIError; const rnum: Pointer; rnum_length: uword; number: POCINumber): sword; function NumberCmp(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: psword): sword; function NumberSign(err: POCIError; const number: POCINumber; _result: psword): sword; function NumberIsZero(err: POCIError; const number: POCINumber; _Result: pboolean): sword; function NumberIsInt(err: POCIError; const number: POCINumber; _result: Pboolean): sword; function NumberAssign(err: POCIError; const from: POCINumber; _to: POCINumber): sword; function NumberAbs(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberCeil(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberFloor(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberSqrt(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberTrunc(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberPower(err: POCIError; const base: POCINumber; const number: POCINumber; _result: POCINumber): sword; function NumberRound(err: POCIError; const number: POCINumber; decplace: sword; _result: POCINumber): sword; function NumberPrec(err: POCIError; const number: POCINumber; nDigs: sword; _result: POCINumber): sword; function NumberSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberHypSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberHypCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcTan2(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberHypTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberExp(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberLn(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberLog(err: POCIError; const base: POCINumber; const number: POCINumber; _result: POCINumber): sword; function TableSize(hndl: POCIEnv; err: POCIError; const tbl: POCITable; size: psb4): sword; function TableExists(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4; exists: PBoolean): sword; function TableDelete(hndl: POCIEnv; err: POCIError; index: sb4; tbl: POCITable): sword; function TableFirst(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4): sword; function TableLast(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4): sword; function TableNext(hndl: POCIEnv; err: POCIError; index: sb4; const tbl: POCITable; next_index: psb4; exists: PBoolean): sword; function TablePrev(hndl: POCIEnv; err: POCIError; index: sb4; const tbl: POCITable; prev_index: psb4; exists: PBoolean): sword; function ObjectSetAttr(env: POCIEnv; err: POCIError; instance: Pointer; null_struct: pointer; tdo: POCIType; const names: PPAnsiChar; const lengths: pub4; const name_count: ub4; const indexes: pub4; const index_count: ub4; const null_status: POCIInd; const attr_null_struct: Pointer; const attr_value: Pointer): sword; cdecl; function ObjectGetAttr(env: POCIEnv; err: POCIError; instance: Pointer; null_struct: Pointer; tdo: POCIType; const names: PPoratext; const lengths: pub4; const name_count: ub4; const indexes: pub4; const index_count: ub4; attr_null_status: POCIInd; attr_null_struct, attr_value: PPointer; attr_tdo: PPOCIType): sword; {ociap.h} {ort.h} function TypeIterNew(env: POCIEnv; err: POCIError; const tdo: POCIType; iterator_ort: PPOCITypeIter):sword; function TypeIterSet(env: POCIEnv; err: POCIError; const tdo: POCIType; iterator_ort: POCITypeIter): sword; function TypeIterFree(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter): sword; function TypeByName(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; schema_name: Poratext; const s_length: ub4; const type_name: Poratext; const t_length: ub4; version_name: Poratext; const v_length: ub4; const pin_duration: OCIDuration; const get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function TypeArrayByName(env: POCIEnv; err: POCIError; svc: POCISvcCtx; array_len: ub4; schema_name: PPoratext; s_length: Pub4; type_name: PPoratext; t_length: Pub4; version_name: PPoratext; v_length: Pub4; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function TypeArrayByRef(env: POCIEnv; err: POCIError; array_len: ub4; type_ref: PPOCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function TypeName(env: POCIEnv; err: POCIError; tdo: POCIType; n_length: Pub4): poratext; function TypeSchema(env: POCIEnv; err: POCIError; const tdo: POCIType; n_length: Pub4): poratext; function TypeTypeCode(env: POCIEnv; err: POCIError; const tdo: POCIType): OCITypeCode; function TypeCollTypeCode(env:POCIEnv; err:POCIError; const tdo: POCIType): OCITypeCode; function TypeVersion(env: POCIEnv; err: POCIError; const tdo: POCIType; v_length: Pub4): poratext; function TypeAttrs(env: POCIEnv; err: POCIError; const tdo:POCIType): ub4; function TypeMethods(env: POCIEnv; err: POCIError; const tdo: POCIType): ub4; function TypeElemName(env: POCIEnv; err: POCIError; const elem: POCITypeElem; n_length:Pub4): poratext; function TypeElemTypeCode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeCode; function TypeElemType(env: POCIEnv; err: POCIError; const elem: POCITypeElem; elem_tdo:PPOCIType): sword; function TypeElemFlags(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub4; function TypeElemNumPrec(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub1; function TypeElemNumScale(env: POCIEnv; err: POCIError; const elem: POCITypeElem): sb1; function TypeElemLength(env: POCIEnv; err: POCIError; const elem:POCITypeElem): ub4; function TypeElemCharSetID(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub2; function TypeElemCharSetForm(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub2; function TypeElemParameterizedType(env: POCIEnv; err: POCIError; const elem: POCITypeElem; type_stored: PPOCIType): sword; function TypeElemExtTypeCode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeCode; function TypeAttrByName(env: POCIEnv; err: POCIError; const tdo: POCIType; const name: Poratext; const n_length: ub4; elem: PPOCITypeElem): sword; function TypeAttrNext(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter; elem: PPOCITypeElem): sword; function TypeCollElem(env: POCIEnv; err: POCIError; const tdo:POCIType; element: PPOCITypeElem): sword; function TypeCollSize(env: POCIEnv; err: POCIError; const tdo: POCIType; num_elems: Pub4): sword; function TypeCollExtTypeCode(env: POCIEnv; err: POCIError; const tdo:POCIType; sqt_code: POCITypeCode): sword; function TypeMethodOverload(env: POCIEnv; err: POCIError; const tdo: POCIType; const method_name: Poratext; const m_length: ub4): ub4; function TypeMethodByName(env: POCIEnv; err: POCIError; const tdo: POCIType; const method_name: Poratext; const m_length: ub4; mdos: PPOCITypeMethod): sword; function TypeMethodNext(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter; mdo: PPOCITypeMethod): sword; function TypeMethodName(env:POCIEnv; err: POCIError; const mdo: POCITypeMethod; n_length: Pub4): poratext; function TypeMethodEncap(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod): OCITypeEncap; function TypeMethodFlags(env: POCIEnv; err: POCIError; const mdo:POCITypeMethod): OCITypeMethodFlag; function TypeMethodMap(env: POCIEnv; err: POCIError; const tdo: POCIType; mdo: PPOCITypeMethod): sword; function TypeMethodOrder(env: POCIEnv; err: POCIError; const tdo: POCIType; mdo: PPOCITypeMethod): sword; function TypeMethodParams(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod): ub4; function TypeResult(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; elem: PPOCITypeElem): sword; function TypeParamByPos(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const position: ub4; elem: PPOCITypeElem): sword; function TypeParamByName(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4; elem:PPOCITypeElem): sword; function TypeParamPos(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4; position: Pub4; elem: PPOCITypeElem): sword; function TypeElemParamMode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeParamMode; function TypeElemDefaultValue(env: POCIEnv; err: POCIError; const elem: POCITypeElem; d_v_length: Pub4): poratext; function TypeVTInit(env: POCIEnv; err: POCIError): sword; function TypeVTInsert(env: POCIEnv; err: POCIError; const schema_name: Poratext; const s_n_length: ub4; const type_name: Poratext; const t_n_length: ub4; const user_version:Poratext; const u_v_length:ub4): sword; function TypeVTSelect(env: POCIEnv; err: POCIError; const schema_name: Poratext; const s_n_length: ub4; const type_name: Poratext; const t_n_length: ub4; user_version: PPoratext; u_v_length: Pub4; version: Pub2): sword; *) end; {** Implements a driver for Oracle 9i } TZOracle9iPlainDriver = class (TZAbstractPlainDriver, IZPlainDriver, IZOraclePlainDriver) private {api definitions} //EH: if we would drop the interface overheap we simply //could move the defs up to public section, omit starting 'OCI' //and have native access without addition calls just like inline code //10mio calls loose = 1,5 sec with a fast i7 CPU OCIInitialize: function(mode: ub4; ctxp: Pointer; malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer): sword; cdecl; OCIEnvNlsCreate: function(var envhpp: POCIEnv; mode: ub4; ctxp: Pointer; malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer; xtramemsz: size_T; usrmempp: PPointer; charset, ncharset: ub2): sword; cdecl; OCIServerAttach: function(srvhp: POCIServer; errhp: POCIError; dblink: text; dblink_len: sb4; mode: ub4): sword; cdecl; OCIServerDetach: function(srvhp: POCIServer; errhp: POCIError; mode: ub4): sword; cdecl; OCIServerRelease: function(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1; version:pointer): sword; cdecl; OCIServerVersion: function(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1): sword; cdecl; OCISessionBegin: function(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; credt: ub4; mode: ub4):sword; cdecl; OCISessionEnd: function(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; mode: ub4): sword; cdecl; OCITransStart: function(svchp: POCISvcCtx; errhp: POCIError; timeout: word; flags: ub4): sword; cdecl; OCITransRollback: function(svchp:POCISvcCtx; errhp:POCIError; flags: ub4): sword; cdecl; OCITransCommit: function(svchp: POCISvcCtx; errhp: POCIError; flags: ub4) :sword; cdecl; OCIPing: function(svchp: POCISvcCtx; errhp: POCIError; mode: ub4): sword; cdecl; OCIPasswordChange: function(svchp: POCISvcCtx; errhp: POCIError; user_name: text; usernm_len: ub4; opasswd: text; opasswd_len: ub4; npasswd: text; npasswd_len: sb4; mode: ub4): sword; cdecl; OCIClientVersion: procedure(major_version, minor_version, update_num, patch_num, port_update_num: psword); cdecl; OCIHandleAlloc: function(parenth: POCIHandle; var hndlpp: POCIHandle; atype: ub4; xtramem_sz: size_T; usrmempp: PPointer): sword; cdecl; OCIHandleFree: function(hndlp: Pointer; atype: ub4): sword; cdecl; OCIErrorGet: function(hndlp: Pointer; recordno: ub4; sqlstate: text; var errcodep: sb4; bufp: text; bufsiz: ub4; atype: ub4): sword; cdecl; OCIAttrSet: function(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; size: ub4; attrtype: ub4; errhp: POCIError):sword; cdecl; OCIAttrGet: function(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; sizep: Pointer; attrtype: ub4; errhp: POCIError):sword; cdecl; OCINlsNumericInfoGet: function(envhp: POCIEnv; errhp: POCIError; val: psb4; item: ub2): sword; cdecl; OCIStmtPrepare: function(stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; language:ub4; mode: ub4):sword; cdecl; OCIStmtPrepare2: function(svchp: POCISvcCtx; var stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; key: text; key_len: ub4; language:ub4; mode: ub4): sword; cdecl; OCIStmtRelease: function(stmtp: POCIStmt; errhp: POCIError; key: text; key_len: ub4; mode: ub4):sword; cdecl; OCIStmtExecute: function(svchp: POCISvcCtx; stmtp: POCIStmt; errhp: POCIError; iters: ub4; rowoff: ub4; snap_in: POCISnapshot; snap_out: POCISnapshot; mode: ub4): sword; cdecl; OCIParamGet: function(hndlp: Pointer; htype: ub4; errhp: POCIError; var parmdpp: Pointer; pos: ub4): sword; cdecl; OCIStmtFetch: function(stmtp: POCIStmt; errhp: POCIError; nrows: ub4; orientation: ub2; mode: ub4): sword; cdecl; OCIStmtFetch2: function(stmtp: POCIStmt; errhp: POCIError; const nrows: ub4; const orientation: ub2; const fetchOffset: sb4; const mode: ub4): sword; cdecl; OCIDefineByPos: function(stmtp: POCIStmt; var defnpp: POCIDefine; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp: Pointer; rlenp: Pointer; rcodep: Pointer; mode: ub4): sword; cdecl; OCIBindByPos: function(stmtp: POCIStmt; var bindpp: POCIBind; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp: Pointer; alenp: Pointer; rcodep: Pointer; maxarr_len: ub4; curelep: Pointer; mode: ub4): sword; cdecl; OCIBindObject: function(bindp: POCIBind; errhp: POCIError; const _type: POCIType; pgvpp: PPointer; pvszsp: pub4; indpp: PPointer; indszp: pub4): sword; cdecl; OCIDefineObject: function(defnpp: POCIDefine; errhp: POCIError; _type: POCIHandle; pgvpp: pointer; pvszsp: Pub4; indpp: pointer; indszp: Pub4):sword; cdecl; OCIResultSetToStmt: function(rsetdp: POCIHandle; errhp: POCIError): sword; cdecl; OCIDescriptorAlloc: function(parenth: POCIEnv; var descpp: POCIDescriptor; htype: ub4; xtramem_sz: integer; usrmempp: Pointer): sword; cdecl; OCIDescriptorFree: function(descp: Pointer; htype: ub4): sword; cdecl; OCILobOpen: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; mode: ub1): sword; cdecl; OCILobRead: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; cdecl; OCILobTrim: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; newlen: ub4): sword; cdecl; OCILobWrite: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; piece: ub1; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; cdecl; OCILobCreateTemporary: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; csid: ub2; csfrm: ub1; lobtype: ub1; cache: LongBool; duration: OCIDuration): sword; cdecl; OCILobIsTemporary: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var is_temporary: LongBool): sword; cdecl; OCILobFreeTemporary: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; cdecl; OCILobCharSetForm: function ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csfrm: pub1): sword; cdecl; OCILobCharSetId: function( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csid: pub2): sword; cdecl; OCILobClose: function(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; cdecl; OCIIntervalGetYearMonth: function (hndl: POCIHandle; err: POCIError; yr,mnth: psb4; const int_result: POCIInterval): sword; cdecl; OCIIntervalGetDaySecond: function(hndl: POCIHandle; err: POCIError; dy: psb4; hr, mm, ss, fsec: psb4; const int_result: POCIInterval): sword; cdecl; OCIDateTimeConstruct: function(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; year: sb2; month: ub1; day: ub1; hour: ub1; min: ub1; sec: ub1; fsec: ub4; timezone: text; timezone_length: size_t): sword; cdecl; OCIDateTimeGetDate: function(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var year: sb2; var month: ub1; var day: ub1): sword; cdecl; OCIDateTimeGetTime: function(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var hour: ub1; var minute: ub1; var sec: ub1; var fsec: ub4): sword; cdecl; { object api} OCITypeByRef: function(env: POCIEnv; err: POCIError; type_ref: POCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; cdecl; OCIObjectNew: function(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const typecode: OCITypeCode; const tdo: POCIType; const table: Pointer; const duration: OCIDuration; const value: boolean; instance: PPointer): sword; cdecl; OCIObjectPin: function(env: POCIEnv; err: POCIError; const object_ref: POCIRef; const corhdl: POCIComplexObject; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock_option: OCILockOpt; _object: PPointer): sword; cdecl; OCIObjectUnpin: function(env: POCIEnv; err: POCIError; const _object: Pointer): sword; cdecl; OCIObjectFree: function(env: POCIEnv; err: POCIError; const instance: pointer; const flags: ub2): sword; cdecl; OCIObjectGetTypeRef: function(env: POCIEnv; err: POCIError; const instance:pointer; type_ref: POCIRef): sword; cdecl; OCIDescribeAny: function(svchp: POCISvcCtx; errhp: POCIError; objptr: Pointer; objnm_len: ub4; objptr_typ: ub1; info_level: ub1; objtyp: ub1; dschp: POCIDescribe): sword; cdecl; protected procedure LoadApi; override; function Clone: IZPlainDriver; override; public {interface required api} constructor Create; function GetUnicodeCodePageName: String; override; procedure LoadCodePages; override; function GetProtocol: string; override; function GetDescription: string; override; procedure Initialize(const Location: String); override; function EnvNlsCreate(var envhpp: POCIEnv; mode: ub4; ctxp: Pointer; malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer; xtramemsz: size_T; usrmempp: PPointer; charset, ncharset: ub2): sword; function ServerAttach(srvhp: POCIServer; errhp: POCIError; dblink: text; dblink_len: sb4; mode: ub4): sword; function ServerDetach(srvhp: POCIServer; errhp: POCIError; mode: ub4): sword; function ServerRelease(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1; version:pointer): sword; function ServerVersion(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1): sword; function SessionBegin(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; credt: ub4; mode: ub4):sword; function SessionEnd(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; mode: ub4): sword; function TransStart(svchp: POCISvcCtx; errhp: POCIError; timeout: word; flags: ub4): sword; function TransRollback(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function TransCommit(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function Ping(svchp: POCISvcCtx; errhp: POCIError; mode: ub4 = OCI_DEFAULT): sword; function PasswordChange(svchp: POCISvcCtx; errhp: POCIError; user_name: text; usernm_len: ub4; opasswd: text; opasswd_len: ub4; npasswd: text; npasswd_len: sb4; mode: ub4): sword; procedure ClientVersion(major_version, minor_version, update_num, patch_num, port_update_num: psword); function HandleAlloc(parenth: POCIHandle; var hndlpp: POCIHandle; atype: ub4; xtramem_sz: size_T; usrmempp: PPointer): sword; function HandleFree(hndlp: Pointer; atype: ub4): sword; function ErrorGet(hndlp: Pointer; recordno: ub4; sqlstate: text; var errcodep: sb4; bufp: text; bufsiz: ub4; atype: ub4): sword; function AttrSet(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; size: ub4; attrtype: ub4; errhp: POCIError): sword; function AttrGet(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; sizep: Pointer; attrtype: ub4; errhp: POCIError): sword; function NlsNumericInfoGet(envhp: POCIEnv; errhp: POCIError; val: psb4; item: ub2): sword; {statement api} function StmtPrepare(stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; language:ub4; mode: ub4):sword; function StmtPrepare2(svchp: POCISvcCtx; var stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; key: text; key_len: ub4; language:ub4; mode: ub4): sword; function StmtRelease(stmtp: POCIStmt; errhp: POCIError; key: text; key_len: ub4; mode: ub4):sword; function StmtExecute(svchp: POCISvcCtx; stmtp: POCIStmt; errhp: POCIError; iters: ub4; rowoff: ub4; snap_in: POCISnapshot; snap_out: POCISnapshot; mode: ub4): sword; function ParamGet(hndlp: Pointer; htype: ub4; errhp: POCIError; var parmdpp: Pointer; pos: ub4): sword; function StmtFetch(stmtp: POCIStmt; errhp: POCIError; nrows: ub4; orientation: ub2; mode: ub4): sword; function StmtFetch2(stmtp: POCIStmt; errhp: POCIError; const nrows: ub4; const orientation: ub2; const fetchOffset: sb4; const mode: ub4): sword; function DefineByPos(stmtp: POCIStmt; var defnpp: POCIDefine; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp: Pointer; rlenp: Pointer; rcodep: Pointer; mode: ub4): sword; function BindByPos(stmtp: POCIStmt; var bindpp: POCIBind; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp: Pointer; alenp: Pointer; rcodep: Pointer; maxarr_len: ub4; curelep: Pointer; mode: ub4): sword; function BindObject(bindp: POCIBind; errhp: POCIError; const _type: POCIType; pgvpp: PPointer; pvszsp: pub4; indpp: PPointer; indszp: pub4): sword; function DefineObject(defnpp: POCIDefine; errhp: POCIError; _type: POCIHandle; pgvpp, pvszsp, indpp, indszp: pointer): sword; function ResultSetToStmt(rsetdp: POCIHandle; errhp: POCIError): sword; {descriptors} function DescriptorAlloc(const parenth: POCIEnv; var descpp: POCIDescriptor; const htype: ub4; const xtramem_sz: integer; usrmempp: Pointer): sword; function DescriptorFree(const descp: Pointer; const htype: ub4): sword; {Lob} function LobOpen(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; mode: ub1): sword; function LobRead(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; function LobTrim(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; newlen: ub4): sword; function LobWrite(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; piece: ub1; ctxp: Pointer; cbfp: Pointer; csid: ub2; csfrm: ub1): sword; function LobCreateTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; csid: ub2; csfrm: ub1; lobtype: ub1; cache: LongBool; duration: OCIDuration): sword; function LobIsTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var is_temporary: LongBool): sword; function LobFreeTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; function LobCharSetForm ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csfrm: pub1): sword; function LobCharSetId ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csid: pub2): sword; function LobClose(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; {DateTime api} function IntervalGetYearMonth(hndl: POCIHandle; err: POCIError; yr,mnth: psb4; const int_result: POCIInterval): sword; function IntervalGetDaySecond(hndl: POCIHandle; err: POCIError; dy: psb4; hr, mm, ss, fsec: psb4; const int_result: POCIInterval): sword; function DateTimeConstruct(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; year: sb2; month: ub1; day: ub1; hour: ub1; min: ub1; sec: ub1; fsec: ub4; timezone: text; timezone_length: size_t): sword; function DateTimeGetDate(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var year: sb2; var month: ub1; var day: ub1): sword; function DateTimeGetTime(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var hour: ub1; var minute: ub1; var sec: ub1; var fsec: ub4): sword; {object api} function TypeByRef(env: POCIEnv; err: POCIError; type_ref: POCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function ObjectNew(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; typecode: OCITypeCode; tdo: POCIType; table: Pointer; duration: OCIDuration; value: Longbool; instance: PPointer): sword; function ObjectPin(env: POCIEnv; err: POCIError; const object_ref: POCIRef; const corhdl: POCIComplexObject; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock_option: OCILockOpt; _object: PPointer): sword; function ObjectUnpin(env: POCIEnv; err: POCIError; const _object: Pointer): sword; function ObjectFree(hndl: POCIEnv; err: POCIError; instance: POCIHandle;flags :ub2):sword; function ObjectGetTypeRef(env: POCIEnv; err: POCIError; const instance:pointer; type_ref: POCIRef): sword; function DescribeAny(svchp: POCISvcCtx; errhp: POCIError; objptr: Pointer; objnm_len: ub4; objptr_typ: ub1; info_level: ub1; objtyp: ub1; dschp: POCIDescribe): sword; (* unused api function ObjectUnmark(env: POCIEnv; err: POCIError; const _object:pointer): sword; function ObjectUnmarkByRef(env: POCIEnv; err: POCIError; const ref: POCIRef): sword; function ObjectMarkDeleteByRef(env: POCIEnv; err: POCIError; const object_ref:POCIRef): sword; function ObjectMarkDelete(env: POCIEnv; err: POCIError; const instance:pointer): sword; function ObjectFlush(env: POCIEnv; err: POCIError; const _object: pointer): sword; function ObjectRefresh(env: POCIEnv; err: POCIError; _object: pointer): sword; function ObjectCopy(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const source, null_source, target, null_target: pointer; const tdo: POCIType; const duration: OCIDuration; const option: ub1): sword; function ObjectGetObjectRef(env: POCIEnv; err: POCIError; const _object: pointer; object_ref: POCIRef): sword; function ObjectMakeObjectRef(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const table: pointer; const values: PPointer; const array_len: ub4; object_ref: POCIRef): sword; function ObjectGetPrimaryKeyTypeRef(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const table: pointer; type_ref: POCIRef): sword; function ObjectGetInd(env: POCIEnv; err: POCIError; const instance: pointer; null_struct: PPointer): sword; function ObjectExists(env: POCIEnv; err: POCIError; const ins: pointer; exist: PBoolean): sword; function ObjectGetProperty(envh: POCIEnv; errh: POCIError; const obj: pointer; const propertyId: OCIObjectPropId; _property: pointer; size: Pub4): sword; function ObjectIsLocked(env: POCIEnv; err: POCIError; const ins: pointer; lock: Pboolean): sword; function ObjectIsDirty(env: POCIEnv; err: POCIError; const ins: pointer; dirty: PBoolean): sword; function ObjectPinTable(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const schema_name: Poratext; const s_n_length: ub4; const object_name: Poratext; const o_n_length:ub4; const scope_obj_ref: POCIRef; const pin_duration: OCIDuration; _object: PPointer): sword; function ObjectArrayPin(env: POCIEnv; err: POCIError; const ref_array: PPOCIRef; const array_size: ub4; const cor_array: PPOCIComplexObject; const cor_array_size: ub4; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock: OCILockOpt; obj_array: PPointer; pos: Pub4): sword; function CacheFlush(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const context: pointer; const get: TOCICacheFlushGet; ref: PPOCIRef): sword; function CacheRefresh(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const option: OCIRefreshOpt; const context: pointer; get: TOCICacheRefreshGet; ref: PPOCIRef): sword; function CacheUnpin(env: POCIEnv; err: POCIError; const svc:POCISvcCtx): sword; function CacheFree(env: POCIEnv; err: POCIError; const svc: POCISvcCtx): sword; function CacheUnmark(env: POCIEnv; err: POCIError; const svc: POCISvcCtx): sword; function DurationBegin(env: POCIEnv; err: POCIError; svc: POCISvcCtx; const parent: OCIDuration; dur: POCIDuration): sword; function DurationEnd(env: POCIEnv; err: POCIError; svc: POCISvcCtx; duration: OCIDuration): sword; { < ori.h} function TransDetach(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function TransPrepare(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function TransForget(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; function Break(svchp: POCISvcCtx; errhp:POCIError): sword; function Reset(svchp: POCISvcCtx; errhp:POCIError): sword; function DateTimeAssign(hndl: POCIEnv; err: POCIError; const from: POCIDateTime;_to: POCIDateTime): sword; function DateTimeCheck(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var valid: ub4): sword; function DateTimeCompare(hndl: POCIEnv; err: POCIError; const date1: POCIDateTime; const date2: POCIDateTime; var _result: sword): sword; function DateTimeConvert(hndl: POCIEnv; err: POCIError; indate: POCIDateTime; outdate: POCIDateTime): sword; function DateTimeFromText(hndl: POCIEnv; err: POCIError; const date_str: text; d_str_length: size_t; const fmt: text; fmt_length: ub1; const lang_name: text; lang_length: size_t; date: POCIDateTime): sword; function DateTimeGetTimeZoneOffset(hndl: POCIEnv; err: POCIError; const datetime: POCIDateTime; var hour: sb1; var minute: sb1): sword; function DateTimeSysTimeStamp(hndl: POCIEnv; err: POCIError; sys_date: POCIDateTime): sword; function DateTimeToText(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; const fmt: text; fmt_length: ub1; fsprec: ub1; const lang_name: text; lang_length: size_t; var buf_size: ub4; buf: text): sword; function DateTimeGetTimeZoneName(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var buf: ub1; var buflen: ub4): sword; function LobAppend(svchp: POCISvcCtx; errhp: POCIError; dst_locp, src_locp: POCILobLocator): sword; function LobAssign(svchp: POCISvcCtx; errhp: POCIError; src_locp: POCILobLocator; var dst_locpp: POCILobLocator): sword; function LobCopy(svchp: POCISvcCtx; errhp: POCIError; dst_locp: POCILobLocator; src_locp: POCILobLocator; amount: ub4; dst_offset: ub4; src_offset: ub4): sword; function LobEnableBuffering(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; function LobDisableBuffering(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; function LobErase(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amount: ub4; offset: ub4): sword; function LobFileExists(svchp: POCISvcCtx; errhp: POCIError; filep: POCILobLocator; var flag: Boolean): sword; function LobFileGetName(envhp: POCIEnv; errhp: POCIError; filep: POCILobLocator; dir_alias: text; var d_length: ub2; filename: text; var f_length: ub2): sword; function LobFileSetName(envhp: POCIEnv; errhp: POCIError; var filep: POCILobLocator; dir_alias: text; d_length: ub2; filename: text; f_length: ub2): sword; function LobFlushBuffer(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; flag: ub4): sword; function LobGetLength(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var lenp: ub4): sword; function LobIsOpen(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var flag: LongBool): sword; function LobLoadFromFile(svchp: POCISvcCtx; errhp: POCIError; dst_locp: POCILobLocator; src_locp: POCILobLocator; amount: ub4; dst_offset: ub4; src_offset: ub4): sword; function LobLocatorIsInit(envhp: POCIEnv; errhp: POCIError; locp: POCILobLocator; var is_initialized: LongBool): sword; function StmtGetPieceInfo(stmtp: POCIStmt; errhp: POCIError; var hndlpp: Pointer; var typep: ub4; var in_outp: ub1; var iterp: ub4; var idxp: ub4; var piecep: ub1): sword; function StmtSetPieceInfo(handle: Pointer; typep: ub4; errhp: POCIError; buf: Pointer; var alenp: ub4; piece: ub1; indp: Pointer; var rcodep: ub2): sword; function NumberInc(err: POCIError; number: POCINumber): sword; function NumberDec(err: POCIError; number: POCINumber): sword; procedure NumberSetZero(err: POCIError; number: POCINumber); procedure NumberSetPi(err: POCIError; number: POCINumber); function NumberAdd(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberSub(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberMul(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberDiv(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberMod(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberIntPower(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberShift(err: POCIError; const number: POCINumber; const nDig: sword; _result: POCINumber): sword; function NumberNeg(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberToText(err: POCIError; const number: POCINumber; const fmt: Poratext; fmt_length: ub4; const nls_params: Poratext; nls_p_length: ub4; buf_size: pub4; buf: poratext): sword; function NumberFromText(err: POCIError; const str: poratext; str_length: ub4; const fmt: poratext; fmt_length: ub4; const nls_params: poratext; nls_p_length: ub4; number: POCINumber): sword; function NumberToInt(err: POCIError; const number: POCINumber; rsl_length: uword; rsl_flag: uword; rsl: Pointer): sword; function NumberFromInt(err: POCIError; const inum: Pointer; inum_length: uword; inum_s_flag: uword; number: POCINumber): sword; function NumberToReal(err: POCIError; const number: POCINumber; rsl_length: uword; rsl: Pointer): sword; function NumberToRealArray(err: POCIError; const number: PPOCINumber; elems: uword; rsl_length: uword; rsl: Pointer): sword; function NumberFromReal(err: POCIError; const rnum: Pointer; rnum_length: uword; number: POCINumber): sword; function NumberCmp(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: psword): sword; function NumberSign(err: POCIError; const number: POCINumber; _result: psword): sword; function NumberIsZero(err: POCIError; const number: POCINumber; _Result: pboolean): sword; function NumberIsInt(err: POCIError; const number: POCINumber; _result: Pboolean): sword; function NumberAssign(err: POCIError; const from: POCINumber; _to: POCINumber): sword; function NumberAbs(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberCeil(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberFloor(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberSqrt(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberTrunc(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberPower(err: POCIError; const base: POCINumber; const number: POCINumber; _result: POCINumber): sword; function NumberRound(err: POCIError; const number: POCINumber; decplace: sword; _result: POCINumber): sword; function NumberPrec(err: POCIError; const number: POCINumber; nDigs: sword; _result: POCINumber): sword; function NumberSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberHypSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberHypCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberArcTan2(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; function NumberHypTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberExp(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberLn(err: POCIError; const number: POCINumber; _result: POCINumber): sword; function NumberLog(err: POCIError; const base: POCINumber; const number: POCINumber; _result: POCINumber): sword; function TableSize(hndl: POCIEnv; err: POCIError; const tbl: POCITable; size: psb4): sword; function TableExists(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4; exists: PBoolean): sword; function TableDelete(hndl: POCIEnv; err: POCIError; index: sb4; tbl: POCITable): sword; function TableFirst(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4): sword; function TableLast(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4): sword; function TableNext(hndl: POCIEnv; err: POCIError; index: sb4; const tbl: POCITable; next_index: psb4; exists: PBoolean): sword; function TablePrev(hndl: POCIEnv; err: POCIError; index: sb4; const tbl: POCITable; prev_index: psb4; exists: PBoolean): sword; function ObjectSetAttr(env: POCIEnv; err: POCIError; instance: Pointer; null_struct: pointer; tdo: POCIType; const names: PPAnsiChar; const lengths: pub4; const name_count: ub4; const indexes: pub4; const index_count: ub4; const null_status: POCIInd; const attr_null_struct: Pointer; const attr_value: Pointer): sword; cdecl; function ObjectGetAttr(env: POCIEnv; err: POCIError; instance: Pointer; null_struct: Pointer; tdo: POCIType; const names: PPoratext; const lengths: pub4; const name_count: ub4; const indexes: pub4; const index_count: ub4; attr_null_status: POCIInd; attr_null_struct, attr_value: PPointer; attr_tdo: PPOCIType): sword; {ociap.h} {ort.h} function TypeIterNew(env: POCIEnv; err: POCIError; const tdo: POCIType; iterator_ort: PPOCITypeIter):sword; function TypeIterSet(env: POCIEnv; err: POCIError; const tdo: POCIType; iterator_ort: POCITypeIter): sword; function TypeIterFree(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter): sword; function TypeByName(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; schema_name: Poratext; const s_length: ub4; const type_name: Poratext; const t_length: ub4; version_name: Poratext; const v_length: ub4; const pin_duration: OCIDuration; const get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function TypeArrayByName(env: POCIEnv; err: POCIError; svc: POCISvcCtx; array_len: ub4; schema_name: PPoratext; s_length: Pub4; type_name: PPoratext; t_length: Pub4; version_name: PPoratext; v_length: Pub4; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function TypeArrayByRef(env: POCIEnv; err: POCIError; array_len: ub4; type_ref: PPOCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; function TypeName(env: POCIEnv; err: POCIError; tdo: POCIType; n_length: Pub4): poratext; function TypeSchema(env: POCIEnv; err: POCIError; const tdo: POCIType; n_length: Pub4): poratext; function TypeTypeCode(env: POCIEnv; err: POCIError; const tdo: POCIType): OCITypeCode; function TypeCollTypeCode(env:POCIEnv; err:POCIError; const tdo: POCIType): OCITypeCode; function TypeVersion(env: POCIEnv; err: POCIError; const tdo: POCIType; v_length: Pub4): poratext; function TypeAttrs(env: POCIEnv; err: POCIError; const tdo:POCIType): ub4; function TypeMethods(env: POCIEnv; err: POCIError; const tdo: POCIType): ub4; function TypeElemName(env: POCIEnv; err: POCIError; const elem: POCITypeElem; n_length:Pub4): poratext; function TypeElemTypeCode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeCode; function TypeElemType(env: POCIEnv; err: POCIError; const elem: POCITypeElem; elem_tdo:PPOCIType): sword; function TypeElemFlags(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub4; function TypeElemNumPrec(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub1; function TypeElemNumScale(env: POCIEnv; err: POCIError; const elem: POCITypeElem): sb1; function TypeElemLength(env: POCIEnv; err: POCIError; const elem:POCITypeElem): ub4; function TypeElemCharSetID(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub2; function TypeElemCharSetForm(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub2; function TypeElemParameterizedType(env: POCIEnv; err: POCIError; const elem: POCITypeElem; type_stored: PPOCIType): sword; function TypeElemExtTypeCode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeCode; function TypeAttrByName(env: POCIEnv; err: POCIError; const tdo: POCIType; const name: Poratext; const n_length: ub4; elem: PPOCITypeElem): sword; function TypeAttrNext(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter; elem: PPOCITypeElem): sword; function TypeCollElem(env: POCIEnv; err: POCIError; const tdo:POCIType; element: PPOCITypeElem): sword; function TypeCollSize(env: POCIEnv; err: POCIError; const tdo: POCIType; num_elems: Pub4): sword; function TypeCollExtTypeCode(env: POCIEnv; err: POCIError; const tdo:POCIType; sqt_code: POCITypeCode): sword; function TypeMethodOverload(env: POCIEnv; err: POCIError; const tdo: POCIType; const method_name: Poratext; const m_length: ub4): ub4; function TypeMethodByName(env: POCIEnv; err: POCIError; const tdo: POCIType; const method_name: Poratext; const m_length: ub4; mdos: PPOCITypeMethod): sword; function TypeMethodNext(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter; mdo: PPOCITypeMethod): sword; function TypeMethodName(env:POCIEnv; err: POCIError; const mdo: POCITypeMethod; n_length: Pub4): poratext; function TypeMethodEncap(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod): OCITypeEncap; function TypeMethodFlags(env: POCIEnv; err: POCIError; const mdo:POCITypeMethod): OCITypeMethodFlag; function TypeMethodMap(env: POCIEnv; err: POCIError; const tdo: POCIType; mdo: PPOCITypeMethod): sword; function TypeMethodOrder(env: POCIEnv; err: POCIError; const tdo: POCIType; mdo: PPOCITypeMethod): sword; function TypeMethodParams(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod): ub4; function TypeResult(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; elem: PPOCITypeElem): sword; function TypeParamByPos(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const position: ub4; elem: PPOCITypeElem): sword; function TypeParamByName(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4; elem:PPOCITypeElem): sword; function TypeParamPos(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4; position: Pub4; elem: PPOCITypeElem): sword; function TypeElemParamMode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeParamMode; function TypeElemDefaultValue(env: POCIEnv; err: POCIError; const elem: POCITypeElem; d_v_length: Pub4): poratext; function TypeVTInit(env: POCIEnv; err: POCIError): sword; function TypeVTInsert(env: POCIEnv; err: POCIError; const schema_name: Poratext; const s_n_length: ub4; const type_name: Poratext; const t_n_length: ub4; const user_version:Poratext; const u_v_length:ub4): sword; function TypeVTSelect(env: POCIEnv; err: POCIError; const schema_name: Poratext; const s_n_length: ub4; const type_name: Poratext; const t_n_length: ub4; user_version: PPoratext; u_v_length: Pub4; version: Pub2): sword; *) end; implementation uses ZEncoding; { TZOracle9iPlainDriver } function TZOracle9iPlainDriver.GetUnicodeCodePageName: String; begin Result := 'UTF8'; end; procedure TZOracle9iPlainDriver.LoadCodePages; begin (* AddCodePage('AL16UTF16', 2000, ceUTF16, zCP_UTF16); {Unicode 3.1 UTF-16 Universal character set} AddCodePage('AL32UTF8', 873, ceUTF8, zCP_UTF8); {Unicode 3.1 UTF-8 Universal character set} //AddCodePage('AR8ADOS710', 3); {Arabic MS-DOS 710 Server 8-bit Latin/Arabic} // AddCodePage('AR8ADOS710T', 4); {Arabic MS-DOS 710 8-bit Latin/Arabic} AddCodePage('AR8ADOS720', 558); {Arabic MS-DOS 720 Server 8-bit Latin/Arabic} // AddCodePage('AR8ADOS720T', 6); {Arabic MS-DOS 720 8-bit Latin/Arabic} // AddCodePage('AR8APTEC715', 7); {APTEC 715 Server 8-bit Latin/Arabic} // AddCodePage('AR8APTEC715T', 8); {APTEC 715 8-bit Latin/Arabic} // AddCodePage('AR8ASMO708PLUS', 9); {ASMO 708 Plus 8-bit Latin/Arabic} AddCodePage('AR8ASMO8X', 500); {ASMO Extended 708 8-bit Latin/Arabic} // AddCodePage('BN8BSCII', 11); {Bangladesh National Code 8-bit BSCII} // AddCodePage('TR7DEC', 12); {DEC VT100 7-bit Turkish} // AddCodePage('TR8DEC', 13); {DEC 8-bit Turkish} // AddCodePage('EL8DEC', 14); {DEC 8-bit Latin/Greek} // AddCodePage('EL8GCOS7', 15); {Bull EBCDIC GCOS7 8-bit Greek} // AddCodePage('IN8ISCII', 16); {Multiple-Script Indian Standard 8-bit Latin/Indian Languages} // AddCodePage('JA16DBCS', 17); {IBM EBCDIC 16-bit Japanese UDC} // AddCodePage('JA16EBCDIC930', 18); {IBM DBCS Code Page 290 16-bit Japanese UDC} AddCodePage('JA16EUC', 830); {EUC 24-bit Japanese} AddCodePage('JA16EUCTILDE', 837); {The same as JA16EUC except for the way that the wave dash and the tilde are mapped to and from Unicode.} // AddCodePage('JA16EUCYEN', 21); {EUC 24-bit Japanese with '\' mapped to the Japanese yen character} // AddCodePage('JA16MACSJIS', 22); {Mac client Shift-JIS 16-bit Japanese} AddCodePage('JA16SJIS', 832); {Shift-JIS 16-bit Japanese UDC} AddCodePage('JA16SJISTILDE', 838); {The same as JA16SJIS except for the way that the wave dash and the tilde are mapped to and from Unicode. UDC} // AddCodePage('JA16SJISYEN', 25); {Shift-JIS 16-bit Japanese with '\' mapped to the Japanese yen character UDC} // AddCodePage('JA16VMS', 26); {JVMS 16-bit Japanese} // AddCodePage('RU8BESTA', 27); {BESTA 8-bit Latin/Cyrillic} // AddCodePage('SF7ASCII', 28); {ASCII 7-bit Finnish} // AddCodePage('KO16DBCS', 29); {IBM EBCDIC 16-bit Korean UDC} // AddCodePage('KO16KSCCS', 30); {KSCCS 16-bit Korean} AddCodePage('KO16KSC5601', 840); {KSC5601 16-bit Korean} AddCodePage('KO16MSWIN949', 846); {MS Windows Code Page 949 Korean UDC} // AddCodePage('TH8MACTHAI', 33); {Mac Client 8-bit Latin/Thai} // AddCodePage('TH8MACTHAIS', 34); {Mac Server 8-bit Latin/Thai} AddCodePage('TH8TISASCII', 41); {Thai Industrial Standard 620-2533 - ASCII 8-bit} // AddCodePage('TH8TISEBCDIC', 36); {Thai Industrial Standard 620-2533 - EBCDIC 8-bit} // AddCodePage('TH8TISEBCDICS', 37); {Thai Industrial Standard 620-2533-EBCDIC Server 8-bit} AddCodePage('US7ASCII', 1); {U.S. 7-bit ASCII American} AddCodePage('VN8MSWIN1258', 45); {MS Windows Code Page 1258 8-bit Vietnamese} // AddCodePage('VN8VN3', 38); {VN3 8-bit Vietnamese} // AddCodePage('WE8GCOS7', 41); {Bull EBCDIC GCOS7 8-bit West European} // AddCodePage('YUG7ASCII', 42); {ASCII 7-bit Yugoslavian} AddCodePage('ZHS16CGB231280', 850); {CGB2312-80 16-bit Simplified Chinese} // AddCodePage('ZHS16DBCS', 44); {IBM EBCDIC 16-bit Simplified Chinese UDC} AddCodePage('ZHS16GBK', 852); {GBK 16-bit Simplified Chinese UDC} // AddCodePage('ZHS16MACCGB231280', 46); {Mac client CGB2312-80 16-bit Simplified Chinese} AddCodePage('ZHS32GB18030', 854); {GB18030-2000} AddCodePage('ZHT16BIG5', 856); {BIG5 16-bit Traditional Chinese} // AddCodePage('ZHT16CCDC', 49); {HP CCDC 16-bit Traditional Chinese} // AddCodePage('ZHT16DBCS', 50); {IBM EBCDIC 16-bit Traditional Chinese UDC} // AddCodePage('ZHT16DBT', 51); {Taiwan Taxation 16-bit Traditional Chinese} AddCodePage('ZHT16HKSCS', 868); {MS Windows Code Page 950 with Hong Kong Supplementary Character Set} AddCodePage('ZHT16MSWIN950', 867); {MS Windows Code Page 950 Traditional Chinese UDC} AddCodePage('ZHT32EUC', 860); {EUC 32-bit Traditional Chinese} // AddCodePage('ZHT32SOPS', 55); {SOPS 32-bit Traditional Chinese} // AddCodePage('ZHT32TRIS', 56); {TRIS 32-bit Traditional Chinese} // AddCodePage('WE8DEC', 57); {DEC 8-bit West European} // AddCodePage('D7DEC', 58); {DEC VT100 7-bit German} // AddCodePage('F7DEC', 59); {DEC VT100 7-bit French} // AddCodePage('S7DEC', 60); {DEC VT100 7-bit Swedish} // AddCodePage('E7DEC', 61); {DEC VT100 7-bit Spanish} // AddCodePage('NDK7DEC', 62); {DEC VT100 7-bit Norwegian/Danish} // AddCodePage('I7DEC', 63); {DEC VT100 7-bit Italian} // AddCodePage('NL7DEC', 64); {DEC VT100 7-bit Dutch} // AddCodePage('CH7DEC', 65); {DEC VT100 7-bit Swiss (German/French)} // AddCodePage('SF7DEC', 66); {DEC VT100 7-bit Finnish} // AddCodePage('WE8DG', 67); {DG 8-bit West European} // AddCodePage('WE8EBCDIC37', 68, ceAnsi, zCP_EBC037); {EBCDIC Code Page 37 8-bit West European} // AddCodePage('D8EBCDIC273', 69, ceAnsi, zCP_EBC273); {EBCDIC Code Page 273/1 8-bit Austrian German} // AddCodePage('DK8EBCDIC277', 70, ceAnsi, zCP_EBC277); {EBCDIC Code Page 277/1 8-bit Danish} // AddCodePage('S8EBCDIC278', 71, ceAnsi, zCP_EBC278); {EBCDIC Code Page 278/1 8-bit Swedish} // AddCodePage('I8EBCDIC280', 72, ceAnsi, zCP_EBC280); {EBCDIC Code Page 280/1 8-bit Italian} // AddCodePage('WE8EBCDIC284', 73, ceAnsi, zCP_EBC284); {EBCDIC Code Page 284 8-bit Latin American/Spanish} // AddCodePage('WE8EBCDIC285', 74); {EBCDIC Code Page 285 8-bit West European} // AddCodePage('WE8EBCDIC924', 75); {Latin 9 EBCDIC 924} // AddCodePage('WE8EBCDIC1047', 76); {EBCDIC Code Page 1047 8-bit West European} // AddCodePage('WE8EBCDIC1047E', 77); {Latin 1/Open Systems 1047} // AddCodePage('WE8EBCDIC1140', 78); {EBCDIC Code Page 1140 8-bit West European} // AddCodePage('WE8EBCDIC1140C', 79); {EBCDIC Code Page 1140 Client 8-bit West European} // AddCodePage('WE8EBCDIC1145', 80); {EBCDIC Code Page 1145 8-bit West European} // AddCodePage('WE8EBCDIC1146', 81); {EBCDIC Code Page 1146 8-bit West European} // AddCodePage('WE8EBCDIC1148', 82); {EBCDIC Code Page 1148 8-bit West European} // AddCodePage('WE8EBCDIC1148C', 83); {EBCDIC Code Page 1148 Client 8-bit West European} // AddCodePage('F8EBCDIC297', 84); {EBCDIC Code Page 297 8-bit French} // AddCodePage('WE8EBCDIC500', 85); {EBCDIC Code Page 500 8-bit West European} // AddCodePage('EE8EBCDIC870', 85); {EBCDIC Code Page 870 8-bit East European} // AddCodePage('EE8EBCDIC870C', 87); {EBCDIC Code Page 870 Client 8-bit East European} // AddCodePage('EE8EBCDIC870S', 88); {EBCDIC Code Page 870 Server 8-bit East European} // AddCodePage('WE8EBCDIC871', 89); {EBCDIC Code Page 871 8-bit Icelandic} AddCodePage('EL8EBCDIC875', 90); {EBCDIC Code Page 875 8-bit Greek} AddCodePage('EL8EBCDIC875R', 91); {EBCDIC Code Page 875 Server 8-bit Greek} AddCodePage('CL8EBCDIC1025', 92); {EBCDIC Code Page 1025 8-bit Cyrillic} AddCodePage('CL8EBCDIC1025C', 93); {EBCDIC Code Page 1025 Client 8-bit Cyrillic} AddCodePage('CL8EBCDIC1025R', 94); {EBCDIC Code Page 1025 Server 8-bit Cyrillic} AddCodePage('CL8EBCDIC1025S', 95); {EBCDIC Code Page 1025 Server 8-bit Cyrillic} AddCodePage('CL8EBCDIC1025X', 96); {EBCDIC Code Page 1025 (Modified) 8-bit Cyrillic} AddCodePage('BLT8EBCDIC1112', 97); {EBCDIC Code Page 1112 8-bit Baltic Multilingual} AddCodePage('BLT8EBCDIC1112S', 98); {EBCDIC Code Page 1112 8-bit Server Baltic Multilingual} AddCodePage('D8EBCDIC1141', 99); {EBCDIC Code Page 1141 8-bit Austrian German} AddCodePage('DK8EBCDIC1142', 100); {EBCDIC Code Page 1142 8-bit Danish} AddCodePage('S8EBCDIC1143', 101); {EBCDIC Code Page 1143 8-bit Swedish} AddCodePage('I8EBCDIC1144', 102); {EBCDIC Code Page 1144 8-bit Italian} AddCodePage('F8EBCDIC1147', 103); {EBCDIC Code Page 1147 8-bit French} AddCodePage('EEC8EUROASCI', 104); {EEC Targon 35 ASCI West European/Greek} AddCodePage('EEC8EUROPA3', 105); {EEC EUROPA3 8-bit West European/Greek} AddCodePage('LA8PASSPORT', 106); {German Government Printer 8-bit All-European Latin} AddCodePage('WE8HP', 107); {HP LaserJet 8-bit West European} AddCodePage('WE8ROMAN8', 108); {HP Roman8 8-bit West European} AddCodePage('HU8CWI2', 109); {Hungarian 8-bit CWI-2} AddCodePage('HU8ABMOD', 110); {Hungarian 8-bit Special AB Mod} AddCodePage('LV8RST104090', 111); {IBM-PC Alternative Code Page 8-bit Latvian (Latin/Cyrillic)} AddCodePage('US8PC437', 112); {IBM-PC Code Page 437 8-bit American} AddCodePage('BG8PC437S', 113); {IBM-PC Code Page 437 8-bit (Bulgarian Modification)} AddCodePage('EL8PC437S', 114); {IBM-PC Code Page 437 8-bit (Greek modification)} AddCodePage('EL8PC737', 115); {IBM-PC Code Page 737 8-bit Greek/Latin} AddCodePage('LT8PC772', 116); {IBM-PC Code Page 772 8-bit Lithuanian (Latin/Cyrillic)} AddCodePage('LT8PC774', 117); {IBM-PC Code Page 774 8-bit Lithuanian (Latin)} AddCodePage('BLT8PC775', 118); {IBM-PC Code Page 775 8-bit Baltic} AddCodePage('WE8PC850', 119); {IBM-PC Code Page 850 8-bit West European} AddCodePage('EL8PC851', 120); {IBM-PC Code Page 851 8-bit Greek/Latin} AddCodePage('EE8PC852', 121); {IBM-PC Code Page 852 8-bit East European} AddCodePage('RU8PC855', 122); {IBM-PC Code Page 855 8-bit Latin/Cyrillic} AddCodePage('WE8PC858', 123); {IBM-PC Code Page 858 8-bit West European} AddCodePage('WE8PC860', 124); {IBM-PC Code Page 860 8-bit West European} AddCodePage('IS8PC861', 125); {IBM-PC Code Page 861 8-bit Icelandic} AddCodePage('CDN8PC863', 126); {IBM-PC Code Page 863 8-bit Canadian French} AddCodePage('N8PC865', 127); {IBM-PC Code Page 865 8-bit Norwegian} AddCodePage('RU8PC866', 128); {IBM-PC Code Page 866 8-bit Latin/Cyrillic} AddCodePage('EL8PC869', 129); {IBM-PC Code Page 869 8-bit Greek/Latin} AddCodePage('LV8PC1117', 130); {IBM-PC Code Page 1117 8-bit Latvian} AddCodePage('US8ICL', 131); {ICL EBCDIC 8-bit American} AddCodePage('WE8ICL', 132); {ICL EBCDIC 8-bit West European} AddCodePage('WE8ISOICLUK', 133); {ICL special version ISO8859-1} AddCodePage('WE8ISO8859P1', 134); {ISO 8859-1 West European} AddCodePage('EE8ISO8859P2', 135); {ISO 8859-2 East European} AddCodePage('SE8ISO8859P3', 136); {ISO 8859-3 South European} AddCodePage('NEE8ISO8859P4', 137); {ISO 8859-4 North and North-East European} AddCodePage('CL8ISO8859P5', 138); {ISO 8859-5 Latin/Cyrillic} AddCodePage('EL8ISO8859P7', 139); {ISO 8859-7 Latin/Greek} AddCodePage('NE8ISO8859P10', 140); {ISO 8859-10 North European} AddCodePage('BLT8ISO8859P13', 141); {ISO 8859-13 Baltic} AddCodePage('CEL8ISO8859P14', 142); {ISO 8859-13 Celtic} AddCodePage('WE8ISO8859P15', 143); {ISO 8859-15 West European} AddCodePage('AR8ARABICMAC', 144); {Mac Client 8-bit Latin/Arabic} AddCodePage('EE8MACCE', 145); {Mac Client 8-bit Central European} AddCodePage('EE8MACCROATIAN', 146); {Mac Client 8-bit Croatian} AddCodePage('WE8MACROMAN8', 147); {Mac Client 8-bit Extended Roman8 West European} AddCodePage('EL8MACGREEK', 148); {Mac Client 8-bit Greek} AddCodePage('IS8MACICELANDIC', 149); {Mac Client 8-bit Icelandic} AddCodePage('CL8MACCYRILLIC', 150); {Mac Client 8-bit Latin/Cyrillic} AddCodePage('EE8MACCES', 151); {Mac Server 8-bit Central European} AddCodePage('EE8MACCROATIANS', 152); {Mac Server 8-bit Croatian} AddCodePage('WE8MACROMAN8S', 153); {Mac Server 8-bit Extended Roman8 West European} AddCodePage('CL8MACCYRILLICS', 154); {Mac Server 8-bit Latin/Cyrillic} AddCodePage('EL8MACGREEKS', 155); {Mac Server 8-bit Greek} AddCodePage('IS8MACICELANDICS', 156); {Mac Server 8-bit Icelandic} AddCodePage('BG8MSWIN', 157); {MS Windows 8-bit Bulgarian Cyrillic} AddCodePage('LT8MSWIN921', 158); {MS Windows Code Page 921 8-bit Lithuanian} AddCodePage('ET8MSWIN923', 159); {MS Windows Code Page 923 8-bit Estonian} AddCodePage('EE8MSWIN1250', 160, ceAnsi, zCP_WIN1250); {MS Windows Code Page 1250 8-bit East European} AddCodePage('CL8MSWIN1251', 161, ceAnsi, zCP_WIN1251); {MS Windows Code Page 1251 8-bit Latin/Cyrillic} AddCodePage('WE8MSWIN1252', 162, ceAnsi, zCP_WIN1252); {MS Windows Code Page 1252 8-bit West European} AddCodePage('EL8MSWIN1253', 163, ceAnsi, zCP_WIN1253); {MS Windows Code Page 1253 8-bit Latin/Greek} AddCodePage('BLT8MSWIN1257', 164, ceAnsi, zCP_WIN1257); {MS Windows Code Page 1257 8-bit Baltic} AddCodePage('BLT8CP921', 165); {Latvian Standard LVS8-92(1) Windows/Unix 8-bit Baltic} AddCodePage('LV8PC8LR', 166, ceAnsi, zCP_DOS866); {Latvian Version IBM-PC Code Page 866 8-bit Latin/Cyrillic} AddCodePage('WE8NCR4970', 167); {NCR 4970 8-bit West European} AddCodePage('WE8NEXTSTEP', 168); {NeXTSTEP PostScript 8-bit West European} AddCodePage('CL8ISOIR111', 169); {ISOIR111 Cyrillic} AddCodePage('CL8KOI8R', 170, ceAnsi, zCP_KOI8R); {RELCOM Internet Standard 8-bit Latin/Cyrillic} AddCodePage('CL8KOI8U', 171); {KOI8 Ukrainian Cyrillic} AddCodePage('US8BS2000', 172); {Siemens 9750-62 EBCDIC 8-bit American} AddCodePage('DK8BS2000', 173); {Siemens 9750-62 EBCDIC 8-bit Danish} AddCodePage('F8BS2000', 174); {Siemens 9750-62 EBCDIC 8-bit French} AddCodePage('D8BS2000', 175); {Siemens 9750-62 EBCDIC 8-bit German} AddCodePage('E8BS2000', 176); {Siemens 9750-62 EBCDIC 8-bit Spanish} AddCodePage('S8BS2000', 177); {Siemens 9750-62 EBCDIC 8-bit Swedish} AddCodePage('DK7SIEMENS9780X', 178); {Siemens 97801/97808 7-bit Danish} AddCodePage('F7SIEMENS9780X', 179); {Siemens 97801/97808 7-bit French} AddCodePage('D7SIEMENS9780X', 180); {Siemens 97801/97808 7-bit German} AddCodePage('I7SIEMENS9780X', 181); {Siemens 97801/97808 7-bit Italian} AddCodePage('N7SIEMENS9780X', 182); {Siemens 97801/97808 7-bit Norwegian} AddCodePage('E7SIEMENS9780X', 183); {Siemens 97801/97808 7-bit Spanish} AddCodePage('S7SIEMENS9780X', 184); {Siemens 97801/97808 7-bit Swedish} AddCodePage('EE8BS2000', 185); {Siemens EBCDIC.DF.04 8-bit East European} AddCodePage('WE8BS2000', 186); {Siemens EBCDIC.DF.04 8-bit West European} AddCodePage('WE8BS2000E', 187); {Siemens EBCDIC.DF.04 8-bit West European} AddCodePage('CL8BS2000', 188); {Siemens EBCDIC.EHC.LC 8-bit Cyrillic} AddCodePage('WE8EBCDIC37C', 189); {EBCDIC Code Page 37 8-bit Oracle/c} AddCodePage('IW8EBCDIC424', 190); {EBCDIC Code Page 424 8-bit Latin/Hebrew} AddCodePage('IW8EBCDIC424S', 191); {EBCDIC Code Page 424 Server 8-bit Latin/Hebrew} AddCodePage('WE8EBCDIC500C', 192); {EBCDIC Code Page 500 8-bit Oracle/c} AddCodePage('IW8EBCDIC1086', 193); {EBCDIC Code Page 1086 8-bit Hebrew} AddCodePage('AR8EBCDIC420S', 194); {EBCDIC Code Page 420 Server 8-bit Latin/Arabic} AddCodePage('AR8EBCDICX', 195); {EBCDIC XBASIC Server 8-bit Latin/Arabic} AddCodePage('TR8EBCDIC1026', 196, ceAnsi, zCP_IBM1026); {EBCDIC Code Page 1026 8-bit Turkish} AddCodePage('TR8EBCDIC1026S', 197); {EBCDIC Code Page 1026 Server 8-bit Turkish} AddCodePage('AR8HPARABIC8T', 198); {HP 8-bit Latin/Arabic} AddCodePage('TR8PC857', 199); {IBM-PC Code Page 857 8-bit Turkish} AddCodePage('IW8PC1507', 200); {IBM-PC Code Page 1507/862 8-bit Latin/Hebrew} AddCodePage('AR8ISO8859P6', 201); {ISO 8859-6 Latin/Arabic} AddCodePage('IW8ISO8859P8', 201); {ISO 8859-8 Latin/Hebrew} AddCodePage('WE8ISO8859P9', 203); {ISO 8859-9 West European & Turkish} AddCodePage('LA8ISO6937', 204); {ISO 6937 8-bit Coded Character Set for Text Communication} AddCodePage('IW7IS960', 205); {Israeli Standard 960 7-bit Latin/Hebrew} AddCodePage('IW8MACHEBREW', 206); {Mac Client 8-bit Hebrew} AddCodePage('AR8ARABICMACT', 207); {Mac 8-bit Latin/Arabic} AddCodePage('TR8MACTURKISH', 208); {Mac Client 8-bit Turkish} AddCodePage('IW8MACHEBREWS', 209); {Mac Server 8-bit Hebrew} AddCodePage('TR8MACTURKISHS', 210); {Mac Server 8-bit Turkish} AddCodePage('TR8MSWIN1254', 211); {MS Windows Code Page 1254 8-bit Turkish} AddCodePage('IW8MSWIN1255', 212); {MS Windows Code Page 1255 8-bit Latin/Hebrew} AddCodePage('AR8MSWIN1256', 213); {MS Windows Code Page 1256 8-Bit Latin/Arabic} AddCodePage('IN8ISCII', 214); {Multiple-Script Indian Standard 8-bit Latin/Indian Languages} AddCodePage('AR8MUSSAD768', 215); {Mussa'd Alarabi/2 768 Server 8-bit Latin/Arabic} AddCodePage('AR8MUSSAD768T', 216); {Mussa'd Alarabi/2 768 8-bit Latin/Arabic} AddCodePage('AR8NAFITHA711', 217); {Nafitha Enhanced 711 Server 8-bit Latin/Arabic} AddCodePage('AR8NAFITHA711T', 218); {Nafitha Enhanced 711 8-bit Latin/Arabic} AddCodePage('AR8NAFITHA721', 219); {Nafitha International 721 Server 8-bit Latin/Arabic} AddCodePage('AR8NAFITHA721T', 220); {Nafitha International 721 8-bit Latin/Arabic} AddCodePage('AR8SAKHR706', 221); {SAKHR 706 Server 8-bit Latin/Arabic} AddCodePage('AR8SAKHR707', 222); {SAKHR 707 Server 8-bit Latin/Arabic} AddCodePage('AR8SAKHR707T', 223); {SAKHR 707 8-bit Latin/Arabic} AddCodePage('AR8XBASIC', 224); {XBASIC 8-bit Latin/Arabic} AddCodePage('WE8BS2000L5', 225); {Siemens EBCDIC.DF.04.L5 8-bit West European/Turkish}) AddCodePage('UTF8', 871, ceUTF8, zCP_UTF8); {Unicode 3.0 UTF-8 Universal character set, CESU-8 compliant} AddCodePage('UTFE', 227, ceUTF8, zCP_UTF8); {EBCDIC form of Unicode 3.0 UTF-8 Universal character set} *) //All supporteds from XE AddCodePage('US7ASCII', 1, ceAnsi, zCP_us_ascii); AddCodePage('US8PC437', 4, ceAnsi, zCP_DOS437); AddCodePage('WE8PC850', 10, ceAnsi, zCP_DOS850); AddCodePage('WE8PC858', 28, ceAnsi, zCP_DOS858); AddCodePage('WE8ISO8859P1', 31, ceAnsi, zCP_L1_ISO_8859_1); AddCodePage('EE8ISO8859P2', 32, ceAnsi, zCP_L2_ISO_8859_2); AddCodePage('SE8ISO8859P3', 33, ceAnsi, zCP_L3_ISO_8859_3); AddCodePage('NEE8ISO8859P4', 34, ceAnsi, zCP_L4_ISO_8859_4); AddCodePage('CL8ISO8859P5', 35, ceAnsi, zCP_L5_ISO_8859_5); AddCodePage('AR8ISO8859P6', 36, ceAnsi, zCP_L6_ISO_8859_6); AddCodePage('EL8ISO8859P7', 37, ceAnsi, zCP_L7_ISO_8859_7); AddCodePage('IW8ISO8859P8', 38, ceAnsi, zCP_L8_ISO_8859_8); AddCodePage('WE8ISO8859P9', 39, ceAnsi, zCP_L5_ISO_8859_9); AddCodePage('NE8ISO8859P10', 40, ceAnsi, zCP_L6_ISO_8859_10); AddCodePage('TH8TISASCII', 41, ceAnsi); AddCodePage('VN8MSWIN1258', 45, ceAnsi, zCP_WIN1258); AddCodePage('WE8ISO8859P15', 46, ceAnsi, zCP_L9_ISO_8859_15); AddCodePage('BLT8ISO8859P13', 47, ceAnsi, zCP_L7_ISO_8859_13); AddCodePage('CEL8ISO8859P14', 48, ceAnsi, zCP_L8_ISO_8859_14); AddCodePage('CL8KOI8U', 51, ceAnsi, zCP_KOI8U); AddCodePage('AZ8ISO8859P9E', 52, ceAnsi); AddCodePage('EE8PC852', 150, ceAnsi, zCP_DOS852); AddCodePage('RU8PC866', 152, ceAnsi, zCP_DOS866); AddCodePage('TR8PC857', 156, ceAnsi, zCP_DOS857); AddCodePage('EE8MSWIN1250', 170, ceAnsi, zCP_WIN1250); AddCodePage('CL8MSWIN1251', 171, ceAnsi, zCP_WIN1251); AddCodePage('ET8MSWIN923', 172, ceAnsi, zCP_MSWIN923); AddCodePage('EL8MSWIN1253', 174, ceAnsi, zCP_WIN1253); AddCodePage('IW8MSWIN1255', 175, ceAnsi, zCP_WIN1255); AddCodePage('LT8MSWIN921', 176, ceAnsi, zCP_MSWIN921); AddCodePage('TR8MSWIN1254', 177, ceAnsi, zCP_WIN1254); AddCodePage('WE8MSWIN1252', 178, ceAnsi, zCP_WIN1252); AddCodePage('BLT8MSWIN1257', 179, ceAnsi, zCP_WIN1257); AddCodePage('BLT8CP921', 191, ceAnsi, zCP_MSWIN921); AddCodePage('CL8KOI8R', 196, ceAnsi, zCP_KOI8R); AddCodePage('BLT8PC775', 197, ceAnsi, zCP_DOS775); AddCodePage('EL8PC737', 382, ceAnsi, zCP_DOS737); AddCodePage('AR8ASMO8X', 500, ceAnsi, zCP_DOS708); AddCodePage('AR8ADOS720', 558, ceAnsi, zCP_DOS720); AddCodePage('AR8MSWIN1256', 560, ceAnsi, zCP_WIN1256); AddCodePage('JA16EUC', 830, ceAnsi, zCP_euc_JP_win); AddCodePage('JA16SJIS', 832, ceAnsi, zCP_csISO2022JP); AddCodePage('JA16EUCTILDE', 837, ceAnsi); AddCodePage('JA16SJISTILDE', 838, ceAnsi); AddCodePage('KO16KSC5601', 840, ceAnsi, 601); AddCodePage('KO16MSWIN949', 846, ceAnsi, zCP_EUCKR); AddCodePage('ZHS16CGB231280', 850, ceAnsi, zCP_GB2312); AddCodePage('ZHS16GBK', 852, ceAnsi, zCP_GB2312); AddCodePage('ZHS32GB18030', 854, ceAnsi, zCP_GB18030); AddCodePage('ZHT32EUC', 860, ceAnsi, zCP_EUCKR); AddCodePage('ZHT16BIG5', 865, ceAnsi, zCP_Big5); AddCodePage('ZHT16MSWIN950', 867, ceAnsi, zCP_Big5); AddCodePage('ZHT16HKSCS', 868, ceAnsi); AddCodePage('UTF8', 871, ceUTF8, zCP_UTF8); AddCodePage('AL32UTF8', 873, ceUTF8, zCP_UTF8); AddCodePage('UTF16', 1000, ceUTF16, zCP_UTF16); AddCodePage('AL16UTF16', 2000, ceUTF16, zCP_UTF16); AddCodePage('AL16UTF16LE', 2002, ceUTF16, zCP_UTF16); end; procedure TZOracle9iPlainDriver.LoadApi; begin { ************** Load adresses of API Functions ************* } with Loader do begin @OCIInitialize := GetAddress('OCIInitialize'); @OCIEnvNlsCreate := GetAddress('OCIEnvNlsCreate'); @OCIServerAttach := GetAddress('OCIServerAttach'); @OCIServerDetach := GetAddress('OCIServerDetach'); @OCIServerRelease := GetAddress('OCIServerRelease'); @OCIServerVersion := GetAddress('OCIServerVersion'); @OCISessionBegin := GetAddress('OCISessionBegin'); @OCISessionEnd := GetAddress('OCISessionEnd'); @OCITransStart := GetAddress('OCITransStart'); @OCITransCommit := GetAddress('OCITransCommit'); @OCITransRollback := GetAddress('OCITransRollback'); @OCIPing := GetAddress('OCIPing'); @OCIPasswordChange := GetAddress('OCIPasswordChange'); @OCIClientVersion := GetAddress('OCIClientVersion'); @OCIHandleAlloc := GetAddress('OCIHandleAlloc'); @OCIHandleFree := GetAddress('OCIHandleFree'); @OCIErrorGet := GetAddress('OCIErrorGet'); @OCIAttrSet := GetAddress('OCIAttrSet'); @OCIAttrGet := GetAddress('OCIAttrGet'); @OCINlsNumericInfoGet := GetAddress('OCINlsNumericInfoGet'); {statement api} @OCIStmtPrepare := GetAddress('OCIStmtPrepare'); @OCIStmtPrepare2 := GetAddress('OCIStmtPrepare2'); @OCIStmtRelease := GetAddress('OCIStmtRelease'); @OCIStmtExecute := GetAddress('OCIStmtExecute'); @OCIParamGet := GetAddress('OCIParamGet'); @OCIStmtFetch := GetAddress('OCIStmtFetch'); @OCIStmtFetch2 := GetAddress('OCIStmtFetch2'); @OCIDefineByPos := GetAddress('OCIDefineByPos'); @OCIBindByPos := GetAddress('OCIBindByPos'); @OCIBindObject := GetAddress('OCIBindObject'); @OCIDefineObject := GetAddress('OCIDefineObject'); @OCIResultSetToStmt := GetAddress('OCIResultSetToStmt'); {descriptors} @OCIDescriptorAlloc := GetAddress('OCIDescriptorAlloc'); @OCIDescriptorFree := GetAddress('OCIDescriptorFree'); {Lob} @OCILobOpen := GetAddress('OCILobOpen'); @OCILobRead := GetAddress('OCILobRead'); @OCILobTrim := GetAddress('OCILobTrim'); @OCILobWrite := GetAddress('OCILobWrite'); @OCILobCreateTemporary := GetAddress('OCILobCreateTemporary'); @OCILobIsTemporary := GetAddress('OCILobIsTemporary'); @OCILobFreeTemporary := GetAddress('OCILobFreeTemporary'); @OCILobCharSetForm := GetAddress('OCILobCharSetForm'); @OCILobCharSetId := GetAddress('OCILobCharSetId'); @OCILobClose := GetAddress('OCILobClose'); {DateTime api} @OCIIntervalGetYearMonth := GetAddress('OCIIntervalGetYearMonth'); @OCIIntervalGetDaySecond := GetAddress('OCIIntervalGetDaySecond'); @OCIDateTimeConstruct := GetAddress('OCIDateTimeConstruct'); @OCIDateTimeGetDate := GetAddress('OCIDateTimeGetDate'); @OCIDateTimeGetTime := GetAddress('OCIDateTimeGetTime'); {object api} @OCITypeByRef := GetAddress('OCITypeByRef'); @OCIObjectNew := GetAddress('OCIObjectNew'); @OCIObjectPin := GetAddress('OCIObjectPin'); @OCIObjectUnpin := GetAddress('OCIObjectUnpin'); @OCIObjectFree := GetAddress('OCIObjectFree'); @OCIObjectGetTypeRef := GetAddress('OCIObjectGetTypeRef'); @OCIDescribeAny := GetAddress('OCIDescribeAny'); (* unused API @OracleAPI.OCIStmtGetPieceInfo := GetAddress('OCIStmtGetPieceInfo'); @OracleAPI.OCIStmtSetPieceInfo := GetAddress('OCIStmtSetPieceInfo'); @OracleAPI.OCIBreak := GetAddress('OCIBreak'); { For Oracle >= 8.1 } @OracleAPI.OCIReset := GetAddress('OCIReset'); @OracleAPI.OCITransDetach := GetAddress('OCITransDetach'); @OracleAPI.OCITransPrepare := GetAddress('OCITransPrepare'); @OracleAPI.OCITransForget := GetAddress('OCITransForget'); { > ori.h } @OracleAPI.OCIObjectUnmark := GetAddress('OCIObjectUnmark'); @OracleAPI.OCIObjectUnmarkByRef := GetAddress('OCIObjectUnmarkByRef'); @OracleAPI.OCIObjectMarkDeleteByRef := GetAddress('OCIObjectMarkDeleteByRef'); @OracleAPI.OCIObjectMarkDelete := GetAddress('OCIObjectMarkDelete'); @OracleAPI.OCIObjectFlush := GetAddress('OCIObjectFlush'); @OracleAPI.OCIObjectRefresh := GetAddress('OCIObjectRefresh'); @OracleAPI.OCIObjectCopy := GetAddress('OCIObjectCopy'); @OracleAPI.OCIObjectGetObjectRef := GetAddress('OCIObjectGetObjectRef'); @OracleAPI.OCIObjectMakeObjectRef := GetAddress('OCIObjectMakeObjectRef'); @OracleAPI.OCIObjectGetPrimaryKeyTypeRef := GetAddress('OCIObjectGetPrimaryKeyTypeRef'); @OracleAPI.OCIObjectGetInd := GetAddress('OCIObjectGetInd'); @OracleAPI.OCIObjectExists := GetAddress('OCIObjectExists'); @OracleAPI.OCIObjectGetProperty := GetAddress('OCIObjectGetProperty'); @OracleAPI.OCIObjectIsLocked := GetAddress('OCIObjectIsLocked'); @OracleAPI.OCIObjectIsDirty := GetAddress('OCIObjectIsDirty'); @OracleAPI.OCIObjectPinTable := GetAddress('OCIObjectPinTable'); @OracleAPI.OCIObjectArrayPin := GetAddress('OCIObjectArrayPin'); @OracleAPI.OCICacheFlush := GetAddress('OCICacheFlush'); @OracleAPI.OCICacheRefresh := GetAddress('OCICacheRefresh'); @OracleAPI.OCICacheUnpin := GetAddress('OCICacheUnpin'); @OracleAPI.OCICacheFree := GetAddress('OCICacheFree'); @OracleAPI.OCICacheUnmark := GetAddress('OCICacheUnmark'); @OracleAPI.OCIDurationBegin := GetAddress('OCIDurationBegin'); @OracleAPI.OCIDurationEnd := GetAddress('OCIDurationEnd'); { < ori.h } @OracleAPI.OCILobAppend := GetAddress('OCILobAppend'); @OracleAPI.OCILobAssign := GetAddress('OCILobAssign'); @OracleAPI.OCILobCopy := GetAddress('OCILobCopy'); @OracleAPI.OCILobEnableBuffering := GetAddress('OCILobEnableBuffering'); @OracleAPI.OCILobDisableBuffering := GetAddress('OCILobDisableBuffering'); @OracleAPI.OCILobErase := GetAddress('OCILobErase'); @OracleAPI.OCILobFileExists := GetAddress('OCILobFileExists'); @OracleAPI.OCILobFileGetName := GetAddress('OCILobFileGetName'); @OracleAPI.OCILobFileSetName := GetAddress('OCILobFileSetName'); @OracleAPI.OCILobFlushBuffer := GetAddress('OCILobFlushBuffer'); @OracleAPI.OCILobGetLength := GetAddress('OCILobGetLength'); @OracleAPI.OCILobLoadFromFile := GetAddress('OCILobLoadFromFile'); @OracleAPI.OCILobLocatorIsInit := GetAddress('OCILobLocatorIsInit'); { For Oracle >= 8.1 } @OracleAPI.OCILobIsOpen := GetAddress('OCILobIsOpen'); @OracleAPI.OCIDateTimeAssign := GetAddress('OCIDateTimeAssign'); @OracleAPI.OCIDateTimeCheck := GetAddress('OCIDateTimeCheck'); @OracleAPI.OCIDateTimeCompare := GetAddress('OCIDateTimeCompare'); @OracleAPI.OCIDateTimeConvert := GetAddress('OCIDateTimeConvert'); @OracleAPI.OCIDateTimeFromText := GetAddress('OCIDateTimeFromText'); @OracleAPI.OCIDateTimeGetTimeZoneOffset := GetAddress('OCIDateTimeGetTimeZoneOffset'); @OracleAPI.OCIDateTimeSysTimeStamp := GetAddress('OCIDateTimeSysTimeStamp'); @OracleAPI.OCIDateTimeToText := GetAddress('OCIDateTimeToText'); @OracleAPI.OCIDateTimeGetTimeZoneName := GetAddress('OCIDateTimeGetTimeZoneName'); { OCI Number mapping } @OracleAPI.OCINumberInc := GetAddress('OCINumberInc'); @OracleAPI.OCINumberDec := GetAddress('OCINumberDec'); @OracleAPI.OCINumberSetZero := GetAddress('OCINumberSetZero'); @OracleAPI.OCINumberSetPi := GetAddress('OCINumberSetPi'); @OracleAPI.OCINumberAdd := GetAddress('OCINumberAdd'); @OracleAPI.OCINumberSub := GetAddress('OCINumberSub'); @OracleAPI.OCINumberMul := GetAddress('OCINumberMul'); @OracleAPI.OCINumberDiv := GetAddress('OCINumberDiv'); @OracleAPI.OCINumberMod := GetAddress('OCINumberMod'); @OracleAPI.OCINumberIntPower := GetAddress('OCINumberIntPower'); @OracleAPI.OCINumberShift := GetAddress('OCINumberShift'); @OracleAPI.OCINumberNeg := GetAddress('OCINumberNeg'); @OracleAPI.OCINumberToText := GetAddress('OCINumberToText'); @OracleAPI.OCINumberFromText := GetAddress('OCINumberFromText'); @OracleAPI.OCINumberToInt := GetAddress('OCINumberToInt'); @OracleAPI.OCINumberFromInt := GetAddress('OCINumberFromInt'); @OracleAPI.OCINumberToReal := GetAddress('OCINumberToReal'); @OracleAPI.OCINumberToRealArray := GetAddress('OCINumberToRealArray'); @OracleAPI.OCINumberFromReal := GetAddress('OCINumberFromReal'); @OracleAPI.OCINumberCmp := GetAddress('OCINumberCmp'); @OracleAPI.OCINumberSign := GetAddress('OCINumberSign'); @OracleAPI.OCINumberIsZero := GetAddress('OCINumberIsZero'); @OracleAPI.OCINumberIsInt := GetAddress('OCINumberIsInt'); @OracleAPI.OCINumberAssign := GetAddress('OCINumberAssign'); @OracleAPI.OCINumberAbs := GetAddress('OCINumberAbs'); @OracleAPI.OCINumberCeil := GetAddress('OCINumberCeil'); @OracleAPI.OCINumberFloor := GetAddress('OCINumberFloor'); @OracleAPI.OCINumberSqrt := GetAddress('OCINumberSqrt'); @OracleAPI.OCINumberTrunc := GetAddress('OCINumberTrunc'); @OracleAPI.OCINumberPower := GetAddress('OCINumberPower'); @OracleAPI.OCINumberRound := GetAddress('OCINumberRound'); @OracleAPI.OCINumberPrec := GetAddress('OCINumberPrec'); @OracleAPI.OCINumberSin := GetAddress('OCINumberSin'); @OracleAPI.OCINumberArcSin := GetAddress('OCINumberArcSin'); @OracleAPI.OCINumberHypSin := GetAddress('OCINumberHypSin'); @OracleAPI.OCINumberCos := GetAddress('OCINumberCos'); @OracleAPI.OCINumberArcCos := GetAddress('OCINumberArcCos'); @OracleAPI.OCINumberHypCos := GetAddress('OCINumberHypCos'); @OracleAPI.OCINumberTan := GetAddress('OCINumberTan'); @OracleAPI.OCINumberArcTan := GetAddress('OCINumberArcTan'); @OracleAPI.OCINumberArcTan2 := GetAddress('OCINumberArcTan2'); @OracleAPI.OCINumberHypTan := GetAddress('OCINumberHypTan'); @OracleAPI.OCINumberExp := GetAddress('OCINumberExp'); @OracleAPI.OCINumberLn := GetAddress('OCINumberLn'); @OracleAPI.OCINumberLog := GetAddress('OCINumberLog'); @OracleAPI.OCITableSize := GetAddress('OCITableSize'); @OracleAPI.OCITableExists := GetAddress('OCITableExists'); @OracleAPI.OCITableDelete := GetAddress('OCITableDelete'); @OracleAPI.OCITableFirst := GetAddress('OCITableFirst'); @OracleAPI.OCITableLast := GetAddress('OCITableLast'); @OracleAPI.OCITableNext := GetAddress('OCITableNext'); @OracleAPI.OCITablePrev := GetAddress('OCITablePrev'); @OracleAPI.OCIObjectGetAttr := GetAddress('OCIObjectGetAttr'); @OracleAPI.OCIObjectSetAttr := GetAddress('OCIObjectSetAttr'); {ort.h} @OracleAPI.OCITypeIterNew := GetAddress('OCITypeIterNew'); @OracleAPI.OCITypeIterFree := GetAddress('OCITypeIterFree'); @OracleAPI.OCITypeByName := GetAddress('OCITypeByName'); @OracleAPI.OCITypeArrayByName := GetAddress('OCITypeArrayByName'); @OracleAPI.OCITypeArrayByRef := GetAddress('OCITypeArrayByRef'); @OracleAPI.OCITypeName := GetAddress('OCITypeName'); @OracleAPI.OCITypeSchema := GetAddress('OCITypeSchema'); @OracleAPI.OCITypeTypeCode := GetAddress('OCITypeTypeCode'); @OracleAPI.OCITypeCollTypeCode:= GetAddress('OCITypeCollTypeCode'); @OracleAPI.OCITypeVersion := GetAddress('OCITypeVersion'); @OracleAPI.OCITypeAttrs := GetAddress('OCITypeAttrs'); @OracleAPI.OCITypeMethods := GetAddress('OCITypeMethods'); @OracleAPI.OCITypeElemName := GetAddress('OCITypeElemName'); @OracleAPI.OCITypeElemTypeCode:= GetAddress('OCITypeElemTypeCode'); @OracleAPI.OCITypeElemType := GetAddress('OCITypeElemType'); @OracleAPI.OCITypeElemFlags := GetAddress('OCITypeElemFlags'); @OracleAPI.OCITypeElemNumPrec := GetAddress('OCITypeElemNumPrec'); @OracleAPI.OCITypeElemNumScale:= GetAddress('OCITypeElemNumScale'); @OracleAPI.OCITypeElemLength := GetAddress('OCITypeElemLength'); @OracleAPI.OCITypeElemCharSetID := GetAddress('OCITypeElemCharSetID'); @OracleAPI.OCITypeElemCharSetForm := GetAddress('OCITypeElemCharSetForm'); @OracleAPI.OCITypeElemParameterizedType := GetAddress('OCITypeElemParameterizedType'); @OracleAPI.OCITypeElemExtTypeCode := GetAddress('OCITypeElemExtTypeCode'); @OracleAPI.OCITypeAttrByName := GetAddress('OCITypeAttrByName'); @OracleAPI.OCITypeAttrNext := GetAddress('OCITypeAttrNext'); @OracleAPI.OCITypeCollElem := GetAddress('OCITypeCollElem'); @OracleAPI.OCITypeCollSize := GetAddress('OCITypeCollSize'); @OracleAPI.OCITypeCollExtTypeCode := GetAddress('OCITypeCollExtTypeCode'); @OracleAPI.OCITypeMethodOverload := GetAddress('OCITypeMethodOverload'); @OracleAPI.OCITypeMethodByName:= GetAddress('OCITypeMethodByName'); @OracleAPI.OCITypeMethodNext := GetAddress('OCITypeMethodNext'); @OracleAPI.OCITypeMethodName := GetAddress('OCITypeMethodName'); @OracleAPI.OCITypeMethodEncap := GetAddress('OCITypeMethodEncap'); @OracleAPI.OCITypeMethodFlags := GetAddress('OCITypeMethodFlags'); @OracleAPI.OCITypeMethodMap := GetAddress('OCITypeMethodMap'); @OracleAPI.OCITypeMethodOrder := GetAddress('OCITypeMethodOrder'); @OracleAPI.OCITypeMethodParams:= GetAddress('OCITypeMethodParams'); @OracleAPI.OCITypeResult := GetAddress('OCITypeResult'); @OracleAPI.OCITypeParamByPos := GetAddress('OCITypeParamByPos'); @OracleAPI.OCITypeParamByName := GetAddress('OCITypeParamByName'); @OracleAPI.OCITypeParamPos := GetAddress('OCITypeParamPos'); @OracleAPI.OCITypeElemParamMode := GetAddress('OCITypeElemParamMode'); @OracleAPI.OCITypeElemDefaultValue := GetAddress('OCITypeElemDefaultValue'); @OracleAPI.OCITypeVTInit := GetAddress('OCITypeVTInit'); @OracleAPI.OCITypeVTInsert := GetAddress('OCITypeVTInsert'); @OracleAPI.OCITypeVTSelect := GetAddress('OCITypeVTSelect');*) end; end; function TZOracle9iPlainDriver.Clone: IZPlainDriver; begin Result := TZOracle9iPlainDriver.Create; end; constructor TZOracle9iPlainDriver.Create; begin inherited create; FLoader := TZNativeLibraryLoader.Create([]); {$IFNDEF UNIX} FLoader.AddLocation(WINDOWS_DLL_LOCATION); {$ELSE} FLoader.AddLocation(LINUX_DLL_LOCATION); {$ENDIF} LoadCodePages; end; function TZOracle9iPlainDriver.GetProtocol: string; begin Result := 'oracle-9i'; end; function TZOracle9iPlainDriver.GetDescription: string; begin Result := 'Native Plain Driver for Oracle 9i'; end; {** from ociap.h OCIInitialize() Name OCI Process Initialize Purpose Initializes the OCI process environment. Syntax sword OCIInitialize ( ub4 mode, const void *ctxp, const void *(*malocfp) ( void *ctxp, size_t size ), const void *(*ralocfp) ( void *ctxp, void *memp, size_t newsize ), const void (*mfreefp) ( void *ctxp, void *memptr )); Comments This call initializes the OCI process environment. OCIInitialize() must be invoked before any other OCI call. Parameters mode (IN) - specifies initialization of the mode. The valid modes are: OCI_DEFAULT - default mode. OCI_THREADED - threaded environment. In this mode, internal data structures are protected from concurrent accesses by multiple threads. OCI_OBJECT - will use navigational object interface. ctxp (IN) - user defined context for the memory call back routines. malocfp (IN) - user-defined memory allocation function. If mode is OCI_THREADED, this memory allocation routine must be thread safe. ctxp - context pointer for the user-defined memory allocation function. size - size of memory to be allocated by the user-defined memory allocation function ralocfp (IN) - user-defined memory re-allocation function. If mode is OCI_THREADED, this memory allocation routine must be thread safe. ctxp - context pointer for the user-defined memory reallocation function. memp - pointer to memory block newsize - new size of memory to be allocated mfreefp (IN) - user-defined memory free function. If mode is OCI_THREADED, this memory free routine must be thread safe. ctxp - context pointer for the user-defined memory free function. memptr - pointer to memory to be freed Example See the description of OCIStmtPrepare() on page 13-96 for an example showing the use of OCIInitialize(). Related Functions } procedure TZOracle9iPlainDriver.Initialize(const Location: String); begin inherited Initialize(Location); OCIInitialize(OCI_THREADED, nil, nil, nil, nil); end; {** from ociap.h OCIEnvNlsCreate() Name OCI ENVironment CREATE with NLS info Purpose This function does almost everything OCIEnvCreate does, plus enabling setting of charset and ncharset programmatically, except OCI_UTF16 mode. Syntax sword OCIEnvNlsCreate(OCIEnv **envhpp, ub4 mode, void *ctxp, void *(*malocfp) (void *ctxp, size_t size), void *(*ralocfp) (void *ctxp, void *memptr, size_t newsize), void (*mfreefp) (void *ctxp, void *memptr), size_t xtramemsz, void **usrmempp, ub2 charset, ub2 ncharset) Comments The charset and ncharset must be both zero or non-zero. The parameters have the same meaning as the ones in OCIEnvCreate(). When charset or ncharset is non-zero, the corresponding character set will be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover, OCI_UTF16ID is allowed to be set as charset and ncharset. On the other hand, OCI_UTF16 mode is deprecated with this function. Applications can achieve the same effects by setting both charset and ncharset as OCI_UTF16ID. } function TZOracle9iPlainDriver.EnvNlsCreate(var envhpp: POCIEnv; mode: ub4; ctxp: Pointer; malocfp: Pointer; ralocfp: Pointer; mfreefp: Pointer; xtramemsz: size_T; usrmempp: PPointer; charset, ncharset: ub2): sword; begin Result := OCIEnvNlsCreate(envhpp, mode, ctxp, malocfp, ralocfp, mfreefp, xtramemsz, usrmempp, charset, ncharset); end; {** from ociap.h OCIServerAttach() Name OCI ATtaCH to server Purpose Creates an access path to a data source for OCI operations. Syntax sword OCIServerAttach ( OCIServer *srvhp, OCIError *errhp, const OraText *dblink, sb4 dblink_len, ub4 mode); Comments This call is used to create an association between an OCI application and a particular server. This call initializes a server context handle, which must have been previously allocated with a call to OCIHandleAlloc(). The server context handle initialized by this call can be associated with a service context through a call to OCIAttrSet(). Once that association has been made, OCI operations can be performed against the server. If an application is operating against multiple servers, multiple server context handles can be maintained. OCI operations are performed against whichever server context is currently associated with the service context. Parameters srvhp (IN/OUT) - an uninitialized server context handle, which gets initialized by this call. Passing in an initialized server handle causes an error. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. dblink (IN) - specifies the database (server) to use. This parameter points to a character string which specifies a connect string or a service point. If the connect string is NULL, then this call attaches to the default host. The length of connstr is specified in connstr_len. The connstr pointer may be freed by the caller on return. dblink_len (IN) - the length of the string pointed to by connstr. For a valid connect string name or alias, connstr_len must be non-zero. mode (IN) - specifies the various modes of operation. For release 8.0, pass as OCI_DEFAULT - in this mode, calls made to the server on this server context are made in blocking mode. Example See the description of OCIStmtPrepare() on page 13-96 for an example showing the use of OCIServerAttach(). Related Functions OCIServerDetach() } function TZOracle9iPlainDriver.ServerAttach(srvhp: POCIServer; errhp: POCIError; dblink: text; dblink_len: sb4; mode: ub4): sword; begin Result := OCIServerAttach(srvhp, errhp, dblink, dblink_len, mode); end; {** from ociap.h OCIServerDetach() Name OCI DeTaCH server Purpose Deletes an access to a data source for OCI operations. Syntax sword OCIServerDetach ( OCIServer *svrhp, OCIError *errhp, ub4 mode); Comments This call deletes an access to data source for OCI operations, which was established by a call to OCIServerAttach(). Parameters srvhp (IN) - a handle to an initialized server context, which gets reset to uninitialized state. The handle is not de-allocated. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. mode (IN) - specifies the various modes of operation. The only valid mode is OCI_DEFAULT for the default mode. Related Functions OCIServerAttach() } function TZOracle9iPlainDriver.ServerDetach(srvhp: POCIServer; errhp: POCIError; mode: ub4): sword; begin Result := OCIServerDetach(srvhp, errhp, mode); end; function TZOracle9iPlainDriver.ServerRelease(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1; version:pointer): sword; begin Result := OCI_ERROR; if (@OCIServerRelease <> nil) then Result := OCIServerRelease(hndlp, errhp, bufp, bufsz, hndltype, version); end; {** from ociap.h OCIServerVersion() Name OCI VERSion Purpose Returns the version string of the Oracle server. Syntax sword OCIServerVersion ( void *hndlp, OCIError *errhp, OraText *bufp, ub4 bufsz ub1 hndltype ); Comments This call returns the version string of the Oracle server. For example, the following might be returned as the version string if your application is running against a 7.3.2 server: Oracle7 Server Release 7.3.2.0.0 - Production Release PL/SQL Release 2.3.2.0.0 - Production CORE Version 3.5.2.0.0 - Production TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production NLSRTL Version 3.2.2.0.0 - Production Parameters hndlp (IN) - the service context handle or the server context handle. errhp (IN) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. bufp (IN) - the buffer in which the version information is returned. bufsz (IN) - the length of the buffer. hndltype (IN) - the type of handle passed to the function. Related Functions } function TZOracle9iPlainDriver.ServerVersion(hndlp: POCIHandle; errhp: POCIError; bufp: text; bufsz: ub4; hndltype: ub1): sword; begin Result := OCIServerVersion(hndlp, errhp, bufp, bufsz, hndltype); end; {** from ociap.h OCISessionBegin() Name OCI Session Begin and authenticate user Purpose Creates a user authentication and begins a user session for a given server. Syntax sword OCISessionBegin ( OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp, ub4 credt, ub4 mode); Comments For Oracle8, OCISessionBegin() must be called for any given server handle before requests can be made against it. Also, OCISessionBegin() only supports authenticating the user for access to the Oracle server specified by the server handle in the service context. In other words, after OCIServerAttach() is called to initialize a server handle, OCISessionBegin() must be called to authenticate the user for that given server. When OCISessionBegin() is called for the first time for the given server handle, the initialized authentication handle is called a primary authentication context. A primary authentication context may not be created with the OCI_MIGRATE mode. Also, only one primary authentication context can be created for a given server handle and the primary authentication context c an only ever be used with that server handle. If the primary authentication context is set in a service handle with a different server handle, then an error will result. After OCISessionBegin() has been called for the server handle, and the primary authentication context is set in the service handle, OCISessionBegin() may be called again to initialize another authentication handle with different (or the same) credentials. When OCISessionBegin() is called with a service handle set with a primary authentication context, the returned authentication context in authp is called a user authentication context. As many user authentication contexts may be initialized as desired. User authentication contexts may be created with the OCI_MIGRATE mode. If the OCI_MIGRATE mode is not specified, then the user authentication context can only ever be used with the same server handle set in svchp. If OCI_MIGRATE mode is specified, then the user authentication may be set with different server handles. However, the user authentication context is restricted to use with only server handles which resolve to the same database instance and that have equivalent primary authentication contexts. Equivalent authentication contexts are those which were authenticated as the same database user. OCI_SYSDBA, OCI_SYSOPER, OCI_SYSASM, and OCI_PRELIM_AUTH may only be used with a primary authentication context. To provide credentials for a call to OCISessionBegin(), one of two methods are supported. The first is to provide a valid username and password pair for database authentication in the user authentication handle passed to OCISessionBegin(). This involves using OCIAttrSet() to set the OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the authentication handle. Then OCISessionBegin() is called with OCI_CRED_RDBMS. Note: When the authentication handle is terminated using OCISessionEnd(), the username and password attributes remain unchanged and thus can be re-used in a future call to OCISessionBegin(). Otherwise, they must be reset to new values before the next OCISessionBegin() call. The second type of credentials supported are external credentials. No attributes need to be set on the authentication handle before calling OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent to the Oracle7 `connect /' syntax. If values have been set for OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are ignored if OCI_CRED_EXT is used. Parameters svchp (IN) - a handle to a service context. There must be a valid server handle set in svchp. errhp (IN) - an error handle to the retrieve diagnostic information. usrhp (IN/OUT) - a handle to an authentication context, which is initialized by this call. credt (IN) - specifies the type of credentials to use for authentication. Valid values for credt are: OCI_CRED_RDBMS - authenticate using a database username and password pair as credentials. The attributes OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD should be set on the authentication context before this call. OCI_CRED_EXT - authenticate using external credentials. No username or password is provided. mode (IN) - specifies the various modes of operation. Valid modes are: OCI_DEFAULT - in this mode, the authentication context returned may only ever be set with the same server context specified in svchp. This establishes the primary authentication context. OCI_MIGRATE - in this mode, the new authentication context may be set in a service handle with a different server handle. This mode establishes the user authentication context. OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA access. OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER access. OCI_SYSASM - in this mode, the user is authenticated for SYSASM access. Note that only an ASM instance can grant SYSASM access. OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA, OCI_SYSASM, or OCI_SYSOPER to authenticate for certain administration tasks. Related Functions OCISessionEnd() } function TZOracle9iPlainDriver.SessionBegin(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; credt, mode: ub4): sword; begin Result := OCISessionBegin(svchp, errhp, usrhp, credt, mode); end; {** from ociap.h OCISessionEnd() Name OCI Terminate user Authentication Context Purpose Terminates a user authentication context created by OCISessionBegin() Syntax sword OCISessionEnd ( OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp, ub4 mode); Comments The user security context associated with the service context is invalidated by this call. Storage for the authentication context is not freed. The transaction specified by the service context is implicitly committed. The transaction handle, if explicitly allocated, may be freed if not being used. Resources allocated on the server for this user are freed. The authentication handle may be reused in a new call to OCISessionBegin(). Parameters svchp (IN/OUT) - the service context handle. There must be a valid server handle and user authentication handle associated with svchp. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, the user in the service context handle is de-authenticated. mode (IN) - the only valid mode is OCI_DEFAULT. Example In this example, an authentication context is destroyed. Related Functions OCISessionBegin() } function TZOracle9iPlainDriver.SessionEnd(svchp: POCISvcCtx; errhp: POCIError; usrhp: POCISession; mode: ub4): sword; begin Result := OCISessionEnd(svchp, errhp, usrhp, mode); end; {** from ociap.h OCITransStart() Name OCI TX (transaction) STart Purpose Sets the beginning of a transaction. Syntax sword OCITransStart ( OCISvcCtx *svchp, OCIError *errhp, uword timeout, ub4 flags); Comments This function sets the beginning of a global or serializable transaction. The transaction context currently associated with the service context handle is initialized at the end of the call if the flags parameter specifies that a new transaction should be started. The XID of the transaction is set as an attribute of the transaction handle (OCI_ATTR_XID) Parameters svchp (IN/OUT) - the service context handle. The transaction context in the service context handle is initialized at the end of the call if the flag specified a new transaction to be started. errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in err and this function returns OCI_ERROR. Diagnostic information can be obtained by calling OCIErrorGet(). timeout (IN) - the time, in seconds, to wait for a transaction to become available for resumption when OCI_TRANS_RESUME is specified. When OCI_TRANS_NEW is specified, this value is stored and may be used later by OCITransDetach(). flags (IN) - specifies whether a new transaction is being started or an existing transaction is being resumed. Also specifies serializiability or read-only status. More than a single value can be specified. By default, a read/write transaction is started. The flag values are: OCI_TRANS_NEW - starts a new transaction branch. By default starts a tightly coupled and migratable branch. OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch OCI_TRANS_LOOSE - specifies a loosely coupled branch OCI_TRANS_RESUME - resumes an existing transaction branch. OCI_TRANS_READONLY - start a readonly transaction OCI_TRANS_SERIALIZABLE - start a serializable transaction Related Functions OCITransDetach() } function TZOracle9iPlainDriver.TransStart(svchp: POCISvcCtx; errhp: POCIError; timeout: word; flags: ub4): sword; begin Result := OCITransStart(svchp, errhp, timeout, flags); end; function TZOracle9iPlainDriver.TransRollback(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; begin Result := OCITransRollback(svchp, errhp, flags); end; {** from ociap.h OCITransCommit() Name OCI TX (transaction) CoMmit Purpose Commits the transaction associated with a specified service context. Syntax sword OCITransCommit ( OCISvcCtx *srvcp, OCIError *errhp, ub4 flags ); Comments The transaction currently associated with the service context is committed. If it is a distributed transaction that the server cannot commit, this call additionally retrieves the state of the transaction from the database to be returned to the user in the error handle. If the application has defined multiple transactions, this function operates on the transaction currently associated with the service context. If the application is working with only the implicit local transaction created when database changes are made, that implicit transaction is committed. If the application is running in the object mode, then the modified or updated objects in the object cache for this transaction are also committed. The flags parameter is used for one-phase commit optimization in distributed transactions. If the transaction is non-distributed, the flags parameter is ignored, and OCI_DEFAULT can be passed as its value. OCI applications managing global transactions should pass a value of OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The default is one-phase commit. Under normal circumstances, OCITransCommit() returns with a status indicating that the transaction has either been committed or rolled back. With distributed transactions, it is possible that the transaction is now in-doubt (i.e., neither committed nor aborted). In this case, OCITransCommit() attempts to retrieve the status of the transaction from the server. The status is returned. Parameters srvcp (IN) - the service context handle. errhp (IN) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. flags -see the "Comments" section above. Related Functions OCITransRollback() *} function TZOracle9iPlainDriver.TransCommit(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; begin Result := OCITransCommit(svchp, errhp, flags); end; function TZOracle9iPlainDriver.Ping(svchp: POCISvcCtx; errhp: POCIError; mode: ub4 = OCI_DEFAULT): sword; begin Result := OCIPing(svchp, errhp, mode); end; {** from ociap.h OCIPasswordChange() Name OCI Change PassWord Purpose This call allows the password of an account to be changed. Syntax sword OCIPasswordChange ( OCISvcCtx *svchp, OCIError *errhp, const OraText *user_name, ub4 usernm_len, const OraText *opasswd, ub4 opasswd_len, const OraText *npasswd, sb4 npasswd_len, ub4 mode); Comments This call allows the password of an account to be changed. This call is similar to OCISessionBegin() with the following differences: If the user authentication is already established, it authenticates the account using the old password and then changes the password to the new password If the user authentication is not established, it establishes a user authentication and authenticates the account using the old password, then changes the password to the new password. This call is useful when the password of an account is expired and OCISessionBegin() returns an error or warning which indicates that the password has expired. Parameters svchp (IN/OUT) - a handle to a service context. The service context handle must be initialized and have a server context handle associated with it. errhp (IN) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. user_name (IN) - specifies the user name. It points to a character string, whose length is specified in usernm_len. This parameter must be NULL if the service context has been initialized with an authentication handle. usernm_len (IN) - the length of the user name string specified in user_name. For a valid user name string, usernm_len must be non-zero. opasswd (IN) - specifies the user's old password. It points to a character string, whose length is specified in opasswd_len . opasswd_len (IN) - the length of the old password string specified in opasswd. For a valid password string, opasswd_len must be non-zero. npasswd (IN) - specifies the user's new password. It points to a character string, whose length is specified in npasswd_len which must be non-zero for a valid password string. If the password complexity verification routine is specified in the user's profile to verify the new password's complexity, the new password must meet the complexity requirements of the verification function. npasswd_len (IN) - then length of the new password string specified in npasswd. For a valid password string, npasswd_len must be non-zero. mode - pass as OCI_DEFAULT. Related Functions OCISessionBegin() } function TZOracle9iPlainDriver.PasswordChange(svchp: POCISvcCtx; errhp: POCIError; user_name: text; usernm_len: ub4; opasswd: text; opasswd_len: ub4; npasswd: text; npasswd_len: sb4; mode: ub4): sword; begin Result := OCIPasswordChange(svchp, errhp, user_name, usernm_len, opasswd, opasswd_len, npasswd, npasswd_len, mode); end; procedure TZOracle9iPlainDriver.ClientVersion(major_version, minor_version, update_num, patch_num, port_update_num: psword); begin OCIClientVersion(major_version, minor_version, update_num, patch_num, port_update_num); end; (** from ociap.h OCIHandleAlloc() Name OCI Get HaNDLe Purpose This call returns a pointer to an allocated and initialized handle. Syntax sword OCIHandleAlloc ( const void *parenth, void **hndlpp, ub4 type, size_t xtramem_sz, void **usrmempp); Comments Returns a pointer to an allocated and initialized structure, corresponding to the type specified in type. A non-NULL handle is returned on success. Bind handle and define handles are allocated with respect to a statement handle. All other handles are allocated with respect to an environment handle which is passed in as a parent handle. No diagnostics are available on error. This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs. Handles must be allocated using OCIHandleAlloc() before they can be passed into an OCI call. Parameters parenth (IN) - an environment or a statement handle. hndlpp (OUT) - returns a handle to a handle type. type (IN) - specifies the type of handle to be allocated. The specific types are: OCI_HTYPE_ERROR - specifies generation of an error report handle of C type OCIError OCI_HTYPE_SVCCTX - specifies generation of a service context handle of C type OCISvcCtx OCI_HTYPE_STMT - specifies generation of a statement (application request) handle of C type OCIStmt OCI_HTYPE_BIND - specifies generation of a bind information handle of C type OCIBind OCI_HTYPE_DEFINE - specifies generation of a column definition handle of C type OCIDefine OCI_HTYPE_DESCRIBE - specifies generation of a select list description handle of C type OCIDesc OCI_HTYPE_SERVER - specifies generation of a server context handle of C type OCIServer OCI_HTYPE_SESSION - specifies generation of an authentication context handle of C type OCISession OCI_HTYPE_TRANS - specifies generation of a transaction context handle of C type OCITrans OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex object retrieval handle of C type OCIComplexObject OCI_HTYPE_SECURITY - specifies generation of a security handle of C type OCISecurity xtramem_sz (IN) - specifies an amount of user memory to be allocated. usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz allocated by the call for the user. Related Functions OCIHandleFree() *) function TZOracle9iPlainDriver.HandleAlloc(parenth: POCIHandle; var hndlpp: POCIHandle; atype: ub4; xtramem_sz: size_T; usrmempp: PPointer): sword; begin Result := OCIHandleAlloc(parenth, hndlpp, atype, xtramem_sz, usrmempp); end; (** from ociap.h OCIHandleFree() Name OCI Free HaNDLe Purpose This call explicitly deallocates a handle. Syntax sword OCIHandleFree ( void *hndlp, ub4 type); Comments This call frees up storage associated with a handle, corresponding to the type specified in the type parameter. This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE. All handles must be explicitly deallocated. OCI will not deallocate a child handle if the parent is deallocated. Parameters hndlp (IN) - an opaque pointer to some storage. type (IN) - specifies the type of storage to be allocated. The specific types are: OCI_HTYPE_ENV - an environment handle OCI_HTYPE_ERROR - an error report handle OCI_HTYPE_SVCCTX - a service context handle OCI_HTYPE_STMT - a statement (application request) handle OCI_HTYPE_BIND - a bind information handle OCI_HTYPE_DEFINE - a column definition handle OCI_HTYPE_DESCRIBE - a select list description handle OCI_HTYPE_SERVER - a server handle OCI_HTYPE_SESSION - a user authentication handle OCI_HTYPE_TRANS - a transaction handle OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle OCI_HTYPE_SECURITY - a security handle Related Functions OCIHandleAlloc() *) function TZOracle9iPlainDriver.HandleFree(hndlp: Pointer; atype: ub4): sword; begin Result := OCIHandleFree(hndlp, atype); end; {** from ociap.h OCIErrorGet() Name OCI Get Diagnostic Record Purpose Returns an error message in the buffer provided and an ORACLE error. Syntax sword OCIErrorGet ( void *hndlp, ub4 recordno, OraText *sqlstate, ub4 *errcodep, OraText *bufp, ub4 bufsiz, ub4 type ); Comments Returns an error message in the buffer provided and an ORACLE error. Currently does not support SQL state. This call can be called a multiple number of times if there are more than one diagnostic record for an error. The error handle is originally allocated with a call to OCIHandleAlloc(). Parameters hndlp (IN) - the error handle, in most cases, or the environment handle (for errors on OCIEnvInit(), OCIHandleAlloc()). recordno (IN) - indicates the status record from which the application seeks info. Starts from 1. sqlstate (OUT) - Not supported in Version 8.0. errcodep (OUT) - an ORACLE Error is returned. bufp (OUT) - the error message text is returned. bufsiz (IN) - the size of the buffer provide to get the error message. type (IN) - the type of the handle. Related Functions OCIHandleAlloc() } function TZOracle9iPlainDriver.ErrorGet(hndlp: Pointer; recordno: ub4; sqlstate: text; var errcodep: sb4; bufp: text; bufsiz, atype: ub4): sword; begin Result := OCIErrorGet(hndlp, recordno, sqlstate, errcodep, bufp, bufsiz, atype); end; {** from ociap.h OCIAttrSet() Name OCI Attribute Set Purpose This call is used to set a particular attribute of a handle or a descriptor. Syntax sword OCIAttrSet ( void *trgthndlp, ub4 trghndltyp, void *attributep, ub4 size, ub4 attrtype, OCIError *errhp ); Comments This call is used to set a particular attribute of a handle or a descriptor. See Appendix B for a list of handle types and their writeable attributes. Parameters trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets modified. trghndltyp (IN/OUT) - is the handle type. attributep (IN) - a pointer to an attribute value. The attribute value is copied into the target handle. If the attribute value is a pointer, then only the pointer is copied, not the contents of the pointer. size (IN) - is the size of an attribute value. This can be passed in as 0 for most attributes as the size is already known by the OCI library. For text* attributes, a ub4 must be passed in set to the length of the string. attrtype (IN) - the type of attribute being set. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. Related Functions OCIAttrGet() } function TZOracle9iPlainDriver.AttrSet(trgthndlp: POCIHandle; trghndltyp: ub4; attributep: Pointer; size, attrtype: ub4; errhp: POCIError): sword; begin Result := OCIAttrSet(trgthndlp, trghndltyp, attributep, size, attrtype, errhp); end; {** from ociap.h OCIAttrGet() Name OCI Attribute Get Purpose This call is used to get a particular attribute of a handle. Syntax sword OCIAttrGet ( const void *trgthndlp, ub4 trghndltyp, void *attributep, ub4 *sizep, ub4 attrtype, OCIError *errhp ); Comments This call is used to get a particular attribute of a handle. See Appendix B, "Handle Attributes", for a list of handle types and their readable attributes. Parameters trgthndlp (IN) - is the pointer to a handle type. trghndltyp (IN) - is the handle type. attributep (OUT) - is a pointer to the storage for an attribute value. The attribute value is filled in. sizep (OUT) - is the size of the attribute value. This can be passed in as NULL for most parameters as the size is well known. For text* parameters, a pointer to a ub4 must be passed in to get the length of the string. attrtype (IN) - is the type of attribute. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. Related Functions OCIAttrSet() } function TZOracle9iPlainDriver.AttrGet(trgthndlp: POCIHandle; trghndltyp: ub4; attributep, sizep: Pointer; attrtype: ub4; errhp: POCIError): sword; begin Result := OCIAttrGet(trgthndlp, trghndltyp, attributep, sizep, attrtype, errhp); end; {** from ociap.h NAME OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle REMARKS This function generates numeric language information specified by item from OCI environment handle envhp into an output number variable. RETURNS OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item. envhp(IN/OUT) OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE. errhp(IN/OUT) The OCI error handle. If there is an error, it is record in errhp and this function returns a NULL pointer. Diagnostic information can be obtained by calling OCIErrorGet(). val(OUT) Pointer to the output number variable. On OCI_SUCCESS return, it will contain the requested NLS numeric info. item(IN) It specifies to get which item in OCI environment handle and can be one of following values: OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI environment or session handle charset OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset; 0 for variable-width charset } function TZOracle9iPlainDriver.NlsNumericInfoGet(envhp: POCIEnv; errhp: POCIError; val: psb4; item: ub2): sword; begin Result := OCINlsNumericInfoGet(envhp, errhp, val, item); end; {** from ociap.h OCIStmtPrepare() Name OCI Statement REQuest Purpose This call defines the SQL/PLSQL statement to be executed. Syntax sword OCIStmtPrepare ( OCIStmt *stmtp, OCIError *errhp, const OraText *stmt, ub4 stmt_len, ub4 language, ub4 mode); Comments This call is used to prepare a SQL or PL/SQL statement for execution. The OCIStmtPrepare() call defines an application request. This is a purely local call. Data values for this statement initialized in subsequent bind calls will be stored in a bind handle which will hang off this statement handle. This call does not create an association between this statement handle and any particular server. See the section "Preparing Statements" on page 2-21 for more information about using this call. Parameters stmtp (IN) - a statement handle. errhp (IN) - an error handle to retrieve diagnostic information. stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated string. The pointer to the OraText of the statement must be available as long as the statement is executed. stmt_len (IN) - length of the statement. Must not be zero. language (IN) - V7, V8, or native syntax. Possible values are: OCI_V7_SYNTAX - V7 ORACLE parsing syntax OCI_V8_SYNTAX - V8 ORACLE parsing syntax OCI_NTV_SYNTAX - syntax depending upon the version of the server. mode (IN) - the only defined mode is OCI_DEFAULT for default mode. Example This example demonstrates the use of OCIStmtPrepare(), as well as the OCI application initialization calls. Related Functions OCIAttrGet(), OCIStmtExecute() } function TZOracle9iPlainDriver.StmtPrepare(stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len, language, mode: ub4): sword; begin Result := OCIStmtPrepare(stmtp, errhp, stmt, stmt_len, language, mode); end; {** from ociap.h OCIStmtPrepare2() Name OCI Statement REQuest with (a) early binding to svchp and/or (b) stmt caching Purpose This call defines the SQL/PLSQL statement to be executed. Syntax sword OCIStmtPrepare2 ( OCISvcCtx *svchp, OCIStmt **stmtp, OCIError *errhp, const OraText *stmt, ub4 stmt_len, const OraText *key, ub4 key_len, ub4 language, ub4 mode); Comments This call is used to prepare a SQL or PL/SQL statement for execution. The OCIStmtPrepare() call defines an application request. This is a purely local call. Data values for this statement initialized in subsequent bind calls will be stored in a bind handle which will hang off this statement handle. This call creates an association between the statement handle and a service context. It differs from OCIStmtPrepare in that respect.It also supports stmt caching. The stmt will automatically be cached if the authp of the stmt has enabled stmt caching. Parameters svchp (IN) - the service context handle that contains the session that this stmt handle belongs to. stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated and prepared statement handle will be returned. errhp (IN) - an error handle to retrieve diagnostic information. stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null- terminated string. The pointer to the OraText of the statement must be available as long as the statement is executed. stmt_len (IN) - length of the statement. Must not be zero. key (IN) - This is only Valid for OCI Stmt Caching. It indicates the key to search with. It thus optimizes the search in the cache. key_len (IN) - the length of the key. This, too, is onlly valid for stmt caching. language (IN) - V7, V8, or native syntax. Possible values are: OCI_V7_SYNTAX - V7 ORACLE parsing syntax OCI_V8_SYNTAX - V8 ORACLE parsing syntax OCI_NTV_SYNTAX - syntax depending upon the version of the server. mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY. Example Related Functions OCIStmtExecute(), OCIStmtRelease() } function TZOracle9iPlainDriver.StmtPrepare2(svchp: POCISvcCtx; var stmtp: POCIStmt; errhp: POCIError; stmt: text; stmt_len: ub4; key: text; key_len: ub4; language:ub4; mode: ub4): sword; begin Result := OCIStmtPrepare2(svchp, stmtp, errhp, stmt, stmt_len, key, key_len, language, mode); end; {** from ociap.h OCIStmtRelease() Name OCI Statement Release. This call is used to relesae the stmt that was retreived using OCIStmtPrepare2(). If the stmt is release using this call, OCIHandleFree() must not be called on the stmt handle. Purpose This call releases the statement obtained by OCIStmtPrepare2 Syntax sword OCIStmtRelease ( OCIStmt *stmtp, OCIError *errhp, cONST OraText *key, ub4 key_len, ub4 mode); Comments This call is used to release a handle obtained via OCIStmtPrepare2(). It also frees the memory associated with the handle. This is a purely local call. Parameters stmtp (IN/OUT) - The statement handle to be released/freed. errhp (IN) - an error handle to retrieve diagnostic information. key (IN) - This is only Valid for OCI Stmt Caching. It indicates the key to tag the stmt with. key_len (IN) - the length of the key. This, too, is only valid for stmt caching. mode (IN) - the defined modes are OCI_DEFAULT for default mode and OCI_STRLS_CACHE_DELETE (only used for Stmt Caching). Example Related Functions OCIStmtExecute(), OCIStmtPrepare2() } function TZOracle9iPlainDriver.StmtRelease(stmtp: POCIStmt; errhp: POCIError; key: text; key_len: ub4; mode: ub4): sword; begin Result := OCIStmtRelease(stmtp, errhp, key, key_len, mode); end; {** from ociap.h OCIStmtExecute() Name OCI EXECute Purpose This call associates an application request with a server. Syntax sword OCIStmtExecute ( OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, ub4 iters, ub4 rowoff, const OCISnapshot *snap_in, OCISnapshot *snap_out, ub4 mode ); Comments This function is used to execute a prepared SQL statement. Using an execute call, the application associates a request with a server. On success, OCI_SUCCESS is returned. If a SELECT statement is executed, the description of the select list follows implicitly as a response. This description is buffered on the client side for describes, fetches and define type conversions. Hence it is optimal to describe a select list only after an execute. Also for SELECT statements, some results are available implicitly. Rows will be received and buffered at the end of the execute. For queries with small row count, a prefetch causes memory to be released in the server if the end of fetch is reached, an optimization that may result in memory usage reduction. Set attribute call has been defined to set the number of rows to be prefetched per result set. For SELECT statements, at the end of the execute, the statement handle implicitly maintains a reference to the service context on which it is executed. It is the user's responsibility to maintain the integrity of the service context. If the attributes of a service context is changed for executing some operations on this service context, the service context must be restored to have the same attributes, that a statement was executed with, prior to a fetch on the statement handle. The implicit reference is maintained until the statement handle is freed or the fetch is cancelled or an end of fetch condition is reached. Note: If output variables are defined for a SELECT statement before a call to OCIStmtExecute(), the number of rows specified by iters will be fetched directly into the defined output buffers and additional rows equivalent to the prefetch count will be prefetched. If there are no additional rows, then the fetch is complete without calling OCIStmtFetch(). The execute call will return errors if the statement has bind data types that are not supported in an Oracle7 server. Parameters svchp (IN/OUT) - service context handle. stmtp (IN/OUT) - an statement handle - defines the statement and the associated data to be executed at the server. It is invalid to pass in a statement handle that has bind of data types only supported in release 8.0 when srvchp points to an Oracle7 server. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. If the statement is being batched and it is successful, then this handle will contain this particular statement execution specific errors returned from the server when the batch is flushed. iters (IN) - the number of times this statement is executed for non-Select statements. For Select statements, if iters is non-zero, then defines must have been done for the statement handle. The execution fetches iters rows into these predefined buffers and prefetches more rows depending upon the prefetch row count. This function returns an error if iters=0 for non-SELECT statements. rowoff (IN) - the index from which the data in an array bind is relevant for this multiple row execution. snap_in (IN) - this parameter is optional. if supplied, must point to a snapshot descriptor of type OCI_DTYPE_SNAP. The contents of this descriptor must be obtained from the snap_out parameter of a previous call. The descriptor is ignored if the SQL is not a SELECT. This facility allows multiple service contexts to ORACLE to see the same consistent snapshot of the database's committed data. However, uncommitted data in one context is not visible to another context even using the same snapshot. snap_out (OUT) - this parameter optional. if supplied, must point to a descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an opaque representation which is the current ORACLE "system change number" suitable as a snap_in input to a subsequent call to OCIStmtExecute(). This descriptor should not be used any longer than necessary in order to avoid "snapshot too old" errors. mode (IN) - The modes are: If OCI_DEFAULT_MODE, the default mode, is selected, the request is immediately executed. Error handle contains diagnostics on error if any. OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is only valid if the application has set the prefetch row count prior to this call. In this mode, the OCI library will get up to the number of rows specified (i.e., prefetch row count plus iters). If the number of rows returned by the query is greater than this value, OCI_ERROR will be returned with ORA-01422 as the implementation specific error in a diagnostic record. If the number of rows returned by the query is smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will be returned with ORA-01403 as the implementation specific error. The prefetch buffer size is ignored and the OCI library tries to allocate all the space required to contain the prefetched rows. The exact fetch semantics apply to only the top level rows. No more rows can be fetched for this query at the end of the call. OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this statement executed in this transaction will be maintained when the transaction is detached for migration. By default, a query is cancelled when a transaction is detached for migration. This mode is the default mode when connected to a V7 server. Related Functions OCIStmtPrepare() } function TZOracle9iPlainDriver.StmtExecute(svchp: POCISvcCtx; stmtp: POCIStmt; errhp: POCIError; iters, rowoff: ub4; snap_in, snap_out: POCISnapshot; mode: ub4): sword; begin Result := OCIStmtExecute(svchp, stmtp, errhp, iters, rowoff, snap_in, snap_out, mode); end; {** from aciap.h OCIParamGet() Name OCI Get PARaMeter Purpose Returns a descriptor of a parameter specified by position in the describe handle or statement handle. Syntax sword OCIParamGet ( const void *hndlp, ub4 htype, OCIError *errhp, void **parmdpp, ub4 pos ); Comments This call returns a descriptor of a parameter specified by position in the describe handle or statement handle. Parameter descriptors are always allocated internally by the OCI library. They are read-only. OCI_NO_DATA may be returned if there are no parameter descriptors for this position. See Appendix B for more detailed information about parameter descriptor attributes. Parameters hndlp (IN) - a statement handle or describe handle. The OCIParamGet() function will return a parameter descriptor for this handle. htype (IN) - the type of the handle passed in the handle parameter. Valid types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a statement handle errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. parmdpp (OUT) - a descriptor of the parameter at the position given in the pos parameter. pos (IN) - position number in the statement handle or describe handle. A parameter descriptor will be returned for this position. Note: OCI_NO_DATA may be returned if there are no parameter descriptors for this position. Related Functions OCIAttrGet(), OCIAttrSet() } function TZOracle9iPlainDriver.ParamGet(hndlp: Pointer; htype: ub4; errhp: POCIError; var parmdpp: Pointer; pos: ub4): sword; begin Result := OCIParamGet(hndlp, htype, errhp, parmdpp, pos); end; {** from ociap.h OCIStmtFetch() Name OCI FetCH Purpose Fetches rows from a query. Syntax sword OCIStmtFetch ( OCIStmt *stmtp, OCIError *errhp, ub4 nrows, ub2 orientation, ub4 mode); Comments The fetch call is a local call, if prefetched rows suffice. However, this is transparent to the application. If LOB columns are being read, LOB locators are fetched for subsequent LOB operations to be performed on these locators. Prefetching is turned off if LONG columns are involved. A fetch with nrows set to 0 rows effectively cancels the fetch for this statement. Parameters stmtp (IN) - a statement (application request) handle. errhp (IN) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. nrows (IN) - number of rows to be fetched from the current position. orientation (IN) - for release 8.0, the only acceptable value is OCI_FETCH_NEXT, which is also the default value. mode (IN) - for release 8.0, beta-1, the following mode is defined. OCI_DEFAULT - default mode OCI_EOF_FETCH - indicates that it is the last fetch from the result set. If nrows is non-zero, setting this mode effectively cancels fetching after retrieving nrows, otherwise it cancels fetching immediately. Related Functions OCIAttrGet() } function TZOracle9iPlainDriver.StmtFetch(stmtp: POCIStmt; errhp: POCIError; nrows: ub4; orientation: ub2; mode: ub4): sword; begin Result := OCIStmtFetch(stmtp, errhp, nrows, orientation, mode); end; {** from ociap.h OCIStmtFetch2() Name OCI FetCH2 Purpose Fetches rows from a query. Syntax sword OCIStmtFetch2 ( OCIStmt *stmtp, OCIError *errhp, ub4 nrows, ub2 orientation, ub4 scrollOffset, ub4 mode); Comments The fetch call works similar to the OCIStmtFetch call with the addition of the fetchOffset parameter. It can be used on any statement handle, whether it is scrollable or not. For a non-scrollable statement handle, the only acceptable value will be OCI_FETCH_NEXT, and the fetchOffset parameter will be ignored. Applications are encouraged to use this new call. A fetchOffset with OCI_FETCH_RELATIVE is equivalent to OCI_FETCH_CURRENT with a value of 0, is equivalent to OCI_FETCH_NEXT with a value of 1, and equivalent to OCI_FETCH_PRIOR with a value of -1. Note that the range of accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an error could be raised if sufficient rows do not exist in The fetch call is a local call, if prefetched rows suffice. However, this is transparent to the application. If LOB columns are being read, LOB locators are fetched for subsequent LOB operations to be performed on these locators. Prefetching is turned off if LONG columns are involved. A fetch with nrows set to 0 rows effectively cancels the fetch for this statement. Parameters stmtp (IN) - a statement (application request) handle. errhp (IN) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. nrows (IN) - number of rows to be fetched from the current position. It defaults to 1 for orientation OCI_FETCH_LAST. orientation (IN) - The acceptable values are as follows, with OCI_FETCH_NEXT being the default value. OCI_FETCH_CURRENT gets the current row, OCI_FETCH_NEXT gets the next row from the current position, OCI_FETCH_FIRST gets the first row in the result set, OCI_FETCH_LAST gets the last row in the result set, OCI_FETCH_PRIOR gets the previous row from the current row in the result set, OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset parameter) in the result set using absolute positioning, OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset parameter) in the result set using relative positioning. scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and OCI_FETCH_RELATIVE orientation parameters only. It specify the new current position for scrollable result set. It is ignored for non-scrollable result sets. mode (IN) - for release 8.0, beta-1, the following mode is defined. OCI_DEFAULT - default mode OCI_EOF_FETCH - indicates that it is the last fetch from the result set. If nrows is non-zero, setting this mode effectively cancels fetching after retrieving nrows, otherwise it cancels fetching immediately. Related Functions OCIAttrGet() } function TZOracle9iPlainDriver.StmtFetch2(stmtp: POCIStmt; errhp: POCIError; const nrows: ub4; const orientation: ub2; const fetchOffset: sb4; const mode: ub4): sword; begin Result := OCIStmtFetch2(stmtp, errhp, nrows, orientation, fetchOffset, mode); end; {** from ociap.h OCIDefineByPos() Name OCI Define By Position Purpose Associates an item in a select-list with the type and output data buffer. Syntax sb4 OCIDefineByPos ( OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp, ub4 position, void *valuep, sb4 value_sz, ub2 dty, void *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode ); Comments This call defines an output buffer which will receive data retreived from Oracle. The define is a local step which is necessary when a SELECT statement returns data to your OCI application. This call also implicitly allocates the define handle for the select-list item. Defining attributes of a column for a fetch is done in one or more calls. The first call is to OCIDefineByPos(), which defines the minimal attributes required to specify the fetch. This call takes as a parameter a define handle, which must have been previously allocated with a call to OCIHandleAlloc(). Following the call to OCIDefineByPos() additional define calls may be necessary for certain data types or fetch modes: A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters for an array fetch of multiple columns. A call to OCIDefineObject() is necessary to set up the appropriate attributes of a named data type fetch. In this case the data buffer pointer in ocidefn() is ignored. Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called after ocidefn() in order to fetch multiple rows with a column of named data types. For a LOB define, the buffer pointer must be a lob locator of type OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not LOB values, are always returned for a LOB column. LOB values can then be fetched using OCI LOB calls on the fetched locator. For NCHAR (fixed and varying length), the buffer pointer must point to an array of bytes sufficient for holding the required NCHAR characters. Nested table columns are defined and fetched like any other named data type. If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client application can fetch data dynamically at runtime. Runtime data can be provided in one of two ways: callbacks using a user-defined function which must be registered with a subsequent call to OCIDefineDynamic(). When the client library needs a buffer to return the fetched data, the callback will be invoked and the runtime buffers provided will return a piece or the whole data. a polling mechanism using calls supplied by the OCI. This mode is assumed if no callbacks are defined. In this case, the fetch call returns the OCI_NEED_DATA error code, and a piecewise polling method is used to provide the data. Related Functions: For more information about using the OCI_DYNAMIC_FETCH mode, see the section "Runtime Data Allocation and Piecewise Operations" on page 5-16 of Volume 1.. For more information about the define step, see the section "Defining" on page 2-30. Parameters stmtp (IN) - a handle to the requested SQL query operation. defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly allocated by this call. This handle is used to store the define information for this column. errhp (IN) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. position (IN) - the position of this value in the select list. Positions are 1-based and are numbered from left to right. For example, in the SELECT statement SELECT empno, ssn, mgrno FROM employees; empno is at position 1, ssn is at position 2, and mgrno is at position 3. valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type specified in the dty parameter. A number of buffers can be specified when results for more than one row are desired in a single fetch call. value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored internally in VARCHAR2 format, the number of characters desired, if different from the buffer size in bytes, may be additionally specified by the using OCIAttrSet(). In an NLS conversion environment, a truncation error will be generated if the number of bytes specified is insufficient to handle the number of characters desired. dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) are valid only if the environment has been intialized with in object mode. indp - pointer to an indicator variable or array. For scalar data types, pointer to sb2 or an array of sb2s. Ignored for named data types. For named data types, a pointer to a named data type indicator structure or an array of named data type indicator structures is associated by a subsequent OCIDefineObject() call. See the section "Indicator Variables" on page 2-43 for more information about indicator variables. rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in rlenp is the length of the data in the corresponding element in the row after the fetch. rcodep (OUT) - pointer to array of column-level return codes mode (IN) - the valid modes are: OCI_DEFAULT. This is the default mode. OCI_DYNAMIC_FETCH. For applications requiring dynamically allocated data at the time of fetch, this mode must be used. The user may additionally call OCIDefineDynamic() to set up a callback function that will be invoked to receive the dynamically allocated buffers and to set up the memory allocate/free callbacks and the context for the callbacks. valuep and value_sz are ignored in this mode. Related Functions OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject() } function TZOracle9iPlainDriver.DefineByPos(stmtp: POCIStmt; var defnpp: POCIDefine; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp, rlenp, rcodep: Pointer; mode: ub4): sword; begin Result := OCIDefineByPos(stmtp, defnpp, errhp, position, valuep, value_sz, dty, indp, rlenp, rcodep, mode); end; {** from ociap.h OCIBindByPos() Name OCI Bind by Position Purpose Creates an association between a program variable and a placeholder in a SQL statement or PL/SQL block. Syntax sword OCIBindByPos ( OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp, ub4 position, void *valuep, sb4 value_sz, ub2 dty, void *indp, ub2 *alenp, ub2 *rcodep, ub4 maxarr_len, ub4 *curelep, ub4 mode); Description This call is used to perform a basic bind operation. The bind creates an association between the address of a program variable and a placeholder in a SQL statement or PL/SQL block. The bind call also specifies the type of data which is being bound, and may also indicate the method by which data will be provided at runtime. This function also implicitly allocates the bind handle indicated by the bindp parameter. Data in an OCI application can be bound to placeholders statically or dynamically. Binding is static when all the IN bind data and the OUT bind buffers are well-defined just before the execute. Binding is dynamic when the IN bind data and the OUT bind buffers are provided by the application on demand at execute time to the client library. Dynamic binding is indicated by setting the mode parameter of this call to OCI_DATA_AT_EXEC. Related Functions: For more information about dynamic binding, see the section "Runtime Data Allocation and Piecewise Operations" on page 5-16 Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, which is implicitly allocated by the bind call A separate bind handle is allocated for each placeholder the application is binding. Additional bind calls may be required to specify particular attributes necessary when binding certain data types or handling input data in certain ways: If arrays of structures are being utilized, OCIBindArrayOfStruct() must be called to set up the necessary skip parameters. If data is being provided dynamically at runtime, and the application will be using user-defined callback functions, OCIBindDynamic() must be called to register the callbacks. If a named data type is being bound, OCIBindObject() must be called to specify additional necessary information. Parameters stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement being processed. bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly allocated by this call. The bind handle maintains all the bind information for this particular input value. The handle is feed implicitly when the statement handle is deallocated. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. position (IN) - the placeholder attributes are specified by position if ocibindp() is being called. valuep (IN/OUT) - a pointer to a data value or an array of data values of the type specified in the dty parameter. An array of data values can be specified for mapping into a PL/SQL table or for providing data for SQL multiple-row operations. When an array of bind values is provided, this is called an array bind in OCI terms. Additional attributes of the array bind (not bind to a column of ARRAY type) are set up in OCIBindArrayOfStruct() call. For a REF, named data type bind, the valuep parameter is used only for IN bind data. The pointers to OUT buffers are set in the pgvpp parameter initialized by OCIBindObject(). For named data type and REF binds, the bind values are unpickled into the Object Cache. The OCI object navigational calls can then be used to navigate the objects and the refs in the Object Cache. If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep is ignored for all data types. OCIBindArrayOfStruct() cannot be used and OCIBindDynamic() must be invoked to provide callback functions if desired. value_sz (IN) - the size of a data value. In the case of an array bind, this is the maximum size of any element possible with the actual sizes being specified in the alenp parameter. If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum size of the data that can be ever provided at runtime for data types other than named data types or REFs. dty (IN) - the data type of the value(s) being bound. Named data types (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been initialized in object mode. For named data types, or REFs, additional calls must be made with the bind handle to set up the datatype-specific attributes. indp (IN/OUT) - pointer to an indicator variable or array. For scalar data types, this is a pointer to sb2 or an array of sb2s. For named data types, this pointer is ignored and the actual pointer to the indicator structure or an array of indicator structures is initialized by OCIBindObject(). Ignored for dynamic binds. See the section "Indicator Variables" on page 2-43 for more information about indicator variables. alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each element in alenp is the length of the data in the corresponding element in the bind value array before and after the execute. This parameter is ignored for dynamic binds. rcodep (OUT) - pointer to array of column level return codes. This parameter is ignored for dynamic binds. maxarr_len (IN) - the maximum possible number of elements of type dty in a PL/SQL binds. This parameter is not required for non-PL/SQL binds. If maxarr_len is non-zero, then either OCIBindDynamic() or OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. curelep(IN/OUT) - a pointer to the actual number of elements. This parameter is only required for PL/SQL binds. mode (IN) - the valid modes for this parameter are: OCI_DEFAULT. This is default mode. OCI_DATA_AT_EXEC. When this mode is selected, the value_sz parameter defines the maximum size of the data that can be ever provided at runtime. The application must be ready to provide the OCI library runtime IN data buffers at any time and any number of times. Runtime data is provided in one of the two ways: callbacks using a user-defined function which must be registered with a subsequent call to OCIBindDynamic() . a polling mechanism using calls supplied by the OCI. This mode is assumed if no callbacks are defined. For more information about using the OCI_DATA_AT_EXEC mode, see the section "Runtime Data Allocation and Piecewise Operations" on page 5-16. When the allocated buffers are not required any more, they should be freed by the client. Related Functions OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet() } function TZOracle9iPlainDriver.BindByPos(stmtp: POCIStmt; var bindpp: POCIBind; errhp: POCIError; position: ub4; valuep: Pointer; value_sz: sb4; dty: ub2; indp, alenp, rcodep: Pointer; maxarr_len: ub4; curelep: Pointer; mode: ub4): sword; begin Result := OCIBindByPos(stmtp, bindpp, errhp, position, valuep, value_sz, dty, indp, alenp, rcodep, maxarr_len, curelep, mode); end; {** from ociap.h OCIBindObject() Name OCI Bind Object Purpose This function sets up additional attributes which are required for a named data type (object) bind. Syntax sword OCIBindObject ( OCIBind *bindp, OCIError *errhp, const OCIType *type, void **pgvpp, ub4 *pvszsp, void **indpp, ub4 *indszp, ); Comments This function sets up additional attributes which binding a named data type or a REF. An error will be returned if this function is called when the OCI environment has been initialized in non-object mode. This call takes as a paramter a type descriptor object (TDO) of datatype OCIType for the named data type being defined. The TDO can be retrieved with a call to OCITypeByName(). If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the pointers to the IN buffers are obtained either using the callback icbfp registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. The buffers are dynamically allocated for the OUT data and the pointers to these buffers are returned either by calling ocbfp() registered by the OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned OCI_NEED_DATA. The memory of these client library- allocated buffers must be freed when not in use anymore by using the OCIObjectFreee() call. Parameters bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() or OCIBindByPos(). errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. type ( IN) - points to the TDO which describes the type of the program variable being bound. Retrieved by calling OCITypeByName(). pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an array, pgvpp points to an array of pointers. When the bind variable is also an OUT variable, the OUT Named Data Type value or REF is allocated (unpickled) in the Object Cache, and a pointer to the value or REF is returned, At the end of execute, when all OUT values have been received, pgvpp points to an array of pointer(s) to these newly allocated named data types in the object cache. pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named Data Type buffers are requested at runtime. For static array binds, skip factors may be specified using the OCIBindArrayOfStruct() call. The skip factors are used to compute the address of the next pointer to the value, the indicator structure and their sizes. pvszsp ( IN/OUT) - points to the size of the program variable. The size of the named data type is not required on input. For an array, pvszsp is an array of ub4s. On return, for OUT bind variables, this points to size(s) of the Named Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the size of the buffer is taken at runtime. indpp ( IN/OUT) - points to a pointer to the program variable buffer containing the parallel indicator structure. For an array, points to an array of pointers. When the bind variable is also an OUT bind variable, memory is allocated in the object cache, to store the unpickled OUT indicator values. At the end of the execute when all OUT values have been received, indpp points to the pointer(s) to these newly allocated indicator structure(s). indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator is requested at runtime. indszp ( IN/OUT) - points to the size of the IN indicator structure program variable. For an array, it is an array of sb2s. On return for OUT bind variables, this points to size(s) of the received OUT indicator structures. indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator size is requested at runtime. Related Functions OCIAttrGet() } function TZOracle9iPlainDriver.BindObject(bindp: POCIBind; errhp: POCIError; const _type: POCIType; pgvpp: PPointer; pvszsp: pub4; indpp: PPointer; indszp: pub4): sword; begin Result := OCIBindObject(bindp, errhp, _type, pgvpp, pvszsp, indpp, indszp); end; {** from ociap.h OCIDefineObject() Name OCI Define Named Data Type attributes Purpose Sets up additional attributes necessary for a Named Data Type define. Syntax sword OCIDefineObject ( OCIDefine *defnp, OCIError *errhp, const OCIType *type, void **pgvpp, ub4 *pvszsp, void **indpp, ub4 *indszp ); Comments This call sets up additional attributes necessary for a Named Data Type define. An error will be returned if this function is called when the OCI environment has been initialized in non-Object mode. This call takes as a paramter a type descriptor object (TDO) of datatype OCIType for the named data type being defined. The TDO can be retrieved with a call to OCITypeByName(). See the description of OCIInitialize() on page 13 - 43 for more information about initializing the OCI process environment. Parameters defnp (IN/OUT) - a define handle previously allocated in a call to OCIDefineByPos(). errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. type (IN, optional) - points to the Type Descriptor Object (TDO) which describes the type of the program variable. Only used for program variables of type SQLT_NTY. This parameter is optional, and may be passed as NULL if it is not being used. pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an array, pgvpp points to an array of pointers. Memory for the fetched named data type instance(s) is dynamically allocated in the object cache. At the end of the fetch when all the values have been received, pgvpp points to the pointer(s) to these newly allocated named data type instance(s). The application must call OCIObjectMarkDel() to deallocate the named data type instance(s) when they are no longer needed. pvszsp (IN/OUT) - points to the size of the program variable. For an array, it is an array of ub4s. On return points to the size(s) of unpickled fetched values. indpp (IN/OUT) - points to a pointer to the program variable buffer containing the parallel indicator structure. For an array, points to an array of pointers. Memory is allocated to store the indicator structures in the object cache. At the end of the fetch when all values have been received, indpp points to the pointer(s) to these newly allocated indicator structure(s). indszp (IN/OUT) - points to the size(s) of the indicator structure program variable. For an array, it is an array of ub4s. On return points to the size(s) of the unpickled fetched indicator values. Related Functions OCIAttrGet() } function TZOracle9iPlainDriver.DefineObject(defnpp: POCIDefine; errhp: POCIError; _type: POCIHandle; pgvpp,pvszsp,indpp,indszp:pointer): sword; begin Result := OCIDefineObject(defnpp, errhp, _type, pgvpp, pvszsp, indpp, indszp); end; {* from ociap.h OCIResultSetToStmt() Name OCI convert Result Set to Statement Handle Purpose Converts a descriptor to statement handle for fetching rows. Syntax sword OCIResultSetToStmt ( OCIResult *rsetdp, OCIError *errhp ); Comments Converts a descriptor to statement handle for fetching rows. A result set descriptor can be allocated with a call to OCIDescAlloc(). Parameters rsetdp (IN/OUT) - a result set descriptor pointer. errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for diagnostic information in the event of an error. Related Functions OCIDescAlloc() } function TZOracle9iPlainDriver.ResultSetToStmt(rsetdp: POCIHandle; errhp: POCIError): sword; begin Result := OCIResultSetToStmt(rsetdp, errhp); end; function TZOracle9iPlainDriver.DescriptorAlloc(const parenth: POCIEnv; var descpp: POCIDescriptor; const htype: ub4; const xtramem_sz: integer; usrmempp: Pointer): sword; begin Result := OCIDescriptorAlloc(parenth, descpp{%H-}, htype, xtramem_sz, usrmempp); end; function TZOracle9iPlainDriver.DescriptorFree(const descp: Pointer; const htype: ub4): sword; begin Result := OCIDescriptorFree(descp, htype); end; function TZOracle9iPlainDriver.LobOpen(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; mode: ub1): sword; begin Result := OCILobOpen(svchp, errhp, locp, mode); end; function TZOracle9iPlainDriver.LobRead(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; ctxp, cbfp: Pointer; csid: ub2; csfrm: ub1): sword; begin Result := OCILobRead(svchp, errhp, locp, amtp, offset, bufp, bufl, ctxp, cbfp, csid, csfrm); end; function TZOracle9iPlainDriver.LobTrim(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; newlen: ub4): sword; begin Result := OCILobTrim(svchp, errhp, locp, newlen); end; function TZOracle9iPlainDriver.LobWrite(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amtp: ub4; offset: ub4; bufp: Pointer; bufl: ub4; piece: ub1; ctxp, cbfp: Pointer; csid: ub2; csfrm: ub1): sword; begin Result := OCILobWrite(svchp, errhp, locp, amtp, offset, bufp, bufl, piece, ctxp, cbfp, csid, csfrm); end; function TZOracle9iPlainDriver.LobCreateTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; csid: ub2; csfrm, lobtype: ub1; cache: LongBool; duration: OCIDuration): sword; begin Result := OCILobCreateTemporary(svchp, errhp, locp, csid, csfrm, lobtype, cache, duration); end; function TZOracle9iPlainDriver.LobIsTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var is_temporary: LongBool): sword; begin Result := OCILobIsTemporary(svchp, errhp, locp, is_temporary); end; function TZOracle9iPlainDriver.LobFreeTemporary(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; begin Result := OCILobFreeTemporary(svchp, errhp, locp); end; function TZOracle9iPlainDriver.LobCharSetForm ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csfrm: pub1): sword; begin Result := OCILobCharSetForm(envhp, errhp, locp, csfrm); end; function TZOracle9iPlainDriver.LobCharSetId ( envhp: POCIEnv; errhp: POCIError; const locp: POCILobLocator; csid: pub2): sword; begin Result := OCILobCharSetId (envhp, errhp, locp, csid); end; function TZOracle9iPlainDriver.LobClose(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; begin Result := OCILobClose(svchp, errhp, locp); end; (* ---------------------- OCIIntervalGetYearMonth -------------------- DESCRIPTION Gets year month from an interval PARAMETERS hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). year (OUT) - year value month (OUT) - month value result (IN) - resulting interval RETURNS OCI_SUCCESS on success OCI_INVALID_HANDLE if 'err' is NULL. *) function TZOracle9iPlainDriver.IntervalGetYearMonth(hndl: POCIHandle; err: POCIError; yr,mnth: psb4; const int_result: POCIInterval): sword; begin Result := OCIIntervalGetYearMonth(hndl, err, yr, mnth, int_result); end; (* ---------------------- OCIIntervalGetDaySecond -------------------- DESCRIPTION Gets values of day second interval PARAMETERS hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). day (OUT) - number of days hour (OUT) - number of hours min (OUT) - number of mins sec (OUT) - number of secs fsec (OUT) - number of fractional seconds result (IN) - resulting interval RETURNS OCI_SUCCESS on success OCI_INVALID_HANDLE if 'err' is NULL. *) function TZOracle9iPlainDriver.IntervalGetDaySecond(hndl: POCIHandle; err: POCIError; dy, hr, mm, ss, fsec: psb4; const int_result: POCIInterval): sword; begin Result := OCIIntervalGetDaySecond(hndl, err, dy, hr, mm, ss, fsec, int_result); end; function TZOracle9iPlainDriver.DateTimeConstruct(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; year: sb2; month, day, hour, min, sec: ub1; fsec: ub4; timezone: text; timezone_length: size_t): sword; begin Result := OCIDateTimeConstruct(hndl, err, datetime, year, month, day, hour, min, sec, fsec, timezone, timezone_length); end; function TZOracle9iPlainDriver.DateTimeGetDate(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var year: sb2; var month, day: ub1): sword; begin Result := OCIDateTimeGetDate(hndl, err, date, year, month, day); end; function TZOracle9iPlainDriver.DateTimeGetTime(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var hour, minute, sec: ub1; var fsec: ub4): sword; begin Result := OCIDateTimeGetTime(hndl, err, datetime, hour, minute, sec, fsec); end; function TZOracle9iPlainDriver.TypeByRef(env: POCIEnv; err: POCIError; type_ref: POCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; begin Result := OCITypeByRef(env, err, type_ref, pin_duration, get_option, tdo); end; { > ori.h} { NAME: OCIObjectNew - OCI new (create) a standalone instance PARAMETERS: env (IN/OUT) - OCI environment handle initialized in object mode err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). svc (IN) - OCI service handle. typecode (IN) - the typecode of the type of the instance. tdo (IN, optional) - pointer to the type descriptor object. The TDO describes the type of the instance that is to be created. Refer to OCITypeByName() for obtaining a TDO. The TDO is required for creating a named type (e.g. an object or a collection). table (IN, optional) - pointer to a table object which specifies a table in the server. This parameter can be set to NULL if no table is given. See the description below to find out how the table object and the TDO are used together to determine the kind of instances (persistent, transient, value) to be created. Also see OCIObjectPinTable() for retrieving a table object. duration (IN) - this is an overloaded parameter. The use of this parameter is based on the kind of the instance that is to be created. a) persistent object. This parameter specifies the pin duration. b) transient object. This parameter specififes the allocation duration and pin duration. c) value. This parameter specifies the allocation duration. value (IN) - specifies whether the created object is a value. If TRUE, then a value is created. Otherwise, a referenceable object is created. If the instance is not an object, then this parameter is ignored. instance (OUT) - address of the newly created instance REQUIRES: - a valid OCI environment handle must be given. DESCRIPTION: This function creates a new instance of the type specified by the typecode or the TDO. Based on the parameters 'typecode' (or 'tdo'), 'value' and 'table', different kinds of instances can be created: The parameter 'table' is not NULL? yes no ---------------------------------------------------------------- | object type (value=TRUE) | value | value | ---------------------------------------------------------------- | object type (value=FALSE) | persistent obj | transient obj | type ---------------------------------------------------------------- | built-in type | value | value | ---------------------------------------------------------------- | collection type | value | value | ---------------------------------------------------------------- This function allocates the top level memory chunk of an OTS instance. The attributes in the top level memory are initialized (e.g. an attribute of varchar2 is initialized to a vstring of 0 length). If the instance is an object, the object is marked existed but is atomically null. FOR PERSISTENT OBJECTS: The object is marked dirty and existed. The allocation duration for the object is session. The object is pinned and the pin duration is specified by the given parameter 'duration'. FOR TRANSIENT OBJECTS: The object is pinned. The allocation duration and the pin duration are specified by the given parameter 'duration'. FOR VALUES: The allocation duration is specified by the given parameter 'duration'. RETURNS: if environment handle or error handle is null, return OCI_INVALID_HANDLE. if operation suceeds, return OCI_SUCCESS. if operation fails, return OCI_ERROR. } function TZOracle9iPlainDriver.ObjectNew(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; typecode: OCITypeCode; tdo: POCIType; table: Pointer; duration: OCIDuration; value: Longbool; instance: PPointer): sword; begin Result := OCIObjectNew(env, err, svc, typecode, tdo, table, duration, value, instance); end; {** NAME: OCIObjectPin - OCI pin a referenceable object PARAMETERS: env (IN/OUT) - OCI environment handle initialized in object mode err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). object_ref (IN) - the reference to the object. corhdl (IN) - handle for complex object retrieval. pin_option (IN) - See description below. pin_duration (IN) - The duration of which the object is being accesed by a client. The object is implicitly unpinned at the end of the pin duration. If OCI_DURATION_NULL is passed, there is no pin promotion if the object is already loaded into the cache. If the object is not yet loaded, then the pin duration is set to OCI_DURATION_DEFAULT. lock_option (IN) - lock option (e.g., exclusive). If a lock option is specified, the object is locked in the server. See 'oro.h' for description about lock option. object (OUT) - the pointer to the pinned object. REQUIRES: - a valid OCI environment handle must be given. DESCRIPTION: This function pins a referenceable object instance given the object reference. The process of pinning serves three purposes: 1) locate an object given its reference. This is done by the object cache which keeps track of the objects in the object heap. 2) notify the object cache that an object is being in use. An object can be pinned many times. A pinned object will remain in memory until it is completely unpinned (see OCIObjectUnpin()). 3) notify the object cache that a persistent object is being in use such that the persistent object cannot be aged out. Since a persistent object can be loaded from the server whenever is needed, the memory utilization can be increased if a completely unpinned persistent object can be freed (aged out), even before the allocation duration is expired. Also see OCIObjectUnpin() for more information about unpinning. FOR PERSISTENT OBJECTS: When pinning a persistent object, if it is not in the cache, the object will be fetched from the persistent store. The allocation duration of the object is session. If the object is already in the cache, it is returned to the client. The object will be locked in the server if a lock option is specified. This function will return an error for a non-existent object. A pin option is used to specify the copy of the object that is to be retrieved: 1) If option is OCI_PIN_ANY (pin any), if the object is already in the environment heap, return this object. Otherwise, the object is retrieved from the database. This option is useful when the client knows that he has the exclusive access to the data in a session. 2) If option is OCI_PIN_LATEST (pin latest), if the object is not cached, it is retrieved from the database. If the object is cached, it is refreshed with the latest version. See OCIObjectRefresh() for more information about refreshing. 3) If option is OCI_PIN_RECENT (pin recent), if the object is loaded into the cache in the current transaction, the object is returned. If the object is not loaded in the current transaction, the object is refreshed from the server. FOR TRANSIENT OBJECTS: This function will return an error if the transient object has already been freed. This function does not return an error if an exclusive lock is specified in the lock option. RETURNS: if environment handle or error handle is null, return OCI_INVALID_HANDLE. if operation suceeds, return OCI_SUCCESS. if operation fails, return OCI_ERROR. } function TZOracle9iPlainDriver.ObjectPin(env: POCIEnv; err: POCIError; const object_ref: POCIRef; const corhdl: POCIComplexObject; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock_option: OCILockOpt; _object: PPointer): sword; begin Result := OCIObjectPin(env, err, object_ref, corhdl, pin_option, pin_duration, lock_option, _object); end; {** NAME: OCIObjectUnpin - OCI unpin a referenceable object PARAMETERS: env (IN/OUT) - OCI environment handle initialized in object mode err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). object (IN) - pointer to an object REQUIRES: - a valid OCI environment handle must be given. - The specified object must be pinned. DESCRIPTION: This function unpins an object. An object is completely unpinned when 1) the object was unpinned N times after it has been pinned N times (by calling OCIObjectPin()). 2) it is the end of the pin duration 3) the function OCIObjectPinCountReset() is called There is a pin count associated with each object which is incremented whenever an object is pinned. When the pin count of the object is zero, the object is said to be completely unpinned. An unpinned object can be freed without error. FOR PERSISTENT OBJECTS: When a persistent object is completely unpinned, it becomes a candidate for aging. The memory of an object is freed when it is aged out. Aging is used to maximize the utilization of memory. An dirty object cannot be aged out unless it is flushed. FOR TRANSIENT OBJECTS: The pin count of the object is decremented. A transient can be freed only at the end of its allocation duration or when it is explicitly deleted by calling OCIObjectFree(). FOR VALUE: This function will return an error for value. RETURNS: if environment handle or error handle is null, return OCI_INVALID_HANDLE. if operation suceeds, return OCI_SUCCESS. if operation fails, return OCI_ERROR. } function TZOracle9iPlainDriver.ObjectUnpin(env: POCIEnv; err: POCIError; const _object: Pointer): sword; begin Result := OCIObjectUnpin(env, err, _object); end; {** NAME: OCIObjectFree - OCI free (and unpin) an standalone instance PARAMETERS: env (IN/OUT) - OCI environment handle initialized in object mode err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). instance (IN) - pointer to a standalone instance. flags (IN) - If OCI_OBJECT_FREE_FORCE is set, free the object even if it is pinned or dirty. If OCI_OBJECT_FREE_NONULL is set, the null structure will not be freed. REQUIRES: - a valid OCI environment handle must be given. - The instance to be freed must be standalone. - If the instance is a referenceable object, the object must be pinned. DESCRIPTION: This function deallocates all the memory allocated for an OTS instance, including the null structure. FOR PERSISTENT OBJECTS: This function will return an error if the client is attempting to free a dirty persistent object that has not been flushed. The client should either flush the persistent object or set the parameter 'flag' to OCI_OBJECT_FREE_FORCE. This function will call OCIObjectUnpin() once to check if the object can be completely unpin. If it succeeds, the rest of the function will proceed to free the object. If it fails, then an error is returned unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE. Freeing a persistent object in memory will not change the persistent state of that object at the server. For example, the object will remain locked after the object is freed. FOR TRANSIENT OBJECTS: This function will call OCIObjectUnpin() once to check if the object can be completely unpin. If it succeeds, the rest of the function will proceed to free the object. If it fails, then an error is returned unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE. FOR VALUES: The memory of the object is freed immediately. RETURNS: if environment handle or error handle is null, return OCI_INVALID_HANDLE. if operation suceeds, return OCI_SUCCESS. if operation fails, return OCI_ERROR. } function TZOracle9iPlainDriver.ObjectFree(hndl: POCIEnv; err: POCIError; instance:POCIHandle;flags :ub2):sword; begin Result := OCIObjectFree(hndl, err, instance, flags); end; {** NAME: OCIObjectGetTypeRef - get the type reference of a standalone object PARAMETERS: env (IN/OUT) - OCI environment handle initialized in object mode err (IN/OUT) - error handle. If there is an error, it is recorded in 'err' and this function returns OCI_ERROR. The error recorded in 'err' can be retrieved by calling OCIErrorGet(). instance (IN) - pointer to an standalone instance type_ref (OUT) - reference to the type of the object. The reference must already be allocated. REQUIRES: - a valid OCI environment handle must be given. - The instance must be standalone. - If the object is referenceable, the specified object must be pinned. - The reference must already be allocated. DESCRIPTION: This function returns a reference to the TDO of a standalone instance. RETURNS: if environment handle or error handle is null, return OCI_INVALID_HANDLE. if operation suceeds, return OCI_SUCCESS. if operation fails, return OCI_ERROR. } function TZOracle9iPlainDriver.ObjectGetTypeRef(env: POCIEnv; err: POCIError; const instance:pointer; type_ref: POCIRef): sword; begin Result := OCIObjectGetTypeRef(env, err, instance, type_ref); end; function TZOracle9iPlainDriver.DescribeAny(svchp: POCISvcCtx; errhp: POCIError; objptr: Pointer; objnm_len: ub4; objptr_typ, info_level, objtyp: ub1; dschp: POCIDescribe): sword; begin Result := OCIDescribeAny(svchp, errhp, objptr, objnm_len, objptr_typ, info_level, objtyp, dschp); end; (* function TZOracle9iPlainDriver.ObjectUnmark(env: POCIEnv; err: POCIError; const _object:pointer): sword; begin Result := OracleAPI.OCIObjectUnmark(env, err, _object); end; function TZOracle9iPlainDriver.ObjectUnmarkByRef(env: POCIEnv; err: POCIError; const ref: POCIRef): sword; begin Result := OracleAPI.OCIObjectUnmarkByRef(env, err, ref); end; function TZOracle9iPlainDriver.ObjectMarkDeleteByRef(env: POCIEnv; err: POCIError; const object_ref:POCIRef): sword; begin Result := OracleAPI.OCIObjectMarkDeleteByRef(env, err, object_ref); end; function TZOracle9iPlainDriver.ObjectMarkDelete(env: POCIEnv; err: POCIError; const instance:pointer): sword; begin Result := OracleAPI.OCIObjectMarkDelete(env, err, instance); end; function TZOracle9iPlainDriver.ObjectFlush(env: POCIEnv; err: POCIError; const _object: pointer): sword; begin Result := OracleAPI.OCIObjectFlush(env, err, _object); end; function TZOracle9iPlainDriver.ObjectRefresh(env: POCIEnv; err: POCIError; _object: pointer): sword; begin Result := OracleAPI.OCIObjectRefresh(env, err, _object); end; function TZOracle9iPlainDriver.ObjectCopy(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const source, null_source, target, null_target: pointer; const tdo: POCIType; const duration: OCIDuration; const option: ub1): sword; begin Result := OracleAPI.OCIObjectCopy(env, err, svc, source, null_source, target, null_target, tdo, duration, option); end; function TZOracle9iPlainDriver.ObjectGetObjectRef(env: POCIEnv; err: POCIError; const _object: pointer; object_ref: POCIRef): sword; begin Result := OracleAPI.OCIObjectGetObjectRef(env, err, _object, object_ref); end; function TZOracle9iPlainDriver.ObjectMakeObjectRef(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; const table: pointer; const values: PPointer; const array_len: ub4; object_ref: POCIRef): sword; begin Result := OracleAPI.OCIObjectMakeObjectRef(env, err, svc, table, values, array_len, object_ref); end; function TZOracle9iPlainDriver.ObjectGetPrimaryKeyTypeRef(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const table: pointer; type_ref: POCIRef): sword; begin Result := OracleAPI.OCIObjectGetPrimaryKeyTypeRef(env, err, svc, table, type_ref); end; function TZOracle9iPlainDriver.ObjectGetInd(env: POCIEnv; err: POCIError; const instance: pointer; null_struct: PPointer): sword; begin Result := OracleAPI.OCIObjectGetInd(env, err, instance, null_struct); end; function TZOracle9iPlainDriver.ObjectExists(env: POCIEnv; err: POCIError; const ins: pointer; exist: PBoolean): sword; begin Result := OracleAPI.OCIObjectExists(env, err, ins, exist); end; function TZOracle9iPlainDriver.ObjectGetProperty(envh: POCIEnv; errh: POCIError; const obj: pointer; const propertyId: OCIObjectPropId; _property: pointer; size: Pub4): sword; begin Result := OracleAPI.OCIObjectGetProperty(envh, errh, obj, propertyId, _property, size); end; function TZOracle9iPlainDriver.ObjectIsLocked(env: POCIEnv; err: POCIError; const ins: pointer; lock: Pboolean): sword; begin Result := OracleAPI.OCIObjectIsLocked(env, err, ins, lock); end; function TZOracle9iPlainDriver.ObjectIsDirty(env: POCIEnv; err: POCIError; const ins: pointer; dirty: PBoolean): sword; begin Result := OracleAPI.OCIObjectIsDirty(env, err, ins, dirty); end; function TZOracle9iPlainDriver.ObjectPinTable(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const schema_name: Poratext; const s_n_length: ub4; const object_name: Poratext; const o_n_length:ub4; const scope_obj_ref: POCIRef; const pin_duration: OCIDuration; _object: PPointer): sword; begin Result := OracleAPI.OCIObjectPinTable(env, err, svc, schema_name, s_n_length, object_name, o_n_length, scope_obj_ref, pin_duration, _object); end; function TZOracle9iPlainDriver.ObjectArrayPin(env: POCIEnv; err: POCIError; const ref_array: PPOCIRef; const array_size: ub4; const cor_array: PPOCIComplexObject; const cor_array_size: ub4; const pin_option: OCIPinOpt; const pin_duration: OCIDuration; const lock: OCILockOpt; obj_array: PPointer; pos: Pub4): sword; begin Result := OracleAPI.OCIObjectArrayPin(env, err, ref_array, array_size, cor_array, cor_array_size, pin_option, pin_duration, lock, obj_array, pos); end; function TZOracle9iPlainDriver.CacheFlush(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const context: pointer; const get: TOCICacheFlushGet; ref: PPOCIRef): sword; begin Result := OracleAPI.OCICacheFlush(env, err, svc, context, get, ref); end; function TZOracle9iPlainDriver.CacheRefresh(env: POCIEnv; err: POCIError; const svc:POCISvcCtx; const option: OCIRefreshOpt; const context: pointer; get: TOCICacheRefreshGet; ref: PPOCIRef): sword; begin Result := OracleAPI.OCICacheRefresh(env, err, svc, option, context, get, ref); end; function TZOracle9iPlainDriver.CacheUnpin(env: POCIEnv; err: POCIError; const svc:POCISvcCtx): sword; begin Result := OracleAPI.OCICacheUnpin(env, err, svc); end; function TZOracle9iPlainDriver.CacheFree(env: POCIEnv; err: POCIError; const svc: POCISvcCtx): sword; begin Result := OracleAPI.OCICacheFree(env, err, svc); end; function TZOracle9iPlainDriver.CacheUnmark(env: POCIEnv; err: POCIError; const svc: POCISvcCtx): sword; begin Result := OracleAPI.OCICacheUnmark(env, err, svc); end; function TZOracle9iPlainDriver.DurationBegin(env: POCIEnv; err: POCIError; svc: POCISvcCtx; const parent: OCIDuration; dur: POCIDuration): sword; begin Result := OracleAPI.OCIDurationBegin(env, err, svc, parent, dur); end; function TZOracle9iPlainDriver.DurationEnd(env: POCIEnv; err: POCIError; svc: POCISvcCtx; duration: OCIDuration): sword; begin Result := OracleAPI.OCIDurationEnd(env, err, svc, duration); end; { < ori.h} function TZOracle9iPlainDriver.Break(svchp: POCISvcCtx; errhp: POCIError): sword; begin Result := OracleAPI.OCIBreak(svchp, errhp); end; function TZOracle9iPlainDriver.LobAppend(svchp: POCISvcCtx; errhp: POCIError; dst_locp, src_locp: POCILobLocator): sword; begin Result := OracleAPI.OCILobAppend(svchp, errhp, dst_locp, src_locp); end; function TZOracle9iPlainDriver.LobAssign(svchp: POCISvcCtx; errhp: POCIError; src_locp: POCILobLocator; var dst_locpp: POCILobLocator): sword; begin Result := OracleAPI.OCILobAssign(svchp, errhp, src_locp, dst_locpp); end; function TZOracle9iPlainDriver.LobCopy(svchp: POCISvcCtx; errhp: POCIError; dst_locp, src_locp: POCILobLocator; amount, dst_offset, src_offset: ub4): sword; begin Result := OracleAPI.OCILobCopy(svchp, errhp, dst_locp, src_locp, amount, dst_offset, src_offset); end; function TZOracle9iPlainDriver.LobDisableBuffering(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; begin Result := OracleAPI.OCILobDisableBuffering(svchp, errhp, locp); end; function TZOracle9iPlainDriver.LobEnableBuffering(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator): sword; begin Result := OracleAPI.OCILobEnableBuffering(svchp, errhp, locp); end; function TZOracle9iPlainDriver.LobErase(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var amount: ub4; offset: ub4): sword; begin Result := OracleAPI.OCILobErase(svchp, errhp, locp, amount, offset); end; function TZOracle9iPlainDriver.LobFileExists(svchp: POCISvcCtx; errhp: POCIError; filep: POCILobLocator; var flag: Boolean): sword; begin Result := OracleAPI.OCILobFileExists(svchp, errhp, filep, flag); end; function TZOracle9iPlainDriver.LobFileGetName(envhp: POCIEnv; errhp: POCIError; filep: POCILobLocator; dir_alias: text; var d_length: ub2; filename: text; var f_length: ub2): sword; begin Result := OracleAPI.OCILobFileGetName(envhp, errhp, filep, dir_alias, d_length, filename, f_length); end; function TZOracle9iPlainDriver.LobFileSetName(envhp: POCIEnv; errhp: POCIError; var filep: POCILobLocator; dir_alias: text; d_length: ub2; filename: text; f_length: ub2): sword; begin Result := OracleAPI.OCILobFileSetName(envhp, errhp, filep, dir_alias, d_length, filename, f_length); end; function TZOracle9iPlainDriver.LobFlushBuffer(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; flag: ub4): sword; begin Result := OracleAPI.OCILobFlushBuffer(svchp, errhp, locp, flag); end; function TZOracle9iPlainDriver.LobGetLength(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var lenp: ub4): sword; begin Result := OracleAPI.OCILobGetLength(svchp, errhp, locp, lenp); end; function TZOracle9iPlainDriver.LobIsOpen(svchp: POCISvcCtx; errhp: POCIError; locp: POCILobLocator; var flag: LongBool): sword; begin Result := OracleAPI.OCILobIsOpen(svchp, errhp, locp, flag); end; function TZOracle9iPlainDriver.LobLoadFromFile(svchp: POCISvcCtx; errhp: POCIError; dst_locp, src_locp: POCILobLocator; amount, dst_offset, src_offset: ub4): sword; begin Result := OracleAPI.OCILobLoadFromFile(svchp, errhp, dst_locp, src_locp, amount, dst_offset, src_offset); end; function TZOracle9iPlainDriver.LobLocatorIsInit(envhp: POCIEnv; errhp: POCIError; locp: POCILobLocator; var is_initialized: LongBool): sword; begin Result := OracleAPI.OCILobLocatorIsInit(envhp, errhp, locp, is_initialized); end; function TZOracle9iPlainDriver.Reset(svchp: POCISvcCtx; errhp: POCIError): sword; begin Result := OracleAPI.OCIReset(svchp, errhp); end; function TZOracle9iPlainDriver.NumberInc(err: POCIError; number: POCINumber): sword; begin Result := OracleAPI.OCINumberInc(err, number); end; function TZOracle9iPlainDriver.NumberDec(err: POCIError; number: POCINumber): sword; begin Result := OracleAPI.OCINumberDec(err, number); end; procedure TZOracle9iPlainDriver.NumberSetZero(err: POCIError; number: POCINumber); begin OracleAPI.OCINumberSetZero(err, number); end; procedure TZOracle9iPlainDriver.NumberSetPi(err: POCIError; number: POCINumber); begin OracleAPI.OCINumberSetPi(err, number); end; function TZOracle9iPlainDriver.NumberAdd(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberAdd(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberSub(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberSub(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberMul(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberMul(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberDiv(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberDiv(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberMod(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberMod(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberIntPower(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberIntPower(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberShift(err: POCIError; const number: POCINumber; const nDig: sword; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberShift(err, number, nDig, _result); end; function TZOracle9iPlainDriver.NumberNeg(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberNeg(err, number, _result); end; function TZOracle9iPlainDriver.NumberToText(err: POCIError; const number: POCINumber; const fmt: Poratext; fmt_length: ub4; const nls_params: Poratext; nls_p_length: ub4; buf_size: pub4; buf: poratext): sword; begin Result := OracleAPI.OCINumberToText(err, number, fmt, fmt_length, nls_params, nls_p_length, buf_size, buf); end; function TZOracle9iPlainDriver.NumberFromText(err: POCIError; const str: poratext; str_length: ub4; const fmt: poratext; fmt_length: ub4; const nls_params: poratext; nls_p_length: ub4; number: POCINumber): sword; begin Result := OracleAPI.OCINumberFromText(err, str, str_length, fmt, fmt_length, nls_params, nls_p_length, number); end; function TZOracle9iPlainDriver.NumberToInt(err: POCIError; const number: POCINumber; rsl_length: uword; rsl_flag: uword; rsl: Pointer): sword; begin Result := OracleAPI.OCINumberToInt(err, number, rsl_length, rsl_flag, rsl); end; function TZOracle9iPlainDriver.NumberFromInt(err: POCIError; const inum: Pointer; inum_length: uword; inum_s_flag: uword; number: POCINumber): sword; begin Result := OracleAPI.OCINumberFromInt(err, inum, inum_length, inum_s_flag, number); end; function TZOracle9iPlainDriver.NumberToReal(err: POCIError; const number: POCINumber; rsl_length: uword; rsl: Pointer): sword; begin Result := OracleAPI.OCINumberToReal(err, number, rsl_length, rsl); end; function TZOracle9iPlainDriver.NumberToRealArray(err: POCIError; const number: PPOCINumber; elems: uword; rsl_length: uword; rsl: Pointer): sword; begin Result := OracleAPI.OCINumberToRealArray(err, number, elems, rsl_length, rsl); end; function TZOracle9iPlainDriver.NumberFromReal(err: POCIError; const rnum: Pointer; rnum_length: uword; number: POCINumber): sword; begin Result := OracleAPI.OCINumberFromReal(err, rnum, rnum_length, number); end; function TZOracle9iPlainDriver.NumberCmp(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: psword): sword; begin Result := OracleAPI.OCINumberCmp(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberSign(err: POCIError; const number: POCINumber; _result: psword): sword; begin Result := OracleAPI.OCINumberSign(err, number, _result); end; function TZOracle9iPlainDriver.NumberIsZero(err: POCIError; const number: POCINumber; _Result: pboolean): sword; begin Result := OracleAPI.OCINumberIsZero(err, number, _result); end; function TZOracle9iPlainDriver.NumberIsInt(err: POCIError; const number: POCINumber; _result: Pboolean): sword; begin Result := OracleAPI.OCINumberIsInt(err, number, _result); end; function TZOracle9iPlainDriver.NumberAssign(err: POCIError; const from: POCINumber; _to: POCINumber): sword; begin Result := OracleAPI.OCINumberAssign(err, from, _to); end; function TZOracle9iPlainDriver.NumberAbs(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberAbs(err, number, _result); end; function TZOracle9iPlainDriver.NumberCeil(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberCeil(err, number, _result); end; function TZOracle9iPlainDriver.NumberFloor(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberFloor(err, number, _result); end; function TZOracle9iPlainDriver.NumberSqrt(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberSqrt(err, number, _result); end; function TZOracle9iPlainDriver.NumberTrunc(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberTrunc(err, number, _result); end; function TZOracle9iPlainDriver.NumberPower(err: POCIError; const base: POCINumber; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberPower(err, base, number, _result); end; function TZOracle9iPlainDriver.NumberRound(err: POCIError; const number: POCINumber; decplace: sword; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberRound(err, number, decplace, _result); end; function TZOracle9iPlainDriver.NumberPrec(err: POCIError; const number: POCINumber; nDigs: sword; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberPrec(err, number, nDigs, _result); end; function TZOracle9iPlainDriver.NumberSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberSin(err, number, _result); end; function TZOracle9iPlainDriver.NumberArcSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberArcSin(err, number, _result); end; function TZOracle9iPlainDriver.NumberHypSin(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberHypSin(err, number, _result); end; function TZOracle9iPlainDriver.NumberCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberCos(err, number, _result); end; function TZOracle9iPlainDriver.NumberArcCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberArcCos(err, number, _result); end; function TZOracle9iPlainDriver.NumberHypCos(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberHypCos(err, number, _result); end; function TZOracle9iPlainDriver.NumberTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberTan(err, number, _result); end; function TZOracle9iPlainDriver.NumberArcTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberArcTan(err, number, _result); end; function TZOracle9iPlainDriver.NumberArcTan2(err: POCIError; const number1: POCINumber; const number2: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberArcTan2(err, number1, number2, _result); end; function TZOracle9iPlainDriver.NumberHypTan(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberHypTan(err, number, _result); end; function TZOracle9iPlainDriver.NumberExp(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberExp(err, number, _result); end; function TZOracle9iPlainDriver.NumberLn(err: POCIError; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberLn(err, number, _result); end; function TZOracle9iPlainDriver.NumberLog(err: POCIError; const base: POCINumber; const number: POCINumber; _result: POCINumber): sword; begin Result := OracleAPI.OCINumberLog(err, base, number, _result); end; function TZOracle9iPlainDriver.TableSize(hndl: POCIEnv; err: POCIError; const tbl: POCITable; size: psb4): sword; begin Result := OracleAPI.OCITableSize(hndl, err, tbl, size); end; function TZOracle9iPlainDriver.TableExists(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4; exists: PBoolean): sword; begin Result := OracleAPI.OCITableExists(hndl, err, tbl, index, exists); end; function TZOracle9iPlainDriver.TableDelete(hndl: POCIEnv; err: POCIError; index: sb4; tbl: POCITable): sword; begin Result := OracleAPI.OCITableDelete(hndl, err, index, tbl); end; function TZOracle9iPlainDriver.TableFirst(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4): sword; begin Result := OracleAPI.OCITableFirst(hndl, err, tbl, index); end; function TZOracle9iPlainDriver.TableLast(hndl: POCIEnv; err: POCIError; const tbl: POCITable; index: sb4): sword; begin Result := OracleAPI.OCITableLast(hndl, err, tbl, index); end; function TZOracle9iPlainDriver.TableNext(hndl: POCIEnv; err: POCIError; index: sb4; const tbl: POCITable; next_index: psb4; exists: PBoolean): sword; begin Result := OracleAPI.OCITableNext(hndl, err, index, tbl, next_index, exists); end; function TZOracle9iPlainDriver.TablePrev(hndl: POCIEnv; err: POCIError; index: sb4; const tbl: POCITable; prev_index: psb4; exists: PBoolean): sword; begin Result := OracleAPI.OCITablePrev(hndl, err, index, tbl, prev_index, exists); end; function TZOracle9iPlainDriver.ObjectSetAttr(env: POCIEnv; err: POCIError; instance: Pointer; null_struct: pointer; tdo: POCIType; const names: PPAnsiChar; const lengths: pub4; const name_count: ub4; const indexes: pub4; const index_count: ub4; const null_status: POCIInd; const attr_null_struct: Pointer; const attr_value: Pointer): sword; begin Result := OracleAPI.OCIObjectSetAttr(env, err, instance, null_struct, tdo, names, lengths, name_count, indexes, index_count, null_status, attr_null_struct, attr_value); end; function TZOracle9iPlainDriver.ObjectGetAttr(env: POCIEnv; err: POCIError; instance: Pointer; null_struct: Pointer; tdo: POCIType; const names: PPoratext; const lengths: pub4; const name_count: ub4; const indexes: pub4; const index_count: ub4; attr_null_status: POCIInd; attr_null_struct, attr_value: PPointer; attr_tdo: PPOCIType): sword; begin Result := OracleAPI.OCIObjectGetAttr(env, err, instance, null_struct, tdo, names, lengths, name_count, indexes, index_count, attr_null_status, attr_null_struct, attr_value, attr_tdo); end; function TZOracle9iPlainDriver.StmtGetPieceInfo(stmtp: POCIStmt; errhp: POCIError; var hndlpp: Pointer; var typep: ub4; var in_outp: ub1; var iterp, idxp: ub4; var piecep: ub1): sword; begin Result := OracleAPI.OCIStmtGetPieceInfo(stmtp, errhp, hndlpp, typep, in_outp, iterp, idxp, piecep); end; function TZOracle9iPlainDriver.StmtSetPieceInfo(handle: Pointer; typep: ub4; errhp: POCIError; buf: Pointer; var alenp: ub4; piece: ub1; indp: Pointer; var rcodep: ub2): sword; begin Result := OracleAPI.OCIStmtSetPieceInfo(handle, typep, errhp, buf, alenp, piece, indp, rcodep); end; function TZOracle9iPlainDriver.TransDetach(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; begin Result := OracleAPI.OCITransDetach(svchp, errhp, flags); end; function TZOracle9iPlainDriver.TransForget(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; begin Result := OracleAPI.OCITransForget(svchp, errhp, flags); end; function TZOracle9iPlainDriver.TransPrepare(svchp: POCISvcCtx; errhp: POCIError; flags: ub4): sword; begin Result := OracleAPI.OCITransPrepare(svchp, errhp, flags); end; function TZOracle9iPlainDriver.DateTimeAssign(hndl: POCIEnv; err: POCIError; const from: POCIDateTime; _to: POCIDateTime): sword; begin Result := OracleAPI.OCIDateTimeAssign(hndl, err, from, _to); end; function TZOracle9iPlainDriver.DateTimeCheck(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; var valid: ub4): sword; begin Result := OracleAPI.OCIDateTimeCheck(hndl, err, date, valid); end; function TZOracle9iPlainDriver.DateTimeCompare(hndl: POCIEnv; err: POCIError; const date1, date2: POCIDateTime; var _result: sword): sword; begin Result := OracleAPI.OCIDateTimeCompare(hndl, err, date1, date2, _result); end; function TZOracle9iPlainDriver.DateTimeConvert(hndl: POCIEnv; err: POCIError; indate, outdate: POCIDateTime): sword; begin Result := OracleAPI.OCIDateTimeConvert(hndl, err, indate, outdate); end; function TZOracle9iPlainDriver.DateTimeFromText(hndl: POCIEnv; err: POCIError; const date_str: text; d_str_length: size_t; const fmt: text; fmt_length: ub1; const lang_name: text; lang_length: size_t; date: POCIDateTime): sword; begin Result := OracleAPI.OCIDateTimeFromText(hndl, err, date_str, d_str_length, fmt, fmt_length, lang_name, lang_length, date); end; function TZOracle9iPlainDriver.DateTimeGetTimeZoneName(hndl: POCIEnv; err: POCIError; datetime: POCIDateTime; var buf: ub1; var buflen: ub4): sword; begin Result := OracleAPI.OCIDateTimeGetTimeZoneName(hndl, err, datetime, buf, buflen); end; function TZOracle9iPlainDriver.DateTimeGetTimeZoneOffset(hndl: POCIEnv; err: POCIError; const datetime: POCIDateTime; var hour, minute: sb1): sword; begin Result := OracleAPI.OCIDateTimeGetTimeZoneOffset(hndl, err, datetime, hour, minute); end; function TZOracle9iPlainDriver.DateTimeSysTimeStamp(hndl: POCIEnv; err: POCIError; sys_date: POCIDateTime): sword; begin Result := OracleAPI.OCIDateTimeSysTimeStamp(hndl, err, sys_date); end; function TZOracle9iPlainDriver.DateTimeToText(hndl: POCIEnv; err: POCIError; const date: POCIDateTime; const fmt: text; fmt_length, fsprec: ub1; const lang_name: text; lang_length: size_t; var buf_size: ub4; buf: text): sword; begin Result := OracleAPI.OCIDateTimeToText(hndl, err, date, fmt, fmt_length, fsprec, lang_name, lang_length, buf_size, buf); end; {ort.h} function TZOracle9iPlainDriver.TypeIterNew(env: POCIEnv; err: POCIError; const tdo: POCIType; iterator_ort: PPOCITypeIter): sword; begin Result := OracleAPI.OCITypeIterNew(env, err, tdo, iterator_ort); end; function TZOracle9iPlainDriver.TypeIterSet(env: POCIEnv; err: POCIError; const tdo: POCIType; iterator_ort: POCITypeIter): sword; begin Result := OracleAPI.OCITypeIterSet(env, err, tdo, iterator_ort); end; function TZOracle9iPlainDriver.TypeIterFree(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter): sword; begin Result := OracleAPI.OCITypeIterFree(env, err, iterator_ort); end; function TZOracle9iPlainDriver.TypeByName(env: POCIEnv; err: POCIError; const svc: POCISvcCtx; schema_name: Poratext; const s_length: ub4; const type_name: Poratext; const t_length: ub4; version_name: Poratext; const v_length: ub4; const pin_duration: OCIDuration; const get_option: OCITypeGetOpt; tdo: PPOCIType): sword; begin Result := OracleAPI.OCITypeByName(env, err, svc, schema_name, s_length, type_name, t_length, version_name, v_length, pin_duration, get_option, tdo); end; function TZOracle9iPlainDriver.TypeArrayByName(env: POCIEnv; err: POCIError; svc: POCISvcCtx; array_len: ub4; schema_name: PPoratext; s_length: Pub4; type_name: PPoratext; t_length: Pub4; version_name: PPoratext; v_length: Pub4; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; begin Result := OracleAPI.OCITypeArrayByName(env, err, svc, array_len, schema_name, s_length, type_name, t_length, version_name, v_length, pin_duration, get_option, tdo); end; function TZOracle9iPlainDriver.TypeArrayByRef(env: POCIEnv; err: POCIError; array_len: ub4; type_ref: PPOCIRef; pin_duration: OCIDuration; get_option: OCITypeGetOpt; tdo: PPOCIType): sword; begin Result := OracleAPI.OCITypeArrayByRef(env, err, array_len, type_ref, pin_duration, get_option, tdo); end; function TZOracle9iPlainDriver.TypeName(env: POCIEnv; err: POCIError; tdo: POCIType; n_length: Pub4): poratext; begin Result := OracleAPI.OCITypeName(env, err, tdo, n_length); end; function TZOracle9iPlainDriver.TypeSchema(env: POCIEnv; err: POCIError; const tdo: POCIType; n_length: Pub4): poratext; begin Result := OracleAPI.OCITypeSchema(env, err, tdo, n_length); end; function TZOracle9iPlainDriver.TypeTypeCode(env: POCIEnv; err: POCIError; const tdo: POCIType): OCITypeCode; begin Result := OracleAPI.OCITypeTypeCode(env, err, tdo); end; function TZOracle9iPlainDriver.TypeCollTypeCode(env: POCIEnv; err:POCIError; const tdo: POCIType): OCITypeCode; begin Result := OracleAPI.OCITypeCollTypeCode(env, err, tdo); end; function TZOracle9iPlainDriver.TypeVersion(env: POCIEnv; err: POCIError; const tdo: POCIType; v_length: Pub4): poratext; begin Result := OracleAPI.OCITypeVersion(env, err, tdo, v_length); end; function TZOracle9iPlainDriver.TypeAttrs(env: POCIEnv; err: POCIError; const tdo:POCIType): ub4; begin Result := OracleAPI.OCITypeAttrs(env, err, tdo); end; function TZOracle9iPlainDriver.TypeMethods(env: POCIEnv; err: POCIError; const tdo: POCIType): ub4; begin Result := OracleAPI.OCITypeMethods(env, err, tdo); end; function TZOracle9iPlainDriver.TypeElemName(env: POCIEnv; err: POCIError; const elem: POCITypeElem; n_length:Pub4): poratext; begin Result := OracleAPI.OCITypeElemName(env, err, elem, n_length); end; function TZOracle9iPlainDriver.TypeElemTypeCode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeCode; begin Result := OracleAPI.OCITypeElemTypeCode(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemType(env: POCIEnv; err: POCIError; const elem: POCITypeElem; elem_tdo:PPOCIType): sword; begin Result := OracleAPI.OCITypeElemType(env, err, elem, elem_tdo); end; function TZOracle9iPlainDriver.TypeElemFlags(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub4; begin Result := OracleAPI.OCITypeElemFlags(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemNumPrec(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub1; begin Result := OracleAPI.OCITypeElemNumPrec(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemNumScale(env: POCIEnv; err: POCIError; const elem: POCITypeElem): sb1; begin Result := OracleAPI.OCITypeElemNumScale(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemLength(env: POCIEnv; err: POCIError; const elem:POCITypeElem): ub4; begin Result := OracleAPI.OCITypeElemLength(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemCharSetID(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub2; begin Result := OracleAPI.OCITypeElemCharSetID(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemCharSetForm(env: POCIEnv; err: POCIError; const elem: POCITypeElem): ub2; begin Result := OracleAPI.OCITypeElemCharSetForm(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemParameterizedType(env: POCIEnv; err: POCIError; const elem: POCITypeElem; type_stored: PPOCIType): sword; begin Result := OracleAPI.OCITypeElemParameterizedType(env, err, elem, type_stored); end; function TZOracle9iPlainDriver.TypeElemExtTypeCode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeCode; begin Result := OracleAPI.OCITypeElemExtTypeCode(env, err, elem); end; function TZOracle9iPlainDriver.TypeAttrByName(env: POCIEnv; err: POCIError; const tdo: POCIType; const name: Poratext; const n_length: ub4; elem: PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeAttrByName(env, err, tdo, name, n_length, elem); end; function TZOracle9iPlainDriver.TypeAttrNext(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter; elem: PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeAttrNext(env, err, iterator_ort, elem); end; function TZOracle9iPlainDriver.TypeCollElem(env: POCIEnv; err: POCIError; const tdo:POCIType; element: PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeCollElem(env, err, tdo, element); end; function TZOracle9iPlainDriver.TypeCollSize(env: POCIEnv; err: POCIError; const tdo: POCIType; num_elems: Pub4): sword; begin Result := OracleAPI.OCITypeCollSize(env, err, tdo, num_elems); end; function TZOracle9iPlainDriver.TypeCollExtTypeCode(env: POCIEnv; err: POCIError; const tdo:POCIType; sqt_code: POCITypeCode): sword; begin Result := OracleAPI.OCITypeCollExtTypeCode(env, err, tdo, sqt_code); end; function TZOracle9iPlainDriver.TypeMethodOverload(env: POCIEnv; err: POCIError; const tdo: POCIType; const method_name: Poratext; const m_length: ub4): ub4; begin Result := OracleAPI.OCITypeMethodOverload(env, err, tdo, method_name, m_length); end; function TZOracle9iPlainDriver.TypeMethodByName(env: POCIEnv; err: POCIError; const tdo: POCIType; const method_name: Poratext; const m_length: ub4; mdos: PPOCITypeMethod): sword; begin Result := OracleAPI.OCITypeMethodByName(env, err, tdo, method_name, m_length, mdos); end; function TZOracle9iPlainDriver.TypeMethodNext(env: POCIEnv; err: POCIError; iterator_ort: POCITypeIter; mdo: PPOCITypeMethod): sword; begin Result := OracleAPI.OCITypeMethodNext(env, err, iterator_ort, mdo); end; function TZOracle9iPlainDriver.TypeMethodName(env:POCIEnv; err: POCIError; const mdo: POCITypeMethod; n_length: Pub4): poratext; begin Result := OracleAPI.OCITypeMethodName(env, err, mdo, n_length); end; function TZOracle9iPlainDriver.TypeMethodEncap(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod): OCITypeEncap; begin Result := OracleAPI.OCITypeMethodEncap(env, err, mdo); end; function TZOracle9iPlainDriver.TypeMethodFlags(env: POCIEnv; err: POCIError; const mdo:POCITypeMethod): OCITypeMethodFlag; begin Result := OracleAPI.OCITypeMethodFlags(env, err, mdo); end; function TZOracle9iPlainDriver.TypeMethodMap(env: POCIEnv; err: POCIError; const tdo: POCIType; mdo: PPOCITypeMethod): sword; begin Result := OracleAPI.OCITypeMethodMap(env, err, tdo, mdo); end; function TZOracle9iPlainDriver.TypeMethodOrder(env: POCIEnv; err: POCIError; const tdo: POCIType; mdo: PPOCITypeMethod): sword; begin Result := OracleAPI.OCITypeMethodOrder(env, err, tdo, mdo); end; function TZOracle9iPlainDriver.TypeMethodParams(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod): ub4; begin Result := OracleAPI.OCITypeMethodParams(env, err, mdo); end; function TZOracle9iPlainDriver.TypeResult(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; elem: PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeResult(env, err, mdo, elem); end; function TZOracle9iPlainDriver.TypeParamByPos(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const position: ub4; elem: PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeParamByPos(env, err, mdo, position, elem); end; function TZOracle9iPlainDriver.TypeParamByName(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4; elem:PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeParamByName(env, err, mdo, name, n_length, elem); end; function TZOracle9iPlainDriver.TypeParamPos(env: POCIEnv; err: POCIError; const mdo: POCITypeMethod; const name: Poratext; const n_length: ub4; position: Pub4; elem: PPOCITypeElem): sword; begin Result := OracleAPI.OCITypeParamPos(env, err, mdo, name, n_length, position, elem); end; function TZOracle9iPlainDriver.TypeElemParamMode(env: POCIEnv; err: POCIError; const elem: POCITypeElem): OCITypeParamMode; begin Result := OracleAPI.OCITypeElemParamMode(env, err, elem); end; function TZOracle9iPlainDriver.TypeElemDefaultValue(env: POCIEnv; err: POCIError; const elem: POCITypeElem; d_v_length: Pub4): poratext; begin Result := OracleAPI.OCITypeElemDefaultValue(env, err, elem, d_v_length); end; function TZOracle9iPlainDriver.TypeVTInit(env: POCIEnv; err: POCIError): sword; begin Result := OracleAPI.OCITypeVTInit(env, err); end; function TZOracle9iPlainDriver.TypeVTInsert(env: POCIEnv; err: POCIError; const schema_name: Poratext; const s_n_length: ub4; const type_name: Poratext; const t_n_length: ub4; const user_version:Poratext; const u_v_length:ub4): sword; begin Result := OracleAPI.OCITypeVTInsert(env, err, schema_name, s_n_length, type_name, t_n_length, user_version, u_v_length); end; function TZOracle9iPlainDriver.TypeVTSelect(env: POCIEnv; err: POCIError; const schema_name: Poratext; const s_n_length: ub4; const type_name: Poratext; const t_n_length: ub4; user_version: PPoratext; u_v_length: Pub4; version: Pub2): sword; begin Result := OracleAPI.OCITypeVTSelect(env, err, schema_name, s_n_length, type_name, t_n_length, user_version, u_v_length, version); end; *) end.
48.001807
147
0.713321
f181b705f9b66f80bd8b21ec65720ac91d19d229
6,762
pas
Pascal
Source/Network.NonTransit.pas
atkins126/PTSKIM
dee55232fd91507ec51ca8c5f5492515c6b6b263
[ "MIT" ]
5
2021-08-10T09:33:38.000Z
2021-12-31T17:36:08.000Z
Source/Network.NonTransit.pas
atkins126/PTSKIM
dee55232fd91507ec51ca8c5f5492515c6b6b263
[ "MIT" ]
null
null
null
Source/Network.NonTransit.pas
atkins126/PTSKIM
dee55232fd91507ec51ca8c5f5492515c6b6b263
[ "MIT" ]
2
2019-12-31T01:30:08.000Z
2020-09-12T01:07:33.000Z
unit Network.NonTransit; //////////////////////////////////////////////////////////////////////////////// // // Author: Jaap Baak // https://github.com/transportmodelling/PTSKIM // //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// interface //////////////////////////////////////////////////////////////////////////////// Uses Classes,SysUtils,Types,ArrayHlp,PropSet,Parse,matio,matio.Formats,Globals,UserClass,Connection; Type TNonTransitConnection = Class(TConnection) public Procedure SetUserClassImpedance(const [ref] UserClass: TUserClass); override; end; TNonTransitNetwork = Class private FromNode: Integer; MaxAccessDist,MaxTransferDist,MaxEgressDist: Float64; AsTheCrowFliesAccessEgressDistances,AsTheCrowFliesTransferDistances: Boolean; // As the crow flies distance fields Coordinates: TArray<TPointF>; DistanceFactor,TimeFactor: Float64; // Level of service fields LevelOfServiceReader: TMatrixReader; Times,Distances,Costs: TMatrixRow; Function GetLevelOfService(const ToNode: Integer; out Time,Distance,Cost: Float64): Boolean; public Constructor Create(MaxAccessDistance,MaxTransferDistance,MaxEgressDistance: Float64; UseAsTheCrowFliesAccessEgressDistances,UseAsTheCrowFliesTransferDistances: Boolean); Function UsesLevelOfService: Boolean; Function UsesAsTheCrowFliesDistances: Boolean; Procedure Initialize(const NodesFileName: String; const DetourFactor,Speed: Float64); overload; Procedure Initialize(const [ref] LevelOfService: TPropertySet); overload; Procedure ProceedToNextOrigin; Function Connection(const ToNode: Integer): TNonTransitConnection; end; //////////////////////////////////////////////////////////////////////////////// implementation //////////////////////////////////////////////////////////////////////////////// Procedure TNonTransitConnection.SetUserClassImpedance(const [ref] UserClass: TUserClass); begin if FCost = 0.0 then FImpedance := FTime else FImpedance := FTime + FCost/UserClass.ValueOfTime; end; //////////////////////////////////////////////////////////////////////////////// Constructor TNonTransitNetwork.Create(MaxAccessDistance,MaxTransferDistance,MaxEgressDistance: Float64; UseAsTheCrowFliesAccessEgressDistances,UseAsTheCrowFliesTransferDistances: Boolean); begin inherited Create; FromNode := -1; MaxAccessDist := MaxAccessDistance; MaxTransferDist := MaxTransferDistance; MaxEgressDist := MaxEgressDistance; AsTheCrowFliesAccessEgressDistances := UseAsTheCrowFliesAccessEgressDistances; AsTheCrowFliesTransferDistances := UseAsTheCrowFliesTransferDistances; end; Function TNonTransitNetwork.GetLevelOfService(const ToNode: Integer; out Time,Distance,Cost: Float64): Boolean; begin Result := false; if (((FromNode < NZones) or (ToNode < NZones)) and AsTheCrowFliesAccessEgressDistances) or ((FromNode >= NZones) and (ToNode >= NZones) and AsTheCrowFliesTransferDistances) then begin var CrowFlyDistance := sqrt(sqr(Coordinates[FromNode].X-Coordinates[ToNode].X) + sqr(Coordinates[FromNode].Y-Coordinates[ToNode].Y)); if CrowFlyDistance > 0.0 then begin Result := true; Time := TimeFactor*CrowFlyDistance; Distance := DistanceFactor*CrowFlyDistance; Cost := 0.0; end end else begin if LevelOfServiceReader <> nil then if Times[ToNode] > 0 then begin Result := true; Time := Times[ToNode]; Distance := Distances[ToNode]; Cost := Costs[ToNode]; end end; end; Function TNonTransitNetwork.UsesLevelOfService: Boolean; begin Result := (not AsTheCrowFliesAccessEgressDistances) or (not AsTheCrowFliesTransferDistances); end; Function TNonTransitNetwork.UsesAsTheCrowFliesDistances: Boolean; begin Result := AsTheCrowFliesAccessEgressDistances or AsTheCrowFliesTransferDistances; end; Procedure TNonTransitNetwork.Initialize(const NodesFileName: String; const DetourFactor,Speed: Float64); begin DistanceFactor := DetourFactor; TimeFactor := DetourFactor/Speed; // Read coordinates var NNodes := 0; var Reader := TStreamReader.Create(NodesFileName,TEncoding.ANSI); try var Parser := TStringParser.Create(Space); while not Reader.EndOfStream do begin Inc(NNodes); Parser.ReadLine(Reader); if Length(Coordinates) < NNodes then SetLength(Coordinates,NNodes+512); if Parser.Count >= 3 then if Parser.Int[0] = NNodes then begin Coordinates[NNodes-1].X := Parser[1]; Coordinates[NNodes-1].Y := Parser[2]; end else raise Exception.Create('Error reading coordinates node ' + NNodes.ToString) else raise Exception.Create('Error reading coordinates node ' + NNodes.ToString) end; SetLength(Coordinates,NNodes); finally Reader.Free; end; end; Procedure TNonTransitNetwork.Initialize(const [ref] LevelOfService: TPropertySet); begin if LevelOfService.Count > 0 then begin Times.Length := NNodes; Distances.Length := NNodes; Costs.Length := NNodes; LevelOfServiceReader := MatrixFormats.CreateReader(LevelOfService); if LevelOfServiceReader = nil then raise Exception.Create('Invalid matrix format'); end; end; Procedure TNonTransitNetwork.ProceedToNextOrigin; begin Inc(FromNode); if LevelOfServiceReader <> nil then LevelOfServiceReader.Read([Times,Distances,Costs]); end; Function TNonTransitNetwork.Connection(const ToNode: Integer): TNonTransitConnection; Var Time,Distance,Cost: Float64; begin Result := nil; if ((FromNode >= NZones) or (ToNode >= NZones)) and (FromNode <> ToNode) then begin if GetLevelOfService(ToNode,Time,Distance,Cost) then if FromNode < NZones then begin if Distance < MaxAccessDist then begin Result := TNonTransitConnection.Create; Result.FConnectionType := ctAccess; end end else if ToNode < NZones then begin if Distance < MaxEgressDist then begin Result := TNonTransitConnection.Create; Result.FConnectionType := ctEgress; end end else begin if Distance < MaxTransferDist then begin Result := TNonTransitConnection.Create; Result.FConnectionType := ctTransfer; end end; if Result <> nil then begin SetLength(Result.FMixedVolumes,NUserClasses); Result.FFromNode := FromNode; Result.FToNode := ToNode; Result.FTime := Time; Result.FDistance := Distance; Result.FCost := Cost; end end; end; end.
33.475248
122
0.66504
83f8f8c0cace02a326bad3a39c0623586e239758
11,559
pas
Pascal
LoggerPro.FileAppender.pas
mikatiming/loggerpro
9e1c6192913929bf331cd1639c82df77013d36c0
[ "Apache-2.0" ]
null
null
null
LoggerPro.FileAppender.pas
mikatiming/loggerpro
9e1c6192913929bf331cd1639c82df77013d36c0
[ "Apache-2.0" ]
null
null
null
LoggerPro.FileAppender.pas
mikatiming/loggerpro
9e1c6192913929bf331cd1639c82df77013d36c0
[ "Apache-2.0" ]
null
null
null
unit LoggerPro.FileAppender; { <@abstract(The unit to include if you want to use @link(TLoggerProFileAppender)) @author(Daniele Teti) } {$IF Defined(Android) or Defined(iOS)} {$DEFINE MOBILE} {$ENDIF} interface uses LoggerPro, System.Generics.Collections, System.SysUtils, System.Classes; type { @abstract(Logs to file using one different file for each different TAG used.) @author(Daniele Teti - d.teti@bittime.it) Implements log rotations. This appender is the default appender when no configuration is done on the @link(TLogger) class. Without any configuration LoggerPro uses the @link(TLoggerProFileAppender) with the default configuration. So the following two blocks of code are equivalent: @longcode(# ... TLogger.Initialize; //=> uses the TLoggerProFileAppender because no other configuration is provided ... ... TLogger.AddAppender(TLoggerProFileAppender.Create); TLogger.Initialize //=> uses the TLoggerProFileAppender as configured ... #) } TFileAppenderOption = (IncludePID); TFileAppenderOptions = set of TFileAppenderOption; TFileAppenderLogRow = reference to procedure(const LogItem: TLogItem; out LogRow: string); { @abstract(The default file appender) To learn how to use this appender, check the sample @code(file_appender.dproj) } TLoggerProFileAppender = class(TLoggerProAppenderBase) private fFormatSettings: TFormatSettings; fWritersDictionary: TObjectDictionary<string, TStreamWriter>; fMaxBackupFileCount: Integer; fMaxFileSizeInKiloByte: Integer; fLogFormat: string; fLogFileNameFormat: string; fFileAppenderOptions: TFileAppenderOptions; fLogsFolder: string; fEncoding: TEncoding; fOnLogRow: TFileAppenderLogRow; function WriterEncodingMatches(const aFileName: string): Boolean; function CreateWriter(const aFileName: string): TStreamWriter; procedure AddWriter(const aLogTag: String; var lWriter: TStreamWriter; var lLogFileName: string); procedure RotateLog(const aLogTag: String; lWriter: TStreamWriter); procedure RetryMove(const aFileSrc, aFileDest: string); protected function GetLogFileName(const aTag: string; const aFileNumber: Integer): string; procedure InternalWriteLog(const aStreamWriter: TStreamWriter; const aValue: string); inline; public const { @abstract(Defines the default format string used by the @link(TLoggerProFileAppender).) The positional parameters are the followings: @orderedList( @itemSetNumber 0 @item TimeStamp @item ThreadID @item LogType @item LogMessage @item LogTag ) } DEFAULT_LOG_FORMAT = '%0:s [TID %1:10u][%2:-8s] %3:s [%4:s]'; { @abstract(Defines the default format string used by the @link(TLoggerProFileAppender).) The positional parameters are the followings: @orderedList( @item SetNumber 0 @item ModuleName @item LogNum @item LogTag ) } DEFAULT_FILENAME_FORMAT = '%s.%2.2d.%s.log'; { @abstract(Defines number of log file set to mantain during logs rotation) } DEFAULT_MAX_BACKUP_FILE_COUNT = 5; { @abstract(Defines the max size of each log file) The actual meaning is: "If the file size is > than @link(DEFAULT_MAX_FILE_SIZE_KB) then rotate logs. } DEFAULT_MAX_FILE_SIZE_KB = 1000; { @abstract(Milliseconds to wait between the RETRY_COUNT times. } RETRY_DELAY = 200; { @abstract(How much times we have to retry if the file is locked?. } RETRY_COUNT = 5; constructor Create(aMaxBackupFileCount: Integer = DEFAULT_MAX_BACKUP_FILE_COUNT; aMaxFileSizeInKiloByte: Integer = DEFAULT_MAX_FILE_SIZE_KB; aLogsFolder: string = ''; aFileAppenderOptions: TFileAppenderOptions = []; aLogFileNameFormat: string = DEFAULT_FILENAME_FORMAT; aLogFormat: string = DEFAULT_LOG_FORMAT; aEncoding: TEncoding = nil); reintroduce; function LogFileName(const aTag: string): string; procedure Setup; override; procedure TearDown; override; procedure WriteLog(const aLogItem: TLogItem); overload; override; property OnLogRow: TFileAppenderLogRow read fOnLogRow write fOnLogRow; end; implementation uses System.IOUtils, idGlobal {$IF Defined(Android)} ,Androidapi.Helpers ,Androidapi.JNI.GraphicsContentViewText ,Androidapi.JNI.JavaTypes {$ENDIF} ; { TLoggerProFileAppender } function TLoggerProFileAppender.GetLogFileName(const aTag: string; const aFileNumber: Integer): string; var lExt: string; lModuleName: string; lPath: string; lFormat: string; begin {$IF Defined(Android)} lModuleName := TAndroidHelper.ApplicationTitle.Replace(' ', '_', [rfReplaceAll]); {$ENDIF} {$IF not Defined(Mobile)} lModuleName := TPath.GetFileNameWithoutExtension(GetModuleName(HInstance)); {$ENDIF} {$IF Defined(IOS)} raise Exception.Create('Platform not supported'); {$ENDIF} lFormat := fLogFileNameFormat; if TFileAppenderOption.IncludePID in fFileAppenderOptions then lModuleName := lModuleName + '_pid_' + IntToStr(CurrentProcessId).PadLeft(6, '0'); lPath := fLogsFolder; lExt := Format(lFormat, [lModuleName, aFileNumber, aTag]); Result := TPath.Combine(lPath, lExt); end; procedure TLoggerProFileAppender.Setup; begin if fLogsFolder = '' then begin {$IF (Defined(MSWINDOWS) or Defined(POSIX)) and (not Defined(MOBILE))} fLogsFolder := TPath.GetDirectoryName(GetModuleName(HInstance)); {$ENDIF} {$IF Defined(Android) or Defined(IOS)} fLogsFolder := TPath.GetSharedDocumentsPath(); {$ENDIF} end; if not TDirectory.Exists(fLogsFolder) then TDirectory.CreateDirectory(fLogsFolder); fFormatSettings := LoggerPro.GetDefaultFormatSettings; fWritersDictionary := TObjectDictionary<string, TStreamWriter>.Create([doOwnsValues]); end; procedure TLoggerProFileAppender.TearDown; begin fWritersDictionary.Free; end; procedure TLoggerProFileAppender.InternalWriteLog(const aStreamWriter: TStreamWriter; const aValue: string); begin aStreamWriter.WriteLine(aValue); aStreamWriter.Flush; end; function TLoggerProFileAppender.LogFileName(const aTag: string): string; var lWriter: TStreamWriter; begin if not FWritersDictionary.ContainsKey(aTag) then AddWriter(aTag, lWriter, Result) else Result := GetLogFileName(aTag, 0); end; procedure TLoggerProFileAppender.WriteLog(const aLogItem: TLogItem); var lWriter: TStreamWriter; lLogFileName: string; lLogRow: string; begin if not fWritersDictionary.TryGetValue(aLogItem.LogTag, lWriter) then begin AddWriter(aLogItem.LogTag, lWriter, lLogFileName); end; if not Assigned(fOnLogRow) then begin InternalWriteLog(lWriter, Format(fLogFormat, [datetimetostr(aLogItem.TimeStamp, fFormatSettings), aLogItem.ThreadID, aLogItem.LogTypeAsString, aLogItem.LogMessage, aLogItem.LogTag])); end else begin fOnLogRow(aLogItem, lLogRow); InternalWriteLog(lWriter, lLogRow); end; if lWriter.BaseStream.Size > fMaxFileSizeInKiloByte * 1024 then begin RotateLog(aLogItem.LogTag, lWriter); end; end; function TLoggerProFileAppender.WriterEncodingMatches(const aFileName: string): Boolean; var lTempReader: TStreamReader; lTempBuffer: String; lFileStream: TFileStream; begin lFileStream := TFileStream.Create(aFileName, fmShareDenyNone or fmOpenRead); try lTempReader := TStreamReader.Create(lFileStream, fEncoding); try SetLength(lTempBuffer, 1000); lTempBuffer := lTempReader.ReadToEnd; Result := True; except on EEncodingError do begin Result := False; end; else raise; end; lTempReader.Free; finally lFileStream.Free; end; end; procedure TLoggerProFileAppender.RetryMove(const aFileSrc, aFileDest: string); var lRetries: Integer; const MAX_RETRIES = 5; begin lRetries := 0; repeat try Sleep(50); // the incidence of "Locked file goes to nearly zero..." TFile.Move(aFileSrc, aFileDest); Break; except on E: EInOutError do begin Inc(lRetries); Sleep(50); end; on E: Exception do begin raise; end; end; until lRetries = MAX_RETRIES; if lRetries = MAX_RETRIES then raise ELoggerPro.CreateFmt('Cannot rename %s to %s', [aFileSrc, aFileDest]); end; procedure TLoggerProFileAppender.RotateLog(const aLogTag: String; lWriter: TStreamWriter); var lLogFileName: string; lRenamedFile: string; I: Integer; lCurrentFileName: string; begin InternalWriteLog(lWriter, '#[ROTATE LOG ' + datetimetostr(Now, fFormatSettings) + ']'); fWritersDictionary.Remove(aLogTag); lLogFileName := GetLogFileName(aLogTag, 0); // remove the last file of backup set lRenamedFile := GetLogFileName(aLogTag, fMaxBackupFileCount); if TFile.Exists(lRenamedFile) then TFile.Delete(lRenamedFile); // shift the files names for I := fMaxBackupFileCount - 1 downto 1 do begin lCurrentFileName := GetLogFileName(aLogTag, I); lRenamedFile := GetLogFileName(aLogTag, I + 1); if TFile.Exists(lCurrentFileName) then RetryMove(lCurrentFileName, lRenamedFile); end; lRenamedFile := GetLogFileName(aLogTag, 1); RetryMove(lLogFileName, lRenamedFile); // read the writer AddWriter(aLogTag, lWriter, lLogFileName); InternalWriteLog(lWriter, '#[START LOG ' + datetimetostr(Now, fFormatSettings) + ']'); end; procedure TLoggerProFileAppender.AddWriter(const aLogTag: String; var lWriter: TStreamWriter; var lLogFileName: string); begin lLogFileName := GetLogFileName(aLogTag, 0); lWriter := CreateWriter(lLogFileName); fWritersDictionary.Add(aLogTag, lWriter); if not WriterEncodingMatches(lLogFileName) then RotateLog(aLogTag, lWriter); end; constructor TLoggerProFileAppender.Create(aMaxBackupFileCount: Integer; aMaxFileSizeInKiloByte: Integer; aLogsFolder: string; aFileAppenderOptions: TFileAppenderOptions; aLogFileNameFormat: string; aLogFormat: string; aEncoding: TEncoding); begin inherited Create; fLogsFolder := aLogsFolder; fMaxBackupFileCount := aMaxBackupFileCount; fMaxFileSizeInKiloByte := aMaxFileSizeInKiloByte; fLogFormat := aLogFormat; fLogFileNameFormat := aLogFileNameFormat; fFileAppenderOptions := aFileAppenderOptions; if Assigned(aEncoding) then fEncoding := aEncoding else fEncoding := TEncoding.DEFAULT; end; function TLoggerProFileAppender.CreateWriter(const aFileName: string): TStreamWriter; var lFileStream: TFileStream; lFileAccessMode: Word; lRetries: Integer; begin lFileAccessMode := fmOpenWrite or fmShareDenyNone; if not TFile.Exists(aFileName) then lFileAccessMode := lFileAccessMode or fmCreate; // If the file si still blocked by a precedent execution or // for some other reasons, we try to access the file for 5 times. // If after 5 times (with a bit of delay in between) the file is still // locked, then the exception is raised. lRetries := 0; while true do begin try lFileStream := TFileStream.Create(aFileName, lFileAccessMode); try lFileStream.Seek(0, TSeekOrigin.soEnd); Result := TStreamWriter.Create(lFileStream, fEncoding, 32); Result.AutoFlush := true; Result.OwnStream; Break; except lFileStream.Free; raise; end; except if lRetries = RETRY_COUNT then begin raise; end else begin Inc(lRetries); Sleep(RETRY_DELAY); // just wait a little bit end; end; end; end; end.
30.742021
140
0.729475
83d84cdb90267f51034045d9b1e1a504218ea236
5,310
pas
Pascal
colorreduction.pas
c-yan/pngdrop
4044de9bbb7540612e49e7677dc68b600b765397
[ "ISC" ]
1
2020-02-29T00:32:37.000Z
2020-02-29T00:32:37.000Z
colorreduction.pas
c-yan/pngdrop
4044de9bbb7540612e49e7677dc68b600b765397
[ "ISC" ]
1
2018-08-28T12:05:57.000Z
2018-08-28T12:05:57.000Z
colorreduction.pas
c-yan/pngdrop
4044de9bbb7540612e49e7677dc68b600b765397
[ "ISC" ]
1
2020-02-29T00:32:37.000Z
2020-02-29T00:32:37.000Z
unit ColorReduction; {$mode objfpc}{$H+} interface uses Graphics, IntfGraphics; type TReduceColorConfig = record Colors: integer; Dither: boolean; KMeans: boolean; end; TLog = procedure(Message: string); function ReduceColor(Src: TBitmap; Config: TReduceColorConfig; Log: TLog): TLazIntfImage; implementation uses SysUtils, GraphType, FPimage; type TIntegerTriple = packed array[0..2] of integer; TIntegerTripleArray = array[0..0] of TIntegerTriple; PIntegerTripleArray = ^TIntegerTripleArray; TByteTriple = packed array[0..2] of byte; TByteTripleArray = array[0..0] of TByteTriple; PByteTripleArray = ^TByteTripleArray; TPalette = array of TByteTriple; function ColorDiff(C1, C2: TByteTriple): integer; inline; begin Result := (C1[0] - C2[0]) * (C1[0] - C2[0]) + (C1[1] - C2[1]) * (C1[1] - C2[1]) + (C1[2] - C2[2]) * (C1[2] - C2[2]); end; function TByteTripleToTFPColor(Value: TByteTriple): TFPColor; begin Result.blue := (Value[0] shl 8) + Value[0]; Result.green := (Value[1] shl 8) + Value[1]; Result.red := (Value[2] shl 8) + Value[2]; Result.alpha := FPImage.alphaOpaque; end; function CreatePalette(Src: TBitmap; Config: TReduceColorConfig; Log: TLog): TPalette; var I: integer; B, G, R: integer; begin Log('Create palette'); SetLength(Result, 256); for R := 0 to 5 do begin for G := 0 to 5 do begin for B := 0 to 5 do begin Result[R * 36 + G * 6 + B][0] := B * 51; Result[R * 36 + G * 6 + B][1] := G * 51; Result[R * 36 + G * 6 + B][2] := R * 51; end; end; end; for I := 216 to 255 do begin Result[I][0] := 0; Result[I][1] := 0; Result[I][2] := 0; end; end; function GetNearestIndex(C: TByteTriple; Palette: TPalette): integer; var I: integer; BestError, E: integer; begin BestError := High(integer); Result := -1; for I := 0 to Length(Palette) - 1 do begin E := ColorDiff(C, Palette[I]); if E < BestError then begin BestError := E; Result := I; end; end; end; procedure MapColor(Src: TBitmap; Dst: TLazIntfImage; Palette: TPalette; Log: TLog); var Y, X: integer; SrcRow, DstRow: PByteTripleArray; begin Log('Map color'); for Y := 0 to Src.Height - 1 do begin SrcRow := PByteTripleArray(Src.RawImage.GetLineStart(Y)); DstRow := Dst.GetDataLineStart(Y); for X := 0 to Src.Width - 1 do begin DstRow^[X] := Palette[GetNearestIndex(SrcRow^[X], Palette)]; end; end; end; function Clamp(N: integer): integer; inline; begin if N < 0 then N := 0 else if N > 255 then N := 255; Result := N; end; procedure MapColorWithDither(Src: TBitmap; Dst: TLazIntfImage; Palette: TPalette; Log: TLog); var Y, X: integer; SrcRow, DstRow: PByteTripleArray; C: TByteTriple; I, N: integer; Diffs: array[0..2] of PIntegerTripleArray; begin Log('Map color with dither'); for I := 0 to 1 do begin Diffs[I] := AllocMem((Src.Width + 2) * SizeOf(TIntegerTriple)); FillChar(Diffs[I]^, (Src.Width + 2) * SizeOf(TIntegerTriple), 0); end; for Y := 0 to Src.Height - 1 do begin SrcRow := PByteTripleArray(Src.RawImage.GetLineStart(Y)); DstRow := Dst.GetDataLineStart(Y); for X := 0 to Src.Width - 1 do begin C := SrcRow^[X]; for I := 0 to 2 do begin N := Diffs[0]^[X][I]; N := N + Diffs[0]^[X + 1][I] * 5; N := N + Diffs[0]^[X + 2][I] * 3; N := N + Diffs[1]^[X][I] * 7; C[I] := Clamp(C[I] + N div 16); end; N := GetNearestIndex(C, Palette); DstRow^[X] := Palette[N]; for I := 0 to 2 do begin Diffs[1]^[X + 1][I] := C[I] - Palette[N][I]; end; end; Diffs[2] := Diffs[0]; Diffs[0] := Diffs[1]; Diffs[1] := Diffs[2]; end; end; procedure CalculateAverageError(Src: TBitmap; Dst: TLazIntfImage; Log: TLog); var Y, X: integer; SrcRow, DstRow: PByteTripleArray; ErrorSum: int64; begin Log('Calculate average error'); ErrorSum := 0; for Y := 0 to Src.Height - 1 do begin SrcRow := PByteTripleArray(Src.RawImage.GetLineStart(Y)); DstRow := Dst.GetDataLineStart(Y); for X := 0 to Src.Width - 1 do begin ErrorSum := ErrorSum + ColorDiff(SrcRow^[X], DstRow^[X]); end; end; Log(Format('Average error: %.3f', [ErrorSum / Src.Width / Src.Height])); end; function ReduceColor(Src: TBitmap; Config: TReduceColorConfig; Log: TLog): TLazIntfImage; var I: integer; Palette: TPalette; begin Result := TLazIntfImage.Create(Src.Width, Src.Height, [riqfRGB, riqfPalette]); Result.DataDescription.Init_BPP24_B8G8R8_M1_BIO_TTB(Result.Width, Result.Height); Result.CreateData(); Result.UsePalette := True; Result.Palette.Count := Config.Colors; Palette := CreatePalette(Src, Config, Log); for I := 0 to Config.Colors - 1 do Result.Palette[I] := TByteTripleToTFPColor(Palette[I]); if Config.Dither then MapColorWithDither(Src, Result, Palette, Log) else MapColor(Src, Result, Palette, Log); CalculateAverageError(Src, Result, Log); end; end.
24.583333
87
0.595669
f16882868d3227b16197c4f4a77bd38c4c0037ee
8,782
pas
Pascal
Examples/HTTP/AsyncHttpServer.RequestHandler.pas
lordcrc/AsyncIO
7ea7f930fa7491f046abe032f628570efde32381
[ "Apache-2.0" ]
33
2015-05-25T01:26:03.000Z
2021-11-16T11:24:59.000Z
Examples/HTTP/AsyncHttpServer.RequestHandler.pas
lordcrc/AsyncIO
7ea7f930fa7491f046abe032f628570efde32381
[ "Apache-2.0" ]
3
2016-07-19T09:49:00.000Z
2017-10-14T09:43:43.000Z
Examples/HTTP/AsyncHttpServer.RequestHandler.pas
lordcrc/AsyncIO
7ea7f930fa7491f046abe032f628570efde32381
[ "Apache-2.0" ]
7
2015-04-27T14:44:32.000Z
2021-09-30T01:42:12.000Z
unit AsyncHttpServer.RequestHandler; interface uses AsyncIO, AsyncHttpServer.Mime, AsyncHttpServer.Request, AsyncHttpServer.Response; type HttpRequestHandler = interface ['{AC26AF7B-589F-41D1-8449-995ECDADB2B4}'] {$REGION 'Property accessors'} function GetService: IOService; {$ENDREGION} function HandleRequest(const Request: HttpRequest): HttpResponse; property Service: IOService read GetService; end; function NewHttpRequestHandler(const Service: IOService; const DocRoot: string; const Mime: MimeRegistry): HttpRequestHandler; implementation uses WinAPI.Windows, System.SysUtils, System.Math, System.IOUtils, EncodingHelper, AsyncIO.Filesystem, AsyncHttpServer.Headers, HttpDateTime; const HTTP_GET_METHOD = 'GET'; HTTP_HEAD_METHOD = 'HEAD'; // I shouldn't complain, it's not even a decade since Vista was released... function GetFileSizeEx(hFile: THandle; out lpFileSize: int64): BOOL; stdcall; external kernel32; type URLParts = record Path: string; Query: string; end; function DecodeURLSegment(const Input: string; out Output: string; const PlusToSpace: boolean): boolean; var i, v: integer; c: char; hs: string; validHex: boolean; encc: string; begin result := False; Output := ''; i := 0; while (i < Input.Length) do begin c := Input.Chars[i]; if (c = '%') then begin hs := '$' + Input.Substring(i+1, 2); if (hs.Length <> 3) then exit; validHex := TryStrToInt(hs, v); if (not validHex) then exit; // assume encoded character is in default encoding encc := TEncoding.Default.GetString(PByte(@v), 0, 1); Output := Output + encc; i := i + 3; end else if (PlusToSpace and (c = '+')) then begin Output := Output + ' '; i := i + 1; end else begin Output := Output + c; i := i + 1; end; end; result := True; end; function DecodeURL(const URL: string; out Decoded: URLParts): boolean; var path: string; query: string; paramIndex, queryIndex, pathEndIndex: integer; begin // here we assume the URL represents an absolute path paramIndex := URL.IndexOf(';'); queryIndex := URL.IndexOf('?'); path := ''; query := ''; if ((paramIndex < 0) and (queryIndex < 0)) then begin // no path parameters nor query segment path := URL; end else begin if ((paramIndex < 0) or ((queryIndex >= 0) and (queryIndex < paramIndex))) then begin pathEndIndex := queryIndex; // no path parameter separator in path segment end else begin pathEndIndex := paramIndex; // path stops at path parameter separator end; path := URL.Substring(0, pathEndIndex); if (queryIndex > 0) then begin query := URL.Substring(queryIndex + 1, URL.Length); end; end; // now to decode the segments result := DecodeURLSegment(path, Decoded.Path, False); if (not result) then exit; result := DecodeURLSegment(query, Decoded.Query, True); if (not result) then exit; end; type HttpRequestHandlerImpl = class(TInterfacedObject, HttpRequestHandler) strict private FService: IOService; FDocRoot: string; FMime: MimeRegistry; function GetFullPath(const Filename: string): string; function GetFileModifiedTime(const FileStream: AsyncFileStream): TSystemTime; function GetFileSize(const FileStream: AsyncFileStream): Int64; procedure Log(const Msg: string); public constructor Create(const Service: IOService; const DocRoot: string; const Mime: MimeRegistry); function GetService: IOService; function HandleRequest(const Request: HttpRequest): HttpResponse; property Service: IOService read FService; property DocRoot: string read FDocRoot; property Mime: MimeRegistry read FMime; end; function NewHttpRequestHandler(const Service: IOService; const DocRoot: string; const Mime: MimeRegistry): HttpRequestHandler; begin result := HttpRequestHandlerImpl.Create(Service, DocRoot, Mime); end; { HttpRequestHandlerImpl } constructor HttpRequestHandlerImpl.Create(const Service: IOService; const DocRoot: string; const Mime: MimeRegistry); begin inherited Create; FService := Service; FDocRoot := IncludeTrailingPathDelimiter(DocRoot); FMime := Mime; end; function HttpRequestHandlerImpl.GetFileSize( const FileStream: AsyncFileStream): Int64; var res: boolean; begin res := GetFileSizeEx(FileStream.Handle, result); if (not res) then RaiseLastOSError(); end; function HttpRequestHandlerImpl.GetFileModifiedTime( const FileStream: AsyncFileStream): TSystemTime; var res: boolean; mt: TFileTime; begin res := WinAPI.Windows.GetFileTime(FileStream.Handle, nil, nil, @mt); if (not res) then RaiseLastOSError(); res := WinAPI.Windows.FileTimeToSystemTime(mt, result); if (not res) then RaiseLastOSError(); end; function HttpRequestHandlerImpl.GetFullPath(const Filename: string): string; var p: TArray<string>; i: integer; begin result := ''; p := Filename.Split(['/']); // we know start of Filename starts with / and ends with a filename Delete(p, 0, 1); i := 0; while (i < Length(p)) do begin if (p[i] = '..') then begin // check if we're attempting to escape root if (i < 1) then exit; i := i - 1; Delete(p, i, 2); end else begin i := i + 1; end; end; result := DocRoot + string.Join(PathDelim, p); end; function HttpRequestHandlerImpl.GetService: IOService; begin result := FService; end; function HttpRequestHandlerImpl.HandleRequest(const Request: HttpRequest): HttpResponse; var url: URLParts; urlValid: boolean; filename: string; fileExists: boolean; contentStream: AsyncFileStream; fileSize: Int64; modifiedTime: TSystemTime; hasIfModifiedSinceTime: boolean; ifModifiedSinceTime: TSystemTime; contentModified: boolean; contentType: string; begin try if (Request.HttpVersionMajor <> 1) then begin result := StandardResponse(StatusNotImplemented); exit; end; if ((Request.Method <> HTTP_GET_METHOD) and (Request.Method <> HTTP_HEAD_METHOD)) then begin result := StandardResponse(StatusNotImplemented); exit; end; urlValid := DecodeURL(Request.URI, url); // require absolute path urlValid := urlValid and (url.Path.Length > 0) and (url.Path.Chars[0] = '/') and (url.Path.IndexOf('//') < 0); if (not urlValid) then begin result := StandardResponse(StatusBadRequest); exit; end; filename := url.Path; if (filename.EndsWith('/')) then filename := filename + 'index.html'; filename := GetFullPath(filename); // check if all went well with resolving the full path // and that file actually exists fileExists := (filename <> '') and TFile.Exists(filename); if (not fileExists) then begin result := StandardResponse(StatusNotFound); exit; end; // all looking good // now to open the file and get the details for the headers contentStream := NewAsyncFileStream(Service, filename, fcOpenExisting, faRead, fsRead); fileSize := GetFileSize(contentStream); modifiedTime := GetFileModifiedTime(contentStream); // TESTING //DateTimeToSystemTime(Now(), modifiedTime); contentType := Mime.FileExtensionToMimeType(ExtractFileExt(filename)); hasIfModifiedSinceTime := TryHttpDateToSystemTime(Request.Headers.Value['If-Modified-Since'], ifModifiedSinceTime); if (hasIfModifiedSinceTime) then begin contentModified := CompareSystemTime(modifiedTime, ifModifiedSinceTime) > 0; if (not contentModified) then begin // content not modified, so we just send a standard 304 response result := StandardResponse(StatusNotModified); exit; end; end; result.Status := StatusOK; result.Headers.Value['Content-Length'] := IntToStr(fileSize); result.Headers.Value['Content-Type'] := contentType; result.Headers.Value['Last-Modified'] := SystemTimeToHttpDate(modifiedTime); // only send content if we've been asked to if (Request.Method = HTTP_GET_METHOD) then begin result.Content := nil; result.ContentStream := contentStream; end; except on E: Exception do begin Log('Error processing request'); Log(Format('Exception: [%s] %s', [E.ClassName, E.Message])); Log(Format('Request: %s %s HTTP/%d.%d', [Request.Method, Request.URI, Request.HttpVersionMajor, '.', Request.HttpVersionMinor])); result := StandardResponse(StatusInternalServerError); end; end; end; procedure HttpRequestHandlerImpl.Log(const Msg: string); begin WriteLn(Msg); end; end.
25.308357
135
0.682077
8369e14f70784b8b434c3c04b889743401fb89c7
946
pas
Pascal
source/TypeB_MessagingHub_REST_SERVER/ufmMain.pas
victorgv/TypeB_MessagingHub
ec057c4d0ddc1699d3c2d5ff36bedad70a73b67d
[ "MIT" ]
null
null
null
source/TypeB_MessagingHub_REST_SERVER/ufmMain.pas
victorgv/TypeB_MessagingHub
ec057c4d0ddc1699d3c2d5ff36bedad70a73b67d
[ "MIT" ]
null
null
null
source/TypeB_MessagingHub_REST_SERVER/ufmMain.pas
victorgv/TypeB_MessagingHub
ec057c4d0ddc1699d3c2d5ff36bedad70a73b67d
[ "MIT" ]
null
null
null
unit ufmMain; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, uTServiceRestServer; type TfmMain = class(TForm) Button1: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } fServiceRestServer: TServiceRestServer; public { Public declarations } end; var fmMain: TfmMain; implementation {$R *.dfm} procedure TfmMain.Button1Click(Sender: TObject); begin if not Assigned(fServiceRestServer) then fServiceRestServer := TServiceRestServer.create; fServiceRestServer.ServiceStart; end; procedure TfmMain.FormCreate(Sender: TObject); begin fServiceRestServer := NIL; end; procedure TfmMain.FormDestroy(Sender: TObject); begin fServiceRestServer.Free; end; end.
18.54902
98
0.756871
8391d3b894ca55deb2dd534261fc8e9110082f78
45,490
pas
Pascal
source/Vcls/mormot/SynTests.pas
fenglinyushu/dewebsdk
6f45b6bef96e4b431ad6a0071320e5f613be778b
[ "BSD-2-Clause" ]
2
2021-05-12T00:33:07.000Z
2021-09-01T06:54:17.000Z
source/Vcls/mormot/SynTests.pas
fenglinyushu/dewebsdk
6f45b6bef96e4b431ad6a0071320e5f613be778b
[ "BSD-2-Clause" ]
null
null
null
source/Vcls/mormot/SynTests.pas
fenglinyushu/dewebsdk
6f45b6bef96e4b431ad6a0071320e5f613be778b
[ "BSD-2-Clause" ]
null
null
null
/// Unit test functions used by Synopse projects // - this unit is a part of the freeware Synopse mORMot framework, // licensed under a MPL/GPL/LGPL tri-license; version 1.18 unit SynTests; (* This file is part of Synopse framework. Synopse framework. Copyright (C) 2020 Arnaud Bouchez Synopse Informatique - https://synopse.info *** BEGIN LICENSE BLOCK ***** Version: MPL 1.1/GPL 2.0/LGPL 2.1 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 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. The Original Code is Synopse framework. The Initial Developer of the Original Code is Arnaud Bouchez. Portions created by the Initial Developer are Copyright (C) 2020 the Initial Developer. All Rights Reserved. Contributor(s): Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. ***** END LICENSE BLOCK ***** *) {$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER interface uses {$ifdef MSWINDOWS} Windows, Messages, {$endif} {$ifdef KYLIX3} Types, {$endif} Classes, {$ifndef LVCL} {$ifdef HASINLINE} Types, {$endif} {$endif} {$ifndef NOVARIANTS} Variants, {$endif} SynCommons, SynTable, SynLog, SysUtils; { ************ Unit-Testing classes and functions } type /// the prototype of an individual test // - to be used with TSynTest descendants TSynTestEvent = procedure of object; /// allows to tune TSynTest process // - tcoLogEachCheck will log as sllCustom4 each non void Check() message TSynTestOption = (tcoLogEachCheck); /// set of options to tune TSynTest process TSynTestOptions = set of TSynTestOption; TSynTest = class; /// how published method information is stored within TSynTest TSynTestMethodInfo = record /// the uncamelcased method name TestName: string; /// ready-to-be-displayed 'Ident - TestName' text, as UTF-8 IdentTestName: RawUTF8; /// raw method name, as defined in pascal code (not uncamelcased) MethodName: RawUTF8; /// direct access to the method execution Method: TSynTestEvent; /// the test case holding this method Test: TSynTest; /// the index of this method in the TSynTestCase MethodIndex: integer; end; /// pointer access to published method information PSynTestMethodInfo = ^TSynTestMethodInfo; /// abstract parent class for both tests suit (TSynTests) and cases (TSynTestCase) // - purpose of this ancestor is to have RTTI for its published methods, // and to handle a class text identifier, or uncamelcase its class name // if no identifier was defined // - sample code about how to use this test framework is available in // the "Sample\07 - SynTest" folder TSynTest = class(TSynPersistent) protected fTests: array of TSynTestMethodInfo; fIdent: string; fInternalTestsCount: integer; fOptions: TSynTestOptions; function GetCount: Integer; function GetIdent: string; public /// create the test instance // - if an identifier is not supplied, the class name is used, after // T[Syn][Test] left trim and un-camel-case // - this constructor will add all published methods to the internal // test list, accessible via the Count/TestName/TestMethod properties constructor Create(const Ident: string = ''); reintroduce; virtual; /// register a specified test to this class instance // - Create will register all published methods of this class, but // your code may initialize its own set of methods on need procedure Add(const aMethod: TSynTestEvent; const aMethodName: RawUTF8; const aIdent: string); /// the test name // - either the Ident parameter supplied to the Create() method, either // a uncameled text from the class name property Ident: string read GetIdent; /// return the number of tests associated with this class // - i.e. the number of registered tests by the Register() method PLUS // the number of published methods defined within this class property Count: Integer read GetCount; /// return the number of published methods defined within this class as tests // - i.e. the number of tests added by the Create() constructor from RTTI // - any TestName/TestMethod[] index higher or equal to this value has been // added by a specific call to the Add() method property InternalTestsCount: integer read fInternalTestsCount; /// allows to tune the test case process property Options: TSynTestOptions read fOptions write fOptions; published { all published methods of the children will be run as individual tests - these methods must be declared as procedure with no parameter } end; TSynTests = class; /// a class implementing a test case // - should handle a test unit, i.e. one or more tests // - individual tests are written in the published methods of this class TSynTestCase = class(TSynTest) protected fOwner: TSynTests; fAssertions: integer; fAssertionsFailed: integer; fAssertionsBeforeRun: integer; fAssertionsFailedBeforeRun: integer; /// any number not null assigned to this field will display a "../s" stat fRunConsoleOccurenceNumber: cardinal; /// any number not null assigned to this field will display a "using .. MB" stat fRunConsoleMemoryUsed: Int64; /// any text assigned to this field will be displayed on console fRunConsole: string; fCheckLogTime: TPrecisionTimer; fCheckLastMsg: cardinal; fCheckLastTix: cardinal; /// called before all published methods are executed procedure Setup; virtual; /// called after all published methods are executed // - WARNING: this method should be re-entrant - so using FreeAndNil() is // a good idea in this method :) procedure CleanUp; virtual; /// called before each published methods execution procedure MethodSetup; virtual; /// called after each published methods execution procedure MethodCleanUp; virtual; procedure AddLog(condition: Boolean; const msg: string); public /// create the test case instance // - must supply a test suit owner // - if an identifier is not supplied, the class name is used, after // T[Syn][Test] left trim and un-camel-case constructor Create(Owner: TSynTests; const Ident: string = ''); reintroduce; virtual; /// clean up the instance // - will call CleanUp, even if already done before destructor Destroy; override; /// used by the published methods to run a test assertion // - condition must equals TRUE to pass the test procedure Check(condition: Boolean; const msg: string = ''); {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run a test assertion // - condition must equals TRUE to pass the test // - function return TRUE if the condition failed, in order to allow the // caller to stop testing with such code: // ! if CheckFailed(A=10) then exit; function CheckFailed(condition: Boolean; const msg: string = ''): Boolean; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run a test assertion // - condition must equals FALSE to pass the test // - function return TRUE if the condition failed, in order to allow the // caller to stop testing with such code: // ! if CheckNot(A<>10) then exit; function CheckNot(condition: Boolean; const msg: string = ''): Boolean; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run test assertion against integers // - if a<>b, will fail and include '#<>#' text before the supplied msg function CheckEqual(a,b: Int64; const msg: RawUTF8 = ''): Boolean; overload; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run test assertion against UTF-8 strings // - if a<>b, will fail and include '#<>#' text before the supplied msg function CheckEqual(const a,b: RawUTF8; const msg: RawUTF8 = ''): Boolean; overload; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run test assertion against pointers/classes // - if a<>b, will fail and include '#<>#' text before the supplied msg function CheckEqual(a,b: pointer; const msg: RawUTF8 = ''): Boolean; overload; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run test assertion against integers // - if a=b, will fail and include '#=#' text before the supplied msg function CheckNotEqual(a,b: Int64; const msg: RawUTF8 = ''): Boolean; overload; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run test assertion against UTF-8 strings // - if a=b, will fail and include '#=#' text before the supplied msg function CheckNotEqual(const a,b: RawUTF8; const msg: RawUTF8 = ''): Boolean; overload; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run test assertion against pointers/classes // - if a=b, will fail and include '#=#' text before the supplied msg function CheckNotEqual(a,b: pointer; const msg: RawUTF8 = ''): Boolean; overload; {$ifdef HASINLINE}inline;{$endif} /// used by the published methods to run a test assertion about two double values // - includes some optional precision argument function CheckSame(const Value1,Value2: double; const Precision: double=1E-12; const msg: string = ''): Boolean; /// perform a string comparison with several value // - test passes if (Value=Values[0]) or (Value=Value[1]) or (Value=Values[2])... // and ExpectedResult=true function CheckMatchAny(const Value: RawUTF8; const Values: array of RawUTF8; CaseSentitive: Boolean=true; ExpectedResult: Boolean=true; const msg: string = ''): Boolean; /// used by the published methods to run a test assertion, with an UTF-8 error message // - condition must equals TRUE to pass the test procedure CheckUTF8(condition: Boolean; const msg: RawUTF8); overload; /// used by the published methods to run a test assertion, with a error // message computed via FormatUTF8() // - condition must equals TRUE to pass the test procedure CheckUTF8(condition: Boolean; const msg: RawUTF8; const args: array of const); overload; /// used by published methods to start some timing on associated log // - call this once, before one or several consecutive CheckLogTime() // - warning: this method is not thread-safe procedure CheckLogTimeStart; {$ifdef HASINLINE}inline;{$endif} /// used by published methods to write some timing on associated log // - at least one CheckLogTimeStart method call should happen to reset the // internal timer // - condition must equals TRUE to pass the test // - the supplied message would be appended, with its timing // - warning: this method is not thread-safe procedure CheckLogTime(condition: boolean; const msg: RawUTF8; const args: array of const; level: TSynLogInfo=sllTrace); /// create a temporary string random content, WinAnsi (code page 1252) content class function RandomString(CharCount: Integer): RawByteString; /// create a temporary UTF-8 string random content, using WinAnsi // (code page 1252) content class function RandomUTF8(CharCount: Integer): RawUTF8; /// create a temporary UTF-16 string random content, using WinAnsi // (code page 1252) content class function RandomUnicode(CharCount: Integer): SynUnicode; /// create a temporary string random content, using ASCII 7 bit content class function RandomAnsi7(CharCount: Integer): RawByteString; /// create a temporary string random content, using A..Z,_,0..9 chars only class function RandomIdentifier(CharCount: Integer): RawByteString; /// create a temporary string random content, using uri-compatible chars only class function RandomURI(CharCount: Integer): RawByteString; /// create a temporary string, containing some fake text, with paragraphs class function RandomTextParagraph(WordCount: Integer; LastPunctuation: AnsiChar='.'; const RandomInclude: RawUTF8=''): RawUTF8; /// add containing some "bla bli blo blu" fake text, with paragraphs class procedure AddRandomTextParagraph(WR: TTextWriter; WordCount: Integer; LastPunctuation: AnsiChar='.'; const RandomInclude: RawUTF8=''; NoLineFeed: boolean=false); /// this method is triggered internaly - e.g. by Check() - when a test failed procedure TestFailed(const msg: string); /// will add to the console a message with a speed estimation // - speed is computed from the method start // - returns the number of microsec of the (may be specified) timer // - OnlyLog will compute and append the info to the log, but not on the console // - warning: this method is not thread-safe if a local Timer is not specified function NotifyTestSpeed(const ItemName: string; ItemCount: integer; SizeInBytes: cardinal=0; Timer: PPrecisionTimer=nil; OnlyLog: boolean=false): TSynMonitorOneMicroSec; overload; /// will add to the console a formatted message with a speed estimation function NotifyTestSpeed(const ItemNameFmt: RawUTF8; const ItemNameArgs: array of const; ItemCount: integer; SizeInBytes: cardinal=0; Timer: PPrecisionTimer=nil; OnlyLog: boolean=false): TSynMonitorOneMicroSec; overload; /// append some text to the current console // - OnlyLog will compute and append the info to the log, but not on the console procedure AddConsole(const msg: string; OnlyLog: boolean=false); /// the test suit which owns this test case property Owner: TSynTests read fOwner; /// the test name // - either the Ident parameter supplied to the Create() method, either // an uncameled text from the class name property Ident: string read GetIdent; /// the number of assertions (i.e. Check() method call) for this test case property Assertions: integer read fAssertions; /// the number of assertions (i.e. Check() method call) for this test case property AssertionsFailed: integer read fAssertionsFailed; published { all published methods of the children will be run as individual tests - these methods must be declared as procedure with no parameter - the method name will be used, after "uncamelcasing", for display } end; /// class-reference type (metaclass) of a test case TSynTestCaseClass = class of TSynTestCase; /// information about a failed test TSynTestFailed = record /// the contextual message associated with this failed test Error: string; /// the uncamelcased method name TestName: string; /// ready-to-be-displayed 'TestCaseIdent - TestName' text, as UTF-8 IdentTestName: RawUTF8; end; TSynTestFaileds = array of TSynTestFailed; /// a class used to run a suit of test cases TSynTests = class(TSynTest) protected /// any number not null assigned to this field will display a "../sec" stat fRunConsoleOccurenceNumber: cardinal; fTestCase: TSynList; // stores TSynTestCaseClass during Run fAssertions: integer; fAssertionsFailed: integer; fCurrentMethodInfo: PSynTestMethodInfo; fSaveToFile: Text; fSafe: TSynLocker; fFailed: TSynTestFaileds; fFailedCount: integer; function GetFailedCount: integer; function GetFailed(Index: integer): TSynTestFailed; procedure CreateSaveToFile; virtual; procedure Color(aColor: TConsoleColor); /// called when a test case failed: default is to add item to fFailed[] procedure AddFailed(const msg: string); virtual; /// this method is called before every run // - default implementation will just return nil // - can be overridden to implement a per-test case logging for instance function BeforeRun: IUnknown; virtual; /// this method is called during the run, after every testcase // - this implementation just report some minimal data to the console // by default, but may be overridden to update a real UI or reporting system // - method implementation can use fCurrentMethodInfo^ to get run context procedure AfterOneRun; virtual; public /// you can put here some text to be displayed at the end of the messages // - some internal versions, e.g. // - every line of text must explicitly BEGIN with #13#10 CustomVersions: string; /// contains the run elapsed time RunTimer, TestTimer, TotalTimer: TPrecisionTimer; /// create the test suit // - if an identifier is not supplied, the class name is used, after // T[Syn][Test] left trim and un-camel-case // - this constructor will add all published methods to the internal // test list, accessible via the Count/TestName/TestMethod properties constructor Create(const Ident: string = ''); override; /// finalize the class instance // - release all registered Test case instance destructor Destroy; override; /// you can call this class method to perform all the tests on the Console // - it will create an instance of the corresponding class, with the // optional identifier to be supplied to its constructor // - if the executable was launched with a parameter, it will be used as // file name for the output - otherwise, tests information will be written // to the console // - it will optionally enable full logging during the process // - a typical use will first assign the same log class for the whole // framework, if the mORMot.pas unit is to be used - in such case, before // calling RunAsConsole(), the caller should execute: // ! TSynLogTestLog := TSQLLog; // ! TMyTestsClass.RunAsConsole('My Automated Tests',LOG_VERBOSE); class procedure RunAsConsole(const CustomIdent: string=''; withLogs: TSynLogInfos=[sllLastError,sllError,sllException,sllExceptionOS]; options: TSynTestOptions=[]); virtual; /// save the debug messages into an external file // - if no file name is specified, the current Ident is used procedure SaveToFile(const DestPath: TFileName; const FileName: TFileName=''); /// register a specified Test case from its class name // - an instance of the supplied class will be created during Run // - the published methods of the children must call this method in order // to add test cases // - example of use (code from a TSynTests published method): // ! AddCase(TOneTestCase); procedure AddCase(TestCase: TSynTestCaseClass); overload; /// register a specified Test case from its class name // - an instance of the supplied classes will be created during Run // - the published methods of the children must call this method in order // to add test cases // - example of use (code from a TSynTests published method): // ! AddCase([TOneTestCase]); procedure AddCase(const TestCase: array of TSynTestCaseClass); overload; /// call of this method will run all associated tests cases // - function will return TRUE if all test passed // - all failed test cases will be added to the Failed[] list - which is // cleared at the beginning of the run // - Assertions and AssertionsFailed counter properties are reset and // computed during the run // - you may override this method to provide additional information, e.g. // ! function TMySynTests.Run: Boolean; // ! begin // need SynSQLite3.pas unit in the uses clause // ! CustomVersions := format(#13#10#13#10'%s'#13#10' %s'#13#10 + // ! 'Using mORMot %s'#13#10' %s %s', [OSVersionText, CpuInfoText, // ! SYNOPSE_FRAMEWORK_FULLVERSION, sqlite3.ClassName, sqlite3.Version]); // ! result := inherited Run; // ! end; function Run: Boolean; virtual; /// method information currently running // - is set by Run and available within TTestCase methods property CurrentMethodInfo: PSynTestMethodInfo read fCurrentMethodInfo; /// number of failed tests after the last call to the Run method property FailedCount: integer read GetFailedCount; /// retrieve the information associated with a failure property Failed[Index: integer]: TSynTestFailed read GetFailed; /// the number of assertions (i.e. Check() method call) in all tests // - this property is set by the Run method above property Assertions: integer read fAssertions; /// the number of assertions (i.e. Check() method call) which failed in all tests // - this property is set by the Run method above property AssertionsFailed: integer read fAssertionsFailed; published { all published methods of the children will be run as test cases registering - these methods must be declared as procedure with no parameter - every method should create a customized TSynTestCase instance, which will be registered with the AddCase() method, then automaticaly destroyed during the TSynTests destroy } end; /// this overridden class will create a .log file in case of a test case failure // - inherits from TSynTestsLogged instead of TSynTests in order to add // logging to your test suite (via a dedicated TSynLogTest instance) TSynTestsLogged = class(TSynTests) protected fLogFile: TSynLog; fConsoleDup: TTextWriter; procedure CreateSaveToFile; override; /// called when a test case failed: log into the file procedure AddFailed(const msg: string); override; /// this method is called before every run // - overridden implementation to implement a per-test case logging function BeforeRun: IUnknown; override; public /// create the test instance and initialize associated LogFile instance // - this will allow logging of all exceptions to the LogFile constructor Create(const Ident: string = ''); override; /// release associated memory destructor Destroy; override; /// the .log file generator created if any test case failed property LogFile: TSynLog read fLogFile; end; const EQUAL_MSG = '%<>% %'; NOTEQUAL_MSG = '%=% %'; implementation {$ifdef FPC} {$ifndef MSWINDOWS} uses SynFPCLinux; {$endif} {$endif} { TSynTest } procedure TSynTest.Add(const aMethod: TSynTestEvent; const aMethodName: RawUTF8; const aIdent: string); var n: integer; begin if self=nil then exit; // avoid GPF n := Length(fTests); SetLength(fTests,n+1); with fTests[n] do begin TestName := aIdent; IdentTestName := StringToUTF8(fIdent+' - '+TestName); Method := aMethod; MethodName := aMethodName; Test := self; MethodIndex := n; end; end; constructor TSynTest.Create(const Ident: string); var id: RawUTF8; s: string; methods: TPublishedMethodInfoDynArray; i: integer; begin inherited Create; if Ident<>'' then fIdent := Ident else begin ToText(ClassType,id); if IdemPChar(Pointer(id),'TSYN') then if IdemPChar(Pointer(id),'TSYNTEST') then Delete(id,1,8) else Delete(id,1,4) else if IdemPChar(Pointer(id),'TTEST') then Delete(id,1,5) else if id[1]='T' then Delete(id,1,1); fIdent := string(UnCamelCase(id)); end; for i := 0 to GetPublishedMethods(self,methods)-1 do with methods[i] do begin inc(fInternalTestsCount); if Name[1]='_' then s := Ansi7ToString(copy(Name,2,100)) else s := Ansi7ToString(UnCamelCase(Name)); Add(TSynTestEvent(Method),Name,s); end; end; function TSynTest.GetCount: Integer; begin if self=nil then result := 0 else result := length(fTests); end; function TSynTest.GetIdent: string; begin if self=nil then result := '' else result := fIdent; end; { TSynTestCase } constructor TSynTestCase.Create(Owner: TSynTests; const Ident: string); begin inherited Create(Ident); fOwner := Owner; fOptions := Owner.Options; end; procedure TSynTestCase.Setup; begin // do nothing by default end; procedure TSynTestCase.CleanUp; begin // do nothing by default end; procedure TSynTestCase.MethodSetup; begin // do nothing by default end; procedure TSynTestCase.MethodCleanUp; begin // do nothing by default end; destructor TSynTestCase.Destroy; begin CleanUp; inherited; end; procedure TSynTestCase.AddLog(condition: Boolean; const msg: string); const LEV: array[boolean] of TSynLogInfo = (sllFail, sllCustom4); var tix, crc: cardinal; // use a crc since strings are not thread-safe begin if condition then begin crc := Hash32(pointer(msg),length(msg)*SizeOf(msg[1])); if crc=fCheckLastMsg then begin // no need to be too much verbose tix := GetTickCount64 shr 8; // also avoid to use a lock if tix=fCheckLastTix then exit; fCheckLastTix := tix; end; fCheckLastMsg := crc; end else fCheckLastMsg := 0; if fOwner.fCurrentMethodInfo<>nil then TSynLogTestLog.Add.Log(LEV[condition],'% % [%]', [ClassType,fOwner.fCurrentMethodInfo^.TestName,msg]); end; procedure TSynTestCase.Check(condition: Boolean; const msg: string); begin if self=nil then exit; if (msg<>'') and (tcoLogEachCheck in fOptions) then AddLog(condition,msg); InterlockedIncrement(fAssertions); if not condition then TestFailed(msg); end; function TSynTestCase.CheckFailed(condition: Boolean; const msg: string): Boolean; begin if self=nil then begin result := false; exit; end; if (msg<>'') and (tcoLogEachCheck in fOptions) then AddLog(condition,msg); InterlockedIncrement(fAssertions); if condition then result := false else begin TestFailed(msg); result := true; end; end; function TSynTestCase.CheckNot(condition: Boolean; const msg: string): Boolean; begin result := CheckFailed(not condition, msg); end; function TSynTestCase.CheckEqual(a,b: Int64; const msg: RawUTF8): Boolean; begin result := a=b; CheckUTF8(result,EQUAL_MSG,[a,b,msg]); end; function TSynTestCase.CheckEqual(const a, b: RawUTF8; const msg: RawUTF8): Boolean; begin result := a=b; CheckUTF8(result,EQUAL_MSG,[a,b,msg]); end; function TSynTestCase.CheckEqual(a,b: pointer; const msg: RawUTF8): Boolean; begin result := a=b; CheckUTF8(result,EQUAL_MSG,[a,b,msg]); end; function TSynTestCase.CheckNotEqual(a,b: Int64; const msg: RawUTF8): Boolean; begin result := a<>b; CheckUTF8(result,NOTEQUAL_MSG,[a,b,msg]); end; function TSynTestCase.CheckNotEqual(const a, b: RawUTF8; const msg: RawUTF8): Boolean; begin result := a<>b; CheckUTF8(result,NOTEQUAL_MSG,[a,b,msg]); end; function TSynTestCase.CheckNotEqual(a,b: pointer; const msg: RawUTF8): Boolean; begin result := a<>b; CheckUTF8(result,NOTEQUAL_MSG,[a,b,msg]); end; function TSynTestCase.CheckSame(const Value1, Value2: double; const Precision: double; const msg: string): Boolean; begin result := SameValue(Value1,Value2,Precision); CheckUTF8(result,EQUAL_MSG,[Value1,Value2,msg]); end; function TSynTestCase.CheckMatchAny(const Value: RawUTF8; const Values: array of RawUTF8; CaseSentitive: Boolean; ExpectedResult: Boolean; const msg: string): Boolean; begin result := (FindRawUTF8(Values,Value,CaseSentitive)>=0)=ExpectedResult; Check(result); end; procedure TSynTestCase.CheckUTF8(condition: Boolean; const msg: RawUTF8); begin InterlockedIncrement(fAssertions); if not condition or (tcoLogEachCheck in fOptions) then CheckUTF8(condition,'%',[msg]); end; procedure TSynTestCase.CheckUTF8(condition: Boolean; const msg: RawUTF8; const args: array of const); var str: string; // using a sub-proc may be faster, but unstable on Android begin InterlockedIncrement(fAssertions); if not condition or (tcoLogEachCheck in fOptions) then begin if msg<>'' then begin FormatString(msg,args,str); if tcoLogEachCheck in fOptions then AddLog(condition,str); end; if not condition then TestFailed(str); end; end; procedure TSynTestCase.CheckLogTimeStart; begin fCheckLogTime.Start; end; procedure TSynTestCase.CheckLogTime(condition: boolean; const msg: RawUTF8; const args: array of const; level: TSynLogInfo); var str: string; begin FormatString(msg,args,str); Check(condition,str); TSynLogTestLog.Add.Log(level,'% %',[str,fCheckLogTime.Stop],self); fCheckLogTime.Start; end; class function TSynTestCase.RandomString(CharCount: Integer): RawByteString; var i: PtrInt; R: PByteArray; tmp: TSynTempBuffer; begin R := tmp.InitRandom(CharCount); SetString(result,nil,CharCount); for i := 0 to CharCount-1 do PByteArray(result)[i] := 32+R[i] and 127; tmp.Done; end; class function TSynTestCase.RandomAnsi7(CharCount: Integer): RawByteString; var i: PtrInt; R: PByteArray; tmp: TSynTempBuffer; begin R := tmp.InitRandom(CharCount); SetString(result,nil,CharCount); for i := 0 to CharCount-1 do PByteArray(result)[i] := 32+R[i] mod 94; tmp.Done; end; procedure InitRandom64(chars64: PAnsiChar; count: integer; var result: RawByteString); var i: PtrInt; R: PByteArray; tmp: TSynTempBuffer; begin R := tmp.InitRandom(count); SetString(result,nil,count); for i := 0 to count-1 do PByteArray(result)[i] := ord(chars64[PtrInt(R[i]) and 63]); tmp.Done; end; class function TSynTestCase.RandomIdentifier(CharCount: Integer): RawByteString; const IDENT_CHARS: array[0..63] of AnsiChar = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_'; begin InitRandom64(@IDENT_CHARS, CharCount, result); end; class function TSynTestCase.RandomURI(CharCount: Integer): RawByteString; const URL_CHARS: array[0..63] of AnsiChar = 'abcdefghijklmnopqrstuvwxyz0123456789-abCdEfGH.JKlmnOP.RsTuVWxyz.'; begin InitRandom64(@URL_CHARS, CharCount, result); end; class function TSynTestCase.RandomUTF8(CharCount: Integer): RawUTF8; begin result := WinAnsiToUtf8(WinAnsiString(RandomString(CharCount))); end; class function TSynTestCase.RandomUnicode(CharCount: Integer): SynUnicode; begin result := WinAnsiConvert.AnsiToUnicodeString(RandomString(CharCount)); end; class function TSynTestCase.RandomTextParagraph(WordCount: Integer; LastPunctuation: AnsiChar; const RandomInclude: RawUTF8): RawUTF8; var tmp: TTextWriterStackBuffer; WR: TTextWriter; begin WR := TTextWriter.CreateOwnedStream(tmp); try AddRandomTextParagraph(WR, WordCount, LastPunctuation, RandomInclude); WR.SetText(result); finally WR.Free; end; end; class procedure TSynTestCase.AddRandomTextParagraph(WR: TTextWriter; WordCount: Integer; LastPunctuation: AnsiChar; const RandomInclude: RawUTF8; NoLineFeed: boolean); type TKind = (space, comma, dot, question, paragraph); const bla: array[0..7] of string[3]=('bla','ble','bli','blo','blu','bla','bli','blo'); endKind = [dot,paragraph,question]; var n: integer; s: string[3]; last: TKind; rnd: cardinal; begin last := paragraph; while WordCount>0 do begin rnd := Random32gsl; // get 32-bit of randomness for n := 0 to rnd and 3 do begin // consume up to 20-bit from rnd rnd := rnd shr 2; s := bla[rnd and 7]; rnd := rnd shr 3; if last in endKind then begin last := space; s[1] := NormToUpper[s[1]]; end; WR.AddShort(s); WR.Add(' '); dec(WordCount); end; WR.CancelLastChar(' '); case rnd and 127 of // consume 7-bit 0..4: begin if RandomInclude<>'' then begin WR.Add(' '); WR.AddString(RandomInclude); end; last := space; end; 5..65: last := space; 66..90: last := comma; 91..105: last := dot; 106..115: last := question; 116..127: if NoLineFeed then last := dot else last := paragraph; end; case last of space: WR.Add(' '); comma: WR.Add(',',' '); dot: WR.Add('.',' '); question: WR.Add('?',' '); paragraph: WR.AddShort('.'#13#10); end; end; if not(last in endKind) and (LastPunctuation<>' ') then begin WR.AddShort('bla'); WR.Add(LastPunctuation); end; end; procedure TSynTestCase.TestFailed(const msg: string); begin fOwner.fSafe.Lock; // protect when Check() is done from multiple threads try TSynLogTestLog.DebuggerNotify(sllFail,'#% %',[fAssertions-fAssertionsBeforeRun,msg]); if Owner<>nil then // avoid GPF Owner.AddFailed(msg); inc(fAssertionsFailed); finally fOwner.fSafe.UnLock; end; end; procedure TSynTestCase.AddConsole(const msg: string; OnlyLog: boolean); begin TSynLogTestLog.Add.Log(sllMonitoring, '% %', [ClassType, msg]); if OnlyLog then exit; fOwner.fSafe.Lock; try if fRunConsole<>'' then fRunConsole := fRunConsole+#13#10' '+msg else fRunConsole := fRunConsole+msg; finally fOwner.fSafe.UnLock; end; end; function TSynTestCase.NotifyTestSpeed(const ItemName: string; ItemCount: integer; SizeInBytes: cardinal; Timer: PPrecisionTimer; OnlyLog: boolean): TSynMonitorOneMicroSec; var Temp: TPrecisionTimer; msg: string; begin if Timer=nil then Temp := Owner.TestTimer else Temp := Timer^; if ItemCount<=1 then FormatString('% in %',[ItemName,Temp.Stop],msg) else FormatString('% % in % i.e. %/s, aver. %',[ItemCount,ItemName,Temp.Stop, IntToThousandString(Temp.PerSec(ItemCount)),Temp.ByCount(ItemCount)],msg); if SizeInBytes>0 then msg := FormatString('%, %/s',[msg,KB(Temp.PerSec(SizeInBytes))]); AddConsole(msg,OnlyLog); result := Temp.TimeInMicroSec; end; function TSynTestCase.NotifyTestSpeed(const ItemNameFmt: RawUTF8; const ItemNameArgs: array of const; ItemCount: integer; SizeInBytes: cardinal; Timer: PPrecisionTimer; OnlyLog: boolean): TSynMonitorOneMicroSec; var str: string; begin FormatString(ItemNameFmt,ItemNameArgs,str); result := NotifyTestSpeed(str,ItemCount,SizeInBytes,Timer,OnlyLog); end; { TSynTests } procedure TSynTests.AddCase(const TestCase: array of TSynTestCaseClass); var i: integer; begin for i := low(TestCase) to high(TestCase) do fTestCase.Add(TestCase[i]); end; procedure TSynTests.AddCase(TestCase: TSynTestCaseClass); begin fTestCase.Add(TestCase); end; function TSynTests.BeforeRun: IUnknown; begin result := nil; end; constructor TSynTests.Create(const Ident: string); begin inherited Create(Ident); fTestCase := TSynList.Create; fSafe.Init; end; destructor TSynTests.Destroy; begin fTestCase.Free; if TTextRec(fSaveToFile).Handle<>0 then Close(fSaveToFile); inherited Destroy; fSafe.Done; end; {$I-} procedure TSynTests.Color(aColor: TConsoleColor); begin if (StdOut<>0) and (THandle(TTextRec(fSaveToFile).Handle)=StdOut) then TextColor(aColor); end; procedure TSynTests.CreateSaveToFile; begin System.Assign(fSaveToFile,''); Rewrite(fSaveToFile); {$ifndef MSWINDOWS} TTextRec(fSaveToFile).LineEnd := #13#10; {$endif} StdOut := TTextRec(fSaveToFile).Handle; end; procedure TSynTests.AddFailed(const msg: string); begin if fFailedCount=length(fFailed) then SetLength(fFailed,NextGrow(fFailedCount)); with fFailed[fFailedCount] do begin Error := msg; if fCurrentMethodInfo<>nil then begin TestName := fCurrentMethodInfo^.TestName; IdentTestName := fCurrentMethodInfo^.IdentTestName; end; end; inc(fFailedCount); end; function TSynTests.GetFailed(Index: integer): TSynTestFailed; begin if (self=nil) or (cardinal(Index)>=cardinal(fFailedCount)) then Finalize(result) else result := fFailed[index]; end; function TSynTests.GetFailedCount: integer; begin if self=nil then result := 0 else result := fFailedCount; end; function TSynTests.Run: Boolean; var i,t,m: integer; Elapsed, Version: RawUTF8; err: string; C: TSynTestCase; log: IUnknown; begin if TTextRec(fSaveToFile).Handle=0 then CreateSaveToFile; Color(ccLightCyan); Writeln(fSaveToFile,#13#10' ',Ident,#13#10' ',StringOfChar('-',length(Ident)+2)); RunTimer.Start; Randomize; fFailed := nil; fAssertions := 0; fAssertionsFailed := 0; for m := 0 to Count-1 do try Color(ccWhite); writeln(fSaveToFile,#13#10#13#10,m+1,'. ',fTests[m].TestName); Color(ccLightGray); fTests[m].Method(); // call AddCase() to add instances into fTestCase try for i := 0 to fTestCase.Count-1 do begin C := TSynTestCaseClass(fTestCase[i]).Create(self); try Color(ccWhite); writeln(fSaveToFile,#13#10' ',m+1,'.',i+1,'. ',C.Ident,': '); Color(ccLightGray); C.fAssertions := 0; // reset assertions count C.fAssertionsFailed := 0; TotalTimer.Start; C.Setup; for t := 0 to C.Count-1 do try C.fAssertionsBeforeRun := C.fAssertions; C.fAssertionsFailedBeforeRun := C.fAssertionsFailed; C.fRunConsoleOccurenceNumber := fRunConsoleOccurenceNumber; fCurrentMethodInfo := @C.fTests[t]; log := BeforeRun; TestTimer.Start; C.MethodSetup; try fCurrentMethodInfo^.Method(); // run tests + Check() AfterOneRun; finally C.MethodCleanUp; end; log := nil; // will trigger logging leave method e.g. except on E: Exception do begin Color(ccLightRed); AddFailed(E.ClassName+': '+E.Message); write(fSaveToFile,'! ',fCurrentMethodInfo^.IdentTestName); if E.InheritsFrom(EControlC) then raise; // Control-C should just abort whole test writeln(fSaveToFile,#13#10'! Exception ',E.ClassName, ' raised with messsage:'#13#10'! ',E.Message); Color(ccLightGray); end; end; C.CleanUp; // should be done before Destroy call if C.AssertionsFailed=0 then Color(ccLightGreen) else Color(ccLightRed); Write(fSaveToFile,' Total failed: ',IntToThousandString(C.AssertionsFailed), ' / ',IntToThousandString(C.Assertions),' - ',C.Ident); if C.AssertionsFailed=0 then Write(fSaveToFile,' PASSED') else Write(fSaveToFile,' FAILED'); Writeln(fSaveToFile,' ',TotalTimer.Stop); Color(ccLightGray); inc(fAssertions,C.fAssertions); // compute global assertions count inc(fAssertionsFailed,C.fAssertionsFailed); finally C.Free; end; end; finally fTestCase.Clear; fCurrentMethodInfo := nil; end; except on E: Exception do begin // assume any exception not intercepted above is a failure Color(ccLightRed); err := E.ClassName+': '+E.Message; AddFailed(err); write(fSaveToFile,'! ',err); end; end; Color(ccLightCyan); result := (fFailedCount=0); if Exeversion.Version.Major<>0 then Version := FormatUTF8(#13#10'Software version tested: % (%)', [ExeVersion.Version.Detailed, ExeVersion.Version.BuildDateTimeString]); FormatUTF8(#13#10#13#10'Time elapsed for all tests: %'#13#10'Performed % by % on %', [RunTimer.Stop,NowToString,Exeversion.User,Exeversion.Host],Elapsed); Writeln(fSaveToFile,#13#10,Version,CustomVersions, #13#10'Generated with: ',GetDelphiCompilerVersion,' compiler', Utf8ToConsole(Elapsed)); if result then Color(ccWhite) else Color(ccLightRed); write(fSaveToFile,#13#10'Total assertions failed for all test suits: ', IntToThousandString(AssertionsFailed),' / ', IntToThousandString(Assertions)); if result then begin Color(ccLightGreen); Writeln(fSaveToFile,#13#10'! All tests passed successfully.'); end else Writeln(fSaveToFile,#13#10'! Some tests FAILED: please correct the code.'); Color(ccLightGray); end; procedure TSynTests.AfterOneRun; var Run,Failed: integer; C: TSynTestCase; begin if fCurrentMethodInfo=nil then exit; C := fCurrentMethodInfo^.Test as TSynTestCase; Run := C.Assertions-C.fAssertionsBeforeRun; Failed := C.AssertionsFailed-C.fAssertionsFailedBeforeRun; if Failed=0 then begin Color(ccGreen); Write(fSaveToFile,' - ',fCurrentMethodInfo^.TestName,': '); if Run=0 then Write(fSaveToFile,'no assertion') else if Run=1 then Write(fSaveToFile,'1 assertion passed') else Write(fSaveToFile,IntToThousandString(Run),' assertions passed'); end else begin Color(ccLightRed); // ! to highlight the line Write(fSaveToFile,'! - ',fCurrentMethodInfo^.TestName,': ', IntToThousandString(Failed),' / ',IntToThousandString(Run),' FAILED'); end; Write(fSaveToFile,' ',TestTimer.Stop); if C.fRunConsoleOccurenceNumber>0 then Write(fSaveToFile,' ', IntToThousandString(TestTimer.PerSec(C.fRunConsoleOccurenceNumber)),'/s'); if C.fRunConsoleMemoryUsed>0 then begin Write(fSaveToFile,' ',KB(C.fRunConsoleMemoryUsed)); C.fRunConsoleMemoryUsed := 0; // display only once end; Writeln(fSaveToFile); if C.fRunConsole<>'' then begin Writeln(fSaveToFile,' ',C.fRunConsole); C.fRunConsole := ''; end; Color(ccLightGray); end; procedure TSynTests.SaveToFile(const DestPath, FileName: TFileName); var FN: TFileName; begin if TTextRec(fSaveToFile).Handle<>0 then Close(fSaveToFile); if FileName='' then FN := DestPath+Ident+'.txt' else FN := DestPath+FileName; if ExtractFilePath(FN)='' then FN := ExeVersion.ProgramFilePath+FN; system.assign(fSaveToFile,FN); rewrite(fSaveToFile); if IOResult<>0 then fillchar(fSaveToFile,sizeof(fSaveToFile),0); end; {$I+} class procedure TSynTests.RunAsConsole(const CustomIdent: string; withLogs: TSynLogInfos; options: TSynTestOptions); var tests: TSynTests; begin if self=TSynTests then raise ESynException.Create('You should inherit from TSynTests'); {$ifdef MSWINDOWS} AllocConsole; {$endif} with TSynLogTestLog.Family do begin Level := withLogs; //DestinationPath := ExtractFilePath(paramstr(0))+'logs'; folder should exist PerThreadLog := ptIdentifiedInOnFile; //HighResolutionTimestamp := true; //RotateFileCount := 5; RotateFileSizeKB := 20*1024; // rotate by 20 MB logs end; // testing is performed by some dedicated classes defined in the caller units tests := Create(CustomIdent); try tests.Options := options; if ParamCount<>0 then begin tests.SaveToFile(paramstr(1)); // DestPath on command line -> export to file Writeln(tests.Ident,#13#10#13#10' Running tests... please wait'); end; tests.Run; finally tests.Free; end; {$ifndef LINUX} if ParamCount=0 then begin // direct exit if an external file was generated WriteLn(#13#10'Done - Press ENTER to Exit'); ReadLn; end; {$endif} end; { TSynTestsLogged } function TSynTestsLogged.BeforeRun: IUnknown; begin with fCurrentMethodInfo^ do result := TSynLogTestLog.Enter(Test,pointer(TestName)); end; constructor TSynTestsLogged.Create(const Ident: string); begin inherited Create(Ident); with TSynLogTestLog.Family do begin if integer(Level)=0 then // if no exception is set Level := [sllException,sllExceptionOS,sllFail]; if AutoFlushTimeOut=0 then AutoFlushTimeOut := 2; // flush any pending text into .log file every 2 sec fLogFile := SynLog; end; end; type PTTextWriter = ^TTextWriter; function SynTestsTextOut(var t: TTextRec): Integer; begin if t.BufPos = 0 then Result := 0 else begin if FileWrite(t.Handle,t.BufPtr^,t.BufPos)<>integer(t.BufPos) then Result := GetLastError else Result := 0; if PTTextWriter(@t.UserData)^<>nil then PTTextWriter(@t.UserData)^.AddJSONEscape(t.BufPtr,t.Bufpos); t.BufPos := 0; end; end; procedure TSynTestsLogged.CreateSaveToFile; begin inherited; with TTextRec(fSaveToFile) do begin InOutFunc := @SynTestsTextOut; FlushFunc := @SynTestsTextOut; fConsoleDup := TTextWriter.CreateOwnedStream; fConsoleDup.AddShort('{"Msg"="'); PTTextWriter(@UserData)^ := fConsoleDup; end; end; destructor TSynTestsLogged.Destroy; begin if (fLogFile<>nil) and (fLogFile.Writer<>nil) and (fConsoleDup<>nil) then begin fConsoleDup.Add('"','}'); fLogFile.Log(sllCustom1,fConsoleDup.Text); end; inherited Destroy; fConsoleDup.Free; end; procedure TSynTestsLogged.AddFailed(const msg: string); begin inherited; with fCurrentMethodInfo^ do fLogFile.Log(sllFail,'% [%]',[IdentTestName,msg],Test); end; end.
36.017419
137
0.701319
838862b8620b8afa912117c0900fd2c18e51940c
118,169
pas
Pascal
source/HTMLUn2.pas
Karin22315/BerndGabriel-HtmlViewer
e70378b196a5596744c2aa2bf593f3877b2d802d
[ "MIT" ]
null
null
null
source/HTMLUn2.pas
Karin22315/BerndGabriel-HtmlViewer
e70378b196a5596744c2aa2bf593f3877b2d802d
[ "MIT" ]
null
null
null
source/HTMLUn2.pas
Karin22315/BerndGabriel-HtmlViewer
e70378b196a5596744c2aa2bf593f3877b2d802d
[ "MIT" ]
null
null
null
{ Version 11.4 Copyright (c) 1995-2008 by L. David Baldwin Copyright (c) 2008-2013 by HtmlViewer Team 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. Note that the source modules HTMLGIF1.PAS and DITHERUNIT.PAS are covered by separate copyright notices located in those modules. } {$I htmlcons.inc} unit HTMLUn2; interface uses {$ifdef LCL} LclIntf, IntfGraphics, FpImage, LclType, LResources, LMessages, HtmlMisc, {$else} Windows, {$endif} SysUtils, Contnrs, Classes, Graphics, ClipBrd, Controls, Messages, Variants, Types, {$IFNDEF NoGDIPlus} GDIPL2A, {$ENDIF} {$ifdef METAFILEMISSING} MetaFilePrinter, {$endif} HtmlGlobals, HtmlBuffer, HtmlSymb, StyleUn, HtmlGif2; const VersionNo = '11.4'; MaxHScroll = 6000; {max horizontal display in pixels} HandCursor = crHandPoint; //10101; OldThickIBeamCursor = 2; UpDownCursor = 10103; UpOnlyCursor = 10104; DownOnlyCursor = 10105; Tokenleng = 300; TopLim = -200; {drawing limits} BotLim = 5000; FmCtl = #2; ImgPan = #4; BrkCh = #8; type THtQuirksMode = (qmDetect, qmStandards, qmQuirks); // BG, 26.12.2011: TWidthType = ( wtNone, wtAbsolute, wtPercent, wtRelative); // BG, 26.12.2011: TSpecWidth = record Value: Integer; VType: TWidthType; end; //BG, 09.09.2009: renamed TGif and TPng to TrGif and TrPng // TGif interfered with same named class. Transparency = (NotTransp, LLCorner, TrGif, TrPng); JustifyType = (NoJustify, Left, Centered, Right, FullJustify); TRowType = (THead, TBody, TFoot); //------------------------------------------------------------------------------ { Like TList but frees it's items. Use only descendents of TObject! } //BG, 03.03.2011: what about TObjectList? TFreeList = class(TList) private FOwnsObjects: Boolean; protected procedure Notify(Ptr: Pointer; Action: TListNotification); override; public constructor Create(OwnsObjects: Boolean = True); end; //------------------------------------------------------------------------------ // tag attributes //------------------------------------------------------------------------------ TAttribute = class(TObject) {holds a tag attribute} public Which: TAttrSymb; {symbol of attribute such as HrefSy} WhichName: ThtString; Value: Integer; {numeric value if appropriate} DblValue: Double; {numeric value if appropriate} xPercent: boolean; {if value is in percent} Name: ThtString; {ThtString (mixed case), value after '=' sign} CodePage: Integer; constructor Create(ASym: TAttrSymb; const AValue: Double; const NameStr, ValueStr: ThtString; ACodePage: Integer); constructor CreateCopy(ASource: TAttribute); property AsString: ThtString read Name; property AsInteger: Integer read Value; property AsDouble: Double read DblValue; end; TAttributeList = class(TFreeList) {a list of tag attributes,(TAttributes)} private Prop: TProperties; SaveID: ThtString; function GetClass: ThtString; function GetID: ThtString; function GetTitle: ThtString; function GetStyle: TProperties; function GetAttribute(Index: Integer): TAttribute; {$ifdef UseInline} inline; {$endif} public constructor CreateCopy(ASource: TAttributeList); destructor Destroy; override; procedure Clear; override; function Find(Sy: TAttrSymb; out T: TAttribute): Boolean; {$ifdef UseInline} inline; {$endif} function CreateStringList: ThtStringList; property TheClass: ThtString read GetClass; property TheID: ThtString read GetID; property TheTitle: ThtString read GetTitle; property TheStyle: TProperties read GetStyle; property Items[Index: Integer]: TAttribute read GetAttribute; default; end; //------------------------------------------------------------------------------ // image cache //------------------------------------------------------------------------------ TgpObject = TObject; TBitmapItem = class(TObject) public AccessCount: Integer; UsageCount: Integer; {how many in use} Transp: Transparency; {identifies what the mask is for} MImage: TgpObject; {main image, bitmap or animated GIF} Mask: TBitmap; {its mask} constructor Create(AImage: TgpObject; AMask: TBitmap; Tr: Transparency); destructor Destroy; override; end; TStringBitmapList = class(ThtStringList) {a list of bitmap filenames and TBitmapItems} private FMaxCache: Integer; function GetObject(Index: Integer): TBitmapItem; reintroduce; public constructor Create; destructor Destroy; override; function AddObject(const S: ThtString; AObject: TBitmapItem): Integer; reintroduce; function GetImage(I: Integer): TgpObject; {$ifdef UseInline} inline; {$endif} procedure BumpAndCheck; procedure Clear; override; procedure DecUsage(const S: ThtString); procedure IncUsage(const S: ThtString); procedure PurgeCache; procedure SetCacheCount(N: Integer); property MaxCache: Integer read FMaxCache; property Objects[Index: Integer]: TBitmapItem read GetObject; end; //------------------------------------------------------------------------------ // copy to clipboard support //------------------------------------------------------------------------------ SelTextCount = class(TObject) private Buffer: PWideChar; BufferLeng: Integer; Leng: Integer; public procedure AddText(P: PWideChar; Size: Integer); virtual; procedure AddTextCR(P: PWideChar; Size: Integer); {$ifdef UseInline} inline; {$endif} function Terminate: Integer; virtual; end; SelTextBuf = class(SelTextCount) public constructor Create(ABuffer: PWideChar; Size: Integer); procedure AddText(P: PWideChar; Size: Integer); override; function Terminate: Integer; override; end; ClipBuffer = class(SelTextBuf) private procedure CopyToClipboard; public constructor Create(Leng: Integer); destructor Destroy; override; function Terminate: Integer; override; end; //------------------------------------------------------------------------------ // //------------------------------------------------------------------------------ {holds start and end point of URL text} TutText = record //BG, 03.03.2011: changed to record. no need to use a class Start: Integer; Last: Integer; end; TUrlTarget = class(TObject) public URL: ThtString; Target: ThtString; ID: Integer; Attr: ThtString; utText: TutText; TabIndex: Integer; constructor Create; destructor Destroy; override; procedure Assign(const AnUrl, ATarget: ThtString; L: TAttributeList; AStart: Integer); overload; procedure Assign(const UT: TUrlTarget); overload; procedure Clear; procedure SetLast(List: TList {of TFontObjBase}; ALast: Integer); property Start: Integer read utText.Start; property Last: Integer read utText.Last; end; // BG, 31.12.2011: TMapArea = class(TObject) private FHRef: ThtString; FRegion: THandle; FTarget: ThtString; FTitle: ThtString; public function PtInArea(X, Y: Integer): Boolean; property HRef: ThtString read FHRef; property Target: ThtString read FTarget; property Title: ThtString read FTitle; end; // BG, 31.12.2011: TMapAreaList = class(TObjectList) private function getArea(Index: Integer): TMapArea; public property Items[Index: Integer]: TMapArea read getArea; default; end; TMapItem = class(TObject) {holds a client map info} private FAreas: TMapAreaList; public MapName: ThtString; constructor Create; destructor Destroy; override; function GetURL(X, Y: Integer; out URLTarg: TURLTarget; out ATitle: ThtString): boolean; procedure AddArea(Attrib: TAttributeList); end; TFontObjBase = class(TObject) {font information} public UrlTarget: TUrlTarget; end; //------------------------------------------------------------------------------ // device independent bitmap wrapper //------------------------------------------------------------------------------ TDib = class(TObject) private Info: PBitmapInfoHeader; InfoSize: Integer; Image: Pointer; ImageSize: Integer; FHandle: THandle; procedure InitializeBitmapInfoHeader(Bitmap: HBITMAP); procedure GetDIBX(DC: HDC; Bitmap: HBITMAP; Palette: HPALETTE); procedure Allocate(Size: Integer); procedure DeAllocate; public constructor CreateDIB(DC: HDC; Bitmap: TBitmap); destructor Destroy; override; function CreateDIBmp: hBitmap; procedure DrawDIB(DC: HDC; X, Y, W, H: Integer; ROP: DWord); end; //------------------------------------------------------------------------------ // indentation manager //------------------------------------------------------------------------------ IndentRec = class(TObject) public X: Integer; // left or right indentation relative to LfEdge. YT: Integer; // top Y inclusive coordinate for this record relative to document top. YB: Integer; // bottom Y exclusive coordinate for this record relative to document top. ID: TObject; // block level indicator for this record, 0 for not applicable end; TIndentManager = class(TObject) private function LeftEdge(Y: Integer): Integer; function RightEdge(Y: Integer): Integer; public LfEdge: Integer; // left edge of the block content area. // TCell.DoLogic calculates with LfEdge = 0. // TCell.Draw then may shift the block by setting LfEdge to X. Width: Integer; // width of the block content area. ClipWidth: Integer; // clip width ??? L: TFreeList; // list of left side indentations of type IndentRec. R: TFreeList; // list of right side indentations of type IndentRec. CurrentID: TObject; // the current block level (a TBlock pointer) LTopMin: Integer; RTopMin: Integer; public constructor Create; destructor Destroy; override; function AddLeft(YT, YB, W: Integer): IndentRec; function AddRight(YT, YB, W: Integer): IndentRec; function AlignLeft(var Y: Integer; W: Integer; SpW: Integer = 0; SpH: Integer = 0): Integer; function AlignRight(var Y: Integer; W: Integer; SpW: Integer = 0; SpH: Integer = 0): Integer; function GetNextWiderY(Y: Integer): Integer; function ImageBottom: Integer; function LeftIndent(Y: Integer): Integer; function RightSide(Y: Integer): Integer; function SetLeftIndent(XLeft, Y: Integer): Integer; function SetRightIndent(XRight, Y: Integer): Integer; procedure FreeLeftIndentRec(I: Integer); procedure FreeRightIndentRec(I: Integer); procedure GetClearY(out CL, CR: Integer); procedure Init(Lf, Wd: Integer); procedure Reset(Lf: Integer); end; //------------------------------------------------------------------------------ // parser //------------------------------------------------------------------------------ {Simplified variant of TokenObj, to temporarily keep a ThtString of ANSI characters along with their original indices.} { TCharCollection } TCharCollection = class private FChars: ThtString; FIndices: array of Integer; FCurrentIndex: Integer; function GetSize: Integer; function GetAsString: ThtString; function GetCapacity: Integer; procedure SetCapacity(NewCapacity: Integer); public constructor Create; procedure Add(C: AnsiChar; Index: Integer); overload; procedure Add(C: WideChar; Index: Integer); overload; procedure Add(const S: ThtString; Index: Integer); overload; procedure Clear; procedure Concat(T: TCharCollection); property AsString: ThtString read GetAsString; property Capacity: Integer read GetCapacity write SetCapacity; property Size: Integer read GetSize; end; { TokenObj } TokenObj = class private St: WideString; StringOK: boolean; FCount: Integer; function GetCapacity: Integer; function GetString: WideString; procedure SetCapacity(NewCapacity: Integer); public C: array of ThtChar; I: array of Integer; constructor Create; procedure AddUnicodeChar(Ch: WideChar; Ind: Integer); procedure AddString(S: TCharCollection); procedure Concat(T: TokenObj); procedure Clear; procedure Remove(N: Integer); procedure Replace(N: Integer; Ch: ThtChar); property Capacity: Integer read GetCapacity write SetCapacity; property Count: Integer read FCount; property S: WideString read GetString; end; {$IFNDEF NoMetafile} //------------------------------------------------------------------------------ // //------------------------------------------------------------------------------ ThtMetaFile = class(TMetaFile) private FBitmap, FMask: TBitmap; FWhiteBGBitmap: TBitmap; function GetBitmap: TBitmap; function GetMask: TBitmap; procedure Construct; function GetWhiteBGBitmap: TBitmap; public destructor Destroy; override; property Bitmap: TBitmap read GetBitmap; property Mask: TBitmap read GetMask; property WhiteBGBitmap: TBitmap read GetWhiteBGBitmap; end; {$ENDIF} //------------------------------------------------------------------------------ // TIDObject is base class for all tag objects. //------------------------------------------------------------------------------ // If they have an ID, the parser puts them into the HtmlViewer's IDNameList, // a TIDObjectList, where they can be obtained from by ID. // Their Y coordinates can be retrieved and HtmlViewer can scroll to them. //------------------------------------------------------------------------------ TIDObject = class(TObject) protected function GetYPosition: Integer; virtual; abstract; function FreeMe: Boolean; virtual; // some objects the TIDObjectsList owns, some others not. public property YPosition: Integer read GetYPosition; end; //BG, 04.03.2011: TIDNameList renamed to TIDObjectList and used TObject changed to TIDObject. TIDObjectList = class(ThtStringList) private function GetObject(Index: Integer): TIDObject; reintroduce; public constructor Create; destructor Destroy; override; function AddObject(const S: ThtString; AObject: TIDObject): Integer; reintroduce; procedure Clear; override; property Objects[Index: Integer]: TIDObject read GetObject; default; end; TImageType = (NoImage, Bmp, Gif, {Gif89,} Png, Jpg); htColorArray = packed array[0..3] of TColor; htBorderStyleArray = packed array[0..3] of BorderStyleType; //BG, 11.09.2010: moved to this unit to reduce circular dependencies: guResultType = set of (guUrl, guControl, guTitle); //------------------------------------------------------------------------------ // TViewerBase is base class for both THtmlViewer and TFrameViewer //------------------------------------------------------------------------------ TGetStreamEvent = procedure(Sender: TObject; const SRC: ThtString; var Stream: TMemoryStream) of object; TIncludeType = procedure(Sender: TObject; const Command: ThtString; Params: ThtStrings; out IncludedDocument: TBuffer) of object; TLinkType = procedure(Sender: TObject; const Rel, Rev, Href: ThtString) of object; TMetaType = procedure(Sender: TObject; const HttpEq, Name, Content: ThtString) of object; TScriptEvent = procedure(Sender: TObject; const Name, ContentType, Src, Script: ThtString) of object; TSoundType = procedure(Sender: TObject; const SRC: ThtString; Loop: Integer; Terminate: boolean) of object; TViewerBase = class(TWinControl) private FOnInclude: TIncludeType; FOnLink: TLinkType; FOnScript: TScriptEvent; FOnSoundRequest: TSoundType; protected // set to determine if child objects should be in "quirks" mode //This must be protected because it's set directly in a descendant FUseQuirksMode : Boolean; FQuirksMode : THtQuirksMode; {$ifdef has_StyleElements} procedure UpdateStyleElements; override; {$endif} procedure SetOnInclude(Handler: TIncludeType); virtual; procedure SetOnLink(Handler: TLinkType); virtual; procedure SetOnScript(Handler: TScriptEvent); virtual; procedure SetOnSoundRequest(Handler: TSoundType); virtual; procedure SetQuirksMode(const AValue: THtQuirksMode); virtual; public constructor Create(AOwner: TComponent); override; property QuirksMode : THtQuirksMode read FQuirksMode write SetQuirksMode default qmStandards; property OnInclude: TIncludeType read FOnInclude write SetOnInclude; property OnLink: TLinkType read FOnLink write SetOnLink; property OnScript: TScriptEvent read FOnScript write SetOnScript; property OnSoundRequest: TSoundType read FOnSoundRequest write SetOnSoundRequest; property UseQuirksMode : Boolean read FUseQuirksMode; published {$ifdef has_StyleElements} property StyleElements; {$endif} end; TablePartType = (Normal, DoHead, DoBody1, DoBody2, DoBody3, DoFoot); TTablePartRec = class public TablePart: TablePartType; PartStart: Integer; PartHeight: Integer; FootHeight: Integer; end; THtmlViewerBase = class(TViewerBase) public TablePartRec: TTablePartRec; function HtmlExpandFilename(const Filename: ThtString): ThtString; virtual; abstract; function ShowFocusRect: Boolean; virtual; abstract; procedure ControlMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); virtual; abstract; procedure htProgress(Percent: Integer); virtual; abstract; procedure KeyDown(var Key: Word; Shift: TShiftState); override; end; TFrameViewerBase = class(TViewerBase) private procedure wmerase(var msg: TMessage); message WM_ERASEBKGND; public function CreateSubFrameSet(FrameSet: TObject): TObject; virtual; abstract; procedure AddFrame(FrameSet: TObject; Attr: TAttributeList; const FName: ThtString); virtual; abstract; procedure DoAttributes(FrameSet: TObject; Attr: TAttributeList); virtual; abstract; end; //------------------------------------------------------------------------------ var DefBitMap, ErrorBitMap, ErrorBitmapMask: TBitMap; WaitStream: TMemoryStream; ErrorStream: TMemoryStream; //------------------------------------------------------------------------------ // string methods //------------------------------------------------------------------------------ function StrLenW(Str: PWideChar): Cardinal; function StrPosW(Str, SubStr: PWideChar): PWideChar; function StrScanW(const Str: PWideChar; Chr: WideChar): PWideChar; function StrRScanW(const Str: PWideChar; Chr: WideChar): PWideChar; function WidePos(SubStr, S: WideString): Integer; function WideTrim(const S: WideString): WideString; function WideUpperCase1(const S: WideString): WideString; {$ifdef UNICODE} inline; {$endif} function WideLowerCase1(const S: WideString): WideString; {$ifdef UNICODE} inline; {$endif} function WideSameText1(const S1, S2: WideString): boolean; {$ifdef UseInline} inline; {$endif} function WideSameStr1(const S1, S2: WideString): boolean; {$ifdef UseInline} inline; {$endif} function WideStringToMultibyte(CodePage: Integer; W: WideString): AnsiString; function FitText(DC: HDC; S: PWideChar; Max, Width: Integer; out Extent: TSize): Integer; function GetXExtent(DC: HDC; P: PWideChar; N: Integer): Integer; procedure WrapTextW(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; S: WideString); //------------------------------------------------------------------------------ // image methods //------------------------------------------------------------------------------ function LoadImageFromFile(const FName: ThtString; var Transparent: Transparency; var AMask: TBitmap): TgpObject; function LoadImageFromStream(Stream: TStream; var Transparent: Transparency; var AMask: TBitmap): TgpObject; function KindOfImage(Stream: TStream): TImageType; function GetImageHeight(Image: TGpObject): Integer; function GetImageWidth(Image: TGpObject): Integer; function EnlargeImage(Image: TGpObject; W, H: Integer): TBitmap; function GetImageMask(Image: TBitmap; ColorValid: boolean; AColor: TColor): TBitmap; procedure FinishTransparentBitmap(ahdc: HDC; InImage, Mask: TBitmap; xStart, yStart, W, H: Integer); procedure PrintBitmap(Canvas: TCanvas; X, Y, W, H: Integer; Bitmap: TBitmap); procedure PrintTransparentBitmap3(Canvas: TCanvas; X, Y, NewW, NewH: Integer; Bitmap, Mask: TBitmap; YI, HI: Integer); {$IFNDEF NoGDIPlus} procedure DrawGpImage(Handle: THandle; Image: THtGPImage; DestX, DestY: Integer); overload; procedure DrawGpImage(Handle: THandle; Image: THtGpImage; DestX, DestY, SrcX, SrcY, SrcW, SrcH: Integer); overload; procedure StretchDrawGpImage(Handle: THandle; Image: THtGpImage; DestX, DestY, DestW, DestH: Integer); procedure PrintGpImageDirect(Handle: THandle; Image: THtGpImage; DestX, DestY: Integer; ScaleX, ScaleY: single); procedure StretchPrintGpImageDirect(Handle: THandle; Image: THtGpImage; DestX, DestY, DestW, DestH: Integer; ScaleX, ScaleY: single); procedure StretchPrintGpImageOnColor(Canvas: TCanvas; Image: THtGpImage; DestX, DestY, DestW, DestH: Integer; Color: TColor = clWhite); {$ENDIF NoGDIPlus} //------------------------------------------------------------------------------ // misc. methods //------------------------------------------------------------------------------ // BG, 26.12.2011: new type TSpecWidth function SpecWidth(Value: Integer; VType: TWidthType): TSpecWidth; function ToSpecWidth(AsInteger: Integer; AsString: string): TSpecWidth; //------------------------------------------------------------------------------ // canvas methods //------------------------------------------------------------------------------ function CalcClipRect(Canvas: TCanvas; const Rect: TRect; Printing: boolean): TRect; procedure GetClippingRgn(Canvas: TCanvas; const ARect: TRect; Printing: boolean; var Rgn, SaveRgn: HRgn); procedure FillRectWhite(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; Color: TColor {$ifdef has_StyleElements};const AStyleElements : TStyleElements{$endif}); procedure DrawFormControlRect(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; Raised, PrintMonoBlack, Disabled: boolean; Color: TColor {$ifdef has_StyleElements};const AStyleElements : TStyleElements{$endif}); procedure DrawBorder(Canvas: TCanvas; ORect, IRect: TRect; const C: htColorArray; const S: htBorderStyleArray; BGround: TColor; Print: boolean {$ifdef has_StyleElements};const AStyleElements : TStyleElements{$endif}); implementation uses Forms, Math, {$ifdef UseVCLStyles} Vcl.Themes, {$endif} {$ifdef HasSystemUITypes} System.UITypes, {$endif} {$ifndef FPC_TODO}jpeg, {$endif} {$IFDEF UNICODE} PngImage, {$ENDIF} DitherUnit, StylePars; type EGDIPlus = class(Exception); {$ifdef UseASMx86} function StrLenW(Str: PWideChar): Cardinal; // returns number of characters in a ThtString excluding the null terminator asm MOV EDX, EDI MOV EDI, EAX MOV ECX, 0FFFFFFFFH XOR AX, AX REPNE SCASW MOV EAX, 0FFFFFFFEH SUB EAX, ECX MOV EDI, EDX end; function StrPosW(Str, SubStr: PWideChar): PWideChar; // returns a pointer to the first occurance of SubStr in Str asm PUSH EDI PUSH ESI PUSH EBX OR EAX, EAX JZ @@2 OR EDX, EDX JZ @@2 MOV EBX, EAX MOV EDI, EDX XOR AX, AX MOV ECX, 0FFFFFFFFH REPNE SCASW NOT ECX DEC ECX JZ @@2 MOV ESI, ECX MOV EDI, EBX MOV ECX, 0FFFFFFFFH REPNE SCASW NOT ECX SUB ECX, ESI JBE @@2 MOV EDI, EBX LEA EBX, [ESI - 1] @@1: MOV ESI, EDX LODSW REPNE SCASW JNE @@2 MOV EAX, ECX PUSH EDI MOV ECX, EBX REPE CMPSW POP EDI MOV ECX, EAX JNE @@1 LEA EAX, [EDI - 2] JMP @@3 @@2: XOR EAX, EAX @@3: POP EBX POP ESI POP EDI end; function StrRScanW(const Str: PWideChar; Chr: WideChar): PWideChar; assembler; asm PUSH EDI MOV EDI,Str MOV ECX,0FFFFFFFFH XOR AX,AX REPNE SCASW NOT ECX STD DEC EDI DEC EDI MOV AX,Chr REPNE SCASW MOV EAX,0 JNE @@1 MOV EAX,EDI INC EAX INC EAX @@1: CLD POP EDI end; function StrScanW(const Str: PWideChar; Chr: WideChar): PWideChar; assembler; asm PUSH EDI PUSH EAX MOV EDI,Str MOV ECX,$FFFFFFFF XOR AX,AX REPNE SCASW NOT ECX POP EDI MOV AX,Chr REPNE SCASW MOV EAX,0 JNE @@1 MOV EAX,EDI DEC EAX DEC EAX @@1: POP EDI end; {$else} // Pascal-ized equivalents of assembler functions. function StrLenW(Str: PWideChar): Cardinal; begin Result := 0; if Str <> nil then while Str[Result] <> #0 do Inc(Result); end; function StrPosW(Str, SubStr: PWideChar): PWideChar; var StrPos : PWideChar; SubstrPos : PWideChar; begin if SubStr^ = #0 then // Make sure substring not null string begin Result := nil; Exit; end; Result := Str; while Result^ <> #0 do // Until reach end of string begin StrPos := Result; SubstrPos := SubStr; while SubstrPos^ <> #0 do // Until reach end of substring begin if StrPos^ <> SubstrPos^ then // No point in continuing? Break; StrPos := StrPos + 1; SubstrPos := SubstrPos + 1; end; if SubstrPos^ = #0 then // Break because reached end of substring? Exit; Result := Result + 1; end; Result := nil; end; function StrRScanW(const Str: PWideChar; Chr: WideChar): PWideChar; begin Result := StrScanW(Str, #0); if Chr = #0 then // Null-terminating char considered part of string. Exit; while Result <> Str do begin Result := Result - 1; if Result^ = Chr then Exit; end; Result := nil; end; function StrScanW(const Str: PWideChar; Chr: WideChar): PWideChar; begin Result := Str; while Result^ <> #0 do begin if Result^ = Chr then Exit; Result := Result + 1; end; if Chr = #0 then Exit; // Null-terminating char considered part of string. See call // searching for #0 to find end of string. Result := nil; end; {$endif} {----------------FitText} function FitText(DC: HDC; S: PWideChar; Max, Width: Integer; out Extent: TSize): Integer; {return count <= Max which fits in Width. Return X, the extent of chars that fit} var Ints: array of Integer; L, H, I: Integer; begin Extent.cx := 0; Extent.cy := 0; Result := 0; if (Width <= 0) or (Max = 0) then Exit; if not IsWin32Platform then begin SetLength(Ints, Max); if GetTextExtentExPointW(DC, S, Max, Width, @Result, @Ints[0], Extent) then if Result > 0 then Extent.cx := Ints[Result - 1] else Extent.cx := 0; end else {GetTextExtentExPointW not available in win98, 95} begin {optimize this by looking for Max to fit first -- it usually does} L := 0; H := Max; I := H; while L <= H do begin GetTextExtentPoint32W(DC, S, I, Extent); if Extent.cx < Width then L := I + 1 else H := I - 1; if Extent.cx = Width then Break; I := (L + H) shr 1; end; Result := I; end; end; {----------------WidePos} function WidePos(SubStr, S: WideString): Integer; // Unicode equivalent for Pos() function. var P: PWideChar; begin P := StrPosW(PWideChar(S), PWideChar(SubStr)); if P = nil then Result := 0 else Result := P - PWideChar(S) + 1; end; {----------------WideUpperCase1} {$ifdef UNICODE} function WideUpperCase1(const S: WideString): WideString; begin Result := WideUpperCase(S); end; function WideLowerCase1(const S: WideString): WideString; begin Result := WideLowerCase(S); end; {$else} function WideUpperCase1(const S: WideString): WideString; var Len, NewLen: Integer; Tmp: string; begin Len := Length(S); if not IsWin32Platform then begin SetString(Result, PWideChar(S), Len); if Len > 0 then CharUpperBuffW(Pointer(Result), Len); end else begin {win95,98,ME} SetLength(Tmp, 2 * Len); NewLen := WideCharToMultiByte(CP_ACP, 0, PWideChar(S), Len, PChar(Tmp), 2 * Len, nil, nil); SetLength(Tmp, NewLen); Tmp := AnsiUppercase(Tmp); SetLength(Result, Len); MultibyteToWideChar(CP_ACP, 0, PChar(Tmp), NewLen, PWideChar(Result), Len); end; end; function WideLowerCase1(const S: WideString): WideString; var Len, NewLen: Integer; Tmp: string; begin Len := Length(S); if not IsWin32Platform then begin SetString(Result, PWideChar(S), Len); if Len > 0 then CharLowerBuffW(Pointer(Result), Len); end else begin {win95,98,ME} SetLength(Tmp, 2 * Len); NewLen := WideCharToMultiByte(CP_ACP, 0, PWideChar(S), Len, PChar(Tmp), 2 * Len, nil, nil); SetLength(Tmp, NewLen); Tmp := AnsiLowercase(Tmp); SetLength(Result, Len); MultibyteToWideChar(CP_ACP, 0, PChar(Tmp), NewLen, PWideChar(Result), Len); end; end; {$endif} function WideSameText1(const S1, S2: WideString): boolean; begin Result := WideUpperCase1(S1) = WideUpperCase1(S2); end; function WideSameStr1(const S1, S2: WideString): boolean; begin Result := S1 = S2; end; //-- BG ---------------------------------------------------------- 06.10.2010 -- function ScaleRect(const Rect: TRect; ScaleX, ScaleY: Double): TRect; begin Result.Left := Round(Rect.Left * ScaleX); Result.Right := Round(Rect.Right * ScaleX); Result.Top := Round(Rect.Top * ScaleY); Result.Bottom := Round(Rect.Bottom * ScaleY); end; //-- BG ---------------------------------------------------------- 06.10.2010 -- function CalcClipRect(Canvas: TCanvas; const Rect: TRect; Printing: boolean): TRect; var Point: TPoint; SizeV, SizeW: TSize; begin GetWindowOrgEx(Canvas.Handle, Point); {when scrolling or animated Gifs, canvas may not start at X=0, Y=0} Result := Rect; OffsetRect(Result, -Point.X, -Point.Y); if Printing then begin GetViewportExtEx(Canvas.Handle, SizeV); GetWindowExtEx(Canvas.Handle, SizeW); Result := ScaleRect(Result, SizeV.cx / SizeW.cx, SizeV.cy / SizeW.cy); end; end; procedure GetClippingRgn(Canvas: TCanvas; const ARect: TRect; Printing: boolean; var Rgn, SaveRgn: HRgn); var Point: TPoint; SizeV, SizeW: TSize; HF, VF: double; Rslt: Integer; begin {find a clipregion to prevent overflow. First check to see if there is already a clip region. Return the old region, SaveRgn, (or 0) so it can be restored later.} SaveRgn := CreateRectRgn(0, 0, 1, 1); Rslt := GetClipRgn(Canvas.Handle, SaveRgn); {Rslt = 1 for existing region, 0 for none} if Rslt = 0 then begin DeleteObject(SaveRgn); SaveRgn := 0; end; {Form the region} GetWindowOrgEx(Canvas.Handle, Point); {when scrolling or animated Gifs, canvas may not start at X=0, Y=0} with ARect do if not Printing then Rgn := CreateRectRgn(Left - Point.X, Top - Point.Y, Right - Point.X, Bottom - Point.Y) else begin GetViewportExtEx(Canvas.Handle, SizeV); GetWindowExtEx(Canvas.Handle, SizeW); HF := (SizeV.cx / SizeW.cx); {Horizontal adjustment factor} VF := (SizeV.cy / SizeW.cy); {Vertical adjustment factor} Rgn := CreateRectRgn(Round(HF * (Left - Point.X)), Round(VF * (Top - Point.Y)), Round(HF * (Right - Point.X)), Round(VF * (Bottom - Point.Y))); end; if Rslt = 1 then {if there was a region, use the intersection with this region} CombineRgn(Rgn, Rgn, SaveRgn, Rgn_And); SelectClipRgn(Canvas.Handle, Rgn); end; function WideTrim(const S: WideString): WideString; var I, L: Integer; begin L := Length(S); I := 1; while (I <= L) and (S[I] <= ' ') do Inc(I); if I > L then Result := '' else begin while S[L] <= ' ' do Dec(L); Result := Copy(S, I, L - I + 1); end; end; procedure WrapTextW(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; S: WideString); {Wraps text in a clipping rectangle. Font must be set on entry} var ARect: TRect; TAlign: Integer; begin TAlign := SetTextAlign(Canvas.Handle, TA_Top or TA_Left); ARect := Rect(X1, Y1, X2, Y2); DrawTextW(Canvas.Handle, PWideChar(S), Length(S), ARect, DT_Wordbreak); SetTextAlign(Canvas.Handle, TAlign); end; function GetXExtent(DC: HDC; P: PWideChar; N: Integer): Integer; var ExtS: TSize; Dummy: Integer; begin if not IsWin32Platform then GetTextExtentExPointW(DC, P, N, 0, @Dummy, nil, ExtS) else GetTextExtentPoint32W(DC, P, N, ExtS); {win95, 98 ME} Result := ExtS.cx; end; procedure FillRectWhite(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; Color: TColor {$ifdef has_StyleElements};const AStyleElements : TStyleElements{$endif}); var OldBrushStyle: TBrushStyle; OldBrushColor: TColor; begin with Canvas do begin OldBrushStyle := Brush.Style; {save style first} OldBrushColor := Brush.Color; Brush.Color := ThemedColor(Color {$ifdef has_StyleElements},seClient in AStyleElements{$endif}); Brush.Style := bsSolid; FillRect(Rect(X1, Y1, X2, Y2)); Brush.Color := OldBrushColor; Brush.Style := OldBrushStyle; {style after color as color changes style} end; end; {$ifdef has_StyleElements} procedure DrawFormControlRect(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; Raised, PrintMonoBlack, Disabled: boolean; Color: TColor; const AStyleElements : TStyleElements); {$else} procedure DrawFormControlRect(Canvas: TCanvas; X1, Y1, X2, Y2: Integer; Raised, PrintMonoBlack, Disabled: boolean; Color: TColor); {$endif} {Draws lowered rectangles for form control printing} var OldStyle: TPenStyle; OldWid: Integer; OldBrushStyle: TBrushStyle; OldBrushColor: TColor; MonoBlack: boolean; begin with Canvas do begin MonoBlack := PrintMonoBlack and (GetDeviceCaps(Handle, BITSPIXEL) = 1) and (GetDeviceCaps(Handle, PLANES) = 1); Dec(X2); Dec(Y2); OldWid := Pen.Width; OldStyle := Pen.Style; OldBrushStyle := Brush.Style; {save style first} OldBrushColor := Brush.Color; if not MonoBlack then begin if Disabled then begin Brush.Color := ThemedColor(clBtnFace{$ifdef has_StyleElements},seClient in AStyleElements{$endif}); end else begin Brush.Color := ThemedColor(color{$ifdef has_StyleElements},seClient in AStyleElements{$endif}); end; end else begin Brush.Color := clBlack;//color; end; // if not MonoBlack and Disabled then // Brush.Color := ThemedColor(clBtnFace) // else // Brush.Color := ThemedColor(color); Brush.Style := bsSolid; FillRect(Rect(X1, Y1, X2, Y2)); Brush.Color := OldBrushColor; Brush.Style := OldBrushStyle; {style after color as color changes style} Pen.Style := psInsideFrame; if MonoBlack then begin Pen.Width := 1; Pen.Color := clBlack; end else begin Pen.Width := 2; if Raised then Pen.Color := ThemedColor(clBtnHighlight{$ifdef has_StyleElements},seClient in AStyleElements{$endif})//clSilver else Pen.Color := ThemedColor(clBtnShadow{$ifdef has_StyleElements},seClient in AStyleElements{$endif}); end; MoveTo(X1, Y2); LineTo(X1, Y1); LineTo(X2, Y1); if not MonoBlack then begin if Raised then Pen.Color := ThemedColor(clBtnShadow{$ifdef has_StyleElements},seClient in AStyleElements{$endif}) else Pen.Color := ThemedColor(clBtnHighlight{$ifdef has_StyleElements},seClient in AStyleElements{$endif});//clSilver; end else begin Pen.Color := clSilver; end; LineTo(X2, Y2); LineTo(X1, Y2); Pen.Style := OldStyle; Pen.Width := OldWid; end; end; {$IFDEF Ver90} procedure Assert(B: boolean; const S: ThtString); begin {dummy Assert for Delphi 2} end; {$ENDIF} //-- BG ---------------------------------------------------------- 26.12.2011 -- function SpecWidth(Value: Integer; VType: TWidthType): TSpecWidth; begin Result.Value := Value; Result.VType := VType; end; //-- BG ---------------------------------------------------------- 26.12.2011 -- function ToSpecWidth(AsInteger: Integer; AsString: string): TSpecWidth; // Return a TSpecWidth prepared with values given in AsInteger *and* AsString. // AsString is used to evaluate the type while AsInteger is used to evaluate the value. // BG, 26.12.2011: Currently percentage is still converted to permille as done before Value became type Integer. begin if Pos('%', AsString) > 0 then begin Result.Value := Min(100, AsInteger) * 10; Result.VType := wtPercent; end else if Pos('*', AsString) > 0 then // this is not specified for <td>, <th>. Only <col> and <colgroup> support it officially. begin Result.Value := AsInteger; Result.VType := wtRelative; end else begin Result.Value := AsInteger; Result.VType := wtAbsolute; end; end; //-- BG ---------------------------------------------------------- 10.02.2013 -- constructor TFreeList.Create(OwnsObjects: Boolean); begin inherited Create; FOwnsObjects := OwnsObjects; end; procedure TFreeList.Notify(Ptr: Pointer; Action: TListNotification); begin if (Action = lnDeleted) and FOwnsObjects then TObject(Ptr).Free; end; constructor TBitmapItem.Create(AImage: TgpObject; AMask: TBitmap; Tr: Transparency); begin inherited Create; MImage := AImage; Mask := AMask; AccessCount := 0; Transp := Tr; end; destructor TBitmapItem.Destroy; begin Assert(UsageCount = 0, 'Freeing Image still in use'); MImage.Free; Mask.Free; inherited Destroy; end; constructor TStringBitmapList.Create; begin inherited Create; FMaxCache := 4; {$IFNDEF NoGDIPlus} CheckInitGDIPlus; {$ENDIF NoGDIPlus} end; destructor TStringBitmapList.Destroy; var I: Integer; begin for I := 0 to Count - 1 do Objects[I].Free; {$IFNDEF NoGDIPlus} CheckExitGDIPlus; {$ENDIF NoGDIPlus} inherited Destroy; end; function TStringBitmapList.AddObject(const S: ThtString; AObject: TBitmapItem): Integer; begin Result := inherited AddObject(S, AObject); Inc(AObject.UsageCount); end; procedure TStringBitmapList.DecUsage(const S: ThtString); var I: Integer; begin I := IndexOf(S); if I >= 0 then with Objects[I] do begin Dec(UsageCount); Assert(UsageCount >= 0, 'Cache image usage count < 0'); end; end; procedure TStringBitmapList.IncUsage(const S: ThtString); var I: Integer; begin I := IndexOf(S); if I >= 0 then Inc(Objects[I].UsageCount); end; procedure TStringBitmapList.SetCacheCount(N: Integer); var I: Integer; begin for I := Count - 1 downto 0 do with Objects[I] do begin if (AccessCount > N) and (UsageCount <= 0) then begin Delete(I); Free; end; end; FMaxCache := N; end; function TStringBitmapList.GetImage(I: Integer): TgpObject; begin with Objects[I] do begin Result := MImage; AccessCount := 0; Inc(UsageCount); end; end; //-- BG ---------------------------------------------------------- 06.03.2011 -- function TStringBitmapList.GetObject(Index: Integer): TBitmapItem; begin Result := TBitmapItem(inherited GetObject(Index)); end; procedure TStringBitmapList.BumpAndCheck; var I: Integer; Tmp: TBitmapItem; begin for I := Count - 1 downto 0 do begin Tmp := Objects[I]; Inc(Tmp.AccessCount); if (Tmp.AccessCount > FMaxCache) and (Tmp.UsageCount <= 0) then begin Delete(I); Tmp.Free; {the TBitmapItem} end; end; end; procedure TStringBitmapList.PurgeCache; var I: Integer; Tmp: TBitmapItem; begin for I := Count - 1 downto 0 do begin Tmp := Objects[I]; if (Tmp.UsageCount <= 0) then begin Delete(I); Tmp.Free; {the TBitmapItem} end; end; end; procedure TStringBitmapList.Clear; var I: Integer; begin for I := 0 to Count - 1 do Objects[I].Free; inherited Clear; end; { TAttribute } constructor TAttribute.Create(ASym: TAttrSymb; const AValue: Double; const NameStr, ValueStr: ThtString; ACodePage: Integer); begin inherited Create; Which := ASym; DblValue := AValue; Value := Trunc(AValue); WhichName := NameStr; Name := ValueStr; CodePage := ACodePage; end; //-- BG ---------------------------------------------------------- 27.01.2013 -- constructor TAttribute.CreateCopy(ASource: TAttribute); begin inherited Create; Which := ASource.Which; WhichName := ASource.WhichName; Value := ASource.Value; DblValue := ASource.DblValue; xPercent := ASource.xPercent; Name := ASource.Name; CodePage := ASource.CodePage; end; {----------------TAttributeList} procedure TAttributeList.Clear; begin inherited Clear; SaveID := ''; end; //-- BG ---------------------------------------------------------- 27.01.2013 -- constructor TAttributeList.CreateCopy(ASource: TAttributeList); var I: Integer; begin inherited Create; for I := 0 to Count - 1 do Add(TAttribute.CreateCopy(Items[I])); end; function TAttributeList.CreateStringList: ThtStringList; var I: Integer; begin Result := ThtStringList.Create; for I := 0 to Count - 1 do with Items[I] do Result.Add(WhichName + '=' + Name); end; destructor TAttributeList.Destroy; begin Prop.Free; inherited; end; function TAttributeList.Find(Sy: TAttrSymb; out T: TAttribute): Boolean; var I: Integer; begin for I := 0 to Count - 1 do if Items[I].which = Sy then begin Result := True; T := Items[I]; Exit; end; Result := False; end; function TAttributeList.GetAttribute(Index: Integer): TAttribute; begin Result := Get(Index); end; function TAttributeList.GetClass: ThtString; var T: TAttribute; S: ThtString; I: Integer; begin Result := ''; if Find(ClassSy, T) then begin S := Lowercase(Trim(T.Name)); I := Pos(' ', S); if I <= 0 then {a single class name} Result := S else begin {multiple class names. Format as "class1.class2.class3"} repeat Result := Result + '.' + System.Copy(S, 1, I - 1); System.Delete(S, 1, I); S := Trim(S); I := Pos(' ', S); until I <= 0; Result := Result + '.' + S; Result := SortContextualItems(Result); {put in standard multiple order} System.Delete(Result, 1, 1); {remove initial '.'} end; end; end; function TAttributeList.GetID: ThtString; var T: TAttribute; begin Result := SaveID; if (Result = '') and Find(IDSy, T) then begin Result := Lowercase(T.Name); SaveID := Result; end; end; function TAttributeList.GetTitle: ThtString; var T: TAttribute; begin if Find(TitleSy, T) then Result := T.Name else Result := ''; end; function TAttributeList.GetStyle: TProperties; var T: TAttribute; begin if Find(StyleAttrSy, T) then begin Prop.Free; Prop := TProperties.Create; Result := Prop; ParsePropertyStr(T.Name, Result); end else Result := nil; end; {----------------TUrlTarget.Create} constructor TUrlTarget.Create; begin inherited Create; //utText := TutText.Create; utText.Start := -1; utText.Last := -1; end; destructor TUrlTarget.Destroy; begin //FreeAndNil(utText); inherited Destroy; end; var Sequence: Integer = 10; procedure TUrlTarget.Assign(const AnUrl, ATarget: ThtString; L: TAttributeList; AStart: Integer); var SL: ThtStringList; begin Url := AnUrl; Target := ATarget; ID := Sequence; Inc(Sequence); utText.Start := AStart; SL := L.CreateStringList; try Attr := SL.Text; finally SL.Free; end; end; procedure TUrlTarget.Assign(const UT: TUrlTarget); begin Url := UT.Url; Target := UT.Target; ID := UT.ID; TabIndex := UT.TabIndex; Attr := UT.Attr; utText.Start := UT.utText.Start; utText.Last := UT.utText.Last; end; procedure TUrlTarget.Clear; begin Url := ''; Target := ''; ID := 0; TabIndex := 0; Attr := ''; utText.Start := -1; utText.Last := -1; end; procedure TUrlTarget.SetLast(List: TList; ALast: Integer); var I: Integer; begin utText.Last := ALast; if (List.Count > 0) then for I := List.Count - 1 downto 0 do if (ID = TFontObjBase(List[I]).UrlTarget.ID) then TFontObjBase(List[I]).UrlTarget.utText.Last := ALast else Break; end; {----------------SelTextCount} procedure SelTextCount.AddText(P: PWideChar; Size: Integer); var I: Integer; begin for I := 0 to Size - 1 do case P[I] of {ImgPan and FmCtl used to mark images, form controls} FmCtl, ImgPan:; else Inc(Leng); end; end; procedure SelTextCount.AddTextCR(P: PWideChar; Size: Integer); begin AddText(P, Size); AddText(#13#10, 2); end; function SelTextCount.Terminate: Integer; begin Result := Leng; end; {----------------SelTextBuf.Create} constructor SelTextBuf.Create(ABuffer: PWideChar; Size: Integer); begin inherited Create; Buffer := ABuffer; BufferLeng := Size; end; procedure SelTextBuf.AddText(P: PWideChar; Size: Integer); var SizeM1: Integer; I: Integer; begin SizeM1 := BufferLeng - 1; for I := 0 to Size - 1 do case P[I] of {ImgPan and FmCtl used to mark images, form controls} FmCtl, ImgPan, BrkCh:; else if Leng < SizeM1 then begin Buffer[Leng] := P[I]; Inc(Leng); end; end; end; function SelTextBuf.Terminate: Integer; begin Buffer[Leng] := #0; Result := Leng + 1; end; {----------------ClipBuffer.Create} constructor ClipBuffer.Create(Leng: Integer); begin inherited Create(nil, 0); BufferLeng := Leng; Getmem(Buffer, BufferLeng * 2); end; destructor ClipBuffer.Destroy; begin if Assigned(Buffer) then FreeMem(Buffer); inherited Destroy; end; procedure ClipBuffer.CopyToClipboard; {$ifdef LCL} begin Clipboard.AddFormat(CF_UNICODETEXT, Buffer[0], BufferLeng * sizeof(WIDECHAR)); end; {$else} var Len: Integer; Mem: HGLOBAL; Wuf: PWideChar; begin Len := BufferLeng; Mem := GlobalAlloc(GMEM_DDESHARE + GMEM_MOVEABLE, (Len + 1) * SizeOf(ThtChar)); try Wuf := GlobalLock(Mem); try Move(Buffer[0], Wuf[0], Len * SizeOf(ThtChar)); Wuf[Len] := #0; // BG, 28.06.2012: use API method. The vcl clipboard does not support multiple formats. SetClipboardData(CF_UNICODETEXT, Mem); finally GlobalUnlock(Mem); end; except GlobalFree(Mem); end; end; {$endif} function ClipBuffer.Terminate: Integer; begin Buffer[Leng] := #0; Result := Leng + 1; if IsWin32Platform then Clipboard.AsText := Buffer else CopyToClipboard; end; { TMapArea } //-- BG ---------------------------------------------------------- 31.12.2011 -- function TMapArea.PtInArea(X, Y: Integer): Boolean; begin Result := PtInRegion(FRegion, X, Y); end; { TMapAreaList } //-- BG ---------------------------------------------------------- 31.12.2011 -- function TMapAreaList.getArea(Index: Integer): TMapArea; begin Result := get(Index); end; { TMapItem } constructor TMapItem.Create; begin inherited Create; FAreas := TMapAreaList.Create; end; destructor TMapItem.Destroy; begin FAreas.Free; inherited Destroy; end; function TMapItem.GetURL(X, Y: Integer; out URLTarg: TUrlTarget; out ATitle: ThtString): boolean; var I: Integer; Area: TMapArea; begin Result := False; URLTarg := nil; for I := 0 to FAreas.Count - 1 do begin Area := FAreas[I]; if Area.PtInArea(X, Y) then begin if Area.HRef <> '' then {could be NoHRef} begin URLTarg := TUrlTarget.Create; URLTarg.URL := Area.HRef; URLTarg.Target := Area.Target; ATitle := Area.Title; Result := True; end; Exit; end; end; end; procedure TMapItem.AddArea(Attrib: TAttributeList); const MAXCNT = 300; function GetSubStr(var S: ThtString): ThtString; var J, K: Integer; begin J := Pos(',', S); K := Pos(' ', S); {for non comma situations (bad syntax)} if (J > 0) and ((K = 0) or (K > J)) then begin Result := copy(S, 1, J - 1); Delete(S, 1, J); end else if K > 0 then begin Result := copy(S, 1, K - 1); Delete(S, 1, K); end else begin Result := Trim(S); S := ''; end; while (Length(S) > 0) and ((S[1] = ',') or (S[1] = ' ')) do Delete(S, 1, 1); end; var S, S1: ThtString; I, Cnt, Rad: Integer; Nm: ThtString; Coords: array[0..MAXCNT] of Integer; Rect: TRect absolute Coords; Shape: (shRect, shCircle, shPoly, shDefault); Area: TMapArea; begin // if FAreas.Count >= 1000 then // Exit; Area := TMapArea.Create; try Shape := shRect; Cnt := 0; for I := 0 to Attrib.Count - 1 do with Attrib[I] do case Which of HRefSy: Area.FHRef := Name; TargetSy: Area.FTarget := Name; TitleSy: Area.FTitle := Name; NoHrefSy: Area.FHRef := ''; CoordsSy: begin Cnt := 0; S := Trim(Name); S1 := GetSubStr(S); while (S1 <> '') and (Cnt <= MAXCNT) do begin Coords[Cnt] := StrToIntDef(S1, 0); S1 := GetSubStr(S); Inc(Cnt); end; end; ShapeSy: begin Nm := copy(Lowercase(Name), 1, 4); if (Nm = 'circ') or (Nm = 'circle') then Shape := shCircle else if (Nm = 'poly') or (Nm = 'polygon') then Shape := shPoly else if (Nm = 'rect') or (Nm = 'rectangle') then Shape := shRect; end; end; case Shape of shRect: begin if Cnt < 4 then Exit; Inc(Coords[2]); Inc(Coords[3]); Area.FRegion := CreateRectRgnIndirect(Rect); end; shCircle: begin if Cnt < 3 then Exit; Rad := Coords[2]; Dec(Coords[0], Rad); Dec(Coords[1], Rad); Coords[2] := Coords[0] + 2 * Rad + 1; Coords[3] := Coords[1] + 2 * Rad + 1; Area.FRegion := CreateEllipticRgnIndirect(Rect); end; shPoly: begin if Cnt < 6 then Exit; {$ifdef LCL} Area.FRegion := CreatePolygonRgn(PPoint(@Coords[0]), Cnt div 2, Winding); {$else} Area.FRegion := CreatePolygonRgn(Coords, Cnt div 2, Winding); {$endif} end; end; if Area.FRegion <> 0 then begin FAreas.Add(Area); Area := nil; end; finally Area.Free; end; end; function KindOfImage(Stream: TStream): TImageType; var Pos: Int64; Magic: DWord; WMagic: Word absolute Magic; // BMagic: Byte absolute Magic; begin Pos := Stream.Position; Stream.Position := 0; try Stream.Read(Magic, sizeof(Magic)); if Magic = $38464947 then begin // Stream.Read(BMagic, sizeof(BMagic)); // if BMagic = Ord('9') then // Result := Gif89 // else Result := Gif; end else if Magic = $474E5089 then Result := Png else case WMagic of $4D42: Result := Bmp; $D8FF: Result := Jpg; else Result := NoImage; end; finally Stream.Position := Pos; end; end; function GetImageMask(Image: TBitmap; ColorValid: boolean; AColor: TColor): TBitmap; begin try if ColorValid then Image.TransparentColor := AColor; {color has already been selected} {else the transparent color is the lower left pixel of the bitmap} Image.Transparent := True; Result := TBitmap.Create; try Result.Handle := Image.ReleaseMaskHandle; Image.Transparent := False; except FreeAndNil(Result); end; except Result := nil; end; end; //-- BG ---------------------------------------------------------- 26.09.2010 -- function LoadImageFromStream(Stream: TStream; var Transparent: Transparency; var AMask: TBitmap): TgpObject; // extracted from ThtDocument.GetTheImage(), ThtDocument.InsertImage(), and ThtDocument.ReplaceImage() function ConvertImage(Bitmap: TBitmap): TBitmap; {convert bitmap into a form for BitBlt later} function DIBConvert: TBitmap; var DC: HDC; DIB: TDib; OldBmp: HBitmap; OldPal: HPalette; Hnd: HBitmap; begin DC := CreateCompatibleDC(0); OldBmp := SelectObject(DC, Bitmap.Handle); OldPal := SelectPalette(DC, ThePalette, False); RealizePalette(DC); DIB := TDib.CreateDIB(DC, Bitmap); Hnd := DIB.CreateDIBmp; DIB.Free; SelectPalette(DC, OldPal, False); SelectObject(DC, OldBmp); DeleteDC(DC); Bitmap.Free; Result := TBitmap.Create; Result.Handle := Hnd; if (ColorBits = 8) and (Result.Palette = 0) then Result.Palette := CopyPalette(ThePalette); end; begin if ColorBits > 8 then begin if Bitmap.PixelFormat <= pf8bit then Result := DIBConvert else Result := Bitmap; end else if Bitmap.HandleType = bmDIB then begin Result := GetBitmap(Bitmap); Bitmap.Free; end else Result := DIBConvert; end; function LoadGifFromStream(Stream: TStream; var Transparent: Transparency; var AMask: TBitmap): TgpObject; var GifImage: TGifImage; Bitmap: TBitmap; begin GifImage := CreateAGifFromStream(Stream); if GifImage.IsAnimated then Result := GifImage else begin Bitmap := TBitmap.Create; try Bitmap.Assign(GifImage.MaskedBitmap); if GifImage.IsTransparent then begin AMask := TBitmap.Create; AMask.Assign(GifImage.Mask); Transparent := TrGif; end else if Transparent = LLCorner then AMask := GetImageMask(Bitmap, False, 0); GifImage.Free; Result := Bitmap; except Bitmap.Free; raise; end; end; end; function LoadPngFromStream(Stream: TStream; var Transparent: Transparency; var AMask: TBitmap): TgpObject; {$ifdef LCL} var PngImage: TPortableNetworkGraphic; Bitmap: TBitmap; {$endif} begin {$IFNDEF NoGDIPlus} if GDIPlusActive then begin Result := THtGpImage.Create(Stream); Transparent := NotTransp; exit; end; {$ENDIF !NoGDIPlus} {$ifdef LCL} PngImage := TPortableNetworkGraphic.Create; try Transparent := TrPng; PngImage.LoadFromStream(Stream); if ColorBits <= 8 then PngImage.PixelFormat := pf8bit else PngImage.PixelFormat := pf24bit; Bitmap := TBitmap.Create; try Bitmap.Assign(PngImage); PngImage.Mask(clDefault); if PngImage.MaskHandleAllocated then begin AMask := TBitmap.Create; AMask.LoadFromBitmapHandles(PngImage.MaskHandle, 0); end; Result := ConvertImage(Bitmap); except Bitmap.Free; raise; end; finally PngImage.Free; end; {$else} Result := nil; {$endif} end; function LoadJpgFromStream(Stream: TStream; var Transparent: Transparency; var AMask: TBitmap): TBitmap; var jpImage: TJpegImage; begin Transparent := NotTransp; jpImage := TJpegImage.Create; try jpImage.LoadFromStream(Stream); if ColorBits <= 8 then begin jpImage.PixelFormat := {$ifdef LCL} pf8bit {$else} jf8bit {$endif}; if not jpImage.GrayScale and (ColorBits = 8) then jpImage.Palette := CopyPalette(ThePalette); end else jpImage.PixelFormat := {$ifdef LCL} pf24bit {$else} jf24bit {$endif}; Result := TBitmap.Create; try Result.Assign(jpImage); Result := ConvertImage(Result); except Result.Free; raise; end; finally jpImage.Free; end; end; function LoadBmpFromStream(Stream: TStream; Transparent: Transparency; var AMask: TBitmap): TBitmap; begin Result := TBitmap.Create; try Result.LoadFromStream(Stream); Result := ConvertImage(Result); if Transparent = LLCorner then AMask := GetImageMask(Result, False, 0); except Result.Free; raise; end; end; function LoadMetaFileFromStream(Stream: TStream; var Transparent: Transparency; var AMask: TBitmap): TgpObject; begin {$IFDEF NoMetafile} Result := nil; {$ELSE} Result := ThtMetafile.Create; try AMask := nil; Transparent := NotTransp; ThtMetaFile(Result).LoadFromStream(Stream); except FreeAndNil(Result); end; {$ENDIF} end; begin if (Stream = nil) or (Stream.Size < SizeOf(DWord)) then begin Result := nil; exit; end; Stream.Position := 0; case KindOfImage(Stream) of Gif: Result := LoadGifFromStream(Stream, Transparent, AMask); Png: Result := LoadPngFromStream(Stream, Transparent, AMask); Jpg: Result := LoadJpgFromStream(Stream, Transparent, AMask); Bmp: Result := LoadBmpFromStream(Stream, Transparent, AMask); else Result := LoadMetaFileFromStream(Stream, Transparent, AMask); end; end; //-- BG ---------------------------------------------------------- 26.09.2010 -- function LoadImageFromFile(const FName: ThtString; var Transparent: Transparency; var AMask: TBitmap): TgpObject; // extracted from ThtDocument.GetTheImage() and redesigned. // Now the image file is loaded once only (was: 2 to 3 times) and GetImageAndMaskFromFile() is obsolete. var Stream: TStream; begin {look for the image file} Result := nil; if FileExists(FName) then begin Stream := TFileStream.Create(FName, fmOpenRead or fmShareDenyWrite); try Result := LoadImageFromStream(Stream, Transparent, AMask); finally Stream.Free; end; end; end; {----------------FinishTransparentBitmap } procedure FinishTransparentBitmap(ahdc: HDC; InImage, Mask: TBitmap; xStart, yStart, W, H: Integer); var bmAndBack, bmSave, bmBackOld, bmObjectOld: HBitmap; hdcInvMask, hdcMask, hdcImage: HDC; DestSize, SrcSize: TPoint; OldBack, OldFore: TColor; BM: {$ifdef LCL} LclType.Bitmap {$else} Windows.TBitmap {$endif}; Image: TBitmap; begin Image := TBitmap.Create; {protect original image} try Image.Assign(InImage); hdcImage := CreateCompatibleDC(ahdc); SelectObject(hdcImage, Image.Handle); { select the bitmap } { convert bitmap dimensions from device to logical points} SrcSize.x := Image.Width; SrcSize.y := Image.Height; DPtoLP(hdcImage, SrcSize, 1); DestSize.x := W; DestSize.y := H; DPtoLP(hdcImage, DestSize, 1); { create a bitmap for each DC} { monochrome DC} bmAndBack := CreateBitmap(SrcSize.x, SrcSize.y, 1, 1, nil); bmSave := CreateCompatibleBitmap(ahdc, DestSize.x, DestSize.y); GetObject(bmSave, SizeOf(BM), @BM); if (BM.bmBitsPixel > 1) or (BM.bmPlanes > 1) then begin { create some DCs to hold temporary data} hdcInvMask := CreateCompatibleDC(ahdc); hdcMask := CreateCompatibleDC(ahdc); { each DC must select a bitmap object to store pixel data} bmBackOld := SelectObject(hdcInvMask, bmAndBack); { set proper mapping mode} SetMapMode(hdcImage, GetMapMode(ahdc)); bmObjectOld := SelectObject(hdcMask, Mask.Handle); { create the inverse of the object mask} BitBlt(hdcInvMask, 0, 0, SrcSize.x, SrcSize.y, hdcMask, 0, 0, NOTSRCCOPY); {set the background color of the source DC to the color contained in the parts of the bitmap that should be transparent, the foreground to the parts that will show} OldBack := SetBkColor(ahDC, clWhite); OldFore := SetTextColor(ahDC, clBlack); { Punch out a black hole in the background where the image will go} SetStretchBltMode(ahDC, WhiteOnBlack); StretchBlt(ahDC, XStart, YStart, DestSize.x, DestSize.y, hdcMask, 0, 0, SrcSize.x, SrcSize.y, SRCAND); { mask out the transparent colored pixels on the bitmap} BitBlt(hdcImage, 0, 0, SrcSize.x, SrcSize.y, hdcInvMask, 0, 0, SRCAND); { XOR the bitmap with the background on the destination DC} {$IFDEF HalfToneStretching} SetStretchBltMode(ahDC, HALFTONE); {$ELSE} SetStretchBltMode(ahDC, COLORONCOLOR); {$ENDIF} StretchBlt(ahDC, XStart, YStart, W, H, hdcImage, 0, 0, Image.Width, Image.Height, SRCPAINT); SetBkColor(ahDC, OldBack); SetTextColor(ahDC, OldFore); { delete the memory bitmaps} DeleteObject(SelectObject(hdcInvMask, bmBackOld)); SelectObject(hdcMask, bmObjectOld); { delete the memory DCs} DeleteDC(hdcInvMask); DeleteDC(hdcMask); end else begin DeleteObject(bmAndBack); end; DeleteObject(bmSave); DeleteDC(hdcImage); finally Image.Free; end; end; {----------------TDib.CreateDIB} constructor TDib.CreateDIB(DC: HDC; Bitmap: TBitmap); {given a TBitmap, construct a device independent bitmap} var ImgSize: DWord; begin InitializeBitmapInfoHeader(Bitmap.Handle); ImgSize := Info^.biSizeImage; Allocate(ImgSize); try GetDIBX(DC, Bitmap.Handle, Bitmap.Palette); except DeAllocate; raise; end; end; destructor TDib.Destroy; begin DeAllocate; inherited Destroy; end; procedure TDib.Allocate(Size: Integer); begin ImageSize := Size; if Size < $FF00 then GetMem(Image, Size) else begin FHandle := GlobalAlloc(HeapAllocFlags, Size); if FHandle = 0 then ABort; Image := GlobalLock(FHandle); end; end; procedure TDib.DeAllocate; begin if ImageSize > 0 then begin if ImageSize < $FF00 then Freemem(Image, ImageSize) else begin GlobalUnlock(FHandle); GlobalFree(FHandle); end; ImageSize := 0; end; if InfoSize > 0 then begin FreeMem(Info, InfoSize); InfoSize := 0; end; end; procedure TDib.InitializeBitmapInfoHeader(Bitmap: HBITMAP); var BM: {$ifdef LCL} LclType.Bitmap {$else} Windows.TBitmap {$endif}; BitCount: Integer; function WidthBytes(I: Integer): Integer; begin Result := ((I + 31) div 32) * 4; end; begin GetObject(Bitmap, SizeOf(BM), @BM); BitCount := BM.bmBitsPixel * BM.bmPlanes; if BitCount > 8 then InfoSize := SizeOf(TBitmapInfoHeader) else InfoSize := SizeOf(TBitmapInfoHeader) + SizeOf(TRGBQuad) * (1 shl BitCount); GetMem(Info, InfoSize); with Info^ do begin biSize := SizeOf(TBitmapInfoHeader); biWidth := BM.bmWidth; biHeight := BM.bmHeight; biBitCount := BM.bmBitsPixel * BM.bmPlanes; biPlanes := 1; biXPelsPerMeter := 0; biYPelsPerMeter := 0; biClrUsed := 0; biClrImportant := 0; biCompression := BI_RGB; if biBitCount in [16, 32] then biBitCount := 24; biSizeImage := WidthBytes(biWidth * biBitCount) * biHeight; end; end; procedure TDib.GetDIBX(DC: HDC; Bitmap: HBITMAP; Palette: HPALETTE); var OldPal: HPALETTE; Rslt: Integer; bmInfo: PBitmapInfo; begin OldPal := 0; if Palette <> 0 then begin OldPal := SelectPalette(DC, Palette, False); RealizePalette(DC); end; bmInfo := PBitmapInfo(Info); Rslt := GetDIBits(DC, Bitmap, 0, Info^.biHeight, Image, bmInfo^, DIB_RGB_COLORS); if OldPal <> 0 then SelectPalette(DC, OldPal, False); if Rslt = 0 then begin OutofMemoryError; end; end; procedure TDib.DrawDIB(DC: HDC; X, Y, W, H: Integer; ROP: DWord); var bmInfo: PBitmapInfo; begin bmInfo := PBitmapInfo(Info); with Info^ do StretchDIBits(DC, X, Y, W, H, 0, 0, biWidth, biHeight, Image, bmInfo^, DIB_RGB_COLORS, ROP); end; function TDib.CreateDIBmp: hBitmap; var bmInfo: PBitmapInfo; DC: HDC; OldPal: HPalette; begin bmInfo := PBitmapInfo(Info); DC := GetDC(0); OldPal := SelectPalette(DC, ThePalette, False); RealizePalette(DC); try Result := CreateDIBitmap(DC, bmInfo^.bmiHeader, CBM_INIT, Image, bmInfo^, DIB_RGB_COLORS); finally SelectPalette(DC, OldPal, False); ReleaseDC(0, DC); end; end; { TIndentManager } constructor TIndentManager.Create; begin inherited Create; R := TFreeList.Create; L := TFreeList.Create; end; destructor TIndentManager.Destroy; begin R.Free; L.Free; inherited Destroy; end; ////------------------------------------------------------------------------------ //function TIndentManager.AddImage(Y: Integer; Img: TFloatingObj): IndentRec; //{Given a new floating image, update the edge information. Fills Img.Indent, // the distance from the left edge to the upper left corner of the image} //var // IH, IW: Integer; //begin // Result := nil; // if Assigned(Img) then // begin // IW := Img.HSpaceL + Img.ImageWidth + Img.HSpaceR; // IH := Img.VSpaceT + Img.ImageHeight + Img.VSpaceB; // case Img.Floating of // ALeft: // begin // Result := AddLeft(Y, Y + IH, IW); // Img.Indent := Result.X - IW + Img.HSpaceL; // end; // // ARight: // begin // Result := AddRight(Y, Y + IH, IW); // Img.Indent := Result.X + Img.HSpaceL; // end; // end; // end; //end; //-- BG ---------------------------------------------------------- 05.02.2011 -- function TIndentManager.AddLeft(YT, YB, W: Integer): IndentRec; // For a floating block, update the left edge information. begin Result := IndentRec.Create; Result.YT := YT; Result.YB := YB; Result.X := LeftEdge(YT) + W; L.Add(Result); LTopMin := YT; end; //-- BG ---------------------------------------------------------- 05.02.2011 -- function TIndentManager.AddRight(YT, YB, W: Integer): IndentRec; // For a floating block, update the right edge information. begin Result := IndentRec.Create; Result.YT := YT; Result.YB := YB; Result.X := RightEdge(YT) - W; R.Add(Result); RTopMin := YT; end; {----------------TIndentManager.Reset} //-- BG ---------------------------------------------------------- 23.02.2011 -- procedure TIndentManager.Init(Lf, Wd: Integer); begin LfEdge := Lf; Width := Wd; R.Clear; L.Clear; LTopMin := 0; RTopMin := 0; CurrentID := nil; end; procedure TIndentManager.Reset(Lf: Integer); begin LfEdge := Lf; CurrentID := nil; end; const BigY = 9999999; //-- BG ---------------------------------------------------------- 23.02.2011 -- function TIndentManager.LeftEdge(Y: Integer): Integer; // Returns the right most left indentation at Y relative to LfEdge. // If there are no left indentations at Y, returns 0. var I: Integer; IR: IndentRec; MinX: Integer; begin Result := -MaxInt; MinX := 0; for I := 0 to L.Count - 1 do begin IR := L.Items[I]; if (Y >= IR.YT) and (Y < IR.YB) and (Result < IR.X) then if (IR.ID = nil) or (IR.ID = CurrentID) then Result := IR.X; if IR.ID = CurrentID then MinX := IR.X; end; if Result = -MaxInt then Result := MinX; end; //-- BG ---------------------------------------------------------- 23.02.2011 -- function TIndentManager.LeftIndent(Y: Integer): Integer; // Returns the right most left indentation at Y relative to block. // If there are no left indentations at Y, returns LfEdge. begin Result := LeftEdge(Y) + LfEdge; end; //-- BG ---------------------------------------------------------- 23.02.2011 -- function TIndentManager.RightEdge(Y: Integer): Integer; // Returns the left most right indentation at Y relative LfEdge. // If there are no indentations at Y, returns Width. var I: Integer; IR: IndentRec; MinX: Integer; begin Result := MaxInt; for I := 0 to R.Count - 1 do begin IR := R.Items[I]; if (Y >= IR.YT) and (Y < IR.YB) and (Result > IR.X) then if (IR.ID = nil) or (IR.ID = CurrentID) then Result := IR.X; end; if Result = MaxInt then begin //BG, 01.03.2011: Issue 77: Error of the elements MinX := 0; for I := L.Count - 1 downto 0 do begin IR := L.Items[I]; if IR.ID = CurrentID then begin MinX := IR.X; break; end; end; Result := Width + MinX; end; end; //-- BG ---------------------------------------------------------- 23.02.2011 -- function TIndentManager.RightSide(Y: Integer): Integer; // Returns the left most right indentation at Y relative to block. // If there are no indentations at Y, returns Width + LfEdge. begin Result := RightEdge(Y) + LfEdge; end; function TIndentManager.ImageBottom: Integer; // Returns the bottom of the last floating image. var I: Integer; begin Result := 0; for I := 0 to L.Count - 1 do with IndentRec(L.Items[I]) do if (ID = nil) and (YB > Result) then Result := YB; for I := 0 to R.Count - 1 do with IndentRec(R.Items[I]) do if (ID = nil) and (YB > Result) then Result := YB; end; procedure TIndentManager.GetClearY(out CL, CR: Integer); {returns the left and right Y values which will clear image margins} var I: Integer; begin CL := -1; for I := 0 to L.Count - 1 do with IndentRec(L.Items[I]) do if (ID = nil) and (YB > CL) then CL := YB; CR := -1; for I := 0 to R.Count - 1 do with IndentRec(R.Items[I]) do if (ID = nil) and (YB > CR) then CR := YB; Inc(CL); Inc(CR); end; ////-- BG ---------------------------------------------------------- 08.06.2008 -- //function TIndentManager.GetNextLeftXY(var Y: Integer; X, ThisWidth, MaxWidth, MinIndex: Integer): Integer; //var // Index: Integer; // Indent: IndentRec; // DummyCR: Integer; //begin // if X < 0 then // begin // dec(X, Auto); // inc(MaxWidth, 2 * Auto); // end; // // Index := L.Count - 1; // if Index >= MinIndex then // begin // Indent := IndentRec(L[Index]); // if Y < Indent.YB then // begin // // set y to previous used y == y of current line // Y := Max(Y, Indent.YT); // Result := Max(X, Indent.X); // end // else // Result := X; // end // else // Result := Max(X, LeftIndent(Y)); // // if Result + ThisWidth > MaxWidth + X then // begin // Result := X; // GetClearY(Y, DummyCR); // end; //end; //-- BG ---------------------------------------------------------- 06.02.2011 -- function TIndentManager.AlignLeft(var Y: Integer; W, SpW, SpH: Integer): Integer; // Returns the aligned Y position of a block of width W starting at Y. // Result is > Y, if at Y is not enough width for the block and optional additional space Sp // Additional space e.g. for a textRec between aligned images. var I, CL, CR, LX, RX, XL, XR, YY, MinX: Integer; begin Y := Max(Y, LTopMin); Result := LeftEdge(Y); if Result + W + SpW > RightEdge(Y) then begin // too wide, must find a wider place below: if (SpH > 0) and (Result + W <= RightEdge(Y + SpH)) then begin // fits into area below space Sp Inc(Y, SpH); end else begin // too wide, must find a wider place below: YY := Y; MinX := 0; CL := Y; XL := Result; // valium for the compiler for I := L.Count - 1 downto 0 do with IndentRec(L.Items[I]) do begin if ID = CurrentID then begin MinX := X; break; end; if (ID = nil) and (YB > Y) and ((YB < CL) or (CL = Y)) then begin if X = LeftEdge(YB - 1) then begin // This is the right most left indentation LX := LeftEdge(YB); RX := RightEdge(YB) - W; if YY < YB then YY := YB; if RX >= LX then begin CL := YB; XL := LX; end; end; end; end; CR := Y; XR := Result; // valium for the compiler for I := R.Count - 1 downto 0 do with IndentRec(R.Items[I]) do begin if ID = CurrentID then break; if (ID = nil) and (YB > Y) and ((YB < CR) or (CR = Y)) then begin if X = RightEdge(YB - 1) then begin // This is the left most right indentation LX := LeftEdge(YB); RX := RightEdge(YB) - W; if YY < YB then YY := YB; if RX >= LX then begin CR := YB; XR := LX; end; end; end; end; if CL = Y then begin if CR = Y then begin // no better place found, just append at the end. Y := YY; Result := MinX; end else begin Y := CR; Result := XR; end end else if CR = Y then begin Y := CL; Result := XL; end else if CL < CR then begin Y := CL; Result := XL; end else begin Y := CR; Result := XR; end; end; end; Inc(Result, LfEdge); end; function TIndentManager.AlignRight(var Y: Integer; W, SpW, SpH: Integer): Integer; var I, CL, CR, LX, RX, XL, XR, YY, MaxX: Integer; begin Y := Max(Y, RTopMin); Result := RightEdge(Y) - W; if Result < LeftEdge(Y) + SpW then begin // too wide, must find a wider place below: if (SpH > 0) and (Result >= LeftEdge(Y + SpH)) then begin // fits into area below space Sp Inc(Y, SpH); end else begin YY := Y; MaxX := Width - W; CL := Y; XL := Result; // valium for the compiler for I := L.Count - 1 downto 0 do with IndentRec(L.Items[I]) do begin if ID = CurrentID then break; if (ID = nil) and (YB > Y) and ((YB < CL) or (CL = Y)) then begin if X = LeftEdge(YB - 1) then begin // This is the right most left indentation LX := LeftEdge(YB); RX := RightEdge(YB) - W; if YY < YB then YY := YB; if RX >= LX then begin CL := YB; XL := RX; end; end; end; end; CR := Y; XR := Result; // valium for the compiler for I := R.Count - 1 downto 0 do with IndentRec(R.Items[I]) do begin if ID = CurrentID then begin MaxX := X - W; break; end; if (ID = nil) and (YB > Y) and ((YB < CR) or (CR = Y)) then begin if X = RightEdge(YB - 1) then begin // This is the left most right indentation LX := LeftEdge(YB); RX := RightEdge(YB) - W; if YY < YB then YY := YB; if RX >= LX then begin CR := YB; XR := RX; end; end; end; end; if CL = Y then begin if CR = Y then begin // no better place found, just append at the end. Y := YY; Result := MaxX; end else begin Y := CR; Result := XR; end end else if CR = Y then begin Y := CL; Result := XL; end else if CL < CR then begin Y := CL; Result := XL; end else begin Y := CR; Result := XR; end; end; end; Inc(Result, LfEdge); end; function TIndentManager.GetNextWiderY(Y: Integer): Integer; {returns the next Y value which offers a wider space or Y if none} var I, CL, CR: Integer; begin CL := Y; for I := 0 to L.Count - 1 do with IndentRec(L.Items[I]) do if not Assigned(ID) and (YB > Y) and ((YB < CL) or (CL = Y)) then CL := YB; CR := Y; for I := 0 to R.Count - 1 do with IndentRec(R.Items[I]) do if not Assigned(ID) and (YB > Y) and ((YB < CR) or (CR = Y)) then CR := YB; if CL = Y then Result := CR else if CR = Y then Result := CL else Result := Min(CL, CR); end; function TIndentManager.SetLeftIndent(XLeft, Y: Integer): Integer; var IR: IndentRec; begin IR := IndentRec.Create; with IR do begin YT := Y; YB := BigY; X := XLeft; ID := CurrentID; end; Result := L.Add(IR); end; function TIndentManager.SetRightIndent(XRight, Y: Integer): Integer; var IR: IndentRec; begin IR := IndentRec.Create; with IR do begin YT := Y; YB := BigY; X := XRight; ID := CurrentID; end; Result := R.Add(IR); end; procedure TIndentManager.FreeLeftIndentRec(I: Integer); begin L.Delete(I); end; procedure TIndentManager.FreeRightIndentRec(I: Integer); begin R.Delete(I); end; function CopyPalette(Source: hPalette): hPalette; var LP: ^TLogPalette; NumEntries: Integer; begin Result := 0; if ColorBits > 8 then Exit; GetMem(LP, Sizeof(TLogPalette) + 256 * Sizeof(TPaletteEntry)); try with LP^ do begin palVersion := $300; palNumEntries := 256; NumEntries := GetPaletteEntries(Source, 0, 256, palPalEntry); if NumEntries > 0 then begin palNumEntries := NumEntries; Result := CreatePalette(LP^); end; end; finally FreeMem(LP, Sizeof(TLogPalette) + 256 * Sizeof(TPaletteEntry)); end; end; {$IFNDEF NoMetafile} procedure ThtMetaFile.Construct; var Tmp: TBitmap; pe: TPaletteEntry; Color: TColor; begin if not Assigned(FBitmap) then begin FBitmap := TBitmap.Create; try FBitmap.Width := Width; FBitmap.Height := Height; PatBlt(FBitmap.Canvas.Handle, 0, 0, Width, Height, Blackness); FBitmap.Canvas.Draw(0, 0, Self); Tmp := TBitmap.Create; try Tmp.Width := Width; Tmp.Height := Height; Tmp.PixelFormat := pf8Bit; {pick an odd color from the palette to represent the background color, one not likely in the metafile} GetPaletteEntries(Tmp.Palette, 115, 1, pe); Color := pe.peBlue shl 16 or pe.peGreen shl 8 or pe.peRed; Tmp.Canvas.Brush.Color := Color; Tmp.Canvas.FillRect(Rect(0, 0, Width, Height)); Tmp.Canvas.Draw(0, 0, Self); FMask := GetImageMask(Tmp, False, Color); finally Tmp.Free; end; except FreeAndNil(FBitmap); end; end; end; function ThtMetaFile.GetBitmap: TBitmap; begin Construct; Result := FBitmap; end; function ThtMetaFile.GetMask: TBitmap; begin Construct; Result := FMask; end; function ThtMetaFile.GetWhiteBGBitmap: TBitmap; begin if not Assigned(FWhiteBGBitmap) then begin FWhiteBGBitmap := TBitmap.Create; try FWhiteBGBitmap.Width := Width; FWhiteBGBitmap.Height := Height; PatBlt(FWhiteBGBitmap.Canvas.Handle, 0, 0, Width, Height, Whiteness); FWhiteBGBitmap.Canvas.Draw(0, 0, Self); except FreeAndNil(FWhiteBGBitmap); end; end; Result := FWhiteBGBitmap; end; destructor ThtMetaFile.Destroy; begin FreeAndNil(FBitmap); FreeAndNil(FMask); FreeAndNil(FWhiteBGBitmap); inherited; end; {$ENDIF} //function InSet(W: WideChar; S: SetOfChar): boolean; //begin // if Ord(W) > 255 then // Result := False // else // Result := ThtChar(W) in S; //end; {----------------TCharCollection.GetAsString:} function TCharCollection.GetAsString: ThtString; begin Result := Copy(FChars, 1, FCurrentIndex); end; function TCharCollection.GetCapacity: Integer; begin Result := Length(FChars); end; function TCharCollection.GetSize: Integer; begin Result := FCurrentIndex; end; constructor TCharCollection.Create; begin inherited; FCurrentIndex := 0; Capacity := TokenLeng; end; procedure TCharCollection.SetCapacity(NewCapacity: Integer); begin if NewCapacity <> Capacity then begin SetLength(FChars, NewCapacity); SetLength(FIndices, NewCapacity + 1); end; end; procedure TCharCollection.Add(C: AnsiChar; Index: Integer); begin Add(WideChar(C), Index); end; procedure TCharCollection.Add(C: WideChar; Index: Integer); begin Inc(FCurrentIndex); if Capacity <= FCurrentIndex then Capacity := Capacity + 50; FIndices[FCurrentIndex] := Index; FChars[FCurrentIndex] := C; end; procedure TCharCollection.Add(const S: ThtString; Index: Integer); var K, L: Integer; begin L := Length(S); if L > 0 then begin K := FCurrentIndex + L; if Capacity <= K then Capacity := K + 50; Move(S[1], FChars[FCurrentIndex + 1], L * SizeOf(ThtChar)); while FCurrentIndex < K do begin Inc(FCurrentIndex); FIndices[FCurrentIndex] := Index; end; end; end; procedure TCharCollection.Clear; begin FCurrentIndex := 0; FChars := ''; end; procedure TCharCollection.Concat(T: TCharCollection); var K: Integer; begin K := FCurrentIndex + T.FCurrentIndex; if Capacity <= K then Capacity := K + 50; Move(T.FChars[1], FChars[FCurrentIndex + 1], T.FCurrentIndex * SizeOf(ThtChar)); //@@@ Tiburon: todo test Move(T.FIndices[1], FIndices[FCurrentIndex + 1], T.FCurrentIndex * Sizeof(Integer)); FCurrentIndex := K; end; { TokenObj } constructor TokenObj.Create; begin inherited; Capacity := TokenLeng; FCount := 0; St := ''; StringOK := True; end; procedure TokenObj.AddUnicodeChar(Ch: WideChar; Ind: Integer); {Ch must be Unicode in this method} begin if Capacity <= Count then Capacity := Capacity + 50; Inc(FCount); C[Count] := Ch; I[Count] := Ind; StringOK := False; end; procedure TokenObj.Clear; begin FCount := 0; St := ''; StringOK := True; end; function WideStringToMultibyte(CodePage: Integer; W: WideString): AnsiString; var NewLen, Len: Integer; begin if CodePage = CP_UTF8 then {UTF-8 encoded ThtString.} Result := UTF8Encode(W) else begin Len := Length(W); SetLength(Result, 3 * Len); NewLen := WideCharToMultiByte(CodePage, 0, PWideChar(W), Len, PAnsiChar(Result), 3 * Len, nil, nil); if NewLen = 0 then { Invalid code page. Try default.} NewLen := WideCharToMultiByte(CP_ACP, 0, PWideChar(W), Len, PAnsiChar(Result), 3 * Len, nil, nil); SetLength(Result, NewLen); end; end; function ByteNum(CodePage: Integer; P: PAnsiChar): Integer; var P1: PAnsiChar; begin if CodePage <> CP_UTF8 then begin P1 := {$ifdef LCL} CharNextEx {$else} CharNextExA {$endif} (CodePage, P, 0); if Assigned(P1) then Result := P1 - P else Result := 0; end else case ord(P^) of {UTF-8} 0: Result := 0; 1..127: Result := 1; 192..223: Result := 2; 224..239: Result := 3; 240..247: Result := 4; else Result := 1; {error} end; end; procedure TokenObj.AddString(S: TCharCollection); var K: Integer; begin K := Count + S.FCurrentIndex; if Capacity <= K then Capacity := K + 50; Move(S.FChars[1], C[Count + 1], S.FCurrentIndex * Sizeof(ThtChar)); Move(S.FIndices[1], I[Count + 1], S.FCurrentIndex * Sizeof(Integer)); FCount := K; StringOK := False; end; procedure TokenObj.Concat(T: TokenObj); var K: Integer; begin K := Count + T.Count; if Capacity <= K then Capacity := K + 50; Move(T.C[1], C[Count + 1], T.Count * Sizeof(ThtChar)); Move(T.I[1], I[Count + 1], T.Count * Sizeof(Integer)); FCount := K; StringOK := False; end; procedure TokenObj.Remove(N: Integer); begin {remove a single character} if N <= Count then begin if N < Count then begin Move(C[N + 1], C[N], (Count - N) * Sizeof(ThtChar)); Move(I[N + 1], I[N], (Count - N) * Sizeof(Integer)); end; if StringOK then Delete(St, N, 1); Dec(FCount); end; end; procedure TokenObj.Replace(N: Integer; Ch: ThtChar); begin {replace a single character} if N <= Count then begin C[N] := Ch; if StringOK then St[N] := Ch; end; end; function TokenObj.GetCapacity: Integer; begin Result := Length(C) - 1; end; //-- BG ---------------------------------------------------------- 20.01.2011 -- procedure TokenObj.SetCapacity(NewCapacity: Integer); begin if NewCapacity <> Capacity then begin SetLength(C, NewCapacity + 1); SetLength(I, NewCapacity + 1); if NewCapacity < Count then begin FCount := NewCapacity; if StringOK then St := Copy(St, 1, Count); end; end; end; function TokenObj.GetString: WideString; begin if not StringOK then begin SetLength(St, Count); if Count > 0 then Move(C[1], St[1], SizeOf(WideChar) * Count); StringOK := True; end; Result := St; end; {----------------TIDObjectList} function TIDObjectList.AddObject(const S: ThtString; AObject: TIDObject): Integer; var I: Integer; O: TIdObject; begin if Find(S, I) then begin try O := Objects[I]; if O.FreeMe then O.Free; except end; Delete(I); end; Result := inherited AddObject(S, AObject); end; procedure TIDObjectList.Clear; var I: Integer; O: TIdObject; begin for I := 0 to Count - 1 do try O := Objects[I]; if O.FreeMe then O.Free; except end; inherited Clear; end; constructor TIDObjectList.Create; begin inherited Create; Sorted := True; end; destructor TIDObjectList.Destroy; begin Clear; inherited end; //-- BG ---------------------------------------------------------- 04.03.2011 -- function TIDObjectList.GetObject(Index: Integer): TIDObject; begin Result := TIDObject(inherited GetObject(Index)); end; {----------------BitmapToRegion} function BitmapToRegion(ABmp: TBitmap; XForm: PXForm; TransparentColor: TColor): HRGN; {Find a Region corresponding to the non-transparent area of a bitmap. Thanks to Felipe Machado. See http://www.delphi3000.com/ Minor modifications made.} const AllocUnit = 100; type PRectArray = ^TRectArray; TRectArray = array[0..(MaxInt div SizeOf(TRect)) - 1] of TRect; var pr: PRectArray; // used to access the rects array of RgnData by index h: HRGN; // Handles to regions RgnData: PRgnData; // Pointer to structure RGNDATA used to create regions lr, lg, lb: Byte; // values for lowest and hightest trans. colors x, y, x0: Integer; // coordinates of current rect of visible pixels maxRects: Cardinal; // Number of rects to realloc memory by chunks of AllocUnit {$ifdef LCL} bmp: TLazIntfImage; b: TFpColor; {$else} b: PByteArray; // used to easy the task of testing the byte pixels (R,G,B) ScanLinePtr: Pointer; // Pointer to current ScanLine being scanned ScanLineInc: Integer; // Offset to next bitmap scanline (can be negative) bmp: TBitmap; {$endif} begin Result := 0; lr := GetRValue(TransparentColor); lg := GetGValue(TransparentColor); lb := GetBValue(TransparentColor); { ensures that the pixel format is 32-bits per pixel } {$ifdef LCL} bmp := TLazIntfImage.Create(0,0); try bmp.LoadFromBitmap(ABmp.Handle, 0); { alloc initial region data } maxRects := AllocUnit; GetMem(RgnData, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * maxRects)); FillChar(RgnData^, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * maxRects), 0); try with RgnData^.rdh do begin dwSize := SizeOf(TRgnDataHeader); iType := RDH_RECTANGLES; nCount := 0; nRgnSize := 0; SetRect(rcBound, MAXLONG, MAXLONG, 0, 0); end; { scan each bitmap row - the orientation doesn't matter (Bottom-up or not) } for y := 0 to bmp.Height - 1 do begin x := 0; while x < bmp.Width do begin x0 := x; while x < bmp.Width do begin b := bmp[x,y]; if (b.red = lr) and (b.green = lg) and (b.blue = lb) then Break; // pixel is transparent Inc(x); end; { test to see if we have a non-transparent area in the image } if x > x0 then begin { increase RgnData by AllocUnit rects if we exceeds maxRects } if RgnData^.rdh.nCount >= maxRects then begin Inc(maxRects, AllocUnit); ReallocMem(RgnData, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * MaxRects)); pr := @RgnData^.Buffer; FillChar(pr^[maxRects - AllocUnit], AllocUnit * SizeOf(TRect), 0); end; { Add the rect (x0, y)-(x, y+1) as a new visible area in the region } pr := @RgnData^.Buffer; // Buffer is an array of rects with RgnData^.rdh do begin SetRect(pr[nCount], x0, y, x, y + 1); { adjust the bound rectangle of the region if we are "out-of-bounds" } if x0 < rcBound.Left then rcBound.Left := x0; if y < rcBound.Top then rcBound.Top := y; if x > rcBound.Right then rcBound.Right := x; if y + 1 > rcBound.Bottom then rcBound.Bottom := y + 1; Inc(nCount); end; end; // if x > x0 { Need to create the region by muliple calls to ExtCreateRegion, 'cause } { it will fail on Windows 98 if the number of rectangles is too large } if RgnData^.rdh.nCount = 2000 then begin h := ExtCreateRegion(XForm, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * maxRects), RgnData^); if Result > 0 then begin // Expand the current region CombineRgn(Result, Result, h, RGN_OR); DeleteObject(h); end else // First region, assign it to Result Result := h; RgnData^.rdh.nCount := 0; SetRect(RgnData^.rdh.rcBound, MAXLONG, MAXLONG, 0, 0); end; Inc(x); end; // scan every sample byte of the image end; { need to call ExCreateRegion one more time because we could have left } { a RgnData with less than 2000 rects, so it wasn't yet created/combined } if RgnData^.rdh.nCount > 0 then {LDB 0 Count causes exception and abort in Win98} h := ExtCreateRegion(XForm, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * MaxRects), RgnData^) else h := 0; if Result > 0 then begin CombineRgn(Result, Result, h, RGN_OR); DeleteObject(h); end else Result := h; finally FreeMem(RgnData, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * MaxRects)); end; finally bmp.Free; end; {$else} bmp := TBitmap.Create; try bmp.Assign(ABmp); bmp.PixelFormat := pf32bit; { alloc initial region data } maxRects := AllocUnit; GetMem(RgnData, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * maxRects)); FillChar(RgnData^, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * maxRects), 0); try with RgnData^.rdh do begin dwSize := SizeOf(TRgnDataHeader); iType := RDH_RECTANGLES; nCount := 0; nRgnSize := 0; SetRect(rcBound, MAXLONG, MAXLONG, 0, 0); end; { scan each bitmap row - the orientation doesn't matter (Bottom-up or not) } ScanLinePtr := bmp.ScanLine[0]; if bmp.Height > 1 then ScanLineInc := PtrSub(bmp.ScanLine[1], ScanLinePtr) else ScanLineInc := 0; for y := 0 to bmp.Height - 1 do begin x := 0; while x < bmp.Width do begin x0 := x; while x < bmp.Width do begin b := @PByteArray(ScanLinePtr)[x * SizeOf(TRGBQuad)]; // BGR-RGB: Windows 32bpp BMPs are made of BGRa quads (not RGBa) if (b[2] = lr) and (b[1] = lg) and (b[0] = lb) then Break; // pixel is transparent Inc(x); end; { test to see if we have a non-transparent area in the image } if x > x0 then begin { increase RgnData by AllocUnit rects if we exceeds maxRects } if RgnData^.rdh.nCount >= maxRects then begin Inc(maxRects, AllocUnit); ReallocMem(RgnData, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * MaxRects)); pr := @RgnData^.Buffer; FillChar(pr^[maxRects - AllocUnit], AllocUnit * SizeOf(TRect), 0); end; { Add the rect (x0, y)-(x, y+1) as a new visible area in the region } pr := @RgnData^.Buffer; // Buffer is an array of rects with RgnData^.rdh do begin SetRect(pr[nCount], x0, y, x, y + 1); { adjust the bound rectangle of the region if we are "out-of-bounds" } if x0 < rcBound.Left then rcBound.Left := x0; if y < rcBound.Top then rcBound.Top := y; if x > rcBound.Right then rcBound.Right := x; if y + 1 > rcBound.Bottom then rcBound.Bottom := y + 1; Inc(nCount); end; end; // if x > x0 { Need to create the region by muliple calls to ExtCreateRegion, 'cause } { it will fail on Windows 98 if the number of rectangles is too large } if RgnData^.rdh.nCount = 2000 then begin h := ExtCreateRegion(XForm, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * maxRects), RgnData^); if Result > 0 then begin // Expand the current region CombineRgn(Result, Result, h, RGN_OR); DeleteObject(h); end else // First region, assign it to Result Result := h; RgnData^.rdh.nCount := 0; SetRect(RgnData^.rdh.rcBound, MAXLONG, MAXLONG, 0, 0); end; Inc(x); end; // scan every sample byte of the image PtrInc(ScanLinePtr, ScanLineInc); end; { need to call ExCreateRegion one more time because we could have left } { a RgnData with less than 2000 rects, so it wasn't yet created/combined } if RgnData^.rdh.nCount > 0 then {LDB 0 Count causes exception and abort in Win98} h := ExtCreateRegion(XForm, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * MaxRects), RgnData^) else h := 0; if Result > 0 then begin CombineRgn(Result, Result, h, RGN_OR); DeleteObject(h); end else Result := h; finally FreeMem(RgnData, SizeOf(TRgnDataHeader) + (SizeOf(TRect) * MaxRects)); end; finally bmp.Free; end; {$endif} end; {----------------EnlargeImage} function EnlargeImage(Image: TGpObject; W, H: Integer): TBitmap; {enlarge 1 pixel images for tiling. Returns a TBitmap regardless of Image type} var NewBitmap: TBitmap; begin Result := TBitmap.Create; {$IFNDEF NoGDIPlus} if Image is THtGpImage then NewBitmap := THtGpImage(Image).GetBitmap else {$ENDIF !NoGDIPlus} NewBitmap := Image as TBitmap; Result.Assign(NewBitmap); if NewBitmap.Width = 1 then Result.Width := Min(100, W) else Result.Width := NewBitmap.Width; if NewBitmap.Height = 1 then Result.Height := Min(100, H) else Result.Height := NewBitmap.Height; Result.Canvas.StretchDraw(Rect(0, 0, Result.Width, Result.Height), NewBitmap); {$IFNDEF NoGDIPlus} if Image is THtGpImage then NewBitmap.Free; {$ENDIF NoGDIPlus} end; {----------------PrintBitmap} {$ifdef LCL} {$else} type AllocRec = class(TObject) public Ptr: Pointer; ASize: Integer; AHandle: THandle; end; {$endif} procedure PrintBitmap(Canvas: TCanvas; X, Y, W, H: Integer; Bitmap: TBitmap); {Y relative to top of display here} {$ifdef LCL} begin Canvas.StretchDraw(Rect(X, Y, X + W, Y + H), Bitmap); {$else} function Allocate(Size: Integer): AllocRec; begin Result := AllocRec.Create; with Result do begin ASize := Size; if Size < $FF00 then GetMem(Ptr, Size) else begin AHandle := GlobalAlloc(HeapAllocFlags, Size); if AHandle = 0 then ABort; Ptr := GlobalLock(AHandle); end; end; end; procedure DeAllocate(AR: AllocRec); begin with AR do if ASize < $FF00 then Freemem(Ptr, ASize) else begin GlobalUnlock(AHandle); GlobalFree(AHandle); end; AR.Free; end; var OldPal: HPalette; DC: HDC; Info: PBitmapInfo; Image: AllocRec; ImageSize: DWord; InfoSize: DWord; begin if (Bitmap = nil) or (Bitmap.Handle = 0) then Exit; DC := Canvas.Handle; try GetDIBSizes(Bitmap.Handle, InfoSize, ImageSize); GetMem(Info, InfoSize); try Image := Allocate(ImageSize); OldPal := SelectPalette(DC, ThePalette, False); try GetDIB(Bitmap.Handle, ThePalette, Info^, Image.Ptr^); RealizePalette(DC); with Info^.bmiHeader do StretchDIBits(DC, X, Y, W, H, 0, 0, biWidth, biHeight, Image.Ptr, Info^, DIB_RGB_COLORS, SRCCOPY); finally DeAllocate(Image); SelectPalette(DC, OldPal, False); end; finally FreeMem(Info, InfoSize); end; except end; {$endif} end; {----------------PrintTransparentBitmap3} procedure PrintTransparentBitmap3(Canvas: TCanvas; X, Y, NewW, NewH: Integer; Bitmap, Mask: TBitmap; YI, HI: Integer); {Y relative to top of display here} {This routine prints transparently on complex background by printing through a clip region} {X, Y are point where upper left corner will be printed. NewW, NewH are the Width and Height of the output (possibly stretched) Vertically only a portion of the Bitmap, Mask may be printed starting at Y=YI in the bitmap and a height of HI } var DC: HDC; hRgn, OldRgn: THandle; Rslt: Integer; XForm: TXForm; SizeV, SizeW: TSize; HF, VF: double; ABitmap, AMask: TBitmap; BitmapCopy: boolean; Origin: TPoint; //BG, 29.08.2009: window origin for correct mask translation begin {the following converts the black masked area in the image to white. This may look better in WPTools which currently doesn't handle the masking} if (Bitmap.Handle = 0) or (HI <= 0) or (Bitmap.Width <= 0) then Exit; BitmapCopy := Bitmap.Height <> HI; try if BitmapCopy then begin ABitmap := TBitmap.Create; AMask := TBitmap.Create; end else begin ABitmap := Bitmap; AMask := Mask; end; try if BitmapCopy then begin Abitmap.Assign(Bitmap); ABitmap.Height := HI; BitBlt(ABitmap.Canvas.Handle, 0, 0, Bitmap.Width, HI, Bitmap.Canvas.Handle, 0, YI, SrcCopy); AMask.Assign(Mask); AMask.Height := HI; BitBlt(AMask.Canvas.Handle, 0, 0, AMask.Width, HI, Mask.Canvas.Handle, 0, YI, SrcCopy); end; SetBkColor(ABitmap.Canvas.Handle, clWhite); SetTextColor(ABitmap.Canvas.Handle, clBlack); BitBlt(ABitmap.Canvas.Handle, 0, 0, Bitmap.Width, HI, AMask.Canvas.Handle, 0, 0, SRCPAINT); DC := Canvas.Handle; {calculate a transform for the clip region as it may be a different size than the mask and needs to be positioned on the canvas.} GetViewportExtEx(DC, SizeV); GetWindowExtEx(DC, SizeW); GetWindowOrgEx(DC, Origin); //BG, 29.08.2009: get origin for correct mask translation HF := (SizeV.cx / SizeW.cx); {Horizontal adjustment factor} VF := (SizeV.cy / SizeW.cy); {Vertical adjustment factor} XForm.eM11 := HF * (NewW / Bitmap.Width); XForm.eM12 := 0; XForm.eM21 := 0; XForm.eM22 := VF * (NewH / HI); XForm.edx := HF * (X - Origin.X); //BG, 29.08.2009: subtract origin XForm.edy := VF * Y; {Find the region for the white area of the Mask} hRgn := BitmapToRegion(AMask, @XForm, $FFFFFF); if hRgn <> 0 then {else nothing to output--this would be unusual} begin OldRgn := CreateRectRgn(0, 0, 1, 1); {a valid region is needed for the next call} Rslt := GetClipRgn(DC, OldRgn); {save the Old clip region} try if Rslt = 1 then CombineRgn(hRgn, hRgn, OldRgn, RGN_AND); SelectClipRgn(DC, hRgn); PrintBitmap(Canvas, X, Y, NewW, NewH, ABitmap); finally if Rslt = 1 then SelectClipRgn(DC, OldRgn) else SelectClipRgn(DC, 0); DeleteObject(hRgn); DeleteObject(OldRgn); end; end; finally if BitmapCopy then begin ABitmap.Free; AMask.Free; end; end; except end; end; type BorderPointArray = array[0..3] of TPoint; {$IFNDEF NoGDIPlus} procedure DrawGpImage(Handle: THandle; Image: THtGpImage; DestX, DestY: Integer); {Draws the entire image as specified at the point specified} var g: THtGpGraphics; begin g := THtGPGraphics.Create(Handle); try g.DrawImage(Image, DestX, DestY, Image.Width, Image.Height); except end; g.Free; end; procedure DrawGpImage(Handle: THandle; Image: THtGpImage; DestX, DestY, SrcX, SrcY, SrcW, SrcH: Integer); {Draw a portion of the image at DestX, DestY. No stretching} var g: THtGpGraphics; begin g := THtGPGraphics.Create(Handle); try g.DrawImage(Image, DestX, DestY, SrcX, SrcY, SrcW, SrcH); except end; g.Free; end; procedure StretchDrawGpImage(Handle: THandle; Image: THtGpImage; DestX, DestY, DestW, DestH: Integer); {Draws the entire image in the rectangle specified} var g: THtGpGraphics; begin g := THtGPGraphics.Create(Handle); try g.DrawImage(Image, DestX, DestY, DestW, DestH); except end; g.Free; end; procedure StretchPrintGpImageDirect(Handle: THandle; Image: THtGpImage; DestX, DestY, DestW, DestH: Integer; ScaleX, ScaleY: single); {Prints the entire image at the point specified with the height and width specified} var g: THtGpGraphics; begin g := THtGPGraphics.Create(Handle); try g.ScaleTransform(ScaleX, ScaleY); g.DrawImage(Image, DestX, DestY, DestW, DestH); except end; g.Free; end; procedure StretchPrintGpImageOnColor(Canvas: TCanvas; Image: THtGpImage; DestX, DestY, DestW, DestH: Integer; Color: TColor = clWhite); var g: THtGpGraphics; bg: TBitmap; begin {Draw image on white background first, then print} bg := TBitmap.Create; bg.Width := THtGPImage(Image).Width; bg.Height := THtGPImage(Image).Height; bg.Canvas.Brush.Color := Color; bg.Canvas.FillRect(Rect(0, 0, bg.Width, bg.Height)); g := THtGPGraphics.Create(bg.Canvas.Handle); g.DrawImage(Image, 0, 0, bg.Width, bg.Height); g.Free; Canvas.StretchDraw(Rect(DestX, DestY, DestX + DestW, DestY + DestH), bg); bg.Free; end; procedure PrintGpImageDirect(Handle: THandle; Image: THtGpImage; DestX, DestY: Integer; ScaleX, ScaleY: single); {Prints the entire image as specified at the point specified} var g: THtGpGraphics; begin g := THtGPGraphics.Create(Handle); try g.ScaleTransform(ScaleX, ScaleY); g.DrawImage(Image, DestX, DestY, Image.Width, Image.Height); except end; g.Free; end; {$ENDIF NoGDIPlus} //function Points(P0, P1, P2, P3: TPoint): BorderPointArray; //begin // Result[0] := P0; // Result[1] := P1; // Result[2] := P2; // Result[3] := P3; //end; // BG, 17.04.2013: Color of DrawOnePolygon() must be a real RGB or palette value. Themed or system colors are not supported! procedure DrawOnePolygon(Canvas: TCanvas; P: BorderPointArray; Color: TColor; Side: byte; Printing: Boolean); {Here we draw a 4 sided polygon (by filling a region). This represents one side (or part of a side) of a border. For single pixel thickness, drawing is done by lines for better printing} //BG, 22.08.2010: in print preview results are better without the single pixel exception. //type // SideArray = array[0..3, 1..4] of Integer; //const // AD: SideArray = ((0, 1, 0, 3), // (0, 1, 1, 1), // (2, 0, 2, 1), // (1, 3, 3, 3)); // AP: SideArray = ((0, 1, 0, 3), // (0, 1, 2, 1), // (2, 0, 2, 2), // (1, 3, 3, 3)); var R: HRgn; // OldWidth: Integer; // OldStyle: TPenStyle; // OldColor: TColor; // Thickness: Integer; // P1, P2: TPoint; // I: SideArray; begin // if Side in [0, 2] then // Thickness := Abs(P[2].X - P[1].X) // else // Thickness := Abs(P[1].Y - P[2].Y); // if Thickness = 1 then // begin // with Canvas do // begin // OldColor := Pen.Color; // OldStyle := Pen.Style; // OldWidth := Pen.Width; // Pen.Color := Color; // Pen.Style := psSolid; // Pen.Width := 1; // if Printing then // I := AP // else // I := AD; // P1 := Point(P[I[Side, 1]].X, P[I[Side, 2]].Y); // P2 := Point(P[I[Side, 3]].X, P[I[Side, 4]].Y); // MoveTo(P1.X, P1.Y); // LineTo(P2.X, P2.Y); // Pen.Width := OldWidth; // Pen.Style := OldStyle; // Pen.Color := OldColor; // end; // end // else begin R := CreatePolygonRgn(P, 4, Alternate); try with Canvas do begin Brush.Style := bsSolid; Brush.Color := Color; FillRgn(Handle, R, Brush.Handle); end; finally DeleteObject(R); end; end; end; {----------------DrawBorder} {$ifdef has_StyleElements} procedure DrawBorder(Canvas: TCanvas; ORect, IRect: TRect; const C: htColorArray; const S: htBorderStyleArray; BGround: TColor; Print: boolean; const AStyleElements : TStyleElements); {$else} procedure DrawBorder(Canvas: TCanvas; ORect, IRect: TRect; const C: htColorArray; const S: htBorderStyleArray; BGround: TColor; Print: boolean); {$endif} {Draw the 4 sides of a border. The sides may be of different styles or colors. The side indices, 0,1,2,3, represent left, top, right, bottom. ORect is the outside rectangle of the border, IRect the inside Rectangle. BGround is the background color used for the bssDouble style} var PO, PI, PM, P1, P2, Bnd: BorderPointArray; I: Integer; Cl, Color: TColor; MRect: TRect; lb: TLogBrush; Pn, OldPn: HPen; W, D: array[0..3] of Integer; InPath: boolean; PenType, Start: Integer; StyleSet: set of BorderStyleType; OuterRegion, InnerRegion: THandle; Brush: TBrush; begin {Limit the borders to somewhat more than the screen size} ORect.Bottom := Min(ORect.Bottom, BotLim); ORect.Top := Max(ORect.Top, TopLim); IRect.Bottom := Min(IRect.Bottom, BotLim); IRect.Top := Max(IRect.Top, TopLim); {Widths are needed for Dashed, Dotted, and Double} W[0] := IRect.Left - Orect.Left; W[1] := IRect.Top - Orect.Top; W[2] := ORect.Right - IRect.Right; W[3] := ORect.Bottom - IRect.Bottom; if (W[0] = 0) and (W[1] = 0) and (W[2] = 0) and (W[3] = 0) then exit; {Find out what style types are represented in this border} StyleSet := []; for I := 0 to 3 do Include(StyleSet, S[I]); {find the outside and inside corner points for the border segments} with ORect do begin PO[0] := Point(Left, Bottom); PO[1] := TopLeft; PO[2] := Point(Right, Top); PO[3] := BottomRight; end; with IRect do begin PI[0] := Point(Left, Bottom); PI[1] := TopLeft; PI[2] := Point(Right, Top); PI[3] := BottomRight; end; {Points midway between the outer and inner rectangle are needed for ridge, groove, dashed, dotted styles} if [bssRidge, bssGroove, bssDotted, bssDashed] * StyleSet <> [] then begin MRect := Rect((ORect.Left + IRect.Left) div 2, (ORect.Top + IRect.Top) div 2, (ORect.Right + IRect.Right) div 2, (ORect.Bottom + IRect.Bottom) div 2); with MRect do begin PM[0] := Point(Left, Bottom); PM[1] := TopLeft; PM[2] := Point(Right, Top); PM[3] := BottomRight; end; end; {the Double style needs the space between inner and outer rectangles divided into three parts} if bssDouble in StyleSet then begin for I := 0 to 3 do begin D[I] := W[I] div 3; if W[I] mod 3 = 2 then Inc(D[I]); end; with ORect do MRect := Rect(Left + D[0], Top + D[1], Right - D[2], Bottom - D[3]); with MRect do begin P1[0] := Point(Left, Bottom); P1[1] := TopLeft; P1[2] := Point(Right, Top); P1[3] := BottomRight; end; with IRect do MRect := Rect(Left - D[0], Top - D[1], Right + D[2], Bottom + D[3]); with MRect do begin P2[0] := Point(Left, Bottom); P2[1] := TopLeft; P2[2] := Point(Right, Top); P2[3] := BottomRight; end; end; {double, dotted, dashed styles need a background fill} if (BGround <> clNone) and ([bssDouble, bssDotted, bssDashed] * StyleSet <> []) then begin with ORect do OuterRegion := CreateRectRgn(Left, Top, Right, Bottom); with IRect do InnerRegion := CreateRectRgn(Left, Top, Right, Bottom); CombineRgn(OuterRegion, OuterRegion, InnerRegion, RGN_DIFF); Brush := TBrush.Create; try Brush.Color := ThemedColor(BGround{$ifdef has_StyleElements},seClient in AStyleElements{$endif}) or PalRelative; Brush.Style := bsSolid; FillRgn(Canvas.Handle, OuterRegion, Brush.Handle); finally Brush.Free; DeleteObject(OuterRegion); DeleteObject(InnerRegion); end; end; InPath := False; Pn := 0; OldPn := 0; Start := 0; try for I := 0 to 3 do begin Color := ThemedColor(C[I]{$ifdef has_StyleElements},seClient in AStyleElements{$endif}); case S[I] of bssSolid, bssInset, bssOutset: begin Bnd[0] := PO[I]; Bnd[1] := PO[(I + 1) mod 4]; Bnd[2] := PI[(I + 1) mod 4]; Bnd[3] := PI[I]; case S[I] of bssInset: if I in [0, 1] then Color := Darker(Color) else Color := Lighter(Color); bssOutset: if I in [2, 3] then Color := Darker(Color) else Color := Lighter(Color); end; DrawOnePolygon(Canvas, Bnd, Color or PalRelative, I, Print); end; bssRidge, bssGroove: begin {ridge or groove} Cl := Color; Bnd[0] := PO[I]; Bnd[1] := PO[(I + 1) mod 4]; Bnd[2] := PM[(I + 1) mod 4]; Bnd[3] := PM[I]; case S[I] of bssGroove: if I in [0, 1] then Color := Darker(Color) else Color := Lighter(Color); bssRidge: if I in [2, 3] then Color := Darker(Color) else Color := Lighter(Color); end; DrawOnePolygon(Canvas, Bnd, Color or PalRelative, I, Print); Color := Cl; Bnd[0] := PM[I]; Bnd[1] := PM[(I + 1) mod 4]; Bnd[2] := PI[(I + 1) mod 4]; Bnd[3] := PI[I]; case S[I] of bssRidge: if I in [0, 1] then Color := Darker(Color) else Color := Lighter(Color); bssGroove: if (I in [2, 3]) then Color := Darker(Color) else Color := Lighter(Color); end; DrawOnePolygon(Canvas, Bnd, Color or PalRelative, I, Print); end; bssDouble: begin Color := Color or PalRelative; Bnd[0] := PO[I]; Bnd[1] := PO[(I + 1) mod 4]; Bnd[2] := P1[(I + 1) mod 4]; Bnd[3] := P1[I]; DrawOnePolygon(Canvas, Bnd, Color, I, Print); Bnd[0] := P2[I]; Bnd[1] := P2[(I + 1) mod 4]; Bnd[2] := PI[(I + 1) mod 4]; Bnd[3] := PI[I]; DrawOnePolygon(Canvas, Bnd, Color, I, Print); end; bssDashed, bssDotted: begin if not InPath then begin lb.lbStyle := BS_SOLID; lb.lbColor := Color or PalRelative; lb.lbHatch := 0; if S[I] = bssDotted then PenType := PS_Dot or ps_EndCap_Round else PenType := PS_Dash or ps_EndCap_Square; Pn := ExtCreatePen(PS_GEOMETRIC or PenType or ps_Join_Miter, W[I], lb, 0, nil); OldPn := SelectObject(Canvas.Handle, Pn); BeginPath(Canvas.Handle); MoveToEx(Canvas.Handle, PM[I].x, PM[I].y, nil); Start := I; InPath := True; end; LineTo(Canvas.Handle, PM[(I + 1) mod 4].x, PM[(I + 1) mod 4].y); if (I = 3) or (S[I + 1] <> S[I]) or (C[I + 1] <> C[I]) or (W[I + 1] <> W[I]) then begin if (I = 3) and (Start = 0) then CloseFigure(Canvas.Handle); {it's a closed path} EndPath(Canvas.Handle); StrokePath(Canvas.Handle); SelectObject(Canvas.Handle, OldPn); DeleteObject(Pn); Pn := 0; InPath := False; end; end; end; end; finally if Pn <> 0 then begin SelectObject(Canvas.Handle, OldPn); DeleteObject(Pn); end; end; end; { TgpObject } function GetImageHeight(Image: TGpObject): Integer; begin if Image is TBitmap then Result := TBitmap(Image).Height else {$IFNDEF NoGDIPlus} if Image is THtGpImage then Result := THtGpImage(Image).Height else {$ENDIF !NoGDIPlus} if Image is TGifImage then Result := TGifImage(Image).Height {$IFNDEF NoMetafile} else if Image is ThtMetaFile then Result := ThtMetaFile(Image).Height {$ENDIF} else raise(EGDIPlus.Create('Not a TBitmap, TGifImage, TMetafile, or TGpImage')); end; function GetImageWidth(Image: TGpObject): Integer; begin if Image is TBitmap then Result := TBitmap(Image).Width else {$IFNDEF NoGDIPlus} if Image is THtGpImage then Result := THtGpImage(Image).Width else {$ENDIF !NoGDIPlus} if Image is TGifImage then Result := TGifImage(Image).Width {$IFNDEF NoMetafile} else if Image is ThtMetaFile then Result := ThtMetaFile(Image).Width {$ENDIF} else raise(EGDIPlus.Create('Not a TBitmap, TGifImage, TMetafile, or TGpImage')); end; { TViewerBase } //-- BG ---------------------------------------------------------- 05.01.2010 -- constructor TViewerBase.Create(AOwner: TComponent); begin inherited Create(AOwner); FQuirksMode := qmStandards; end; procedure TViewerBase.SetOnInclude(Handler: TIncludeType); begin FOnInclude := Handler; end; //-- BG ---------------------------------------------------------- 05.01.2010 -- procedure TViewerBase.SetOnLink(Handler: TLinkType); begin FOnLink := Handler; end; //-- BG ---------------------------------------------------------- 05.01.2010 -- procedure TViewerBase.SetOnScript(Handler: TScriptEvent); begin FOnScript := Handler; end; //-- BG ---------------------------------------------------------- 05.01.2010 -- procedure TViewerBase.SetOnSoundRequest(Handler: TSoundType); begin FOnSoundRequest := Handler; end; procedure TViewerBase.SetQuirksMode(const AValue: THtQuirksMode); begin FQuirksMode := AValue; end; {$ifdef has_StyleElements} procedure TViewerBase.UpdateStyleElements; begin inherited UpdateStyleElements; end; {$endif { THtmlViewerBase } //-- BG ---------------------------------------------------------- 12.09.2010 -- procedure THtmlViewerBase.KeyDown(var Key: Word; Shift: TShiftState); begin // just to make it public. inherited; end; { TFrameViewerBase } procedure TFrameViewerBase.wmerase(var msg: TMessage); begin msg.result := 1; end; {$ifdef LCL} const DefaultBitmap = 'DefaultBitmap'; ErrBitmap = 'ErrBitmap'; ErrBitmapMask = 'ErrBitmapMask'; // Hand_Cursor = 'Hand_Cursor'; procedure htLoadBitmap(var Bitmap: TBitmap; const Resource: String); begin Bitmap.LoadFromLazarusResource(Resource); end; function htLoadCursor(const CursorName: String): HICON; begin Result := LoadCursorFromLazarusResource(CursorName); end; {$else} const DefaultBitmap = 1002; ErrBitmap = 1001; ErrBitmapMask = 1005; procedure htLoadBitmap(var Bitmap: TBitmap; Resource: Integer); begin BitMap.Handle := LoadBitmap(HInstance, MakeIntResource(Resource)); end; function htLoadCursor(const CursorName: PChar): HICON; begin Result := LoadCursor(HInstance, CursorName); end; {$endif} { TIDObject } //-- BG ---------------------------------------------------------- 06.03.2011 -- function TIDObject.FreeMe: Boolean; begin Result := False; end; initialization DefBitMap := TBitmap.Create; ErrorBitMap := TBitmap.Create; ErrorBitMapMask := TBitmap.Create; {$ifdef LCL} {$I htmlun2.lrs} {$else} {$R Html32.res} {$endif} htLoadBitmap(DefBitMap, DefaultBitmap); htLoadBitmap(ErrorBitMap, ErrBitmap); htLoadBitmap(ErrorBitMapMask, ErrBitmapMask); Screen.Cursors[UpDownCursor] := htLoadCursor('UPDOWNCURSOR'); Screen.Cursors[UpOnlyCursor] := htLoadCursor('UPONLYCURSOR'); Screen.Cursors[DownOnlyCursor] := htLoadCursor('DOWNONLYCURSOR'); WaitStream := TMemoryStream.Create; ErrorStream := TMemoryStream.Create; finalization DefBitMap.Free; ErrorBitMap.Free; ErrorBitMapMask.Free; WaitStream.Free; ErrorStream.Free; end.
27.19029
154
0.609297
854142636e9e528c21f3c7a763ac2dd2124aefab
554
pas
Pascal
Test/AssociativePass/parameters.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
1
2022-02-18T22:14:44.000Z
2022-02-18T22:14:44.000Z
Test/AssociativePass/parameters.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
Test/AssociativePass/parameters.pas
synapsea/DW-Script
b36c2e57f0285c217f8f0cae8e4e158d21127163
[ "Condor-1.1" ]
null
null
null
procedure Test1(p : array [String] of String); begin Print('Test1: '); PrintLn(p.Keys.Sort.Join(',')); end; procedure Test2(const p : array [String] of String); begin Print('Test2: '); PrintLn(p.Keys.Sort.Join(',')); end; procedure Test3(var p : array [String] of String); begin Print('Test3: '); PrintLn(p.Keys.Sort.Join(',')); var loc : array [String] of String; loc['gamma'] := 'g'; p := loc; end; var a : array [String] of String; a['alpha'] := 'a'; a['beta'] := 'b'; Test1(a); Test2(a); Test3(a); Test1(a);
17.3125
52
0.581227
6aac9de39e45a847a74bac61f50f0a5042cb8327
1,259
pas
Pascal
src/Horse.Provider.Abstract.pas
AndersondaCampo/horse
4a063d7b1936c6f66af527e60a28e66d90ecbc6a
[ "MIT" ]
2
2021-11-05T12:31:07.000Z
2021-11-09T11:52:14.000Z
src/Horse.Provider.Abstract.pas
AndersondaCampo/horse
4a063d7b1936c6f66af527e60a28e66d90ecbc6a
[ "MIT" ]
null
null
null
src/Horse.Provider.Abstract.pas
AndersondaCampo/horse
4a063d7b1936c6f66af527e60a28e66d90ecbc6a
[ "MIT" ]
null
null
null
unit Horse.Provider.Abstract; {$IF DEFINED(FPC)} {$MODE DELPHI}{$H+} {$ENDIF} interface uses {$IF DEFINED(FPC)} SysUtils, Horse.Proc, {$ELSE} System.SysUtils, {$ENDIF} Horse.Core, Horse.Core.RouterTree; type THorseProviderAbstract<T: class{$IF DEFINED(FPC)}, constructor{$ENDIF}> = class(THorseCore) private class var FOnListen: TProc<T>; protected class procedure SetOnListen(const Value: TProc<T>); static; class function GetOnListen: TProc<T>; static; class procedure DoOnListen; public class procedure Listen; virtual; abstract; class procedure StopListen; virtual; class property OnListen: TProc<T> read GetOnListen write SetOnListen; end; implementation { THorseProviderAbstract } class procedure THorseProviderAbstract<T>.DoOnListen; begin if Assigned(FOnListen) then FOnListen({$IF DEFINED(FPC)}T(GetInstance){$ELSE}GetInstance{$ENDIF}); end; class function THorseProviderAbstract<T>.GetOnListen: TProc<T>; begin Result := FOnListen; end; class procedure THorseProviderAbstract<T>.SetOnListen(const Value: TProc<T>); begin FOnListen := Value; end; class procedure THorseProviderAbstract<T>.StopListen; begin raise Exception.Create('StopListen not implemented'); end; end.
22.482143
93
0.739476
8377ef8096d5a4f9a2f59c92cf14c6cc8e4f08af
12,785
pas
Pascal
fTestVSOP2013.pas
atkins126/vsop2013
06915d6b92c2f134f121c3834aa5b3b5bb7f7eb6
[ "MIT" ]
12
2020-10-22T00:08:57.000Z
2022-01-16T02:09:02.000Z
fTestVSOP2013.pas
atkins126/vsop2013
06915d6b92c2f134f121c3834aa5b3b5bb7f7eb6
[ "MIT" ]
null
null
null
fTestVSOP2013.pas
atkins126/vsop2013
06915d6b92c2f134f121c3834aa5b3b5bb7f7eb6
[ "MIT" ]
5
2020-09-17T15:34:11.000Z
2021-02-12T14:25:41.000Z
unit fTestVSOP2013; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.Math.Vectors, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, FMX.Objects, FMX.Edit, FMX.Memo.Types, FMX.DateTimeCtrls, vsop2013, doubleVector3D, PlanetData; type TForm2 = class(TForm) Memo1: TMemo; btnLoadFile: TButton; labPercent: TLabel; pbChart: TPaintBox; TimerAnimatePlanets: TTimer; cbAnimatePlanets: TSwitch; Label1: TLabel; labTime: TLabel; tbScale: TTrackBar; labScale: TLabel; tbAnimationSpeed: TTrackBar; labAnimationSpeed: TLabel; edFilename: TEdit; btnTests: TButton; btnCalc: TButton; edPlanet: TEdit; Label2: TLabel; C: TLabel; edJDE: TEdit; btnSaveBinFile: TButton; btnLoadBinFile: TButton; edDate: TDateEdit; Label3: TLabel; procedure btnLoadFileClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure cbAnimatePlanetsSwitch(Sender: TObject); procedure TimerAnimatePlanetsTimer(Sender: TObject); procedure pbChartPaint(Sender: TObject; Canvas: TCanvas); procedure tbScaleChange(Sender: TObject); procedure tbAnimationSpeedChange(Sender: TObject); procedure btnTestsClick(Sender: TObject); procedure btnCalcClick(Sender: TObject); procedure btnSaveBinFileClick(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure btnLoadBinFileClick(Sender: TObject); procedure edDateChange(Sender: TObject); private procedure Form2LoadPropgress(Sender: TObject; aPerc: integer); procedure showVectors(ip: integer; const jde: Double; const Position,Speed: TVector3D_D); public fVSOPFile:T_VSOP2013_File; fBitmap:TBitmap; // Sky chart fPosPlanets:Array[1..NUM_PLANETS] of TVector3D_D; fanimJDE:double; end; var Form2: TForm2; implementation {$R *.fmx} procedure TForm2.FormCreate(Sender: TObject); var i:integer; begin fVSOPFile := T_VSOP2013_File.Create; for i:=1 to NUM_PLANETS do fPosPlanets[i] := Vector3D_D(0,0,0); fBitmap := TBitmap.Create; end; procedure TForm2.FormDestroy(Sender: TObject); begin fVSOPFile.Free; end; const PLANET_COLORS:Array[1..NUM_PLANETS] of TAlphaColor= ( TAlphaColorRec.Red, // 1 Mercury TAlphaColorRec.Lightsalmon, // 2 Venus TAlphaColorRec.Aqua, // 3 Earth TAlphaColorRec.Red, // 4 Mars TAlphaColorRec.White, // 5 Jupiter TAlphaColorRec.Green, // 6 Saturn TAlphaColorRec.Aliceblue, // 7 Uranus TAlphaColorRec.Azure, // 8 Neptune TAlphaColorRec.Bisque // 9 Pluto ); PLANET_RADIUS:Array[1..NUM_PLANETS] of integer= //in pixels ( 2, // 1 Mercury 3, // 2 Venus 3, // 3 Earth 3, // 4 Mars 5, // 5 Jupiter 5, // 6 Saturn 4, // 7 Uranus 4, // 8 Neptune 1 // 9 Pluto ); procedure TForm2.pbChartPaint(Sender: TObject; Canvas: TCanvas); var ip:integer; aPos:TVector3D_D; aScP:TVector; aR:TRectF; C:TVector; aScale,aRadius:Double; begin // paint fBitmap C := Vector(300,300); //center of chart = Sun pos (heliocantric coordinates) if (fBitmap.Width=0) then //first paint begin fBitmap.SetSize(600,600); fBitmap.Canvas.BeginScene; fBitmap.Canvas.Clear( TAlphacolorRec.Black ); //reset end else begin fBitmap.Canvas.BeginScene; aR := RectF(0,0,600,600); fBitmap.Canvas.Fill.Color := $08000000; // draw transparent dark rect to darken the past gradually fBitmap.Canvas.FillRect(aR,0,0,AllCorners,1.0); end; //draw Sun at the center aR := RectF(C.x-6, C.y-6, C.x+6, C.y+6); // fBitmap.Canvas.Stroke.Kind := TBrushKind.Solid; fBitmap.Canvas.Fill.Kind := TBrushKind.Solid; fBitmap.Canvas.Fill.Color := TAlphaColorRec.Yellow; fBitmap.Canvas.Stroke.Kind := TBrushKind.Solid; fBitmap.Canvas.FillEllipse(aR, 1.0); aScale := tbScale.Value; //=pix/au for ip := 1 to NUM_PLANETS do begin aPos := fPosPlanets[ip]; //convert to screen coordinates aScP := Vector( C.x+aPos.x*aScale,C.Y+aPos.y*aScale); //convert au-->pix aRadius := PLANET_RADIUS[ip]; aR := RectF(aScP.X-aRadius, aScP.Y-aRadius, aScP.X+aRadius, aScP.Y+aRadius); fBitmap.Canvas.Fill.Color := PLANET_COLORS[ip]; fBitmap.Canvas.FillEllipse(aR, 1.0); if (ip=6) then //saturn rings ;) begin fBitmap.Canvas.Stroke.Color := PLANET_COLORS[ip]; fBitmap.Canvas.DrawLine( PointF(aScP.X-8,aScP.Y), PointF(aScP.X+8,aScP.Y), 1.0);; end; end; fBitmap.Canvas.EndScene; aR := RectF(0,0,600,600); //copy to pb Canvas.DrawBitmap(fBitmap,aR,aR,1.0); end; procedure TForm2.tbAnimationSpeedChange(Sender: TObject); begin labAnimationSpeed.Text := Format('%4.0f',[tbAnimationSpeed.Value])+' days/tick (t=200ms)'; end; procedure TForm2.tbScaleChange(Sender: TObject); begin labScale.Text := IntToStr( Trunc(tbScale.Value) )+' pix/au'; if (fBitmap.Width<>0) then begin fBitmap.Canvas.BeginScene; fBitmap.Canvas.Clear( TAlphacolorRec.Black ); fBitmap.Canvas.EndScene; end; end; procedure TForm2.showVectors(ip:integer; const jde:Double; const Position,Speed:TVector3D_D); begin Memo1.Lines.Add(''); Memo1.Lines.Add( PLANET_NAMES[ip] ); Memo1.Lines.Add('jde:'+Trim(Format('%8.1f',[ jde ]))); // pos Memo1.Lines.Add('x: '+Trim(Format('%18.14f ua',[ Position.x ]))); Memo1.Lines.Add('y: '+Trim(Format('%18.14f ua',[ Position.y ]))); Memo1.Lines.Add('z: '+Trim(Format('%18.14f ua',[ Position.z ]))); // spd Memo1.Lines.Add('sx: '+Trim(Format('%18.14f ua/d',[ Speed.x ]))); Memo1.Lines.Add('sy: '+Trim(Format('%18.14f ua/d',[ Speed.y ]))); Memo1.Lines.Add('sz: '+Trim(Format('%18.14f ua/d',[ Speed.z ]))); end; procedure TForm2.btnTestsClick(Sender: TObject); var Position,Speed:TVector3D_D; ip:integer; jde:double; begin // calculation tests extracted from VSOP2013_ctl.txt // MERCURY JD2405730.5 X : 0.242020971329 ua Y : -0.352713705683 ua Z : -0.051047411323 ua // X': 0.017592067303 ua/d Y': 0.017315449357 ua/d Z': -0.000208715093 ua/d ip := 1; //Mercury jde := 2405730.5; if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); Memo1.Lines.Add('X : 0.242020971329 ua Y : -0.352713705683 ua Z : -0.051047411323 ua expected'); //JUPITER JD2816124.5 X : -0.280774899591 ua Y : 5.124152830950 ua Z : -0.018441408820 ua // X': -0.007646343544 ua/d Y': -0.000050903873 ua/d Z': 0.000168106750 ua/d ip := 5; //jupiter jde := 2816124.5; if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); Memo1.Lines.Add('X : -0.280774899591 ua Y : 5.124152830950 ua Z : -0.018441408820 ua expected'); // JUPITER JD2405730.5 X : -5.392780445602 ua Y : -0.805698954496 ua Z : 0.124332318817 ua // X': 0.001019284060 ua/d Y': -0.007116469431 ua/d Z': 0.000005921462 ua/d ip := 5; //jupiter jde := 2405730.5; if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); Memo1.Lines.Add('-5.392780445602 ua Y : -0.805698954496 ua Z : 0.124332318817 ua expected'); // EARTH-MOON JD2268932.5 X : -0.437662445161 ua Y : 0.880925943295 ua Z : 0.000970542639 ua // X': -0.015692704507 ua/d Y': -0.007712480753 ua/d Z': -0.000010013711 ua/d ip := 3; // Earth jde := 2268932.5; if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); Memo1.Lines.Add('X : -0.437662445161 ua Y : 0.880925943295 ua Z : 0.000970542639 ua expected'); // MARS JD2542528.5 X : -1.501298042540 ua Y : 0.720630252585 ua Z : 0.051244837632 ua // X': -0.005550687750 ua/d Y': -0.011409922095 ua/d Z': -0.000106501220 ua/d ip := 4; //Mars jde := 2542528.5; if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); Memo1.Lines.Add('X : -1.501298042540 ua Y : 0.720630252585 ua Z : 0.051244837632 ua expected'); // SATURN JD2542528.5 X : -7.484629691185 ua Y : -6.379153813306 ua Z : 0.409052899765 ua // X': 0.003302297240 ua/d Y': -0.004260528208 ua/d Z': -0.000060046705 ua/d ip := 6; //Saturn jde := 2542528.5; if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); Memo1.Lines.Add('X : -7.484629691185 ua Y : -6.379153813306 ua Z : 0.409052899765 ua expected'); end; procedure TForm2.cbAnimatePlanetsSwitch(Sender: TObject); begin TimerAnimatePlanets.Enabled := cbAnimatePlanets.IsChecked; if TimerAnimatePlanets.Enabled then fanimJDE := StrToFloat(edJDE.Text); //start animation from specified JD end; procedure TForm2.edDateChange(Sender: TObject); var D:TDatetime; aJD:Double; begin D := edDate.Date; aJD := DateToJD( D ); edJDE.Text := Format('%6.1f',[aJD]); end; // 200 ms = 5 ticks per second procedure TForm2.TimerAnimatePlanetsTimer(Sender: TObject); var ip:integer; aPosition,aSpeed:TVector3D_D; Year:Double; D:TDatetime; begin if Assigned(fVSOPFile) then //upd begin // Year := (fanimJDE-jd2000)/365.2422+2000.0; // more or less :) // labTime.Text := Format('%6.2f',[Year]); D := JulianToGregorianDate( fanimJDE ); labTime.Text := FormatDateTime('yyyy mm',D); for ip := 1 to NUM_PLANETS do begin try if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}fanimJDE, {out:} aPosition, aSpeed) then fPosPlanets[ip] := aPosition; except TimerAnimatePlanets.Enabled := false; raise Exception.Create('error in calculation: file range exceded'); end; end; fanimJDE := fanimJDE + tbAnimationSpeed.Value; // + advance animation time pbChart.Repaint; end; end; // Loads vsop2013 ASCII file and performs a few calculations procedure TForm2.btnCalcClick(Sender: TObject); var Position,Speed:TVector3D_D; ip:integer; jde:double; begin ip := StrToInt( edPlanet.Text ); jde := StrToFloat( edJDE.Text ); if fVSOPFile.calculate_coordinates( {ip:}ip , {jde:}jde, {out:} Position, Speed) then showVectors(ip,jde,Position,Speed) else Memo1.Lines.Add('error'); // position chart fanimJDE := jde; TimerAnimatePlanetsTimer(nil); // update planet chart to calc data end; procedure TForm2.btnLoadBinFileClick(Sender: TObject); var aFN:String; begin aFN := Trim( edFilename.Text )+'.bin'; // '\dpr4\vsop2013\VSOP2013.p2000.bno' 1500-3000. ( includes current time ) if fVSOPFile.ReadBinaryFile(aFN) then Memo1.Lines.Add(aFN+' Loaded') else Memo1.Lines.Add(aFN+' write error'); end; procedure TForm2.btnLoadFileClick(Sender: TObject); var aFN:String; begin fVSOPFile.OnLoadProgress := Form2LoadPropgress; // reads and parses long ASCII file: wait.. // te aFN := Trim( edFilename.Text ); // '\dpr4\vsop2013\VSOP2013.p2000' 1500-3000. ( includes current time ) fVSOPFile.Read_ASCII_File( aFN ); // load test file Memo1.Lines.Add(aFN+' Loaded'); end; procedure TForm2.btnSaveBinFileClick(Sender: TObject); var aFN:String; begin aFN := Trim( edFilename.Text )+'.bin'; // '\dpr4\vsop2013\VSOP2013.p2000.bin' 1500-3000. ( includes current time ) if fVSOPFile.WriteBinaryFile(aFN) then Memo1.Lines.Add(aFN+' saved') else Memo1.Lines.Add(aFN+' write error'); end; procedure TForm2.Form2LoadPropgress(Sender:TObject; aPerc:integer); begin labPercent.Text := IntToStr(aPerc)+'%'; labPercent.Repaint; end; end.
35.912921
121
0.636762
f188ffc181ac822f456cfd044e2494e23ad2ec3d
19,490
pas
Pascal
MUSIC_PRO/bass_fx.pas
delphi-pascal-archive/music-pro
85376ca55a478613638e0fa31c10721634dd5227
[ "Unlicense" ]
null
null
null
MUSIC_PRO/bass_fx.pas
delphi-pascal-archive/music-pro
85376ca55a478613638e0fa31c10721634dd5227
[ "Unlicense" ]
null
null
null
MUSIC_PRO/bass_fx.pas
delphi-pascal-archive/music-pro
85376ca55a478613638e0fa31c10721634dd5227
[ "Unlicense" ]
null
null
null
{============================================================================= BASS_FX 2.4 - Copyright (c) 2002-2009 (: JOBnik! :) [Arthur Aminov, ISRAEL] [http://www.jobnik.org] bugs/suggestions/questions: forum : http://www.un4seen.com/forum/?board=1 http://www.jobnik.org/smforum e-mail : bass_fx@jobnik.org -------------------------------------------------- BASS_FX unit is based on BASS_FX 1.1 unit: ------------------------------------------ (c) 2002 Roger Johansson. w1dg3r@yahoo.com NOTE: This unit will work only with BASS_FX version 2.4.4 Check www.un4seen.com or www.jobnik.org for any later versions. * Requires BASS 2.4 (available @ www.un4seen.com) How to install: --------------- Copy BASS_FX.PAS & BASS.PAS to the \LIB subdirectory of your Delphi path or your project dir. =============================================================================} unit BASS_FX; interface uses BASS; const // Error codes returned by BASS_ErrorGetCode() BASS_ERROR_FX_NODECODE = 4000; // Not a decoding channel BASS_ERROR_FX_BPMINUSE = 4001; // BPM/Beat detection is in use // Tempo / Reverse / BPM / Beat flag BASS_FX_FREESOURCE = $10000; // Free the source handle as well? {$IFDEF WIN32} bass_fxdll = 'bass_fx.dll'; {$ELSE} bass_fxdll = 'libbass_fx.so'; {$ENDIF} // BASS_FX Version function BASS_FX_GetVersion(): DWORD; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; {============================================================================================= D S P (Digital Signal Processing) ==============================================================================================} { Multi-channel order of each channel is as follows: 3 channels left-front, right-front, center. 4 channels left-front, right-front, left-rear/side, right-rear/side. 6 channels (5.1) left-front, right-front, center, LFE, left-rear/side, right-rear/side. 8 channels (7.1) left-front, right-front, center, LFE, left-rear/side, right-rear/side, left-rear center, right-rear center. } const // DSP channels flags BASS_BFX_CHANALL = -1; // all channels at once (as by default) BASS_BFX_CHANNONE = 0; // disable an effect for all channels BASS_BFX_CHAN1 = 1; // left-front channel BASS_BFX_CHAN2 = 2; // right-front channel BASS_BFX_CHAN3 = 4; // see above info BASS_BFX_CHAN4 = 8; // see above info BASS_BFX_CHAN5 = 16; // see above info BASS_BFX_CHAN6 = 32; // see above info BASS_BFX_CHAN7 = 64; // see above info BASS_BFX_CHAN8 = 128; // see above info // If you have more than 8 channels, use this macro function BASS_BFX_CHANNEL_N(n: DWORD): DWORD; // DSP effects const BASS_FX_BFX_ROTATE = $10000; // A channels volume ping-pong / stereo BASS_FX_BFX_ECHO = $10001; // Echo / 2 channels max BASS_FX_BFX_FLANGER = $10002; // Flanger / multi channel BASS_FX_BFX_VOLUME = $10003; // Volume / multi channel BASS_FX_BFX_PEAKEQ = $10004; // Peaking Equalizer / multi channel BASS_FX_BFX_REVERB = $10005; // Reverb / 2 channels max BASS_FX_BFX_LPF = $10006; // Low Pass Filter / multi channel BASS_FX_BFX_MIX = $10007; // Swap, remap and mix channels / multi channel BASS_FX_BFX_DAMP = $10008; // Dynamic Amplification / multi channel BASS_FX_BFX_AUTOWAH = $10009; // Auto WAH / multi channel BASS_FX_BFX_ECHO2 = $1000A; // Echo 2 / multi channel BASS_FX_BFX_PHASER = $1000B; // Phaser / multi channel BASS_FX_BFX_ECHO3 = $1000C; // Echo 3 / multi channel BASS_FX_BFX_CHORUS = $1000D; // Chorus / multi channel BASS_FX_BFX_APF = $1000E; // All Pass Filter / multi channel BASS_FX_BFX_COMPRESSOR = $1000F; // Compressor / multi channel BASS_FX_BFX_DISTORTION = $10010; // Distortion / multi channel BASS_FX_BFX_COMPRESSOR2 = $10011; // Compressor 2 / multi channel BASS_FX_BFX_VOLUME_ENV = $10012; // Volume envelope / multi channel type // Echo BASS_BFX_ECHO = record fLevel: FLOAT; // [0....1....n] linear lDelay: Integer; // [1200..30000] end; // Flanger BASS_BFX_FLANGER = record fWetDry: FLOAT; // [0....1....n] linear fSpeed: FLOAT; // [0......0.09] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Volume BASS_BFX_VOLUME = record lChannel: Integer; // BASS_BFX_CHANxxx flag/s or 0 for global volume control fVolume: FLOAT; // [0....1....n] linear end; // Peaking Equalizer BASS_BFX_PEAKEQ = record lBand: Integer; // [0...............n] more bands means more memory & cpu usage fBandwidth: FLOAT; // [0.1.....4.......n] in octaves - Q is not in use (BW has a priority over Q) fQ: FLOAT; // [0.......1.......n] the EE kinda definition (linear) (if Bandwidth is not in use) fCenter: FLOAT; // [1Hz..<info.freq/2] in Hz fGain: FLOAT; // [-15dB...0...+15dB] in dB lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Reverb BASS_BFX_REVERB = record fLevel: FLOAT; // [0....1....n] linear lDelay: Integer; // [1200..10000] end; // Low Pass Filter BASS_BFX_LPF = record fResonance: FLOAT; // [0.01............10] fCutOffFreq: FLOAT; // [1Hz....info.freq/2] cutoff frequency lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Swap, remap and mix PTlChannel = ^TlChannel; TlChannel = array[0..maxInt div sizeOf(DWORD) - 1] of DWORD; BASS_BFX_MIX = record lChannel: PTlChannel; // a pointer to an array of channels to mix using BASS_BFX_CHANxxx flag/s (lChannel[0] is left channel...) end; // Dynamic Amplification BASS_BFX_DAMP = record fTarget: FLOAT; // target volume level [0<......1] linear fQuiet: FLOAT; // quiet volume level [0.......1] linear fRate: FLOAT; // amp adjustment rate [0.......1] linear fGain: FLOAT; // amplification level [0...1...n] linear fDelay: FLOAT; // delay in seconds before increasing level [0.......n] linear lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Auto WAH BASS_BFX_AUTOWAH = record fDryMix: FLOAT; // dry (unaffected) signal mix [-2......2] fWetMix: FLOAT; // wet (affected) signal mix [-2......2] fFeedback: FLOAT; // feedback [-1......1] fRate: FLOAT; // rate of sweep in cycles per second [0<....<10] fRange: FLOAT; // sweep range in octaves [0<....<10] fFreq: FLOAT; // base frequency of sweep Hz [0<...1000] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Echo 2 BASS_BFX_ECHO2 = record fDryMix: FLOAT; // dry (unaffected) signal mix [-2......2] fWetMix: FLOAT; // wet (affected) signal mix [-2......2] fFeedback: FLOAT; // feedback [-1......1] fDelay: FLOAT; // delay sec [0<......n] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Phaser BASS_BFX_PHASER = record fDryMix: FLOAT; // dry (unaffected) signal mix [-2......2] fWetMix: FLOAT; // wet (affected) signal mix [-2......2] fFeedback: FLOAT; // feedback [-1......1] fRate: FLOAT; // rate of sweep in cycles per second [0<....<10] fRange: FLOAT; // sweep range in octaves [0<....<10] fFreq: FLOAT; // base frequency of sweep [0<...1000] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Echo 3 BASS_BFX_ECHO3 = record fDryMix: FLOAT; // dry (unaffected) signal mix [-2......2] fWetMix: FLOAT; // wet (affected) signal mix [-2......2] fDelay: FLOAT; // delay sec [0<......n] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Chorus BASS_BFX_CHORUS = record fDryMix: FLOAT; // dry (unaffected) signal mix [-2......2] fWetMix: FLOAT; // wet (affected) signal mix [-2......2] fFeedback: FLOAT; // feedback [-1......1] fMinSweep: FLOAT; // minimal delay ms [0<..<6000] fMaxSweep: FLOAT; // maximum delay ms [0<..<6000] fRate: FLOAT; // rate ms/s [0<...1000] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // All Pass Filter BASS_BFX_APF = record fGain: FLOAT; // reverberation time [-1=<..<=1] fDelay: FLOAT; // delay sec [0<....<=n] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Compressor BASS_BFX_COMPRESSOR = record fThreshold: FLOAT; // compressor threshold [0<=...<=1] fAttacktime: FLOAT; // attack time ms [0<.<=1000] fReleasetime: FLOAT; // release time ms [0<.<=5000] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Distortion BASS_BFX_DISTORTION = record fDrive: FLOAT; // distortion drive [0<=...<=5] fDryMix: FLOAT; // dry (unaffected) signal mix [-5<=..<=5] fWetMix: FLOAT; // wet (affected) signal mix [-5<=..<=5] fFeedback: FLOAT; // feedback [-1<=..<=1] fVolume: FLOAT; // distortion volume [0=<...<=2] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Compressor 2 BASS_BFX_COMPRESSOR2 = record fGain: FLOAT; // output gain of signal after compression [-60....60] in dB fThreshold: FLOAT; // point at which compression begins [-60.....0] in dB fRatio: FLOAT; // compression ratio [1.......n] fAttack: FLOAT; // attack time in ms [0.01.1000] fRelease: FLOAT; // release time in ms [0.01.5000] lChannel: Integer; // BASS_BFX_CHANxxx flag/s end; // Volume envelope BASS_BFX_ENV_NODE = record pos: DOUBLE; // node position in seconds (1st envelope node must be at position 0) val: FLOAT; // node value end; PBASS_BFX_ENV_NODES = ^TBASS_BFX_ENV_NODES; TBASS_BFX_ENV_NODES = array[0..maxInt div sizeOf(BASS_BFX_ENV_NODE) - 1] of BASS_BFX_ENV_NODE; BASS_BFX_VOLUME_ENV = record lChannel: Integer; // BASS_BFX_CHANxxx flag/s lNodeCount: Integer; // number of nodes pNodes: PBASS_BFX_ENV_NODES; // the nodes bFollow: BOOL; // follow source position end; {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= set dsp fx - BASS_ChannelSetFX ============================================================================================ remove dsp fx - BASS_ChannelRemoveFX ============================================================================================ set parameters - BASS_FXSetParameters ============================================================================================ retrieve parameters - BASS_FXGetParameters ============================================================================================ reset the state - BASS_FXReset =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} {============================================================================================= TEMPO / PITCH SCALING / SAMPLERATE ==============================================================================================} // NOTES: 1. Supported only - mono / stereo - channels // 2. Enable Tempo supported flags in BASS_FX_TempoCreate and the others to source handle. const // tempo attributes (BASS_ChannelSet/GetAttribute) BASS_ATTRIB_TEMPO = $10000; BASS_ATTRIB_TEMPO_PITCH = $10001; BASS_ATTRIB_TEMPO_FREQ = $10002; // tempo attributes options // [option] [value] BASS_ATTRIB_TEMPO_OPTION_USE_AA_FILTER = $10010; // TRUE (default) / FALSE BASS_ATTRIB_TEMPO_OPTION_AA_FILTER_LENGTH = $10011; // 32 default (8 .. 128 taps) BASS_ATTRIB_TEMPO_OPTION_USE_QUICKALGO = $10012; // TRUE / FALSE (default) BASS_ATTRIB_TEMPO_OPTION_SEQUENCE_MS = $10013; // 82 default, 0 = automatic BASS_ATTRIB_TEMPO_OPTION_SEEKWINDOW_MS = $10014; // 28 default, 0 = automatic BASS_ATTRIB_TEMPO_OPTION_OVERLAP_MS = $10015; // 8 default BASS_ATTRIB_TEMPO_OPTION_PREVENT_CLICK = $10016; // TRUE / FALSE (default) function BASS_FX_TempoCreate(chan, flags: DWORD): HSTREAM; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_TempoGetSource(chan: HSTREAM): DWORD; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_TempoGetRateRatio(chan: HSTREAM): FLOAT; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; {============================================================================================= R E V E R S E ==============================================================================================} // NOTES: 1. MODs won't load without BASS_MUSIC_PRESCAN flag. // 2. Enable Reverse supported flags in BASS_FX_ReverseCreate and the others to source handle. const // reverse attribute (BASS_ChannelSet/GetAttribute) BASS_ATTRIB_REVERSE_DIR = $11000; // playback directions BASS_FX_RVS_REVERSE = -1; BASS_FX_RVS_FORWARD = 1; function BASS_FX_ReverseCreate(chan: DWORD; dec_block: FLOAT; flags: DWORD): HSTREAM; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_ReverseGetSource(chan: HSTREAM): DWORD; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; {============================================================================================= B P M (Beats Per Minute) =============================================================================================} const // bpm flags BASS_FX_BPM_BKGRND = 1; // if in use, then you can do other processing while detection's in progress. (BPM/Beat) BASS_FX_BPM_MULT2 = 2; // if in use, then will auto multiply bpm by 2 (if BPM < minBPM*2) // translation options BASS_FX_BPM_TRAN_X2 = 0; // multiply the original BPM value by 2 (may be called only once & will change the original BPM as well!) BASS_FX_BPM_TRAN_2FREQ = 1; // BPM value to Frequency BASS_FX_BPM_TRAN_FREQ2 = 2; // Frequency to BPM value BASS_FX_BPM_TRAN_2PERCENT = 3; // BPM value to Percents BASS_FX_BPM_TRAN_PERCENT2 = 4; // Percents to BPM value type BPMPROCESSPROC = procedure(chan: DWORD; percent: FLOAT); {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; BPMPROC = procedure(chan: DWORD; bpm: FLOAT; user: DWORD); {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; function BASS_FX_BPM_DecodeGet(chan: DWORD; startSec, endSec: DOUBLE; minMaxBPM, flags: DWORD; proc: BPMPROCESSPROC): FLOAT; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_CallbackSet(handle: DWORD; proc: BPMPROC; period: DOUBLE; minMaxBPM, flags, user: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_CallbackReset(handle: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_Translate(handle: DWORD; val2tran: FLOAT; trans: DWORD): FLOAT; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_Free(handle: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; {============================================================================================= B E A T =============================================================================================} type BPMBEATPROC = procedure(chan: DWORD; beatpos: DOUBLE; user: DWORD); {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; function BASS_FX_BPM_BeatCallbackSet(handle: DWORD; proc: BPMBEATPROC; user: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_BeatCallbackReset(handle: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_BeatDecodeGet(chan: DWORD; startSec, endSec: DOUBLE; flags: DWORD; proc: BPMBEATPROC; user: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_BeatSetParameters(handle: DWORD; bandwidth, centerfreq, beat_rtime: FLOAT): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_BeatGetParameters(handle: DWORD; var bandwidth, centerfreq, beat_rtime: FLOAT): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; function BASS_FX_BPM_BeatFree(handle: DWORD): BOOL; {$IFDEF WIN32}stdcall{$ELSE}cdecl{$ENDIF}; external bass_fxdll; implementation function BASS_BFX_CHANNEL_N(n: DWORD): DWORD; begin Result := 1 shl (n-1); end; end.
53.39726
191
0.500821