Advertisement
Fhernd

ControlExtension.cs

Sep 18th, 2014
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.08 KB | None | 0 0
  1. // ===++===
  2. //
  3. //    OrtizOL
  4. //
  5. // ===--===
  6. /*============================================================
  7. //
  8. // Clase: ControlExtension.cs
  9. //
  10. // Original en: http://goo.gl/NwjBRQ
  11. //
  12. // Propósito: Diseñar el control con los botones de
  13. // extensión.
  14. //
  15. ============================================================*/
  16.  
  17. using System;
  18. using System.Collections.Generic;
  19. using System.ComponentModel;
  20. using System.Drawing;
  21. using System.Data;
  22. using System.Linq;
  23. using System.Text;
  24. using System.Threading.Tasks;
  25. using System.Windows.Forms;
  26.  
  27. namespace N1_Encuesta.GUI
  28. {
  29.     /// <summary>
  30.     /// Control de botonese de extensión.
  31.     /// </summary>
  32.     public partial class ControlExtension : UserControl
  33.     {
  34.         #region Campos (componentes de interfaz)
  35.         /// <summary>
  36.         /// Representa la interfaz principal de la aplicación.
  37.         /// </summary>
  38.         private Principal principal;
  39.         #endregion
  40.  
  41.         #region
  42.         /// <summary>
  43.         /// Crea una instancia con valores por defecto para el control.
  44.         /// </summary>
  45.         /// <param name="principal">Referencia a la interfaz principal de la aplicación.</param>
  46.         public ControlExtension(Principal principal)
  47.         {
  48.             InitializeComponent();
  49.             this.principal = principal;
  50.         }
  51.         #endregion
  52.  
  53.         #region
  54.         /// <summary>
  55.         /// Activa el método de extensión no. 1.
  56.         /// </summary>
  57.         /// <param name="sender">Objeto generador del evento.</param>
  58.         /// <param name="e">Datos del evento.</param>
  59.         private void btnOpcion1_Click(object sender, EventArgs e)
  60.         {
  61.             principal.PuntoExtension1();
  62.         }
  63.         /// <summary>
  64.         /// Activa el método de extensión no. 2.
  65.         /// </summary>
  66.         /// <param name="sender">Objeto generador del evento.</param>
  67.         /// <param name="e">Datos del evento.</param>
  68.         private void btnOpcion2_Click(object sender, EventArgs e)
  69.         {
  70.             principal.PuntoExtension2();
  71.         }
  72.         #endregion
  73.     }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement