Beispiel #1
0
        private async void btnEncodeAsync_Click(object sender, RoutedEventArgs e)
        {
            txtBoxStatus.Text = "encoding started ...";

            // run a encoding in other thread
            var result = await Enc.EncodeAsync(); //async Task

            // encoding is finished here

            // modify UI object in UI thread
            Console.WriteLine(result);
            txtBoxStatus.Text = "encoding done. ";
        }