async void getJoke_Clicked(object sender, System.EventArgs e) { jokeLabel.TextColor = Color.Fuchsia; jokeLabel.Text = "...geting a joke..."; var strJoke = await Joke.GetJoke(); jokeLabel.TextColor = Color.Black; jokeLabel.Text = strJoke; }
public async Task DadJoke() { Joke joke = Joke.GetJoke(); await ReplyAsync(joke.Setup); Thread.Sleep(6500); await ReplyAsync(joke.PunchLine); }
private async void getJokeButton_Clicked(object sender, RoutedEventArgs e) { jokeTextBox.Foreground = Brushes.Fuchsia; jokeTextBox.TextAlignment = TextAlignment.Center; jokeTextBox.Text = "...geting a joke..."; var strJoke = await Joke.GetJoke(); jokeTextBox.Foreground = Brushes.Black; jokeTextBox.TextAlignment = TextAlignment.Justify; jokeTextBox.Text = strJoke; }