using System; using System.Collections; using Gtk; using Glade; using Dominio.Afiliados; using Dominio.Planes; public class App { Dialog wConsultarAfiliado; ArrayList lst; Glade.XML xmla; static public void Main (string[] args) { new App (); } public App () { Application.Init(); Glade.XML gxml = new Glade.XML (null, "main.glade", "main", null); gxml.Autoconnect (this); Widget w = gxml.GetWidget ("main"); w.SetSizeRequest (450, 250); InitDemo (); Application.Run(); } private void InitDemo () { } public void OnSalirActivate (object o, EventArgs args) { Application.Quit (); } public void OnConsultarAfiliado (object o, EventArgs args) { VIngresarSolicitud v = new VIngresarSolicitud (); v.Run (); } public void OnEmitirHojaDeRuta (object o, EventArgs args) { VEmitirHojaDeRuta v = new VEmitirHojaDeRuta (); v.Run (); } public void OnConsultarAfiliadoClose (object o, EventArgs args) { wConsultarAfiliado.Destroy (); } public void OnVerAfiliado (object o, EventArgs args) { } public void OnBuscarAfiliado (object o, EventArgs args) { Entry codigo = (Entry)xmla.GetWidget ("s_codigo"); TreeView lista = (TreeView)xmla.GetWidget ("lista"); TreeStore store = (TreeStore)lista.Model; foreach (Afiliado a in lst) { if (a.Codigo == Int32.Parse (codigo.Text)) store.AppendValues (String.Format("{0}", a.Codigo), a.Nombre); } } }