Index: /branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs
===================================================================
--- /branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs	(revision 12253)
+++ /branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs	(revision 12254)
@@ -169,4 +169,11 @@
           else boolParameters.Remove(parameter);
         }
+
+        bool isEnumValue = parameter.Value != null && parameter.Value.GetType().IsGenericType
+                           && typeof(EnumValue<>).IsAssignableFrom(parameter.Value.GetType().GetGenericTypeDefinition());
+        if (isEnumValue) {
+          if (e.Item.Checked) multipleChoiceParameters.Add(parameter, new HashSet<IItem>(new EnumValueEqualityComparer()));
+          else multipleChoiceParameters.Remove(parameter);
+        }
       }
 
@@ -192,24 +199,39 @@
         isOptionalConstrainedValueParameter
         || typeof(ConstrainedValueParameter<>).Equals(parameter.GetType().GetGenericTypeDefinition());
-
-      if (isConstrainedValueParameter) {
+      bool isEnumValue = parameter.Value != null && parameter.Value.GetType().IsGenericType
+                         && typeof(EnumValue<>).IsAssignableFrom(parameter.Value.GetType().GetGenericTypeDefinition());
+
+      if (isConstrainedValueParameter || isEnumValue) {
         detailsTypeLabel.Text = "Choices:";
         choicesListView.Tag = parameter;
 
-        if (isOptionalConstrainedValueParameter) {
-          choicesListView.Items.Add(new ListViewItem("-") {
-            Tag = optionalNullChoice,
-            Checked = multipleChoiceParameters.ContainsKey(parameter)
-            && multipleChoiceParameters[parameter].Contains(optionalNullChoice)
-          });
-        }
-        dynamic constrainedValuedParameter = parameter;
-        dynamic validValues = constrainedValuedParameter.ValidValues;
-        foreach (var choice in validValues) {
-          choicesListView.Items.Add(new ListViewItem(choice.ToString()) {
-            Tag = choice,
-            Checked = multipleChoiceParameters.ContainsKey(parameter)
-            && multipleChoiceParameters[parameter].Contains(choice)
-          });
+        if (isConstrainedValueParameter) {
+          if (isOptionalConstrainedValueParameter) {
+            choicesListView.Items.Add(new ListViewItem("-") {
+              Tag = optionalNullChoice,
+              Checked = multipleChoiceParameters.ContainsKey(parameter)
+                        && multipleChoiceParameters[parameter].Contains(optionalNullChoice)
+            });
+          }
+          dynamic constrainedValuedParameter = parameter;
+          dynamic validValues = constrainedValuedParameter.ValidValues;
+          foreach (var choice in validValues) {
+            choicesListView.Items.Add(new ListViewItem(choice.ToString()) {
+              Tag = choice,
+              Checked = multipleChoiceParameters.ContainsKey(parameter)
+                        && multipleChoiceParameters[parameter].Contains(choice)
+            });
+          }
+        }
+        if (isEnumValue) {
+          var enumType = parameter.Value.GetType().GetGenericArguments()[0];
+          var enumValueType = typeof(EnumValue<>).MakeGenericType(enumType);
+          foreach (var enumChoice in Enum.GetValues(enumType)) {
+            choicesListView.Items.Add(new ListViewItem(enumChoice.ToString()) {
+              Tag = Activator.CreateInstance(enumValueType, enumChoice),
+              Checked = multipleChoiceParameters.ContainsKey(parameter)
+                        && multipleChoiceParameters[parameter].Any((dynamic item) => item.Value.Equals(enumChoice))
+            });
+          }
         }
         choicesListView.Enabled = multipleChoiceParameters.ContainsKey(parameter);
@@ -455,5 +477,7 @@
           if (valueParam != null && (valueParam.Value is ValueTypeValue<bool>
               || valueParam.Value is ValueTypeValue<int>
-              || valueParam.Value is ValueTypeValue<double>)
+              || valueParam.Value is ValueTypeValue<double>
+              || (valueParam.Value != null && valueParam.Value.GetType().IsGenericType
+                    && typeof(EnumValue<>).IsAssignableFrom(valueParam.Value.GetType().GetGenericTypeDefinition())))
             || typeof(OptionalConstrainedValueParameter<>).IsAssignableFrom(param.GetType().GetGenericTypeDefinition())
             || typeof(ConstrainedValueParameter<>).IsAssignableFrom(param.GetType().GetGenericTypeDefinition()))
@@ -650,4 +674,25 @@
     }
     #endregion
+
+    #region EnumValueEqualityComparer
+    private class EnumValueEqualityComparer : EqualityComparer<IItem> {
+      public override bool Equals(IItem x, IItem y) {
+        if (typeof(EnumValue<>).IsAssignableFrom(x.GetType().GetGenericTypeDefinition()) &&
+            typeof(EnumValue<>).IsAssignableFrom(y.GetType().GetGenericTypeDefinition())) {
+          dynamic enumValueX = x;
+          dynamic enumValueY = y;
+          return enumValueX.Value.Equals(enumValueY.Value);
+        } else return object.ReferenceEquals(x, y);
+      }
+
+      public override int GetHashCode(IItem obj) {
+        if (typeof(EnumValue<>).IsAssignableFrom(obj.GetType().GetGenericTypeDefinition())) {
+          dynamic enumValue = obj;
+          return enumValue.Value.GetHashCode();
+        } else return obj.GetHashCode();
+      }
+    }
+    #endregion
+
     #endregion
 
