• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OutputWindowPane类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OutputWindowPane的典型用法代码示例。如果您正苦于以下问题:C# OutputWindowPane类的具体用法?C# OutputWindowPane怎么用?C# OutputWindowPane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OutputWindowPane类属于命名空间,在下文中一共展示了OutputWindowPane类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OpenLog

 public void OpenLog()
 {
     mOutputWin = mApplication.ToolWindows.OutputWindow;
     try
     {
         mPane = mOutputWin.OutputWindowPanes.Item("C++ Helper Output");
     }
     catch (Exception)
     {
         mPane = mOutputWin.OutputWindowPanes.Add("C++ Helper Output");
     }
 }
开发者ID:kreuzerkrieg,项目名称:DotNetJunk,代码行数:12,代码来源:OutputWindowLogger.cs


示例2: Build

        public static bool Build(Project pProj, OutputWindowPane pPane, string pTarget, NameValueCollection pParams)
        {
            Microsoft.Build.BuildEngine.Engine buildEngine = new Microsoft.Build.BuildEngine.Engine();
              BuildExecutor executor = new BuildExecutor(pPane);

              RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework", false);
              if (key == null) {
            throw new Exception("Failed to determine .NET Framework install root - no .NETFramework key");
              }
              string installRoot = key.GetValue("InstallRoot") as string;
              if (installRoot == null) {
            throw new Exception("Failed to determine .NET Framework install root - no InstallRoot value");
              }
              key.Close();

              buildEngine.BinPath = Path.Combine(installRoot, string.Format("v{0}.{1}.{2}", Environment.Version.Major, Environment.Version.Minor, Environment.Version.Build));
              buildEngine.RegisterLogger(executor);

              executor.Verbosity = LoggerVerbosity.Normal;

              BuildPropertyGroup properties = new BuildPropertyGroup();
              foreach (string propKey in pParams.Keys) {
            string val = pParams[propKey];

            properties.SetProperty(propKey, val, true);
              }

              return buildEngine.BuildProjectFile(pProj.FileName, new string[]{pTarget}, properties);
        }
开发者ID:paulj,项目名称:webgac,代码行数:29,代码来源:BuildExecutor.cs


示例3: CompilerStatus

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dte">Instance of DTE to get the Output Window and Status Bar from</param>
 /// 
 public CompilerStatus(EventBus eventBus)
 {
     _EventBus = eventBus;
     _DTE = _EventBus.DTE;
     _OutputWindow = _DTE.ToolWindows.OutputWindow.OutputWindowPanes.Item("Build");
     _StatusBar = _DTE.StatusBar;
 }
开发者ID:MiguelCastillo,项目名称:jsCompiler,代码行数:12,代码来源:CompilerStatus.cs


示例4: DriverUI

        public DriverUI(DTE dte, Window outputWindow, OutputWindowPane pane)
        {
            _dte = dte;
            _outputWindow = outputWindow;
            _pane = pane;
            _buttonTag = Guid.NewGuid().ToString();

            // http://stackoverflow.com/questions/12049362/programmatically-add-add-in-button-to-the-standard-toolbar
            // add a toolbar button to the standard toolbar
            var bar = ((CommandBars)_dte.CommandBars)["Standard"];
            if (bar != null)
            {
                var control = (CommandBarButton)bar.Controls.Add(MsoControlType.msoControlButton, Type.Missing, Type.Missing, Type.Missing, true);
                control.Style = MsoButtonStyle.msoButtonIcon;
                control.TooltipText = BarButtonControlCaption;
                control.Caption = BarButtonControlCaption;
                control.Tag = _buttonTag;
                control.BeginGroup = true;
                control.Click += (CommandBarButton ctrl, ref bool d) =>
                {
                    _outputWindow.Visible = true;
                    pane.Activate();
                };
            }
            else
            {
                Log.W("failed to add command button, no Standard command bar");
            }

            updateUI();
        }
开发者ID:pragmatrix,项目名称:BuildOnSave,代码行数:31,代码来源:DriverUI.cs


示例5: Schedule

        public static bool Schedule(OutputWindowPane output, string executable, string commandline, string workingdir, OnDone callback, object callbackArg, int timeout)
		{
			CommandThread cmd = new CommandThread();
			cmd.output = output;
			cmd.executable = executable;
			cmd.commandline = commandline;
			cmd.workingdir = workingdir;
            cmd.callback = callback;
            cmd.callbackArg = callbackArg;
            cmd.timeout = timeout;

			try
			{
				m_queueLock.WaitOne();
				m_commandQueue.Enqueue(cmd);
			}
			finally
			{
				m_queueLock.ReleaseMutex();
			}

			m_startEvent.Release();
			Log.Debug("Scheduled {0} {1}\n", cmd.executable, cmd.commandline);
			return true;
		}
开发者ID:transformersprimeabcxyz,项目名称:_To-Do-unreal-3D-niftyplugins-ben-marsh,代码行数:25,代码来源:AsyncProcess.cs


示例6: BackgroundBuild2

		public BackgroundBuild2(DTE dte, OutputWindowPane pane)
		{
			_dte = dte;
			_pane = pane;
			_mainThread = SynchronizationContext.Current;
			BuildManager = new BuildManager();
		}
开发者ID:pragmatrix,项目名称:BuildOnSave,代码行数:7,代码来源:BackgroundBuild2.cs


示例7: OnCommand

        public override void OnCommand(DTE2 application, OutputWindowPane pane)
        {
            if (application.SelectedItems.Count == 0)
                {
                    OnExecute(null, null, pane);
                }

                foreach (SelectedItem sel in application.SelectedItems)
                {
                    if (m_executeForFileItems && sel.ProjectItem != null && m_fileItemGUID == sel.ProjectItem.Kind)
                    {
                        //The try catch block belowe fixed issue 57:
                        //http://github.com/spdr870/gitextensions/issues/#issue/57
                        try
                        {
                            OnExecute(sel, sel.ProjectItem.get_FileNames(0), pane);
                        }
                        catch (ArgumentException)
                        {
                            if (sel.ProjectItem.FileCount > 0)
                            {
                                OnExecute(sel, sel.ProjectItem.get_FileNames(1), pane);
                            }
                            else
                            {
                                throw;
                            }
                        }
                    }
                    else if (m_executeForProjectItems && sel.Project != null)
                        OnExecute(sel, sel.Project.FullName, pane);

                }
        }
开发者ID:jystic,项目名称:gitextensions,代码行数:34,代码来源:ItemCommandBase.cs


示例8: Initialize

        protected override void Initialize()
        {
            Debug.WriteLine ("Entering Initialize() of: {0}", this);
            base.Initialize();

            _dte = (DTE)GetService(typeof(DTE));
            _events = _dte.Events;
            _documentEvents = _events.DocumentEvents;
            _documentEvents.DocumentSaved += DocumentEvents_DocumentSaved;

            var window = _dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);

            var outputWindow = (OutputWindow)window.Object;

            _outputPane = outputWindow.OutputWindowPanes
                                      .Cast<OutputWindowPane>()
                                      .FirstOrDefault(p => p.Name == "AutoRunCustomTool")
                          ?? outputWindow.OutputWindowPanes.Add("AutoRunCustomTool");
            _errorListProvider = new ErrorListProvider(this)
                                 {
                                      ProviderName = "AutoRunCustomTool",
                                      ProviderGuid = Guid.NewGuid()
                                 };
            RegisterExtenderProvider();
        }
开发者ID:VasiliyNovikov,项目名称:AutoRunCustomTool,代码行数:25,代码来源:AutoRunCustomToolPackage.cs


示例9: ExecuteOnSolutionItem

        private void ExecuteOnSolutionItem(SelectedItem solutionItem, DTE2 application, OutputWindowPane pane)
        {
            if (solutionItem.ProjectItem != null && IsTargetSupported(GetProjectItemTarget(solutionItem.ProjectItem)))
            {
                //Unfortunaly FileNames[1] is not supported by .net 3.5
                OnExecute(solutionItem, solutionItem.ProjectItem.get_FileNames(1), pane);
                return;
            }

            if (solutionItem.Project != null && IsTargetSupported(CommandTarget.Project))
            {
                OnExecute(solutionItem, solutionItem.Project.FullName, pane);
                return;
            }

            if (application.Solution.IsOpen && IsTargetSupported(CommandTarget.Solution))
            {
                OnExecute(solutionItem, application.Solution.FullName, pane);
                return;
            }

            if (IsTargetSupported(CommandTarget.Empty))
            {
                OnExecute(solutionItem, null, pane);
                return;
            }

            MessageBox.Show("You need to select a file or project to use this function.", "Git Extensions", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
开发者ID:Carbenium,项目名称:gitextensions,代码行数:29,代码来源:ItemCommandBase.cs


示例10: FindJar

 public FindJar(DTE2 _applicationObject, Project prj, OutputWindowPane outWin)
 {
     this._applicationObject = _applicationObject;
     this.prj = prj;
     this.dg = outWin;
     this.alJars = new ArrayList();
 }
开发者ID:javasuki,项目名称:RJava,代码行数:7,代码来源:FindJar.cs


示例11: analyze

        public override void analyze(List<ConfiguredFiles> allConfiguredFiles, OutputWindowPane outputWindow, bool analysisOnSavedFile)
        {
            if (!allConfiguredFiles.Any())
                return;

            List<string> cppheckargs = new List<string>();
            foreach (var configuredFiles in allConfiguredFiles)
                cppheckargs.Add(getCPPCheckArgs(configuredFiles, analysisOnSavedFile, allConfiguredFiles.Count > 1, createNewTempFileName()));

            string analyzerPath = Properties.Settings.Default.CPPcheckPath;
            while (!File.Exists(analyzerPath))
            {
                OpenFileDialog dialog = new OpenFileDialog();
                dialog.Filter = "cppcheck executable|cppcheck.exe";
                if (dialog.ShowDialog() != DialogResult.OK)
                    return;

                analyzerPath = dialog.FileName;
            }

            Properties.Settings.Default.CPPcheckPath = analyzerPath;
            Properties.Settings.Default.Save();

            run(analyzerPath, cppheckargs, outputWindow);
        }
开发者ID:yhchen,项目名称:cppcheck-vs-addin,代码行数:25,代码来源:AnalyzerCppcheck.cs


示例12: OnExecute

 protected override void OnExecute(SelectedItem item, string fileName, OutputWindowPane pane)
 {
     if (!string.IsNullOrEmpty(fileName) && Path.GetInvalidPathChars().Any(fileName.Contains))
         fileName = "";
     var directoryName = Path.GetDirectoryName(fileName);
     RunGitEx("clone", directoryName);
 }
开发者ID:qgppl,项目名称:gitextensions,代码行数:7,代码来源:Clone.cs


示例13: OutputWindowLogger

        public OutputWindowLogger(DTE2 _applicationObject, string _eventSource, LogLevel level)
        {
            try
            {
                // Create an output pane for this package
                Window window = _applicationObject.Windows.Item(Constants.vsWindowKindOutput);
                OutputWindow outputWindow = (OutputWindow)window.Object;
                outputWindowPane = null;

                for (int i = 1; i <= outputWindow.OutputWindowPanes.Count; ++i)  // index starts from 1!
                {
                    if (outputWindow.OutputWindowPanes.Item(i).Name.Equals(_eventSource, StringComparison.CurrentCultureIgnoreCase))
                    {
                        outputWindowPane = outputWindow.OutputWindowPanes.Item(i);
                        break;
                    }
                }

                if (outputWindowPane == null)
                    outputWindowPane = outputWindow.OutputWindowPanes.Add(_eventSource);
            }
            catch
            {
                // Swallow it, never let errors in logging stop the add in
            }

            logLevel = level;
        }
开发者ID:modulexcite,项目名称:tfsproductivitypack,代码行数:28,代码来源:OutputWindowLogger.cs


示例14: OnExecute

        public override void OnExecute(SelectedItem item, string fileName, OutputWindowPane pane)
        {
            const string saveAllCommandName = "File.SaveAll";

            item.DTE.ExecuteCommand(saveAllCommandName, string.Empty);
            RunGitEx("commit", fileName);
        }
开发者ID:mnuni,项目名称:gitextensions,代码行数:7,代码来源:Commit.cs


示例15: OnConnection

    /// <summary>
    /// Implements the OnConnection method of the IDTExtensibility2 interface.
    /// Receives notification that the Add-in is being loaded.
    /// </summary>
    /// <param name="application">Root object of the host application.</param>
    /// <param name="connectMode">
    /// Describes how the Add-in is being loaded (e.g. command line or UI). This is unused since
    /// the add-in functions the same regardless of how it was loaded.
    /// </param>
    /// <param name="addInInst">Object representing this Add-in.</param>
    /// <param name="custom">Unused, but could contain host specific data for the add-in.</param>
    /// <seealso class='IDTExtensibility2' />
    public void OnConnection(
        object application,
        ext_ConnectMode connectMode,
        object addInInst,
        ref Array custom)
    {
      dte_ = (DTE2)application;

      debuggerEvents_ = dte_.Events.DebuggerEvents;
      debuggerEvents_.OnEnterDesignMode += DebuggerOnEnterDesignMode;
      debuggerEvents_.OnEnterRunMode += DebuggerOnEnterRunMode;

      commandEvents_ = dte_.Events.CommandEvents;
      commandEvents_.AfterExecute += CommandEventsAfterExecute;

      try
      {
        webServerOutputPane_ = dte_.ToolWindows.OutputWindow.OutputWindowPanes.Item(
            Strings.WebServerOutputWindowTitle);
      }
      catch (ArgumentException)
      {
        // This exception is expected if the window pane hasn't been created yet.
        webServerOutputPane_ = dte_.ToolWindows.OutputWindow.OutputWindowPanes.Add(
            Strings.WebServerOutputWindowTitle);
      }
    }
开发者ID:udiavr,项目名称:nativeclient-sdk,代码行数:39,代码来源:Connect.cs


示例16: OnExecute

 public override void OnExecute(SelectedItem item, string fileName, OutputWindowPane pane)
 {
     string message = "You are about to revert the file '" + fileName + "'. Do you want to do this?";
     if (MessageBox.Show(message, "Revert File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         P4Operations.RevertFile(pane, fileName);
     }
 }
开发者ID:transformersprimeabcxyz,项目名称:_To-Do-unreal-3D-niftyplugins-ben-marsh,代码行数:8,代码来源:P4RevertItem.cs


示例17: analyze

        public override void analyze(string dir, OutputWindowPane outputWindow)
        {
            List<string> cppheckargs = new List<string>
            {
                getCPPCheckArgs(dir)
            };

            analyze(cppheckargs, outputWindow);
        }
开发者ID:2xmax,项目名称:cppcheck-vs-addin,代码行数:9,代码来源:AnalyzerCppcheck.cs


示例18: OnConnection

 /// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary>
 /// <param term='application'>Root object of the host application.</param>
 /// <param term='connectMode'>Describes how the Add-in is being loaded.</param>
 /// <param term='addInInst'>Object representing this Add-in.</param>
 /// <seealso class='IDTExtensibility2' />
 public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
 {
     _applicationObject = (DTE2)application;
     _addInInstance = (AddIn)addInInst;
     _debug = _applicationObject.ToolWindows.OutputWindow.OutputWindowPanes.Add("Solution Settings Loader");
     Output("loaded...");
     _applicationObject.Events.SolutionEvents.Opened += SolutionEvents_Opened;
     Output("listening for solution load...");
 }
开发者ID:sdether,项目名称:SolutionVSSettings,代码行数:14,代码来源:Connect.cs


示例19: FeedbackManager

		public FeedbackManager(string name, OutputWindowPane outputPane)
		{
			if (name == null)
				throw new ArgumentNullException("name");
			if (outputPane == null)
				throw new ArgumentNullException("outputPane");

			_messagePrefix = name + " reporting:\n";
			_outputPane = outputPane;
		}
开发者ID:MartinF,项目名称:Dynamo.AutoTT,代码行数:10,代码来源:FeedbackManager.cs


示例20: run

		protected void run(string analyzerExePath, List<string> arguments, OutputWindowPane outputPane)
		{
			_outputPane = outputPane;
			_allArguments = arguments;

			abortThreadIfAny();
			MainToolWindow.Instance.clear();
			_thread = new System.Threading.Thread(() => analyzerThreadFunc(analyzerExePath));
			_thread.Name = "cppcheck";
			_thread.Start();
		}
开发者ID:gkl23,项目名称:cppcheck-vs-addin,代码行数:11,代码来源:ICodeAnalyzer.cs



注:本文中的OutputWindowPane类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OuyaSDK类代码示例发布时间:2022-05-24
下一篇:
C# OutputType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap