private void BtnAddListClick(object sender, EventArgs e)
{
try
{
//clean up the response and request areas
FrmMain.RequestString = string.Empty;
FrmMain.ResponseString = string.Empty;
string strRequest = string.Empty;
string strResponse = string.Empty;
var nList = new FrmAddList();
var dlg = nList.ShowDialog();
if (dlg == DialogResult.OK)
{
Cursor.Current = Cursors.WaitCursor;
var newlyAddedList = OperationsComponent.AddContactList(CredentialsDetails, nList.ListName,
out strRequest, out strResponse);
Cursor.Current = Cursors.Default;
_contactList.Add(newlyAddedList);
SetListBox();
LstLists.SetSelected(LstLists.FindString(newlyAddedList.Name), true);
}
FrmMain.RequestString = strRequest;
FrmMain.ResponseString = strResponse;
}
catch (Exception exception)
{
MessageBox.Show(exception.Message, Resources.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Cursor.Current = Cursors.Default;
}