private void ApplyStyle(SyntaxDescriptor sd, Capture c) { Select(c.Index, c.Length); if (SelectionColor.ToArgb() == ForeColor.ToArgb() && SameFont(SelectionFont, Font)) { if (sd.Color != ForeColor) { SelectionColor = sd.Color; } if (sd.Font != null) { SelectionFont = sd.Font; } } }
//------------------------------------------------------------------------ #region Add/remove syntax descriptors public void AddSyntaxDescriptor(string name, SyntaxDescriptor sd) { _syntaxDescriptors.Add(name, sd); }