Esempio n. 1
0
        public override void Clean()
        {
            Source   = null;
            Target   = null;
            Edge     = null;
            RootArea = null;
            HighlightBehaviour.SetIsHighlightEnabled(this, false);
            DragBehaviour.SetIsDragEnabled(this, false);
            Linegeometry      = null;
            LinePathObject    = null;
            SelfLoopIndicator = null;
            EdgeLabelControls.ForEach(l => l.Dispose());
            EdgeLabelControls.Clear();

            if (EdgePointerForSource != null)
            {
                EdgePointerForSource.Dispose();
                EdgePointerForSource = null;
            }
            if (EdgePointerForTarget != null)
            {
                EdgePointerForTarget.Dispose();
                EdgePointerForTarget = null;
            }
            EventOptions?.Clean();
        }
        public override void Clean()
        {
            //TODO rename to _sourceWatcher _targetWatcher
            if (_sourceWatcher != null)
            {
                _sourceWatcher.Dispose();
            }
            if (_targetWatcher != null)
            {
                _targetWatcher.Dispose();
            }
            if (Source != null)
            {
                Source.PositionChanged -= source_PositionChanged;
            }
            if (Target != null)
            {
                Target.PositionChanged -= source_PositionChanged;
            }
            _oldSource = _oldTarget = null;
            Source     = null;
            Target     = null;
            Edge       = null;
            RootArea   = null;
            HighlightBehaviour.SetIsHighlightEnabled(this, false);
            DragBehaviour.SetIsDragEnabled(this, false);
            _linegeometry     = null;
            LinePathObject    = null;
            SelfLoopIndicator = null;
            if (EdgeLabelControl != null)
            {
                EdgeLabelControl.Dispose();
                EdgeLabelControl = null;
            }

            if (EdgePointerForSource != null)
            {
                EdgePointerForSource.Dispose();
                EdgePointerForSource = null;
            }
            if (EdgePointerForTarget != null)
            {
                EdgePointerForTarget.Dispose();
                EdgePointerForTarget = null;
            }
            if (EventOptions != null)
            {
                EventOptions.Clean();
            }
        }