private void DoScan() { _scan_platforms = Scanner.ScanPlatforms(Library.RootPath); _scan_roms = new Dictionary <PlatformId, List <Rom> >(); foreach (var scan_platform in _scan_platforms.Platforms) { ScanRoms(scan_platform); } }
private async void ScanBtn_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(Library.RootPath)) { return; } _scan_platforms = new PlatformScanResult(); _scan_roms = new Dictionary <PlatformId, List <Rom> >(); scanProgressBar.Style = ProgressBarStyle.Marquee; scanProgressBar.MarqueeAnimationSpeed = 30; await Task.Run(DoScan); scanProgressBar.Style = ProgressBarStyle.Continuous; scanProgressBar.Value = 0; PopulatePanels(); InitCreatePlatformContextMenu(); }