CSharpTutor.FrmMain.ContactListControlDoShowContactsInList C# (CSharp) Method

ContactListControlDoShowContactsInList() private method

event triggered when the user tries to view contacts in a contact list
private ContactListControlDoShowContactsInList ( object sender, EventArgs e ) : void
sender object the contact list control
e System.EventArgs e
return void
        private void ContactListControlDoShowContactsInList(object sender, EventArgs e)
        {
            if (_contactListControl == null) return;
            _contactListControl.DoShowContactsInList -= ContactListControlDoShowContactsInList;
            _contactListControl.Parent = null;
            _contactListControl = null;

            //show the contact API calls control
            _contactControl = new ContactControl(this, _credentialsDetails)
                                  {Dock = DockStyle.Fill, Parent = splitContainer.Panel1};
            _contactControl.DoBack += (ContactControlDoBack);
        }