Example #1
0
        public FrmSenadores()
        {
            InitializeComponent();
            // Instancio el Diccionario de Senadores y sus votos
            this.participantes = new Dictionary <string, Votacion.EVoto>();

            // Creo las Bancas y sus Senadores
            this.graficos = new List <PictureBox>();
            int x = 20;
            int y = 20;

            for (int i = 1; i <= 72; i++)
            {
                this.participantes.Add(i.ToString(), Votacion.EVoto.Esperando);
                PictureBox p = new PictureBox();
                p.BackColor = Color.White;
                p.Size      = new Size(20, 20);
                p.Location  = new Point(x, y);
                x          += 25;
                if (x > 595)
                {
                    x  = 20;
                    y += 25;
                }

                this.gpbSenado.Controls.Add(p);
                this.graficos.Add(p);

                this.xml = new XmlSerializar <Votacion>();
                this.dao = new Dao <Votacion>();
            }
        }
Example #2
0
        public void XmlGuardarTest()
        {
            //Arrange
            Votacion votacion            = new Votacion();
            XmlSerializar <Votacion> xml = new XmlSerializar <Votacion>();

            //Act
            xml.Guardar("\\testVotacion.xml", votacion);

            //Assert
        }