UpdateApplicationAsync() public method

進捗を報告しながら、アプリケーションを更新します。
public UpdateApplicationAsync ( IProgress progress = null ) : System.Threading.Tasks.Task
progress IProgress
return System.Threading.Tasks.Task
Exemplo n.º 1
0
        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();
        }