Beispiel #1
0
 private void Map_PinClicked(object sender, PinClickedEventArgs e)
 {
     Current?.CancelCommand.Execute(null);
     Current        = CreateLocVM(pins[e.Pin].ShallowCopy());
     slider.Maximum = Math.Max(map.VisibleRegion.Radius.Meters, Current.Radius);
     slider.Value   = Current.Radius;
     slider.Minimum = 1;
 }
Beispiel #2
0
 void OnCancel()
 {
     if (!pins.ContainsKey(Current.MapPin))
     {
         map.Pins.Remove(Current.MapPin);
     }
     map.Circles.Remove(Current.MapCircle);
     Current = null;
 }
Beispiel #3
0
        void CreateLocation(double lat, double lng)
        {
            var location = new Location
            {
                Coords = new Position(lat, lng),
                Radius = map.VisibleRegion.Radius.Meters
            };

            Current        = CreateLocVM(location);
            slider.Maximum = slider.Value = Current.Radius;
            slider.Minimum = 1;
            map.Pins.Add(Current.MapPin);
        }
Beispiel #4
0
 public Map(Location loc) : this()
 {
     Current = CreateLocVM((pins.Where((pair) => pair.Value.Id == loc.Id).First().Value.ShallowCopy()));
 }
Beispiel #5
0
 void OnSave()
 {
     pins[Current.MapPin] = Current.Loc;
     map.Circles.Remove(Current.MapCircle);
     Current = null;
 }