private void SetupForm_Closing(object sender, FormClosingEventArgs e) { if (AppDataSingleton.Instance.OneFormClosed) { return; } if (AppDataSingleton.Instance.ExitPromptSuppressed) { Application.Exit(); return; } if (AppDataSingleton.Instance.OldOxigenSystemModified) { Application.Exit(); return; } if (MessageBox.Show("Are you sure you want to exit Setup?\r\nYour system has not been modified. Please click OK to exit.", "Message", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { AppDataSingleton.Instance.OneFormClosed = true; ClientLogger logger = new PersistentClientLogger(); logger.Log("User_Exiting"); Application.Exit(); } else { e.Cancel = true; } }
private void InstallationComplete_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("9-InstallationComplete"); SendMissingOptionalRequirements(logger); ScreenSaver.SetScreenSaverActive(0); if (!AppDataSingleton.Instance.Repair) { // provoke LE, SU Process processLE = null; ProcessStartInfo startInfoLE = new ProcessStartInfo(AppDataSingleton.Instance.BinariesPath + "\\bin\\OxigenLE.exe", "/n"); try { processLE = Process.Start(startInfoLE); } catch { // ignore } Process processSU = null; ProcessStartInfo startInfoSU = new ProcessStartInfo(AppDataSingleton.Instance.BinariesPath + "\\bin\\OxigenSU.exe", "/n"); try { processSU = Process.Start(startInfoSU); } catch { // suppress all errors } processLE.WaitForExit(); processSU.WaitForExit(); } try { GenericRegistryAccess.DeleteRegistryKey(RegistryBranch.HKLM_LOCAL_MACHINE__SOFTWARE_OxigenRef); } catch { // suppress all errors } ScreenSaver.SetScreenSaver("Oxigen"); ScreenSaver.SetScreenSaverActive(1); ScreenSaver.SetScreenSaverTimeout(180); btnExit.Enabled = true; }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("2.2-UninstallOldOxigenProgress"); Application.DoEvents(); backgroundWorker.RunWorkerAsync(); }
private void PrerequisitesForm_Load(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("2-Prerequisites"); IInstallationPrerequisiteProvider installationPrerequisiteProvider; if (!AppDataSingleton.Instance.DebugMode) { installationPrerequisiteProvider = new RealInstallationPrerequisiteProvider(); } else { installationPrerequisiteProvider = new MockInstallationPrerequisiteProvider() { DotNet35PrerequisiteStatus = PrerequisiteStatus.Exists, FlashActiveXPrerequisiteStatus = PrerequisiteStatus.Exists, QTPrerequisiteStatus = PrerequisiteStatus.DoesNotExist, RamPrerequisiteStatus = PrerequisiteStatus.Exists, WMPPrerequisiteStatus = PrerequisiteStatus.DoesNotExist }; } InstallationPrerequisiteCollection prerequisites = new InstallationPrerequisiteCollection(installationPrerequisiteProvider); prerequisites.Add(new DotNet35Prerequisite(lnkNET, dotNetIndicator)); prerequisites.Add(new FlashActiveXPerequisite(lnkFlash, flashIndicator)); prerequisites.Add(new QTPrerequisite(lnkQuickTime, quickTimeIndicator)); prerequisites.Add(new RAMPrerequisite(ramIndicator)); prerequisites.Add(new WMPPrerequisite(lnkWMP, wmpIndicator)); prerequisites.CheckAllPrerequisites(); AppDataSingleton.Instance.PrerequisitesFullyMet = prerequisites.PrerequisitesFullyMet; if (prerequisites.PrerequisitesFullyMet) { SetupHelper.OpenForm <ExistingUserPromptForm>(this); return; } prerequisites.LogNotMetPrerequisites(logger); prerequisites.SetVisualIndicators(); if (prerequisites.CanContinueWithInstallation) { lblStatus.Text = "To enjoy Oxigen to the maximum, it is recommended that you install the optional components above."; btnNext.Enabled = true; } else { lblStatus.Text = "Please follow the links above to install the required software."; } }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("4.1-CredentialsRemind"); }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("1-Welcome"); }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("4-ExistingUserPrompt"); }
private void InstallationProgress_Shown(object sender, EventArgs e) { Application.DoEvents(); ClientLogger logger = new PersistentClientLogger(); logger.Log("8-InstallationProgress"); SetupHelper.ShowMessage(lblProgress, "Installing binaries..."); progressBar.Value = 3; // do uninstall steps if this is a repair if (AppDataSingleton.Instance.Repair) { SetupHelper.ShowMessage(lblProgress, "Repairing installation..."); try { SetupHelper.KillProcess("OxigenService"); } catch { MessageBox.Show("Oxigen Service could not be stopped. Oxigen Service must be stopped before uninstalling the software. Uninstall will now exit.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Application.Exit(); return; } SetupHelper.RemoveAllFiles(AppDataSingleton.Instance.BinariesPath + "bin", SetupHelper.GetSystemDirectory(), AppDataSingleton.Instance.DataPath); SetupHelper.UninstallMSI(this); } if (!CheckMSI()) { Application.Exit(); return; } SetupHelper.InstallMSI(this); progressBar.Value = 80; SetupHelper.ShowMessage(lblProgress, "Saving settings..."); try { SetupHelper.DoPostMSIInstallSteps(); progressBar.Value = 85; SetupHelper.CopySetup(); SetupHelper.ShowMessage(lblProgress, "Updating your details..."); SendDetails(); AppDataSingleton.Instance.SetupLogger.WriteMessage("InstallationProgress_Shown 1"); SetupHelper.SetRegistryForModifyUninstall(); AppDataSingleton.Instance.SetupLogger.WriteMessage("InstallationProgress_Shown 2"); progressBar.Value = 95; } catch (Exception ex) { if (ex is System.Net.WebException) { AppDataSingleton.Instance.SetupLogger.WriteError(ex); MessageBox.Show( "Unable to communicate with Oxigen servers. Please check your internet connection or try again later.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { MessageBox.Show("An error has occurred. Please contact Oxigen stating the following message:\r\n" + ex.Message + "\r\n\r\nOxigen now will rollback the changes it has made to your system and exit.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } progressBar.Value = 80; SetupHelper.ShowMessage(lblProgress, "Removing binaries..."); SetupHelper.UninstallMSI(this); progressBar.Value = 40; SetupHelper.ShowMessage(lblProgress, "Cleaning up..."); SetupHelper.RemoveAllFiles(AppDataSingleton.Instance.BinariesPath + "bin", SetupHelper.GetSystemDirectory(), AppDataSingleton.Instance.DataPath); progressBar.Value = 0; Application.Exit(); return; } SetupHelper.ShowMessage(lblProgress, "Starting Oxigen Service..."); // Start Screensaver Guardian try { System.Diagnostics.Process.Start(AppDataSingleton.Instance.BinariesPath + "bin\\OxigenService.exe"); } catch { // ignore starting of service. } progressBar.Value = 100; SetupHelper.OpenForm <InstallComplete>(this); }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("1.1-OlderOxigenExists"); }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("5-UserDetails"); }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("6-PCNamePCSubscriptions"); }
private void Form_Shown(object sender, EventArgs e) { ClientLogger logger = new PersistentClientLogger(); logger.Log("7-InstallationPaths"); }