public static FlowLayoutPanel add_FlowLayoutPanel_with_DetectedModules(this Control targetControl, Process process) { targetControl.clear(); var modules_byModuleName = process.modules_Indexed_by_ModuleName(); var modules_byFileName = process.modules_Indexed_by_FileName(); var flowPanel = targetControl.add_FlowLayoutPanel(); Func<string,string, Button> add_Mapping = (key, text)=>{ if (modules_byModuleName.hasKey(key) || modules_byFileName.hasKey(key)) return flowPanel.add_Button(text); return null; }; add_Mapping("mscoree.dll" , "CLR").green(); add_Mapping(@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll" , "CLR 4.0 32bit").blue(); add_Mapping(@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll" , "CLR 4.0 64bit").blue(); add_Mapping("java.dll", "JVM").green(); return flowPanel; }