protected override void Dispose(bool disposing)
{
// Must not be run more than once.
if (IsDisposed)
return;
if (disposing)
{
if (m_comboTextBox != null)
m_comboTextBox.KeyPress -= m_comboTextBox_KeyPress;
if (m_button != null)
m_button.KeyPress -= m_button_KeyPress;
if (ListBox != null)
{
ListBox.SelectedIndexChanged -= m_listBox_SelectedIndexChanged;
ListBox.SameItemSelected -= m_listBox_SameItemSelected;
}
}
if (m_tssPrevious != null)
{
Marshal.ReleaseComObject(m_tssPrevious);
m_tssPrevious = null;
}
base.Dispose(disposing);
}