X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/757bd0807efe6f079a8377de612cd87a9ac024bf..6ef9085b2768547cadbd695a5bf28721d7e69eb8:/demo/src/Main.cs?ds=inline diff --git a/demo/src/Main.cs b/demo/src/Main.cs index ce03513..3f1e69d 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 + + 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) { + if ( args.Length > 0) { + if (args[0].Equals ("--test")) { + EjecutarTests(); + return; + } + Console.WriteLine ("Parametro no válido"); + return; + } new App (); } + #endregion Entry Point + public App () { Application.Init(); @@ -43,7 +68,7 @@ public class App Application.Quit (); } - public void OnConsultarAfiliado (object o, EventArgs args) + public void OnIngresarSolicitud(object o, EventArgs args) { VIngresarSolicitud v = new VIngresarSolicitud (); v.Run (); @@ -55,33 +80,23 @@ public class App v.Run (); } - public void OnRegistrarVisitas (object o, EventArgs args) + public void OnAgregarAfiliado (object o, EventArgs args) { - /*ABMGenerico g = new ABMGenerico (typeof(Plan)); - g.Run (); - return;*/ - VRegistrarVisitas v = new VRegistrarVisitas (); + VAgregarAfiliado v = new VAgregarAfiliado (); v.Run (); } - public void OnConsultarAfiliadoClose (object o, EventArgs args) - { - wConsultarAfiliado.Destroy (); - } - public void OnVerAfiliado (object o, EventArgs args) + public void OnMantenerPlanes (object o, EventArgs args) { + VMantenerPlanes v = new VMantenerPlanes (); + v.Run (); } - - public void OnBuscarAfiliado (object o, EventArgs args) + + public void OnRegistrarVisitas (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); - } + VRegistrarVisitas v = new VRegistrarVisitas (); + v.Run (); } }