Implements a search killer
Inheritance: IVwSearchKiller
Esempio n. 1
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing"><c>true</c> to release both managed and unmanaged
		/// resources; <c>false</c> to release only unmanaged resources.
		/// </param>
		/// -----------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			m_lastTextBoxInFocus = null;

			if (disposing)
			{
				if (components != null)
					components.Dispose();
				if (m_cacheMadeLocally && m_cache != null)
					m_cache.Dispose();
				//if (m_helpTopicProvider != null && (m_helpTopicProvider is IDisposable)) // No, since the client provides it.
				//	(m_helpTopicProvider as IDisposable).Dispose();
				if (m_htNamedWS != null)
					m_htNamedWS.Clear();
				if (m_messageFilterInstalled)
				{
					Application.RemoveMessageFilter(this);
					m_messageFilterInstalled = false;
				}
			}
			m_htNamedWS = null;
			m_helpTopicProvider = null;
			m_searchKiller = null;
			m_prevSearchText = null;
			m_vwRootsite = null;
			m_vwPattern = null;
			m_cache = null;

			base.Dispose(disposing);
		}
Esempio n. 2
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing"><c>true</c> to release both managed and unmanaged
		/// resources; <c>false</c> to release only unmanaged resources.
		/// </param>
		/// -----------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			m_lastTextBoxInFocus = null;

			if (disposing)
			{
				if (components != null)
					components.Dispose();
				if (m_cacheMadeLocally && m_cache != null)
					m_cache.Dispose();
				if (regexContextMenuFind != null)
					regexContextMenuFind.Dispose();
				if (regexContextMenuReplace != null)
					regexContextMenuReplace.Dispose();
				//if (m_helpTopicProvider != null && (m_helpTopicProvider is IDisposable)) // No, since the client provides it.
				//	(m_helpTopicProvider as IDisposable).Dispose();
				if (m_messageFilterInstalled)
				{
					Application.RemoveMessageFilter(this);
					m_messageFilterInstalled = false;
				}
			}
			m_helpTopicProvider = null;
			m_searchKiller = null;
			m_prevSearchText = null;
			m_vwRootsite = null;
			m_vwFindPattern = null;
			m_cache = null;
			regexContextMenuReplace = null;
			regexContextMenuFind = null;
			base.Dispose(disposing);
		}