我正在为 PS3 MW2 patch_mp.ff 开发一个 .FF 编辑器,我的设计完全是黑暗主题,一切正常,但有一点;在 ICSharpCode.TextEditor.TextEditorControl 中,数字在黑色背景上显示为黑色,我从未在网上看到任何其他人发过此问题的帖子,因此无法找到解决问题的方法。
我试过的:
语法高亮策略方法通过 XSHD 文件设置所有 SystemColors 的外部语法高亮为 Color.White 等..
以下是我创建 TextEditorControl 的方式:
private TextEditorControl AddNewTextEditor(string title)
{
tab = new TabPage(title);
tab.ForeColor = Color.White;
TextEditorControl textEditorControl = new TextEditorControl();
textEditorControl.ForeColor = Color.White;
textEditorControl.Dock = DockStyle.Fill;
textEditorControl.IsReadOnly = false;
textEditorControl.ContextMenuStrip = contextMenuStrip2;
textEditorControl.Text = readgsc;
TextEditorControl Editor = textEditorControl;
Font font = new Font("Consolas", 9f);
if (font.Name == "Consolas")
Editor.Font = font;
Editor.ForeColor = Color.White;
Editor.SetHighlighting("GSC");
Editor.BorderStyle = BorderStyle.FixedSingle;
Editor.EnableFolding = true;
Editor.ShowVRuler = false;
Editor.Document.FormattingStrategy = new FormattingStrategy();
Editor.Document.FoldingManager.FoldingStrategy = new MyFolding();
Editor.IndentStyle = IndentStyle.Smart;
Editor.Document.DocumentChanged += (sender, e) => SetModifiedFlag(Editor, true);
Editor.TextChanged += new EventHandler(FileHasBeenEdited);
侃侃无极
相关分类