#At file:///C:/src/bzr.mysql/wex/installer/ based on revid:iggy@stripped
272 Iggy Galarza 2011-01-31
Fixed State Images.
modified:
WexInstaller/InstallWizard/AllConfigOverview.cs
=== modified file 'WexInstaller/InstallWizard/AllConfigOverview.cs'
--- a/WexInstaller/InstallWizard/AllConfigOverview.cs 2011-01-31 05:03:43 +0000
+++ b/WexInstaller/InstallWizard/AllConfigOverview.cs 2011-01-31 15:38:05 +0000
@@ -40,43 +40,46 @@ namespace WexInstaller
public override void Activate()
{
- productList.Items.Clear();
- foreach (ProductCategory pc in ProductManager.ProductCategories)
+ if (productList.Items.Count <= 0)
{
- foreach (Product p in pc.Products)
+ foreach (ProductCategory pc in ProductManager.ProductCategories)
{
- if (p.Controller == null || p.CurrentState != ProductState.InstallSuccess)
- continue;
- ListViewItem item = new ListViewItem(String.Empty);
- item.Name = p.Title;
- item.Tag = p;
- item.SubItems.Add(p.TitleWithVersion);
- item.SubItems.Add(GetProductStateString());
- productList.Items.Add(item);
-
- if (configuringItem == null)
+ foreach (Product p in pc.Products)
{
- configuringItem = productList.Items[productList.Items.IndexOf(item)];
- configuringItem.StateImageIndex = 0;
- (ParentControl as InstallWizardControl).AddConfigPages(configuringItem.Tag as Product);
+ if (p.Controller == null || p.CurrentState != ProductState.InstallSuccess)
+ continue;
+ ListViewItem item = new ListViewItem(String.Empty);
+ item.Name = p.Title;
+ item.Tag = p;
+ item.SubItems.Add(p.TitleWithVersion);
+ item.SubItems.Add(GetProductStateString());
+ productList.Items.Add(item);
}
- else
- {
- nextOk = false;
-
- productList.ProgressBarCol = 3;
- productList.ProgressBarRow = configuringItem.Index;
- productList.ShowProgressBar(true);
- productList.ProgressBar.Value = 0;
-
- configuringItem.StateImageIndex = 0;
+ }
+ }
- ((configuringItem.Tag as Product).Controller as ServerConfigurationController).Configured += new ConfigurationEventHandler(ConfigurationChanged);
- (configuringItem.Tag as Product).Controller.Configure();
- Application.DoEvents();
- }
+ if (configuringItem == null) // First pass.
+ {
+ if (productList.Items.Count > 0) // Make sure the list has items.
+ {
+ configuringItem = productList.Items[0];
+ configuringItem.StateImageIndex = 0;
+ (ParentControl as InstallWizardControl).AddConfigPages(configuringItem.Tag as Product);
}
}
+ else
+ {
+ nextOk = false;
+
+ productList.ProgressBarCol = 3;
+ productList.ProgressBarRow = configuringItem.Index;
+ productList.ShowProgressBar(true);
+ productList.ProgressBar.Value = 0;
+
+ ((configuringItem.Tag as Product).Controller as ServerConfigurationController).Configured += new ConfigurationEventHandler(ConfigurationChanged);
+ (configuringItem.Tag as Product).Controller.Configure();
+ Application.DoEvents();
+ }
base.Activate();
}
Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20110131153805-c3s10k1amlesh1ln.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (iggy:272) | Iggy Galarza | 31 Jan |