private void btnEncode_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(txtBoxInput.Text) || string.IsNullOrEmpty(txtBoxOutput.Text)) { return; } // Start Encoding Enc.Encode(); // synchronous }