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