public void showSpringBeansInDataGrdView(SpringBeans sbSpringBeans) { dgvBeans.Columns.Clear(); foreach (var property in DI.reflection.getProperties(typeof(SpringMappingItem))) { O2Forms.addToDataGridView_Column(dgvBeans, property.Name, -1); } /*O2Forms.addToDataGridView_Column(dgvBeans, "bean", -1); * O2Forms.addToDataGridView_Column(dgvBeans, "class", -1); * O2Forms.addToDataGridView_Column(dgvBeans, "innerXml", -1);*/ foreach (SpringMappingItem spiSpringMappingItem in sbSpringBeans.dSpringMappingItems.Values) { var items = new List <object>(); foreach (var property in DI.reflection.getProperties(typeof(SpringMappingItem))) { items.Add(DI.reflection.getProperty(property.Name, spiSpringMappingItem)); } O2Forms.addToDataGridView_Row(dgvBeans, null, items.ToArray()); /* * new[] * { * spiSpringMappingItem.sBean, spiSpringMappingItem.sClass, * spiSpringMappingItem.sInnerXml * });*/ } }
public void ShowBeans() { try { String sWebRoot = tbWebRoot.Text; Dictionary <String, XmlNode> dBeans = BeanUtils.getAllBeans_RecursiveSearch(sWebRoot); var sbSpringBeans = new SpringBeans(dBeans); showSpringBeansInDataGrdView(sbSpringBeans); } catch (Exception ex) { DI.log.ex(ex); } }