UpdateApplicationAsync() 공개 메소드

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