예제 #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }

            if (darkBackgroundBrush != null)
            {
                darkBackgroundBrush.Dispose();
            }
            if (lightBackgroundBrush != null)
            {
                lightBackgroundBrush.Dispose();
            }
            if (borderPen != null)
            {
                borderPen.Dispose();
            }
            if (borderDotPen != null)
            {
                borderDotPen.Dispose();
            }
            if (nodeBackgroundBrush != null)
            {
                nodeBackgroundBrush.Dispose();
            }
            if (infoFont != null)
            {
                infoFont.Dispose();
            }
            if (infoFontMedium != null)
            {
                infoFontMedium.Dispose();
            }
            if (infoFontBig != null)
            {
                infoFontBig.Dispose();
            }
            if (textBackgroundBrush != null)
            {
                textBackgroundBrush.Dispose();
            }
            if (textBackgroundPenWhite != null)
            {
                textBackgroundPenWhite.Dispose();
            }
            if (textBackgroundPenBlack != null)
            {
                textBackgroundPenBlack.Dispose();
            }
            if (markerPen != null)
            {
                markerPen.Dispose();
            }

            if (regionFillPath != null)
            {
                if (LastRegionFillPath != null)
                {
                    LastRegionFillPath.Dispose();
                }
                LastRegionFillPath = regionFillPath;
            }
            else
            {
                if (regionFillPath != null)
                {
                    regionFillPath.Dispose();
                }
                if (regionDrawPath != null)
                {
                    regionDrawPath.Dispose();
                }
            }

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

            base.Dispose(disposing);
        }
예제 #2
0
        protected override void Dispose(bool disposing)
        {
            if (ShapeManager != null)
            {
                ShapeManager.Dispose();
            }

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

            if (disposing && (components != null))
            {
                components.Dispose();
            }

            if (backgroundBrush != null)
            {
                backgroundBrush.Dispose();
            }
            if (backgroundHighlightBrush != null)
            {
                backgroundHighlightBrush.Dispose();
            }
            if (borderPen != null)
            {
                borderPen.Dispose();
            }
            if (borderDotPen != null)
            {
                borderDotPen.Dispose();
            }
            if (nodeBackgroundBrush != null)
            {
                nodeBackgroundBrush.Dispose();
            }
            if (infoFont != null)
            {
                infoFont.Dispose();
            }
            if (infoFontMedium != null)
            {
                infoFontMedium.Dispose();
            }
            if (infoFontBig != null)
            {
                infoFontBig.Dispose();
            }
            if (textBackgroundBrush != null)
            {
                textBackgroundBrush.Dispose();
            }
            if (textOuterBorderPen != null)
            {
                textOuterBorderPen.Dispose();
            }
            if (textInnerBorderPen != null)
            {
                textInnerBorderPen.Dispose();
            }
            if (markerPen != null)
            {
                markerPen.Dispose();
            }

            if (regionFillPath != null)
            {
                if (Result == RegionResult.Region)
                {
                    if (LastRegionFillPath != null)
                    {
                        LastRegionFillPath.Dispose();
                    }

                    LastRegionFillPath = regionFillPath;
                }
                else
                {
                    regionFillPath.Dispose();
                }
            }

            if (regionDrawPath != null)
            {
                regionDrawPath.Dispose();
            }
            if (Image != null)
            {
                Image.Dispose();
            }

            base.Dispose(disposing);
        }