示例#1
0
        public void DoHighlighting(ProjectV2.ProjectNode project)
        {
            m_highlighting = true;

            m_textView.TextStorage.RemoveAttributeRange(NSAttributedString.NSForegroundColorAttributeName, new NSRange(0, m_textView.String.Length));
            m_textView.TextStorage.RemoveAttributeRange(NSAttributedString.NSBackgroundColorAttributeName, new NSRange(0, m_textView.String.Length));

            foreach (Token tok in project.Serializer.Tokens)
            {
                if (Colors.ContainsKey(tok.Type))
                {
                    m_textView.TextStorage.AddAttributeValueRange(NSAttributedString.NSForegroundColorAttributeName, Colors[tok.Type], new NSRange((uint)tok.Offset, (uint)tok.Length));
                }
                if (BGColors.ContainsKey(tok.Type))
                {
                    m_textView.TextStorage.AddAttributeValueRange(NSAttributedString.NSBackgroundColorAttributeName, BGColors[tok.Type], new NSRange((uint)tok.Offset, (uint)tok.Length));
                }
            }
            m_highlighting = false;
        }
示例#2
0
 public void DoHighlighting(ProjectV2.ProjectNode project)
 {
     throw new NotImplementedException();
 }