]> git.llucax.com Git - z.facultad/75.10/miklolife.git/commitdiff
Una linda ventana de mantener prestaciones, con barra de progreso y textview para...
authorRicardo Markiewicz <gazer.arg@gmail.com>
Wed, 6 Jul 2005 08:07:45 +0000 (08:07 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Wed, 6 Jul 2005 08:07:45 +0000 (08:07 +0000)
  el detalle de lo que esta pasando. No hace nada en realidad todavia, tiene valores dummy

demo/glade/main.glade
demo/glade/mantener_prestaciones.glade [new file with mode: 0644]
demo/src/Main.cs
demo/src/Vistas/MantenerPrestaciones.cs [new file with mode: 0644]

index 5f804db628582b8f049d41c3656e61308eb7737c..0a034b7635be2416f3982b7aa8e4b1e602f4ca55 100644 (file)
              <child>
                <widget class="GtkMenu" id="mantenimiento1_menu">
 
+                 <child>
+                   <widget class="GtkMenuItem" id="prestaciones1">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Prestaciones</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="OnMantenerPrestaciones" last_modification_time="Wed, 06 Jul 2005 07:28:49 GMT"/>
+                   </widget>
+                 </child>
+
                  <child>
                    <widget class="GtkMenuItem" id="prestadores1">
                      <property name="visible">True</property>
       </child>
 
       <child>
-       <placeholder/>
+       <widget class="GtkLabel" id="label1">
+         <property name="visible">True</property>
+         <property name="label" translatable="yes"></property>
+         <property name="use_underline">False</property>
+         <property name="use_markup">False</property>
+         <property name="justify">GTK_JUSTIFY_LEFT</property>
+         <property name="wrap">False</property>
+         <property name="selectable">False</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.5</property>
+         <property name="xpad">0</property>
+         <property name="ypad">0</property>
+         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+         <property name="width_chars">-1</property>
+         <property name="single_line_mode">False</property>
+         <property name="angle">0</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">False</property>
+       </packing>
       </child>
 
       <child>
diff --git a/demo/glade/mantener_prestaciones.glade b/demo/glade/mantener_prestaciones.glade
new file mode 100644 (file)
index 0000000..14bad9b
--- /dev/null
@@ -0,0 +1,403 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="mantener_prestaciones">
+  <property name="width_request">450</property>
+  <property name="height_request">500</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Mantener Prestaciones</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area1">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="cerrar">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-close</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">-7</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkVBox" id="vbox2">
+         <property name="visible">True</property>
+         <property name="homogeneous">False</property>
+         <property name="spacing">0</property>
+
+         <child>
+           <widget class="GtkFrame" id="frame4">
+             <property name="border_width">12</property>
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment5">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">1</property>
+                 <property name="yscale">1</property>
+                 <property name="top_padding">0</property>
+                 <property name="bottom_padding">0</property>
+                 <property name="left_padding">12</property>
+                 <property name="right_padding">0</property>
+
+                 <child>
+                   <widget class="GtkVBox" id="vbox4">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">8</property>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox2">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">8</property>
+
+                         <child>
+                           <widget class="GtkEntry" id="entry1">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">True</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char">*</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkButton" id="button7">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label">gtk-find</property>
+                             <property name="use_stock">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="button6">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="focus_on_click">True</property>
+                         <signal name="clicked" handler="OnActualizar" last_modification_time="Wed, 06 Jul 2005 07:26:57 GMT"/>
+
+                         <child>
+                           <widget class="GtkAlignment" id="alignment8">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xscale">0</property>
+                             <property name="yscale">0</property>
+                             <property name="top_padding">0</property>
+                             <property name="bottom_padding">0</property>
+                             <property name="left_padding">0</property>
+                             <property name="right_padding">0</property>
+
+                             <child>
+                               <widget class="GtkHBox" id="hbox1">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">2</property>
+
+                                 <child>
+                                   <widget class="GtkImage" id="image1">
+                                     <property name="visible">True</property>
+                                     <property name="stock">gtk-execute</property>
+                                     <property name="icon_size">4</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkLabel" id="label15">
+                                     <property name="visible">True</property>
+                                     <property name="label" translatable="yes">Actualizar Prestaciones</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="use_markup">False</property>
+                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                     <property name="wrap">False</property>
+                                     <property name="selectable">False</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                                     <property name="width_chars">-1</property>
+                                     <property name="single_line_mode">False</property>
+                                     <property name="angle">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label1">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Origen de los datos&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">False</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkFrame" id="frame6">
+             <property name="border_width">12</property>
+             <property name="visible">True</property>
+             <property name="label_xalign">0</property>
+             <property name="label_yalign">0.5</property>
+             <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+             <child>
+               <widget class="GtkAlignment" id="alignment7">
+                 <property name="visible">True</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">1</property>
+                 <property name="yscale">1</property>
+                 <property name="top_padding">0</property>
+                 <property name="bottom_padding">0</property>
+                 <property name="left_padding">12</property>
+                 <property name="right_padding">0</property>
+
+                 <child>
+                   <widget class="GtkVBox" id="vbox5">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">8</property>
+
+                     <child>
+                       <widget class="GtkProgressBar" id="progreso">
+                         <property name="visible">True</property>
+                         <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+                         <property name="fraction">0</property>
+                         <property name="pulse_step">0.10000000149</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkExpander" id="expander1">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="expanded">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                             <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                             <property name="shadow_type">GTK_SHADOW_IN</property>
+                             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                             <child>
+                               <widget class="GtkTextView" id="detalles">
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="editable">True</property>
+                                 <property name="overwrite">False</property>
+                                 <property name="accepts_tab">True</property>
+                                 <property name="justification">GTK_JUSTIFY_LEFT</property>
+                                 <property name="wrap_mode">GTK_WRAP_NONE</property>
+                                 <property name="cursor_visible">True</property>
+                                 <property name="pixels_above_lines">0</property>
+                                 <property name="pixels_below_lines">0</property>
+                                 <property name="pixels_inside_wrap">0</property>
+                                 <property name="left_margin">0</property>
+                                 <property name="right_margin">0</property>
+                                 <property name="indent">0</property>
+                                 <property name="text" translatable="yes">
+</property>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label14">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Ver detalles del progreso</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
+                           </widget>
+                           <packing>
+                             <property name="type">label_item</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label13">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Progreso&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="type">label_item</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
index c535d851ac9cdb8e018807387be43108fe9e9931..eefd34d6b4f0b33b87a23bb2eb513235a26be060 100644 (file)
@@ -125,13 +125,18 @@ public class App
                v.Run ();
        }
 
-
        public void OnMantenerPlanes (object o, EventArgs args)
        {
                VMantenerPlanes v = new VMantenerPlanes ();
                v.Run ();
        }
 
+       public void OnMantenerPrestaciones (object o, EventArgs args)
+       {
+               VMantenerPrestaciones v = new VMantenerPrestaciones ();
+               v.Run ();
+       }
+
        public void OnMantenerPrestadores (object o, EventArgs args)
        {
                VMantenerPrestadores v = new VMantenerPrestadores ();
diff --git a/demo/src/Vistas/MantenerPrestaciones.cs b/demo/src/Vistas/MantenerPrestaciones.cs
new file mode 100644 (file)
index 0000000..a01d462
--- /dev/null
@@ -0,0 +1,47 @@
+
+using System;
+using System.Collections;
+using Gtk;
+using Glade;
+
+using Controlador.Afiliacion;
+using Dominio.Afiliados;
+using Dominio.Autorizaciones;
+using Dominio.Planes;
+using Dominio;
+
+public class VMantenerPrestaciones
+{
+       Glade.XML xml;
+
+       [Widget] TextView detalles;
+       [Widget] Entry file;
+       [Widget] ProgressBar progreso;
+
+       public VMantenerPrestaciones ()
+       {
+               xml = new Glade.XML (null, "mantener_prestaciones.glade", "mantener_prestaciones", null);
+               xml.Autoconnect (this);
+       }
+
+       public void OnActualizar (object o, EventArgs args)
+       {
+               TextBuffer buffer = detalles.Buffer;
+               buffer.Clear ();
+               for (int i=1; i < 10000; i++) {
+                       progreso.Fraction = i/10000.0f;
+                       buffer.InsertAtCursor (String.Format ("Agregando {0} de {1}\n", i, 10000));
+                       detalles.ScrollToIter (buffer.EndIter, 0.0f, false, 0.0f, 0.0f);
+                       while (Gtk.Global.EventsPending)
+                               Main.IterationDo (false);
+               }
+       }
+
+       public void Run ()
+       {
+               Dialog w = (Dialog)xml.GetWidget ("mantener_prestaciones");
+               w.Run ();
+               w.Destroy ();
+       }
+}
+