using System; using System.Collections; using Gtk; using Glade; using Controlador.Afiliacion; using Dominio.Afiliados; using Dominio.Autorizaciones; using Dominio.Planes; using Dominio; public class VMantenerPrestaciones { Glade.XML xml; [Widget] TextView detalles; [Widget] Entry file; [Widget] ProgressBar progreso; public VMantenerPrestaciones () { xml = new Glade.XML (null, "mantener_prestaciones.glade", "mantener_prestaciones", null); xml.Autoconnect (this); } public void OnActualizar (object o, EventArgs args) { TextBuffer buffer = detalles.Buffer; buffer.Clear (); for (int i=1; i < 10000; i++) { progreso.Fraction = i/10000.0f; buffer.InsertAtCursor (String.Format ("Agregando {0} de {1}\n", i, 10000)); detalles.ScrollToIter (buffer.EndIter, 0.0f, false, 0.0f, 0.0f); while (Gtk.Global.EventsPending) Main.IterationDo (false); } } public void Run () { Dialog w = (Dialog)xml.GetWidget ("mantener_prestaciones"); w.Run (); w.Destroy (); } }