/// <summary> /// 保存 /// </summary> /// <returns></returns> public string Save() { JsonSerializationStruct jsonStruct = new JsonSerializationStruct(mapElements); string jsonValue = SerializeNow(jsonStruct); return(jsonValue); }
/// <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); } }
/// <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); }
/// <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>(); } }