void Save(object param = null) { if (!CanSave(param)) { return; } if (PgGeometryVM != null && PgGeometryVM.CanSaveGeometry()) { AttributesListVM.SaveCommand.Execute(param); if (StyleVM != null) { StyleVM.SaveStyle(); } PgGeometryVM.SaveGeometry(); base.CloseWindow(); } else if (PgGeometryVM != null) { PgGeometryVM.SaveGeometry(); } if (PgGeometryVM == null) { AttributesListVM.SaveCommand.Execute(param); if (StyleVM != null) { StyleVM.SaveStyle(); } base.CloseWindow(); } }
void Save(object param = null) { if (!CanSave(param)) { return; } var layerMV = _source.MapViewer.getLayer(_table.NameMap); if (layerMV == null) { return; } var objMV = layerMV.getObject(TableObject.Id); if (objMV == null) { return; } if (PgGeometryVM != null && PgGeometryVM.CanSaveGeometry()) { AttributesListVM.SaveCommand.Execute(param); var wkt = PgGeometryVM.GetWkt(); wkt = PgGeometryVM.TransformWkt(wkt, PgGeometryVM.CurrentSrid, Convert.ToInt32(_source.MapViewer.SRID)); objMV.setWKT(wkt); TableObject.WKT = wkt; base.CloseWindow(); } else if (PgGeometryVM != null) { var wkt = PgGeometryVM.GetWkt(); objMV.setWKT(wkt); TableObject.WKT = wkt; } if (PgGeometryVM == null) { AttributesListVM.SaveCommand.Execute(param); base.CloseWindow(); } layerMV.RemoveDeletedObjects(); SaveStyle(); _source.MapViewer.mapRepaint(); }