如何以编程方式打开Pending Changes - Conflict Window?

时间:2013-02-15 17:01:25

标签: api sdk tfs

我需要在待定更改窗口中打开冲突选项卡:

我已经拥有:

  Object customIn = null;
  Object customOut = null;
  //Show TfsPendingChanges
  m_applicationObject.ExecuteCommand("View.TfsPendingChanges", "");
  //Refresh
  m_applicationObject.Commands.Raise("{FFE1131C-8EA1-4D05-9728-34AD4611BDA9}", 4808, ref customIn, ref customOut);
  customOut = null;

  //Get Conflicts
  m_applicationObject.Commands.Raise("{FFE1131C-8EA1-4D05-9728-34AD4611BDA9}", 4832, ref customIn, ref customOut);

但是我找不到打开冲突TAB的方法! Even Get Conflicts按钮(4832)不会触发TAB!

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

public void refreshPendingChanges()
{
  Object customIn = null;
  Object customOut = null;

  //Show TfsPendingChanges
  m_applicationObject.ExecuteCommand("View.TfsPendingChanges", "");

  //Refresh
  m_applicationObject.Commands.Raise("{FFE1131C-8EA1-4D05-9728-34AD4611BDA9}", 4808, ref customIn, ref customOut);

  //Activate Source Explorer
  m_applicationObject.DTE.Windows.Item("{99B8FA2F-AB90-4F57-9C32-949F146F1914}").Activate(); //I get this GUID recording a Macro.
  //Show Conflicts
  m_applicationObject.DTE.ExecuteCommand("File.TfsResumeConflictResolution"); 
}

感谢Chad Boles!那个说我的TfsResumeConflictResolution DTE Command。