private static void DisplayLootScanResults(LootScanResponse lootScanResponse) { var scanResultWindow = new ScanResultWindow(MainConsole.Width / 2, MainConsole.Height / 2, MainConsole); MainConsole.Children.Add(scanResultWindow); scanResultWindow.TitleAlignment = HorizontalAlignment.Center; scanResultWindow.Title = "Loot scan results"; scanResultWindow.CanDrag = true; scanResultWindow.IsVisible = true; scanResultWindow.UseKeyboard = true; scanResultWindow.CenterWithinParent(); scanResultWindow.SetLoot(lootScanResponse); }
public IEnumerable <IScanResult> ProcessResult(string folderName, IEnumerable <IScanResult> result) { var changed = result.Where(r => r.Result != ScanResult.Unchanged); var viewmodel = IoCKernel.Get <IScanResultViewModel>( IoCKernel.Param("results", changed)); viewmodel.Label = string.Format(StringFormats.ScanResultTitle, folderName); var window = new ScanResultWindow(viewmodel); if (window.ShowDialog() ?? false) { return(viewmodel .Where(c => (c.IsIgnoreOption ?? false) == false) .Select(c => c.ScanResult) .ToList()); } return(new List <IScanResult>()); }