Exemplo n.º 1
0
        private async void ScanDirectory()
        {
            var directoryToScan = await _fileSystemBrowser.OpenDirectoryBrowserAsync("Select a folder to scan for mods.");

            if (string.IsNullOrEmpty(directoryToScan))
            {
                return;
            }

            var missingMods = await _validate.FilterMissingModsAsync(directoryToScan);

            await Application.Current.Dispatcher.BeginInvoke((Action) delegate
            {
                _missingModsLocked = true;
                MissingMods        = new RangeObservableCollection <ExtendedMod>();
                MissingMods.AddRange(missingMods);
                _missingModsLocked = false;
            });

            RemainingMissingModCount = MissingMods.Count;
        }