Inheritance: Annotation
Ejemplo n.º 1
0
        protected override void DisposeManaged()
        {
            if (_data != null) {
                _data.FillInvalidated -= HandleFillInvalidated;
                _data.FillGlowInvalidated -= HandleFillGlowInvalidated;
                _data.OutlineInvalidated -= HandleOutlineInvalidated;
                _data.OutlineGlowInvalidated -= HandleOutlineGlowInvalidated;
                _data = null;
            }

            if (_fillBrush != null) {
                _fillBrush.Dispose();
                _fillBrush = null;
            }

            if (_fillGlowBrush != null) {
                _fillGlowBrush.Dispose();
                _fillGlowBrush = null;
            }

            if (_outlinePen != null) {
                _outlinePen.Dispose();
                _outlinePen = null;
            }

            if (_outlineGlowPen != null) {
                _outlineGlowPen.Dispose();
                _outlineGlowPen = null;
            }

            base.DisposeManaged();
        }
Ejemplo n.º 2
0
 protected DrawAnnotationRenderer(DrawAnnotation data)
 {
     _data = data;
     _data.FillInvalidated += HandleFillInvalidated;
     _data.FillGlowInvalidated += HandleFillGlowInvalidated;
     _data.OutlineInvalidated += HandleOutlineInvalidated;
     _data.OutlineGlowInvalidated += HandleOutlineGlowInvalidated;
 }