internal ProjectionMismatchEventArgs(_DMapEvents_ProjectionMismatchEvent args) { _args = args; if (args == null) { throw new NullReferenceException("Internal reference is null."); } }
void axMap1_ProjectionMismatch(object sender, _DMapEvents_ProjectionMismatchEvent e) { var sf = axMap1.get_Shapefile(e.layerHandle); if (sf != null) { e.reproject = tkMwBoolean.blnTrue; e.cancelAdding = tkMwBoolean.blnFalse; } else { string filename = axMap1.get_LayerFilename(e.layerHandle); MessageHelper.Info("Layer projection doesn't match the projection of the map: " + filename); } }
/// <summary> /// reprojects a mismatched layer to the map's projection /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnProjectionMismatch(object sender, _DMapEvents_ProjectionMismatchEvent e) { e.reproject = tkMwBoolean.blnTrue; }
private void MapProjectionMismatch(object sender, _DMapEvents_ProjectionMismatchEvent e) { Invoke(sender, ProjectionMismatch, new ProjectionMismatchEventArgs(e)); }