Beispiel #1
0
        /// <summary>
        /// Updates the init button description and functionality.
        /// </summary>
        private void initUpdateButton()
        {
            if (this.dkimSignerInstalled != null && this.dkimSignerAvailable != null)
            {
                if (dkimSignerInstalled.CompareTo(dkimSignerAvailable.Version) > 0)
                {
                    updateButtonType       = UpdateButtonType.Downgrade;
                    btUpateInstall.Text    = "Downgrade";
                    btUpateInstall.Enabled = true;
                }
                else if (dkimSignerInstalled.CompareTo(dkimSignerAvailable.Version) == 0)
                {
                    updateButtonType       = UpdateButtonType.Install;
                    btUpateInstall.Text    = "Reinstall";
                    btUpateInstall.Enabled = true;
                }
                else
                {
                    updateButtonType       = UpdateButtonType.Upgrade;
                    btUpateInstall.Text    = "Upgrade";
                    btUpateInstall.Enabled = true;
                }
            }
            else if (this.dkimSignerInstalled == null && this.dkimSignerAvailable != null)
            {
                updateButtonType       = UpdateButtonType.Install;
                btUpateInstall.Text    = "Install";
                btUpateInstall.Enabled = true;
            }
            else
            {
                updateButtonType       = UpdateButtonType.Disabled;
                btUpateInstall.Text    = "Update";
                btUpateInstall.Enabled = false;
            }

            if (this.dkimSignerInstalled != null)
            {
                btUninstall.Enabled = true;
                btUninstall.Text    = "Uninstall";
            }
            else
            {
                btUninstall.Enabled = false;
                btUninstall.Text    = "Uninstall";
            }
        }
Beispiel #2
0
        /// <summary>
        /// Updates the init button description and functionality.
        /// </summary>
        private void initUpdateButton()
        {
            if (this.dkimSignerInstalled!=null && this.dkimSignerAvailable!=null)
            {
                if (dkimSignerInstalled.CompareTo(dkimSignerAvailable.Version) > 0)
                {
                    updateButtonType = UpdateButtonType.Downgrade;
                    btUpateInstall.Text = "Downgrade";
                    btUpateInstall.Enabled = true;
                }
                else if (dkimSignerInstalled.CompareTo(dkimSignerAvailable.Version) == 0)
                {
                    updateButtonType = UpdateButtonType.Install;
                    btUpateInstall.Text = "Reinstall";
                    btUpateInstall.Enabled = true;
                } else {
                    updateButtonType = UpdateButtonType.Upgrade;
                    btUpateInstall.Text = "Upgrade";
                    btUpateInstall.Enabled = true;
                }
            }
            else if (this.dkimSignerInstalled == null && this.dkimSignerAvailable != null)
            {
                updateButtonType = UpdateButtonType.Install;
                btUpateInstall.Text = "Install";
                btUpateInstall.Enabled = true;
            }
            else
            {
                updateButtonType = UpdateButtonType.Disabled;
                btUpateInstall.Text = "Update";
                btUpateInstall.Enabled = false;
            }

            if (this.dkimSignerInstalled != null)
            {
                btUninstall.Enabled = true;
                btUninstall.Text = "Uninstall";
            }
            else
            {
                btUninstall.Enabled = false;
                btUninstall.Text = "Uninstall";
            }
        }