private void cargar_imagenes( ImageSet listaPVA ) { var ej1 = new[] { listaPVA[0], listaPVA[1], listaPVA[2] }; ejemplos[0] = new Test_Ejemplo_PVA( ej1, new[] { 2, 0, 1 } ); var ej2 = new[] { listaPVA[3], listaPVA[4], listaPVA[5] }; ejemplos[1] = new Test_Ejemplo_PVA( ej2, new[] { 1, 0, 2 } ); var ej3 = new[] { listaPVA[6], listaPVA[7], listaPVA[8] }; ejemplos[2] = new Test_Ejemplo_PVA( ej3, new[] { 2, 1, 0 } ); }
private void St_ej() { this.EnCurso = true; ronda = -1; int W = this.control.Width; int H = this.control.Height; int a_f = W / 4; int a_c = 3 * W / 16; int b_f = H / 5; Graphics g = control.CreateGraphics(); for ( int i = 0; i < 3; i++ ) { actual_ej = ejemplos[i]; ejemplificando = true; for ( int k = 0; k < 3; k++ ) { g.DrawImage( actual_ej.matriz[k], W / 8, 2 * H / 5, a_f, b_f ); g.FillRectangle( new SolidBrush( Colores[actual_ej.color[k]] ), 5 * W / 8, 2 * H / 5, W / 4, H / 5 ); Thread.Sleep( 6000 ); g.Clear( Color.DimGray ); } ejemplificando = false; for ( int k = 0; k < 3; k++ ) { ronda++; g.DrawImage( actual_ej.matriz[k], W / 8, 2 * H / 5, a_f, b_f ); g.FillRectangle( new SolidBrush( Colores[0] ), 3 * W / 4, H / 10, a_c, H / 5 ); g.FillRectangle( new SolidBrush( Colores[1] ), 3 * W / 4, 4 * H / 10, a_c, H / 5 ); g.FillRectangle( new SolidBrush( Colores[2] ), 3 * W / 4, 7 * H / 10, a_c, H / 5 ); Thread.Sleep( 6000 ); g.Clear( Color.DimGray ); } Thread.Sleep( 1000 ); ronda = -1; } this.EnCurso = false; }