public Legend(SourceMap sourceMap, DirtyEvent parentEvent, DirtyEvent parentBoundsChangedEvent) { this._sourceMap = sourceMap; this.dirtyEvent = new DirtyEvent(parentEvent); this._latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, parentBoundsChangedEvent); this._displayName = "legend"; }
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); } } } }
public RenderToFileOptions(MashupParseContext context, DirtyEvent parentDirtyEvent, string byTagName) { XMLTagReader xMLTagReader = context.NewTagReader(byTagName); this._outputFolder = new DirtyString(parentDirtyEvent); this.outputFolder = context.GetRequiredAttribute(RenderToFileOptions.OutputFolderAttr); xMLTagReader.SkipAllSubTags(); }
public RenderRegion(MapRectangle rect, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); this.vertexList.Add(rect.GetNW()); this.vertexList.Add(rect.GetSW()); this.vertexList.Add(rect.GetSE()); this.vertexList.Add(rect.GetNE()); }
private void Initialize(DirtyEvent dirty) { this.dirtyEvent = dirty; this._colorList = new List<TransparencyColor>(); this._enabled = true; this._inverted = false; this._useDocumentTransparency = true; this._fadeOptions = new FadeOptions(dirty); }
public PositionAssociation(string associationName, LatLonZoom imagePosition, LatLonZoom sourcePosition, LatLonZoom globalPosition, DirtyEvent dirtyEvent) { this.dirtyEvent = dirtyEvent; this._pinId = -1; this._associationName = associationName; this._imagePosition = new DisplayablePosition(imagePosition); this._sourcePosition = new DisplayablePosition(sourcePosition); this._globalPosition = new DisplayablePosition(globalPosition); }
public RegistrationDefinition(RegistrationDefinition prototype, DirtyEvent dirtyEvent) { this.dirtyEvent = new DirtyEvent(dirtyEvent); if (prototype != null) { this.associationList.AddRange(prototype.associationList); this.isLocked = prototype.isLocked; } this.SetNextPinID(); }
public RenderToS3Options(MashupParseContext context, DirtyEvent parentDirtyEvent) { XMLTagReader xMLTagReader = context.NewTagReader(RenderToS3Options.xmlTag); this._s3credentialsFilename = new DirtyString(parentDirtyEvent); this.s3credentialsFilename = context.GetRequiredAttribute(RenderToS3Options.attr_s3credentialsFilename); this._s3bucket = new DirtyString(parentDirtyEvent); this.s3bucket = context.GetRequiredAttribute(RenderToS3Options.attr_s3bucket); this._s3pathPrefix = new DirtyString(parentDirtyEvent); this.s3pathPrefix = context.GetRequiredAttribute(RenderToS3Options.attr_s3pathPrefix); xMLTagReader.SkipAllSubTags(); }
public LayerList(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = parentDirty; XMLTagReader xMLTagReader = context.NewTagReader("LayerList"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Layer.GetXMLTag())) { this.Add(new Layer(context, filenameContextDelegate, this.dirtyEvent, parentReadyToLockEvent)); } } }
public LegendList(SourceMap sourceMap, MashupParseContext context, DirtyEvent parentEvent) { this._sourceMap = sourceMap; this.dirtyEvent = new DirtyEvent(parentEvent); this.parentBoundsChangedEvent = parentEvent; XMLTagReader xMLTagReader = context.NewTagReader(LegendList.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Legend.GetXMLTag())) { this.list.Add(new Legend(this._sourceMap, context, this.dirtyEvent, this.parentBoundsChangedEvent)); } } }
public SourceMap(IDocumentFuture documentDescriptor, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = new DirtyEvent(parentDirty); this.readyToLockChangedEvent = new DirtyEvent(parentReadyToLockEvent); this._documentFuture = new GeneralDocumentFuture(documentDescriptor); this._displayName = documentDescriptor.GetDefaultDisplayName(); this.filenameContextDelegate = filenameContextDelegate; this._sourceMapInfo = new SourceMapInfo(this.dirtyEvent); this._sourceMapRenderOptions = new SourceMapRenderOptions(this.dirtyEvent); this._transparencyOptions = new TransparencyOptions(this.dirtyEvent); this.registration = new RegistrationDefinition(this.dirtyEvent); this.registration.dirtyEvent.Add(this.readyToLockChangedEvent); this.latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, this.readyToLockChangedEvent); this.legendList = new LegendList(this, this.dirtyEvent, this.readyToLockChangedEvent); this.renderRegion = null; }
public SourceMap(IDocumentFuture documentDescriptor, GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { dirtyEvent = new DirtyEvent(parentDirty); readyToLockChangedEvent = new DirtyEvent(parentReadyToLockEvent); _documentFuture = new GeneralDocumentFuture(documentDescriptor); _displayName = documentDescriptor.GetDefaultDisplayName(); this.filenameContextDelegate = filenameContextDelegate; _sourceMapInfo = new SourceMapInfo(dirtyEvent); _sourceMapRenderOptions = new SourceMapRenderOptions(dirtyEvent); _transparencyOptions = new TransparencyOptions(dirtyEvent); registration = new RegistrationDefinition(dirtyEvent); registration.dirtyEvent.Add(readyToLockChangedEvent); latentRegionHolder = new LatentRegionHolder(dirtyEvent, readyToLockChangedEvent); legendList = new LegendList(this, dirtyEvent, readyToLockChangedEvent); renderRegion = null; }
public PositionAssociation(MashupParseContext context, DirtyEvent dirtyEvent) { this.dirtyEvent = dirtyEvent; XMLTagReader xMLTagReader = context.NewTagReader(PositionAssociation.PositionAssociationTag); this._pinId = -1; context.GetAttributeInt(PositionAssociation.pinIdAttr, ref this._pinId); if ((this.associationName = context.reader.GetAttribute(PositionAssociation.associationNameAttr)) == null) { this.associationName = ""; } while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(PositionAssociation.SourcePositionTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(PositionAssociation.SourcePositionTag); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(DisplayablePosition.GetXMLTag(context.version))) { this._sourcePosition = new DisplayablePosition(context, ContinuousCoordinateSystem.theInstance); this._imagePosition = new DisplayablePosition(this._sourcePosition.pinPosition); } } } else { if (xMLTagReader.TagIs(PositionAssociation.GlobalPositionTag)) { XMLTagReader xMLTagReader3 = context.NewTagReader(PositionAssociation.GlobalPositionTag); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(DisplayablePosition.GetXMLTag(context.version))) { this._globalPosition = new DisplayablePosition(context, MercatorCoordinateSystem.theInstance); } } } } } if (this._sourcePosition == null || this._globalPosition == null) { throw new Exception(string.Format("Pin {0} does not have a source and/or global position defined", this.associationName)); } }
public SourceMapInfo(MashupParseContext context, DirtyEvent parentDirty) { dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("MapFileURL")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { _mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { XMLTagReader xMLTagReader2 = context.NewTagReader("MapFileURL"); _mapFileURL = context.GetRequiredAttribute("url"); xMLTagReader2.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapHomePage")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { _mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { XMLTagReader xMLTagReader3 = context.NewTagReader("MapHomePage"); _mapHomePage = context.GetRequiredAttribute("url"); xMLTagReader3.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapDescription")) { _mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } }
public SourceMapInfo(MashupParseContext context, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader(SourceMapInfo.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("MapFileURL")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { this._mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { XMLTagReader xMLTagReader2 = context.NewTagReader("MapFileURL"); this._mapFileURL = context.GetRequiredAttribute("url"); xMLTagReader2.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapHomePage")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { this._mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { XMLTagReader xMLTagReader3 = context.NewTagReader("MapHomePage"); this._mapHomePage = context.GetRequiredAttribute("url"); xMLTagReader3.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapDescription")) { this._mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } }
public SourceMapRenderOptions(MashupParseContext context, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("SourceMapRenderOptions"); new MercatorCoordinateSystem(); string attribute = context.reader.GetAttribute("MinZoom"); if (attribute != null) { this._minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, "MinZoom", attribute); } else { this._minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().min; } this._maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().ParseAllowUndefinedZoom(context, "MaxZoom", context.reader.GetAttribute("MaxZoom")); if (this._minZoom > this._maxZoom) { throw new InvalidMashupFile(context, string.Format("MinZoom {0} > MaxZoom {1}", this._minZoom, this._maxZoom)); } xMLTagReader.SkipAllSubTags(); }
public FadeOptions(MashupParseContext context, DirtyEvent dirty) { this.dirty = dirty; XMLTagReader xMLTagReader = context.NewTagReader("FadeOptions"); this._fadeBase = FadeOptions.FadeRange.Parse(context, "DefaultValue"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("FadeAtZoom")) { XMLTagReader xMLTagReader2 = context.NewTagReader("FadeAtZoom"); int requiredAttributeInt = context.GetRequiredAttributeInt("ZoomLevel"); double value = FadeOptions.FadeRange.Parse(context, "FadeValue"); if (this._zoomToFadeMap.ContainsKey(requiredAttributeInt)) { throw new InvalidMashupFile(context, string.Format("Fade specified twice for zoom level {0}", requiredAttributeInt)); } this._zoomToFadeMap[requiredAttributeInt] = value; xMLTagReader2.SkipAllSubTags(); } } }
public FadeOptions(MashupParseContext context, DirtyEvent dirty) { this.dirty = dirty; XMLTagReader xMLTagReader = context.NewTagReader("FadeOptions"); this._fadeBase = FadeOptions.FadeRange.Parse(context, "DefaultValue"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("FadeAtZoom")) { XMLTagReader xMLTagReader2 = context.NewTagReader("FadeAtZoom"); int requiredAttributeInt = context.GetRequiredAttributeInt("ZoomLevel"); double value = FadeOptions.FadeRange.Parse(context, "FadeValue"); if (this._zoomToFadeMap.ContainsKey(requiredAttributeInt)) { throw new InvalidMashupFile(context, string.Format("Fade specified twice for zoom level {0}", requiredAttributeInt)); } this._zoomToFadeMap[requiredAttributeInt] = value; xMLTagReader2.SkipAllSubTags(); } } }
public SourceMapRenderOptions(MashupParseContext context, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("SourceMapRenderOptions"); new MercatorCoordinateSystem(); string attribute = context.reader.GetAttribute("MinZoom"); if (attribute != null) { this._minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, "MinZoom", attribute); } else { this._minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().min; } this._maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().ParseAllowUndefinedZoom(context, "MaxZoom", context.reader.GetAttribute("MaxZoom")); if (this._minZoom > this._maxZoom) { throw new InvalidMashupFile(context, string.Format("MinZoom {0} > MaxZoom {1}", this._minZoom, this._maxZoom)); } xMLTagReader.SkipAllSubTags(); }
public TransparencyOptions(MashupParseContext context, DirtyEvent dirty) { this.Initialize(dirty); XMLTagReader xMLTagReader = context.NewTagReader("TransparencyOptions"); this._useDocumentTransparency = true; context.GetAttributeBoolean("UseDocumentTransparency", ref this._useDocumentTransparency); this._enabled = context.GetRequiredAttributeBoolean("Enabled"); this._inverted = context.GetRequiredAttributeBoolean("Inverted"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(TransparencyColor.GetXMLTag())) { this._colorList.Add(new TransparencyColor(context)); } else { if (xMLTagReader.TagIs(FadeOptions.GetXMLTag())) { this._fadeOptions = new FadeOptions(context, dirty); } } } }
public TransparencyOptions(MashupParseContext context, DirtyEvent dirty) { this.Initialize(dirty); XMLTagReader xMLTagReader = context.NewTagReader("TransparencyOptions"); this._useDocumentTransparency = true; context.GetAttributeBoolean("UseDocumentTransparency", ref this._useDocumentTransparency); this._enabled = context.GetRequiredAttributeBoolean("Enabled"); this._inverted = context.GetRequiredAttributeBoolean("Inverted"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(TransparencyColor.GetXMLTag())) { this._colorList.Add(new TransparencyColor(context)); } else { if (xMLTagReader.TagIs(FadeOptions.GetXMLTag())) { this._fadeOptions = new FadeOptions(context, dirty); } } } }
public TransparencyOptions(DirtyEvent dirty) { this.Initialize(dirty); }
public RenderToS3Options(DirtyEvent parentDirtyEvent) { this._s3credentialsFilename = new DirtyString(parentDirtyEvent); this._s3bucket = new DirtyString(parentDirtyEvent); this._s3pathPrefix = new DirtyString(parentDirtyEvent); }
public RegistrationDefinition(MashupParseContext context, DirtyEvent dirtyEvent) { this.dirtyEvent = new DirtyEvent(dirtyEvent); XMLTagReader xMLTagReader = context.NewTagReader(RegistrationDefinition.RegistrationDefinitionTag); this.warpStyle = TransformationStyleFactory.ReadFromXMLAttribute(context); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(PositionAssociation.XMLTag())) { this.AddAssociation(new PositionAssociation(context, dirtyEvent)); } } }
public DirtyEvent(DirtyEvent parentEvent) { this.Add(parentEvent); }
public RegistrationDefinition(DirtyEvent dirtyEvent) { this.dirtyEvent = new DirtyEvent(dirtyEvent); }
public RegistrationDefinition(DirtyEvent dirtyEvent) { this.dirtyEvent = new DirtyEvent(dirtyEvent); }
public SourceMap(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = new DirtyEvent(parentDirty); this.readyToLockChangedEvent = new DirtyEvent(parentReadyToLockEvent); this.filenameContextDelegate = filenameContextDelegate; this.latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, this.readyToLockChangedEvent); XMLTagReader xMLTagReader = context.NewTagReader("SourceMap"); context.ExpectIdentity(this); string attribute = context.reader.GetAttribute("SourceMapFilename"); if (attribute != null) { string path = Path.Combine(filenameContextDelegate(), attribute); int pageNumber = 0; context.GetAttributeInt("PageNumber", ref pageNumber); this._documentFuture = new GeneralDocumentFuture(new FutureDocumentFromFilesystem(path, pageNumber)); } context.GetAttributeBoolean("Expanded", ref this._expanded); string attribute2 = context.reader.GetAttribute("DisplayName"); MapPosition mapPosition = null; MapPosition mapPosition2 = null; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(RegistrationDefinition.GetXMLTag())) { context.AssertUnique(this.registration); this.registration = new RegistrationDefinition(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(GeneralDocumentFuture.GetXMLTag())) { context.AssertUnique(this._documentFuture); this._documentFuture = new GeneralDocumentFuture(context, filenameContextDelegate()); } else { if (xMLTagReader.TagIs(LocalDocumentDescriptor.GetXMLTag())) { context.AssertUnique(this._documentFuture); LocalDocumentDescriptor localDocumentDescriptor = new LocalDocumentDescriptor(context, filenameContextDelegate()); this._documentFuture = new GeneralDocumentFuture(new FutureDocumentFromFilesystem(localDocumentDescriptor.GetFilesystemAbsolutePath(), localDocumentDescriptor.GetPageNumber())); } else { if (xMLTagReader.TagIs("LastSourceMapPosition")) { XMLTagReader xMLTagReader2 = context.NewTagReader("LastSourceMapPosition"); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition = new MapPosition(context, null, ContinuousCoordinateSystem.theInstance); } } } else { if (xMLTagReader.TagIs("LastVEPosition")) { XMLTagReader xMLTagReader3 = context.NewTagReader("LastVEPosition"); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition2 = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } else { if (xMLTagReader.TagIs(RenderRegion.GetXMLTag())) { context.AssertUnique(this.renderRegion); this.renderRegion = new RenderRegion(context, this.dirtyEvent, ContinuousCoordinateSystem.theInstance); } else { if (xMLTagReader.TagIs(SourceMapInfo.GetXMLTag())) { context.AssertUnique(this._sourceMapInfo); this._sourceMapInfo = new SourceMapInfo(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(SourceMapRenderOptions.GetXMLTag())) { context.AssertUnique(this._sourceMapRenderOptions); this._sourceMapRenderOptions = new SourceMapRenderOptions(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(TransparencyOptions.GetXMLTag())) { this._transparencyOptions = new TransparencyOptions(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(SourceMapRegistrationView.GetXMLTag())) { context.AssertUnique(this._lastView); this._lastView = new SourceMapRegistrationView(this, context); } else { if (xMLTagReader.TagIs(LegendList.GetXMLTag())) { context.AssertUnique(this.legendList); this.legendList = new LegendList(this, context, this.dirtyEvent); } else { if (xMLTagReader.TagIs("SnapView")) { XMLTagReader xMLTagReader4 = context.NewTagReader("SnapView"); string requiredAttribute = context.GetRequiredAttribute("Context"); LatLonZoom latLonZoom = default(LatLonZoom); bool flag = false; bool flag2 = true; CoordinateSystemIfc coordSys = null; if (requiredAttribute == "Source") { coordSys = ContinuousCoordinateSystem.theInstance; } else { if (!(requiredAttribute == "Reference")) { throw new InvalidMashupFile(context, string.Format("Invalid {0} value {1}", "Context", requiredAttribute)); } coordSys = MercatorCoordinateSystem.theInstance; } while (xMLTagReader4.FindNextStartTag()) { if (xMLTagReader4.TagIs(LatLonZoom.GetXMLTag())) { if (flag) { context.ThrowUnique(); } try { latLonZoom = new LatLonZoom(context, coordSys); } catch (InvalidLLZ) { flag2 = false; } flag = true; } } if (flag2) { if (!flag) { context.AssertPresent(null, LatLonZoom.GetXMLTag()); } if (requiredAttribute == "Source") { this.sourceSnap = latLonZoom; } else { if (requiredAttribute == "Reference") { this.referenceSnap = latLonZoom; } else { D.Assert(false, "handled above."); } } } } else { if (xMLTagReader.TagIs("SnapZoom")) { context.NewTagReader("SnapZoom"); string requiredAttribute2 = context.GetRequiredAttribute("Context"); bool flag3 = false; CoordinateSystemIfc theInstance; if (requiredAttribute2 == "Source") { theInstance = ContinuousCoordinateSystem.theInstance; } else { if (!(requiredAttribute2 == "Reference")) { throw new InvalidMashupFile(context, string.Format("Invalid {0} value {1}", "Context", requiredAttribute2)); } theInstance = MercatorCoordinateSystem.theInstance; } int num = 0; try { theInstance.GetZoomRange().Parse(context, "Zoom"); flag3 = true; } catch (InvalidMashupFile) { } if (flag3) { if (requiredAttribute2 == "Source") { this.sourceSnapZoom = num; } else { if (requiredAttribute2 == "Reference") { this.referenceSnapZoom = num; } } } } } } } } } } } } } } } } if (context.version == InlineSourceMapInfoSchema.schema) { if (xMLTagReader.TagIs("MapFileURL")) { this._sourceMapInfo.mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { if (xMLTagReader.TagIs("MapHomePage")) { this._sourceMapInfo.mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { if (xMLTagReader.TagIs("MapDescription")) { this._sourceMapInfo.mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } } if (attribute2 != null) { this._displayName = attribute2; } else { this._displayName = this._documentFuture.documentFuture.GetDefaultDisplayName(); } if (this._lastView == null && mapPosition != null && mapPosition2 != null) { this._lastView = new SourceMapRegistrationView(this, mapPosition.llz, mapPosition2); } if (this._documentFuture == null) { throw new Exception("Source Map element missing document descriptor tag"); } if (this.registration == null) { this.registration = new RegistrationDefinition(this.dirtyEvent); } this.registration.dirtyEvent.Add(this.readyToLockChangedEvent); if (this.legendList == null) { this.legendList = new LegendList(this, this.dirtyEvent, this.readyToLockChangedEvent); } if (this._sourceMapInfo == null) { this._sourceMapInfo = new SourceMapInfo(this.dirtyEvent); } if (this._sourceMapRenderOptions == null) { this._sourceMapRenderOptions = new SourceMapRenderOptions(this.dirtyEvent); } if (this._transparencyOptions == null) { this._transparencyOptions = new TransparencyOptions(this.dirtyEvent); } }
public SourceMapRenderOptions(DirtyEvent parentDirty) { dirtyEvent = new DirtyEvent(parentDirty); }
public SourceMapInfo(DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); }
public RenderRegion(List <LatLon> vertexList, DirtyEvent parentDirty) { dirtyEvent = new DirtyEvent(parentDirty); this.vertexList = vertexList; }
public void Add(DirtyEvent listener) { this.Add(new DirtyListener(listener.SetDirty)); }
public SourceMapInfo(DirtyEvent parentDirty) { dirtyEvent = new DirtyEvent(parentDirty); }
public SourceMap(MashupParseContext context, GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { dirtyEvent = new DirtyEvent(parentDirty); readyToLockChangedEvent = new DirtyEvent(parentReadyToLockEvent); this.filenameContextDelegate = filenameContextDelegate; latentRegionHolder = new LatentRegionHolder(dirtyEvent, readyToLockChangedEvent); var xMLTagReader = context.NewTagReader("SourceMap"); context.ExpectIdentity(this); string attribute = context.reader.GetAttribute("SourceMapFilename"); if (attribute != null) { string path = Path.Combine(filenameContextDelegate(), attribute); int pageNumber = 0; context.GetAttributeInt("PageNumber", ref pageNumber); documentFuture = new GeneralDocumentFuture(new FutureDocumentFromFilesystem(path, pageNumber)); } context.GetAttributeBoolean("Expanded", ref _expanded); string attribute2 = context.reader.GetAttribute("DisplayName"); MapPosition mapPosition = null; MapPosition mapPosition2 = null; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(RegistrationDefinition.GetXMLTag())) { context.AssertUnique(registration); registration = new RegistrationDefinition(context, dirtyEvent); } else { if (xMLTagReader.TagIs(GeneralDocumentFuture.GetXMLTag())) { context.AssertUnique(documentFuture); documentFuture = new GeneralDocumentFuture(context, filenameContextDelegate()); } else { if (xMLTagReader.TagIs(LocalDocumentDescriptor.GetXMLTag())) { context.AssertUnique(documentFuture); var localDocumentDescriptor = new LocalDocumentDescriptor(context, filenameContextDelegate()); documentFuture = new GeneralDocumentFuture( new FutureDocumentFromFilesystem(localDocumentDescriptor.GetFilesystemAbsolutePath(), localDocumentDescriptor.GetPageNumber())); } else { if (xMLTagReader.TagIs("LastSourceMapPosition")) { var xMLTagReader2 = context.NewTagReader("LastSourceMapPosition"); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition = new MapPosition(context, null, ContinuousCoordinateSystem.theInstance); } } } else { if (xMLTagReader.TagIs("LastVEPosition")) { var xMLTagReader3 = context.NewTagReader("LastVEPosition"); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition2 = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } else { if (xMLTagReader.TagIs(RenderRegion.GetXMLTag())) { context.AssertUnique(renderRegion); renderRegion = new RenderRegion(context, dirtyEvent, ContinuousCoordinateSystem.theInstance); } else { if (xMLTagReader.TagIs(SourceMapInfo.GetXMLTag())) { context.AssertUnique(sourceMapInfo); sourceMapInfo = new SourceMapInfo(context, dirtyEvent); } else { if (xMLTagReader.TagIs(SourceMapRenderOptions.GetXMLTag())) { context.AssertUnique(sourceMapRenderOptions); sourceMapRenderOptions = new SourceMapRenderOptions(context, dirtyEvent); } else { if (xMLTagReader.TagIs(TransparencyOptions.GetXMLTag())) { transparencyOptions = new TransparencyOptions(context, dirtyEvent); } else { if (xMLTagReader.TagIs(SourceMapRegistrationView.GetXMLTag())) { context.AssertUnique(_lastView); _lastView = new SourceMapRegistrationView(this, context); } else { if (xMLTagReader.TagIs(LegendList.GetXMLTag())) { context.AssertUnique(legendList); legendList = new LegendList(this, context, dirtyEvent); } else { if (xMLTagReader.TagIs("SnapView")) { var xMLTagReader4 = context.NewTagReader("SnapView"); string requiredAttribute = context.GetRequiredAttribute("Context"); var latLonZoom = default(LatLonZoom); bool flag = false; bool flag2 = true; CoordinateSystemIfc coordSys; if (requiredAttribute == "Source") { coordSys = ContinuousCoordinateSystem.theInstance; } else { if (!(requiredAttribute == "Reference")) { throw new InvalidMashupFile(context, string.Format("Invalid {0} value {1}", "Context", requiredAttribute)); } coordSys = MercatorCoordinateSystem.theInstance; } while (xMLTagReader4.FindNextStartTag()) { if (xMLTagReader4.TagIs(LatLonZoom.GetXMLTag())) { if (flag) { context.ThrowUnique(); } try { latLonZoom = new LatLonZoom(context, coordSys); } catch (InvalidLLZ) { flag2 = false; } flag = true; } } if (flag2) { if (!flag) { context.AssertPresent(null, LatLonZoom.GetXMLTag()); } if (requiredAttribute == "Source") { sourceSnap = latLonZoom; } else { if (requiredAttribute == "Reference") { referenceSnap = latLonZoom; } else { D.Assert(false, "handled above."); } } } } else { if (xMLTagReader.TagIs("SnapZoom")) { context.NewTagReader("SnapZoom"); string requiredAttribute2 = context.GetRequiredAttribute("Context"); bool flag3 = false; CoordinateSystemIfc theInstance; if (requiredAttribute2 == "Source") { theInstance = ContinuousCoordinateSystem .theInstance; } else { if (!(requiredAttribute2 == "Reference")) { throw new InvalidMashupFile(context, string.Format("Invalid {0} value {1}", "Context", requiredAttribute2)); } theInstance = MercatorCoordinateSystem .theInstance; } int num = 0; try { theInstance.GetZoomRange() .Parse(context, "Zoom"); flag3 = true; } catch (InvalidMashupFile) { } if (flag3) { if (requiredAttribute2 == "Source") { sourceSnapZoom = num; } else { if (requiredAttribute2 == "Reference") { referenceSnapZoom = num; } } } } } } } } } } } } } } } } if (context.version == InlineSourceMapInfoSchema.schema) { if (xMLTagReader.TagIs("MapFileURL")) { sourceMapInfo.mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { if (xMLTagReader.TagIs("MapHomePage")) { sourceMapInfo.mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { if (xMLTagReader.TagIs("MapDescription")) { sourceMapInfo.mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } } if (attribute2 != null) { _displayName = attribute2; } else { _displayName = documentFuture.documentFuture.GetDefaultDisplayName(); } if (_lastView == null && mapPosition != null && mapPosition2 != null) { _lastView = new SourceMapRegistrationView(this, mapPosition.llz, mapPosition2); } if (documentFuture == null) { throw new Exception("Source Map element missing document descriptor tag"); } if (registration == null) { registration = new RegistrationDefinition(dirtyEvent); } registration.dirtyEvent.Add(readyToLockChangedEvent); if (legendList == null) { legendList = new LegendList(this, dirtyEvent, readyToLockChangedEvent); } if (sourceMapInfo == null) { sourceMapInfo = new SourceMapInfo(dirtyEvent); } if (sourceMapRenderOptions == null) { sourceMapRenderOptions = new SourceMapRenderOptions(dirtyEvent); } if (transparencyOptions == null) { transparencyOptions = new TransparencyOptions(dirtyEvent); } }
public LatentRegionHolder(DirtyEvent parentEvent, DirtyEvent parentBoundsAvailableEvent) { this.dirtyEvent = parentEvent; this.boundsChangedEvent = parentBoundsAvailableEvent; }
internal RenderRegion Copy(DirtyEvent parentDirty) { return(new RenderRegion(new List <LatLon>(vertexList), parentDirty)); }
public LatentRegionHolder(DirtyEvent parentEvent, DirtyEvent parentBoundsAvailableEvent) { this.dirtyEvent = parentEvent; this.boundsChangedEvent = parentBoundsAvailableEvent; }
public DirtyString(DirtyEvent parentDirtyEvent) { this.dirtyEvent = new DirtyEvent(parentDirtyEvent); }
public SourceMapRenderOptions(DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); }
public LayerList(DirtyEvent parentDirty) { this.dirtyEvent = parentDirty; }
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"); }
public Layer(LayerList otherLayers, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); int num = 1; string text = "New Layer"; while (otherLayers.HasLayerNamed(text)) { num++; text = string.Format("{0} {1}", "New Layer", num); } this._displayName = text; }
public FadeOptions(DirtyEvent dirty) { this.dirty = dirty; }
public LayerList(DirtyEvent parentDirty) { this.dirtyEvent = parentDirty; }
public RenderOptions(MashupParseContext context, DirtyEvent parentDirtyEvent, ref SingleMaxZoomForEntireMashupCompatibilityBlob blob) { dirtyEvent = new DirtyEvent(parentDirtyEvent); XMLTagReader xMLTagReader = context.NewTagReader(RenderOptionsTag); while (xMLTagReader.FindNextStartTag()) { if (context.version == SingleMaxZoomForEntireMashupSchema.schema && xMLTagReader.TagIs(SingleMaxZoomForEntireMashupSchema.ZoomLevelsTag)) { blob = new SingleMaxZoomForEntireMashupCompatibilityBlob(); XMLTagReader xMLTagReader2 = context.NewTagReader(SingleMaxZoomForEntireMashupSchema.ZoomLevelsTag); string attribute; if ((attribute = context.reader.GetAttribute(SingleMaxZoomForEntireMashupSchema.MinZoomTag)) != null) { blob.minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, SingleMaxZoomForEntireMashupSchema.MinZoomTag, attribute); } if ((attribute = context.reader.GetAttribute(SingleMaxZoomForEntireMashupSchema.MaxZoomTag)) != null) { blob.maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, SingleMaxZoomForEntireMashupSchema.MaxZoomTag, attribute); } xMLTagReader2.SkipAllSubTags(); } else { if (xMLTagReader.TagIs(RenderToFileOptions.xmlTag)) { _renderToOptions = new RenderToFileOptions(context, dirtyEvent); } else { if (xMLTagReader.TagIs(compatibility_RenderToFileOutputTag)) { _renderToOptions = new RenderToFileOptions(context, dirtyEvent, compatibility_RenderToFileOutputTag); } else { if (xMLTagReader.TagIs(RenderToS3Options.xmlTag)) { _renderToOptions = new RenderToS3Options(context, dirtyEvent); } else { if (xMLTagReader.TagIs(OutputTileTypeTag)) { XMLTagReader xMLTagReader3 = context.NewTagReader(OutputTileTypeTag); outputTileType = OutputTileType.Parse(context.reader.GetAttribute(OutputTileTypeAttr)); xMLTagReader3.SkipAllSubTags(); } else { if (xMLTagReader.TagIs(PublishSourceDataTag)) { XMLTagReader xMLTagReader4 = context.NewTagReader(PublishSourceDataTag); publishSourceData = context.GetRequiredAttributeBoolean(PublishSourceDataValueAttr); xMLTagReader4.SkipAllSubTags(); } else { if (xMLTagReader.TagIs(PermitCompositionTag)) { XMLTagReader xMLTagReader5 = context.NewTagReader(PermitCompositionTag); permitComposition = context.GetRequiredAttributeBoolean(PermitCompositionValueAttr); xMLTagReader5.SkipAllSubTags(); } } } } } } } } }
public void Remove(DirtyEvent listener) { this.Remove(new DirtyListener(listener.SetDirty)); }
public TransparencyOptions(DirtyEvent dirty) { this.Initialize(dirty); }
public RenderToFileOptions(DirtyEvent parentDirtyEvent) { this._outputFolder = new DirtyString(parentDirtyEvent); }
//[CompilerGenerated] //private static Converter<Legend, string> <>9__CachedAnonymousMethodDelegate1; public LegendList(SourceMap sourceMap, DirtyEvent parentEvent, DirtyEvent parentBoundsChangedEvent) { this._sourceMap = sourceMap; this.dirtyEvent = new DirtyEvent(parentEvent); this.parentBoundsChangedEvent = parentBoundsChangedEvent; }
public PositionAssociation(string associationName, LatLonZoom imagePosition, LatLonZoom sourcePosition, LatLonZoom globalPosition, DirtyEvent dirtyEvent) { this.dirtyEvent = dirtyEvent; this._pinId = -1; this._associationName = associationName; this._imagePosition = new DisplayablePosition(imagePosition); this._sourcePosition = new DisplayablePosition(sourcePosition); this._globalPosition = new DisplayablePosition(globalPosition); }
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); } } } }
public FadeOptions(DirtyEvent dirty) { this.dirty = dirty; }
public LayerList(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = parentDirty; XMLTagReader xMLTagReader = context.NewTagReader("LayerList"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Layer.GetXMLTag())) { this.Add(new Layer(context, filenameContextDelegate, this.dirtyEvent, parentReadyToLockEvent)); } } }
public DirtyEvent(DirtyEvent parentEvent) { Add(parentEvent); }
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 void Add(DirtyEvent listener) { Add(listener.SetDirty); }
public RenderOptions(DirtyEvent parentDirtyEvent) { dirtyEvent = new DirtyEvent(parentDirtyEvent); _renderToOptions = new RenderToFileOptions(parentDirtyEvent); }
public void Remove(DirtyEvent listener) { Remove(listener.SetDirty); }
public RenderToFileOptions(MashupParseContext context, DirtyEvent parentDirtyEvent) : this(context, parentDirtyEvent, RenderToFileOptions.xmlTag) { }
public RenderToS3Options(DirtyEvent parentDirtyEvent) { this._s3credentialsFilename = new DirtyString(parentDirtyEvent); this._s3bucket = new DirtyString(parentDirtyEvent); this._s3pathPrefix = new DirtyString(parentDirtyEvent); }