示例#1
0
 protected internal virtual bool OnVillageDoubleClickCore(MapVillageEventArgs e)
 {
     return false;
 }
        public bool OnVillageDoubleClickCore(MapVillageEventArgs e)
        {
            if (_fullControllManipulator != null)
            {
                var mustRedraw = _fullControllManipulator.OnVillageDoubleClickCore(e);
                if (mustRedraw)
                    return true;
            }

            bool redraw = false;
            foreach (ManipulatorBase m in _manipulators) redraw |= m.OnVillageDoubleClickCore(e);
            return redraw;
        }
        protected internal override bool OnVillageClickCore(MapVillageEventArgs e)
        {
            if (_pinPointedVillage != null)
            {
                if (_pinPointedVillage == e.Village)
                {
                    _unpinpointedVillage = e.Village;
                    _pinPointedVillage = null;
                    _selectedVillage = null;
                    _lockPinpointedVillage = false;

                    _map.EventPublisher.Deselect(this);

                    return true;
                }
                else if (_lockPinpointedVillage)
                {
                    return false;
                }
                else
                {
                    _pinPointedVillage = e.Village;
                    _map.EventPublisher.SelectVillages(this, e.Village, VillageTools.PinPoint);
                    return true;
                }
            }

            _map.EventPublisher.SelectVillages(this, e.Village, VillageTools.PinPoint);
            return _selectedVillage != e.Village;
        }
 public bool OnVillageClickCore(MapVillageEventArgs e)
 {
     if (_fullControllManipulator != null)
     {
         return _fullControllManipulator.OnVillageClickCore(e);
     }
     else
     {
         bool redraw = false;
         foreach (ManipulatorBase m in _manipulators) redraw |= m.OnVillageClickCore(e);
         return redraw;
     }
 }