private RoamingSence GetRoamingList(string exhibition) { RoamingSence sence = new RoamingSence(); sence.senceName = exhibition; foreach (KeyValuePair <string, string> str in StaticData.DicPlaceData) { tb_place placedata = Newtonsoft.Json.JsonConvert.DeserializeObject <tb_place>(str.Value); if (!string.IsNullOrEmpty(placedata.tb_place_desc) && !string.IsNullOrEmpty(placedata.tb_place_number) && placedata.tb_place_desc.Equals(exhibition)) { RoamingPoint point = new RoamingPoint(); point.placeid = (placedata.tb_place_id); point.panoid = placedata.tb_pano_id; sence.panos.Add(point); } } sence.panos.Sort(ComparePlaceDataByPlaceid); return(sence); //return Newtonsoft.Json.JsonConvert.SerializeObject(halls); }
private static int ComparePlaceDataByPlaceid(RoamingPoint x, RoamingPoint y) { return(y.placeid - x.placeid); }