X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/924faf98ad54ff380ebb60505070a883ac09a27e..dd516a3640e528b4a29c477f0ac390ac84847672:/demo/src/Main.cs?ds=inline diff --git a/demo/src/Main.cs b/demo/src/Main.cs index 56637c5..8e7dcbf 100644 --- a/demo/src/Main.cs +++ b/demo/src/Main.cs @@ -12,11 +12,36 @@ 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(); @@ -37,6 +62,11 @@ public class App { Application.Quit (); } + + public void OnDeleteEvent(object o, DeleteEventArgs args) + { + Application.Quit (); + } public void OnConsultarAfiliado (object o, EventArgs args) { @@ -50,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 ();