internal static void ShowChangeset(EnvDTE.DTE dte, int id) { VersionControlExt vce; vce = dte.GetObject("Microsoft.VisualStudio.TeamFoundation.VersionControl.VersionControlExt") as VersionControlExt; vce.ViewChangesetDetails(id); }
private void ShowHelp() { try { // // Obtain reference to the Help2 object and display help associated with the SP**** error code. // EnvDTE.DTE dte = (EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0"); Microsoft.VisualStudio.VSHelp80.Help2 help2 = (Microsoft.VisualStudio.VSHelp80.Help2)dte.GetObject("Help2"); help2.DisplayTopicFromKeyword(currentError.ErrorCode); } catch (Exception ex) { MessageBoxOptions options = IsRightToLeft(this) ? MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading : 0; MessageBox.Show(Strings.CouldntLoadHelp + "\n\n" + ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, options); } }
object EnvDTE._DTE.GetObject(string Name) { return(dte.GetObject(Name)); }
private static DocumentService GetDocService(EnvDTE.DTE dte) { #warning Problematically. return(dte.GetObject("Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.DocumentService") as DocumentService); }
private void txtLinq_MouseClick(object sender, MouseEventArgs e) { // // Get the position inside the textbox based on the mouse cursor position. // int i = txtLinq.GetCharIndexFromPosition(e.Location); // // Error selected? // if (txtLinq.Cursor == Cursors.Hand && currentError != null) { try { // // Obtain reference to the Help2 object and display help associated with the SP**** error code. // EnvDTE.DTE dte = (EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0"); Microsoft.VisualStudio.VSHelp80.Help2 help2 = (Microsoft.VisualStudio.VSHelp80.Help2)dte.GetObject("Help2"); help2.DisplayTopicFromKeyword(currentError.ErrorCode); } catch (Exception ex) { MessageBox.Show("Couldn't load help information.\n\n" + ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } } }