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;
        }
Beispiel #2
0
        public async Task DadJoke()
        {
            Joke joke = Joke.GetJoke();

            await ReplyAsync(joke.Setup);

            Thread.Sleep(6500);
            await ReplyAsync(joke.PunchLine);
        }
Beispiel #3
0
        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;
        }