async void GetTextAsync(object sender, EventArgs e) { GoPGP GoPgp = new GoPGP(); LabelEncryptedText.Text = "Результат:"; string Result = ""; try { Result = Option? GoPgp.EncodeText(TextEditor.Text) : GoPgp.DecryptText(TextEditor.Text); EncryptedText.Text = Option ? Result.Substring(0, 300) + "..." : Result; await Clipboard.SetTextAsync(Result); } catch { await DisplayAlert("Ошибка!", "Не коректный текст!", "ОK"); } }