コード例 #1
0
        public PinViewModel AddMapPosition(MapPosition mapPosition, PinDisplayType type, bool showCircle)
        {
            foreach (PinViewModel model in Pins)
            {
                if (model.MapPosition == mapPosition)
                {
                    model.ColourType = type;
                    model.ShowCircle = showCircle;
                    return(model);
                }
            }

            var pinViewModel = new PinViewModel(this, mapPosition, type, showCircle);

            Pins.Add(pinViewModel);
            return(pinViewModel);
        }
コード例 #2
0
 public void AddPinViewModel(PinViewModel addedPin)
 {
     Pins.Add(addedPin);
 }
コード例 #3
0
 public void RemovePinViewModel(PinViewModel removedPin)
 {
     removedPin.Remove();
     Pins.Remove(removedPin);
 }