Click or drag to resize
TapiAppLineRemoved Event
Occurs when existing line device is removed.

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

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a telephony line device is removed while the application is running, for example, when a USB modem is disconnected. TapiLine object representing the removed device is removed from 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 LineRemoved event.
TapiApp.Initialize("MyApp");
TapiApp.LineRemoved += OnLineRemoved;
...

void OnLineRemoved(object sender, TapiEventArgs args)
{
    // Display the name of the removed line
    Console.WriteLine("{0} has been removed", args.Line.Name);
}
See Also