Beispiel #1
0
        private void DiagnosticHelp(object obj, ServiceDiagnostics.AsyncActionDiagnostic.EventArgsResponse e)
        {
            iActionDiagnostic.EventResponse -= DiagnosticHelp;

            Lock();
            string[] lines = e.aDiagnosticInfo.Split(new char[] { '\n' });
            Unlock();

            this.BeginInvoke(
                (MethodInvoker) delegate() {
                diagnosticComboBox.Items.Clear();

                foreach (string line in lines)
                {
                    if (line != "")
                    {
                        diagnosticComboBox.Items.Add(line);
                    }
                }

                iActionDiagnosticTest = iServiceDiagnostics.CreateAsyncActionDiagnosticTest();
                iActionDiagnosticTest.EventResponse += DiagnosticTestHelp;
                iActionDiagnosticTest.DiagnosticTestBegin(kHelpCommand, "");
            }
                );
        }
Beispiel #2
0
        private void DiagnosticResponse(object obj, ServiceDiagnostics.AsyncActionDiagnostic.EventArgsResponse e)
        {
            iActionDiagnostic.EventResponse -= DiagnosticResponse;

            Lock();
            string[] lines   = e.aDiagnosticInfo.Split(new char[] { '\n' });
            string   iResult = String.Join(Environment.NewLine, lines);

            Unlock();

            this.BeginInvoke(
                (MethodInvoker) delegate() {
                textBoxDiagnosticResult.Text = iResult;
            });
        }
Beispiel #3
0
        private void DiagnosticResponse(object obj, ServiceDiagnostics.AsyncActionDiagnostic.EventArgsResponse e)
        {
            string[] lines = e.aDiagnosticInfo.Split(new char[] { '\n' });
            iResultMutex.WaitOne();
            iResult = String.Join(Environment.NewLine, lines);
            iResultMutex.ReleaseMutex();

            if (iResult.Length != 0)
            {
                iRefreshMutex.WaitOne();

                uint refresh = iRefresh;

                iRefreshMutex.ReleaseMutex();

                if (refresh != 0)
                {
                    iTimerRefresh.Change(refresh * 1000, Timeout.Infinite);
                }
            }

            UpdateTextBoxResult();
        }