// raise the SimConnecting event and allow any event
// subscribers to cancel the connection
if (OnSimConnecting != null)
{
SimConnectingEventArgs args = new SimConnectingEventArgs(simulator);
OnSimConnecting.raiseEvent(args);
if (args.getCancel())
{
// Callback is requesting that we abort this connection
synchronized (Simulators)
{
Simulators.remove(simulator);