c# - Use VersionControlExt.Explorer outside Visual Studio -
Text after "
I am developing a TFS tool to assist developers in our company.
It said equipment needed source control explorer like TFS server "using VersionControlExt.Explorer.SelectedItems I believe that to be able to browse", a UI pop-up that TFS server The user will be able to browse (please correct me if I am wrong)
However, VersionControlExt only is unfortunately inaccessible to grow within Visual Studio (aka plugin), I am developing a Windows application running inside VS.
So the question is, can I use version controlext outside Visual Studio? If yes, then how?
An attempt to use to communicate Changset out the details of Visual Studio
string path = System.IO.Path.GetDirectoryName (Assembly.GetExecutingAssembly () Ksthan); Assembly vcControls = assembly Load file (path + @ "\ Microsoft.TeamFoundation.VersionControl.Controls.dll"); Assembly vcClient = assembly.loadfile (path + @ "\ Microsoft.TeamFoundation.VersionControl.Client.dll"); Type dialogChangesetDetailsType = vcControls.GetType ( "Microsoft.TeamFoundation.VersionControl.Controls.DialogChangesetDetails", true); Type [] ctorTypes = new type [3] {vcClient.GetType ( "Microsoft.TeamFoundation.VersionControl.Client.VersionControlSever"), vcClient.GetType ( "Microsoft.TeamFoundation.VersionControl.Client.Changeset"), typeof (System. Boolean)}; ConstructorInfo ctorInfo = Dialogs ChangesetDetailsType.GetConstructor (ctorTypes); Object [] ctorObjects = new object [3] {VersionControlHelper.CurrentVersionControlServer, uc.ChangeSet, True}; Object OdiLog = CTAR Info Invoke (CTOROOJjects); Dialog ChangesetDetailsType.InvokeMember ("ShowDialog", BindingFlags.InvokeMethod, null, oDialog, null); Public void ShowChangeSetDetails (form owner, Changeset changeSet) {string path = System.IO.Path.GetDirectoryName (Assembly.GetExecutingAssembly () position.); Assembly vcControls = assembly.loadfom (path + @ "\ Microsoft.TeamFoundation.VersionControl.Controls.dll"); Assembly vcClient = Assembly.LoadFrom (path + @ "\ Microsoft.TeamFoundation.VersionControl.Client.dll"); Type dialogSetsetAccount type = vcControls.GetType ("Microsoft.TeamFoundation.VersionControl.Controls.DialogChangesetDetails", true); MethodInfo methodInfo = dialogChangesetDetailsType.GetMethod ( "ShowChangeset", BindingFlags.Static | BindingFlags.NonPublic, zero, new type [] {typeof (IWin32Window), changeSet.VersionControlServer.GetType (), changeSet.GetType (), typeof (bool)} , Zero); MethodInfo.Invoke (empty, new object [] {owner, changeSet.VersionControlServer, changeSet, true}); }
Comments
Post a Comment