You have to get the index of the client from the ContextMenuStrip parent.
In the example you showed, the user is instantiating another dialog to return the new name (string value).
Code example:
using (frmNewName choose = new frmNewName())
{
if(choose.ShowDialog()==DialogResult.OK)
{
ChangeName(client, choose.NewName);
}
}
The code is pretty noob-friendly and self exaplainatory.