Exemplo n.º 1
0
        private void addJokeToList(string joke)
        {
            AllJokesPanelControl window =
                FindToolWindow(typeof(AllJokesPanel), 0, true).Content as AllJokesPanelControl;

            window.AddJoke(joke);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AllJokesPanel"/> class.
        /// </summary>
        public AllJokesPanel() : base(null)
        {
            Caption = "Jokes Collection";

            // 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.
            Content = new AllJokesPanelControl();
        }