/// <summary> /// Initializes a new instance of the <see cref="OutputToolWindow"/> class. /// </summary> public OutputToolWindow() : base(null) { Caption = Vsix.Name; // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. try { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; Content = new OutputToolWindowControl(() => { ThreadHelper.JoinableTaskFactory.Run(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); (this.Frame as IVsWindowFrame).Show(); }); }); } finally { AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve; } }
/// <summary> /// Initializes a new instance of the <see cref="OutputToolWindow"/> class. /// </summary> public OutputToolWindow(OutputToolWindowContext context) : base(null) { //to see if OutputToolWindow can be internal ( and thus IScriptManager ) Caption = Vsix.Name; context.ScriptManager.FocusCallback = () => { ThreadHelper.JoinableTaskFactory.Run(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); (this.Frame as IVsWindowFrame).Show(); }); }; // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. try { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; Content = new OutputToolWindowControl(context.ScriptManager, context.FccEngine); } finally { AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve; } }
/// <summary> /// Initializes a new instance of the <see cref="OutputToolWindow"/> class. /// </summary> public OutputToolWindow() : base(null) { Caption = Vsix.Name; // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. try { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; Content = new OutputToolWindowControl(); } finally { AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve; } }
private void Initialize(OutputToolWindowContext context) { //to see if OutputToolWindow can be internal ( and thus IScriptManager ) Caption = Vsix.Name; context.EventAggregator.AddListener(this); // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. try { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; Content = new OutputToolWindowControl(context.EventAggregator); } finally { AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve; } }