Ejemplo n.º 1
0
        private IHandler _GetChangedMarkedObject(MouseEventArgs e, bool wasOnlyOneClick)
        {
            IHandler res = (wasOnlyOneClick ? _handlerFactory.GetPartOfShapeHandler(e.Location)
                                            : _handlerFactory.GetEntireShapeHandler(e.Location));

            return(res);
        }
Ejemplo n.º 2
0
        private void _UpdateChosenPolygons(Point p)
        {
            if (_handlers.Count == 2)
            {
                this.Clear();
            }

            IHandler handler = _handlerFactory.GetEntireShapeHandler(p);

            if (handler is EmptyHandler)
            {
                return;
            }

            var polygonHandler = handler  as Polygon.EntirePolygonHandler;

            if (!_handlers.Any(elem => elem.PolygonIndex == polygonHandler.PolygonIndex))
            {
                _handlers.Add(polygonHandler);
                polygonHandler.Mark();
            }
        }