Ejemplo n.º 1
0
        public static void AsyncMove(Figure hostFigure, Point coordinates, Figure [] figures)
        {
            MovingHelper mH = new MovingHelper {
                Figures = figures, Coordinate = coordinates, HostFigure = hostFigure
            };
            Thread t = new Thread(mH.Move);

            t.Start();
        }
Ejemplo n.º 2
0
 private void pbFigures_Paint(object sender, PaintEventArgs e)
 {
     pbMaxCoordinate = new Point(pbFigures.Right, pbFigures.Bottom);//
     Figure[] currentFigures = (from f in figures select f).ToArray();
     if (figures.Count > 0)
     {
         foreach (var f in figures)
         {
             MovingHelper.AsyncMove(f, pbMaxCoordinate, currentFigures);
             f.Draw(e.Graphics);
         }
     }
 }