Update progress bar from Task.Run async

后端 未结 2 769
误落风尘
误落风尘 2021-02-10 09:34

I have a method to generate software activation key from User Information:

private async void GenerateAsync()
        {
            await Task.Run(() =>
              


        
2条回答
  •  广开言路
    2021-02-10 10:05

    I use this method in Winforms:

    progressBar1.Invoke((Action)(() => progressBar1.Value=50))
    

提交回复
热议问题