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(); }