private void BWEncrypt_Click(object sender, EventArgs e) { this.resultText.BeginInvoke((Action) delegate { if (this.inputText.Text != null) { this.resultText.Text = DBQuery.AesEncrypt(this.inputText.Text.ToString()); } else { this.resultText.Text = string.Empty; } }, null); }