private void RestartToolStripMenuItemClick(object sender, EventArgs e)
{
splitContainer.Visible = false;
restartToolStripMenuItem.Enabled = false;
getStartedToolStripMenuItem.Enabled = true;
richTextBoxRequest.Text = string.Empty;
richTextBoxResponse.Text = string.Empty;
//clean up the loging control
if (_login != null)
{
_login.DoLogin -= LoginDoLogin;
_login.Parent = null;
_login = null;
}
//clean up the contact list control
if (_contactListControl != null)
{
_contactListControl.DoShowContactsInList -= ContactListControlDoShowContactsInList;
_contactListControl.Parent = null;
_contactListControl = null;
}
//clean up the contact list control
if (_contactControl != null)
{
_contactControl.DoBack -= ContactControlDoBack;
_contactControl.Parent = null;
_contactControl = null;
}
}