public void Activate() { UIPositionManager uIPositionManager = this.viewControl.GetUIPositionManager(); bool flag = false; if (this.legend.GetLastView() != null) { LegendView lastView = this.legend.GetLastView(); if (lastView.showingPreview) { throw new Exception("unimpl"); } this.SetupNonpreviewView(); uIPositionManager.GetSMPos().setPosition(lastView.GetSourceMapView()); uIPositionManager.GetVEPos().setPosition(lastView.GetReferenceMapView()); flag = true; this.viewControl.SetVEMapStyle(lastView.GetReferenceMapView().style); } if (!flag) { this.SetupNonpreviewView(); uIPositionManager.GetSMPos().setPosition(new ContinuousCoordinateSystem().GetDefaultView()); uIPositionManager.GetVEPos().setPosition(this.DefaultReferenceMapPosition()); } uIPositionManager.SetPositionMemory(this.legend); this.viewControl.SetOptionsPanelVisibility(OptionsPanelVisibility.LegendOptions); this.viewControl.GetLegendPanel().Configure(this.legend, this.mapTileSourceFactory.CreateDisplayableUnwarpedSource(this.sourceMap)); uIPositionManager.PositionUpdated(); }