Dart.Ftp Namespace > TcpBase Class : Log Event |
Public Event Log As EventHandler(Of DataEventArgs)
Dim instance As TcpBase Dim handler As EventHandler(Of DataEventArgs) AddHandler instance.Log, handler
public event EventHandler<DataEventArgs> Log
public: event EventHandler<DataEventArgs^>^ Log
The event handler receives an argument of type DataEventArgs containing data related to this event. The following DataEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Data | Gets data provided by Data and Log events. |
Message | Returns the message argument provided by the Marshal method. (Inherited from Dart.Ftp.UserStateEventArgs) |
UserState | Returns the user state argument provided by the Marshal method. (Inherited from Dart.Ftp.UserStateEventArgs) |
private void myComponent_Log(object sender, DataEventArgs e) { string prompt = (e.Data.Direction == DataDirection.In) ? "Recv: " : "Sent: "; textBox1.AppendText(prompt + e.Data.ToString() + Environment.NewLine); }
Private Sub myComponent_Log(ByVal sender As Object, ByVal e As DataEventArgs) Dim prompt As String = If(e.Data.Direction = DataDirection.In, "Recv: ", "Sent: ") textBox1.AppendText(prompt & e.Data.ToString() & Environment.NewLine) End Sub