如何选择合适的代码高亮插件C?

2026-04-24 14:502阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计195个文字,预计阅读时间需要1分钟。

如何选择合适的代码高亮插件C?

CSDN 高亮也是这样实现的:`protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CodeHighlighterConfiguration config=ConfigurationManager.GetSection(codeHighlighter) as CodeHighlighterConfiguration; string[] keys=new string[] { ... }; } }`

csdn高亮也是这个

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
CodeHighlighterConfiguration config = ConfigurationManager.GetSection("codeHighlighter") as CodeHighlighterConfiguration;
string[] keys = new string[config.LanguageConfigs.Keys.Count];
config.LanguageConfigs.Keys.CopyTo(keys, 0);
Array.Sort(keys);
foreach (string key in keys)
{
LanguageDropDownList.Items.Add(key);
}
LanguageDropDownList.SelectedIndex = LanguageDropDownList.Items.IndexOf(LanguageDropDownList.Items.FindByText("C#"));
}
}

protected void HighlightButton_Click(object sender, EventArgs e)
{

// HighlightButton.Enabled = false;

FileSizeLabel.Text = CodeTextBox.Text.Length.ToString();
OutputTextBox.Text =null;

Highlighter.LanguageKey = LanguageDropDownList.SelectedItem.Text;

Highlighter.OutliningEnabled = OutliningEnabledCheckBox.Checked;
Highlighter.LineNumberMarginVisible = LineNumberMarginVisibleCheckBox.Checked;

Highlighter.Text = CodeTextBox.Text;

ResultsPanel.Visible = true;
}



protected void CodeHighlighter_PostRender(object sender, EventArgs e)
{
OutputTextBox.Text = Highlighter.Output;
}

​​下载​​



如何选择合适的代码高亮插件C?


本文共计195个文字,预计阅读时间需要1分钟。

如何选择合适的代码高亮插件C?

CSDN 高亮也是这样实现的:`protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CodeHighlighterConfiguration config=ConfigurationManager.GetSection(codeHighlighter) as CodeHighlighterConfiguration; string[] keys=new string[] { ... }; } }`

csdn高亮也是这个

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
CodeHighlighterConfiguration config = ConfigurationManager.GetSection("codeHighlighter") as CodeHighlighterConfiguration;
string[] keys = new string[config.LanguageConfigs.Keys.Count];
config.LanguageConfigs.Keys.CopyTo(keys, 0);
Array.Sort(keys);
foreach (string key in keys)
{
LanguageDropDownList.Items.Add(key);
}
LanguageDropDownList.SelectedIndex = LanguageDropDownList.Items.IndexOf(LanguageDropDownList.Items.FindByText("C#"));
}
}

protected void HighlightButton_Click(object sender, EventArgs e)
{

// HighlightButton.Enabled = false;

FileSizeLabel.Text = CodeTextBox.Text.Length.ToString();
OutputTextBox.Text =null;

Highlighter.LanguageKey = LanguageDropDownList.SelectedItem.Text;

Highlighter.OutliningEnabled = OutliningEnabledCheckBox.Checked;
Highlighter.LineNumberMarginVisible = LineNumberMarginVisibleCheckBox.Checked;

Highlighter.Text = CodeTextBox.Text;

ResultsPanel.Visible = true;
}



protected void CodeHighlighter_PostRender(object sender, EventArgs e)
{
OutputTextBox.Text = Highlighter.Output;
}

​​下载​​



如何选择合适的代码高亮插件C?