private void buttonDecode_Click(object sender, EventArgs e) { var language = cbLanguage.SelectedItem.ToString(); var coder = new Coder(language); var encodedText = rtbInput.Text; var key = cbPossibleKeys.SelectedItem.ToString(); var decodedText = coder.Decode(encodedText, key); rtbOutput.Text = decodedText; }
private void buttonEncode_Click(object sender, EventArgs e) { var key = tbKey.Text; var text = rtbInput.Text; var language = cbLanguage.SelectedItem.ToString(); var coder = new Coder(language); var encodedText = coder.Encode(text, key); rtbOutput.Text = encodedText; tbKey.Clear(); }