Beispiel #1
0
        private void OpenPaths(string[] paths)
        {
            int failCount = _controller.OpenPaths(paths);

            foreach (string path in paths)
            {
                if (Directory.Exists(path))
                {
                    AddPathToHistory(GetRecentDirectories(), path);
                }
                else if (File.Exists(path))
                {
                    AddPathToHistory(GetRecentFiles(), path);
                }
            }

            UpdateUI();
            UpdateOpenMenu();

            if (failCount > 0)
            {
                MessageBox.Show("One or more selected files failed to open.");
            }
        }