示例#1
0
 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;
         }
     }
 }
示例#2
0
 //------------------------------------------------------------------------
 #region Add/remove syntax descriptors
 public void AddSyntaxDescriptor(string name, SyntaxDescriptor sd)
 {
     _syntaxDescriptors.Add(name, sd);
 }