public EventLegend(objetoslistas.Event evento) { eventID = evento.eventID; name = evento.name; latitude = evento.latitude; longitude = evento.longitude; logoURL = evento.logoURL; address = evento.address; phone = evento.phone; //CUSTOM posicion = new GeoCoordinate(evento.latitude, evento.longitude); GeoCoordinate centroccord = new GeoCoordinate(MainPage.usuariocordx, MainPage.usuariocordy); distraw = Convert.ToInt32(centroccord.GetDistanceTo(posicion)); if (distraw > 1000) { distancia = (distraw / 1000).ToString() + " KM"; } else { distancia = distraw.ToString() + " M"; } }
public Event(objetoslistas.Event evento) : base(evento) { grupo = "Eventos"; number_of_men = evento.numberOfMen; number_of_women = evento.numberOfWomen; subtype = evento.subtype; back = "#FF938E8E"; if (evento.type == 1) { type = "Cafetería"; type_usable = "/images/iconos/cup.png"; } else if (evento.type == 2) { type = "Pub"; type_usable = "/images/iconos/appbar.star.png"; } else if (evento.type == 3)// { type = "Chiringuito"; type_usable = "/images/iconos/food.png"; } else if (evento.type == 4) { type = "Beach Club"; type_usable = "/images/iconos/appbar.star.png"; } else if (evento.type == 5) { type = "Discoteca"; type_usable = "/images/iconos/appbar.star.png"; } else if (evento.type == 6) { type = "Tetería"; type_usable = "/images/iconos/cup.png"; } else if (evento.type == 7) { type = "Restaurante"; type_usable = "/images/iconos/food.cross.png"; } else if (evento.type == 8) { type = "Ambiente"; type_usable = "/images/iconos/appbar.star.png"; } else if (evento.type == 9) { type = "Cerveceria"; type_usable = "/images/iconos/beer.png"; } else { type = "Desconocido"; type_usable = "/images/iconos/appbar.star.png"; } }
public Pincho(objetoslistas.Event evento) { ID = evento.eventID; name = evento.name; int totalparty = evento.numberOfMen + evento.numberOfWomen; if (totalparty == 0) { numberOfMen = 0.5; numberOfWomen = 0.5; } else { numberOfMen = (float)((float)(evento.numberOfMen * 100) / totalparty) / 100; numberOfWomen = (float)((float)(evento.numberOfWomen * 100) / totalparty) / 100; } tipo = "event"; switch (evento.type) { case 1: type_usable = "/images/iconos/cup.png"; break; case 2: type_usable = "/images/iconos/appbar.star.png"; break; case 3: type_usable = "/images/iconos/food.png"; break; case 4: type_usable = "/images/iconos/appbar.star.png"; break; case 5: type_usable = "/images/iconos/appbar.star.png"; break; case 6: type_usable = "/images/iconos/cup.png"; break; case 7: type_usable = "/images/iconos/food.cross.png"; break; case 8: type_usable = "/images/iconos/appbar.star.png"; break; default: type_usable = "/images/iconos/appbar.star.png"; break; } posicion = new GeoCoordinate(evento.latitude, evento.longitude); GeoCoordinate localcoord = new GeoCoordinate(evento.latitude, evento.longitude); GeoCoordinate centroccord = new GeoCoordinate(MainPage.usuariocordx, MainPage.usuariocordy); distraw = Convert.ToInt32(centroccord.GetDistanceTo(localcoord)); }