Ejemplo n.º 1
0
 private void FillColorTableWithStandardColors(ColorInfoTable table)
 {
     table[0] = this.PlainTextColor;
     table[1] = this.KeywordColor;
     table[2] = this.StringColor;
     table[3] = this.CommentColor;
     table[4] = this.LineNumbersColor;
     table[5] = this.SelectedTextColor;
     table[6] = this.InactiveSelectedTextColor;
     table[7] = this.ControlColor;
     table[8] = this.ControlDarkColor;
 }
Ejemplo n.º 2
0
 public ColorInfoTable GetColorTable(ITextLanguage language)
 {
     if (language == null)
     {
         return this.DefaultColorTable;
     }
     ColorInfoTable table = (ColorInfoTable) _colorTables[language];
     if (table == null)
     {
         ITextColorizer colorizer = language.GetColorizer(this._serviceProvider);
         ColorInfo[] infoArray = (colorizer != null) ? colorizer.ColorTable : null;
         table = new ColorInfoTable(0x40 + ((infoArray != null) ? infoArray.Length : 0));
         this.FillColorTableWithStandardColors(table);
         if (infoArray != null)
         {
             for (int i = 0; i < infoArray.Length; i++)
             {
                 table[i + 0x40] = infoArray[i];
             }
         }
         _colorTables[language] = table;
     }
     return table;
 }