I develop a Visual Studio extension . I attached a button to the Source Control History Window's Context Menu (the menu with 'changeset details', 'compare', etc.. on it)
I need to get the selected History items from the window, but couldn't figure it out how to do it.
Update:
I'm using team foundation server as source control. Here's the screenshot of the window i want to access to. Screenshot
I have found a way to retrieve the window object's data, but i still have some issues:
package.FindToolWindow(typeof(/*I don't know the type of the window*/), 0, false);
(package is instance of Microsoft.VisualStudio.Shell.Package class)
What is the type of the Source Control History window (the one on the screenshot)? This is the missing part of the puzzle i think.
Please help :) Thanks.
Maybe this will be helpful for your needs: Tool Window
I dont know your other code parts, but I guess you initiate a window application, where you want to render the history list. This window application needs:
private FirstToolWindow window;
private void ShowToolWindow(object sender, EventArgs e)
{
window = (FirstToolWindow) this.package.FindToolWindow(typeof(FirstToolWindow), 0, true);
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.