Exemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        private void LaunchWindowClosed(object sender, EventArgs e)
        {
            m_textBuffer.Clear();

            lock (m_debuggerConnectionWindowLock)
            {
                m_debuggerConnectionWindow = null;
            }
        }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        private void LaunchWindowClosed(object sender, EventArgs e)
        {
            try
            {
                m_textBuffer.Clear();

                lock (m_debuggerConnectionWindow)
                {
                    m_debuggerConnectionWindow = null;
                }
            }
            catch (Exception ex)
            {
                LoggingUtils.HandleException(ex);
            }
        }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    private void LaunchWindowClosed (object sender, EventArgs e)
    {
      try
      {
        m_textBuffer.Clear ();

        lock (m_debuggerConnectionWindow)
        {
          m_debuggerConnectionWindow = null;
        }
      }
      catch (Exception ex)
      {
        LoggingUtils.HandleException (ex);
      }
    }
Exemplo n.º 4
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        #region IDebuggerConnectionService Members

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public int LaunchDialogShow()
        {
            LoggingUtils.PrintFunction();

            try
            {
                if (m_debuggerConnectionWindow == null)
                {
                    m_debuggerConnectionWindow = new DebuggerConnectionWindow();

                    m_debuggerConnectionWindow.Closed += LaunchWindowClosed;
                }

                if (m_debuggerConnectionWindow == null)
                {
                    throw new InvalidOperationException("Failed to create connection window");
                }

                lock (m_debuggerConnectionWindow)
                {
                    m_debuggerConnectionWindow.Dispatcher.Invoke((Action)(() =>
                    {
                        m_debuggerConnectionWindow.textBox1.BeginChange();

                        m_debuggerConnectionWindow.textBox1.Text = m_textBuffer.ToString();

                        m_debuggerConnectionWindow.textBox1.EndChange();

                        m_debuggerConnectionWindow.textBox1.ScrollToEnd();

                        m_debuggerConnectionWindow.progressBar1.IsIndeterminate = true;

                        m_debuggerConnectionWindow.Show();

                        m_debuggerConnectionWindow.Activate();
                    }));
                }

                return(VSConstants.S_OK);
            }
            catch (Exception e)
            {
                LoggingUtils.HandleException(e);

                return(VSConstants.E_FAIL);
            }
        }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    #region IDebuggerConnectionService Members

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public int LaunchDialogShow ()
    {
      LoggingUtils.PrintFunction ();

      try
      {
        if (m_debuggerConnectionWindow == null)
        {
          m_debuggerConnectionWindow = new DebuggerConnectionWindow ();

          m_debuggerConnectionWindow.Closed += LaunchWindowClosed;
        }

        if (m_debuggerConnectionWindow == null)
        {
          throw new InvalidOperationException ("Failed to create connection window");
        }

        lock (m_debuggerConnectionWindow)
        {
          m_debuggerConnectionWindow.Dispatcher.Invoke ((Action) (() =>
          {
            m_debuggerConnectionWindow.textBox1.BeginChange ();

            m_debuggerConnectionWindow.textBox1.Text = m_textBuffer.ToString ();

            m_debuggerConnectionWindow.textBox1.EndChange ();

            m_debuggerConnectionWindow.textBox1.ScrollToEnd ();

            m_debuggerConnectionWindow.progressBar1.IsIndeterminate = true;

            m_debuggerConnectionWindow.Show ();

            m_debuggerConnectionWindow.Activate ();
          }));
        }

        return VSConstants.S_OK;
      }
      catch (Exception e)
      {
        LoggingUtils.HandleException (e);

        return VSConstants.E_FAIL;
      }
    }