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

            return(jsonValue);
        }
예제 #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);
            }
        }
예제 #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);
        }
예제 #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>();
            }
        }