]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
* Mejora menor
authorRicardo Markiewicz <gazer.arg@gmail.com>
Thu, 16 Jun 2005 00:01:15 +0000 (00:01 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Thu, 16 Jun 2005 00:01:15 +0000 (00:01 +0000)
demo/src/Vistas/CalendarDialog.cs
demo/src/Vistas/IngresarSolicitud.cs

index 958abca44136a2ed9ffeacf0fd9d33c65da69e4d..4efdc59397668105feba21c472a3016b8cb97c4c 100644 (file)
@@ -12,6 +12,22 @@ public class CalendarDialog : Dialog
        }
 
        public CalendarDialog ():base ("Seleccionar Fecha", null, DialogFlags.DestroyWithParent)
+       {
+               Init ();
+       }
+
+       public CalendarDialog (string date):base ("Seleccionar Fecha", null, DialogFlags.DestroyWithParent)
+       {
+               Init ();
+               try {
+                       calendar.Date = DateTime.Parse (date);
+               } 
+               catch (Exception e) {
+                       Console.WriteLine (e);
+               }
+       }
+
+       private void Init ()
        {
                calendar = new Calendar ();
                VBox.PackStart (calendar);
index 1079641a8b3d85f09ecb271b8f9f6267a5af7f02..3900bc65bc5f86c21710462b89eec48b1207e4d9 100644 (file)
@@ -103,8 +103,15 @@ public class VIngresarSolicitud
 
        public void OnSeleccionarFechaClicked (object o, EventArgs args)
        {
-               CalendarDialog d = new CalendarDialog ();
+               
+               CalendarDialog d;
+               if (fechaNac.Text.Equals (""))
+                       d = new CalendarDialog ();
+               else
+                       d = new CalendarDialog (fechaNac.Text);
+               
                int response;
+               
                response = d.Run();
                if (response == -3)
                        fechaNac.Text = d.Date.ToLongDateString ();