public DiagnosticMonitorThread(DiagnosticWebService.DiagnosticWebService service, DiagnosticMonitor monitor) { m_Service = service; m_Monitor = monitor; m_Matrix = null; m_Thread = new Thread(new ThreadStart(ThreadMethod)); m_Thread.Name = "Diagnostic Monitor Thread"; m_StopThread = false; m_Thread.Start(); }
void OnDiagnosticUpdate(DiagnosticMonitor.DiagnosticUpdateEventArgs args) { Console.WriteLine("**OnDiagnosticUpdate:" + args.ToString()); //Update participant icons and tooltips switch (args.EventType) { case DiagnosticMonitor.DiagnosticEventType.MissingParticipantAdded: AddMissingParticipant(args.Sender); break; case DiagnosticMonitor.DiagnosticEventType.MissingParticipantRemoved: RemoveMissingParticipant(args.Sender); break; case DiagnosticMonitor.DiagnosticEventType.ThroughputWarningAdded: AddThroughputWarning(args.Sender, args.Receiver); break; case DiagnosticMonitor.DiagnosticEventType.ThroughputWarningRemoved: RemoveThroughputWarning(args.Sender, args.Receiver); break; } }
private static void _DiagnosticUpdateHandler(DiagnosticMonitor.DiagnosticUpdateEventArgs args) { if (DiagnosticUpdate != null) { DiagnosticUpdate(args); } }
private static void DiagnosticUpdateHandler(DiagnosticMonitor.DiagnosticUpdateEventArgs args) { Conference.FormInvoke(new DiagnosticUpdateEventHandler(_DiagnosticUpdateHandler), new object[] { args }); }
private static void StopDiagnosticMonitor() { if (diagnosticMonitor != null) { diagnosticMonitor.DiagnosticUpdate -= new DiagnosticMonitor.DiagnosticUpdateEventHandler(DiagnosticUpdateHandler); diagnosticMonitor.Stop(); diagnosticMonitor = null; } }
/// <summary> /// Stop any current instance of DiagnosticMonitor. If Diagnostics are enabled, start a new instance. /// </summary> /// <param name="venue"></param> private static void StartDiagnosticMonitor(string venue, IPEndPoint endpoint) { StopDiagnosticMonitor(); if (Conference.DiagnosticsEnabled) { string localCname = null; if (localParticipant != null) { localCname = localParticipant.Identifier; } diagnosticMonitor = new DiagnosticMonitor(venue, endpoint, localCname); diagnosticMonitor.DiagnosticUpdate += new DiagnosticMonitor.DiagnosticUpdateEventHandler(DiagnosticUpdateHandler); diagnosticMonitor.Start(); } }