Exemplo n.º 1
0
        // View Unrendered Source

        private void linkUnrendered_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (_helpTopic == null)
            {
                return;
            }

            try
            {
                Stream stream = (Stream)_helpTopic.FetchContent();
                if (stream != null)
                {
                    //Browser Pane
                    //webBrowser1.DocumentStream = stream;

                    //Details Pane
                    StreamReader reader = new StreamReader(stream);
                    detailsRichTextBox.Clear();
                    detailsRichTextBox.Text = reader.ReadToEnd();

                    //good idea to close all open streams
                    stream.Close();
                }
            }
            catch
            {
                detailsRichTextBox.Clear();
                detailsRichTextBox.Text = "** Error fetching topic stream **";
            }
        }