Esempio n. 1
0
        private void LoadRawLinesInto(List <string> target, IINIFile iniFile, string section)
        {
            if (!iniFile.HasSection(section))
            {
                return;
            }
            var lines = iniFile[section].Keys.Select(k => GetFullLine(k, iniFile[section]));

            target.AddRange(lines);
        }
Esempio n. 2
0
        public void RestartApplicationsForLayout(
            string layoutName
            )
        {
            var sectionName = RestoreAppsSectionFor(layoutName);

            if (!_config.HasSection(sectionName))
            {
                return;
            }
            var running = Process.GetProcesses();

            _config[sectionName].Keys.ForEach(
                k =>
            {
                var match = MatchProcess(k, running);
                match?.Kill();
                StartProcess(k);
            });
        }