Пример #1
0
        private void ReloadGsdxDlls()
        {
            _internalLogger.Information("Starting GSdx Loading Procedures");

            var gsdxFolder = _folderWithFallBackFinder.GetViaPatternWithFallback(Settings.GSDXDir, "*.dll", "", "plugins", "dll", "dlls");

            _availableGsDlls.Files.Clear();
            foreach (var file in _gsdxDllFinder.GetEnrichedPathToValidGsdxDlls(gsdxFolder))
            {
                _availableGsDlls.Files.Add(file);
            }

            Settings.GSDXDir = gsdxFolder.FullName;
            _internalLogger.Information("Completed GSdx Loading Procedures");
        }
Пример #2
0
        private void ReloadGsdxDlls()
        {
            _internalLogger.Information("Starting GSdx Loading Procedures");

            var gsdxFolder = _folderWithFallBackFinder.GetViaPatternWithFallback(Settings.GSDXDir, "*.dll", "", "plugins", "dll", "dlls");

            _availableGsDlls.Files.Clear();
            foreach (var file in _gsdxDllFinder.GetEnrichedPathToValidGsdxDlls(gsdxFolder))
            {
                _availableGsDlls.Files.Add(file);
            }

            Settings.GSDXDir = gsdxFolder.FullName;
            _internalLogger.Information("Completed GSdx Loading Procedures");

            string[] paths = { "", "\\plugins", "\\dll", "\\dlls" };

            foreach (FileSystemWatcher w in _dllWatcher)
            {
                w.EnableRaisingEvents = false;
                w.Dispose();
            }

            _dllWatcher.Clear();

            for (int i = 0; i < paths.Length; i++)
            {
                try
                {
                    FileSystemWatcher w = new FileSystemWatcher(Settings.GSDXDir + paths[i], "*.dll");
                    //w.Changed += OnDllDirChange;
                    w.Created            += OnDllDirChange;
                    w.Deleted            += OnDllDirChange;
                    w.Renamed            += OnDllDirChange;
                    w.EnableRaisingEvents = true;
                    _dllWatcher.Add(w);
                }
                catch { }
            }
        }