Example #1
0
		public LegendView(Legend legend, bool showingPreview, LatLonZoom sourceMapView, MapPosition referenceMapView)
		{
			this._legend = legend;
			this._showingPreview = showingPreview;
			this.sourceMapView = sourceMapView;
			this.referenceMapView = referenceMapView;
		}
Example #2
0
		public void Dispose()
		{
			this.viewControl.GetCachePackage().ClearSchedulers();
			UIPositionManager uIPositionManager = this.viewControl.GetUIPositionManager();
			uIPositionManager.SetPositionMemory(null);
			uIPositionManager.GetSMPos().setPosition(new LatLonZoom(0.0, 0.0, 0));
			uIPositionManager.switchFree();
			this.viewControl.GetSMViewerControl().ClearLayers();
			this.viewControl.SetOptionsPanelVisibility(OptionsPanelVisibility.Nothing);
			this.viewControl.GetLegendPanel().Configure(null, null);
			this.viewControl.setDisplayedRegistration(null);
			this.legend = null;
		}
Example #3
0
		internal Legend AddNewLegend()
		{
			Legend legend = new Legend(this._sourceMap, this.dirtyEvent, this.parentBoundsChangedEvent);
			string displayName = legend.displayName;
			int num = 1;
			List<string> list = this.list.ConvertAll<string>((Legend l) => l.displayName);
			while (list.Contains(legend.displayName))
			{
				num++;
				legend.displayName = string.Format("{0} {1}", displayName, num);
			}
			this.list.Add(legend);
			this.dirtyEvent.SetDirty();
			return legend;
		}
Example #4
0
		public LegendView(Legend legend, MashupParseContext context)
		{
			this._legend = legend;
			object obj = null;
			XMLTagReader xMLTagReader = context.NewTagReader(LegendView.GetXMLTag());
			this._showingPreview = context.GetRequiredAttributeBoolean(LegendView.previewAttr);
			while (xMLTagReader.FindNextStartTag())
			{
				if (xMLTagReader.TagIs(LegendView.sourceMapViewTag))
				{
					XMLTagReader xMLTagReader2 = context.NewTagReader(LegendView.sourceMapViewTag);
					while (xMLTagReader2.FindNextStartTag())
					{
						if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag()))
						{
							this.sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance);
							context.AssertUnique(obj);
							obj = new object();
						}
					}
				}
				else
				{
					if (xMLTagReader.TagIs(LegendView.referenceMapViewTag))
					{
						context.AssertUnique(this.referenceMapView);
						XMLTagReader xMLTagReader3 = context.NewTagReader(LegendView.referenceMapViewTag);
						while (xMLTagReader3.FindNextStartTag())
						{
							if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version)))
							{
								this.referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance);
							}
						}
					}
				}
			}
			context.AssertPresent(obj, LegendView.sourceMapViewTag);
			context.AssertPresent(this.referenceMapView, LegendView.referenceMapViewTag);
		}
Example #5
0
 public void OpenLegend(Legend legend)
 {
     this.OpenView(new LegendViewManager(legend, this.mapTileSourceFactory, this));
     this.currentMashup.SetLastView(legend.lastView);
 }
Example #6
0
 public string GetLegendFilename(Legend legend)
 {
     return RenderState.ForceValidFilename(string.Format("{0}_{1}.png", this.GetDisplayName(), legend.displayName));
 }
Example #7
0
		public LegendViewManager(Legend legend, MapTileSourceFactory mapTileSourceFactory, ViewControlIfc viewControl)
		{
			this.legend = legend;
			this.mapTileSourceFactory = mapTileSourceFactory;
			this.viewControl = viewControl;
		}
		public void Configure(Legend legend, IDisplayableSource displayableSource)
		{
			Monitor.Enter(this);
			try
			{
				if (this.previewInterest != null)
				{
					this.previewInterest.Dispose();
					this.previewInterest = null;
					this.waitingForCI = null;
				}
			}
			finally
			{
				Monitor.Exit(this);
			}
			if (this._legend == legend)
			{
				return;
			}
			if (this._legend != null)
			{
				this._legend.dirtyEvent.Remove(new DirtyListener(this.LegendChanged));
			}
			this._legend = legend;
			this.displayableSource = displayableSource;
			if (this._legend != null)
			{
				this._legend.dirtyEvent.Add(new DirtyListener(this.LegendChanged));
				this.LegendChanged();
			}
			base.Enabled = (this._legend != null);
			this.UpdatePreviewImage(null);
			this.UpdatePreviewPanel();
		}
Example #9
0
 public string GetLegendFilename(Legend legend)
 {
     return(RenderState.ForceValidFilename(string.Format("{0}_{1}.png", this.GetDisplayName(), legend.displayName)));
 }
Example #10
0
		public void RemoveLegend(Legend legend)
		{
			this.list.Remove(legend);
			this.dirtyEvent.SetDirty();
		}
Example #11
0
 public LegendViewManager(Legend legend, MapTileSourceFactory mapTileSourceFactory, ViewControlIfc viewControl)
 {
     this.legend = legend;
     this.mapTileSourceFactory = mapTileSourceFactory;
     this.viewControl          = viewControl;
 }