private void StartButton_Click(object sender, EventArgs e) { if (!EncryptRadio.Checked && !DecryptRadio.Checked) { ShowErrorWindow("Choose an option first"); return; } if (InputTextBox.Text == "") { ShowErrorWindow("Check the correction of your input"); return; } TextFormatter Formatter = new TextFormatter(TextWorker, FormatMethod); // Make sure that text is clean of unuseful spaces string targetText = InputTextBox.Text.DeleteLeadingAndTrailingSpaces(); string result = Formatter.ExecuteProcess(targetText).DeleteLeadingAndTrailingSpaces(); OutputTextBox.Text = result; CopyToBufferButton.Enabled = true; }