private void WelcomePage_PageUnload(object sender, W3b.Wizards.PageChangeEventArgs e) { /////////////////////// // Installer Condition if (!PackageInfo.IgnoreCondition && !InstallationInfo.EvaluateInstallerCondition()) { String message = InstallerResources.CustomizedSettings.InstallerConditionMessage; MessageBox.Show(this, message, "Anolis Installer", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } /////////////////////// // Pending Operations if (!PackageInfo.IgnoreCondition && PackageUtility.HasPendingRestart()) { String message; if (InstallerResources.IsCustomized) { message = InstallerResources.GetString("A_PendingOperations_Cus", InstallerResources.CustomizedSettings.InstallerFullName); } else { message = InstallerResources.GetString("A_PendingOperations"); } MessageBox.Show(message, InstallationInfo.InstallerTitle, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); e.Cancel = true; } }
private void InstallationOptionsPage_Load(object sender, EventArgs e) { String backupDir = @"%programfiles%\Anolis\Installer\Backup " + Miscellaneous.RemoveIllegalFileNameChars(PackageInfo.Package.Name, null) + "-" + DateTime.Now.ToString("yyyy-MM-dd hh-mm"); this.__backupPath.Text = PackageUtility.ResolvePath(backupDir); if (!PackageInfo.IgnoreCondition) { if (InstallationInfo.FailedCondition || !InstallationInfo.EvaluateInstallerCondition()) { __i386.Checked = true; __comp.Enabled = false; } } }