PowerTCP Emulation for .NET CF
OnStateChanged Method
See Also  Send comments on this topic.
Dart.Common Namespace > PtyBase Class : OnStateChanged Method




e
An EventArgs.
Raises the StateChanged event.

Syntax

Visual Basic (Declaration) 
Protected Overrides Sub OnStateChanged( _
   ByVal e As EventArgs _
) 
Visual Basic (Usage)Copy Code
Dim instance As PtyBase
Dim e As EventArgs
 
instance.OnStateChanged(e)
C# 
protected override void OnStateChanged( 
   EventArgs e
)
Managed Extensions for C++ 
protected: void OnStateChanged( 
   EventArgs* e
) override 
C++/CLI 
protected:
void OnStateChanged( 
   EventArgs^ e
) override 

Parameters

e
An EventArgs.

Remarks

When the State changes to ConnectionState.Connected, this class captures keyboard input and sends it over the connection, and reads input on a worker thread. That data is marshaled to the OnData method, where it is displayed in the textbox.

Raising an event invokes the event handler through a delegate. The Synchronizing property must be set.

The OnStateChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Note to Inheritors: When overriding OnStateChanged in a derived class, be sure to call the base class OnStateChanged method, so that registered delegates receive the event.

See the SynchronizingObject property for important information on updating UI controls from within derived classes and events.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.