private void DeviceConnectionNotify(object sender, EventArgs e)
{
if (InvokeRequired)
{
try
{
Invoke((Delegate)new DeviceConnectionNotifyDelegate(DeviceConnectionNotify), sender, e);
}
catch { }
}
else
{
m_mutex.WaitOne();
DeviceForm devForm = sender as DeviceForm;
if (devForm != null)
comPortTreeForm.AddConnectionInfo(devForm);
m_mutex.ReleaseMutex();
}
}