Index: trunk/sources/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs	(revision 8178)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs	(revision 8179)
@@ -319,6 +319,5 @@
           selectAllCheckBox.Checked = treeViewNodes.Count() == instances.SelectMany(x => x.Value).Count();
           selectNoneCheckBox.Checked = !treeViewNodes.Any(x => x.Checked);
-        }
-        finally { suppressCheckAllNoneEventHandling = false; }
+        } finally { suppressCheckAllNoneEventHandling = false; }
         UpdateVariationsLabel();
       }
@@ -334,6 +333,5 @@
           }
         }
-      }
-      finally { suppressTreeViewEventHandling = false; }
+      } finally { suppressTreeViewEventHandling = false; }
     }
 
@@ -357,6 +355,5 @@
         try {
           node.Parent.Checked = allChecked;
-        }
-        finally { suppressTreeViewEventHandling = false; }
+        } finally { suppressTreeViewEventHandling = false; }
       }
     }
@@ -366,6 +363,5 @@
         if (selectAllCheckBox.Checked) {
           suppressCheckAllNoneEventHandling = true;
-          try { selectNoneCheckBox.Checked = false; }
-          finally { suppressCheckAllNoneEventHandling = false; }
+          try { selectNoneCheckBox.Checked = false; } finally { suppressCheckAllNoneEventHandling = false; }
           try {
             suppressTreeViewEventHandling = true;
@@ -376,6 +372,5 @@
               }
             }
-          }
-          finally { suppressTreeViewEventHandling = false; }
+          } finally { suppressTreeViewEventHandling = false; }
         }
         UpdateVariationsLabel();
@@ -387,6 +382,5 @@
         if (selectNoneCheckBox.Checked) {
           suppressCheckAllNoneEventHandling = true;
-          try { selectAllCheckBox.Checked = false; }
-          finally { suppressCheckAllNoneEventHandling = false; }
+          try { selectAllCheckBox.Checked = false; } finally { suppressCheckAllNoneEventHandling = false; }
           try {
             suppressTreeViewEventHandling = true;
@@ -397,6 +391,5 @@
               }
             }
-          }
-          finally { suppressTreeViewEventHandling = false; }
+          } finally { suppressTreeViewEventHandling = false; }
         }
         UpdateVariationsLabel();
@@ -721,5 +714,4 @@
         } catch (OperationCanceledException) {
           e.Cancel = true;
-          localExperiment = null;
           return;
         }
@@ -741,5 +733,4 @@
               } catch (OperationCanceledException) {
                 e.Cancel = true;
-                localExperiment = null;
                 return;
               }
@@ -748,16 +739,14 @@
         }
       }
-      if (localExperiment != null) {
-        // this step can take some time
-        SetMode(DialogMode.PreparingExperiment);
-        experimentCreationBackgroundWorker.ReportProgress(-1);
-        localExperiment.Prepare(true);
-        experimentCreationBackgroundWorker.ReportProgress(100);
-      }
+      // this step can take some time
+      SetMode(DialogMode.PreparingExperiment);
+      experimentCreationBackgroundWorker.ReportProgress(-1);
+      localExperiment.Prepare(true);
+      experimentCreationBackgroundWorker.ReportProgress(100);
       Experiment = localExperiment;
     }
 
     private void AddParameterVariations(IOptimizer optimizer, Experiment localExperiment, ref int counter, int totalVariations) {
-      var variations = experimentCreationBackgroundWorker_CalculateParameterVariations(optimizer);
+      var variations = CalculateParameterVariations(optimizer);
       foreach (var v in variations) {
         if (experimentCreationBackgroundWorker.CancellationPending)
@@ -769,5 +758,5 @@
     }
 
-    private IEnumerable<IOptimizer> experimentCreationBackgroundWorker_CalculateParameterVariations(IOptimizer optimizer) {
+    private IEnumerable<IOptimizer> CalculateParameterVariations(IOptimizer optimizer) {
       if (!boolParameters.Any() && !intParameters.Any() && !doubleParameters.Any() && !multipleChoiceParameters.Any()) {
         var o = (IOptimizer)optimizer.Clone();
@@ -885,6 +874,5 @@
           Close();
         }
-      }
-      catch { }
+      } catch { }
     }
     #endregion
