private void LoadConfig()
        {
            CoreUtil.StartLoadingConfig(Preferences);

            var general = CoreUtil.LoadSection("General");
            general.LoadValue("PluginActive", ref _pluginActive);
            general.LoadValue("ToggleTranslationKey", ref _toggleButton);
            general.LoadValue("TranslationMethod", ref _activeTranslator);
            general.LoadValue("IgnoreFileName", ref _IgnoreFileName);

            var cache = CoreUtil.LoadSection("Cache");
            cache.LoadValue("File", ref _translationFile);
            cache.LoadValue("Folder", ref _translationFolder);
            cache.LoadValue("WriteCacheToFile", ref _dumpCache);
            cache.LoadValue("Frequenzy", ref _cacheDumpFrequenzy);
            if(_cacheDumpFrequenzy == CacheDumpFrequenzy.Periodic) {
                cache.LoadValue("PeriodicIntervall", ref _cacheDumpPeriodicIntervall);
            }
        }
Пример #2
0
        public void LoadConfig()
        {
            var section = CoreUtil.LoadSection(Section);

            LoadConfig(section);
        }
        public void LoadConfig()
        {
            var section = CoreUtil.LoadSection("General");

            section.LoadValue("SubstitutionsFile", ref _replacementsFile);
        }