There are several ways to do that, I would go about it this way:
// the encrypt button event handler
encrypt_Click(object sender, EventArgs e)
{
// assuming you've named the text box for the key txtKey and the
// combo box for the encryption type cboEnc do the following
string key = txtKey.Text;
string encType = cboEnc.SelectedItem.ToString();
switch(encType)
{
case "FirstEncryptionType":
// use this encryption;
break;
case "SecondEncryptionType":
// use this encryption
break;
default:
// use the final incryption type
break;
}
} So maybe I'm not understandin your question properly. But that's how you could do, just use a switch statment to find out which encryption type to use, then do the statements from there.