public static void ShowKBDoctorResults(string outputFile) { UIServices.ToolWindows.ShowToolWindow(KBDoctorToolWindow.guid); UIServices.ToolWindows.FocusToolWindow(KBDoctorToolWindow.guid); IToolWindow ikbdtw; if (UIServices.ToolWindows.TryGet(KBDoctorToolWindow.guid, out ikbdtw)) { KBDoctorToolWindow kbdtw = (KBDoctorToolWindow)ikbdtw; kbdtw.Navigate(outputFile); } else { KBDoctorOutput.Error("Error trying to show results."); } }
/* [EventSubscription(ArchitectureEvents.BeforeSaveKBObject)] * private void OnBeforeSaveKBObject(object sender, KBObjectEventArgs args) * { * CommonServices.Output.SelectOutput("General"); * } */ public override IToolWindow CreateToolWindow(Guid toolWindowId) { bool flag = toolWindowId.Equals(KBDoctorToolWindow.guid); IToolWindow result; if (flag) { bool flag2 = this.myKBDoctorWindow == null; if (flag2) { this.myKBDoctorWindow = new KBDoctorToolWindow(); } result = this.myKBDoctorWindow; } else { result = base.CreateToolWindow(toolWindowId); } return(result); }