internal void RunSilent(string[] folders)
        {
            _configuration.InputFolders = new List <string>(folders);


            if (Settings.Default.ShowProgressWindow)
            {
                RunSilentWithProgress();
                Mediator.AddToHistory(folders);
                return;
            }

            RunSilently(folders);
        }
        private void RunSilently(string[] folders)
        {
            var log = new ConcurrentBag <LogEntry>();

            _configuration.LoggingAction = (level, message) => log.Add(new LogEntry(level, message));
            var result = Core.DirLister.List(_configuration);

            if (!result)
            {
                Thread.Sleep(500);
                Application.Run(new MainForm(_configuration, log.OrderBy(x => x.Timestamp).ToList(), folders));
            }
            else
            {
                Mediator.AddToHistory(folders);
            }
        }