X-Git-Url: https://git.llucax.com/z.facultad/75.10/miklolife.git/blobdiff_plain/c36c16908f73901f367fe523aeef8dfb688ac2ff..ff18ca0a0361abc8f39ec11b7f8b9beda0db8039:/demo/src/Main.cs?ds=inline diff --git a/demo/src/Main.cs b/demo/src/Main.cs index b7400b9..3a89f71 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 + + 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(); 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,8 +62,13 @@ public class App { Application.Quit (); } + + public void OnDeleteEvent(object o, DeleteEventArgs args) + { + Application.Quit (); + } - public void OnConsultarAfiliado (object o, EventArgs args) + public void OnIngresarSolicitud(object o, EventArgs args) { VIngresarSolicitud v = new VIngresarSolicitud (); v.Run (); @@ -53,24 +80,13 @@ public class App v.Run (); } - public void OnConsultarAfiliadoClose (object o, EventArgs args) - { - wConsultarAfiliado.Destroy (); - } - - public void OnVerAfiliado (object o, EventArgs args) + public void OnRegistrarVisitas (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); - } + /*ABMGenerico g = new ABMGenerico (typeof(Plan)); + g.Run (); + return;*/ + VRegistrarVisitas v = new VRegistrarVisitas (); + v.Run (); } }