示例#1
0
        /// <summary>
        /// On tree view node click load the html to the html panel and html editor.
        /// </summary>
        private void OnSamplesTreeViewAfterSelect(object sender, TreeViewEventArgs e)
        {
            var name = e.Node.Tag as string;

            if (!string.IsNullOrEmpty(name))
            {
                _updateLock = true;

                string html = _samples[name];

                if (!name.Contains("PerfSamples"))
                {
                    SyntaxHilight.AddColoredText(html, _htmlEditor);
                }
                else
                {
                    _htmlEditor.Text = html;
                }

                Application.UseWaitCursor = true;

                _htmlPanel.Text = html;

                Application.UseWaitCursor = false;
                _updateLock = false;

                UpdateWebBrowserHtml();
            }
        }
示例#2
0
 /// <summary>
 /// Reload the html shown in the html editor by running coloring again.
 /// </summary>
 private void OnReloadColorsLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     SyntaxHilight.AddColoredText(_htmlEditor.Text, _htmlEditor);
 }