Re[mapguide-users] adOnly Layer
knife
ldk114 at gmail.com
Tue Dec 25 09:17:41 EST 2007
private void set_ResourceWriteAble(MgResourceIdentifier resoureId,
MgResourceService resourceService)
{//by knife114
//-----------------------------------------------------------------------------
String buffer;
MgByteReader reader = resourceService.GetResourceContent(resoureId);
buffer = reader.ToString();
if (buffer.Contains("<Value>TRUE</Value>"))
{
buffer = buffer.Replace("<Value>TRUE</Value>",
"<Value>FALSE</Value>");
Byte[] buf_Byte = System.Text.Encoding.Default.GetBytes(buffer);
MgByteSource byteSource = new MgByteSource(buf_Byte,
buf_Byte.Length);
resourceService.SetResource(resoureId, byteSource.GetReader(),
null);
}
//-----------------------------------------------------------------------------
}
--
View this message in context: http://www.nabble.com/ReadOnly-Layer-tp14230364s16610p14495377.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list