如何刷新“文档"?加载项添加Team Explorer的功能? [英] How to refresh "Documents" of Team Explorer from add-in?

查看:102
本文介绍了如何刷新“文档"?加载项添加Team Explorer的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

如何刷新文档"

推荐答案

安德烈(Hello Andrej),

要刷新文档",在团队资源管理器"窗口中,我们可以先获取团队资源管理器"窗口,然后选择文档"节点和"View.Refresh"命令刷新节点.这是Marco代码,加载项中的逻辑相同.

Sub RefreshDocument()
DTE.Windows.Item("{131369F2-062D-44A2-8671-91FF31EFB4F4 }'').激活'Team Explorer
DTE.ActiveWindow.Object.GetItem("win-ruizyi \ TestTFS \ Documents").Select(vsUISelectionType.vsUISelectionTypeSelect)
DTE.ExecuteCommand("View .Refresh)
结束子

如果您在编写外接程序时遇到问题,请告诉我.

谢谢,
张荣春
Hello Andrej,

To refresh the "Documents" in the Team Explorer window, we can get the Team Explorer windows first, and then select the Documents node and the "View.Refresh" command to refresh the node. Here is the Marco code, the logic is the same in Add-in.

    Sub RefreshDocument()
        DTE.Windows.Item("{131369F2-062D-44A2-8671-91FF31EFB4F4}").Activate 'Team Explorer
        DTE.ActiveWindow.Object.GetItem("win-ruizyi\TestTFS\Documents").Select(vsUISelectionType.vsUISelectionTypeSelect)
        DTE.ExecuteCommand ("View.Refresh")
    End Sub

Let me know if you have problem with write the Add-in.

Thanks,
Rong-Chun Zhang


这篇关于如何刷新“文档"?加载项添加Team Explorer的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆