📄 nmfngr.pas
字号:
unit NMFngr;
{$X+}
{$R-}
{$IFDEF VER100}
{$DEFINE NMF3}
{$ENDIF}
{$IFDEF VER110}
{$DEFINE NMF3}
{$ENDIF}
{$IFDEF VER120}
{$DEFINE NMF3}
{$ENDIF}
{$IFDEF VER125}
{$DEFINE NMF3}
{$ENDIF}
interface
uses
Classes, Forms, Psock ,NMConst;
{$IFDEF VER110}
{$ObjExportAll On}
{$ENDIF}
{$IFDEF VER120}
{$ObjExportAll On}
{$ENDIF}
{$IFDEF VER125}
{$ObjExportAll On}
{$ENDIF}
// CompName='TNMFinger';
// Major_Version='4';
// Minor_Version='02';
// Date_Version='012798';
type
TNMFinger = class(TPowerSock)
private
FUser: string;
function GetFingerString: string;
protected
{ Protected declarations }
public
constructor Create(AOwner: TComponent); override;
published
property FingerStr: string read GetFingerString;
property User: string read Fuser write Fuser;
end; {_ TNMFinger = class(TPowerSock) _}
implementation
constructor TNMFinger.Create(AOwner: TComponent);
begin
inherited create(AOwner);
Port := 79;
end; {_ constructor TNMFinger.Create(AOwner: TComponent); _}
function TNMFinger.GetFingerString: string;
begin
Result := '';
if (not (csDesigning in ComponentState)) and (not (CSLoading in ComponentState)) then
begin
Connect;
try
writeln(FUser);
while Connected or (DataAvailable) do
if DataAvailable then Result := Result + ReadLn
else {_ NOT if DataAvailable then Result := Result + ReadLn _}
Application.ProcessMessages;
finally
Disconnect;
end; {_ try _}
end {_ if (not (csDesigning in ComponentState)) and (not (CSLoading in ComponentState)) then _}
end; {_ function TNMFinger.GetFingerString: string; _}
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -