Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. private void ShowToolWindow(object sender, EventArgs e)
  2. {
  3. // Get the instance number 0 of this tool window. This window is single instance so this instance
  4. // is actually the only one.
  5. // The last flag is set to true so that if the tool window does not exists it will be created.
  6. var window = FindToolWindow(typeof(TwitterToolWindow), 0, true);
  7. if ((null == window) || (null == window.Frame))
  8. {
  9. throw new NotSupportedException(Resources.CanNotCreateWindow);
  10. }
  11.  
  12. var windowFrame = (IVsWindowFrame)window.Frame;
  13. Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show());
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement