コード例 #1
0
ファイル: LegendViewManager.cs プロジェクト: gabilic/Oplan
        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();
        }
コード例 #2
0
ファイル: Legend.cs プロジェクト: gabilic/Oplan
        public Legend(SourceMap sourceMap, MashupParseContext context, DirtyEvent parentEvent, DirtyEvent parentBoundsChangedEvent)
        {
            this._sourceMap          = sourceMap;
            this.dirtyEvent          = new DirtyEvent(parentEvent);
            this._latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, parentBoundsChangedEvent);
            this._displayName        = context.GetRequiredAttribute("DisplayName");
            string attribute = context.reader.GetAttribute("RenderedSize");

            if (attribute != null)
            {
                Legend.renderedSizeRange.Parse(context, "RenderedSize", attribute);
            }
            XMLTagReader xMLTagReader = context.NewTagReader(Legend.GetXMLTag());

            context.ExpectIdentity(this);
            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs(RenderRegion.GetXMLTag()))
                {
                    context.AssertUnique(this._latentRegionHolder.renderRegion);
                    this._latentRegionHolder.renderRegion = new RenderRegion(context, this.dirtyEvent, ContinuousCoordinateSystem.theInstance);
                }
                else
                {
                    if (xMLTagReader.TagIs(LegendView.GetXMLTag()))
                    {
                        this._lastView = new LegendView(this, context);
                    }
                }
            }
        }
コード例 #3
0
ファイル: LegendView.cs プロジェクト: fr830/Greatmaps-1
 public void WriteXML(MashupWriteContext wc)
 {
     wc.writer.WriteStartElement(LegendView.GetXMLTag());
     wc.writer.WriteAttributeString(LegendView.previewAttr, this._showingPreview.ToString(CultureInfo.InvariantCulture));
     wc.writer.WriteStartElement(LegendView.sourceMapViewTag);
     this.sourceMapView.WriteXML(wc.writer);
     wc.writer.WriteEndElement();
     wc.writer.WriteStartElement(LegendView.referenceMapViewTag);
     this.referenceMapView.WriteXML(wc.writer);
     wc.writer.WriteEndElement();
     wc.writer.WriteEndElement();
 }
コード例 #4
0
ファイル: LegendView.cs プロジェクト: fr830/Greatmaps-1
        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);
        }
コード例 #5
0
ファイル: Legend.cs プロジェクト: gabilic/Oplan
        public void NotePositionUnlocked(LatLonZoom sourceMapPosition, MapPosition referenceMapPosition)
        {
            bool showingPreview = false;

            this._lastView = new LegendView(this, showingPreview, sourceMapPosition, referenceMapPosition);
        }
コード例 #6
0
ファイル: Legend.cs プロジェクト: mikhp/greatmaps
		public Legend(SourceMap sourceMap, MashupParseContext context, DirtyEvent parentEvent, DirtyEvent parentBoundsChangedEvent)
		{
			this._sourceMap = sourceMap;
			this.dirtyEvent = new DirtyEvent(parentEvent);
			this._latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, parentBoundsChangedEvent);
			this._displayName = context.GetRequiredAttribute("DisplayName");
			string attribute = context.reader.GetAttribute("RenderedSize");
			if (attribute != null)
			{
				Legend.renderedSizeRange.Parse(context, "RenderedSize", attribute);
			}
			XMLTagReader xMLTagReader = context.NewTagReader(Legend.GetXMLTag());
			context.ExpectIdentity(this);
			while (xMLTagReader.FindNextStartTag())
			{
				if (xMLTagReader.TagIs(RenderRegion.GetXMLTag()))
				{
					context.AssertUnique(this._latentRegionHolder.renderRegion);
					this._latentRegionHolder.renderRegion = new RenderRegion(context, this.dirtyEvent, ContinuousCoordinateSystem.theInstance);
				}
				else
				{
					if (xMLTagReader.TagIs(LegendView.GetXMLTag()))
					{
						this._lastView = new LegendView(this, context);
					}
				}
			}
		}
コード例 #7
0
ファイル: Legend.cs プロジェクト: mikhp/greatmaps
		public void NotePositionUnlocked(LatLonZoom sourceMapPosition, MapPosition referenceMapPosition)
		{
			bool showingPreview = false;
			this._lastView = new LegendView(this, showingPreview, sourceMapPosition, referenceMapPosition);
		}