Example #1
0
        // no screen locking by clicking it
        private async void Button_Click_1(object sender, RoutedEventArgs e)
        {
            var slowCalculations = new SlowCalculations();
            var s = await Task.Run(() => slowCalculations.GetData());

            txtCalculatedData.Text = s;
        }
Example #2
0
        private async void btnUseAsyncCalc_Click(object sender, RoutedEventArgs e)
        {
            var slowCalculations = new SlowCalculations();
            var s = await slowCalculations.GetDataAsync();

            txtCalculatedData.Text = s;
        }
Example #3
0
        // this method will cause screen to lock
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var slowCalculations = new SlowCalculations();
            var s = slowCalculations.GetData();

            txtCalculatedData.Text = s;
        }