Package Zearch Temp Implementation
* Adds Basic form * Adds Unit Classes * Adds API Request option Signed-off-by: Indrajith K L <indrajith@indrajith.dev>
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
112
backup/main.lfm
Normal file
112
backup/main.lfm
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 149
|
||||||
|
Height = 296
|
||||||
|
Top = 250
|
||||||
|
Width = 704
|
||||||
|
Caption = 'Package Zerch'
|
||||||
|
ClientHeight = 296
|
||||||
|
ClientWidth = 704
|
||||||
|
ShowInTaskBar = stAlways
|
||||||
|
SnapOptions.SnapToMonitor = True
|
||||||
|
OnCreate = FormCreate
|
||||||
|
object TabControl1: TTabControl
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 296
|
||||||
|
Top = 0
|
||||||
|
Width = 712
|
||||||
|
OnChange = TabControl1Change
|
||||||
|
TabIndex = 0
|
||||||
|
Tabs.Strings = (
|
||||||
|
'Search'
|
||||||
|
'Metadata'
|
||||||
|
'Versions'
|
||||||
|
)
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 0
|
||||||
|
object lblSearch: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 15
|
||||||
|
Top = 32
|
||||||
|
Width = 79
|
||||||
|
Caption = 'Package Name'
|
||||||
|
end
|
||||||
|
object TxtBoxSearch: TEdit
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 96
|
||||||
|
Height = 23
|
||||||
|
Top = 32
|
||||||
|
Width = 504
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = TxtBoxSearchChange
|
||||||
|
end
|
||||||
|
object BtnSearch: TButton
|
||||||
|
Left = 608
|
||||||
|
Height = 26
|
||||||
|
Top = 29
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Search'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = BtnSearchClick
|
||||||
|
end
|
||||||
|
object memoTest: TMemo
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 8
|
||||||
|
Height = 192
|
||||||
|
Top = 96
|
||||||
|
Width = 688
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
ScrollBars = ssAutoVertical
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 15
|
||||||
|
Top = 77
|
||||||
|
Width = 98
|
||||||
|
Caption = 'Debug[Response]'
|
||||||
|
Color = 8388863
|
||||||
|
Font.CharSet = ANSI_CHARSET
|
||||||
|
Font.Color = clFuchsia
|
||||||
|
Font.Pitch = fpVariable
|
||||||
|
Font.Quality = fqDraft
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ExtendedTabControl1: TExtendedTabControl
|
||||||
|
Left = 360
|
||||||
|
Height = 150
|
||||||
|
Top = 104
|
||||||
|
Width = 200
|
||||||
|
TabIndex = 0
|
||||||
|
Tabs.Strings = (
|
||||||
|
'1'
|
||||||
|
'2'
|
||||||
|
'3'
|
||||||
|
)
|
||||||
|
TabOrder = 4
|
||||||
|
ShowToolBar = tsNone
|
||||||
|
object ExtendedTabToolbar1: TExtendedTabToolbar
|
||||||
|
Left = 0
|
||||||
|
Height = 26
|
||||||
|
Top = 0
|
||||||
|
Width = 150
|
||||||
|
Align = alCustom
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'ExtendedTabToolbar1'
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 102
|
||||||
|
Height = 15
|
||||||
|
Top = 83
|
||||||
|
Width = 34
|
||||||
|
Caption = 'Label2'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
85
backup/main.pas
Normal file
85
backup/main.pas
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
unit main;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
|
||||||
|
ComCtrls, ExtendedTabControls, fphttpclient, opensslsockets, fpjson,
|
||||||
|
jsonparser, ThreadUnit;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
BtnSearch: TButton;
|
||||||
|
ExtendedTabControl1: TExtendedTabControl;
|
||||||
|
ExtendedTabToolbar1: TExtendedTabToolbar;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
memoTest: TMemo;
|
||||||
|
TxtBoxSearch: TEdit;
|
||||||
|
lblSearch: TLabel;
|
||||||
|
TabControl1: TTabControl;
|
||||||
|
procedure BtnSearchClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TabControl1Change(Sender: TObject);
|
||||||
|
procedure TxtBoxSearchChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
Client: TFPHTTPClient;
|
||||||
|
Response: string;
|
||||||
|
PackageName: string;
|
||||||
|
jData: TJSONData;
|
||||||
|
packageData: TJSONObject;
|
||||||
|
test1: ThreadClass;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BtnSearch.Enabled := False;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.BtnSearchClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PackageName := TxtBoxSearch.Text;
|
||||||
|
Client := TFPHTTPClient.Create(nil);
|
||||||
|
try
|
||||||
|
test1 := ThreadClass.create();
|
||||||
|
Response := Client.Get(Concat('https://registry.npmjs.org/', PackageName));
|
||||||
|
jData := GetJSON(Response);
|
||||||
|
packageData := jData as TJSONObject;
|
||||||
|
memoTest.Lines.Text := jData.FormatJSON;
|
||||||
|
finally
|
||||||
|
Client.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.TabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.TxtBoxSearchChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Length(TxtBoxSearch.Text) > 1 then
|
||||||
|
BtnSearch.Enabled := True
|
||||||
|
else
|
||||||
|
BtnSearch.Enabled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
86
backup/package_zerch.lpi
Normal file
86
backup/package_zerch.lpi
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="12"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<General>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
<Title Value="package_zerch"/>
|
||||||
|
<Scaled Value="True"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<XPManifest>
|
||||||
|
<DpiAware Value="True"/>
|
||||||
|
</XPManifest>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
</General>
|
||||||
|
<BuildModes>
|
||||||
|
<Item Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
<UseFileFilters Value="True"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LazControls"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LazControlDsgn"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="package_zerch.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
</Unit>
|
||||||
|
</Units>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="package_zerch"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<DebugInfoType Value="dsDwarf3"/>
|
||||||
|
</Debugging>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions>
|
||||||
|
<Item>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
||||||
176
backup/package_zerch.lps
Normal file
176
backup/package_zerch.lps
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectSession>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Version Value="12"/>
|
||||||
|
<BuildModes Active="Default"/>
|
||||||
|
<Units>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="package_zerch.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="-1"/>
|
||||||
|
<TopLine Value="-1"/>
|
||||||
|
<CursorPos X="-1" Y="-1"/>
|
||||||
|
<UsageCount Value="24"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<TopLine Value="39"/>
|
||||||
|
<CursorPos X="10" Y="43"/>
|
||||||
|
<UsageCount Value="24"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="C:\lazarus\lcl\include\control.inc"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="4000"/>
|
||||||
|
<CursorPos Y="4010"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="ThreadUnit"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="11"/>
|
||||||
|
<CursorPos X="40" Y="26"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory HistoryIndex="29">
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="9" Column="41"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="4" Column="11"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="52" Column="84" TopLine="42"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="55" Column="30" TopLine="42"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="51" Column="57" TopLine="36"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="48" TopLine="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="54" TopLine="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="61" Column="37" TopLine="46"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="55" Column="38" TopLine="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="57" Column="38" TopLine="46"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="66" TopLine="57"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="65" TopLine="55"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="60" Column="15"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="57" TopLine="47"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="58" TopLine="48"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="57" TopLine="47"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="58" TopLine="48"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="60" TopLine="50"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="16" Column="16"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="19" Column="5"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="18" Column="26" TopLine="2"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="61" Column="34" TopLine="52"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="43" Column="21" TopLine="33"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="23" Column="3" TopLine="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="46" Column="35" TopLine="60"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="47" Column="29" TopLine="33"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="14" Column="25" TopLine="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="28" TopLine="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="43" Column="10" TopLine="33"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="12" Column="19" TopLine="2"/>
|
||||||
|
</Position>
|
||||||
|
</JumpHistory>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes ActiveMode=""/>
|
||||||
|
</RunParams>
|
||||||
|
</ProjectSession>
|
||||||
|
</CONFIG>
|
||||||
31
backup/threadunit.pas
Normal file
31
backup/threadunit.pas
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
unit ThreadUnit;
|
||||||
|
|
||||||
|
{$mode ObjFPC}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Dialogs;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ThreadClass}
|
||||||
|
|
||||||
|
ThreadClass = class
|
||||||
|
public
|
||||||
|
constructor create();
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
constructor ThreadClass.create();
|
||||||
|
begin
|
||||||
|
ShowMessage("Hello from Another Unit");
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
112
lib/x86_64-win64/main.lfm
Normal file
112
lib/x86_64-win64/main.lfm
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 149
|
||||||
|
Height = 296
|
||||||
|
Top = 250
|
||||||
|
Width = 704
|
||||||
|
Caption = 'Package Zerch'
|
||||||
|
ClientHeight = 296
|
||||||
|
ClientWidth = 704
|
||||||
|
ShowInTaskBar = stAlways
|
||||||
|
SnapOptions.SnapToMonitor = True
|
||||||
|
OnCreate = FormCreate
|
||||||
|
object TabControl1: TTabControl
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 296
|
||||||
|
Top = 0
|
||||||
|
Width = 712
|
||||||
|
OnChange = TabControl1Change
|
||||||
|
TabIndex = 0
|
||||||
|
Tabs.Strings = (
|
||||||
|
'Search'
|
||||||
|
'Metadata'
|
||||||
|
'Versions'
|
||||||
|
)
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 0
|
||||||
|
object lblSearch: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 15
|
||||||
|
Top = 32
|
||||||
|
Width = 79
|
||||||
|
Caption = 'Package Name'
|
||||||
|
end
|
||||||
|
object TxtBoxSearch: TEdit
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 96
|
||||||
|
Height = 23
|
||||||
|
Top = 32
|
||||||
|
Width = 504
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = TxtBoxSearchChange
|
||||||
|
end
|
||||||
|
object BtnSearch: TButton
|
||||||
|
Left = 608
|
||||||
|
Height = 26
|
||||||
|
Top = 29
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Search'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = BtnSearchClick
|
||||||
|
end
|
||||||
|
object memoTest: TMemo
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 8
|
||||||
|
Height = 192
|
||||||
|
Top = 96
|
||||||
|
Width = 688
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
ScrollBars = ssAutoVertical
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 15
|
||||||
|
Top = 77
|
||||||
|
Width = 98
|
||||||
|
Caption = 'Debug[Response]'
|
||||||
|
Color = 8388863
|
||||||
|
Font.CharSet = ANSI_CHARSET
|
||||||
|
Font.Color = clFuchsia
|
||||||
|
Font.Pitch = fpVariable
|
||||||
|
Font.Quality = fqDraft
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ExtendedTabControl1: TExtendedTabControl
|
||||||
|
Left = 360
|
||||||
|
Height = 150
|
||||||
|
Top = 104
|
||||||
|
Width = 200
|
||||||
|
TabIndex = 0
|
||||||
|
Tabs.Strings = (
|
||||||
|
'1'
|
||||||
|
'2'
|
||||||
|
'3'
|
||||||
|
)
|
||||||
|
TabOrder = 4
|
||||||
|
ShowToolBar = tsNone
|
||||||
|
object ExtendedTabToolbar1: TExtendedTabToolbar
|
||||||
|
Left = 0
|
||||||
|
Height = 26
|
||||||
|
Top = 0
|
||||||
|
Width = 150
|
||||||
|
Align = alCustom
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'ExtendedTabToolbar1'
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 102
|
||||||
|
Height = 15
|
||||||
|
Top = 83
|
||||||
|
Width = 34
|
||||||
|
Caption = 'Label2'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
BIN
lib/x86_64-win64/main.ppu
Normal file
BIN
lib/x86_64-win64/main.ppu
Normal file
Binary file not shown.
5
lib/x86_64-win64/package_zerch.compiled
Normal file
5
lib/x86_64-win64/package_zerch.compiled
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<Compiler Value="C:\lazarus\fpc\3.2.2\bin\x86_64-win64\fpc.exe" Date="1520657216"/>
|
||||||
|
<Params Value="-MObjFPC -Scghi -O1 -gw3 -gl -WG -l -vewnhibq -FiC:\Users\indrajith\Documents\projects\package-search\package-zerch\lib\x86_64-win64 -FuC:\Users\indrajith\Documents\projects\package-search\package-zerch\ -FuC:\lazarus\components\lazcontrols\lib\x86_64-win64\win32 -FuC:\lazarus\lcl\units\x86_64-win64\win32 -FuC:\lazarus\lcl\units\x86_64-win64 -FuC:\lazarus\components\freetype\lib\x86_64-win64 -FuC:\lazarus\components\lazutils\lib\x86_64-win64 -FuC:\lazarus\packager\units\x86_64-win64 -FUC:\Users\indrajith\Documents\projects\package-search\package-zerch\lib\x86_64-win64\ -FEC:\Users\indrajith\Documents\projects\package-search\package-zerch\ -oC:\Users\indrajith\Documents\projects\package-search\package-zerch\package_zerch.exe -dLCL -dLCLwin32 package_zerch.lpr"/>
|
||||||
|
</CONFIG>
|
||||||
BIN
lib/x86_64-win64/package_zerch.res
Normal file
BIN
lib/x86_64-win64/package_zerch.res
Normal file
Binary file not shown.
BIN
lib/x86_64-win64/threadunit.ppu
Normal file
BIN
lib/x86_64-win64/threadunit.ppu
Normal file
Binary file not shown.
BIN
libcrypto-3-x64.dll
Normal file
BIN
libcrypto-3-x64.dll
Normal file
Binary file not shown.
BIN
libeay32.dll
Normal file
BIN
libeay32.dll
Normal file
Binary file not shown.
BIN
libssl-3-x64.dll
Normal file
BIN
libssl-3-x64.dll
Normal file
Binary file not shown.
112
main.lfm
Normal file
112
main.lfm
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 149
|
||||||
|
Height = 296
|
||||||
|
Top = 250
|
||||||
|
Width = 704
|
||||||
|
Caption = 'Package Zerch'
|
||||||
|
ClientHeight = 296
|
||||||
|
ClientWidth = 704
|
||||||
|
ShowInTaskBar = stAlways
|
||||||
|
SnapOptions.SnapToMonitor = True
|
||||||
|
OnCreate = FormCreate
|
||||||
|
object TabControl1: TTabControl
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 296
|
||||||
|
Top = 0
|
||||||
|
Width = 712
|
||||||
|
OnChange = TabControl1Change
|
||||||
|
TabIndex = 0
|
||||||
|
Tabs.Strings = (
|
||||||
|
'Search'
|
||||||
|
'Metadata'
|
||||||
|
'Versions'
|
||||||
|
)
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 0
|
||||||
|
object lblSearch: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 15
|
||||||
|
Top = 32
|
||||||
|
Width = 79
|
||||||
|
Caption = 'Package Name'
|
||||||
|
end
|
||||||
|
object TxtBoxSearch: TEdit
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 96
|
||||||
|
Height = 23
|
||||||
|
Top = 32
|
||||||
|
Width = 504
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = TxtBoxSearchChange
|
||||||
|
end
|
||||||
|
object BtnSearch: TButton
|
||||||
|
Left = 608
|
||||||
|
Height = 26
|
||||||
|
Top = 29
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Search'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = BtnSearchClick
|
||||||
|
end
|
||||||
|
object memoTest: TMemo
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 8
|
||||||
|
Height = 192
|
||||||
|
Top = 96
|
||||||
|
Width = 688
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
ScrollBars = ssAutoVertical
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 15
|
||||||
|
Top = 77
|
||||||
|
Width = 98
|
||||||
|
Caption = 'Debug[Response]'
|
||||||
|
Color = 8388863
|
||||||
|
Font.CharSet = ANSI_CHARSET
|
||||||
|
Font.Color = clFuchsia
|
||||||
|
Font.Pitch = fpVariable
|
||||||
|
Font.Quality = fqDraft
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ExtendedTabControl1: TExtendedTabControl
|
||||||
|
Left = 360
|
||||||
|
Height = 150
|
||||||
|
Top = 104
|
||||||
|
Width = 200
|
||||||
|
TabIndex = 0
|
||||||
|
Tabs.Strings = (
|
||||||
|
'1'
|
||||||
|
'2'
|
||||||
|
'3'
|
||||||
|
)
|
||||||
|
TabOrder = 4
|
||||||
|
ShowToolBar = tsNone
|
||||||
|
object ExtendedTabToolbar1: TExtendedTabToolbar
|
||||||
|
Left = 0
|
||||||
|
Height = 26
|
||||||
|
Top = 0
|
||||||
|
Width = 150
|
||||||
|
Align = alCustom
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'ExtendedTabToolbar1'
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 102
|
||||||
|
Height = 15
|
||||||
|
Top = 83
|
||||||
|
Width = 34
|
||||||
|
Caption = 'Label2'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
86
main.pas
Normal file
86
main.pas
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
unit main;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
|
||||||
|
ComCtrls, ExtendedTabControls, fphttpclient, opensslsockets, fpjson,
|
||||||
|
jsonparser, ThreadUnit;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
BtnSearch: TButton;
|
||||||
|
ExtendedTabControl1: TExtendedTabControl;
|
||||||
|
ExtendedTabToolbar1: TExtendedTabToolbar;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
memoTest: TMemo;
|
||||||
|
TxtBoxSearch: TEdit;
|
||||||
|
lblSearch: TLabel;
|
||||||
|
TabControl1: TTabControl;
|
||||||
|
procedure BtnSearchClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TabControl1Change(Sender: TObject);
|
||||||
|
procedure TxtBoxSearchChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
Client: TFPHTTPClient;
|
||||||
|
Response: string;
|
||||||
|
PackageName: string;
|
||||||
|
jData: TJSONData;
|
||||||
|
packageData: TJSONObject;
|
||||||
|
test1: ThreadClass;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BtnSearch.Enabled := False;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.BtnSearchClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PackageName := TxtBoxSearch.Text;
|
||||||
|
Client := TFPHTTPClient.Create(nil);
|
||||||
|
try
|
||||||
|
test1 := ThreadClass.create();
|
||||||
|
Response := Client.Get(Concat('https://registry.npmjs.org/', PackageName));
|
||||||
|
jData := GetJSON(Response);
|
||||||
|
packageData := jData as TJSONObject;
|
||||||
|
|
||||||
|
memoTest.Lines.Text := jData.FormatJSON;
|
||||||
|
finally
|
||||||
|
Client.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.TabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.TxtBoxSearchChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Length(TxtBoxSearch.Text) > 1 then
|
||||||
|
BtnSearch.Enabled := True
|
||||||
|
else
|
||||||
|
BtnSearch.Enabled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
BIN
openssl-1.0.2q-x64_86-win64.zip
Normal file
BIN
openssl-1.0.2q-x64_86-win64.zip
Normal file
Binary file not shown.
BIN
package_zerch.ico
Normal file
BIN
package_zerch.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
91
package_zerch.lpi
Normal file
91
package_zerch.lpi
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="12"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<General>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
<Title Value="package_zerch"/>
|
||||||
|
<Scaled Value="True"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<XPManifest>
|
||||||
|
<DpiAware Value="True"/>
|
||||||
|
</XPManifest>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
</General>
|
||||||
|
<BuildModes>
|
||||||
|
<Item Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
<UseFileFilters Value="True"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LazControls"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LazControlDsgn"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="package_zerch.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="ThreadUnit"/>
|
||||||
|
</Unit>
|
||||||
|
</Units>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="package_zerch"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<DebugInfoType Value="dsDwarf3"/>
|
||||||
|
</Debugging>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions>
|
||||||
|
<Item>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
||||||
28
package_zerch.lpr
Normal file
28
package_zerch.lpr
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
program package_zerch;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF HASAMIGA}
|
||||||
|
athreads,
|
||||||
|
{$ENDIF}
|
||||||
|
Interfaces, // this includes the LCL widgetset
|
||||||
|
Forms, lazcontrols, main, ThreadUnit
|
||||||
|
{ you can add units after this };
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
RequireDerivedFormResource:=True;
|
||||||
|
Application.Scaled:=True;
|
||||||
|
{$PUSH}{$WARN 5044 OFF}
|
||||||
|
Application.MainFormOnTaskbar:=True;
|
||||||
|
{$POP}
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
||||||
176
package_zerch.lps
Normal file
176
package_zerch.lps
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectSession>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Version Value="12"/>
|
||||||
|
<BuildModes Active="Default"/>
|
||||||
|
<Units>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="package_zerch.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="-1"/>
|
||||||
|
<TopLine Value="-1"/>
|
||||||
|
<CursorPos X="-1" Y="-1"/>
|
||||||
|
<UsageCount Value="24"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<TopLine Value="57"/>
|
||||||
|
<CursorPos X="5" Y="66"/>
|
||||||
|
<UsageCount Value="24"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="C:\lazarus\lcl\include\control.inc"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="4000"/>
|
||||||
|
<CursorPos Y="4010"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="ThreadUnit"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="11"/>
|
||||||
|
<CursorPos X="40" Y="26"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory HistoryIndex="29">
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="9" Column="41"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="4" Column="11"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="52" Column="84" TopLine="42"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="55" Column="30" TopLine="42"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="51" Column="57" TopLine="36"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="48" TopLine="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="54" TopLine="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="61" Column="37" TopLine="46"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="55" Column="38" TopLine="44"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="57" Column="38" TopLine="46"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="66" TopLine="57"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="65" TopLine="55"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="60" Column="15"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="57" TopLine="47"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="58" TopLine="48"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="57" TopLine="47"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="58" TopLine="48"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="60" TopLine="50"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="16" Column="16"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="19" Column="5"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="18" Column="26" TopLine="2"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="61" Column="34" TopLine="52"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="43" Column="21" TopLine="33"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="23" Column="3" TopLine="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="46" Column="35" TopLine="60"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="47" Column="29" TopLine="33"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="14" Column="25" TopLine="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="28" TopLine="8"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="main.pas"/>
|
||||||
|
<Caret Line="43" Column="10" TopLine="33"/>
|
||||||
|
</Position>
|
||||||
|
<Position>
|
||||||
|
<Filename Value="threadunit.pas"/>
|
||||||
|
<Caret Line="12" Column="19" TopLine="2"/>
|
||||||
|
</Position>
|
||||||
|
</JumpHistory>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes ActiveMode=""/>
|
||||||
|
</RunParams>
|
||||||
|
</ProjectSession>
|
||||||
|
</CONFIG>
|
||||||
BIN
package_zerch.res
Normal file
BIN
package_zerch.res
Normal file
Binary file not shown.
BIN
ssleay32.dll
Normal file
BIN
ssleay32.dll
Normal file
Binary file not shown.
31
threadunit.pas
Normal file
31
threadunit.pas
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
unit ThreadUnit;
|
||||||
|
|
||||||
|
{$mode ObjFPC}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Dialogs;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ThreadClass}
|
||||||
|
|
||||||
|
ThreadClass = class
|
||||||
|
public
|
||||||
|
constructor create();
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
constructor ThreadClass.create();
|
||||||
|
begin
|
||||||
|
ShowMessage('Hello from Another Unit');
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
Reference in New Issue
Block a user