public void WriteXML(MashupWriteContext wc) { wc.writer.WriteStartElement(RenderClip.GetXMLTag()); if (this._rect != null) { this._rect.WriteXML(wc.writer); } wc.writer.WriteEndElement(); }
public RenderClip(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(RenderClip.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(MapRectangle.GetXMLTag())) { context.AssertUnique(this._rect); this._rect = new MapRectangle(context, MercatorCoordinateSystem.theInstance); } } }
public Layer(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("Layer"); context.ExpectIdentity(this); string attribute = context.reader.GetAttribute("DisplayName"); if (attribute != null) { this._displayName = attribute; context.GetAttributeBoolean("Expanded", ref this._expanded); string attribute2 = context.reader.GetAttribute("SimulateTransparencyWithVEBackingLayer"); if (attribute2 != null) { this._simulateTransparencyWithVEBackingLayer = attribute2; } while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourceMap.GetXMLTag())) { this.Add(new SourceMap(context, filenameContextDelegate, this.dirtyEvent, parentReadyToLockEvent)); } else { if (xMLTagReader.TagIs(LayerView.GetXMLTag())) { this._lastView = new LayerView(this, context); } else { if (xMLTagReader.TagIs("LastLayerViewPosition")) { XMLTagReader xMLTagReader2 = context.NewTagReader("LastLayerViewPosition"); MapPosition mapPosition = null; while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } if (mapPosition != null) { this._lastView = new LayerView(this, mapPosition); } } else { if (xMLTagReader.TagIs(RenderClip.GetXMLTag())) { this._renderClip = new RenderClip(context); } } } } } return; } throw new InvalidMashupFile(context, "Expected displayName attribute"); }
public Layer(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("Layer"); context.ExpectIdentity(this); string attribute = context.reader.GetAttribute("DisplayName"); if (attribute != null) { _displayName = attribute; context.GetAttributeBoolean("Expanded", ref _expanded); string attribute2 = context.reader.GetAttribute("SimulateTransparencyWithVEBackingLayer"); if (attribute2 != null) { _simulateTransparencyWithVEBackingLayer = attribute2; } while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourceMap.GetXMLTag())) { Add(new SourceMap(context, filenameContextDelegate, dirtyEvent, parentReadyToLockEvent)); } else { if (xMLTagReader.TagIs(LayerView.GetXMLTag())) { _lastView = new LayerView(this, context); } else { if (xMLTagReader.TagIs("LastLayerViewPosition")) { XMLTagReader xMLTagReader2 = context.NewTagReader("LastLayerViewPosition"); MapPosition mapPosition = null; while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } if (mapPosition != null) { _lastView = new LayerView(this, mapPosition); } } else { if (xMLTagReader.TagIs(RenderClip.GetXMLTag())) { _renderClip = new RenderClip(context); } } } } } return; } throw new InvalidMashupFile(context, "Expected displayName attribute"); }