/// <summary>
        /// Starts the relay engine.
        /// </summary>
        private void StartRelayEngine()
        {
            Thread backGroundThread = new Thread(new ThreadStart(() =>
            {
                try
                {
                    TunnelRelayEngine.StartTunnelRelayEngine();

                    this.Dispatcher.Invoke(new Action(() =>
                    {
                        this.txtProxyDetails.Text        = ApplicationData.Instance.ProxyBaseUrl;
                        this.btnExportSettings.IsEnabled = true;
                    }));
                }
                catch (Exception)
                {
                    this.Dispatcher.Invoke(new Action(() =>
                    {
                        this.txtProxyDetails.Text        = "FAILED TO START AZURE PROXY!!!!";
                        this.btnExportSettings.IsEnabled = false;
                    }));
                }
            }));

            backGroundThread.Start();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Raises the <see cref="Application.Exit" /> event.
 /// </summary>
 /// <param name="e">An <see cref="ExitEventArgs" /> that contains the event data.</param>
 protected override void OnExit(ExitEventArgs e)
 {
     Logger.LogInfo(CallInfo.Site(), "Exiting the application with exit code '{0}'", e.ApplicationExitCode);
     TunnelRelayEngine.StopTunnelRelayEngine();
     Logger.Close();
 }