Extensions for session control

With the iNow UI Designer you can create an extension script that affects a 5250 session or responds to events in it.

Assigning the Device Name via Script

/// <summary>
/// check for allowance and devicename for a new session
/// </summary>
/// <param name="deviceName">device name, leave empty to use default mechanism</param>
/// <param name="cancel">set to true to cancel connection</param>
public override void CheckDevice(out string deviceName, out bool cancel)
{
    // deviceName = null;  // continue with default behaviour, in this case the other routines will NOT be called !!
    deviceName = "TEST";   // set device name 
    cancel = false;        // do NOT cancel
}

Action when a connection fails

/// <summary>
/// called when connection failed
/// </summary>
/// <param name="deviceName">device name</param>
public override void ConnectionFailed(string deviceName)
{
    MessageBox.Show("Connection failed: " + deviceName);
}

Action when a session has been successfully started

/// <summary>
/// called when connection is established
/// </summary>
/// <param name="deviceName">device name</param>
public override void Connected(string deviceName)
{
    MessageBox.Show("Connection established: " + deviceName);
}

Action when a session has ended

/// <summary>
/// called when connection is closed
/// </summary>
/// <param name="deviceName">device name</param>
public override void Disconnected(string deviceName)
{
    MessageBox.Show("Connection closed: " + deviceName);
}