winfrom如何做一个语法着色控件

本文转载:http://www.cnblogs.com/hexin0614/archive/2012/01/17/2324224.html

 

本人觉得把KeyWords属性改成如下更好:

 

private  string[] _KeyWords =  new  string[]
        { 
             " SELECT "" UPDATE "" DELETE "" INSERT "" DROP "" FROM "" WHERE "" ALERT "" CREATE "" TABLE "
             " VALUES "" NULL "
             " AND "" OR "" NOT "" IN "" INTO "" UNION "" AS "" IS "
             " COUNT "" MAX "" MIN "" AVG "
             " WAIT "" NOWAIT "" WITHOUT "" LOCK "" GROUP "" ORDER "" BY "
             " JOIN "" LEFT "" RIGHT "" CASE "" WHEN "" ELSE "" END "
             " COMMIT "" ROLLBACK "
        };

        [CategoryAttribute( " KeyWords "), Description( " 关键字列表 ")]
         public  string[] KeyWords
        {
             get
            {
                 return  this._KeyWords;
            }
             set
            {
                 this._KeyWords = value;
            }
        }

 

你可能感兴趣的:(ROM)