X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/c36c16908f73901f367fe523aeef8dfb688ac2ff..dd516a3640e528b4a29c477f0ac390ac84847672:/demo/src/Main.cs diff --git a/demo/src/Main.cs b/demo/src/Main.cs index b7400b9..8e7dcbf 100644 --- a/demo/src/Main.cs +++ b/demo/src/Main.cs @@ -12,20 +12,42 @@ public class App ArrayList lst; Glade.XML xmla; + #region Tests + + /// + /// Decide si se corre la demo ó los tests automatizados + /// + private static bool testing = false; + + private static void EjecutarTests() + { + Tests.TestsAutorizacion.Instancia.EjecutarTodos(); + + Console.Read(); + + //Acá pueden agregar más, si quieren + } + + #endregion Tests + + #region Entry Point + static public void Main (string[] args) { - new App (); + if ( ! testing ) + new App (); + else + EjecutarTests(); } + #endregion Entry Point + 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(); @@ -40,6 +62,11 @@ public class App { Application.Quit (); } + + public void OnDeleteEvent(object o, DeleteEventArgs args) + { + Application.Quit (); + } public void OnConsultarAfiliado (object o, EventArgs args) { @@ -53,6 +80,15 @@ public class App v.Run (); } + public void OnRegistrarVisitas (object o, EventArgs args) + { + /*ABMGenerico g = new ABMGenerico (typeof(Plan)); + g.Run (); + return;*/ + VRegistrarVisitas v = new VRegistrarVisitas (); + v.Run (); + } + public void OnConsultarAfiliadoClose (object o, EventArgs args) { wConsultarAfiliado.Destroy ();