Esempio n. 1
0
        public Dictionary <int, List <ColorScheme> > GetLayers(string fileExtension)
        {
            var languageConfig = XmlLoader.Load <LanguageDescriptions>(programmerLanguages.Languages.FirstOrDefault(x => x.FileExtensions.Contains(fileExtension)).ConfigFile);
            Dictionary <int, List <ColorScheme> > layers = new Dictionary <int, List <ColorScheme> >();

            foreach (var colorScheme in languageConfig.LanguageDescription)
            {
                if (layers.ContainsKey(colorScheme.Layer))
                {
                    layers[colorScheme.Layer].Add(colorScheme);
                }
                else
                {
                    layers[colorScheme.Layer] = new List <ColorScheme> {
                        colorScheme
                    };
                }
            }
            return(layers);
        }
Esempio n. 2
0
 public void Initialize(string language)
 {
     languages     = XmlLoader.Load <Languages>(CONFIG_NAME);
     localLanguage = language;
 }
Esempio n. 3
0
 public TemplateFunnel()
 {
     templates = XmlLoader.Load <TemplateConfig>("Templates.xml");
 }
Esempio n. 4
0
 public CodeSchemeProvider()
 {
     programmerLanguages = XmlLoader.Load <ProgrammerLanguages>(CONFIG_NAME);
 }