private void ics_ViewUserResponseReceived(object sender, System.String userName, System.Int32 port,
System.Int32 videoWidth, System.Int32 videoHeight,
System.String videoCodec)
{
Invoke(new MethodInvoker(delegate
{
//check to see if we are already viewing that user
//if so bring form in front
for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
{
if (Application.OpenForms[i].Tag != null)
{
if (Application.OpenForms[i].Tag.ToString() == userName)
{
Application.OpenForms[i].BringToFront();
return;
}
}
}
ClientForm client = null;
client = new ClientForm();
client.Tag = userName;
client.Text = "Viewing > " + userName;
client.Show();
client.icc.Call(txtCentralIp.Text, port, videoWidth, videoHeight, "n/a", "n/a", "n/a", 0, 0, 0, videoCodec);
}
));
}