public SectionContainerControl( SectionFactory sectionFactory ) { InitializeComponent(); SetStyle( ControlStyles.AllPaintingInWmPaint, true ); SetStyle( ControlStyles.DoubleBuffer, true ); SetStyle( ControlStyles.ResizeRedraw, true ); SetStyle( ControlStyles.SupportsTransparentBackColor, true ); _canvas = CreateCanvas(); if( sectionFactory == null ) { _sectionFactory = new SectionFactory(); } else { _sectionFactory = sectionFactory; } }
protected override void Dispose( bool disposing ) { base.Dispose( disposing ); if( disposing ) { if( _canvas != null ) { _canvas.Dispose(); _canvas = null; } StopLazyUpdateTimer(); } }