public override void GetUpdateRequests(UpdateRequestDelegate updateRequest) { base.GetUpdateRequests(updateRequest); updateRequest("Area", _importArea, Area.GetForSRID(_importArea.Shapefile.SRID), XmlImporter.GetUpdateRequestId("area")); updateRequest("Source SRID", _sourceSRID, null, XmlImporter.GetUpdateRequestId("source_srid")); }
public override void Update(Dictionary <string, object> updateKeyValue) { base.Update(updateKeyValue); _importArea = (Area)updateKeyValue[XmlImporter.GetUpdateRequestId("area")]; _sourceSRID = Convert.ToInt32(updateKeyValue[XmlImporter.GetUpdateRequestId("source_srid")]); }
public override void GetUpdateRequests(UpdateRequestDelegate updateRequest) { base.GetUpdateRequests(updateRequest); updateRequest("Area", _importArea, Area.GetAll(), XmlImporter.GetUpdateRequestId("area")); updateRequest("Hour offset", _hourOffset, null, XmlImporter.GetUpdateRequestId("offset")); updateRequest("Source SRID", _sourceSRID, null, XmlImporter.GetUpdateRequestId("source_srid")); }
private XmlImporter CreateXmlImporter(string name, string path, string relativePathBase, PathRelativizationId relativizationId, string sourceURI, Type[] rowInserterTypes, string[] databaseColumns, CreateXmlRowInserterDelegate createXmlRowInserter) { DynamicForm rowInserterForm = new DynamicForm("Define row inserter...", DynamicForm.CloseButtons.OkCancel); rowInserterForm.AddDropDown("Row inserter:", rowInserterTypes, null, "row_inserter", true); string[] inputColumns = XmlImporter.GetColumnNames(path, "row", "row"); Array.Sort(inputColumns); foreach (string databaseColumn in databaseColumns) rowInserterForm.AddDropDown(databaseColumn + ":", inputColumns, null, databaseColumn, true); XmlImporter importer = null; if (rowInserterForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Type rowInserterType = rowInserterForm.GetValue<Type>("row_inserter"); Dictionary<string, string> databaseColumnInputColumn = new Dictionary<string, string>(); foreach (string databaseColumn in databaseColumns) databaseColumnInputColumn.Add(databaseColumn, rowInserterForm.GetValue<string>(databaseColumn)); importer = new XmlImporter(name, path, RelativizePath(path, relativePathBase, relativizationId), sourceURI, createXmlRowInserter(databaseColumnInputColumn), "row", "row"); } return importer; }