List:Commits« Previous MessageNext Message »
From:Mike Lischke Date:June 27 2011 11:38am
Subject:bzr commit into wex-installer-1.0 branch (mike.lischke:526) Bug#61585
View as plain text  
#At file:///D:/Work/MySQL/installer/ based on revid:iggy@stripped

  526 Mike Lischke	2011-06-27
      - Bug #61585 	MySQL Installer should allow exit from update w/o confirmation
      - [QA] When running the update check and there is no update available then closing the installer (using the red cross or Cancel button) should not ask the user for confirmation (just like on the welcome screen).

    modified:
      WexInstaller.Core/InstallerPanel.cs
      WexInstaller/Controls/InstallWizardControl.cs
      WexInstaller/InstallWizard/DetailedUpdateCheck.cs
      WexInstaller/MainForm.cs
=== modified file 'WexInstaller.Core/InstallerPanel.cs'
=== modified file 'WexInstaller.Core/InstallerPanel.cs'
--- a/WexInstaller.Core/InstallerPanel.cs	2011-06-06 12:33:14 +0000
+++ b/WexInstaller.Core/InstallerPanel.cs	2011-06-27 11:38:31 +0000
@@ -32,6 +32,7 @@
       parentControl = null;
       nextButton = backButton = cancelButton = null;
       nextOk = backOk = cancelOk = true;
+      WorkDone = false;
 
       InitializeComponent();
     }
@@ -136,6 +137,12 @@
       }
     }
 
+    /// <summary>
+    /// Property that can be used to signal that a panel has done all its work and there is no
+    /// need to ask the user if he agrees when closing the application.
+    /// </summary>
+    public bool WorkDone { get; set; }
+
     public virtual void Activate()
     {
       Logger.LogInformation(String.Format("Beginning {0}.", this.Name));

=== modified file 'WexInstaller/Controls/InstallWizardControl.cs'
--- a/WexInstaller/Controls/InstallWizardControl.cs	2011-06-09 12:46:14 +0000
+++ b/WexInstaller/Controls/InstallWizardControl.cs	2011-06-27 11:38:31 +0000
@@ -29,7 +29,6 @@
       InstallerPanel.StatusChanged += statusChanged;
     }
 
-    // True if we are done here.
     public bool WorkDone { get; set; }
 
     private void AdjustTabs()
@@ -238,7 +237,7 @@
       }
     }
 
-    private InstallerPanel CurrentPanel
+    public InstallerPanel CurrentPanel
     {
       get
       {

=== modified file 'WexInstaller/InstallWizard/DetailedUpdateCheck.cs'
--- a/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2011-06-09 12:46:14 +0000
+++ b/WexInstaller/InstallWizard/DetailedUpdateCheck.cs	2011-06-27 11:38:31 +0000
@@ -94,8 +94,8 @@
 
       ProductManager.CancelDownload();
       nextOk = false;
-      NextButton.Enabled = false;
-      NextButton.Refresh();
+      SignalChange();
+
       return base.Cancel();
     }
 
@@ -159,6 +159,8 @@
           }
         }
       }
+
+      WorkDone = productList.Items.Count == 0;
     }
 
     private void skipUpdates_CheckedChanged(object sender, EventArgs e)

=== modified file 'WexInstaller/MainForm.cs'
--- a/WexInstaller/MainForm.cs	2011-06-23 12:54:16 +0000
+++ b/WexInstaller/MainForm.cs	2011-06-27 11:38:31 +0000
@@ -150,10 +150,11 @@
     /// <returns>True if we can shut down, false otherwise.</returns>
     public bool CanClose()
     {
-      bool result = (Current == welcomeControl);
+      bool result = (Current == welcomeControl ||
+        (Current is InstallerPanel && (Current as InstallerPanel).WorkDone));
       if (!result)
         if (Current == installWizardControl)
-          result = installWizardControl.WorkDone;
+          result = installWizardControl.WorkDone || installWizardControl.CurrentPanel.WorkDone;
         else
           if (Current == removeWizardControl)
             result = removeWizardControl.WorkDone;


Attachment: [text/bzr-bundle] bzr/mike.lischke@oracle.com-20110627113831-y59ppwwlkdozn20c.bundle
Thread
bzr commit into wex-installer-1.0 branch (mike.lischke:526) Bug#61585Mike Lischke27 Jun