Example #1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        public string Save()
        {
            JsonSerializationStruct jsonStruct = new JsonSerializationStruct(mapElements);
            string jsonValue = SerializeNow(jsonStruct);

            return(jsonValue);
        }
Example #2
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="jsonValue"></param>
        public void Load(string jsonValue)
        {
            JsonSerializationStruct jsonStruct = DeSerializeNow <JsonSerializationStruct>(jsonValue);

            if (jsonStruct != null)
            {
                mapElements = jsonStruct.mapElements;
                jsonStruct.SetCorrelatives(this);
            }
        }
Example #3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        public string Save()
        {
            JsonSerializationStruct jsonStruct = new JsonSerializationStruct();

            jsonStruct.Value = taskMap.Save();
            jsonStruct.nodeRelationShipList = nodeRelationShipList;
            jsonStruct.relationShipZoneList = relationShipZoneList;
            string jsonValue = SerializeNow <JsonSerializationStruct>(jsonStruct);

            return(jsonValue);
        }
Example #4
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="jsonValue"></param>
        public void Load(string jsonValue)
        {
            JsonSerializationStruct jsonStruct = DeSerializeNow <JsonSerializationStruct>(jsonValue);

            taskMap.Load(jsonStruct.Value);
            nodeRelationShipList = jsonStruct.nodeRelationShipList;
            if (nodeRelationShipList == null)
            {
                nodeRelationShipList = new List <NodeRelationShip>();
            }
            relationShipZoneList = jsonStruct.relationShipZoneList;
            if (relationShipZoneList == null)
            {
                relationShipZoneList = new List <RelationShipZone>();
            }
        }