idserverinterceptlogevent.pas

来自「网络控件适用于Delphi6」· PAS 代码 · 共 53 行

PAS
53
字号
{ $HDR$}
{**********************************************************************}
{ Unit archived using Team Coherence                                   }
{ Team Coherence is Copyright 2002 by Quality Software Components      }
{                                                                      }
{ For further information / comments, visit our WEB site at            }
{ http://www.TeamCoherence.com                                         }
{**********************************************************************}
{}
{ $Log:  17444: IdServerInterceptLogEvent.pas }
{
{   Rev 1.1    10/17/2003 6:24:58 PM  BGooijen
{ Removed const 
}
{
    Rev 1.0    3/22/2003 11:06:06 PM  BGooijen
  Initial check in.
  ServerIntercept to log data/status to an event.
}
unit IdServerInterceptLogEvent;

interface

uses
  IdServerInterceptLogBase;

type
  TIdServerInterceptLogEvent=class;
  
  TIdOnLogString=procedure (ASender: TIdServerInterceptLogEvent; AText: string) of object;

  TIdServerInterceptLogEvent = class(TIdServerInterceptLogBase)
  protected
    FOnLogString:TIdOnLogString;
  public
    procedure DoLogWriteString(AText: string);override;
  published
    property OnLogString:TIdOnLogString read FOnLogString write FOnLogString;
  end;

implementation

{ TIdServerInterceptLogEvent }

procedure TIdServerInterceptLogEvent.DoLogWriteString(AText: string);
begin
  if Assigned(FOnLogString) then begin
    FOnLogString(self,AText);
  end;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?