public void SetContent(Salonlar.Salon MevcutSalon) { CurrentSalon = MevcutSalon; txtSalonAdi.Text = MevcutSalon.name; txtSalonTel.Text = MevcutSalon.phone; txtSalonMesafe.Text = MevcutSalon.distance; }
void Req_Completed(Salonlar.RootObject deserialized) { salonlar.Clear(); foreach (Salon item in deserialized.five) { salonlar.Add(item); } foreach (Salon item in deserialized.ten) { salonlar.Add(item); } if (getCompleted != null) { getCompleted(this); } }
void newPin_Selected(pinpoint_salon sender, Salonlar.Salon salon) { if (SingleTheater) { //Pinpoint transferi olmuyor MapTask'e.. :( //MapsTask mapT = new MapsTask(); //mapT.Center = new GeoCoordinate() //mapT.Show(); } else { foreach (pinpoint_salon item in AllPinPoints) { if (item != sender) { item.ClearSelection(); } } } }
public void Add_SalonPinPoint(Salonlar.Salon item, bool IsSingle = false) { pinpoint_salon newPin = new pinpoint_salon(); if (IsSingle) { newPin.ShowDetails = false; } newPin.RenderTransformOrigin = new Point(0, 0); newPin.RenderTransform = new ScaleTransform(); newPin.Selected += newPin_Selected; newPin.Redirect2Theater += newPin_Redirect2Theater; newPin.SetContent(item); MapOverlay newOverlay = new MapOverlay(); newOverlay.Content = newPin; newOverlay.GeoCoordinate = new GeoCoordinate(double.Parse(item.latitude), double.Parse(item.longitude)); newOverlay.PositionOrigin = new Point(0, 0); MapLayer MyLayer = new MapLayer(); MyLayer.Add(newOverlay); myMap.Layers.Add(MyLayer); AllPinPoints.Add(newPin); collection.Add(newOverlay.GeoCoordinate); }
void yakinSalonlar_getCompleted(Salonlar sender) { foreach (Salonlar.Salon item in sender.salonlar) { bool AlreadyExists = false; foreach (pinpoint_salon itemSalon in AllPinPoints) { if (itemSalon.CurrentSalon.id == item.id) { AlreadyExists = true; } } if(!AlreadyExists) { Add_SalonPinPoint(item); } } LocationRectangle setRect = null; setRect = LocationRectangle.CreateBoundingRectangle(collection); myMap.SetView(setRect); ReadyForScaling = true; }
void geoWatch_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e) { mevcutLokasyon = e.Position.Location; if (!SingleTheater) { myMap.SetView(e.Position.Location, 15); } else { collection.Add(e.Position.Location); LocationRectangle setRect = null; setRect = LocationRectangle.CreateBoundingRectangle(collection); myMap.SetView(setRect); } //Önce bir kendimizi gösterelim. //accuracy hesaplansın UpdateAccuracyShow(); if (MapOverlay_ForMe == null) { MapOverlay_ForMe = new MapOverlay(); MapOverlay_ForMe.Content = Pin_ME; Pin_ME.RenderTransformOrigin = new Point(0, 0); Pin_ME.RenderTransform = new ScaleTransform(); MapOverlay_ForMe.PositionOrigin = new Point(0, 0); MapLayer MyLayer = new MapLayer(); MyLayer.Add(MapOverlay_ForMe); myMap.Layers.Add(MyLayer); } MapOverlay_ForMe.GeoCoordinate = e.Position.Location; if (!SingleTheater) { //Pull nearest theaters if not in "SingleTheater" mode. Salonlar yakinSalonlar = new Salonlar(); yakinSalonlar.getCompleted += yakinSalonlar_getCompleted; yakinSalonlar.get(mevcutLokasyon.Latitude, mevcutLokasyon.Longitude); } else { //Let's do routing if we are in "SingleTheater" mode. if (SingleTheater) { RouteQuery newQuery = new RouteQuery(); List<GeoCoordinate> MyCoordinates = new List<GeoCoordinate>(); MyCoordinates.Add(mevcutLokasyon); MyCoordinates.Add(collection[0]); newQuery.Waypoints = MyCoordinates; newQuery.QueryCompleted += newQuery_QueryCompleted; newQuery.QueryAsync(); } } }
void yakinSalonlar_getCompleted(Salonlar sender) { listSalonlar.ItemsSource = sender.salonlar; gpsLoader.IsIndeterminate = false; gpsLoader.Visibility = System.Windows.Visibility.Collapsed; }
void PostGPSDetection_DataBinding() { Salonlar yakinSalonlar = new Salonlar(); yakinSalonlar.getCompleted += yakinSalonlar_getCompleted; yakinSalonlar.get(mevcutLokasyon.Latitude, mevcutLokasyon.Longitude); }