mirror of
https://gitlab.com/cleanflash/installer.git
synced 2026-08-13 02:41:38 +08:00
prevent installer from closing during installation
This commit is contained in:
+1
@@ -621,6 +621,7 @@ namespace CleanFlashInstaller {
|
|||||||
this.Name = "InstallForm";
|
this.Name = "InstallForm";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "Clean Flash Player Dev Installer";
|
this.Text = "Clean Flash Player Dev Installer";
|
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.InstallForm_FormClosing);
|
||||||
this.Load += new System.EventHandler(this.InstallForm_Load);
|
this.Load += new System.EventHandler(this.InstallForm_Load);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.flashLogo)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.flashLogo)).EndInit();
|
||||||
this.disclaimerPanel.ResumeLayout(false);
|
this.disclaimerPanel.ResumeLayout(false);
|
||||||
|
|||||||
@@ -293,5 +293,35 @@ If you ever change your mind, check out Clean Flash Player's website!";
|
|||||||
debugChosen = MessageBox.Show("Are you sure you want to install the debug version?\n\nThis version is only meant to be used by experienced developers!\nIf you are not sure, choose No.", "Clean Flash Installer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes;
|
debugChosen = MessageBox.Show("Are you sure you want to install the debug version?\n\nThis version is only meant to be used by experienced developers!\nIf you are not sure, choose No.", "Clean Flash Installer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes;
|
||||||
OpenBeforeInstall();
|
OpenBeforeInstall();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InstallForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
bool v1 = true;
|
||||||
|
// if installing
|
||||||
|
// note: msgbox not pauses the process
|
||||||
|
if (installPanel.Visible)
|
||||||
|
{
|
||||||
|
if (v1)
|
||||||
|
{
|
||||||
|
// hardlock, only force quit process
|
||||||
|
// follows current design since Back button is disabled
|
||||||
|
MessageBox.Show("Please, wait until process end", "Clean Flash Installer", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// soft alternative, expert mode, todo: better warning of consequences
|
||||||
|
if (MessageBox.Show("Are you sure you want to interrupt the process ?", "Clean Flash Installer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||||
|
{
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// use cases ?
|
||||||
|
// uninstall, currently not implemented
|
||||||
|
}
|
||||||
|
|
||||||
|
//todo: same for uninstaller: share same F
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user