public void AddJSonDebugData(int iDirection, string sPacketType, string sDebugData) { lock (this) { foreach (RSMPGS_Debug DebugForm in RSMPGS.DebugForms) { try { DebugForm.AddJSonDebugDataMethod(DateTime.Now, iDirection, sPacketType, sDebugData); //DebugForm.BeginInvoke(DebugForm.DelegateAddJSonDebugData, new Object[] { DateTime.Now, iDirection, sPacketType, sDebugData }); } catch { } } } }