示例#1
0
        public IntelWindow()
        {
            InitializeComponent();

            settingsForm.SettingsUI.ChangedSettings += ApplySettings;

            this.Text = "EVE Intel Monitor - " + ApplicationInstaller.GetCurrentVersion();
        }
示例#2
0
        private void backgroundDownloader_DoWork(object sender, DoWorkEventArgs e)
        {
            AppVersion version = GetSelectedVersion();

            if (version != null)
            {
                string path     = textTemporaryInstallerPath.Text;
                string filename = Path.GetFileName(version.URL);
                path = Path.Combine(path, filename);

                bool downloadFile = true;

                if (File.Exists(path))
                {
                    downloadFile = false;

                    DialogResult redownloadResult = MessageBox.Show("The installer file already downloaded, would you like to redownload it?", "Redownload the installer?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                    if (redownloadResult == DialogResult.Yes)
                    {
                        File.Delete(path);
                        downloadFile = true;
                    }
                }

                bool installerAvaialble = false;


                if (downloadFile)
                {
                    installerAvaialble = ApplicationInstaller.DownloadVersion(version.URL, path,
                                                                              SetToolTip, SetProgressMax, AddProgressValue);
                }

                if (installerAvaialble)
                {
                    DialogResult result = MessageBox.Show("Would you like to close EVE Intel Monitor and launch the installer?", "Launch the installer?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (result == DialogResult.Yes)
                    {
                        System.Diagnostics.Process.Start(path);
                        Application.Exit();
                    }
                }
            }
        }
示例#3
0
        private void upgradeToVersionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolStripStatusLabel.Text = "Loading all available versions.";

            AppVersionList versionList;

            if (ApplicationInstaller.PromptUpgrade(out versionList))
            {
                ApplicationInstallerForm installerForm = new ApplicationInstallerForm();
                installerForm.VersionList = versionList;

                installerForm.PopulateVersions();
                installerForm.Show(this);
            }
            else
            {
                toolStripStatusLabel.Text = "No versions avaialble for download.";
            }
        }
示例#4
0
        private void CheckForUpdates()
        {
            toolStripStatusLabel.Text = "Checking for updates...";

            AppVersionList versionList;

            if (ApplicationInstaller.CheckForUpdates(out versionList))
            {
                ApplicationInstallerForm installerForm = new ApplicationInstallerForm();
                installerForm.VersionList = versionList;

                installerForm.PopulateLatestVersion();
                installerForm.Show(this);

                toolStripStatusLabel.Text = "New version found.";
            }
            else
            {
                toolStripStatusLabel.Text = "Current version is up to dated.";
            }
        }