Example #1
0
 //internal void Render()
 //{
 //    mapView.Render(Graphics.FromImage(pictureBox.Image), pictureBox.ClientRectangle);
 //    pictureBox.Invalidate();
 //}
 private void pictureBox_MouseClick(object sender, MouseEventArgs e)
 {
     var location = mapView.GetMouseMapLocation(e.Location);
     if (location != null && LocationSelected != null)
     {
         var eventArgs = new LocationSelectedEventArgs { Location = location };
         LocationSelected(this, eventArgs);
     }
 }
Example #2
0
 private void mapControl_LocationSelected(object sender, LocationSelectedEventArgs e)
 {
     var terrainType = terrainPallet.SelectedTerrainType;
     if (e.Location.TerrainType != terrainType)
     {
         e.Location.TerrainType = terrainType;
         mapControl.RefreshLocation(e.Location);
         IsChanged = true;
     }
 }