【问题标题】:Permanently hide the Task List window in Visual Studio 2017在 Visual Studio 2017 中永久隐藏任务列表窗口
【发布时间】:2018-10-23 19:23:57
【问题描述】:

我无法在网上找到答案,但基本上我想永久隐藏每当我测试 Biztalk 地图时弹出的任务列表窗口。现在我通过尽可能地最小化窗口找到了一个临时解决方案,所以它不会妨碍,但完全摆脱它会很好。

这是有问题的窗口。

【问题讨论】:

    标签: visual-studio testing build biztalk


    【解决方案1】:

    很遗憾,没有(为了清楚起见,答案是否定的……除非你想编写一个 Shell 扩展;)。

    我经常和你一样对此感到沮丧,但我发现简单地将它藏在角落里或沿着状态栏和隐藏它一样好。

    我认为激活操作已融入地图设计器。

    【讨论】:

      【解决方案2】:

      您可以尝试使用Visual Commander 的以下扩展程序,以便在显示任务列表窗口后自动关闭它:

      public class E : VisualCommanderExt.IExtension
      {
          public void SetSite(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package)
          {
              events = DTE.Events;
              windowEvents = events.WindowEvents;
              windowEvents.WindowActivated += OnWindowActivated;
          }
      
          public void Close()
          {
              windowEvents.WindowActivated -= OnWindowActivated;
          }
      
          private void OnWindowActivated(EnvDTE.Window gotFocus, EnvDTE.Window lostFocus)
          {
              try
              {
                  if (gotFocus.Caption == "Task List")
                      CloseWindow(gotFocus);
              }
              catch (System.Exception)
              {
              }
          }
      
          private void CloseWindow(EnvDTE.Window w)
          {
              System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(
                  System.Windows.Threading.DispatcherPriority.Background,
                  new System.Action(() =>
               {
                   try
                   {
                       w.Close();
                   }
                   catch (System.Exception)
                   {
                   }
               }
                      ));
          }
      
          private EnvDTE.Events events;
          private EnvDTE.WindowEvents windowEvents;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-18
        • 2012-04-09
        • 2017-05-28
        • 1970-01-01
        • 1970-01-01
        • 2017-12-13
        • 1970-01-01
        • 2014-07-18
        相关资源
        最近更新 更多