private void Form1_MouseUp(object sender, MouseEventArgs e) { //Console.WriteLine("Maus UP loslassen " + activeFigur); activeFigur = null; activePoint = null; }
private void Form1_MouseDown(object sender, MouseEventArgs e) { foreach (Figur figur in figuren) { if(figur.IsInside(e.X, e.Y)) { activeFigur = figur; activePoint = new Punkt(e.X, e.Y); Console.WriteLine(figur); } } if (activeFigur != null) { figuren.Remove(activeFigur); figuren.Add(activeFigur); //Invalidate(); //figuren.Reverse(); } }