public FindForm(ExcodeForm parent) { InitializeComponent(); this.parent = parent; caseSensitive.Checked = Properties.Settings.Default.FindCaseSensitive; stayOpen.Checked = Properties.Settings.Default.FindStayOpen; }
public UpdateForm(ToolStripButton button, ExcodeForm owner) { this.button = button; this.owner = owner; InitializeComponent(); if (DisableProgramaticUpdates) { UpToDate = true; Checking = false; UpdateStatus(); button.Visible = false; return; } autoCheck.Checked = Properties.Settings.Default.AutoCheckForUpdates; autoInstall.Checked = Properties.Settings.Default.AutoInstallUpdates; if (ApplicationDeployment.IsNetworkDeployed) { deployment = ApplicationDeployment.CurrentDeployment; deployment.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(CheckForUpdatesComplete); deployment.UpdateProgressChanged += new DeploymentProgressChangedEventHandler(ProgressChanged); deployment.UpdateCompleted += new AsyncCompletedEventHandler(UpdateComplete); currentVersion.Text = deployment.CurrentVersion.ToString(); UpToDate = true; Checking = false; UpdateStatus(); mainLabel.Text = "Click to Check to check for updates."; if (deployment.IsFirstRun) { if (autoCheck.Checked && MessageBox.Show("Welcome to Excode Author v" + deployment.CurrentVersion.ToString() + "\n\nThis application is set to check for updates automatically. Is this OK? (Nothing will install until you click the Update button, or enable auto-install.)", "Automatic Check for Updates", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { autoCheck.Checked = false; } if (autoCheck.Checked) { CheckForUpdates(); } } } else { button.Visible = false; UpToDate = true; Checking = false; UpdateStatus(); mainLabel.Text = "This build is not updatable."; } }