UpdateApplicationAsync() public method

進捗を報告しながら、アプリケーションを更新します。
public UpdateApplicationAsync ( IProgress progress = null ) : System.Threading.Tasks.Task
progress IProgress
return System.Threading.Tasks.Task
示例#1
0
文件: MainForm.cs 项目: yuki87/Candy
        protected override async void OnShown(EventArgs e)
        {
            base.OnShown(e);

            var progress = new Progress <ProgressStatus>();

            progress.ProgressChanged += (_, status) =>
            {
                progressBar1.Value = status.Percentage;
                lblStatus.Text     = status.Message;
            };

            await _updater.UpdateApplicationAsync(progress);

            Close();
        }