private IHandler _GetChangedMarkedObject(MouseEventArgs e, bool wasOnlyOneClick) { IHandler res = (wasOnlyOneClick ? _handlerFactory.GetPartOfShapeHandler(e.Location) : _handlerFactory.GetEntireShapeHandler(e.Location)); return(res); }
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(); } }