Created
June 8, 2014 22:47
-
-
Save Fhernd/ef00a9c10401799e26ba to your computer and use it in GitHub Desktop.
Representa el control de la urna.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ===++=== | |
// | |
// OrtizOL | |
// | |
// ===--=== | |
/*============================================================ | |
// | |
// Clase: ControlUrna.cs | |
// | |
// Original en: http://goo.gl/Kedk0t | |
// | |
// Propósito: Componer controles para la urna. | |
// | |
============================================================*/ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Drawing; | |
using System.Data; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using N1_EleccionesCupi2.Modelo; | |
namespace N1_EleccionesCupi2.GUI | |
{ | |
/// <summary> | |
/// Control para mostrar datos generales de la urna. | |
/// </summary> | |
public partial class ControlUrna : UserControl | |
{ | |
#region Constructores | |
/// <summary> | |
/// Crea una instancia de `ControlUrna`. | |
/// </summary> | |
public ControlUrna() | |
{ | |
InitializeComponent(); | |
} | |
#endregion | |
#region Métodos | |
/// <summary> | |
/// Actualiza la urna con datos específicos. | |
/// </summary> | |
/// <param name="urna">Objeto `Urna` con los datos para la actualización.</param> | |
public void Actualizar(Urna urna) | |
{ | |
lblTotalVotos.Text = String.Format("Total Votos: {0}", urna.CalcularTotalVotos()); | |
lblCostoPromedioCampania.Text = String.Format("Costo Promedio Campaña: {0}", urna.CalcularCostoPromedioCampania().ToString("C2")); | |
} | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment