Esempio n. 1
0
        /// <summary>
        /// </summary>
        /// <param name="disposing">
        ///		<see langword="true"/> to dispose both managed and unmanaged resources;
        ///		<see langword="false"/> to dispose only unmanaged resources.
        /// </param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_msgFilter != null)
                {
                    _msgFilter.ReleaseHandle();
                    _msgFilter.MouseDown -= _msgFilter_MouseDown;
                    _msgFilter.MouseMove -= _msgFilter_MouseMove;
                    _msgFilter.MouseUp   -= _msgFilter_MouseUp;
                    _msgFilter.Paint     -= _msgFilter_Paint;
                    _msgFilter            = null;
                }

                if (_showPointerTimer != null)
                {
                    _showPointerTimer.Tick -= _showPointerTimer_Tick;
                    _showPointerTimer.Dispose();
                }
            }

            base.Dispose(disposing);
        }