internal static ChangeSet ConvertToSimple(modify modify) { ChangeSet changeSet = new ChangeSet(); Change change = new Change(); change.Type = ChangeType.Modify; change.OsmGeo = new List <OsmGeo>(); if (modify.relation != null) { foreach (relation re in modify.relation) { change.OsmGeo.Add((OsmGeo)XmlSimpleConverter.ConvertToSimple(re)); } } if (modify.way != null) { foreach (way wa in modify.way) { change.OsmGeo.Add((OsmGeo)XmlSimpleConverter.ConvertToSimple(wa)); } } if (modify.node != null) { foreach (node nd in modify.node) { change.OsmGeo.Add((OsmGeo)XmlSimpleConverter.ConvertToSimple(nd)); } } changeSet.Changes = new List <Change>(); changeSet.Changes.Add(change); return(changeSet); }
public void Modify(Panel pan, Point point) { if (pan.InvokeRequired) { modify d = new modify(Modify); pan.Invoke(d, new object[] { pan, point }); } else { pan.Location = point; } }