Exemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// </summary>
        //////////////////////////////////////////////////////////////////////////

        public void Start()
        {
            // Initialize backround worker
            m_BackgroundWorker = new BackgroundWorker();
            m_BackgroundWorker.WorkerReportsProgress      = true;
            m_BackgroundWorker.WorkerSupportsCancellation = true;
            m_BackgroundWorker.DoWork             += new DoWorkEventHandler(OnStart);
            m_BackgroundWorker.ProgressChanged    += new ProgressChangedEventHandler(OnProgress);
            m_BackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(OnComplete);

            // Run task
            m_BackgroundWorker.RunWorkerAsync();

            // Autoclear console, if required
            if (Properties.Settings.Default.NANT_CLEAR_OUTPUT)
            {
                VisualStudioUtils.GetConsole(m_ApplicationObject, "NAntAddin").Clear();
            }

            // Trace start build
            WriteConsole(Environment.NewLine + "[NAntAddin]: Target '" + m_TargetNode["name"] + "' started..." + Environment.NewLine + Environment.NewLine);
        }
Exemplo n.º 2
0
        //////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// </summary>
        //////////////////////////////////////////////////////////////////////////

        public void WriteConsole(string message)
        {
            VisualStudioUtils.GetConsole(m_ApplicationObject, "NAntAddin").OutputString(message);
        }