private void DownloadProgressWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     FormClosing -= DownloadProgressWindow_FormClosing;
     if (_shouldLaunchInstallFileOnClose)
     {
         InstallAndRelaunch?.Invoke(this, new EventArgs());
     }
     else
     {
         DialogResult = DialogResult.Cancel;
     }
 }
Ejemplo n.º 2
0
        public void FinishedDownloadingFile(bool isDownloadedFileValid)
        {
            _progressBar.Value  = 100;
            _progressLabel.Text = "100%";

            if (isDownloadedFileValid)
            {
                DialogResult = DialogResult.OK;
                InstallAndRelaunch.Invoke(this, new EventArgs());
            }

            else
            {
                DialogResult = DialogResult.Cancel;
                Close();
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Event called when the "Install and relaunch" button is clicked
 /// </summary>
 /// <param name="sender">not used.</param>
 /// <param name="e">not used.</param>
 private void OnInstallAndReLaunchClick(object sender, EventArgs e)
 {
     InstallAndRelaunch?.Invoke(this, new EventArgs());
 }