Esempio n. 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise,
        /// false.</param>
        /// ------------------------------------------------------------------------------------
        protected override void Dispose(bool disposing)
        {
            System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
            if (disposing && (components != null))
            {
                components.Dispose();

                if (m_timer != null)
                {
                    m_timer.Stop();
                    m_timer.Dispose();
                    m_timer = null;
                }

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

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

            base.Dispose(disposing);
        }
Esempio n. 2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise,
        /// false.</param>
        /// ------------------------------------------------------------------------------------
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();

                if (m_timer != null)
                {
                    m_timer.Stop();
                    m_timer.Dispose();
                    m_timer = null;
                }

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

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

            base.Dispose(disposing);
        }
        public void ClearControl()
        {
            if (m_host == null)
            {
                return;
            }

            this.Items.Remove(m_host);
            m_host.Dispose();
            m_host = null;
        }