Exemplo n.º 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;
        }
Exemplo n.º 2
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;
        }