using System; using System.Reflection; using System.Collections; using Gtk; using Glade; public class ABMGenerico { Glade.XML xml; [Widget] Table tabla; public ABMGenerico (Type objectType) { PropertyInfo[] properties = objectType.GetProperties (); xml = new Glade.XML (null, "abm_generico.glade", "abm_one", null); xml.Autoconnect (this); uint i=0; foreach( PropertyInfo mf in properties ) { Label l = new Label (mf.Name + " : "); Entry e = new Entry (); tabla.Attach (l, 0, 1, i, i+1); tabla.Attach (e, 1, 2, i, i+1); l.Show (); e.Show (); i++; } } public void Run () { Dialog w = (Dialog)xml.GetWidget ("abm_one"); w.Run (); w.Destroy (); } }