Exemplo n.º 1
0
        /// <summary>
        ///     The test deserialize.
        /// </summary>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        private static bool TestDeserialize()
        {
            string filename = @"d:\ogrlayer.xml";

            using (var reader = new StreamReader(filename))
            {
                string state = reader.ReadToEnd();
                var    layer = new OgrLayer();
                if (!layer.Deserialize(state))
                {
                    Debug.Print("Failed to deserialize layer");
                    return(false);
                }

                AxMap map = Fileformats.Map;
                map.RemoveAllLayers();
                map.Projection = tkMapProjection.PROJECTION_WGS84;
                map.AddLayer(layer, true);
            }

            return(true);
        }
Exemplo n.º 2
0
 public bool Deserialize(string state)
 {
     return(_layer.Deserialize(state));
 }