예제 #1
0
        public void InitializeColors()
        {
            // Check if already initialized
            if (m_colorableItems != null)
                return;

            // Initialize theme engine
            themeEngine = new VisualStudioThemeEngine(Site);
            themeEngine.OnThemeChanged += themeEngine_OnThemeChanged;

            var currentTheme = themeEngine.GetCurrentTheme();

            m_colorableItems = new NShaderColorableItem[]
                                   {
                                        /*1*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Keyword", "Paradox Shader Language - Keyword", COLORINDEX.CI_BLUE, COLORINDEX.CI_AQUAMARINE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(86, 156, 214), Color.Empty, FONTFLAGS.FF_DEFAULT),
                                        /*2*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Comment", "Paradox Shader Language - Comment", COLORINDEX.CI_DARKGREEN, COLORINDEX.CI_GREEN, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(87, 166, 74), Color.Empty, FONTFLAGS.FF_DEFAULT),
                                        /*3*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Identifier", "Paradox Shader Language - Identifier", COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_SYSPLAINTEXT_FG, COLORINDEX.CI_USERTEXT_BK, FONTFLAGS.FF_DEFAULT),
                                        /*4*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - String", "Paradox Shader Language - String", COLORINDEX.CI_RED, COLORINDEX.CI_RED, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(214, 157, 133), Color.Empty, FONTFLAGS.FF_DEFAULT),
                                        /*5*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Number", "Paradox Shader Language - Number", COLORINDEX.CI_DARKBLUE, COLORINDEX.CI_BLUE, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(181, 206, 168), Color.Empty, FONTFLAGS.FF_DEFAULT),
                                        /*6*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Intrinsic", "Paradox Shader Language - Intrinsic", COLORINDEX.CI_MAROON, COLORINDEX.CI_CYAN, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(239, 242, 132), Color.Empty, FONTFLAGS.FF_BOLD),
                                        /*7*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Special", "Paradox Shader Language - Special", COLORINDEX.CI_AQUAMARINE, COLORINDEX.CI_MAGENTA, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(78, 201, 176), Color.Empty, FONTFLAGS.FF_DEFAULT),
                                        /*8*/ new NShaderColorableItem(currentTheme, "Paradox Shader Language - Preprocessor", "Paradox Shader Language - Preprocessor", COLORINDEX.CI_DARKGRAY, COLORINDEX.CI_LIGHTGRAY, COLORINDEX.CI_USERTEXT_BK, Color.Empty, Color.FromArgb(155, 155, 155), Color.Empty, FONTFLAGS.FF_DEFAULT),
                                   };
        }
 protected ClassificationColorManager(IServiceProvider serviceProvider)
 {
     // Initialize theme engine
     themeEngine = new VisualStudioThemeEngine(serviceProvider);
     themeEngine.OnThemeChanged += themeEngine_OnThemeChanged;
 }