Exemplo n.º 1
0
 public void reseteo()
 {
     posicion[1, 0] = new metodos(false, 402, 45,"");
     posicion[1, 1] = new metodos(false, 402, 146,"");
     posicion[1, 2] = new metodos(false, 402, 232,"");
     posicion[1, 3] = new metodos(false, 402, 326,"");
     posicion[1, 4] = new metodos(false, 402, 422,"");
     posicion[1, 5] = new metodos(false, 402, 510,"");
     posicion[1, 6] = new metodos(false, 402, 607,"");
     posicion[1, 7] = new metodos(false, 402, 695,"");
     posicion[0, 0] = new metodos(true, 310, 45,"");
     posicion[0, 1] = new metodos(true, 310, 146,"");
     posicion[0, 2] = new metodos(true, 310, 232,"");
     posicion[0, 3] = new metodos(true, 310, 326,"");
     posicion[0, 4] = new metodos(true, 310, 422,"");
     posicion[0, 5] = new metodos(true, 310, 510,"");
     posicion[0, 6] = new metodos(true, 310, 607,"");
     posicion[0, 7] = new metodos(true, 310, 695,"");
 }
Exemplo n.º 2
0
        public void encuentra(double x, double y)
        {
            string temp = "";
            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 8; j++)
                {

                    if (x == posicion[i, j].altura && y == posicion[i, j].anchura)
                    {
                        temp = posicion[i, j].nombre;
                        posicion[i, j] = new metodos(!posicion[i, j].disponible, posicion[i, j].altura, posicion[i, j].anchura, "");
                   
                    }
                }
            }
            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    if (posicion[i, j].disponible == true && posicion[i, j].altura != x)
                    {
                       
                 
                        posicion[i, j] = new metodos(!posicion[i, j].disponible, posicion[i, j].altura, posicion[i, j].anchura, temp);
             
                        Canvas.SetTop(source, posicion[i, j].altura);
                        Canvas.SetLeft(source, posicion[i, j].anchura);
                     
                            
                        break;
                    }
                }

            }
          
verificapalabra();
        }
Exemplo n.º 3
0
        public void botones()
        {
             c = 0;
            if (c<imagen.Length)
            {
                bt1.Content = letra();
                hasvisible(bt1);
                hasvisible(lb1);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt1.Content.ToString());
                     
                c++;
            }
            if (c < imagen.Length)
            {
                bt2.Content = letra();
                hasvisible(bt2);
                hasvisible(lb2);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt2.Content.ToString());
                c++;
            }
            if (c < imagen.Length)
            {
                bt3.Content = letra();
                 hasvisible(bt3);
                 hasvisible(lb3);
                 posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt3.Content.ToString());
                c++;
            }
            if (c < imagen.Length)
            {
                bt4.Content = letra();
                hasvisible(bt4);
                hasvisible(lb4);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt4.Content.ToString());
                c++;
            }
            if (c < imagen.Length)
            {
                bt5.Content = letra(); 
                hasvisible(bt5);
                hasvisible(lb5);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt5.Content.ToString());
                c++;
               
            }
            if (c < imagen.Length)
            {
                bt6.Content = letra();
                hasvisible(bt6);
                hasvisible(lb6);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt6.Content.ToString());
                c++;
            }
            if (c < imagen.Length)
            {
                bt7.Content = letra();
                hasvisible(bt7);
                hasvisible(lb7);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura, bt7.Content.ToString());
                c++;
            }
            if (c < imagen.Length)
            {
                bt8.Content = letra();

                hasvisible(bt8);
                hasvisible(lb8);
                posicion[1, c] = new metodos(posicion[1, c].disponible, posicion[1, c].altura, posicion[1, c].anchura,bt8.Content.ToString());
                c++;
            }
        }