private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                var progress = new Progress <int>();
                progress.ProgressChanged += (s, o) => { ProgressIndicator.ProgressBar.Value = o; };

                await ProcDump.DoDownloadAndInstallProcDump(progress);
            }
            catch (Exception exception)
            {
                Logger.Error(exception, exception.Message);
                GenericMessageDialog.Show(Properties.Resources.ProcdumpInstallError, DialogIcon.Error, DialogOptions.Ok);
            }
            finally
            {
                Close();
            }
        }
Exemple #2
0
        private async void InstallProcDump_Shown(object sender, EventArgs e)
        {
            try
            {
                var progress = new Progress <int>();
                progress.ProgressChanged += (s, o) => { progressBar1.Value = o; };

                await ProcDump.DoDownloadAndInstallProcDump(progress);
            }
            catch (Exception exception)
            {
                MsgBox.ShowMessage(
                    $@"Error: {exception.Message}",
                    @"Celeste Fan Project",
                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            finally
            {
                Close();
            }
        }