Guest User

Untitled

a guest
Nov 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. private void picImage_MouseMove(object sender, MouseEventArgs e)
  2. {
  3. Point p = picImage.PointToClient(Cursor.Position);
  4. Int32 coord = (e.Y + picImage.Padding.Top) * this.picWidth + e.X + picImage.Padding.Left;
  5. if (e.X < 0 || e.Y < 0 || coord > this.continentGuide.Length)
  6. return;
  7. Int32 continent = this.continentGuide[coord];
  8. if (continent == previousContinent)
  9. return;
  10. previousContinent = continent;
  11. if(this.continents.Length >= continent)
  12. return;
  13. this.lblContinent.Text = this.continents[continent];
  14. this.picImage.Image = GetHighlightPic(continent);
  15. }
Add Comment
Please, Sign In to add comment