Contains arguments for a ConnectEndpoint event.
상속: System.EventArgs
        private async void ConnectButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // get selected endpoint.
                ConfiguredEndpoint endpoint = SelectedEndpoint;

                if (endpoint == null)
                {
                    return;
                }

                // raise event.
                if (m_ConnectEndpoint != null)
                {
                    ConnectEndpointEventArgs args = new ConnectEndpointEventArgs(endpoint, true);

                    await m_ConnectEndpoint(this, args);

                    // save endpoint in drop down.
                    if (args.UpdateControl)
                    {
                        // must update the control because the display text may have changed.
                        Initialize(m_endpoints, m_configuration);
                        SelectedEndpoint = endpoint;
                    }
                }
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(String.Empty, GuiUtils.CallerName(), exception);
            }
        }
예제 #2
0
        private void ConnectButton_Click(object sender, EventArgs e)
        {
            try
            {
                // get selected endpoint.
                ConfiguredEndpoint endpoint = SelectedEndpoint;

                if (endpoint == null)
                {
                    return;
                }

                // raise event.
                if (m_ConnectEndpoint != null)
                {
                    ConnectEndpointEventArgs args = new ConnectEndpointEventArgs(endpoint, true);

                    m_ConnectEndpoint(this, args);

                    // save endpoint in drop down.
                    if (args.UpdateControl)
                    {
                        // must update the control because the display text may have changed.
                        Initialize(m_endpoints, m_configuration);
                        SelectedEndpoint = endpoint;
                    }
                }
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
예제 #3
0
        void EndpointsCTRL_ConnectEndpoint(object sender, ConnectEndpointEventArgs e)
        {
            try
            {
                if (m_running)
                {
                    throw new InvalidOperationException("Test is already running.");
                }

                if (m_testConfiguration.Coverage == 0)
                {
                    m_testConfiguration.Coverage = 100;
                }

                SetRunning(true);
                                
                EndpointTB.Text = e.Endpoint.EndpointUrl.ToString();
                TestsCompletedTB.Text = "---";
                IterationTB.Text = "---";
                TestCaseTB.Text = "---";
                TestCaseProgressCTRL.Value = 0;
                ResultsTB.Clear();

                ThreadPool.QueueUserWorkItem(Run, e.Endpoint);
            }
            catch (Exception exception)
            {
				GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
                e.UpdateControl = false;
            }
        }
예제 #4
0
        private void ConnectButton_Click(object sender, EventArgs e)
        {
            try
            {
                // get selected endpoint.
                ConfiguredEndpoint endpoint = SelectedEndpoint;

                if (endpoint == null)
                {
                    return;
                }

                // raise event.
                if (m_ConnectEndpoint != null)
                {
                    ConnectEndpointEventArgs args = new ConnectEndpointEventArgs(endpoint, true);

                    m_ConnectEndpoint(this, args);

                    // save endpoint in drop down.
                    if (args.UpdateControl)
                    {
                        // must update the control because the display text may have changed.
                        Initialize(m_endpoints, m_configuration);
                        SelectedEndpoint = endpoint;
                    }
                }              
            }
            catch (Exception exception)
            {
				GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
 async Task EndpointSelectorCTRL_ConnectEndpoint(object sender, ConnectEndpointEventArgs e)
 {
     try
     {
         // disable Connect while connecting button
         EndpointSelectorCTRL.IsEnabled = false;
         // Connect
         e.UpdateControl = await Connect(e.Endpoint);
     }
     catch (Exception exception)
     {
         GuiUtils.HandleException(String.Empty, GuiUtils.CallerName(), exception);
         e.UpdateControl = false;
     }
     finally
     {
         // enable Connect button
         EndpointSelectorCTRL.IsEnabled = true;
     }
 }
예제 #6
0
 void EndpointSelectorCTRL_ConnectEndpoint(object sender, ConnectEndpointEventArgs e)
 {
     try
     {
         Connect(e.Endpoint);
     }
     catch (Exception exception)
     {
         GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
         e.UpdateControl = false;
     }
 }
        private async void ConnectButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // get selected endpoint.
                ConfiguredEndpoint endpoint = SelectedEndpoint;

                if (endpoint == null)
                {
                    return;
                }

                // raise event.
                if (m_ConnectEndpoint != null)
                {
                    ConnectEndpointEventArgs args = new ConnectEndpointEventArgs(endpoint, true);

                    await m_ConnectEndpoint(this, args);

                    // save endpoint in drop down.
                    if (args.UpdateControl)
                    {
                        // must update the control because the display text may have changed.
                        Initialize(m_endpoints, m_configuration);
                        SelectedEndpoint = endpoint;
                    }
                }
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(String.Empty, GuiUtils.CallerName(), exception);
            }
        }
        private void EndpointSelectorCTRL_ConnectEndpoint(object sender, ConnectEndpointEventArgs e)
        {
            try
            {
                // check if a test is already running.
                lock (m_lock)
                {
                    if (m_running)
                    {
                        throw new InvalidOperationException("A test is already running.");
                    }
                }

                ConfiguredEndpoint endpoint = e.Endpoint;

                // start processing.
                OkBTN.Enabled = m_running = true;
                ThreadPool.QueueUserWorkItem(new WaitCallback(DoTest), endpoint);
            }
            catch (Exception exception)
            {
				GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
                e.UpdateControl = false;
            }
        }
예제 #9
0
        void EndpointSelectorCTRL_ConnectEndpoint(object sender, ConnectEndpointEventArgs e)
        {
            try
            {
                TestEventsCTRL.Clear();
                Connect(e.Endpoint, Test_UseNativeStackMI.Checked, 1024);
            }
            catch (Exception exception)
            {
				GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
                e.UpdateControl = false;
            }
        }