Exemple #1
0
 public void setd(string id)
 {
     if (curID != id)
     {
         IHighlight highlight = highlightDic[id];
         defaultAttr = highlight.getDefault();
         lex.ClearRule();
         this.lex.AddRule(highlight.getRules());
         curID = id;
     }
 }
Exemple #2
0
        public void SetPartition(Partition partition)
        {
            if (this.partition != partition)
            {
                this.partition = partition;

                var highlight = this.partition.Highlight;
                defaultAttr = highlight.getDefault();

                lex.ClearRule();

                var ch = this.partition.Children;
                //var parent = this.partition.Parent;
                //var ch = parent.Children;
                foreach (var item in ch)
                {
                    //this.lex.AddPartRule(item.GetPartRule());
                    //this.lex.AddPartRule(item.rule);
                }
                this.lex.AddRule(highlight.getRules());
            }
        }