List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:February 3 2011 4:58pm
Subject:bzr commit into wex-installer-1.0 branch (reggie.burnett:293)
View as plain text  
#At file:///C:/Users/Reggie/work/wex/installer-updated/ based on revid:reggie.burnett@stripped

  293 Reggie Burnett	2011-02-03
      fixed download and install progress when multiple products with similar titles are included

    modified:
      WexInstaller/InstallWizard/InstallProgressPanel.cs
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.cs'
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.cs	2011-02-02 16:43:49 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.cs	2011-02-03 16:58:47 +0000
@@ -57,7 +57,7 @@
                 {
                     if (!p.ProposedInstalled) continue;
                     ListViewItem item = new ListViewItem(p.TitleWithVersion);
-                    item.Name = p.Title;
+                    item.Name = p.Name;
                     item.Tag = p;
                     item.SubItems.Add(GetProductStateString(p.CurrentState));
                     item.SubItems.Add(String.Empty);
@@ -207,7 +207,7 @@
 
                 p.DownloadProductProgressChanged += new DownloadProductProgressHandler(product_DownloadProductProgressChanged);
                 p.DownloadProductCompleted += new DownloadProductCompleteHandler(product_DownloadProductCompleted);
-                progressLevels.Add(p.Title, -1);
+                progressLevels.Add(p.Name, -1);
                 p.Download();
                 Thread.Sleep(0);
                 Application.DoEvents();
@@ -217,7 +217,7 @@
         void product_DownloadProductCompleted(object sender, AsyncCompletedEventArgs e)
         {
             Product p = (sender as Product);
-            ListViewItem item = productList.Items.Find(p.Title, false)[0];
+            ListViewItem item = productList.Items.Find(p.Name, false)[0];
             Debug.Assert(item != null);
             item.StateImageIndex = (int)InstallProgressState.None;
             item.SubItems[1].Text = GetProductStateString(p.CurrentState);
@@ -231,17 +231,17 @@
         void product_DownloadProductProgressChanged(object sender, DownloadProgressChangedEventArgs e)
         {
             Product p = (sender as Product);
-            ListViewItem item = productList.Items.Find(p.Title, false)[0];
+            ListViewItem item = productList.Items.Find(p.Name, false)[0];
             Debug.Assert(item != null);
 
-            if (progressLevels[p.Title] == -1)
+            if (progressLevels[p.Name] == -1)
             {
                 AddToDetailsText(item.Index, String.Format("Download of product '{0}' started from {1}",
                                                            p.Name,
                                                            e.UserState.ToString()));
             }
 
-            progressLevels[p.Title] = e.ProgressPercentage;
+            progressLevels[p.Name] = e.ProgressPercentage;
             int progress = 0;
             foreach (int val in progressLevels.Values)
                 progress += val;
@@ -301,7 +301,7 @@
         private void ProductInstallationProgressChanged(object sender, ChainedInstallerEventArgs e)
         {
             Product p = (sender as Product);
-            ListViewItem item = productList.Items.Find(p.Title, false)[0];
+            ListViewItem item = productList.Items.Find(p.Name, false)[0];
             Debug.Assert(item != null);
 
             switch (e.Action)


Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20110203165847-0bx6v621ctm6d52w.bundle
Thread
bzr commit into wex-installer-1.0 branch (reggie.burnett:293) Reggie Burnett3 Feb