Click or drag to resize
TapiAppLineAdded Event
Occurs when a new line device is added to the system.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public static event TapiEventHandler LineAdded

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a new telephony line device is detected while the application is running, for example, when a USB modem is connected to the system. New TapiLine object is added to the Lines collection before this event is fired.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle LineAdded event.
TapiApp.Initialize("MyApp");
TapiApp.LineAdded += OnLineAdded;
...

void OnLineAdded(object sender, TapiEventArgs args)
{
    // Display the name of newly added line
    Console.WriteLine("{0} added", args.Line.Name);
}
See Also