コード例 #1
0
 public void Resize()
 {
     foreach (Token t in Fila)
     {
         GToken tt = (GToken)t;
         tt.Label.Location = GTablero.calculatePosition(tt.Posicion, panel);
     }
 }
コード例 #2
0
 public void Reset()
 {
     foreach (Token t in Fila)
     {
         t.Posicion = 1;
         GToken tt = (GToken)t;
         tt.Label.Location = GTablero.calculatePosition(1, panel);
     }
     Ganador = null;
 }
コード例 #3
0
        public static void Animate(Point current, int casillaDestino, Form1 form, Panel panel)
        {
            Point destination = GTablero.calculatePosition(casillaDestino, panel);

            instance        = form;
            distanceX       = destination.X - current.X;
            distanceY       = destination.Y - current.Y;
            stepX           = distanceX / 100;
            stepY           = distanceY / 100;
            currentX        = current.X;
            currentY        = current.Y;
            destinationX    = destination.X;
            destinationY    = destination.Y;
            aTimer.Elapsed += new ElapsedEventHandler(Animation);
            aTimer.Interval = 40;
            aTimer.Enabled  = true;
        }