示例#1
0
        public EventPage(EventEntities e)
        {
            InitializeComponent();
            BindingContext = e;
            //string test = BindingContext.ToString();
            //double longditude=37;
            //double latitude=-127;

            //try
            //{
            //    longditude = Double.Parse(getLocation(e.Address, "longditude").ToString());
            //    latitude = Double.Parse(getLocation(e.Address, "latitude").ToString());
            //}
            //catch
            //{
            //}

            //Position pos = new Position(longditude, latitude);
            //var pin = new Pin
            //{
            //    Type = PinType.Place,
            //    Position = pos,
            //    Label = e.Title,
            //    Address = e.Address
            //};
            ////MyMap.Pins.Add(pin);

            ////MyMap.MoveToRegion(
            ////    MapSpan.FromCenterAndRadius(
            ////        pos, Distance.FromMiles(.2)));
        }
 public EventEntities Init()
 {
     return(dbContext ?? (dbContext = new EventEntities()));
 }