Esempio n. 1
0
        protected override void OnDetaching()
        {
            var source     = AssociatedObject;
            var convexHull = ConvexHullService.GetConvexHull(source);

            if (convexHull is INotifyCollectionChanged notifySource)
            {
                notifySource.CollectionChanged -= OnConvexHullChanged;
            }
            searcher = null;
        }
Esempio n. 2
0
        protected override void OnAttached()
        {
            var source     = AssociatedObject;
            var convexHull = ConvexHullService.GetConvexHull(source);

            if (convexHull is INotifyCollectionChanged notifySource)
            {
                notifySource.CollectionChanged += OnConvexHullChanged;
            }
            searcher = new FarthestPairSearcher(convexHull);
        }