Beispiel #1
0
        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            Pen myPen = new Pen(Color.Black);

            float[] dashValues = { 10, 10 };
            myPen.DashPattern = dashValues;
            e.Graphics.DrawLine(myPen, 0, 70, 700, 70);

            //Changes position of tortoise graphic
            Point pTort;

            pTort   = new Point();
            pTort.X = T.GetiPosition() * 10 + 12;
            pTort.Y = 85;
            picbox_Tortoise.Location = pTort;

            //Changes position of hare graphic
            Point pHare;

            pHare   = new Point();
            pHare.X = H.GetiPosition() * 10 + 12;
            pHare.Y = 49;
            picbox_Hare.Location = pHare;

            //H.Draw(e.Graphics);
            //T.Draw(e.Graphics);
        }