public void Activate() { UIPositionManager uIPositionManager = viewControl.GetUIPositionManager(); bool flag = false; if (legend.GetLastView() != null) { LegendView lastView = legend.GetLastView(); if (lastView.showingPreview) { throw new Exception("unimpl"); } SetupNonpreviewView(); uIPositionManager.GetSMPos().setPosition(lastView.GetSourceMapView()); uIPositionManager.GetVEPos().setPosition(lastView.GetReferenceMapView()); flag = true; viewControl.SetVEMapStyle(lastView.GetReferenceMapView().style); } if (!flag) { SetupNonpreviewView(); uIPositionManager.GetSMPos().setPosition(new ContinuousCoordinateSystem().GetDefaultView()); uIPositionManager.GetVEPos().setPosition(DefaultReferenceMapPosition()); } uIPositionManager.SetPositionMemory(legend); viewControl.SetOptionsPanelVisibility(OptionsPanelVisibility.LegendOptions); viewControl.GetLegendPanel().Configure(legend, mapTileSourceFactory.CreateDisplayableUnwarpedSource(sourceMap)); uIPositionManager.PositionUpdated(); }
private void SetupUnlockedView() { viewControl.GetSMViewerControl().ClearLayers(); viewControl.GetSMViewerControl() .SetBaseLayer(mapTileSourceFactory.CreateDisplayableUnwarpedSource(sourceMap)); viewControl.GetSMViewerControl().SetLatentRegionHolder(sourceMap.latentRegionHolder); viewControl.GetUIPositionManager().switchFree(); viewControl.setDisplayedRegistration(new RegistrationControlRecord(sourceMap.registration, sourceMap)); mapsLocked = false; }
//[CompilerGenerated] //private static Comparison<ThumbnailRecord> <>9__CachedAnonymousMethodDelegate1; public SourceMapRecord(Layer layer, SourceMap sourceMap, MapTileSourceFactory mapTileSourceFactory) { this.displayName = sourceMap.displayName; this.sourceMapInfo = sourceMap.sourceMapInfo; this.userBoundingRect = sourceMap.GetUserBoundingBox(mapTileSourceFactory); this.maxZoom = sourceMap.sourceMapRenderOptions.maxZoom; try { this.imageTransformer = sourceMap.registration.warpStyle.getImageTransformer(sourceMap.registration, InterpolationMode.Invalid); } catch (Exception) { } foreach (Legend current in sourceMap.legendList) { this.legendRecords.Add(new LegendRecord("legends", sourceMap.GetLegendFilename(current), current.displayName, current.GetOutputSizeSynchronously(mapTileSourceFactory.CreateDisplayableUnwarpedSource(sourceMap).GetUserBounds(current.latentRegionHolder, FutureFeatures.Cached)))); } this.sourceMapLegendFrame = new SourceMapLegendFrame(layer, sourceMap, this.legendRecords, new SourceMapLegendFrame.ThumbnailDelegate(this.thumbnailForLegendFrame)); }