void mouseDownSeccion(object sender, MouseEventArgs e) { activeSeccion = sender as BotonSeccion; activeSeccion.BringToFront(); previousLocation = e.Location; Cursor = Cursors.Hand; }
void mouseUpSeccion(object sender, MouseEventArgs e) { activeSeccion = sender as BotonSeccion; if (activeSeccion.Seccion != null || !checkEditar.Checked) //activeSeccion.Seccion.PosX = activeSeccion.Location.X/zoom; //activeSeccion.Seccion.PosY = activeSeccion.Location.Y/zoom; { Point punto = getOriginalPosition(originalImage, zoomedImage, activeSeccion.Location); activeSeccion.Seccion.PosX = punto.X; activeSeccion.Seccion.PosY = punto.Y; DAO.Seccion.cambiarLocation(activeSeccion.Seccion); activeSeccion.BringToFront(); activeSeccion = null; Cursor = Cursors.Default; } }