Exemple #1
0
        //public Dictionary<string, Record> deserialize()
        //{
        //    IFormatter formatter = new BinaryFormatter();
        //    Dictionary<string, Record> dict = (Dictionary<string, Record>)formatter.Deserialize(stream);
        //    return dict;
        //}

        public LayerAttributes deserialize()
        {
            IFormatter      formatter = new BinaryFormatter();
            LayerAttributes layer     = (LayerAttributes)formatter.Deserialize(stream);

            stream.Close();
            return(layer);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="folderPath"></param>
        /// <param name="layer"></param>
        /// <param name="color"></param>
        public void exfImportCallback(string folderPath, string layer, Color color)
        {
            Serializer s = new Serializer(folderPath);

            mLayerAttributes = s.deserialize();
            mRecordDict      = mLayerAttributes.Data;
            max_lat          = mLayerAttributes.MaxLat;
            min_lat          = mLayerAttributes.MinLat;
            max_lng          = mLayerAttributes.MaxLng;
            min_lng          = mLayerAttributes.MinLng;
            plotLayer(layer, color.Name);
        }
Exemple #3
0
 public Serializer(LayerAttributes layer)
 {
     mLayer = layer;
 }
 private void setLayerAttributes()
 {
     mLayerAttributes      = new LayerAttributes();
     mLayerAttributes.Data = mRecordDict;
     mLayerAttributes.setMinMax(max_lat, min_lat, max_lng, min_lng);
 }