Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyAlgorithm.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyAlgorithm.cs	(revision 5638)
+++ 	(revision )
@@ -1,90 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("Empty Algorithm", "A dummy algorithm which serves as a placeholder and cannot be executed.")]
-  [StorableClass]
-  public sealed class EmptyAlgorithm : HeuristicLab.Optimization.Algorithm {
-    private string exceptionMessage;
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    private ResultCollection results;
-    public override Optimization.ResultCollection Results {
-      get { return results; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "ExceptionMessage")]
-    private string ExceptionMessage {
-      get { return exceptionMessage; }
-      set { exceptionMessage = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private EmptyAlgorithm(bool deserializing)
-      : base(deserializing) {
-      this.results = new ResultCollection();
-    }
-    private EmptyAlgorithm(EmptyAlgorithm original, Cloner cloner)
-      : base(original, cloner) {
-      this.exceptionMessage = original.exceptionMessage;
-      this.results = new ResultCollection();
-    }
-    public EmptyAlgorithm()
-      : base() {
-      results = new ResultCollection();
-    }
-    public EmptyAlgorithm(string exceptionMessage)
-      : this() {
-      this.exceptionMessage = exceptionMessage;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptyAlgorithm(this, cloner);
-    }
-
-    public override void Prepare() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot prepare an EmptyAlgorithm." : exceptionMessage);
-    }
-    public override void Start() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot start an EmptyAlgorithm." : exceptionMessage);
-    }
-    public override void Pause() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot pause an EmptyAlgorithm." : exceptionMessage);
-    }
-    public override void Stop() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot stop an EmptyAlgorithm." : exceptionMessage);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyEvaluator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyEvaluator.cs	(revision 5638)
+++ 	(revision )
@@ -1,70 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("EmptyEvaluator", "A dummy evaluator which throws an exception when executed.")]
-  [StorableClass]
-  public sealed class EmptyEvaluator : Operator, IEvaluator {
-    private string exceptionMessage;
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "ExceptionMessage")]
-    private string ExceptionMessage {
-      get { return exceptionMessage; }
-      set { exceptionMessage = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private EmptyEvaluator(bool deserializing) : base(deserializing) { }
-    private EmptyEvaluator(EmptyEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-      exceptionMessage = original.exceptionMessage;
-    }
-    public EmptyEvaluator() : base() { }
-    public EmptyEvaluator(string exceptionMessage)
-      : this() {
-      this.exceptionMessage = exceptionMessage;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptyEvaluator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptyEvaluator. Please choose an appropriate solution evaluator." : exceptionMessage);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyMultiObjectiveEvaluator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyMultiObjectiveEvaluator.cs	(revision 5638)
+++ 	(revision )
@@ -1,79 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("EmptyMultiObjectiveEvaluator", "A dummy multi-objective evaluator which throws an exception when executed.")]
-  [StorableClass]
-  public sealed class EmptyMultiObjectiveEvaluator : Operator, IMultiObjectiveEvaluator {
-    private string exceptionMessage;
-
-    public ILookupParameter<DoubleArray> QualitiesParameter {
-      get { return (ILookupParameter<DoubleArray>)Parameters["Qualities"]; }
-    }
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "ExceptionMessage")]
-    private string ExceptionMessage {
-      get { return exceptionMessage; }
-      set { exceptionMessage = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private EmptyMultiObjectiveEvaluator(bool deserializing) : base(deserializing) { }
-    private EmptyMultiObjectiveEvaluator(EmptyMultiObjectiveEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-      exceptionMessage = original.exceptionMessage;
-    }
-    public EmptyMultiObjectiveEvaluator()
-      : base() {
-      Parameters.Add(new LookupParameter<DoubleArray>("Qualities", "The evaluated quality values of a solution."));
-    }
-    public EmptyMultiObjectiveEvaluator(string exceptionMessage)
-      : this() {
-      this.exceptionMessage = exceptionMessage;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptyMultiObjectiveEvaluator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptyMultiObjectiveEvaluator. Please choose an appropriate solution evaluator." : exceptionMessage);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyMultiObjectiveProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyMultiObjectiveProblem.cs	(revision 5638)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("Empty Multi-Objective Problem", "A dummy multi-objective problem which serves as a placeholder and cannot be solved.")]
-  [StorableClass]
-  public sealed class EmptyMultiObjectiveProblem : MultiObjectiveProblem<EmptyMultiObjectiveEvaluator, EmptySolutionCreator> {
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    [StorableConstructor]
-    private EmptyMultiObjectiveProblem(bool deserializing) : base(deserializing) { }
-    private EmptyMultiObjectiveProblem(EmptyMultiObjectiveProblem original, Cloner cloner) : base(original, cloner) { }
-    public EmptyMultiObjectiveProblem()
-      : base() {
-      SolutionCreator = new EmptySolutionCreator();
-      Evaluator = new EmptyMultiObjectiveEvaluator();
-    }
-    public EmptyMultiObjectiveProblem(string exceptionMessage)
-      : base() {
-      SolutionCreator = new EmptySolutionCreator(exceptionMessage);
-      Evaluator = new EmptyMultiObjectiveEvaluator(exceptionMessage);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptyMultiObjectiveProblem(this, cloner);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptyProblem.cs	(revision 5638)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("Empty Problem", "A dummy problem which serves as a placeholder and cannot be solved.")]
-  [StorableClass]
-  public sealed class EmptyProblem : Problem<EmptyEvaluator, EmptySolutionCreator> {
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    [StorableConstructor]
-    private EmptyProblem(bool deserializing) : base(deserializing) { }
-    private EmptyProblem(EmptyProblem original, Cloner cloner) : base(original, cloner) { }
-    public EmptyProblem()
-      : base() {
-      SolutionCreator = new EmptySolutionCreator();
-      Evaluator = new EmptyEvaluator();
-    }
-    public EmptyProblem(string exceptionMessage)
-      : base() {
-      SolutionCreator = new EmptySolutionCreator(exceptionMessage);
-      Evaluator = new EmptyEvaluator(exceptionMessage);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptyProblem(this, cloner);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptySingleObjectiveEvaluator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptySingleObjectiveEvaluator.cs	(revision 5638)
+++ 	(revision )
@@ -1,79 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("EmptySingleObjectiveEvaluator", "A dummy single-objective evaluator which throws an exception when executed.")]
-  [StorableClass]
-  public sealed class EmptySingleObjectiveEvaluator : Operator, ISingleObjectiveEvaluator {
-    private string exceptionMessage;
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "ExceptionMessage")]
-    private string ExceptionMessage {
-      get { return exceptionMessage; }
-      set { exceptionMessage = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private EmptySingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
-    private EmptySingleObjectiveEvaluator(EmptySingleObjectiveEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-      exceptionMessage = original.exceptionMessage;
-    }
-    public EmptySingleObjectiveEvaluator()
-      : base() {
-      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The evaluated quality of a solution."));
-    }
-    public EmptySingleObjectiveEvaluator(string exceptionMessage)
-      : this() {
-      this.exceptionMessage = exceptionMessage;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptySingleObjectiveEvaluator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptySingleObjectiveEvaluator. Please choose an appropriate solution evaluator." : exceptionMessage);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptySingleObjectiveProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptySingleObjectiveProblem.cs	(revision 5638)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("Empty Single-Objective Problem", "A dummy single-objective problem which serves as a placeholder and cannot be solved.")]
-  [StorableClass]
-  public sealed class EmptySingleObjectiveProblem : SingleObjectiveProblem<EmptySingleObjectiveEvaluator, EmptySolutionCreator> {
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    [StorableConstructor]
-    private EmptySingleObjectiveProblem(bool deserializing) : base(deserializing) { }
-    private EmptySingleObjectiveProblem(EmptySingleObjectiveProblem original, Cloner cloner) : base(original, cloner) { }
-    public EmptySingleObjectiveProblem()
-      : base() {
-      SolutionCreator = new EmptySolutionCreator();
-      Evaluator = new EmptySingleObjectiveEvaluator();
-    }
-    public EmptySingleObjectiveProblem(string exceptionMessage)
-      : base() {
-      SolutionCreator = new EmptySolutionCreator(exceptionMessage);
-      Evaluator = new EmptySingleObjectiveEvaluator(exceptionMessage);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptySingleObjectiveProblem(this, cloner);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptySolutionCreator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/EmptySolutionCreator.cs	(revision 5638)
+++ 	(revision )
@@ -1,70 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("EmptySolutionCreator", "A dummy solution creator which throws an exception when executed.")]
-  [StorableClass]
-  public sealed class EmptySolutionCreator : Operator, ISolutionCreator {
-    private string exceptionMessage;
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "ExceptionMessage")]
-    private string ExceptionMessage {
-      get { return exceptionMessage; }
-      set { exceptionMessage = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private EmptySolutionCreator(bool deserializing) : base(deserializing) { }
-    private EmptySolutionCreator(EmptySolutionCreator original, Cloner cloner)
-      : base(original, cloner) {
-      exceptionMessage = original.exceptionMessage;
-    }
-    public EmptySolutionCreator() : base() { }
-    public EmptySolutionCreator(string exceptionMessage)
-      : this() {
-      this.exceptionMessage = exceptionMessage;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new EmptySolutionCreator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptySolutionCreator. Please choose an appropriate solution creator." : exceptionMessage);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ItemWrapper.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/ItemWrapper.cs	(revision 5638)
+++ 	(revision )
@@ -1,128 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Drawing;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("ItemWrapper", "A wrapper which wraps an IItem.")]
-  [StorableClass]
-  public class ItemWrapper<T> : IItem where T : class, IItem {
-    private T wrappedItem;
-    protected virtual T WrappedItem {
-      get { return wrappedItem; }
-      set {
-        if (value == null) throw new ArgumentNullException("WrappedItem", "WrappedItem cannot be null.");
-        if (value != wrappedItem) {
-          DeregisterWrappedItemEvents();
-          wrappedItem = value;
-          RegisterWrappedItemEvents();
-
-          OnToStringChanged();
-          OnItemImageChanged();
-          OnWrappedItemChanged();
-        }
-      }
-    }
-
-    public virtual string ItemName {
-      get { return wrappedItem.ItemName; }
-    }
-    public virtual string ItemDescription {
-      get { return wrappedItem.ItemDescription; }
-    }
-    public Version ItemVersion {
-      get { return wrappedItem.ItemVersion; }
-    }
-    public virtual Image ItemImage {
-      get { return WrappedItem.ItemImage; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "WrappedItem")]
-    private T StorableWrappedItem {
-      get { return wrappedItem; }
-      set {
-        wrappedItem = value;
-        RegisterWrappedItemEvents();
-      }
-    }
-    #endregion
-
-    [StorableConstructor]
-    protected ItemWrapper(bool deserializing) { }
-    protected ItemWrapper(ItemWrapper<T> original, Cloner cloner) {
-      cloner.RegisterClonedObject(original, this);
-      wrappedItem = cloner.Clone(original.wrappedItem);
-      RegisterWrappedItemEvents();
-    }
-    public ItemWrapper(T item) {
-      if (item == null) throw new ArgumentNullException("item", "ItemWrapper cannot wrap a null reference.");
-      wrappedItem = item;
-      RegisterWrappedItemEvents();
-    }
-
-    public object Clone() {
-      return Clone(new Cloner());
-    }
-    public virtual IDeepCloneable Clone(Cloner cloner) {
-      return new ItemWrapper<T>(this, cloner);
-    }
-
-    public override string ToString() {
-      return wrappedItem.ToString();
-    }
-
-    protected virtual void OnWrappedItemChanged() { }
-
-    #region Events
-    public event EventHandler ItemImageChanged;
-    protected virtual void OnItemImageChanged() {
-      EventHandler handler = ItemImageChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ToStringChanged;
-    protected virtual void OnToStringChanged() {
-      EventHandler handler = ToStringChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    protected virtual void RegisterWrappedItemEvents() {
-      WrappedItem.ToStringChanged += new EventHandler(WrappedItem_ToStringChanged);
-      WrappedItem.ItemImageChanged += new EventHandler(WrappedItem_ItemImageChanged);
-    }
-    protected virtual void DeregisterWrappedItemEvents() {
-      WrappedItem.ToStringChanged -= new EventHandler(WrappedItem_ToStringChanged);
-      WrappedItem.ItemImageChanged -= new EventHandler(WrappedItem_ItemImageChanged);
-    }
-
-    protected virtual void WrappedItem_ToStringChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-    protected virtual void WrappedItem_ItemImageChanged(object sender, EventArgs e) {
-      OnItemImageChanged();
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/MultiObjectiveOKBProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/MultiObjectiveOKBProblem.cs	(revision 5638)
+++ 	(revision )
@@ -1,57 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("Multi-Objective OKB Problem", "Represents a multi-objective problem which is stored in the OKB.")]
-  [Creatable("Optimization Knowledge Base (OKB)")]
-  [StorableClass]
-  public sealed class MultiObjectiveOKBProblem : OKBProblem, IMultiObjectiveProblem, IStorableContent {
-    public string Filename { get; set; }
-
-    public override Type ProblemType {
-      get { return typeof(IMultiObjectiveProblem); }
-    }
-    public new IMultiObjectiveProblem Problem {
-      get { return base.Problem as IMultiObjectiveProblem; }
-    }
-    public IParameter MaximizationParameter {
-      get { return Problem.MaximizationParameter; }
-    }
-    public new IMultiObjectiveEvaluator Evaluator {
-      get { return Problem.Evaluator; }
-    }
-
-    [StorableConstructor]
-    private MultiObjectiveOKBProblem(bool deserializing) : base(deserializing) { }
-    private MultiObjectiveOKBProblem(MultiObjectiveOKBProblem original, Cloner cloner) : base(original, cloner) { }
-    public MultiObjectiveOKBProblem() : base(new EmptyMultiObjectiveProblem("No problem selected. Please choose a multi-objective problem instance from the OKB.")) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new MultiObjectiveOKBProblem(this, cloner);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/NamedItemWrapper.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/NamedItemWrapper.cs	(revision 5638)
+++ 	(revision )
@@ -1,114 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("NamedItemWrapper", "A wrapper which wraps an INamedItem.")]
-  [StorableClass]
-  public class NamedItemWrapper<T> : ItemWrapper<T>, INamedItem where T : class, INamedItem {
-    protected override T WrappedItem {
-      get { return base.WrappedItem; }
-      set {
-        if (value == null) throw new ArgumentNullException("WrappedItem", "WrappedItem cannot be null.");
-        if (value != base.WrappedItem) {
-          CancelEventArgs<string> e = new CancelEventArgs<string>(value.Name);
-          OnNameChanging(e);
-          if (!e.Cancel) base.WrappedItem = value;
-        }
-      }
-    }
-
-    public virtual string Name {
-      get { return WrappedItem.Name; }
-      set { WrappedItem.Name = value; }
-    }
-    public virtual bool CanChangeName {
-      get { return WrappedItem.CanChangeName; }
-    }
-    public virtual string Description {
-      get { return WrappedItem.Description; }
-      set { WrappedItem.Description = value; }
-    }
-    public virtual bool CanChangeDescription {
-      get { return WrappedItem.CanChangeDescription; }
-    }
-
-    [StorableConstructor]
-    protected NamedItemWrapper(bool deserializing) : base(deserializing) { }
-    protected NamedItemWrapper(NamedItemWrapper<T> original, Cloner cloner) : base(original, cloner) { }
-    public NamedItemWrapper(T item) : base(item) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new NamedItemWrapper<T>(this, cloner);
-    }
-
-    protected override void OnWrappedItemChanged() {
-      base.OnWrappedItemChanged();
-      OnNameChanged();
-      OnDescriptionChanged();
-    }
-
-    #region Events
-    public event EventHandler<CancelEventArgs<string>> NameChanging;
-    protected virtual void OnNameChanging(CancelEventArgs<string> e) {
-      var handler = NameChanging;
-      if (handler != null) handler(this, e);
-    }
-    public event EventHandler NameChanged;
-    protected virtual void OnNameChanged() {
-      var handler = NameChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler DescriptionChanged;
-    protected virtual void OnDescriptionChanged() {
-      var handler = DescriptionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    protected override void RegisterWrappedItemEvents() {
-      base.RegisterWrappedItemEvents();
-      WrappedItem.NameChanging += new EventHandler<CancelEventArgs<string>>(WrappedItem_NameChanging);
-      WrappedItem.NameChanged += new EventHandler(WrappedItem_NameChanged);
-      WrappedItem.DescriptionChanged += new EventHandler(WrappedItem_DescriptionChanged);
-    }
-    protected override void DeregisterWrappedItemEvents() {
-      WrappedItem.NameChanging -= new EventHandler<CancelEventArgs<string>>(WrappedItem_NameChanging);
-      WrappedItem.NameChanged -= new EventHandler(WrappedItem_NameChanged);
-      WrappedItem.DescriptionChanged -= new EventHandler(WrappedItem_DescriptionChanged);
-      base.DeregisterWrappedItemEvents();
-    }
-
-    protected virtual void WrappedItem_NameChanging(object sender, CancelEventArgs<string> e) {
-      OnNameChanging(e);
-    }
-    protected virtual void WrappedItem_NameChanged(object sender, EventArgs e) {
-      OnNameChanged();
-    }
-    protected virtual void WrappedItem_DescriptionChanged(object sender, EventArgs e) {
-      OnDescriptionChanged();
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBAlgorithm.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBAlgorithm.cs	(revision 5638)
+++ 	(revision )
@@ -1,376 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.IO;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Default.Xml;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("OKB Algorithm", "An algorithm which is stored in the OKB.")]
-  [Creatable("Optimization Knowledge Base (OKB)")]
-  [StorableClass]
-  public sealed class OKBAlgorithm : Item, IAlgorithm, IStorableContent {
-    public string Filename { get; set; }
-
-    private long algorithmId;
-    public long AlgorithmId {
-      get { return algorithmId; }
-    }
-    private IAlgorithm algorithm;
-    public IAlgorithm Algorithm {
-      get { return algorithm; }
-      private set {
-        if (value == null) throw new ArgumentNullException("Algorithm", "Algorithm cannot be null.");
-        if (value != algorithm) {
-          CancelEventArgs<string> e = new CancelEventArgs<string>(value.Name);
-          OnNameChanging(e);
-          if (!e.Cancel) {
-            IProblem problem = algorithm.Problem;
-            DeregisterAlgorithmEvents();
-            algorithm = value;
-            RegisterAlgorithmEvents();
-
-            OnToStringChanged();
-            OnItemImageChanged();
-            OnNameChanged();
-            OnDescriptionChanged();
-            OnAlgorithmChanged();
-            OnStoreAlgorithmInEachRunChanged();
-
-            try {
-              algorithm.Problem = problem;
-            }
-            catch (ArgumentException) {
-              algorithm.Problem = null;
-            }
-            algorithm.Prepare(true);
-          }
-        }
-      }
-    }
-
-    public override Image ItemImage {
-      get { return Algorithm.ItemImage; }
-    }
-
-    public string Name {
-      get { return Algorithm.Name; }
-      set { throw new NotSupportedException("Name cannot be changed."); }
-    }
-    public string Description {
-      get { return Algorithm.Description; }
-      set { throw new NotSupportedException("Description cannot be changed."); }
-    }
-    public bool CanChangeName {
-      get { return false; }
-    }
-    public bool CanChangeDescription {
-      get { return false; }
-    }
-
-    public IKeyedItemCollection<string, IParameter> Parameters {
-      get { return Algorithm.Parameters; }
-    }
-
-    public ExecutionState ExecutionState {
-      get { return Algorithm.ExecutionState; }
-    }
-    public TimeSpan ExecutionTime {
-      get { return Algorithm.ExecutionTime; }
-    }
-
-    public Type ProblemType {
-      get { return Algorithm.ProblemType; }
-    }
-    public IProblem Problem {
-      get { return Algorithm.Problem; }
-      set { Algorithm.Problem = value; }
-    }
-
-    public ResultCollection Results {
-      get { return Algorithm.Results; }
-    }
-
-    private int runsCounter;
-    private RunCollection runs;
-    public RunCollection Runs {
-      get { return runs; }
-    }
-    public bool StoreAlgorithmInEachRun {
-      get { return Algorithm.StoreAlgorithmInEachRun; }
-      set { Algorithm.StoreAlgorithmInEachRun = value; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "AlgorithmId")]
-    private long StorableAlgorithmId {
-      get { return algorithmId; }
-      set { algorithmId = value; }
-    }
-    [Storable(Name = "Algorithm")]
-    private IAlgorithm StorableAlgorithm {
-      get { return algorithm; }
-      set {
-        algorithm = value;
-        RegisterAlgorithmEvents();
-      }
-    }
-    [Storable(Name = "RunsCounter")]
-    private int StorableRunsCounter {
-      get { return runsCounter; }
-      set { runsCounter = value; }
-    }
-    [Storable(Name = "Runs")]
-    private RunCollection StorableRuns {
-      get { return runs; }
-      set {
-        runs = value;
-        RegisterRunsEvents();
-      }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private OKBAlgorithm(bool deserializing) : base(deserializing) { }
-    private OKBAlgorithm(OKBAlgorithm original, Cloner cloner)
-      : base(original, cloner) {
-      algorithmId = original.algorithmId;
-      algorithm = cloner.Clone(original.algorithm);
-      RegisterAlgorithmEvents();
-      runsCounter = original.runsCounter;
-      runs = cloner.Clone(original.runs);
-      RegisterRunsEvents();
-    }
-    public OKBAlgorithm()
-      : base() {
-      algorithmId = -1;
-      algorithm = new EmptyAlgorithm("No algorithm selected. Please choose an algorithm from the OKB.");
-      RegisterAlgorithmEvents();
-      runsCounter = 0;
-      runs = new RunCollection();
-      RegisterRunsEvents();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new OKBAlgorithm(this, cloner);
-    }
-
-    public void Load(long algorithmId) {
-      if (this.algorithmId != algorithmId) {
-        IAlgorithm algorithm;
-        AlgorithmData algorithmData = OKBClient.Instance.GetAlgorithmData(algorithmId);
-        using (MemoryStream stream = new MemoryStream(algorithmData.Data)) {
-          algorithm = XmlParser.Deserialize<IAlgorithm>(stream);
-        }
-        this.algorithmId = algorithmId;
-        Algorithm = algorithm;
-      }
-    }
-
-    public void CollectParameterValues(IDictionary<string, IItem> values) {
-      Algorithm.CollectParameterValues(values);
-    }
-    public void CollectResultValues(IDictionary<string, IItem> values) {
-      Algorithm.CollectResultValues(values);
-    }
-
-    public void Prepare() {
-      Algorithm.Prepare(true);
-    }
-    public void Prepare(bool clearRuns) {
-      if (clearRuns) runs.Clear();
-      Algorithm.Prepare(true);
-    }
-    public void Start() {
-      Algorithm.Start();
-    }
-    public void Pause() {
-      Algorithm.Pause();
-    }
-    public void Stop() {
-      Algorithm.Stop();
-    }
-
-    #region Events
-    public event EventHandler AlgorithmChanged;
-    private void OnAlgorithmChanged() {
-      EventHandler handler = AlgorithmChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler<CancelEventArgs<string>> NameChanging;
-    private void OnNameChanging(CancelEventArgs<string> e) {
-      var handler = NameChanging;
-      if (handler != null) handler(this, e);
-    }
-    public event EventHandler NameChanged;
-    private void OnNameChanged() {
-      var handler = NameChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler DescriptionChanged;
-    private void OnDescriptionChanged() {
-      var handler = DescriptionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ExecutionStateChanged;
-    private void OnExecutionStateChanged() {
-      var handler = ExecutionStateChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ExecutionTimeChanged;
-    private void OnExecutionTimeChanged() {
-      var handler = ExecutionTimeChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ProblemChanged;
-    private void OnProblemChanged() {
-      var handler = ProblemChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler StoreAlgorithmInEachRunChanged;
-    private void OnStoreAlgorithmInEachRunChanged() {
-      var handler = StoreAlgorithmInEachRunChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Prepared;
-    private void OnPrepared() {
-      var handler = Prepared;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Started;
-    private void OnStarted() {
-      var handler = Started;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Paused;
-    private void OnPaused() {
-      var handler = Paused;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Stopped;
-    private void OnStopped() {
-      runsCounter++;
-      runs.Add(new HeuristicLab.Optimization.Run(string.Format("{0} Run {1}", Name, runsCounter), this));
-      var handler = Stopped;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
-    private void OnExceptionOccurred(Exception exception) {
-      var handler = ExceptionOccurred;
-      if (handler != null) handler(this, new EventArgs<Exception>(exception));
-    }
-
-    private void RegisterAlgorithmEvents() {
-      if (Algorithm != null) {
-        Algorithm.ToStringChanged += new EventHandler(Algorithm_ToStringChanged);
-        Algorithm.ItemImageChanged += new EventHandler(Algorithm_ItemImageChanged);
-        Algorithm.NameChanging += new EventHandler<CancelEventArgs<string>>(Algorithm_NameChanging);
-        Algorithm.NameChanged += new EventHandler(Algorithm_NameChanged);
-        Algorithm.DescriptionChanged += new EventHandler(Algorithm_DescriptionChanged);
-        Algorithm.ExecutionStateChanged += new EventHandler(Algorithm_ExecutionStateChanged);
-        Algorithm.ExecutionTimeChanged += new EventHandler(Algorithm_ExecutionTimeChanged);
-        Algorithm.ProblemChanged += new EventHandler(Algorithm_ProblemChanged);
-        Algorithm.StoreAlgorithmInEachRunChanged += new EventHandler(Algorithm_StoreAlgorithmInEachRunChanged);
-        Algorithm.Prepared += new EventHandler(Algorithm_Prepared);
-        Algorithm.Started += new EventHandler(Algorithm_Started);
-        Algorithm.Paused += new EventHandler(Algorithm_Paused);
-        Algorithm.Stopped += new EventHandler(Algorithm_Stopped);
-        Algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
-      }
-    }
-    private void DeregisterAlgorithmEvents() {
-      if (Algorithm != null) {
-        Algorithm.ToStringChanged -= new EventHandler(Algorithm_ToStringChanged);
-        Algorithm.ItemImageChanged -= new EventHandler(Algorithm_ItemImageChanged);
-        Algorithm.NameChanging -= new EventHandler<CancelEventArgs<string>>(Algorithm_NameChanging);
-        Algorithm.NameChanged -= new EventHandler(Algorithm_NameChanged);
-        Algorithm.DescriptionChanged -= new EventHandler(Algorithm_DescriptionChanged);
-        Algorithm.ExecutionStateChanged -= new EventHandler(Algorithm_ExecutionStateChanged);
-        Algorithm.ExecutionTimeChanged -= new EventHandler(Algorithm_ExecutionTimeChanged);
-        Algorithm.ProblemChanged -= new EventHandler(Algorithm_ProblemChanged);
-        Algorithm.StoreAlgorithmInEachRunChanged -= new EventHandler(Algorithm_StoreAlgorithmInEachRunChanged);
-        Algorithm.Prepared -= new EventHandler(Algorithm_Prepared);
-        Algorithm.Started -= new EventHandler(Algorithm_Started);
-        Algorithm.Paused -= new EventHandler(Algorithm_Paused);
-        Algorithm.Stopped -= new EventHandler(Algorithm_Stopped);
-        Algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
-      }
-    }
-
-    private void Algorithm_ToStringChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-    private void Algorithm_ItemImageChanged(object sender, EventArgs e) {
-      OnItemImageChanged();
-    }
-    private void Algorithm_NameChanging(object sender, CancelEventArgs<string> e) {
-      OnNameChanging(e);
-    }
-    private void Algorithm_NameChanged(object sender, EventArgs e) {
-      OnNameChanged();
-    }
-    private void Algorithm_DescriptionChanged(object sender, EventArgs e) {
-      OnDescriptionChanged();
-    }
-    private void Algorithm_ExecutionStateChanged(object sender, EventArgs e) {
-      OnExecutionStateChanged();
-    }
-    private void Algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
-      OnExecutionTimeChanged();
-    }
-    private void Algorithm_ProblemChanged(object sender, EventArgs e) {
-      OnProblemChanged();
-    }
-    private void Algorithm_StoreAlgorithmInEachRunChanged(object sender, EventArgs e) {
-      OnStoreAlgorithmInEachRunChanged();
-    }
-    private void Algorithm_Prepared(object sender, EventArgs e) {
-      OnPrepared();
-    }
-    private void Algorithm_Started(object sender, EventArgs e) {
-      OnStarted();
-    }
-    private void Algorithm_Paused(object sender, EventArgs e) {
-      OnPaused();
-    }
-    private void Algorithm_Stopped(object sender, EventArgs e) {
-      OnStopped();
-    }
-    private void Algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
-      OnExceptionOccurred(e.Value);
-    }
-
-    private void RegisterRunsEvents() {
-      runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
-    }
-    private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
-      runsCounter = runs.Count;
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBExperiment.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBExperiment.cs	(revision 5638)
+++ 	(revision )
@@ -1,359 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Drawing;
-using System.IO;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Default.Xml;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("OKB Experiment", "...")]
-  [Creatable("Optimization Knowledge Base (OKB)")]
-  [StorableClass]
-  public sealed class OKBExperiment : NamedItem, IOptimizer, IStorableContent {
-    public string Filename { get; set; }
-
-    public override Image ItemImage {
-      get {
-        if (Algorithm != null) return Algorithm.ItemImage;
-        else return HeuristicLab.Common.Resources.VSImageLibrary.Event;
-      }
-    }
-
-    private long algorithmId;
-    public long AlgorithmId {
-      get { return algorithmId; }
-      private set {
-        if (algorithmId != value) {
-          algorithmId = value;
-          OnAlgorithmIdChanged();
-        }
-      }
-    }
-    private IAlgorithm algorithm;
-    private IAlgorithm Algorithm {
-      get { return algorithm; }
-      set {
-        DeregisterAlgorithmEvents();
-        algorithm = value;
-        RegisterAlgorithmEvents();
-        if ((algorithm != null) && (problem != null)) {
-          algorithm.Problem = problem;
-          algorithm.Prepare(true);
-        }
-      }
-    }
-    private long problemId;
-    public long ProblemId {
-      get { return problemId; }
-      private set {
-        if (problemId != value) {
-          problemId = value;
-          OnProblemIdChanged();
-        }
-      }
-    }
-    private IProblem problem;
-    private IProblem Problem {
-      get { return problem; }
-      set {
-        problem = value;
-        if ((algorithm != null) && (problem != null)) {
-          algorithm.Problem = problem;
-          algorithm.Prepare(true);
-        }
-      }
-    }
-
-    public ExecutionState ExecutionState {
-      get {
-        if ((Algorithm != null) && (Problem != null)) return Algorithm.ExecutionState;
-        else return ExecutionState.Stopped;
-      }
-    }
-    public TimeSpan ExecutionTime {
-      get {
-        if (Algorithm != null) return Algorithm.ExecutionTime;
-        else return TimeSpan.Zero;
-      }
-    }
-    public IKeyedItemCollection<string, IParameter> AlgorithmParameters {
-      get {
-        if (Algorithm != null) return Algorithm.Parameters;
-        else return null;
-      }
-    }
-    public IKeyedItemCollection<string, IParameter> ProblemParameters {
-      get {
-        if (Problem != null) return Problem.Parameters;
-        else return null;
-      }
-    }
-    public ResultCollection Results {
-      get {
-        if (Algorithm != null) return Algorithm.Results;
-        else return null;
-      }
-    }
-    private RunCollection runs;
-    public RunCollection Runs {
-      get { return runs; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "AlgorithmId")]
-    private long StorableAlgorithmId {
-      get { return algorithmId; }
-      set { algorithmId = value; }
-    }
-    [Storable(Name = "Algorithm")]
-    private IAlgorithm StorableAlgorithm {
-      get { return Algorithm; }
-      set { Algorithm = value; }
-    }
-    [Storable(Name = "ProblemId")]
-    private long StorableProblemId {
-      get { return problemId; }
-      set { problemId = value; }
-    }
-    [Storable(Name = "Problem")]
-    private IProblem StorableProblem {
-      get { return Problem; }
-      set { Problem = value; }
-    }
-    [Storable(Name = "Runs")]
-    private RunCollection StorableRuns {
-      get { return runs; }
-      set { runs = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private OKBExperiment(bool deserializing) : base(deserializing) { }
-    private OKBExperiment(OKBExperiment original, Cloner cloner)
-      : base(original, cloner) {
-      algorithmId = original.algorithmId;
-      algorithm = cloner.Clone(original.algorithm);
-      problemId = original.problemId;
-      problem = cloner.Clone(original.problem);
-      runs = cloner.Clone(original.runs);
-      RegisterAlgorithmEvents();
-    }
-    public OKBExperiment()
-      : base() {
-      name = ItemName;
-      description = ItemDescription;
-      runs = new RunCollection();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      RegisterAlgorithmEvents();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new OKBExperiment(this, cloner);
-    }
-
-    public void Load(Algorithm algorithm) {
-      if (algorithm == null) {
-        Algorithm = null;
-        AlgorithmId = 0;
-      } else {
-        try {
-          if (AlgorithmId != algorithm.Id) {
-            AlgorithmData algorithmData = OKBClient.Instance.GetAlgorithmData(algorithm.Id);
-            using (MemoryStream stream = new MemoryStream(algorithmData.Data)) {
-              Algorithm = XmlParser.Deserialize<IAlgorithm>(stream);
-              Algorithm.StoreAlgorithmInEachRun = true;
-            }
-          }
-          AlgorithmId = algorithm.Id;
-        }
-        catch (Exception ex) {
-          Algorithm = null;
-          AlgorithmId = 0;
-          OnExceptionOccurred(ex);
-        }
-      }
-    }
-    public void Load(Problem problem) {
-      if (problem == null) {
-        Problem = null;
-        ProblemId = 0;
-      } else {
-        try {
-          if (ProblemId != problem.Id) {
-            ProblemData problemData = OKBClient.Instance.GetProblemData(problem.Id);
-            using (MemoryStream stream = new MemoryStream(problemData.Data)) {
-              Problem = XmlParser.Deserialize<IProblem>(stream);
-            }
-          }
-          ProblemId = problem.Id;
-        }
-        catch (Exception ex) {
-          Problem = null;
-          ProblemId = 0;
-          OnExceptionOccurred(ex);
-        }
-      }
-    }
-
-    public void Prepare(bool clearRuns) {
-      if (Algorithm != null) Algorithm.Prepare(clearRuns);
-    }
-    public void Prepare() {
-      if (Algorithm != null) Algorithm.Prepare();
-    }
-    public void Start() {
-      if (Algorithm != null) Algorithm.Start();
-    }
-    public void Pause() {
-      if (Algorithm != null) Algorithm.Pause();
-    }
-    public void Stop() {
-      if (Algorithm != null) Algorithm.Stop();
-    }
-
-    #region Events
-    public event EventHandler AlgorithmIdChanged;
-    private void OnAlgorithmIdChanged() {
-      EventHandler handler = AlgorithmIdChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ProblemIdChanged;
-    private void OnProblemIdChanged() {
-      EventHandler handler = ProblemIdChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
-    private void OnExceptionOccurred(Exception exception) {
-      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
-      if (handler != null) handler(this, new EventArgs<Exception>(exception));
-    }
-    public event EventHandler ExecutionStateChanged;
-    private void OnExecutionStateChanged() {
-      EventHandler handler = ExecutionStateChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ExecutionTimeChanged;
-    private void OnExecutionTimeChanged() {
-      EventHandler handler = ExecutionTimeChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Prepared;
-    private void OnPrepared() {
-      EventHandler handler = Prepared;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Started;
-    private void OnStarted() {
-      EventHandler handler = Started;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Paused;
-    private void OnPaused() {
-      EventHandler handler = Paused;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Stopped;
-    private void OnStopped() {
-      EventHandler handler = Stopped;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    private void RegisterAlgorithmEvents() {
-      if (Algorithm != null) {
-        Algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(algorithm_ExceptionOccurred);
-        Algorithm.ExecutionStateChanged += new EventHandler(algorithm_ExecutionStateChanged);
-        Algorithm.ExecutionTimeChanged += new EventHandler(algorithm_ExecutionTimeChanged);
-        Algorithm.ItemImageChanged += new EventHandler(algorithm_ItemImageChanged);
-        Algorithm.Paused += new EventHandler(algorithm_Paused);
-        Algorithm.Prepared += new EventHandler(algorithm_Prepared);
-        Algorithm.Started += new EventHandler(algorithm_Started);
-        Algorithm.Stopped += new EventHandler(algorithm_Stopped);
-        Algorithm.Runs.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsAdded);
-        Algorithm.Runs.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsRemoved);
-        Algorithm.Runs.CollectionReset += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_CollectionReset);
-      }
-    }
-    private void DeregisterAlgorithmEvents() {
-      if (Algorithm != null) {
-        Algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(algorithm_ExceptionOccurred);
-        Algorithm.ExecutionStateChanged -= new EventHandler(algorithm_ExecutionStateChanged);
-        Algorithm.ExecutionTimeChanged -= new EventHandler(algorithm_ExecutionTimeChanged);
-        Algorithm.ItemImageChanged -= new EventHandler(algorithm_ItemImageChanged);
-        Algorithm.Paused -= new EventHandler(algorithm_Paused);
-        Algorithm.Prepared -= new EventHandler(algorithm_Prepared);
-        Algorithm.Started -= new EventHandler(algorithm_Started);
-        Algorithm.Stopped -= new EventHandler(algorithm_Stopped);
-        Algorithm.Runs.ItemsAdded -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsAdded);
-        Algorithm.Runs.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsRemoved);
-        Algorithm.Runs.CollectionReset -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_CollectionReset);
-      }
-    }
-    private void algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
-      OnExceptionOccurred(e.Value);
-    }
-    private void algorithm_ExecutionStateChanged(object sender, EventArgs e) {
-      OnExecutionStateChanged();
-    }
-    private void algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
-      OnExecutionTimeChanged();
-    }
-    private void algorithm_ItemImageChanged(object sender, EventArgs e) {
-      OnItemImageChanged();
-    }
-    private void algorithm_Paused(object sender, EventArgs e) {
-      OnPaused();
-    }
-    private void algorithm_Prepared(object sender, EventArgs e) {
-      OnPrepared();
-    }
-    private void algorithm_Started(object sender, EventArgs e) {
-      OnStarted();
-    }
-    private void algorithm_Stopped(object sender, EventArgs e) {
-      try {
-        OKBClient.Instance.AddRun(AlgorithmId, ProblemId, algorithm);
-      }
-      catch (Exception ex) {
-        OnExceptionOccurred(ex);
-      }
-      OnStopped();
-    }
-    private void algorithm_Runs_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      runs.AddRange(e.Items);
-    }
-    private void algorithm_Runs_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      runs.RemoveRange(e.Items);
-    }
-    private void algorithm_Runs_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      runs.Clear();
-      runs.AddRange(algorithm.Runs);
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBProblem.cs	(revision 5638)
+++ 	(revision )
@@ -1,257 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.IO;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Default.Xml;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("OKB Problem", "A base class for problems which are stored in the OKB.")]
-  [StorableClass]
-  public abstract class OKBProblem : Item, IProblem {
-    public virtual Type ProblemType {
-      get { return typeof(IProblem); }
-    }
-    private long problemId;
-    public long ProblemId {
-      get { return problemId; }
-    }
-    private IProblem problem;
-    public IProblem Problem {
-      get { return problem; }
-      private set {
-        if (value == null) throw new ArgumentNullException("Problem", "Problem cannot be null.");
-        if (value != problem) {
-          CancelEventArgs<string> e = new CancelEventArgs<string>(value.Name);
-          OnNameChanging(e);
-          if (!e.Cancel) {
-            DeregisterProblemEvents();
-            problem = value;
-            RegisterProblemEvents();
-
-            OnToStringChanged();
-            OnItemImageChanged();
-            OnNameChanged();
-            OnDescriptionChanged();
-            OnProblemChanged();
-            OnSolutionCreatorChanged();
-            OnEvaluatorChanged();
-            OnOperatorsChanged();
-            OnReset();
-          }
-        }
-      }
-    }
-
-    public override Image ItemImage {
-      get { return Problem.ItemImage; }
-    }
-
-    public string Name {
-      get { return Problem.Name; }
-      set { throw new NotSupportedException("Name cannot be changed."); }
-    }
-    public string Description {
-      get { return Problem.Description; }
-      set { throw new NotSupportedException("Description cannot be changed."); }
-    }
-    public bool CanChangeName {
-      get { return false; }
-    }
-    public bool CanChangeDescription {
-      get { return false; }
-    }
-
-    public IKeyedItemCollection<string, IParameter> Parameters {
-      get { return Problem.Parameters; }
-    }
-
-    public IParameter SolutionCreatorParameter {
-      get { return Problem.SolutionCreatorParameter; }
-    }
-    public ISolutionCreator SolutionCreator {
-      get { return Problem.SolutionCreator; }
-    }
-    public IParameter EvaluatorParameter {
-      get { return Problem.EvaluatorParameter; }
-    }
-    public IEvaluator Evaluator {
-      get { return Problem.Evaluator; }
-    }
-    public IEnumerable<IOperator> Operators {
-      get { return Problem.Operators; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "ProblemId")]
-    private long StorableProblemId {
-      get { return problemId; }
-      set { problemId = value; }
-    }
-    [Storable(Name = "Problem")]
-    private IProblem StorableProblem {
-      get { return problem; }
-      set {
-        problem = value;
-        RegisterProblemEvents();
-      }
-    }
-    #endregion
-
-    [StorableConstructor]
-    protected OKBProblem(bool deserializing) : base(deserializing) { }
-    protected OKBProblem(OKBProblem original, Cloner cloner)
-      : base(original, cloner) {
-      problemId = original.problemId;
-      problem = cloner.Clone(original.problem);
-      RegisterProblemEvents();
-    }
-    protected OKBProblem(IProblem initialProblem)
-      : base() {
-      if (initialProblem == null) throw new ArgumentNullException("initialProblem", "Initial problem cannot be null.");
-      problemId = -1;
-      problem = initialProblem;
-      RegisterProblemEvents();
-    }
-
-    public void Load(long problemId) {
-      if (this.problemId != problemId) {
-        IProblem problem;
-        ProblemData problemData = OKBClient.Instance.GetProblemData(problemId);
-        using (MemoryStream stream = new MemoryStream(problemData.Data)) {
-          problem = XmlParser.Deserialize<IProblem>(stream);
-        }
-        if (ProblemType.IsAssignableFrom(problem.GetType())) {
-          this.problemId = problemId;
-          Problem = problem;
-        }
-      }
-    }
-
-    public void CollectParameterValues(IDictionary<string, IItem> values) {
-      Problem.CollectParameterValues(values);
-    }
-
-    #region Events
-    public event EventHandler ProblemChanged;
-    protected virtual void OnProblemChanged() {
-      EventHandler handler = ProblemChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler<CancelEventArgs<string>> NameChanging;
-    protected virtual void OnNameChanging(CancelEventArgs<string> e) {
-      var handler = NameChanging;
-      if (handler != null) handler(this, e);
-    }
-    public event EventHandler NameChanged;
-    protected virtual void OnNameChanged() {
-      var handler = NameChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler DescriptionChanged;
-    protected virtual void OnDescriptionChanged() {
-      var handler = DescriptionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler SolutionCreatorChanged;
-    protected virtual void OnSolutionCreatorChanged() {
-      var handler = SolutionCreatorChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler EvaluatorChanged;
-    protected virtual void OnEvaluatorChanged() {
-      var handler = EvaluatorChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler OperatorsChanged;
-    protected virtual void OnOperatorsChanged() {
-      var handler = OperatorsChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Reset;
-    protected virtual void OnReset() {
-      var handler = Reset;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    protected virtual void RegisterProblemEvents() {
-      if (Problem != null) {
-        Problem.ToStringChanged += new EventHandler(Problem_ToStringChanged);
-        Problem.ItemImageChanged += new EventHandler(Problem_ItemImageChanged);
-        Problem.NameChanging += new EventHandler<CancelEventArgs<string>>(Problem_NameChanging);
-        Problem.NameChanged += new EventHandler(Problem_NameChanged);
-        Problem.DescriptionChanged += new EventHandler(Problem_DescriptionChanged);
-        Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
-        Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
-        Problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged);
-        Problem.Reset += new EventHandler(Problem_Reset);
-      }
-    }
-    protected virtual void DeregisterProblemEvents() {
-      if (Problem != null) {
-        Problem.ToStringChanged -= new EventHandler(Problem_ToStringChanged);
-        Problem.ItemImageChanged -= new EventHandler(Problem_ItemImageChanged);
-        Problem.NameChanging -= new EventHandler<CancelEventArgs<string>>(Problem_NameChanging);
-        Problem.NameChanged -= new EventHandler(Problem_NameChanged);
-        Problem.DescriptionChanged -= new EventHandler(Problem_DescriptionChanged);
-        Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
-        Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
-        Problem.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged);
-        Problem.Reset -= new EventHandler(Problem_Reset);
-      }
-    }
-
-    private void Problem_ToStringChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-    private void Problem_ItemImageChanged(object sender, EventArgs e) {
-      OnItemImageChanged();
-    }
-    private void Problem_NameChanging(object sender, CancelEventArgs<string> e) {
-      OnNameChanging(e);
-    }
-    private void Problem_NameChanged(object sender, EventArgs e) {
-      OnNameChanged();
-    }
-    private void Problem_DescriptionChanged(object sender, EventArgs e) {
-      OnDescriptionChanged();
-    }
-    private void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
-      OnSolutionCreatorChanged();
-    }
-    private void Problem_EvaluatorChanged(object sender, EventArgs e) {
-      OnEvaluatorChanged();
-    }
-    private void Problem_OperatorsChanged(object sender, EventArgs e) {
-      OnOperatorsChanged();
-    }
-    private void Problem_Reset(object sender, EventArgs e) {
-      OnReset();
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBRun.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/OKBRun.cs	(revision 5638)
+++ 	(revision )
@@ -1,104 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("OKB Run", "The parameters and results of an algorithm run which are stored in the OKB.")]
-  [StorableClass]
-  public sealed class OKBRun : NamedItemWrapper<IRun>, IRun, IStorableContent {
-    public string Filename { get; set; }
-
-    private long runId;
-    public long RunId {
-      get { return runId; }
-    }
-
-    public IAlgorithm Algorithm {
-      get { return WrappedItem.Algorithm; }
-    }
-    public IDictionary<string, IItem> Parameters {
-      get { return WrappedItem.Parameters; }
-    }
-    public IDictionary<string, IItem> Results {
-      get { return WrappedItem.Results; }
-    }
-
-    public Color Color {
-      get { return WrappedItem.Color; }
-      set { WrappedItem.Color = value; }
-    }
-    public bool Visible {
-      get { return WrappedItem.Visible; }
-      set { WrappedItem.Visible = value; }
-    }
-
-    #region Persistence Properties
-    [Storable(Name = "RunId")]
-    private long StorableRunId {
-      get { return runId; }
-      set { runId = value; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private OKBRun(bool deserializing) : base(deserializing) { }
-    private OKBRun(OKBRun original, Cloner cloner)
-      : base(original, cloner) {
-      runId = original.runId;
-    }
-    public OKBRun(IRun run)
-      : base(run) {
-      runId = -1;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new OKBRun(this, cloner);
-    }
-
-    #region Events
-    public event EventHandler Changed;
-    private void OnChanged() {
-      var handler = Changed;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    protected override void RegisterWrappedItemEvents() {
-      base.RegisterWrappedItemEvents();
-      WrappedItem.Changed += new EventHandler(WrappedItem_Changed);
-    }
-    protected override void DeregisterWrappedItemEvents() {
-      WrappedItem.Changed -= new EventHandler(WrappedItem_Changed);
-      base.DeregisterWrappedItemEvents();
-    }
-
-    private void WrappedItem_Changed(object sender, EventArgs e) {
-      OnChanged();
-    }
-    #endregion
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyAlgorithm.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyAlgorithm.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyAlgorithm.cs	(revision 5639)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("Empty Algorithm", "A dummy algorithm which serves as a placeholder and cannot be executed.")]
+  [StorableClass]
+  public sealed class EmptyAlgorithm : HeuristicLab.Optimization.Algorithm {
+    private string exceptionMessage;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    private ResultCollection results;
+    public override Optimization.ResultCollection Results {
+      get { return results; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "ExceptionMessage")]
+    private string ExceptionMessage {
+      get { return exceptionMessage; }
+      set { exceptionMessage = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private EmptyAlgorithm(bool deserializing)
+      : base(deserializing) {
+      this.results = new ResultCollection();
+    }
+    private EmptyAlgorithm(EmptyAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      this.exceptionMessage = original.exceptionMessage;
+      this.results = new ResultCollection();
+    }
+    public EmptyAlgorithm()
+      : base() {
+      results = new ResultCollection();
+    }
+    public EmptyAlgorithm(string exceptionMessage)
+      : this() {
+      this.exceptionMessage = exceptionMessage;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptyAlgorithm(this, cloner);
+    }
+
+    public override void Prepare() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot prepare an EmptyAlgorithm." : exceptionMessage);
+    }
+    public override void Start() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot start an EmptyAlgorithm." : exceptionMessage);
+    }
+    public override void Pause() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot pause an EmptyAlgorithm." : exceptionMessage);
+    }
+    public override void Stop() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot stop an EmptyAlgorithm." : exceptionMessage);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyEvaluator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyEvaluator.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyEvaluator.cs	(revision 5639)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("EmptyEvaluator", "A dummy evaluator which throws an exception when executed.")]
+  [StorableClass]
+  public sealed class EmptyEvaluator : Operator, IEvaluator {
+    private string exceptionMessage;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "ExceptionMessage")]
+    private string ExceptionMessage {
+      get { return exceptionMessage; }
+      set { exceptionMessage = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private EmptyEvaluator(bool deserializing) : base(deserializing) { }
+    private EmptyEvaluator(EmptyEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+      exceptionMessage = original.exceptionMessage;
+    }
+    public EmptyEvaluator() : base() { }
+    public EmptyEvaluator(string exceptionMessage)
+      : this() {
+      this.exceptionMessage = exceptionMessage;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptyEvaluator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptyEvaluator. Please choose an appropriate solution evaluator." : exceptionMessage);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveEvaluator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveEvaluator.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveEvaluator.cs	(revision 5639)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("EmptyMultiObjectiveEvaluator", "A dummy multi-objective evaluator which throws an exception when executed.")]
+  [StorableClass]
+  public sealed class EmptyMultiObjectiveEvaluator : Operator, IMultiObjectiveEvaluator {
+    private string exceptionMessage;
+
+    public ILookupParameter<DoubleArray> QualitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Qualities"]; }
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "ExceptionMessage")]
+    private string ExceptionMessage {
+      get { return exceptionMessage; }
+      set { exceptionMessage = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private EmptyMultiObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    private EmptyMultiObjectiveEvaluator(EmptyMultiObjectiveEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+      exceptionMessage = original.exceptionMessage;
+    }
+    public EmptyMultiObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleArray>("Qualities", "The evaluated quality values of a solution."));
+    }
+    public EmptyMultiObjectiveEvaluator(string exceptionMessage)
+      : this() {
+      this.exceptionMessage = exceptionMessage;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptyMultiObjectiveEvaluator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptyMultiObjectiveEvaluator. Please choose an appropriate solution evaluator." : exceptionMessage);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveProblem.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyMultiObjectiveProblem.cs	(revision 5639)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("Empty Multi-Objective Problem", "A dummy multi-objective problem which serves as a placeholder and cannot be solved.")]
+  [StorableClass]
+  public sealed class EmptyMultiObjectiveProblem : MultiObjectiveProblem<EmptyMultiObjectiveEvaluator, EmptySolutionCreator> {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [StorableConstructor]
+    private EmptyMultiObjectiveProblem(bool deserializing) : base(deserializing) { }
+    private EmptyMultiObjectiveProblem(EmptyMultiObjectiveProblem original, Cloner cloner) : base(original, cloner) { }
+    public EmptyMultiObjectiveProblem()
+      : base() {
+      SolutionCreator = new EmptySolutionCreator();
+      Evaluator = new EmptyMultiObjectiveEvaluator();
+    }
+    public EmptyMultiObjectiveProblem(string exceptionMessage)
+      : base() {
+      SolutionCreator = new EmptySolutionCreator(exceptionMessage);
+      Evaluator = new EmptyMultiObjectiveEvaluator(exceptionMessage);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptyMultiObjectiveProblem(this, cloner);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyProblem.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptyProblem.cs	(revision 5639)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("Empty Problem", "A dummy problem which serves as a placeholder and cannot be solved.")]
+  [StorableClass]
+  public sealed class EmptyProblem : Problem<EmptyEvaluator, EmptySolutionCreator> {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [StorableConstructor]
+    private EmptyProblem(bool deserializing) : base(deserializing) { }
+    private EmptyProblem(EmptyProblem original, Cloner cloner) : base(original, cloner) { }
+    public EmptyProblem()
+      : base() {
+      SolutionCreator = new EmptySolutionCreator();
+      Evaluator = new EmptyEvaluator();
+    }
+    public EmptyProblem(string exceptionMessage)
+      : base() {
+      SolutionCreator = new EmptySolutionCreator(exceptionMessage);
+      Evaluator = new EmptyEvaluator(exceptionMessage);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptyProblem(this, cloner);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveEvaluator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveEvaluator.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveEvaluator.cs	(revision 5639)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("EmptySingleObjectiveEvaluator", "A dummy single-objective evaluator which throws an exception when executed.")]
+  [StorableClass]
+  public sealed class EmptySingleObjectiveEvaluator : Operator, ISingleObjectiveEvaluator {
+    private string exceptionMessage;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "ExceptionMessage")]
+    private string ExceptionMessage {
+      get { return exceptionMessage; }
+      set { exceptionMessage = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private EmptySingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    private EmptySingleObjectiveEvaluator(EmptySingleObjectiveEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+      exceptionMessage = original.exceptionMessage;
+    }
+    public EmptySingleObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The evaluated quality of a solution."));
+    }
+    public EmptySingleObjectiveEvaluator(string exceptionMessage)
+      : this() {
+      this.exceptionMessage = exceptionMessage;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptySingleObjectiveEvaluator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptySingleObjectiveEvaluator. Please choose an appropriate solution evaluator." : exceptionMessage);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveProblem.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySingleObjectiveProblem.cs	(revision 5639)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("Empty Single-Objective Problem", "A dummy single-objective problem which serves as a placeholder and cannot be solved.")]
+  [StorableClass]
+  public sealed class EmptySingleObjectiveProblem : SingleObjectiveProblem<EmptySingleObjectiveEvaluator, EmptySolutionCreator> {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [StorableConstructor]
+    private EmptySingleObjectiveProblem(bool deserializing) : base(deserializing) { }
+    private EmptySingleObjectiveProblem(EmptySingleObjectiveProblem original, Cloner cloner) : base(original, cloner) { }
+    public EmptySingleObjectiveProblem()
+      : base() {
+      SolutionCreator = new EmptySolutionCreator();
+      Evaluator = new EmptySingleObjectiveEvaluator();
+    }
+    public EmptySingleObjectiveProblem(string exceptionMessage)
+      : base() {
+      SolutionCreator = new EmptySolutionCreator(exceptionMessage);
+      Evaluator = new EmptySingleObjectiveEvaluator(exceptionMessage);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptySingleObjectiveProblem(this, cloner);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySolutionCreator.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySolutionCreator.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/EmptySolutionCreator.cs	(revision 5639)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("EmptySolutionCreator", "A dummy solution creator which throws an exception when executed.")]
+  [StorableClass]
+  public sealed class EmptySolutionCreator : Operator, ISolutionCreator {
+    private string exceptionMessage;
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "ExceptionMessage")]
+    private string ExceptionMessage {
+      get { return exceptionMessage; }
+      set { exceptionMessage = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private EmptySolutionCreator(bool deserializing) : base(deserializing) { }
+    private EmptySolutionCreator(EmptySolutionCreator original, Cloner cloner)
+      : base(original, cloner) {
+      exceptionMessage = original.exceptionMessage;
+    }
+    public EmptySolutionCreator() : base() { }
+    public EmptySolutionCreator(string exceptionMessage)
+      : this() {
+      this.exceptionMessage = exceptionMessage;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EmptySolutionCreator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      throw new InvalidOperationException(string.IsNullOrEmpty(exceptionMessage) ? "Cannot execute an EmptySolutionCreator. Please choose an appropriate solution creator." : exceptionMessage);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/ItemWrapper.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/ItemWrapper.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/ItemWrapper.cs	(revision 5639)
@@ -0,0 +1,128 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("ItemWrapper", "A wrapper which wraps an IItem.")]
+  [StorableClass]
+  public class ItemWrapper<T> : IItem where T : class, IItem {
+    private T wrappedItem;
+    protected virtual T WrappedItem {
+      get { return wrappedItem; }
+      set {
+        if (value == null) throw new ArgumentNullException("WrappedItem", "WrappedItem cannot be null.");
+        if (value != wrappedItem) {
+          DeregisterWrappedItemEvents();
+          wrappedItem = value;
+          RegisterWrappedItemEvents();
+
+          OnToStringChanged();
+          OnItemImageChanged();
+          OnWrappedItemChanged();
+        }
+      }
+    }
+
+    public virtual string ItemName {
+      get { return wrappedItem.ItemName; }
+    }
+    public virtual string ItemDescription {
+      get { return wrappedItem.ItemDescription; }
+    }
+    public Version ItemVersion {
+      get { return wrappedItem.ItemVersion; }
+    }
+    public virtual Image ItemImage {
+      get { return WrappedItem.ItemImage; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "WrappedItem")]
+    private T StorableWrappedItem {
+      get { return wrappedItem; }
+      set {
+        wrappedItem = value;
+        RegisterWrappedItemEvents();
+      }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected ItemWrapper(bool deserializing) { }
+    protected ItemWrapper(ItemWrapper<T> original, Cloner cloner) {
+      cloner.RegisterClonedObject(original, this);
+      wrappedItem = cloner.Clone(original.wrappedItem);
+      RegisterWrappedItemEvents();
+    }
+    public ItemWrapper(T item) {
+      if (item == null) throw new ArgumentNullException("item", "ItemWrapper cannot wrap a null reference.");
+      wrappedItem = item;
+      RegisterWrappedItemEvents();
+    }
+
+    public object Clone() {
+      return Clone(new Cloner());
+    }
+    public virtual IDeepCloneable Clone(Cloner cloner) {
+      return new ItemWrapper<T>(this, cloner);
+    }
+
+    public override string ToString() {
+      return wrappedItem.ToString();
+    }
+
+    protected virtual void OnWrappedItemChanged() { }
+
+    #region Events
+    public event EventHandler ItemImageChanged;
+    protected virtual void OnItemImageChanged() {
+      EventHandler handler = ItemImageChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ToStringChanged;
+    protected virtual void OnToStringChanged() {
+      EventHandler handler = ToStringChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected virtual void RegisterWrappedItemEvents() {
+      WrappedItem.ToStringChanged += new EventHandler(WrappedItem_ToStringChanged);
+      WrappedItem.ItemImageChanged += new EventHandler(WrappedItem_ItemImageChanged);
+    }
+    protected virtual void DeregisterWrappedItemEvents() {
+      WrappedItem.ToStringChanged -= new EventHandler(WrappedItem_ToStringChanged);
+      WrappedItem.ItemImageChanged -= new EventHandler(WrappedItem_ItemImageChanged);
+    }
+
+    protected virtual void WrappedItem_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    protected virtual void WrappedItem_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/MultiObjectiveOKBProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/MultiObjectiveOKBProblem.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/MultiObjectiveOKBProblem.cs	(revision 5639)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("Multi-Objective OKB Problem", "Represents a multi-objective problem which is stored in the OKB.")]
+  [Creatable("Optimization Knowledge Base (OKB)")]
+  [StorableClass]
+  public sealed class MultiObjectiveOKBProblem : OKBProblem, IMultiObjectiveProblem, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Type ProblemType {
+      get { return typeof(IMultiObjectiveProblem); }
+    }
+    public new IMultiObjectiveProblem Problem {
+      get { return base.Problem as IMultiObjectiveProblem; }
+    }
+    public IParameter MaximizationParameter {
+      get { return Problem.MaximizationParameter; }
+    }
+    public new IMultiObjectiveEvaluator Evaluator {
+      get { return Problem.Evaluator; }
+    }
+
+    [StorableConstructor]
+    private MultiObjectiveOKBProblem(bool deserializing) : base(deserializing) { }
+    private MultiObjectiveOKBProblem(MultiObjectiveOKBProblem original, Cloner cloner) : base(original, cloner) { }
+    public MultiObjectiveOKBProblem() : base(new EmptyMultiObjectiveProblem("No problem selected. Please choose a multi-objective problem instance from the OKB.")) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MultiObjectiveOKBProblem(this, cloner);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/NamedItemWrapper.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/NamedItemWrapper.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/NamedItemWrapper.cs	(revision 5639)
@@ -0,0 +1,114 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("NamedItemWrapper", "A wrapper which wraps an INamedItem.")]
+  [StorableClass]
+  public class NamedItemWrapper<T> : ItemWrapper<T>, INamedItem where T : class, INamedItem {
+    protected override T WrappedItem {
+      get { return base.WrappedItem; }
+      set {
+        if (value == null) throw new ArgumentNullException("WrappedItem", "WrappedItem cannot be null.");
+        if (value != base.WrappedItem) {
+          CancelEventArgs<string> e = new CancelEventArgs<string>(value.Name);
+          OnNameChanging(e);
+          if (!e.Cancel) base.WrappedItem = value;
+        }
+      }
+    }
+
+    public virtual string Name {
+      get { return WrappedItem.Name; }
+      set { WrappedItem.Name = value; }
+    }
+    public virtual bool CanChangeName {
+      get { return WrappedItem.CanChangeName; }
+    }
+    public virtual string Description {
+      get { return WrappedItem.Description; }
+      set { WrappedItem.Description = value; }
+    }
+    public virtual bool CanChangeDescription {
+      get { return WrappedItem.CanChangeDescription; }
+    }
+
+    [StorableConstructor]
+    protected NamedItemWrapper(bool deserializing) : base(deserializing) { }
+    protected NamedItemWrapper(NamedItemWrapper<T> original, Cloner cloner) : base(original, cloner) { }
+    public NamedItemWrapper(T item) : base(item) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NamedItemWrapper<T>(this, cloner);
+    }
+
+    protected override void OnWrappedItemChanged() {
+      base.OnWrappedItemChanged();
+      OnNameChanged();
+      OnDescriptionChanged();
+    }
+
+    #region Events
+    public event EventHandler<CancelEventArgs<string>> NameChanging;
+    protected virtual void OnNameChanging(CancelEventArgs<string> e) {
+      var handler = NameChanging;
+      if (handler != null) handler(this, e);
+    }
+    public event EventHandler NameChanged;
+    protected virtual void OnNameChanged() {
+      var handler = NameChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler DescriptionChanged;
+    protected virtual void OnDescriptionChanged() {
+      var handler = DescriptionChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected override void RegisterWrappedItemEvents() {
+      base.RegisterWrappedItemEvents();
+      WrappedItem.NameChanging += new EventHandler<CancelEventArgs<string>>(WrappedItem_NameChanging);
+      WrappedItem.NameChanged += new EventHandler(WrappedItem_NameChanged);
+      WrappedItem.DescriptionChanged += new EventHandler(WrappedItem_DescriptionChanged);
+    }
+    protected override void DeregisterWrappedItemEvents() {
+      WrappedItem.NameChanging -= new EventHandler<CancelEventArgs<string>>(WrappedItem_NameChanging);
+      WrappedItem.NameChanged -= new EventHandler(WrappedItem_NameChanged);
+      WrappedItem.DescriptionChanged -= new EventHandler(WrappedItem_DescriptionChanged);
+      base.DeregisterWrappedItemEvents();
+    }
+
+    protected virtual void WrappedItem_NameChanging(object sender, CancelEventArgs<string> e) {
+      OnNameChanging(e);
+    }
+    protected virtual void WrappedItem_NameChanged(object sender, EventArgs e) {
+      OnNameChanged();
+    }
+    protected virtual void WrappedItem_DescriptionChanged(object sender, EventArgs e) {
+      OnDescriptionChanged();
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs	(revision 5639)
@@ -0,0 +1,376 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Default.Xml;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("OKB Algorithm", "An algorithm which is stored in the OKB.")]
+  [Creatable("Optimization Knowledge Base (OKB)")]
+  [StorableClass]
+  public sealed class OKBAlgorithm : Item, IAlgorithm, IStorableContent {
+    public string Filename { get; set; }
+
+    private long algorithmId;
+    public long AlgorithmId {
+      get { return algorithmId; }
+    }
+    private IAlgorithm algorithm;
+    public IAlgorithm Algorithm {
+      get { return algorithm; }
+      private set {
+        if (value == null) throw new ArgumentNullException("Algorithm", "Algorithm cannot be null.");
+        if (value != algorithm) {
+          CancelEventArgs<string> e = new CancelEventArgs<string>(value.Name);
+          OnNameChanging(e);
+          if (!e.Cancel) {
+            IProblem problem = algorithm.Problem;
+            DeregisterAlgorithmEvents();
+            algorithm = value;
+            RegisterAlgorithmEvents();
+
+            OnToStringChanged();
+            OnItemImageChanged();
+            OnNameChanged();
+            OnDescriptionChanged();
+            OnAlgorithmChanged();
+            OnStoreAlgorithmInEachRunChanged();
+
+            try {
+              algorithm.Problem = problem;
+            }
+            catch (ArgumentException) {
+              algorithm.Problem = null;
+            }
+            algorithm.Prepare(true);
+          }
+        }
+      }
+    }
+
+    public override Image ItemImage {
+      get { return Algorithm.ItemImage; }
+    }
+
+    public string Name {
+      get { return Algorithm.Name; }
+      set { throw new NotSupportedException("Name cannot be changed."); }
+    }
+    public string Description {
+      get { return Algorithm.Description; }
+      set { throw new NotSupportedException("Description cannot be changed."); }
+    }
+    public bool CanChangeName {
+      get { return false; }
+    }
+    public bool CanChangeDescription {
+      get { return false; }
+    }
+
+    public IKeyedItemCollection<string, IParameter> Parameters {
+      get { return Algorithm.Parameters; }
+    }
+
+    public ExecutionState ExecutionState {
+      get { return Algorithm.ExecutionState; }
+    }
+    public TimeSpan ExecutionTime {
+      get { return Algorithm.ExecutionTime; }
+    }
+
+    public Type ProblemType {
+      get { return Algorithm.ProblemType; }
+    }
+    public IProblem Problem {
+      get { return Algorithm.Problem; }
+      set { Algorithm.Problem = value; }
+    }
+
+    public ResultCollection Results {
+      get { return Algorithm.Results; }
+    }
+
+    private int runsCounter;
+    private RunCollection runs;
+    public RunCollection Runs {
+      get { return runs; }
+    }
+    public bool StoreAlgorithmInEachRun {
+      get { return Algorithm.StoreAlgorithmInEachRun; }
+      set { Algorithm.StoreAlgorithmInEachRun = value; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "AlgorithmId")]
+    private long StorableAlgorithmId {
+      get { return algorithmId; }
+      set { algorithmId = value; }
+    }
+    [Storable(Name = "Algorithm")]
+    private IAlgorithm StorableAlgorithm {
+      get { return algorithm; }
+      set {
+        algorithm = value;
+        RegisterAlgorithmEvents();
+      }
+    }
+    [Storable(Name = "RunsCounter")]
+    private int StorableRunsCounter {
+      get { return runsCounter; }
+      set { runsCounter = value; }
+    }
+    [Storable(Name = "Runs")]
+    private RunCollection StorableRuns {
+      get { return runs; }
+      set {
+        runs = value;
+        RegisterRunsEvents();
+      }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private OKBAlgorithm(bool deserializing) : base(deserializing) { }
+    private OKBAlgorithm(OKBAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      algorithmId = original.algorithmId;
+      algorithm = cloner.Clone(original.algorithm);
+      RegisterAlgorithmEvents();
+      runsCounter = original.runsCounter;
+      runs = cloner.Clone(original.runs);
+      RegisterRunsEvents();
+    }
+    public OKBAlgorithm()
+      : base() {
+      algorithmId = -1;
+      algorithm = new EmptyAlgorithm("No algorithm selected. Please choose an algorithm from the OKB.");
+      RegisterAlgorithmEvents();
+      runsCounter = 0;
+      runs = new RunCollection();
+      RegisterRunsEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OKBAlgorithm(this, cloner);
+    }
+
+    public void Load(long algorithmId) {
+      if (this.algorithmId != algorithmId) {
+        IAlgorithm algorithm;
+        AlgorithmData algorithmData = OKBClient.Instance.GetAlgorithmData(algorithmId);
+        using (MemoryStream stream = new MemoryStream(algorithmData.Data)) {
+          algorithm = XmlParser.Deserialize<IAlgorithm>(stream);
+        }
+        this.algorithmId = algorithmId;
+        Algorithm = algorithm;
+      }
+    }
+
+    public void CollectParameterValues(IDictionary<string, IItem> values) {
+      Algorithm.CollectParameterValues(values);
+    }
+    public void CollectResultValues(IDictionary<string, IItem> values) {
+      Algorithm.CollectResultValues(values);
+    }
+
+    public void Prepare() {
+      Algorithm.Prepare(true);
+    }
+    public void Prepare(bool clearRuns) {
+      if (clearRuns) runs.Clear();
+      Algorithm.Prepare(true);
+    }
+    public void Start() {
+      Algorithm.Start();
+    }
+    public void Pause() {
+      Algorithm.Pause();
+    }
+    public void Stop() {
+      Algorithm.Stop();
+    }
+
+    #region Events
+    public event EventHandler AlgorithmChanged;
+    private void OnAlgorithmChanged() {
+      EventHandler handler = AlgorithmChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<CancelEventArgs<string>> NameChanging;
+    private void OnNameChanging(CancelEventArgs<string> e) {
+      var handler = NameChanging;
+      if (handler != null) handler(this, e);
+    }
+    public event EventHandler NameChanged;
+    private void OnNameChanged() {
+      var handler = NameChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler DescriptionChanged;
+    private void OnDescriptionChanged() {
+      var handler = DescriptionChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionStateChanged;
+    private void OnExecutionStateChanged() {
+      var handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    private void OnExecutionTimeChanged() {
+      var handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ProblemChanged;
+    private void OnProblemChanged() {
+      var handler = ProblemChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler StoreAlgorithmInEachRunChanged;
+    private void OnStoreAlgorithmInEachRunChanged() {
+      var handler = StoreAlgorithmInEachRunChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    private void OnPrepared() {
+      var handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Started;
+    private void OnStarted() {
+      var handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    private void OnPaused() {
+      var handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    private void OnStopped() {
+      runsCounter++;
+      runs.Add(new HeuristicLab.Optimization.Run(string.Format("{0} Run {1}", Name, runsCounter), this));
+      var handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+    private void OnExceptionOccurred(Exception exception) {
+      var handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+
+    private void RegisterAlgorithmEvents() {
+      if (Algorithm != null) {
+        Algorithm.ToStringChanged += new EventHandler(Algorithm_ToStringChanged);
+        Algorithm.ItemImageChanged += new EventHandler(Algorithm_ItemImageChanged);
+        Algorithm.NameChanging += new EventHandler<CancelEventArgs<string>>(Algorithm_NameChanging);
+        Algorithm.NameChanged += new EventHandler(Algorithm_NameChanged);
+        Algorithm.DescriptionChanged += new EventHandler(Algorithm_DescriptionChanged);
+        Algorithm.ExecutionStateChanged += new EventHandler(Algorithm_ExecutionStateChanged);
+        Algorithm.ExecutionTimeChanged += new EventHandler(Algorithm_ExecutionTimeChanged);
+        Algorithm.ProblemChanged += new EventHandler(Algorithm_ProblemChanged);
+        Algorithm.StoreAlgorithmInEachRunChanged += new EventHandler(Algorithm_StoreAlgorithmInEachRunChanged);
+        Algorithm.Prepared += new EventHandler(Algorithm_Prepared);
+        Algorithm.Started += new EventHandler(Algorithm_Started);
+        Algorithm.Paused += new EventHandler(Algorithm_Paused);
+        Algorithm.Stopped += new EventHandler(Algorithm_Stopped);
+        Algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
+      }
+    }
+    private void DeregisterAlgorithmEvents() {
+      if (Algorithm != null) {
+        Algorithm.ToStringChanged -= new EventHandler(Algorithm_ToStringChanged);
+        Algorithm.ItemImageChanged -= new EventHandler(Algorithm_ItemImageChanged);
+        Algorithm.NameChanging -= new EventHandler<CancelEventArgs<string>>(Algorithm_NameChanging);
+        Algorithm.NameChanged -= new EventHandler(Algorithm_NameChanged);
+        Algorithm.DescriptionChanged -= new EventHandler(Algorithm_DescriptionChanged);
+        Algorithm.ExecutionStateChanged -= new EventHandler(Algorithm_ExecutionStateChanged);
+        Algorithm.ExecutionTimeChanged -= new EventHandler(Algorithm_ExecutionTimeChanged);
+        Algorithm.ProblemChanged -= new EventHandler(Algorithm_ProblemChanged);
+        Algorithm.StoreAlgorithmInEachRunChanged -= new EventHandler(Algorithm_StoreAlgorithmInEachRunChanged);
+        Algorithm.Prepared -= new EventHandler(Algorithm_Prepared);
+        Algorithm.Started -= new EventHandler(Algorithm_Started);
+        Algorithm.Paused -= new EventHandler(Algorithm_Paused);
+        Algorithm.Stopped -= new EventHandler(Algorithm_Stopped);
+        Algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
+      }
+    }
+
+    private void Algorithm_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    private void Algorithm_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void Algorithm_NameChanging(object sender, CancelEventArgs<string> e) {
+      OnNameChanging(e);
+    }
+    private void Algorithm_NameChanged(object sender, EventArgs e) {
+      OnNameChanged();
+    }
+    private void Algorithm_DescriptionChanged(object sender, EventArgs e) {
+      OnDescriptionChanged();
+    }
+    private void Algorithm_ExecutionStateChanged(object sender, EventArgs e) {
+      OnExecutionStateChanged();
+    }
+    private void Algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
+      OnExecutionTimeChanged();
+    }
+    private void Algorithm_ProblemChanged(object sender, EventArgs e) {
+      OnProblemChanged();
+    }
+    private void Algorithm_StoreAlgorithmInEachRunChanged(object sender, EventArgs e) {
+      OnStoreAlgorithmInEachRunChanged();
+    }
+    private void Algorithm_Prepared(object sender, EventArgs e) {
+      OnPrepared();
+    }
+    private void Algorithm_Started(object sender, EventArgs e) {
+      OnStarted();
+    }
+    private void Algorithm_Paused(object sender, EventArgs e) {
+      OnPaused();
+    }
+    private void Algorithm_Stopped(object sender, EventArgs e) {
+      OnStopped();
+    }
+    private void Algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      OnExceptionOccurred(e.Value);
+    }
+
+    private void RegisterRunsEvents() {
+      runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+    }
+    private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      runsCounter = runs.Count;
+    }
+    #endregion
+  }
+}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBClient.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBClient.cs	(revision 5638)
+++ 	(revision )
@@ -1,812 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using HeuristicLab.Clients.Common;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("OKBClient", "Client for accessing the OKB.")]
-  public sealed class OKBClient : IContent {
-    private static OKBClient instance;
-    public static OKBClient Instance {
-      get {
-        if (instance == null) instance = new OKBClient();
-        return instance;
-      }
-    }
-
-    #region Properties
-    private ItemCollection<Platform> platforms;
-    public ItemCollection<Platform> Platforms {
-      get { return platforms; }
-    }
-    private ItemCollection<DataType> dataTypes;
-    public ItemCollection<DataType> DataTypes {
-      get { return dataTypes; }
-    }
-    private IEnumerable<User> users;
-    public IEnumerable<User> Users {
-      get { return users; }
-    }
-    private ItemCollection<AlgorithmClass> algorithmClasses;
-    public ItemCollection<AlgorithmClass> AlgorithmClasses {
-      get { return algorithmClasses; }
-    }
-    private ItemCollection<Algorithm> algorithms;
-    public ItemCollection<Algorithm> Algorithms {
-      get { return algorithms; }
-    }
-    private ItemCollection<ProblemClass> problemClasses;
-    public ItemCollection<ProblemClass> ProblemClasses {
-      get { return problemClasses; }
-    }
-    private ItemCollection<Problem> problems;
-    public ItemCollection<Problem> Problems {
-      get { return problems; }
-    }
-    #endregion
-
-    private OKBClient() {
-      platforms = new ItemCollection<Platform>();
-      platforms.ItemsRemoved += new CollectionItemsChangedEventHandler<Platform>(platforms_ItemsRemoved);
-      dataTypes = new ItemCollection<DataType>();
-      dataTypes.ItemsRemoved += new CollectionItemsChangedEventHandler<DataType>(dataTypes_ItemsRemoved);
-      algorithmClasses = new ItemCollection<AlgorithmClass>();
-      algorithmClasses.ItemsRemoved += new CollectionItemsChangedEventHandler<AlgorithmClass>(algorithmClasses_ItemsRemoved);
-      algorithms = new ItemCollection<Algorithm>();
-      algorithms.ItemsRemoved += new CollectionItemsChangedEventHandler<Algorithm>(algorithms_ItemsRemoved);
-      problemClasses = new ItemCollection<ProblemClass>();
-      problemClasses.ItemsRemoved += new CollectionItemsChangedEventHandler<ProblemClass>(problemClasses_ItemsRemoved);
-      problems = new ItemCollection<Problem>();
-      problems.ItemsRemoved += new CollectionItemsChangedEventHandler<Problem>(problems_ItemsRemoved);
-    }
-
-    #region Refresh
-    public void Refresh() {
-      OnRefreshing();
-
-      platforms.Clear();
-      dataTypes.Clear();
-      algorithmClasses.Clear();
-      algorithms.Clear();
-      problemClasses.Clear();
-      problems.Clear();
-
-      var call = new Func<Exception>(delegate() {
-        try {
-          platforms.AddRange(CallAdministrationService<List<Platform>>(s => s.GetPlatforms()).OrderBy(x => x.Name));
-          dataTypes.AddRange(CallAdministrationService<List<DataType>>(s => s.GetDataTypes()).OrderBy(x => x.Name));
-          users = CallAuthenticationService<List<User>>(s => s.GetUsers()).OrderBy(x => x.Name);
-          algorithmClasses.AddRange(CallAdministrationService<List<AlgorithmClass>>(s => s.GetAlgorithmClasses()).OrderBy(x => x.Name));
-          algorithms.AddRange(CallAdministrationService<List<Algorithm>>(s => s.GetAlgorithms()).OrderBy(x => x.Name));
-          problemClasses.AddRange(CallAdministrationService<List<ProblemClass>>(s => s.GetProblemClasses()).OrderBy(x => x.Name));
-          problems.AddRange(CallAdministrationService<List<Problem>>(s => s.GetProblems()).OrderBy(x => x.Name));
-          return null;
-        }
-        catch (Exception ex) {
-          return ex;
-        }
-      });
-      call.BeginInvoke(delegate(IAsyncResult result) {
-        Exception ex = call.EndInvoke(result);
-        if (ex != null) ErrorHandling.ShowErrorDialog("Refresh failed.", ex);
-        OnRefreshed();
-      }, null);
-    }
-    #endregion
-
-    #region Store
-    public bool Store(IOKBItem item) {
-      try {
-        if (item.Id == 0) {
-          if (item is Platform)
-            item.Id = CallAdministrationService<long>(s => s.AddPlatform((Platform)item));
-          else if (item is DataType)
-            item.Id = CallAdministrationService<long>(s => s.AddDataType((DataType)item));
-          else if (item is AlgorithmClass)
-            item.Id = CallAdministrationService<long>(s => s.AddAlgorithmClass((AlgorithmClass)item));
-          else if (item is Algorithm)
-            item.Id = CallAdministrationService<long>(s => s.AddAlgorithm((Algorithm)item));
-          else if (item is AlgorithmParameter)
-            item.Id = CallAdministrationService<long>(s => s.AddAlgorithmParameter((AlgorithmParameter)item));
-          else if (item is ProblemClass)
-            item.Id = CallAdministrationService<long>(s => s.AddProblemClass((ProblemClass)item));
-          else if (item is Problem)
-            item.Id = CallAdministrationService<long>(s => s.AddProblem((Problem)item));
-          else if (item is ProblemParameter)
-            item.Id = CallAdministrationService<long>(s => s.AddProblemParameter((ProblemParameter)item));
-          else if (item is Result)
-            item.Id = CallAdministrationService<long>(s => s.AddResult((Result)item));
-          else if (item is Experiment)
-            item.Id = CallAdministrationService<long>(s => s.AddExperiment((Experiment)item));
-          else if (item is Run)
-            item.Id = CallAdministrationService<long>(s => s.AddRun((Run)item));
-        } else {
-          if (item is Platform)
-            CallAdministrationService(s => s.UpdatePlatform((Platform)item));
-          else if (item is DataType)
-            CallAdministrationService(s => s.UpdateDataType((DataType)item));
-          else if (item is AlgorithmClass)
-            CallAdministrationService(s => s.UpdateAlgorithmClass((AlgorithmClass)item));
-          else if (item is Algorithm)
-            CallAdministrationService(s => s.UpdateAlgorithm((Algorithm)item));
-          else if (item is AlgorithmParameter)
-            CallAdministrationService(s => s.UpdateAlgorithmParameter((AlgorithmParameter)item));
-          else if (item is ProblemClass)
-            CallAdministrationService(s => s.UpdateProblemClass((ProblemClass)item));
-          else if (item is Problem)
-            CallAdministrationService(s => s.UpdateProblem((Problem)item));
-          else if (item is ProblemParameter)
-            CallAdministrationService(s => s.UpdateProblemParameter((ProblemParameter)item));
-          else if (item is Result)
-            CallAdministrationService(s => s.UpdateResult((Result)item));
-          else if (item is Experiment)
-            item.Id = CallAdministrationService<long>(s => s.AddExperiment((Experiment)item));
-          else if (item is Run)
-            item.Id = CallAdministrationService<long>(s => s.AddRun((Run)item));
-        }
-        return true;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Store failed.", ex);
-        return false;
-      }
-    }
-    #endregion
-
-    #region DataType Methods
-    public DataType ConvertToDataType(Type type) {
-      DataType dataType = DataTypes.FirstOrDefault(x => x.TypeName == type.AssemblyQualifiedName);
-      if (dataType == null) {
-        dataType = new DataType();
-        dataType.Name = type.Name;
-        dataType.TypeName = type.AssemblyQualifiedName;
-        dataType.PlatformId = Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3").Id;
-
-        if (typeof(BoolValue).IsAssignableFrom(type))
-          dataType.SqlName = "bit";
-        else if (typeof(IntValue).IsAssignableFrom(type))
-          dataType.SqlName = "bigint";
-        else if (typeof(DoubleValue).IsAssignableFrom(type))
-          dataType.SqlName = "float";
-        else if (typeof(StringValue).IsAssignableFrom(type) || typeof(IStringConvertibleValue).IsAssignableFrom(type))
-          dataType.SqlName = "nvarchar";
-        else
-          dataType.SqlName = "varbinary";
-
-        dataType.Store();
-        DataTypes.Add(dataType);
-      }
-      return dataType;
-    }
-    #endregion
-
-    #region Algorithm Methods
-    public List<Guid> GetAlgorithmUsers(long algorithmId) {
-      try {
-        return CallAdministrationService<List<Guid>>(s => s.GetAlgorithmUsers(algorithmId));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh authorized algorithm users failed.", ex);
-        return null;
-      }
-    }
-    public bool UpdateAlgorithmUsers(long algorithmId, List<Guid> users) {
-      try {
-        CallAdministrationService(s => s.UpdateAlgorithmUsers(algorithmId, users));
-        return true;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Update authorized algorithm users failed.", ex);
-        return false;
-      }
-    }
-    public AlgorithmData GetAlgorithmData(long algorithmId) {
-      try {
-        return CallAdministrationService<AlgorithmData>(s => s.GetAlgorithmData(algorithmId));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh algorithm data failed.", ex);
-        return null;
-      }
-    }
-    public bool UpdateAlgorithmData(AlgorithmData algorithmData) {
-      try {
-        CallAdministrationService(s => s.UpdateAlgorithmData(algorithmData));
-        return true;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Update algorithm data failed.", ex);
-        return false;
-      }
-    }
-    #endregion
-
-    #region Problem Methods
-    public List<Guid> GetProblemUsers(long problemId) {
-      try {
-        return CallAdministrationService<List<Guid>>(s => s.GetProblemUsers(problemId));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh authorized problem users failed.", ex);
-        return null;
-      }
-    }
-    public bool UpdateProblemUsers(long problemId, List<Guid> users) {
-      try {
-        CallAdministrationService(s => s.UpdateProblemUsers(problemId, users));
-        return true;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Update authorized problem users failed.", ex);
-        return false;
-      }
-    }
-    public ProblemData GetProblemData(long problemId) {
-      try {
-        return CallAdministrationService<ProblemData>(s => s.GetProblemData(problemId));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh problem data failed.", ex);
-        return null;
-      }
-    }
-    public bool UpdateProblemData(ProblemData problemData) {
-      try {
-        CallAdministrationService(s => s.UpdateProblemData(problemData));
-        return true;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Update problem data failed.", ex);
-        return false;
-      }
-    }
-    #endregion
-
-    #region AlgorithmParameter Methods
-    public AlgorithmParameter GetAlgorithmParameter(long id) {
-      try {
-        return CallAdministrationService<AlgorithmParameter>(s => s.GetAlgorithmParameter(id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh algorithm parameter failed.", ex);
-        return null;
-      }
-    }
-    public ItemCollection<AlgorithmParameter> GetAlgorithmParameters(long algorithmId) {
-      try {
-        ItemCollection<AlgorithmParameter> parameters = new ItemCollection<AlgorithmParameter>();
-        parameters.AddRange(CallAdministrationService<List<AlgorithmParameter>>(s => s.GetAlgorithmParameters(algorithmId)).OrderBy(x => x.Name));
-        return parameters;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh algorithm parameters failed.", ex);
-        return null;
-      }
-    }
-    #endregion
-
-    #region ProblemParameter Methods
-    public ProblemParameter GetProblemParameter(long id) {
-      try {
-        return CallAdministrationService<ProblemParameter>(s => s.GetProblemParameter(id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh problem parameter failed.", ex);
-        return null;
-      }
-    }
-    public ItemCollection<ProblemParameter> GetProblemParameters(long problemId) {
-      try {
-        ItemCollection<ProblemParameter> parameters = new ItemCollection<ProblemParameter>();
-        parameters.AddRange(CallAdministrationService<List<ProblemParameter>>(s => s.GetProblemParameters(problemId)).OrderBy(x => x.Name));
-        return parameters;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh problem parameters failed.", ex);
-        return null;
-      }
-    }
-    #endregion
-
-    #region Result Methods
-    public Result GetResult(long id) {
-      try {
-        return CallAdministrationService<Result>(s => s.GetResult(id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh result failed.", ex);
-        return null;
-      }
-    }
-    public ItemCollection<Result> GetResults(long algorithmId) {
-      try {
-        ItemCollection<Result> results = new ItemCollection<Result>();
-        results.AddRange(CallAdministrationService<List<Result>>(s => s.GetResults(algorithmId)).OrderBy(x => x.Name));
-        return results;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh results failed.", ex);
-        return null;
-      }
-    }
-    #endregion
-
-    #region Experiment Methods
-    public Experiment GetExperiment(long id) {
-      try {
-        return CallAdministrationService<Experiment>(s => s.GetExperiment(id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh experiment failed.", ex);
-        return null;
-      }
-    }
-    public ItemCollection<Experiment> GetExperiments(long algorithmId, long problemId) {
-      try {
-        ItemCollection<Experiment> experiments = new ItemCollection<Experiment>();
-        experiments.AddRange(CallAdministrationService<List<Experiment>>(s => s.GetExperiments(algorithmId, problemId)));
-        experiments.ItemsRemoved += new CollectionItemsChangedEventHandler<Experiment>(experiments_ItemsRemoved);
-        return experiments;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh experiments failed.", ex);
-        return null;
-      }
-    }
-    #endregion
-
-    #region Run Methods
-    public ItemCollection<Run> GetRuns(long experimentId) {
-      try {
-        ItemCollection<Run> runs = new ItemCollection<Run>();
-        runs.AddRange(CallAdministrationService<List<Run>>(s => s.GetRuns(experimentId)).OrderByDescending(x => x.CreatedDate));
-        runs.ItemsRemoved += new CollectionItemsChangedEventHandler<Run>(runs_ItemsRemoved);
-        return runs;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Refresh runs failed.", ex);
-        return null;
-      }
-    }
-    public bool AddRun(long algorithmId, long problemId, IAlgorithm algorithm) {
-      try {
-        IProblem problem = algorithm.Problem;
-
-        ItemCollection<AlgorithmParameter> algorithmParameters = GetAlgorithmParameters(algorithmId);
-        List<AlgorithmParameterValue> algorithmParameterValues = CollectAlgorithmParameterValues(algorithmId, algorithmParameters, algorithm, "");
-        ItemCollection<ProblemParameter> problemParameters = GetProblemParameters(problemId);
-        List<ProblemParameterValue> problemParameterValues = CollectProblemParamterValues(problemId, problemParameters, problem, "");
-        ItemCollection<Result> results = GetResults(algorithmId);
-        List<ResultValue> resultValues = CollectResultValues(algorithmId, results, algorithm);
-
-        Experiment exp = new Experiment();
-        exp.AlgorithmId = algorithmId;
-        exp.ProblemId = problemId;
-        exp.AlgorithmParameterValues = algorithmParameterValues;
-        exp.ProblemParameterValues = problemParameterValues;
-        exp.Store();
-
-        Run r = new Run();
-        r.ExperimentId = exp.Id;
-        r.ClientId = Guid.NewGuid();
-        r.CreatedDate = DateTime.Now;
-        r.RandomSeed = ((IntValue)((IValueParameter)algorithm.Parameters["Seed"]).Value).Value;
-        r.ResultValues = resultValues;
-        r.Store();
-
-        return true;
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Store run failed.", ex);
-        return false;
-      }
-    }
-
-    private List<AlgorithmParameterValue> CollectAlgorithmParameterValues(long algorithmId, ItemCollection<AlgorithmParameter> parameters, IParameterizedItem item, string prefix) {
-      List<AlgorithmParameterValue> values = new List<AlgorithmParameterValue>();
-      foreach (IValueParameter param in item.Parameters.OfType<IValueParameter>()) {
-        if (param.GetsCollected && (param.Value != null) && (param.Name != "Seed")) {
-          AlgorithmParameter p = parameters.FirstOrDefault(x => x.Name == prefix + param.Name);
-          if (p == null) {
-            p = new AlgorithmParameter();
-            p.Name = prefix + param.Name;
-            p.Alias = prefix + param.Name;
-            p.Description = param.Description;
-            p.AlgorithmId = algorithmId;
-            p.DataTypeId = ConvertToDataType(param.DataType).Id;
-            p.Store();
-            parameters.Add(p);
-          }
-          AlgorithmParameterValue value = CreateAlgorithmParameterValue(param.Value);
-          value.AlgorithmParameterId = p.Id;
-          value.DataTypeId = ConvertToDataType(param.Value.GetType()).Id;
-          values.Add(value);
-        }
-
-        if (param.Value is IParameterizedItem)
-          values.AddRange(CollectAlgorithmParameterValues(algorithmId, parameters, (IParameterizedItem)param.Value, (string.IsNullOrEmpty(prefix) ? param.Name : prefix + param.Name) + "."));
-      }
-      return values;
-    }
-    private AlgorithmParameterValue CreateAlgorithmParameterValue(IItem item) {
-      if (item is BoolValue) {
-        AlgorithmParameterBoolValue value = new AlgorithmParameterBoolValue();
-        value.Value = ((BoolValue)item).Value;
-        return value;
-      } else if (item is DoubleValue) {
-        AlgorithmParameterFloatValue value = new AlgorithmParameterFloatValue();
-        value.Value = ((DoubleValue)item).Value;
-        return value;
-      } else if (item is IntValue) {
-        AlgorithmParameterIntValue value = new AlgorithmParameterIntValue();
-        value.Value = ((IntValue)item).Value;
-        return value;
-      } else if (item is StringValue) {
-        AlgorithmParameterStringValue value = new AlgorithmParameterStringValue();
-        value.Value = ((StringValue)item).Value;
-        return value;
-      } else {
-        AlgorithmParameterBlobValue value = new AlgorithmParameterBlobValue();
-        try {
-          using (MemoryStream stream = new MemoryStream()) {
-            XmlGenerator.Serialize(item, stream);
-            stream.Close();
-            value.Value = stream.ToArray();
-          }
-        }
-        catch (Exception ex) {
-          ErrorHandling.ShowErrorDialog(ex);
-        }
-        return value;
-      }
-    }
-    private List<ProblemParameterValue> CollectProblemParamterValues(long problemId, ItemCollection<ProblemParameter> parameters, IParameterizedItem item, string prefix) {
-      List<ProblemParameterValue> values = new List<ProblemParameterValue>();
-      foreach (IValueParameter param in item.Parameters.OfType<IValueParameter>()) {
-        if (param.GetsCollected && (param.Value != null)) {
-          ProblemParameter p = parameters.FirstOrDefault(x => x.Name == prefix + param.Name);
-          if (p == null) {
-            p = new ProblemParameter();
-            p.Name = prefix + param.Name;
-            p.Alias = prefix + param.Name;
-            p.Description = param.Description;
-            p.ProblemId = problemId;
-            p.DataTypeId = ConvertToDataType(param.DataType).Id;
-            p.Store();
-            parameters.Add(p);
-          }
-          ProblemParameterValue value = CreateProblemParameterValue(param.Value);
-          value.ProblemParameterId = p.Id;
-          value.DataTypeId = ConvertToDataType(param.Value.GetType()).Id;
-          values.Add(value);
-        }
-
-        if (param.Value is IParameterizedItem)
-          values.AddRange(CollectProblemParamterValues(problemId, parameters, (IParameterizedItem)param.Value, (string.IsNullOrEmpty(prefix) ? param.Name : prefix + param.Name) + "."));
-      }
-      return values;
-    }
-    private ProblemParameterValue CreateProblemParameterValue(IItem item) {
-      if (item is BoolValue) {
-        ProblemParameterBoolValue value = new ProblemParameterBoolValue();
-        value.Value = ((BoolValue)item).Value;
-        return value;
-      } else if (item is DoubleValue) {
-        ProblemParameterFloatValue value = new ProblemParameterFloatValue();
-        value.Value = ((DoubleValue)item).Value;
-        return value;
-      } else if (item is IntValue) {
-        ProblemParameterIntValue value = new ProblemParameterIntValue();
-        value.Value = ((IntValue)item).Value;
-        return value;
-      } else if (item is StringValue) {
-        ProblemParameterStringValue value = new ProblemParameterStringValue();
-        value.Value = ((StringValue)item).Value;
-        return value;
-      } else {
-        ProblemParameterBlobValue value = new ProblemParameterBlobValue();
-        try {
-          using (MemoryStream stream = new MemoryStream()) {
-            XmlGenerator.Serialize(item, stream);
-            stream.Close();
-            value.Value = stream.ToArray();
-          }
-        }
-        catch (Exception ex) {
-          ErrorHandling.ShowErrorDialog(ex);
-        }
-        return value;
-      }
-    }
-    private List<ResultValue> CollectResultValues(long algorithmId, ItemCollection<Result> results, IAlgorithm algorithm) {
-      List<ResultValue> values = new List<ResultValue>();
-      foreach (IResult result in algorithm.Results) {
-        if (result.Value != null) {
-          Result r = results.FirstOrDefault(x => x.Name == result.Name);
-          if (r == null) {
-            r = new Result();
-            r.Name = result.Name;
-            r.Alias = result.Name;
-            r.Description = result.Description;
-            r.AlgorithmId = algorithmId;
-            r.DataTypeId = ConvertToDataType(result.DataType).Id;
-            r.Store();
-            results.Add(r);
-          }
-          ResultValue value = CreateResultValue(result.Value);
-          value.ResultId = r.Id;
-          value.DataTypeId = ConvertToDataType(result.Value.GetType()).Id;
-          values.Add(value);
-        }
-      }
-      return values;
-    }
-    private ResultValue CreateResultValue(IItem item) {
-      if (item is BoolValue) {
-        ResultBoolValue value = new ResultBoolValue();
-        value.Value = ((BoolValue)item).Value;
-        return value;
-      } else if (item is DoubleValue) {
-        ResultFloatValue value = new ResultFloatValue();
-        value.Value = ((DoubleValue)item).Value;
-        return value;
-      } else if (item is IntValue) {
-        ResultIntValue value = new ResultIntValue();
-        value.Value = ((IntValue)item).Value;
-        return value;
-      } else if (item is StringValue) {
-        ResultStringValue value = new ResultStringValue();
-        value.Value = ((StringValue)item).Value;
-        return value;
-      } else {
-        ResultBlobValue value = new ResultBlobValue();
-        try {
-          using (MemoryStream stream = new MemoryStream()) {
-            XmlGenerator.Serialize(item, stream);
-            stream.Close();
-            value.Value = stream.ToArray();
-          }
-        }
-        catch (Exception ex) {
-          ErrorHandling.ShowErrorDialog(ex);
-        }
-        return value;
-      }
-    }
-    #endregion
-
-    #region Query Methods
-    private IEnumerable<Filter> filters;
-    public IEnumerable<Filter> GetFilters(bool refresh) {
-      if (refresh || (filters == null)) {
-        try {
-          filters = CallQueryService<List<Filter>>(s => s.GetFilters());
-        }
-        catch (Exception ex) {
-          ErrorHandling.ShowErrorDialog("Get filters failed.", ex);
-          return Enumerable.Empty<Filter>();
-        }
-      }
-      return filters;
-    }
-    public IEnumerable<Filter> GetFilters() {
-      return GetFilters(false);
-    }
-    public long GetNumberOfQueryResults(Filter filter) {
-      try {
-        return CallQueryService<long>(x => x.GetNumberOfQueryResults(filter));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Get number of query results failed.", ex);
-        return -1;
-      }
-    }
-    public IEnumerable<long> GetQueryResultIds(Filter filter) {
-      try {
-        return CallQueryService<IEnumerable<long>>(x => x.GetQueryResultIds(filter));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Get query result ids failed.", ex);
-        return Enumerable.Empty<long>();
-      }
-    }
-    public IEnumerable<QueryResult> GetQueryResults(IEnumerable<long> ids) {
-      try {
-        return CallQueryService<IEnumerable<QueryResult>>(s => s.GetQueryResults(ids.ToList()));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Get query results failed.", ex);
-        return null;
-      }
-    }
-    #endregion
-
-    #region Events
-    public event EventHandler Refreshing;
-    private void OnRefreshing() {
-      EventHandler handler = Refreshing;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler Refreshed;
-    private void OnRefreshed() {
-      EventHandler handler = Refreshed;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    private void platforms_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Platform> e) {
-      try {
-        foreach (Platform p in e.Items)
-          CallAdministrationService(s => s.DeletePlatform(p.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void dataTypes_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataType> e) {
-      try {
-        foreach (DataType d in e.Items)
-          CallAdministrationService(s => s.DeleteDataType(d.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void algorithmClasses_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<AlgorithmClass> e) {
-      try {
-        foreach (AlgorithmClass a in e.Items)
-          CallAdministrationService(s => s.DeleteAlgorithmClass(a.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void algorithms_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Algorithm> e) {
-      try {
-        foreach (Algorithm a in e.Items)
-          CallAdministrationService(s => s.DeleteAlgorithm(a.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void problemClasses_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<ProblemClass> e) {
-      try {
-        foreach (ProblemClass p in e.Items)
-          CallAdministrationService(s => s.DeleteProblemClass(p.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void problems_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Problem> e) {
-      try {
-        foreach (Problem p in e.Items)
-          CallAdministrationService(s => s.DeleteProblem(p.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void experiments_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Experiment> e) {
-      try {
-        foreach (Experiment exp in e.Items)
-          CallAdministrationService(s => s.DeleteExperiment(exp.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    private void runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Run> e) {
-      try {
-        foreach (Run r in e.Items)
-          CallAdministrationService(s => s.DeleteRun(r.Id));
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
-      }
-    }
-    #endregion
-
-    #region Helpers
-    private void CallAdministrationService(Action<IAdministrationService> call) {
-      AdministrationServiceClient client = ClientFactory.CreateClient<AdministrationServiceClient, IAdministrationService>();
-      try {
-        call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-    private T CallAdministrationService<T>(Func<IAdministrationService, T> call) {
-      AdministrationServiceClient client = ClientFactory.CreateClient<AdministrationServiceClient, IAdministrationService>();
-      try {
-        return call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-    private void CallQueryService(Action<IQueryService> call) {
-      QueryServiceClient client = ClientFactory.CreateClient<QueryServiceClient, IQueryService>();
-      try {
-        call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-    private T CallQueryService<T>(Func<IQueryService, T> call) {
-      QueryServiceClient client = ClientFactory.CreateClient<QueryServiceClient, IQueryService>();
-      try {
-        return call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-    private T CallAuthenticationService<T>(Func<IAuthenticationService, T> call) {
-      AuthenticationServiceClient client = ClientFactory.CreateClient<AuthenticationServiceClient, IAuthenticationService>();
-      try {
-        return call(client);
-      }
-      finally {
-        try {
-          client.Close();
-        }
-        catch (Exception) {
-          client.Abort();
-        }
-      }
-    }
-    #endregion
-  }
-}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBExperiment.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBExperiment.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBExperiment.cs	(revision 5639)
@@ -0,0 +1,359 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using System.IO;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Default.Xml;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("OKB Experiment", "...")]
+  [Creatable("Optimization Knowledge Base (OKB)")]
+  [StorableClass]
+  public sealed class OKBExperiment : NamedItem, IOptimizer, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get {
+        if (Algorithm != null) return Algorithm.ItemImage;
+        else return HeuristicLab.Common.Resources.VSImageLibrary.Event;
+      }
+    }
+
+    private long algorithmId;
+    public long AlgorithmId {
+      get { return algorithmId; }
+      private set {
+        if (algorithmId != value) {
+          algorithmId = value;
+          OnAlgorithmIdChanged();
+        }
+      }
+    }
+    private IAlgorithm algorithm;
+    private IAlgorithm Algorithm {
+      get { return algorithm; }
+      set {
+        DeregisterAlgorithmEvents();
+        algorithm = value;
+        RegisterAlgorithmEvents();
+        if ((algorithm != null) && (problem != null)) {
+          algorithm.Problem = problem;
+          algorithm.Prepare(true);
+        }
+      }
+    }
+    private long problemId;
+    public long ProblemId {
+      get { return problemId; }
+      private set {
+        if (problemId != value) {
+          problemId = value;
+          OnProblemIdChanged();
+        }
+      }
+    }
+    private IProblem problem;
+    private IProblem Problem {
+      get { return problem; }
+      set {
+        problem = value;
+        if ((algorithm != null) && (problem != null)) {
+          algorithm.Problem = problem;
+          algorithm.Prepare(true);
+        }
+      }
+    }
+
+    public ExecutionState ExecutionState {
+      get {
+        if ((Algorithm != null) && (Problem != null)) return Algorithm.ExecutionState;
+        else return ExecutionState.Stopped;
+      }
+    }
+    public TimeSpan ExecutionTime {
+      get {
+        if (Algorithm != null) return Algorithm.ExecutionTime;
+        else return TimeSpan.Zero;
+      }
+    }
+    public IKeyedItemCollection<string, IParameter> AlgorithmParameters {
+      get {
+        if (Algorithm != null) return Algorithm.Parameters;
+        else return null;
+      }
+    }
+    public IKeyedItemCollection<string, IParameter> ProblemParameters {
+      get {
+        if (Problem != null) return Problem.Parameters;
+        else return null;
+      }
+    }
+    public ResultCollection Results {
+      get {
+        if (Algorithm != null) return Algorithm.Results;
+        else return null;
+      }
+    }
+    private RunCollection runs;
+    public RunCollection Runs {
+      get { return runs; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "AlgorithmId")]
+    private long StorableAlgorithmId {
+      get { return algorithmId; }
+      set { algorithmId = value; }
+    }
+    [Storable(Name = "Algorithm")]
+    private IAlgorithm StorableAlgorithm {
+      get { return Algorithm; }
+      set { Algorithm = value; }
+    }
+    [Storable(Name = "ProblemId")]
+    private long StorableProblemId {
+      get { return problemId; }
+      set { problemId = value; }
+    }
+    [Storable(Name = "Problem")]
+    private IProblem StorableProblem {
+      get { return Problem; }
+      set { Problem = value; }
+    }
+    [Storable(Name = "Runs")]
+    private RunCollection StorableRuns {
+      get { return runs; }
+      set { runs = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private OKBExperiment(bool deserializing) : base(deserializing) { }
+    private OKBExperiment(OKBExperiment original, Cloner cloner)
+      : base(original, cloner) {
+      algorithmId = original.algorithmId;
+      algorithm = cloner.Clone(original.algorithm);
+      problemId = original.problemId;
+      problem = cloner.Clone(original.problem);
+      runs = cloner.Clone(original.runs);
+      RegisterAlgorithmEvents();
+    }
+    public OKBExperiment()
+      : base() {
+      name = ItemName;
+      description = ItemDescription;
+      runs = new RunCollection();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterAlgorithmEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OKBExperiment(this, cloner);
+    }
+
+    public void Load(Algorithm algorithm) {
+      if (algorithm == null) {
+        Algorithm = null;
+        AlgorithmId = 0;
+      } else {
+        try {
+          if (AlgorithmId != algorithm.Id) {
+            AlgorithmData algorithmData = OKBClient.Instance.GetAlgorithmData(algorithm.Id);
+            using (MemoryStream stream = new MemoryStream(algorithmData.Data)) {
+              Algorithm = XmlParser.Deserialize<IAlgorithm>(stream);
+              Algorithm.StoreAlgorithmInEachRun = true;
+            }
+          }
+          AlgorithmId = algorithm.Id;
+        }
+        catch (Exception ex) {
+          Algorithm = null;
+          AlgorithmId = 0;
+          OnExceptionOccurred(ex);
+        }
+      }
+    }
+    public void Load(Problem problem) {
+      if (problem == null) {
+        Problem = null;
+        ProblemId = 0;
+      } else {
+        try {
+          if (ProblemId != problem.Id) {
+            ProblemData problemData = OKBClient.Instance.GetProblemData(problem.Id);
+            using (MemoryStream stream = new MemoryStream(problemData.Data)) {
+              Problem = XmlParser.Deserialize<IProblem>(stream);
+            }
+          }
+          ProblemId = problem.Id;
+        }
+        catch (Exception ex) {
+          Problem = null;
+          ProblemId = 0;
+          OnExceptionOccurred(ex);
+        }
+      }
+    }
+
+    public void Prepare(bool clearRuns) {
+      if (Algorithm != null) Algorithm.Prepare(clearRuns);
+    }
+    public void Prepare() {
+      if (Algorithm != null) Algorithm.Prepare();
+    }
+    public void Start() {
+      if (Algorithm != null) Algorithm.Start();
+    }
+    public void Pause() {
+      if (Algorithm != null) Algorithm.Pause();
+    }
+    public void Stop() {
+      if (Algorithm != null) Algorithm.Stop();
+    }
+
+    #region Events
+    public event EventHandler AlgorithmIdChanged;
+    private void OnAlgorithmIdChanged() {
+      EventHandler handler = AlgorithmIdChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ProblemIdChanged;
+    private void OnProblemIdChanged() {
+      EventHandler handler = ProblemIdChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+    private void OnExceptionOccurred(Exception exception) {
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+    public event EventHandler ExecutionStateChanged;
+    private void OnExecutionStateChanged() {
+      EventHandler handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    private void OnExecutionTimeChanged() {
+      EventHandler handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    private void OnPrepared() {
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Started;
+    private void OnStarted() {
+      EventHandler handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    private void OnPaused() {
+      EventHandler handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    private void OnStopped() {
+      EventHandler handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    private void RegisterAlgorithmEvents() {
+      if (Algorithm != null) {
+        Algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(algorithm_ExceptionOccurred);
+        Algorithm.ExecutionStateChanged += new EventHandler(algorithm_ExecutionStateChanged);
+        Algorithm.ExecutionTimeChanged += new EventHandler(algorithm_ExecutionTimeChanged);
+        Algorithm.ItemImageChanged += new EventHandler(algorithm_ItemImageChanged);
+        Algorithm.Paused += new EventHandler(algorithm_Paused);
+        Algorithm.Prepared += new EventHandler(algorithm_Prepared);
+        Algorithm.Started += new EventHandler(algorithm_Started);
+        Algorithm.Stopped += new EventHandler(algorithm_Stopped);
+        Algorithm.Runs.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsAdded);
+        Algorithm.Runs.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsRemoved);
+        Algorithm.Runs.CollectionReset += new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_CollectionReset);
+      }
+    }
+    private void DeregisterAlgorithmEvents() {
+      if (Algorithm != null) {
+        Algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(algorithm_ExceptionOccurred);
+        Algorithm.ExecutionStateChanged -= new EventHandler(algorithm_ExecutionStateChanged);
+        Algorithm.ExecutionTimeChanged -= new EventHandler(algorithm_ExecutionTimeChanged);
+        Algorithm.ItemImageChanged -= new EventHandler(algorithm_ItemImageChanged);
+        Algorithm.Paused -= new EventHandler(algorithm_Paused);
+        Algorithm.Prepared -= new EventHandler(algorithm_Prepared);
+        Algorithm.Started -= new EventHandler(algorithm_Started);
+        Algorithm.Stopped -= new EventHandler(algorithm_Stopped);
+        Algorithm.Runs.ItemsAdded -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsAdded);
+        Algorithm.Runs.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_ItemsRemoved);
+        Algorithm.Runs.CollectionReset -= new Collections.CollectionItemsChangedEventHandler<IRun>(algorithm_Runs_CollectionReset);
+      }
+    }
+    private void algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      OnExceptionOccurred(e.Value);
+    }
+    private void algorithm_ExecutionStateChanged(object sender, EventArgs e) {
+      OnExecutionStateChanged();
+    }
+    private void algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
+      OnExecutionTimeChanged();
+    }
+    private void algorithm_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void algorithm_Paused(object sender, EventArgs e) {
+      OnPaused();
+    }
+    private void algorithm_Prepared(object sender, EventArgs e) {
+      OnPrepared();
+    }
+    private void algorithm_Started(object sender, EventArgs e) {
+      OnStarted();
+    }
+    private void algorithm_Stopped(object sender, EventArgs e) {
+      try {
+        OKBClient.Instance.AddRun(AlgorithmId, ProblemId, algorithm);
+      }
+      catch (Exception ex) {
+        OnExceptionOccurred(ex);
+      }
+      OnStopped();
+    }
+    private void algorithm_Runs_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      runs.AddRange(e.Items);
+    }
+    private void algorithm_Runs_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      runs.RemoveRange(e.Items);
+    }
+    private void algorithm_Runs_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      runs.Clear();
+      runs.AddRange(algorithm.Runs);
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs	(revision 5639)
@@ -0,0 +1,257 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Default.Xml;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("OKB Problem", "A base class for problems which are stored in the OKB.")]
+  [StorableClass]
+  public abstract class OKBProblem : Item, IProblem {
+    public virtual Type ProblemType {
+      get { return typeof(IProblem); }
+    }
+    private long problemId;
+    public long ProblemId {
+      get { return problemId; }
+    }
+    private IProblem problem;
+    public IProblem Problem {
+      get { return problem; }
+      private set {
+        if (value == null) throw new ArgumentNullException("Problem", "Problem cannot be null.");
+        if (value != problem) {
+          CancelEventArgs<string> e = new CancelEventArgs<string>(value.Name);
+          OnNameChanging(e);
+          if (!e.Cancel) {
+            DeregisterProblemEvents();
+            problem = value;
+            RegisterProblemEvents();
+
+            OnToStringChanged();
+            OnItemImageChanged();
+            OnNameChanged();
+            OnDescriptionChanged();
+            OnProblemChanged();
+            OnSolutionCreatorChanged();
+            OnEvaluatorChanged();
+            OnOperatorsChanged();
+            OnReset();
+          }
+        }
+      }
+    }
+
+    public override Image ItemImage {
+      get { return Problem.ItemImage; }
+    }
+
+    public string Name {
+      get { return Problem.Name; }
+      set { throw new NotSupportedException("Name cannot be changed."); }
+    }
+    public string Description {
+      get { return Problem.Description; }
+      set { throw new NotSupportedException("Description cannot be changed."); }
+    }
+    public bool CanChangeName {
+      get { return false; }
+    }
+    public bool CanChangeDescription {
+      get { return false; }
+    }
+
+    public IKeyedItemCollection<string, IParameter> Parameters {
+      get { return Problem.Parameters; }
+    }
+
+    public IParameter SolutionCreatorParameter {
+      get { return Problem.SolutionCreatorParameter; }
+    }
+    public ISolutionCreator SolutionCreator {
+      get { return Problem.SolutionCreator; }
+    }
+    public IParameter EvaluatorParameter {
+      get { return Problem.EvaluatorParameter; }
+    }
+    public IEvaluator Evaluator {
+      get { return Problem.Evaluator; }
+    }
+    public IEnumerable<IOperator> Operators {
+      get { return Problem.Operators; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "ProblemId")]
+    private long StorableProblemId {
+      get { return problemId; }
+      set { problemId = value; }
+    }
+    [Storable(Name = "Problem")]
+    private IProblem StorableProblem {
+      get { return problem; }
+      set {
+        problem = value;
+        RegisterProblemEvents();
+      }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected OKBProblem(bool deserializing) : base(deserializing) { }
+    protected OKBProblem(OKBProblem original, Cloner cloner)
+      : base(original, cloner) {
+      problemId = original.problemId;
+      problem = cloner.Clone(original.problem);
+      RegisterProblemEvents();
+    }
+    protected OKBProblem(IProblem initialProblem)
+      : base() {
+      if (initialProblem == null) throw new ArgumentNullException("initialProblem", "Initial problem cannot be null.");
+      problemId = -1;
+      problem = initialProblem;
+      RegisterProblemEvents();
+    }
+
+    public void Load(long problemId) {
+      if (this.problemId != problemId) {
+        IProblem problem;
+        ProblemData problemData = OKBClient.Instance.GetProblemData(problemId);
+        using (MemoryStream stream = new MemoryStream(problemData.Data)) {
+          problem = XmlParser.Deserialize<IProblem>(stream);
+        }
+        if (ProblemType.IsAssignableFrom(problem.GetType())) {
+          this.problemId = problemId;
+          Problem = problem;
+        }
+      }
+    }
+
+    public void CollectParameterValues(IDictionary<string, IItem> values) {
+      Problem.CollectParameterValues(values);
+    }
+
+    #region Events
+    public event EventHandler ProblemChanged;
+    protected virtual void OnProblemChanged() {
+      EventHandler handler = ProblemChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<CancelEventArgs<string>> NameChanging;
+    protected virtual void OnNameChanging(CancelEventArgs<string> e) {
+      var handler = NameChanging;
+      if (handler != null) handler(this, e);
+    }
+    public event EventHandler NameChanged;
+    protected virtual void OnNameChanged() {
+      var handler = NameChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler DescriptionChanged;
+    protected virtual void OnDescriptionChanged() {
+      var handler = DescriptionChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler SolutionCreatorChanged;
+    protected virtual void OnSolutionCreatorChanged() {
+      var handler = SolutionCreatorChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler EvaluatorChanged;
+    protected virtual void OnEvaluatorChanged() {
+      var handler = EvaluatorChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler OperatorsChanged;
+    protected virtual void OnOperatorsChanged() {
+      var handler = OperatorsChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Reset;
+    protected virtual void OnReset() {
+      var handler = Reset;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected virtual void RegisterProblemEvents() {
+      if (Problem != null) {
+        Problem.ToStringChanged += new EventHandler(Problem_ToStringChanged);
+        Problem.ItemImageChanged += new EventHandler(Problem_ItemImageChanged);
+        Problem.NameChanging += new EventHandler<CancelEventArgs<string>>(Problem_NameChanging);
+        Problem.NameChanged += new EventHandler(Problem_NameChanged);
+        Problem.DescriptionChanged += new EventHandler(Problem_DescriptionChanged);
+        Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
+        Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
+        Problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged);
+        Problem.Reset += new EventHandler(Problem_Reset);
+      }
+    }
+    protected virtual void DeregisterProblemEvents() {
+      if (Problem != null) {
+        Problem.ToStringChanged -= new EventHandler(Problem_ToStringChanged);
+        Problem.ItemImageChanged -= new EventHandler(Problem_ItemImageChanged);
+        Problem.NameChanging -= new EventHandler<CancelEventArgs<string>>(Problem_NameChanging);
+        Problem.NameChanged -= new EventHandler(Problem_NameChanged);
+        Problem.DescriptionChanged -= new EventHandler(Problem_DescriptionChanged);
+        Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
+        Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
+        Problem.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged);
+        Problem.Reset -= new EventHandler(Problem_Reset);
+      }
+    }
+
+    private void Problem_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    private void Problem_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void Problem_NameChanging(object sender, CancelEventArgs<string> e) {
+      OnNameChanging(e);
+    }
+    private void Problem_NameChanged(object sender, EventArgs e) {
+      OnNameChanged();
+    }
+    private void Problem_DescriptionChanged(object sender, EventArgs e) {
+      OnDescriptionChanged();
+    }
+    private void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
+      OnSolutionCreatorChanged();
+    }
+    private void Problem_EvaluatorChanged(object sender, EventArgs e) {
+      OnEvaluatorChanged();
+    }
+    private void Problem_OperatorsChanged(object sender, EventArgs e) {
+      OnOperatorsChanged();
+    }
+    private void Problem_Reset(object sender, EventArgs e) {
+      OnReset();
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs	(revision 5639)
@@ -0,0 +1,104 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("OKB Run", "The parameters and results of an algorithm run which are stored in the OKB.")]
+  [StorableClass]
+  public sealed class OKBRun : NamedItemWrapper<IRun>, IRun, IStorableContent {
+    public string Filename { get; set; }
+
+    private long runId;
+    public long RunId {
+      get { return runId; }
+    }
+
+    public IAlgorithm Algorithm {
+      get { return WrappedItem.Algorithm; }
+    }
+    public IDictionary<string, IItem> Parameters {
+      get { return WrappedItem.Parameters; }
+    }
+    public IDictionary<string, IItem> Results {
+      get { return WrappedItem.Results; }
+    }
+
+    public Color Color {
+      get { return WrappedItem.Color; }
+      set { WrappedItem.Color = value; }
+    }
+    public bool Visible {
+      get { return WrappedItem.Visible; }
+      set { WrappedItem.Visible = value; }
+    }
+
+    #region Persistence Properties
+    [Storable(Name = "RunId")]
+    private long StorableRunId {
+      get { return runId; }
+      set { runId = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private OKBRun(bool deserializing) : base(deserializing) { }
+    private OKBRun(OKBRun original, Cloner cloner)
+      : base(original, cloner) {
+      runId = original.runId;
+    }
+    public OKBRun(IRun run)
+      : base(run) {
+      runId = -1;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OKBRun(this, cloner);
+    }
+
+    #region Events
+    public event EventHandler Changed;
+    private void OnChanged() {
+      var handler = Changed;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected override void RegisterWrappedItemEvents() {
+      base.RegisterWrappedItemEvents();
+      WrappedItem.Changed += new EventHandler(WrappedItem_Changed);
+    }
+    protected override void DeregisterWrappedItemEvents() {
+      WrappedItem.Changed -= new EventHandler(WrappedItem_Changed);
+      base.DeregisterWrappedItemEvents();
+    }
+
+    private void WrappedItem_Changed(object sender, EventArgs e) {
+      OnChanged();
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/RunCreationClient.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/RunCreationClient.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/RunCreationClient.cs	(revision 5639)
@@ -0,0 +1,812 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using HeuristicLab.Clients.Common;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("OKBClient", "Client for accessing the OKB.")]
+  public sealed class OKBClient : IContent {
+    private static OKBClient instance;
+    public static OKBClient Instance {
+      get {
+        if (instance == null) instance = new OKBClient();
+        return instance;
+      }
+    }
+
+    #region Properties
+    private ItemCollection<Platform> platforms;
+    public ItemCollection<Platform> Platforms {
+      get { return platforms; }
+    }
+    private ItemCollection<DataType> dataTypes;
+    public ItemCollection<DataType> DataTypes {
+      get { return dataTypes; }
+    }
+    private IEnumerable<User> users;
+    public IEnumerable<User> Users {
+      get { return users; }
+    }
+    private ItemCollection<AlgorithmClass> algorithmClasses;
+    public ItemCollection<AlgorithmClass> AlgorithmClasses {
+      get { return algorithmClasses; }
+    }
+    private ItemCollection<Algorithm> algorithms;
+    public ItemCollection<Algorithm> Algorithms {
+      get { return algorithms; }
+    }
+    private ItemCollection<ProblemClass> problemClasses;
+    public ItemCollection<ProblemClass> ProblemClasses {
+      get { return problemClasses; }
+    }
+    private ItemCollection<Problem> problems;
+    public ItemCollection<Problem> Problems {
+      get { return problems; }
+    }
+    #endregion
+
+    private OKBClient() {
+      platforms = new ItemCollection<Platform>();
+      platforms.ItemsRemoved += new CollectionItemsChangedEventHandler<Platform>(platforms_ItemsRemoved);
+      dataTypes = new ItemCollection<DataType>();
+      dataTypes.ItemsRemoved += new CollectionItemsChangedEventHandler<DataType>(dataTypes_ItemsRemoved);
+      algorithmClasses = new ItemCollection<AlgorithmClass>();
+      algorithmClasses.ItemsRemoved += new CollectionItemsChangedEventHandler<AlgorithmClass>(algorithmClasses_ItemsRemoved);
+      algorithms = new ItemCollection<Algorithm>();
+      algorithms.ItemsRemoved += new CollectionItemsChangedEventHandler<Algorithm>(algorithms_ItemsRemoved);
+      problemClasses = new ItemCollection<ProblemClass>();
+      problemClasses.ItemsRemoved += new CollectionItemsChangedEventHandler<ProblemClass>(problemClasses_ItemsRemoved);
+      problems = new ItemCollection<Problem>();
+      problems.ItemsRemoved += new CollectionItemsChangedEventHandler<Problem>(problems_ItemsRemoved);
+    }
+
+    #region Refresh
+    public void Refresh() {
+      OnRefreshing();
+
+      platforms.Clear();
+      dataTypes.Clear();
+      algorithmClasses.Clear();
+      algorithms.Clear();
+      problemClasses.Clear();
+      problems.Clear();
+
+      var call = new Func<Exception>(delegate() {
+        try {
+          platforms.AddRange(CallAdministrationService<List<Platform>>(s => s.GetPlatforms()).OrderBy(x => x.Name));
+          dataTypes.AddRange(CallAdministrationService<List<DataType>>(s => s.GetDataTypes()).OrderBy(x => x.Name));
+          users = CallAuthenticationService<List<User>>(s => s.GetUsers()).OrderBy(x => x.Name);
+          algorithmClasses.AddRange(CallAdministrationService<List<AlgorithmClass>>(s => s.GetAlgorithmClasses()).OrderBy(x => x.Name));
+          algorithms.AddRange(CallAdministrationService<List<Algorithm>>(s => s.GetAlgorithms()).OrderBy(x => x.Name));
+          problemClasses.AddRange(CallAdministrationService<List<ProblemClass>>(s => s.GetProblemClasses()).OrderBy(x => x.Name));
+          problems.AddRange(CallAdministrationService<List<Problem>>(s => s.GetProblems()).OrderBy(x => x.Name));
+          return null;
+        }
+        catch (Exception ex) {
+          return ex;
+        }
+      });
+      call.BeginInvoke(delegate(IAsyncResult result) {
+        Exception ex = call.EndInvoke(result);
+        if (ex != null) ErrorHandling.ShowErrorDialog("Refresh failed.", ex);
+        OnRefreshed();
+      }, null);
+    }
+    #endregion
+
+    #region Store
+    public bool Store(IOKBItem item) {
+      try {
+        if (item.Id == 0) {
+          if (item is Platform)
+            item.Id = CallAdministrationService<long>(s => s.AddPlatform((Platform)item));
+          else if (item is DataType)
+            item.Id = CallAdministrationService<long>(s => s.AddDataType((DataType)item));
+          else if (item is AlgorithmClass)
+            item.Id = CallAdministrationService<long>(s => s.AddAlgorithmClass((AlgorithmClass)item));
+          else if (item is Algorithm)
+            item.Id = CallAdministrationService<long>(s => s.AddAlgorithm((Algorithm)item));
+          else if (item is AlgorithmParameter)
+            item.Id = CallAdministrationService<long>(s => s.AddAlgorithmParameter((AlgorithmParameter)item));
+          else if (item is ProblemClass)
+            item.Id = CallAdministrationService<long>(s => s.AddProblemClass((ProblemClass)item));
+          else if (item is Problem)
+            item.Id = CallAdministrationService<long>(s => s.AddProblem((Problem)item));
+          else if (item is ProblemParameter)
+            item.Id = CallAdministrationService<long>(s => s.AddProblemParameter((ProblemParameter)item));
+          else if (item is Result)
+            item.Id = CallAdministrationService<long>(s => s.AddResult((Result)item));
+          else if (item is Experiment)
+            item.Id = CallAdministrationService<long>(s => s.AddExperiment((Experiment)item));
+          else if (item is Run)
+            item.Id = CallAdministrationService<long>(s => s.AddRun((Run)item));
+        } else {
+          if (item is Platform)
+            CallAdministrationService(s => s.UpdatePlatform((Platform)item));
+          else if (item is DataType)
+            CallAdministrationService(s => s.UpdateDataType((DataType)item));
+          else if (item is AlgorithmClass)
+            CallAdministrationService(s => s.UpdateAlgorithmClass((AlgorithmClass)item));
+          else if (item is Algorithm)
+            CallAdministrationService(s => s.UpdateAlgorithm((Algorithm)item));
+          else if (item is AlgorithmParameter)
+            CallAdministrationService(s => s.UpdateAlgorithmParameter((AlgorithmParameter)item));
+          else if (item is ProblemClass)
+            CallAdministrationService(s => s.UpdateProblemClass((ProblemClass)item));
+          else if (item is Problem)
+            CallAdministrationService(s => s.UpdateProblem((Problem)item));
+          else if (item is ProblemParameter)
+            CallAdministrationService(s => s.UpdateProblemParameter((ProblemParameter)item));
+          else if (item is Result)
+            CallAdministrationService(s => s.UpdateResult((Result)item));
+          else if (item is Experiment)
+            item.Id = CallAdministrationService<long>(s => s.AddExperiment((Experiment)item));
+          else if (item is Run)
+            item.Id = CallAdministrationService<long>(s => s.AddRun((Run)item));
+        }
+        return true;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Store failed.", ex);
+        return false;
+      }
+    }
+    #endregion
+
+    #region DataType Methods
+    public DataType ConvertToDataType(Type type) {
+      DataType dataType = DataTypes.FirstOrDefault(x => x.TypeName == type.AssemblyQualifiedName);
+      if (dataType == null) {
+        dataType = new DataType();
+        dataType.Name = type.Name;
+        dataType.TypeName = type.AssemblyQualifiedName;
+        dataType.PlatformId = Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3").Id;
+
+        if (typeof(BoolValue).IsAssignableFrom(type))
+          dataType.SqlName = "bit";
+        else if (typeof(IntValue).IsAssignableFrom(type))
+          dataType.SqlName = "bigint";
+        else if (typeof(DoubleValue).IsAssignableFrom(type))
+          dataType.SqlName = "float";
+        else if (typeof(StringValue).IsAssignableFrom(type) || typeof(IStringConvertibleValue).IsAssignableFrom(type))
+          dataType.SqlName = "nvarchar";
+        else
+          dataType.SqlName = "varbinary";
+
+        dataType.Store();
+        DataTypes.Add(dataType);
+      }
+      return dataType;
+    }
+    #endregion
+
+    #region Algorithm Methods
+    public List<Guid> GetAlgorithmUsers(long algorithmId) {
+      try {
+        return CallAdministrationService<List<Guid>>(s => s.GetAlgorithmUsers(algorithmId));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh authorized algorithm users failed.", ex);
+        return null;
+      }
+    }
+    public bool UpdateAlgorithmUsers(long algorithmId, List<Guid> users) {
+      try {
+        CallAdministrationService(s => s.UpdateAlgorithmUsers(algorithmId, users));
+        return true;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Update authorized algorithm users failed.", ex);
+        return false;
+      }
+    }
+    public AlgorithmData GetAlgorithmData(long algorithmId) {
+      try {
+        return CallAdministrationService<AlgorithmData>(s => s.GetAlgorithmData(algorithmId));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh algorithm data failed.", ex);
+        return null;
+      }
+    }
+    public bool UpdateAlgorithmData(AlgorithmData algorithmData) {
+      try {
+        CallAdministrationService(s => s.UpdateAlgorithmData(algorithmData));
+        return true;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Update algorithm data failed.", ex);
+        return false;
+      }
+    }
+    #endregion
+
+    #region Problem Methods
+    public List<Guid> GetProblemUsers(long problemId) {
+      try {
+        return CallAdministrationService<List<Guid>>(s => s.GetProblemUsers(problemId));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh authorized problem users failed.", ex);
+        return null;
+      }
+    }
+    public bool UpdateProblemUsers(long problemId, List<Guid> users) {
+      try {
+        CallAdministrationService(s => s.UpdateProblemUsers(problemId, users));
+        return true;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Update authorized problem users failed.", ex);
+        return false;
+      }
+    }
+    public ProblemData GetProblemData(long problemId) {
+      try {
+        return CallAdministrationService<ProblemData>(s => s.GetProblemData(problemId));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh problem data failed.", ex);
+        return null;
+      }
+    }
+    public bool UpdateProblemData(ProblemData problemData) {
+      try {
+        CallAdministrationService(s => s.UpdateProblemData(problemData));
+        return true;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Update problem data failed.", ex);
+        return false;
+      }
+    }
+    #endregion
+
+    #region AlgorithmParameter Methods
+    public AlgorithmParameter GetAlgorithmParameter(long id) {
+      try {
+        return CallAdministrationService<AlgorithmParameter>(s => s.GetAlgorithmParameter(id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh algorithm parameter failed.", ex);
+        return null;
+      }
+    }
+    public ItemCollection<AlgorithmParameter> GetAlgorithmParameters(long algorithmId) {
+      try {
+        ItemCollection<AlgorithmParameter> parameters = new ItemCollection<AlgorithmParameter>();
+        parameters.AddRange(CallAdministrationService<List<AlgorithmParameter>>(s => s.GetAlgorithmParameters(algorithmId)).OrderBy(x => x.Name));
+        return parameters;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh algorithm parameters failed.", ex);
+        return null;
+      }
+    }
+    #endregion
+
+    #region ProblemParameter Methods
+    public ProblemParameter GetProblemParameter(long id) {
+      try {
+        return CallAdministrationService<ProblemParameter>(s => s.GetProblemParameter(id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh problem parameter failed.", ex);
+        return null;
+      }
+    }
+    public ItemCollection<ProblemParameter> GetProblemParameters(long problemId) {
+      try {
+        ItemCollection<ProblemParameter> parameters = new ItemCollection<ProblemParameter>();
+        parameters.AddRange(CallAdministrationService<List<ProblemParameter>>(s => s.GetProblemParameters(problemId)).OrderBy(x => x.Name));
+        return parameters;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh problem parameters failed.", ex);
+        return null;
+      }
+    }
+    #endregion
+
+    #region Result Methods
+    public Result GetResult(long id) {
+      try {
+        return CallAdministrationService<Result>(s => s.GetResult(id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh result failed.", ex);
+        return null;
+      }
+    }
+    public ItemCollection<Result> GetResults(long algorithmId) {
+      try {
+        ItemCollection<Result> results = new ItemCollection<Result>();
+        results.AddRange(CallAdministrationService<List<Result>>(s => s.GetResults(algorithmId)).OrderBy(x => x.Name));
+        return results;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh results failed.", ex);
+        return null;
+      }
+    }
+    #endregion
+
+    #region Experiment Methods
+    public Experiment GetExperiment(long id) {
+      try {
+        return CallAdministrationService<Experiment>(s => s.GetExperiment(id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh experiment failed.", ex);
+        return null;
+      }
+    }
+    public ItemCollection<Experiment> GetExperiments(long algorithmId, long problemId) {
+      try {
+        ItemCollection<Experiment> experiments = new ItemCollection<Experiment>();
+        experiments.AddRange(CallAdministrationService<List<Experiment>>(s => s.GetExperiments(algorithmId, problemId)));
+        experiments.ItemsRemoved += new CollectionItemsChangedEventHandler<Experiment>(experiments_ItemsRemoved);
+        return experiments;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh experiments failed.", ex);
+        return null;
+      }
+    }
+    #endregion
+
+    #region Run Methods
+    public ItemCollection<Run> GetRuns(long experimentId) {
+      try {
+        ItemCollection<Run> runs = new ItemCollection<Run>();
+        runs.AddRange(CallAdministrationService<List<Run>>(s => s.GetRuns(experimentId)).OrderByDescending(x => x.CreatedDate));
+        runs.ItemsRemoved += new CollectionItemsChangedEventHandler<Run>(runs_ItemsRemoved);
+        return runs;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Refresh runs failed.", ex);
+        return null;
+      }
+    }
+    public bool AddRun(long algorithmId, long problemId, IAlgorithm algorithm) {
+      try {
+        IProblem problem = algorithm.Problem;
+
+        ItemCollection<AlgorithmParameter> algorithmParameters = GetAlgorithmParameters(algorithmId);
+        List<AlgorithmParameterValue> algorithmParameterValues = CollectAlgorithmParameterValues(algorithmId, algorithmParameters, algorithm, "");
+        ItemCollection<ProblemParameter> problemParameters = GetProblemParameters(problemId);
+        List<ProblemParameterValue> problemParameterValues = CollectProblemParamterValues(problemId, problemParameters, problem, "");
+        ItemCollection<Result> results = GetResults(algorithmId);
+        List<ResultValue> resultValues = CollectResultValues(algorithmId, results, algorithm);
+
+        Experiment exp = new Experiment();
+        exp.AlgorithmId = algorithmId;
+        exp.ProblemId = problemId;
+        exp.AlgorithmParameterValues = algorithmParameterValues;
+        exp.ProblemParameterValues = problemParameterValues;
+        exp.Store();
+
+        Run r = new Run();
+        r.ExperimentId = exp.Id;
+        r.ClientId = Guid.NewGuid();
+        r.CreatedDate = DateTime.Now;
+        r.RandomSeed = ((IntValue)((IValueParameter)algorithm.Parameters["Seed"]).Value).Value;
+        r.ResultValues = resultValues;
+        r.Store();
+
+        return true;
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Store run failed.", ex);
+        return false;
+      }
+    }
+
+    private List<AlgorithmParameterValue> CollectAlgorithmParameterValues(long algorithmId, ItemCollection<AlgorithmParameter> parameters, IParameterizedItem item, string prefix) {
+      List<AlgorithmParameterValue> values = new List<AlgorithmParameterValue>();
+      foreach (IValueParameter param in item.Parameters.OfType<IValueParameter>()) {
+        if (param.GetsCollected && (param.Value != null) && (param.Name != "Seed")) {
+          AlgorithmParameter p = parameters.FirstOrDefault(x => x.Name == prefix + param.Name);
+          if (p == null) {
+            p = new AlgorithmParameter();
+            p.Name = prefix + param.Name;
+            p.Alias = prefix + param.Name;
+            p.Description = param.Description;
+            p.AlgorithmId = algorithmId;
+            p.DataTypeId = ConvertToDataType(param.DataType).Id;
+            p.Store();
+            parameters.Add(p);
+          }
+          AlgorithmParameterValue value = CreateAlgorithmParameterValue(param.Value);
+          value.AlgorithmParameterId = p.Id;
+          value.DataTypeId = ConvertToDataType(param.Value.GetType()).Id;
+          values.Add(value);
+        }
+
+        if (param.Value is IParameterizedItem)
+          values.AddRange(CollectAlgorithmParameterValues(algorithmId, parameters, (IParameterizedItem)param.Value, (string.IsNullOrEmpty(prefix) ? param.Name : prefix + param.Name) + "."));
+      }
+      return values;
+    }
+    private AlgorithmParameterValue CreateAlgorithmParameterValue(IItem item) {
+      if (item is BoolValue) {
+        AlgorithmParameterBoolValue value = new AlgorithmParameterBoolValue();
+        value.Value = ((BoolValue)item).Value;
+        return value;
+      } else if (item is DoubleValue) {
+        AlgorithmParameterFloatValue value = new AlgorithmParameterFloatValue();
+        value.Value = ((DoubleValue)item).Value;
+        return value;
+      } else if (item is IntValue) {
+        AlgorithmParameterIntValue value = new AlgorithmParameterIntValue();
+        value.Value = ((IntValue)item).Value;
+        return value;
+      } else if (item is StringValue) {
+        AlgorithmParameterStringValue value = new AlgorithmParameterStringValue();
+        value.Value = ((StringValue)item).Value;
+        return value;
+      } else {
+        AlgorithmParameterBlobValue value = new AlgorithmParameterBlobValue();
+        try {
+          using (MemoryStream stream = new MemoryStream()) {
+            XmlGenerator.Serialize(item, stream);
+            stream.Close();
+            value.Value = stream.ToArray();
+          }
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(ex);
+        }
+        return value;
+      }
+    }
+    private List<ProblemParameterValue> CollectProblemParamterValues(long problemId, ItemCollection<ProblemParameter> parameters, IParameterizedItem item, string prefix) {
+      List<ProblemParameterValue> values = new List<ProblemParameterValue>();
+      foreach (IValueParameter param in item.Parameters.OfType<IValueParameter>()) {
+        if (param.GetsCollected && (param.Value != null)) {
+          ProblemParameter p = parameters.FirstOrDefault(x => x.Name == prefix + param.Name);
+          if (p == null) {
+            p = new ProblemParameter();
+            p.Name = prefix + param.Name;
+            p.Alias = prefix + param.Name;
+            p.Description = param.Description;
+            p.ProblemId = problemId;
+            p.DataTypeId = ConvertToDataType(param.DataType).Id;
+            p.Store();
+            parameters.Add(p);
+          }
+          ProblemParameterValue value = CreateProblemParameterValue(param.Value);
+          value.ProblemParameterId = p.Id;
+          value.DataTypeId = ConvertToDataType(param.Value.GetType()).Id;
+          values.Add(value);
+        }
+
+        if (param.Value is IParameterizedItem)
+          values.AddRange(CollectProblemParamterValues(problemId, parameters, (IParameterizedItem)param.Value, (string.IsNullOrEmpty(prefix) ? param.Name : prefix + param.Name) + "."));
+      }
+      return values;
+    }
+    private ProblemParameterValue CreateProblemParameterValue(IItem item) {
+      if (item is BoolValue) {
+        ProblemParameterBoolValue value = new ProblemParameterBoolValue();
+        value.Value = ((BoolValue)item).Value;
+        return value;
+      } else if (item is DoubleValue) {
+        ProblemParameterFloatValue value = new ProblemParameterFloatValue();
+        value.Value = ((DoubleValue)item).Value;
+        return value;
+      } else if (item is IntValue) {
+        ProblemParameterIntValue value = new ProblemParameterIntValue();
+        value.Value = ((IntValue)item).Value;
+        return value;
+      } else if (item is StringValue) {
+        ProblemParameterStringValue value = new ProblemParameterStringValue();
+        value.Value = ((StringValue)item).Value;
+        return value;
+      } else {
+        ProblemParameterBlobValue value = new ProblemParameterBlobValue();
+        try {
+          using (MemoryStream stream = new MemoryStream()) {
+            XmlGenerator.Serialize(item, stream);
+            stream.Close();
+            value.Value = stream.ToArray();
+          }
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(ex);
+        }
+        return value;
+      }
+    }
+    private List<ResultValue> CollectResultValues(long algorithmId, ItemCollection<Result> results, IAlgorithm algorithm) {
+      List<ResultValue> values = new List<ResultValue>();
+      foreach (IResult result in algorithm.Results) {
+        if (result.Value != null) {
+          Result r = results.FirstOrDefault(x => x.Name == result.Name);
+          if (r == null) {
+            r = new Result();
+            r.Name = result.Name;
+            r.Alias = result.Name;
+            r.Description = result.Description;
+            r.AlgorithmId = algorithmId;
+            r.DataTypeId = ConvertToDataType(result.DataType).Id;
+            r.Store();
+            results.Add(r);
+          }
+          ResultValue value = CreateResultValue(result.Value);
+          value.ResultId = r.Id;
+          value.DataTypeId = ConvertToDataType(result.Value.GetType()).Id;
+          values.Add(value);
+        }
+      }
+      return values;
+    }
+    private ResultValue CreateResultValue(IItem item) {
+      if (item is BoolValue) {
+        ResultBoolValue value = new ResultBoolValue();
+        value.Value = ((BoolValue)item).Value;
+        return value;
+      } else if (item is DoubleValue) {
+        ResultFloatValue value = new ResultFloatValue();
+        value.Value = ((DoubleValue)item).Value;
+        return value;
+      } else if (item is IntValue) {
+        ResultIntValue value = new ResultIntValue();
+        value.Value = ((IntValue)item).Value;
+        return value;
+      } else if (item is StringValue) {
+        ResultStringValue value = new ResultStringValue();
+        value.Value = ((StringValue)item).Value;
+        return value;
+      } else {
+        ResultBlobValue value = new ResultBlobValue();
+        try {
+          using (MemoryStream stream = new MemoryStream()) {
+            XmlGenerator.Serialize(item, stream);
+            stream.Close();
+            value.Value = stream.ToArray();
+          }
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(ex);
+        }
+        return value;
+      }
+    }
+    #endregion
+
+    #region Query Methods
+    private IEnumerable<Filter> filters;
+    public IEnumerable<Filter> GetFilters(bool refresh) {
+      if (refresh || (filters == null)) {
+        try {
+          filters = CallQueryService<List<Filter>>(s => s.GetFilters());
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog("Get filters failed.", ex);
+          return Enumerable.Empty<Filter>();
+        }
+      }
+      return filters;
+    }
+    public IEnumerable<Filter> GetFilters() {
+      return GetFilters(false);
+    }
+    public long GetNumberOfQueryResults(Filter filter) {
+      try {
+        return CallQueryService<long>(x => x.GetNumberOfQueryResults(filter));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Get number of query results failed.", ex);
+        return -1;
+      }
+    }
+    public IEnumerable<long> GetQueryResultIds(Filter filter) {
+      try {
+        return CallQueryService<IEnumerable<long>>(x => x.GetQueryResultIds(filter));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Get query result ids failed.", ex);
+        return Enumerable.Empty<long>();
+      }
+    }
+    public IEnumerable<QueryResult> GetQueryResults(IEnumerable<long> ids) {
+      try {
+        return CallQueryService<IEnumerable<QueryResult>>(s => s.GetQueryResults(ids.ToList()));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Get query results failed.", ex);
+        return null;
+      }
+    }
+    #endregion
+
+    #region Events
+    public event EventHandler Refreshing;
+    private void OnRefreshing() {
+      EventHandler handler = Refreshing;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Refreshed;
+    private void OnRefreshed() {
+      EventHandler handler = Refreshed;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    private void platforms_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Platform> e) {
+      try {
+        foreach (Platform p in e.Items)
+          CallAdministrationService(s => s.DeletePlatform(p.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void dataTypes_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataType> e) {
+      try {
+        foreach (DataType d in e.Items)
+          CallAdministrationService(s => s.DeleteDataType(d.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void algorithmClasses_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<AlgorithmClass> e) {
+      try {
+        foreach (AlgorithmClass a in e.Items)
+          CallAdministrationService(s => s.DeleteAlgorithmClass(a.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void algorithms_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Algorithm> e) {
+      try {
+        foreach (Algorithm a in e.Items)
+          CallAdministrationService(s => s.DeleteAlgorithm(a.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void problemClasses_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<ProblemClass> e) {
+      try {
+        foreach (ProblemClass p in e.Items)
+          CallAdministrationService(s => s.DeleteProblemClass(p.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void problems_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Problem> e) {
+      try {
+        foreach (Problem p in e.Items)
+          CallAdministrationService(s => s.DeleteProblem(p.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void experiments_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Experiment> e) {
+      try {
+        foreach (Experiment exp in e.Items)
+          CallAdministrationService(s => s.DeleteExperiment(exp.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Run> e) {
+      try {
+        foreach (Run r in e.Items)
+          CallAdministrationService(s => s.DeleteRun(r.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    #endregion
+
+    #region Helpers
+    private void CallAdministrationService(Action<IAdministrationService> call) {
+      AdministrationServiceClient client = ClientFactory.CreateClient<AdministrationServiceClient, IAdministrationService>();
+      try {
+        call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+    private T CallAdministrationService<T>(Func<IAdministrationService, T> call) {
+      AdministrationServiceClient client = ClientFactory.CreateClient<AdministrationServiceClient, IAdministrationService>();
+      try {
+        return call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+    private void CallQueryService(Action<IQueryService> call) {
+      QueryServiceClient client = ClientFactory.CreateClient<QueryServiceClient, IQueryService>();
+      try {
+        call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+    private T CallQueryService<T>(Func<IQueryService, T> call) {
+      QueryServiceClient client = ClientFactory.CreateClient<QueryServiceClient, IQueryService>();
+      try {
+        return call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+    private T CallAuthenticationService<T>(Func<IAuthenticationService, T> call) {
+      AuthenticationServiceClient client = ClientFactory.CreateClient<AuthenticationServiceClient, IAuthenticationService>();
+      try {
+        return call(client);
+      }
+      finally {
+        try {
+          client.Close();
+        }
+        catch (Exception) {
+          client.Abort();
+        }
+      }
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/SingleObjectiveOKBProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/SingleObjectiveOKBProblem.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/SingleObjectiveOKBProblem.cs	(revision 5639)
@@ -0,0 +1,60 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Clients.OKB {
+  [Item("Single-Objective OKB Problem", "Represents a single-objective problem which is stored in the OKB.")]
+  [Creatable("Optimization Knowledge Base (OKB)")]
+  [StorableClass]
+  public sealed class SingleObjectiveOKBProblem : OKBProblem, ISingleObjectiveProblem, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveProblem); }
+    }
+    public new ISingleObjectiveProblem Problem {
+      get { return base.Problem as ISingleObjectiveProblem; }
+    }
+    public IParameter BestKnownQualityParameter {
+      get { return Problem.BestKnownQualityParameter; }
+    }
+    public IParameter MaximizationParameter {
+      get { return Problem.MaximizationParameter; }
+    }
+    public new ISingleObjectiveEvaluator Evaluator {
+      get { return Problem.Evaluator; }
+    }
+
+    [StorableConstructor]
+    private SingleObjectiveOKBProblem(bool deserializing) : base(deserializing) { }
+    private SingleObjectiveOKBProblem(SingleObjectiveOKBProblem original, Cloner cloner) : base(original, cloner) { }
+    public SingleObjectiveOKBProblem() : base(new EmptySingleObjectiveProblem("No problem selected. Please choose a single-objective problem instance from the OKB.")) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SingleObjectiveOKBProblem(this, cloner);
+    }
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.Designer.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.Designer.cs	(revision 5639)
@@ -0,0 +1,130 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Clients.OKB {
+  partial class OKBAlgorithmView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.algorithmLabel = new System.Windows.Forms.Label();
+      this.algorithmComboBox = new System.Windows.Forms.ComboBox();
+      this.refreshButton = new System.Windows.Forms.Button();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.SuspendLayout();
+      // 
+      // algorithmLabel
+      // 
+      this.algorithmLabel.AutoSize = true;
+      this.algorithmLabel.Location = new System.Drawing.Point(3, 5);
+      this.algorithmLabel.Name = "algorithmLabel";
+      this.algorithmLabel.Size = new System.Drawing.Size(53, 13);
+      this.algorithmLabel.TabIndex = 0;
+      this.algorithmLabel.Text = "&Algorithm:";
+      // 
+      // algorithmComboBox
+      // 
+      this.algorithmComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.algorithmComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.algorithmComboBox.FormattingEnabled = true;
+      this.algorithmComboBox.Location = new System.Drawing.Point(62, 1);
+      this.algorithmComboBox.Name = "algorithmComboBox";
+      this.algorithmComboBox.Size = new System.Drawing.Size(546, 21);
+      this.algorithmComboBox.TabIndex = 1;
+      this.algorithmComboBox.SelectedValueChanged += new System.EventHandler(this.algorithmComboBox_SelectedValueChanged);
+      // 
+      // refreshButton
+      // 
+      this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.refreshButton.Location = new System.Drawing.Point(614, 0);
+      this.refreshButton.Name = "refreshButton";
+      this.refreshButton.Size = new System.Drawing.Size(24, 24);
+      this.refreshButton.TabIndex = 2;
+      this.toolTip.SetToolTip(this.refreshButton, "Refresh Algorithms");
+      this.refreshButton.UseVisualStyleBackColor = true;
+      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+      // 
+      // viewHost
+      // 
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Enabled = false;
+      this.viewHost.Location = new System.Drawing.Point(0, 30);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(638, 422);
+      this.viewHost.TabIndex = 3;
+      this.viewHost.ViewsLabelVisible = true;
+      this.viewHost.ViewType = null;
+      // 
+      // OKBAlgorithmView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.viewHost);
+      this.Controls.Add(this.algorithmComboBox);
+      this.Controls.Add(this.algorithmLabel);
+      this.Controls.Add(this.refreshButton);
+      this.Name = "OKBAlgorithmView";
+      this.Size = new System.Drawing.Size(638, 452);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label algorithmLabel;
+    private System.Windows.Forms.ComboBox algorithmComboBox;
+    private System.Windows.Forms.Button refreshButton;
+    private System.Windows.Forms.ToolTip toolTip;
+    private MainForm.WindowsForms.ViewHost viewHost;
+
+
+
+
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBAlgorithmView.cs	(revision 5639)
@@ -0,0 +1,132 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Clients.OKB {
+  [View("OKBAlgorithm View")]
+  [Content(typeof(OKBAlgorithm), true)]
+  public sealed partial class OKBAlgorithmView : ItemView {
+    public new OKBAlgorithm Content {
+      get { return (OKBAlgorithm)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public OKBAlgorithmView() {
+      InitializeComponent();
+    }
+
+    protected override void OnInitialized(System.EventArgs e) {
+      base.OnInitialized(e);
+      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
+      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
+      PopulateComboBox();
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.AlgorithmChanged -= new EventHandler(Content_AlgorithmChanged);
+      base.DeregisterContentEvents();
+    }
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.AlgorithmChanged += new EventHandler(Content_AlgorithmChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        algorithmComboBox.SelectedIndex = -1;
+        viewHost.Content = null;
+      } else {
+        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
+        viewHost.Content = Content.Algorithm;
+      }
+    }
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      algorithmComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (algorithmComboBox.Items.Count > 0);
+      refreshButton.Enabled = (Content != null) && !ReadOnly && !Locked;
+    }
+
+    private void PopulateComboBox() {
+      algorithmComboBox.DataSource = null;
+      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
+      if (platform != null) {
+        algorithmComboBox.DataSource = OKBClient.Instance.Algorithms.Where(x => x.PlatformId == platform.Id).ToList();
+        algorithmComboBox.DisplayMember = "Name";
+      }
+    }
+
+    protected override void OnClosed(FormClosedEventArgs e) {
+      OKBClient.Instance.Refreshing -= new EventHandler(OKBClient_Refreshing);
+      OKBClient.Instance.Refreshed -= new EventHandler(OKBClient_Refreshed);
+      base.OnClosed(e);
+    }
+
+    private void OKBClient_Refreshing(object sender, EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(OKBClient_Refreshing), sender, e);
+      } else {
+        Cursor = Cursors.AppStarting;
+        algorithmComboBox.Enabled = refreshButton.Enabled = viewHost.Enabled = false;
+      }
+    }
+    private void OKBClient_Refreshed(object sender, EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(OKBClient_Refreshed), sender, e);
+      } else {
+        PopulateComboBox();
+        SetEnabledStateOfControls();
+        Cursor = Cursors.Default;
+      }
+    }
+
+    #region Content Events
+    private void Content_AlgorithmChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_AlgorithmChanged), sender, e);
+      else {
+        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
+        viewHost.Content = Content.Algorithm;
+      }
+    }
+    #endregion
+
+    #region Control Events
+    private void refreshButton_Click(object sender, System.EventArgs e) {
+      OKBClient.Instance.Refresh();
+    }
+    private void algorithmComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
+      Algorithm algorithm = algorithmComboBox.SelectedValue as Algorithm;
+      if ((algorithm != null) && (Content != null)) {
+        Content.Load(algorithm.Id);
+        if (Content.AlgorithmId != algorithm.Id)  // reset selected item if load was not successful
+          algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
+      }
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentView.Designer.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentView.Designer.cs	(revision 5639)
@@ -0,0 +1,385 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Clients.OKB {
+  partial class OKBExperimentView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.algorithmLabel = new System.Windows.Forms.Label();
+      this.problemLabel = new System.Windows.Forms.Label();
+      this.algorithmComboBox = new System.Windows.Forms.ComboBox();
+      this.problemComboBox = new System.Windows.Forms.ComboBox();
+      this.refreshButton = new System.Windows.Forms.Button();
+      this.startButton = new System.Windows.Forms.Button();
+      this.pauseButton = new System.Windows.Forms.Button();
+      this.stopButton = new System.Windows.Forms.Button();
+      this.prepareButton = new System.Windows.Forms.Button();
+      this.executionTimeLabel = new System.Windows.Forms.Label();
+      this.executionTimeTextBox = new System.Windows.Forms.TextBox();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.problemParametersTabPage = new System.Windows.Forms.TabPage();
+      this.algorithmParametersTabPage = new System.Windows.Forms.TabPage();
+      this.resultsTabPage = new System.Windows.Forms.TabPage();
+      this.runsTabPage = new System.Windows.Forms.TabPage();
+      this.problemParametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.algorithmParametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.resultsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.runsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.tabControl.SuspendLayout();
+      this.problemParametersTabPage.SuspendLayout();
+      this.algorithmParametersTabPage.SuspendLayout();
+      this.resultsTabPage.SuspendLayout();
+      this.runsTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(638, 20);
+      // 
+      // descriptionTextBox
+      // 
+      this.descriptionTextBox.Size = new System.Drawing.Size(638, 20);
+      // 
+      // algorithmLabel
+      // 
+      this.algorithmLabel.AutoSize = true;
+      this.algorithmLabel.Location = new System.Drawing.Point(3, 111);
+      this.algorithmLabel.Name = "algorithmLabel";
+      this.algorithmLabel.Size = new System.Drawing.Size(53, 13);
+      this.algorithmLabel.TabIndex = 5;
+      this.algorithmLabel.Text = "&Algorithm:";
+      // 
+      // problemLabel
+      // 
+      this.problemLabel.AutoSize = true;
+      this.problemLabel.Location = new System.Drawing.Point(3, 138);
+      this.problemLabel.Name = "problemLabel";
+      this.problemLabel.Size = new System.Drawing.Size(48, 13);
+      this.problemLabel.TabIndex = 7;
+      this.problemLabel.Text = "&Problem:";
+      // 
+      // algorithmComboBox
+      // 
+      this.algorithmComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.algorithmComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.algorithmComboBox.FormattingEnabled = true;
+      this.algorithmComboBox.Location = new System.Drawing.Point(72, 108);
+      this.algorithmComboBox.Name = "algorithmComboBox";
+      this.algorithmComboBox.Size = new System.Drawing.Size(638, 21);
+      this.algorithmComboBox.TabIndex = 6;
+      this.algorithmComboBox.SelectedValueChanged += new System.EventHandler(this.algorithmComboBox_SelectedValueChanged);
+      // 
+      // problemComboBox
+      // 
+      this.problemComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.problemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.problemComboBox.FormattingEnabled = true;
+      this.problemComboBox.Location = new System.Drawing.Point(72, 135);
+      this.problemComboBox.Name = "problemComboBox";
+      this.problemComboBox.Size = new System.Drawing.Size(638, 21);
+      this.problemComboBox.TabIndex = 8;
+      this.problemComboBox.SelectedValueChanged += new System.EventHandler(this.problemComboBox_SelectedValueChanged);
+      // 
+      // refreshButton
+      // 
+      this.refreshButton.Location = new System.Drawing.Point(0, 79);
+      this.refreshButton.Name = "refreshButton";
+      this.refreshButton.Size = new System.Drawing.Size(75, 23);
+      this.refreshButton.TabIndex = 4;
+      this.refreshButton.Text = "&Refresh";
+      this.refreshButton.UseVisualStyleBackColor = true;
+      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+      // 
+      // startButton
+      // 
+      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.startButton.Location = new System.Drawing.Point(81, 476);
+      this.startButton.Name = "startButton";
+      this.startButton.Size = new System.Drawing.Size(75, 23);
+      this.startButton.TabIndex = 11;
+      this.startButton.Text = "Start";
+      this.startButton.UseVisualStyleBackColor = true;
+      this.startButton.Click += new System.EventHandler(this.startButton_Click);
+      // 
+      // pauseButton
+      // 
+      this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.pauseButton.Location = new System.Drawing.Point(162, 476);
+      this.pauseButton.Name = "pauseButton";
+      this.pauseButton.Size = new System.Drawing.Size(75, 23);
+      this.pauseButton.TabIndex = 12;
+      this.pauseButton.Text = "Pause";
+      this.pauseButton.UseVisualStyleBackColor = true;
+      this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click);
+      // 
+      // stopButton
+      // 
+      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.stopButton.Location = new System.Drawing.Point(243, 476);
+      this.stopButton.Name = "stopButton";
+      this.stopButton.Size = new System.Drawing.Size(75, 23);
+      this.stopButton.TabIndex = 13;
+      this.stopButton.Text = "Stop";
+      this.stopButton.UseVisualStyleBackColor = true;
+      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
+      // 
+      // prepareButton
+      // 
+      this.prepareButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.prepareButton.Location = new System.Drawing.Point(0, 476);
+      this.prepareButton.Name = "prepareButton";
+      this.prepareButton.Size = new System.Drawing.Size(75, 23);
+      this.prepareButton.TabIndex = 10;
+      this.prepareButton.Text = "Prepare";
+      this.prepareButton.UseVisualStyleBackColor = true;
+      this.prepareButton.Click += new System.EventHandler(this.prepareButton_Click);
+      // 
+      // executionTimeLabel
+      // 
+      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.executionTimeLabel.AutoSize = true;
+      this.executionTimeLabel.Location = new System.Drawing.Point(476, 482);
+      this.executionTimeLabel.Name = "executionTimeLabel";
+      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
+      this.executionTimeLabel.TabIndex = 14;
+      this.executionTimeLabel.Text = "&Execution Time:";
+      // 
+      // executionTimeTextBox
+      // 
+      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.executionTimeTextBox.Location = new System.Drawing.Point(565, 479);
+      this.executionTimeTextBox.Name = "executionTimeTextBox";
+      this.executionTimeTextBox.ReadOnly = true;
+      this.executionTimeTextBox.Size = new System.Drawing.Size(145, 20);
+      this.executionTimeTextBox.TabIndex = 15;
+      // 
+      // tabControl
+      // 
+      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.tabControl.Controls.Add(this.problemParametersTabPage);
+      this.tabControl.Controls.Add(this.algorithmParametersTabPage);
+      this.tabControl.Controls.Add(this.resultsTabPage);
+      this.tabControl.Controls.Add(this.runsTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 162);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(710, 308);
+      this.tabControl.TabIndex = 9;
+      // 
+      // problemParametersTabPage
+      // 
+      this.problemParametersTabPage.Controls.Add(this.problemParametersViewHost);
+      this.problemParametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.problemParametersTabPage.Name = "problemParametersTabPage";
+      this.problemParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.problemParametersTabPage.Size = new System.Drawing.Size(702, 282);
+      this.problemParametersTabPage.TabIndex = 0;
+      this.problemParametersTabPage.Text = "Problem Parameters";
+      this.problemParametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // algorithmParametersTabPage
+      // 
+      this.algorithmParametersTabPage.Controls.Add(this.algorithmParametersViewHost);
+      this.algorithmParametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.algorithmParametersTabPage.Name = "algorithmParametersTabPage";
+      this.algorithmParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.algorithmParametersTabPage.Size = new System.Drawing.Size(702, 282);
+      this.algorithmParametersTabPage.TabIndex = 1;
+      this.algorithmParametersTabPage.Text = "Algorithm Parameters";
+      this.algorithmParametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // resultsTabPage
+      // 
+      this.resultsTabPage.Controls.Add(this.resultsViewHost);
+      this.resultsTabPage.Location = new System.Drawing.Point(4, 22);
+      this.resultsTabPage.Name = "resultsTabPage";
+      this.resultsTabPage.Size = new System.Drawing.Size(702, 282);
+      this.resultsTabPage.TabIndex = 2;
+      this.resultsTabPage.Text = "Results";
+      this.resultsTabPage.UseVisualStyleBackColor = true;
+      // 
+      // runsTabPage
+      // 
+      this.runsTabPage.Controls.Add(this.runsViewHost);
+      this.runsTabPage.Location = new System.Drawing.Point(4, 22);
+      this.runsTabPage.Name = "runsTabPage";
+      this.runsTabPage.Size = new System.Drawing.Size(702, 282);
+      this.runsTabPage.TabIndex = 3;
+      this.runsTabPage.Text = "Runs";
+      this.runsTabPage.UseVisualStyleBackColor = true;
+      // 
+      // problemParametersViewHost
+      // 
+      this.problemParametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.problemParametersViewHost.Caption = "View";
+      this.problemParametersViewHost.Content = null;
+      this.problemParametersViewHost.Location = new System.Drawing.Point(6, 6);
+      this.problemParametersViewHost.Name = "problemParametersViewHost";
+      this.problemParametersViewHost.ReadOnly = false;
+      this.problemParametersViewHost.Size = new System.Drawing.Size(690, 270);
+      this.problemParametersViewHost.TabIndex = 0;
+      this.problemParametersViewHost.ViewType = null;
+      // 
+      // algorithmParametersViewHost
+      // 
+      this.algorithmParametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.algorithmParametersViewHost.Caption = "View";
+      this.algorithmParametersViewHost.Content = null;
+      this.algorithmParametersViewHost.Location = new System.Drawing.Point(6, 6);
+      this.algorithmParametersViewHost.Name = "algorithmParametersViewHost";
+      this.algorithmParametersViewHost.ReadOnly = false;
+      this.algorithmParametersViewHost.Size = new System.Drawing.Size(690, 270);
+      this.algorithmParametersViewHost.TabIndex = 1;
+      this.algorithmParametersViewHost.ViewType = null;
+      // 
+      // resultsViewHost
+      // 
+      this.resultsViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.resultsViewHost.Caption = "View";
+      this.resultsViewHost.Content = null;
+      this.resultsViewHost.Location = new System.Drawing.Point(6, 6);
+      this.resultsViewHost.Name = "resultsViewHost";
+      this.resultsViewHost.ReadOnly = false;
+      this.resultsViewHost.Size = new System.Drawing.Size(690, 270);
+      this.resultsViewHost.TabIndex = 1;
+      this.resultsViewHost.ViewType = null;
+      // 
+      // runsViewHost
+      // 
+      this.runsViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.runsViewHost.Caption = "View";
+      this.runsViewHost.Content = null;
+      this.runsViewHost.Location = new System.Drawing.Point(6, 6);
+      this.runsViewHost.Name = "runsViewHost";
+      this.runsViewHost.ReadOnly = false;
+      this.runsViewHost.Size = new System.Drawing.Size(690, 270);
+      this.runsViewHost.TabIndex = 1;
+      this.runsViewHost.ViewType = null;
+      // 
+      // OKBExperimentView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.algorithmComboBox);
+      this.Controls.Add(this.problemComboBox);
+      this.Controls.Add(this.algorithmLabel);
+      this.Controls.Add(this.problemLabel);
+      this.Controls.Add(this.tabControl);
+      this.Controls.Add(this.refreshButton);
+      this.Controls.Add(this.prepareButton);
+      this.Controls.Add(this.startButton);
+      this.Controls.Add(this.executionTimeTextBox);
+      this.Controls.Add(this.pauseButton);
+      this.Controls.Add(this.stopButton);
+      this.Controls.Add(this.executionTimeLabel);
+      this.Name = "OKBExperimentView";
+      this.Size = new System.Drawing.Size(710, 499);
+      this.Controls.SetChildIndex(this.executionTimeLabel, 0);
+      this.Controls.SetChildIndex(this.stopButton, 0);
+      this.Controls.SetChildIndex(this.pauseButton, 0);
+      this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
+      this.Controls.SetChildIndex(this.startButton, 0);
+      this.Controls.SetChildIndex(this.prepareButton, 0);
+      this.Controls.SetChildIndex(this.refreshButton, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      this.Controls.SetChildIndex(this.problemLabel, 0);
+      this.Controls.SetChildIndex(this.algorithmLabel, 0);
+      this.Controls.SetChildIndex(this.problemComboBox, 0);
+      this.Controls.SetChildIndex(this.algorithmComboBox, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.descriptionLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.tabControl.ResumeLayout(false);
+      this.problemParametersTabPage.ResumeLayout(false);
+      this.algorithmParametersTabPage.ResumeLayout(false);
+      this.resultsTabPage.ResumeLayout(false);
+      this.runsTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label algorithmLabel;
+    private System.Windows.Forms.Label problemLabel;
+    private System.Windows.Forms.ComboBox algorithmComboBox;
+    private System.Windows.Forms.ComboBox problemComboBox;
+    private System.Windows.Forms.Button refreshButton;
+    private System.Windows.Forms.Button startButton;
+    private System.Windows.Forms.Button pauseButton;
+    private System.Windows.Forms.Button stopButton;
+    private System.Windows.Forms.Button prepareButton;
+    private System.Windows.Forms.Label executionTimeLabel;
+    private System.Windows.Forms.TextBox executionTimeTextBox;
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage problemParametersTabPage;
+    private System.Windows.Forms.TabPage algorithmParametersTabPage;
+    private MainForm.WindowsForms.ViewHost problemParametersViewHost;
+    private MainForm.WindowsForms.ViewHost algorithmParametersViewHost;
+    private System.Windows.Forms.TabPage resultsTabPage;
+    private MainForm.WindowsForms.ViewHost resultsViewHost;
+    private System.Windows.Forms.TabPage runsTabPage;
+    private MainForm.WindowsForms.ViewHost runsViewHost;
+
+
+
+
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentView.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBExperimentView.cs	(revision 5639)
@@ -0,0 +1,257 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Clients.OKB {
+  [View("OKBItem View")]
+  [Content(typeof(OKBExperiment), true)]
+  public sealed partial class OKBExperimentView : NamedItemView {
+    public new OKBExperiment Content {
+      get { return (OKBExperiment)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public OKBExperimentView() {
+      InitializeComponent();
+    }
+
+    protected override void OnInitialized(System.EventArgs e) {
+      base.OnInitialized(e);
+      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
+      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
+      PopulateComboBoxes();
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.AlgorithmIdChanged -= new EventHandler(Content_AlgorithmIdChanged);
+      Content.ProblemIdChanged -= new EventHandler(Content_ProblemIdChanged);
+      Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
+      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
+      Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
+      Content.Prepared -= new EventHandler(Content_Prepared);
+      Content.Started -= new EventHandler(Content_Started);
+      Content.Paused -= new EventHandler(Content_Paused);
+      Content.Stopped -= new EventHandler(Content_Stopped);
+      base.DeregisterContentEvents();
+    }
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.AlgorithmIdChanged += new EventHandler(Content_AlgorithmIdChanged);
+      Content.ProblemIdChanged += new EventHandler(Content_ProblemIdChanged);
+      Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
+      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
+      Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
+      Content.Prepared += new EventHandler(Content_Prepared);
+      Content.Started += new EventHandler(Content_Started);
+      Content.Paused += new EventHandler(Content_Paused);
+      Content.Stopped += new EventHandler(Content_Stopped);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        algorithmComboBox.SelectedIndex = -1;
+        problemComboBox.SelectedIndex = -1;
+        problemParametersViewHost.Content = null;
+        algorithmParametersViewHost.Content = null;
+        resultsViewHost.Content = null;
+        runsViewHost.Content = null;
+        executionTimeTextBox.Text = "-";
+      } else {
+        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
+        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
+        problemParametersViewHost.Content = Content.ProblemParameters;
+        algorithmParametersViewHost.Content = Content.AlgorithmParameters;
+        resultsViewHost.Content = Content.Results;
+        runsViewHost.Content = Content.Runs;
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
+      }
+    }
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      algorithmComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (algorithmComboBox.Items.Count > 0);
+      problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0);
+      tabControl.Enabled = Content != null;
+      executionTimeTextBox.Enabled = Content != null;
+      SetEnabledStateOfExecutableButtons();
+    }
+
+    private void PopulateComboBoxes() {
+      algorithmComboBox.DataSource = null;
+      problemComboBox.DataSource = null;
+      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
+      if (platform != null) {
+        algorithmComboBox.DataSource = OKBClient.Instance.Algorithms.Where(x => x.PlatformId == platform.Id).ToList();
+        algorithmComboBox.DisplayMember = "Name";
+        problemComboBox.DataSource = OKBClient.Instance.Problems.Where(x => x.PlatformId == platform.Id).ToList();
+        problemComboBox.DisplayMember = "Name";
+      }
+    }
+
+    protected override void OnClosed(FormClosedEventArgs e) {
+      if ((Content != null) && (Content.ExecutionState == ExecutionState.Started)) Content.Stop();
+      OKBClient.Instance.Refreshing -= new EventHandler(OKBClient_Refreshing);
+      OKBClient.Instance.Refreshed -= new EventHandler(OKBClient_Refreshed);
+      base.OnClosed(e);
+    }
+
+    private void OKBClient_Refreshing(object sender, EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(OKBClient_Refreshing), sender, e);
+      } else {
+        Cursor = Cursors.AppStarting;
+        algorithmComboBox.Enabled = problemComboBox.Enabled = tabControl.Enabled = prepareButton.Enabled = startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = executionTimeTextBox.Enabled = false;
+      }
+    }
+    private void OKBClient_Refreshed(object sender, EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(OKBClient_Refreshed), sender, e);
+      } else {
+        PopulateComboBoxes();
+        SetEnabledStateOfControls();
+        Cursor = Cursors.Default;
+      }
+    }
+
+    #region Content Events
+    private void Content_AlgorithmIdChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_AlgorithmIdChanged), sender, e);
+      else {
+        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
+        algorithmParametersViewHost.Content = Content.AlgorithmParameters;
+        resultsViewHost.Content = Content.Results;
+        runsViewHost.Content = Content.Runs;
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
+        SetEnabledStateOfExecutableButtons();
+      }
+    }
+    private void Content_ProblemIdChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ProblemIdChanged), sender, e);
+      else {
+        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
+        problemParametersViewHost.Content = Content.ProblemParameters;
+        SetEnabledStateOfExecutableButtons();
+      }
+    }
+    private void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred), sender, e);
+      else
+        ErrorHandling.ShowErrorDialog(this, e.Value);
+    }
+    private void Content_ExecutionStateChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
+      else
+        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = prepareButton.Enabled = false;
+    }
+    private void Content_ExecutionTimeChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
+      else
+        executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString();
+    }
+    private void Content_Prepared(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Prepared), sender, e);
+      else {
+        resultsViewHost.Content = Content.Results;
+        ReadOnly = Locked = false;
+        SetEnabledStateOfExecutableButtons();
+      }
+    }
+    private void Content_Started(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Started), sender, e);
+      else {
+        ReadOnly = Locked = true;
+        SetEnabledStateOfExecutableButtons();
+      }
+    }
+    private void Content_Paused(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Paused), sender, e);
+      else {
+        ReadOnly = Locked = false;
+        SetEnabledStateOfExecutableButtons();
+      }
+    }
+    private void Content_Stopped(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Stopped), sender, e);
+      else {
+        ReadOnly = Locked = false;
+        SetEnabledStateOfExecutableButtons();
+      }
+    }
+    #endregion
+
+    #region Control Events
+    private void refreshButton_Click(object sender, System.EventArgs e) {
+      OKBClient.Instance.Refresh();
+    }
+    private void algorithmComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
+      Algorithm algorithm = algorithmComboBox.SelectedValue as Algorithm;
+      if (Content != null) Content.Load(algorithm);
+    }
+    private void problemComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
+      Problem problem = problemComboBox.SelectedValue as Problem;
+      if (Content != null) Content.Load(problem);
+    }
+    private void prepareButton_Click(object sender, EventArgs e) {
+      Content.Prepare(false);
+    }
+    private void startButton_Click(object sender, EventArgs e) {
+      Content.Start();
+    }
+    private void pauseButton_Click(object sender, EventArgs e) {
+      Content.Pause();
+    }
+    private void stopButton_Click(object sender, EventArgs e) {
+      Content.Stop();
+    }
+    #endregion
+
+    #region Helpers
+    private void SetEnabledStateOfExecutableButtons() {
+      if ((Content == null) || (Content.AlgorithmId == 0) || (Content.ProblemId == 0)) {
+        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = prepareButton.Enabled = false;
+      } else {
+        startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
+        pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;
+        stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
+        prepareButton.Enabled = Content.ExecutionState != ExecutionState.Started;
+      }
+    }
+    #endregion
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.Designer.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.Designer.cs	(revision 5639)
@@ -0,0 +1,130 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Clients.OKB {
+  partial class OKBProblemView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.problemLabel = new System.Windows.Forms.Label();
+      this.problemComboBox = new System.Windows.Forms.ComboBox();
+      this.refreshButton = new System.Windows.Forms.Button();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.SuspendLayout();
+      // 
+      // problemLabel
+      // 
+      this.problemLabel.AutoSize = true;
+      this.problemLabel.Location = new System.Drawing.Point(3, 5);
+      this.problemLabel.Name = "problemLabel";
+      this.problemLabel.Size = new System.Drawing.Size(48, 13);
+      this.problemLabel.TabIndex = 0;
+      this.problemLabel.Text = "&Problem:";
+      // 
+      // problemComboBox
+      // 
+      this.problemComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.problemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.problemComboBox.FormattingEnabled = true;
+      this.problemComboBox.Location = new System.Drawing.Point(57, 1);
+      this.problemComboBox.Name = "problemComboBox";
+      this.problemComboBox.Size = new System.Drawing.Size(551, 21);
+      this.problemComboBox.TabIndex = 1;
+      this.problemComboBox.SelectedValueChanged += new System.EventHandler(this.problemComboBox_SelectedValueChanged);
+      // 
+      // refreshButton
+      // 
+      this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.refreshButton.Location = new System.Drawing.Point(614, 0);
+      this.refreshButton.Name = "refreshButton";
+      this.refreshButton.Size = new System.Drawing.Size(24, 24);
+      this.refreshButton.TabIndex = 2;
+      this.toolTip.SetToolTip(this.refreshButton, "Refresh Problems");
+      this.refreshButton.UseVisualStyleBackColor = true;
+      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+      // 
+      // viewHost
+      // 
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Enabled = false;
+      this.viewHost.Location = new System.Drawing.Point(0, 30);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(638, 422);
+      this.viewHost.TabIndex = 3;
+      this.viewHost.ViewsLabelVisible = true;
+      this.viewHost.ViewType = null;
+      // 
+      // OKBProblemView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.viewHost);
+      this.Controls.Add(this.problemComboBox);
+      this.Controls.Add(this.problemLabel);
+      this.Controls.Add(this.refreshButton);
+      this.Name = "OKBProblemView";
+      this.Size = new System.Drawing.Size(638, 452);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label problemLabel;
+    private System.Windows.Forms.ComboBox problemComboBox;
+    private System.Windows.Forms.Button refreshButton;
+    private System.Windows.Forms.ToolTip toolTip;
+    private MainForm.WindowsForms.ViewHost viewHost;
+
+
+
+
+  }
+}
Index: /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.cs	(revision 5639)
+++ /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.cs	(revision 5639)
@@ -0,0 +1,132 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Clients.OKB {
+  [View("OKBProblem View")]
+  [Content(typeof(OKBProblem), true)]
+  public sealed partial class OKBProblemView : ItemView {
+    public new OKBProblem Content {
+      get { return (OKBProblem)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public OKBProblemView() {
+      InitializeComponent();
+    }
+
+    protected override void OnInitialized(System.EventArgs e) {
+      base.OnInitialized(e);
+      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
+      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
+      PopulateComboBox();
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.ProblemChanged -= new EventHandler(Content_ProblemChanged);
+      base.DeregisterContentEvents();
+    }
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ProblemChanged += new EventHandler(Content_ProblemChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        problemComboBox.SelectedIndex = -1;
+        viewHost.Content = null;
+      } else {
+        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
+        viewHost.Content = Content.Problem;
+      }
+    }
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0);
+      refreshButton.Enabled = (Content != null) && !ReadOnly && !Locked;
+    }
+
+    private void PopulateComboBox() {
+      problemComboBox.DataSource = null;
+      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
+      if (platform != null) {
+        problemComboBox.DataSource = OKBClient.Instance.Problems.Where(x => x.PlatformId == platform.Id).ToList();
+        problemComboBox.DisplayMember = "Name";
+      }
+    }
+
+    protected override void OnClosed(FormClosedEventArgs e) {
+      OKBClient.Instance.Refreshing -= new EventHandler(OKBClient_Refreshing);
+      OKBClient.Instance.Refreshed -= new EventHandler(OKBClient_Refreshed);
+      base.OnClosed(e);
+    }
+
+    private void OKBClient_Refreshing(object sender, EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(OKBClient_Refreshing), sender, e);
+      } else {
+        Cursor = Cursors.AppStarting;
+        problemComboBox.Enabled = refreshButton.Enabled = viewHost.Enabled = false;
+      }
+    }
+    private void OKBClient_Refreshed(object sender, EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(OKBClient_Refreshed), sender, e);
+      } else {
+        PopulateComboBox();
+        SetEnabledStateOfControls();
+        Cursor = Cursors.Default;
+      }
+    }
+
+    #region Content Events
+    private void Content_ProblemChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ProblemChanged), sender, e);
+      else {
+        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
+        viewHost.Content = Content.Problem;
+      }
+    }
+    #endregion
+
+    #region Control Events
+    private void refreshButton_Click(object sender, System.EventArgs e) {
+      OKBClient.Instance.Refresh();
+    }
+    private void problemComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
+      Problem problem = problemComboBox.SelectedValue as Problem;
+      if ((problem != null) && (Content != null)) {
+        Content.Load(problem.Id);
+        if (Content.ProblemId != problem.Id)  // reset selected item if load was not successful
+          problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
+      }
+    }
+    #endregion
+  }
+}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/SingleObjectiveOKBProblem.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/SingleObjectiveOKBProblem.cs	(revision 5638)
+++ 	(revision )
@@ -1,60 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Clients.OKB {
-  [Item("Single-Objective OKB Problem", "Represents a single-objective problem which is stored in the OKB.")]
-  [Creatable("Optimization Knowledge Base (OKB)")]
-  [StorableClass]
-  public sealed class SingleObjectiveOKBProblem : OKBProblem, ISingleObjectiveProblem, IStorableContent {
-    public string Filename { get; set; }
-
-    public override Type ProblemType {
-      get { return typeof(ISingleObjectiveProblem); }
-    }
-    public new ISingleObjectiveProblem Problem {
-      get { return base.Problem as ISingleObjectiveProblem; }
-    }
-    public IParameter BestKnownQualityParameter {
-      get { return Problem.BestKnownQualityParameter; }
-    }
-    public IParameter MaximizationParameter {
-      get { return Problem.MaximizationParameter; }
-    }
-    public new ISingleObjectiveEvaluator Evaluator {
-      get { return Problem.Evaluator; }
-    }
-
-    [StorableConstructor]
-    private SingleObjectiveOKBProblem(bool deserializing) : base(deserializing) { }
-    private SingleObjectiveOKBProblem(SingleObjectiveOKBProblem original, Cloner cloner) : base(original, cloner) { }
-    public SingleObjectiveOKBProblem() : base(new EmptySingleObjectiveProblem("No problem selected. Please choose a single-objective problem instance from the OKB.")) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SingleObjectiveOKBProblem(this, cloner);
-    }
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBAlgorithmView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBAlgorithmView.Designer.cs	(revision 5638)
+++ 	(revision )
@@ -1,130 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-namespace HeuristicLab.Clients.OKB {
-  partial class OKBAlgorithmView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.algorithmLabel = new System.Windows.Forms.Label();
-      this.algorithmComboBox = new System.Windows.Forms.ComboBox();
-      this.refreshButton = new System.Windows.Forms.Button();
-      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
-      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.SuspendLayout();
-      // 
-      // algorithmLabel
-      // 
-      this.algorithmLabel.AutoSize = true;
-      this.algorithmLabel.Location = new System.Drawing.Point(3, 5);
-      this.algorithmLabel.Name = "algorithmLabel";
-      this.algorithmLabel.Size = new System.Drawing.Size(53, 13);
-      this.algorithmLabel.TabIndex = 0;
-      this.algorithmLabel.Text = "&Algorithm:";
-      // 
-      // algorithmComboBox
-      // 
-      this.algorithmComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.algorithmComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.algorithmComboBox.FormattingEnabled = true;
-      this.algorithmComboBox.Location = new System.Drawing.Point(62, 1);
-      this.algorithmComboBox.Name = "algorithmComboBox";
-      this.algorithmComboBox.Size = new System.Drawing.Size(546, 21);
-      this.algorithmComboBox.TabIndex = 1;
-      this.algorithmComboBox.SelectedValueChanged += new System.EventHandler(this.algorithmComboBox_SelectedValueChanged);
-      // 
-      // refreshButton
-      // 
-      this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.refreshButton.Location = new System.Drawing.Point(614, 0);
-      this.refreshButton.Name = "refreshButton";
-      this.refreshButton.Size = new System.Drawing.Size(24, 24);
-      this.refreshButton.TabIndex = 2;
-      this.toolTip.SetToolTip(this.refreshButton, "Refresh Algorithms");
-      this.refreshButton.UseVisualStyleBackColor = true;
-      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
-      // 
-      // viewHost
-      // 
-      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.viewHost.Caption = "View";
-      this.viewHost.Content = null;
-      this.viewHost.Enabled = false;
-      this.viewHost.Location = new System.Drawing.Point(0, 30);
-      this.viewHost.Name = "viewHost";
-      this.viewHost.ReadOnly = false;
-      this.viewHost.Size = new System.Drawing.Size(638, 422);
-      this.viewHost.TabIndex = 3;
-      this.viewHost.ViewsLabelVisible = true;
-      this.viewHost.ViewType = null;
-      // 
-      // OKBAlgorithmView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.viewHost);
-      this.Controls.Add(this.algorithmComboBox);
-      this.Controls.Add(this.algorithmLabel);
-      this.Controls.Add(this.refreshButton);
-      this.Name = "OKBAlgorithmView";
-      this.Size = new System.Drawing.Size(638, 452);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Label algorithmLabel;
-    private System.Windows.Forms.ComboBox algorithmComboBox;
-    private System.Windows.Forms.Button refreshButton;
-    private System.Windows.Forms.ToolTip toolTip;
-    private MainForm.WindowsForms.ViewHost viewHost;
-
-
-
-
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBAlgorithmView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBAlgorithmView.cs	(revision 5638)
+++ 	(revision )
@@ -1,132 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Clients.OKB {
-  [View("OKBAlgorithm View")]
-  [Content(typeof(OKBAlgorithm), true)]
-  public sealed partial class OKBAlgorithmView : ItemView {
-    public new OKBAlgorithm Content {
-      get { return (OKBAlgorithm)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public OKBAlgorithmView() {
-      InitializeComponent();
-    }
-
-    protected override void OnInitialized(System.EventArgs e) {
-      base.OnInitialized(e);
-      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
-      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
-      PopulateComboBox();
-    }
-
-    protected override void DeregisterContentEvents() {
-      Content.AlgorithmChanged -= new EventHandler(Content_AlgorithmChanged);
-      base.DeregisterContentEvents();
-    }
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.AlgorithmChanged += new EventHandler(Content_AlgorithmChanged);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        algorithmComboBox.SelectedIndex = -1;
-        viewHost.Content = null;
-      } else {
-        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
-        viewHost.Content = Content.Algorithm;
-      }
-    }
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      algorithmComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (algorithmComboBox.Items.Count > 0);
-      refreshButton.Enabled = (Content != null) && !ReadOnly && !Locked;
-    }
-
-    private void PopulateComboBox() {
-      algorithmComboBox.DataSource = null;
-      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
-      if (platform != null) {
-        algorithmComboBox.DataSource = OKBClient.Instance.Algorithms.Where(x => x.PlatformId == platform.Id).ToList();
-        algorithmComboBox.DisplayMember = "Name";
-      }
-    }
-
-    protected override void OnClosed(FormClosedEventArgs e) {
-      OKBClient.Instance.Refreshing -= new EventHandler(OKBClient_Refreshing);
-      OKBClient.Instance.Refreshed -= new EventHandler(OKBClient_Refreshed);
-      base.OnClosed(e);
-    }
-
-    private void OKBClient_Refreshing(object sender, EventArgs e) {
-      if (InvokeRequired) {
-        Invoke(new EventHandler(OKBClient_Refreshing), sender, e);
-      } else {
-        Cursor = Cursors.AppStarting;
-        algorithmComboBox.Enabled = refreshButton.Enabled = viewHost.Enabled = false;
-      }
-    }
-    private void OKBClient_Refreshed(object sender, EventArgs e) {
-      if (InvokeRequired) {
-        Invoke(new EventHandler(OKBClient_Refreshed), sender, e);
-      } else {
-        PopulateComboBox();
-        SetEnabledStateOfControls();
-        Cursor = Cursors.Default;
-      }
-    }
-
-    #region Content Events
-    private void Content_AlgorithmChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_AlgorithmChanged), sender, e);
-      else {
-        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
-        viewHost.Content = Content.Algorithm;
-      }
-    }
-    #endregion
-
-    #region Control Events
-    private void refreshButton_Click(object sender, System.EventArgs e) {
-      OKBClient.Instance.Refresh();
-    }
-    private void algorithmComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
-      Algorithm algorithm = algorithmComboBox.SelectedValue as Algorithm;
-      if ((algorithm != null) && (Content != null)) {
-        Content.Load(algorithm.Id);
-        if (Content.AlgorithmId != algorithm.Id)  // reset selected item if load was not successful
-          algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
-      }
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBExperimentView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBExperimentView.Designer.cs	(revision 5638)
+++ 	(revision )
@@ -1,385 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-namespace HeuristicLab.Clients.OKB {
-  partial class OKBExperimentView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.algorithmLabel = new System.Windows.Forms.Label();
-      this.problemLabel = new System.Windows.Forms.Label();
-      this.algorithmComboBox = new System.Windows.Forms.ComboBox();
-      this.problemComboBox = new System.Windows.Forms.ComboBox();
-      this.refreshButton = new System.Windows.Forms.Button();
-      this.startButton = new System.Windows.Forms.Button();
-      this.pauseButton = new System.Windows.Forms.Button();
-      this.stopButton = new System.Windows.Forms.Button();
-      this.prepareButton = new System.Windows.Forms.Button();
-      this.executionTimeLabel = new System.Windows.Forms.Label();
-      this.executionTimeTextBox = new System.Windows.Forms.TextBox();
-      this.tabControl = new System.Windows.Forms.TabControl();
-      this.problemParametersTabPage = new System.Windows.Forms.TabPage();
-      this.algorithmParametersTabPage = new System.Windows.Forms.TabPage();
-      this.resultsTabPage = new System.Windows.Forms.TabPage();
-      this.runsTabPage = new System.Windows.Forms.TabPage();
-      this.problemParametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.algorithmParametersViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.resultsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.runsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
-      this.tabControl.SuspendLayout();
-      this.problemParametersTabPage.SuspendLayout();
-      this.algorithmParametersTabPage.SuspendLayout();
-      this.resultsTabPage.SuspendLayout();
-      this.runsTabPage.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // nameTextBox
-      // 
-      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
-      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
-      this.nameTextBox.Size = new System.Drawing.Size(638, 20);
-      // 
-      // descriptionTextBox
-      // 
-      this.descriptionTextBox.Size = new System.Drawing.Size(638, 20);
-      // 
-      // algorithmLabel
-      // 
-      this.algorithmLabel.AutoSize = true;
-      this.algorithmLabel.Location = new System.Drawing.Point(3, 111);
-      this.algorithmLabel.Name = "algorithmLabel";
-      this.algorithmLabel.Size = new System.Drawing.Size(53, 13);
-      this.algorithmLabel.TabIndex = 5;
-      this.algorithmLabel.Text = "&Algorithm:";
-      // 
-      // problemLabel
-      // 
-      this.problemLabel.AutoSize = true;
-      this.problemLabel.Location = new System.Drawing.Point(3, 138);
-      this.problemLabel.Name = "problemLabel";
-      this.problemLabel.Size = new System.Drawing.Size(48, 13);
-      this.problemLabel.TabIndex = 7;
-      this.problemLabel.Text = "&Problem:";
-      // 
-      // algorithmComboBox
-      // 
-      this.algorithmComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.algorithmComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.algorithmComboBox.FormattingEnabled = true;
-      this.algorithmComboBox.Location = new System.Drawing.Point(72, 108);
-      this.algorithmComboBox.Name = "algorithmComboBox";
-      this.algorithmComboBox.Size = new System.Drawing.Size(638, 21);
-      this.algorithmComboBox.TabIndex = 6;
-      this.algorithmComboBox.SelectedValueChanged += new System.EventHandler(this.algorithmComboBox_SelectedValueChanged);
-      // 
-      // problemComboBox
-      // 
-      this.problemComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.problemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.problemComboBox.FormattingEnabled = true;
-      this.problemComboBox.Location = new System.Drawing.Point(72, 135);
-      this.problemComboBox.Name = "problemComboBox";
-      this.problemComboBox.Size = new System.Drawing.Size(638, 21);
-      this.problemComboBox.TabIndex = 8;
-      this.problemComboBox.SelectedValueChanged += new System.EventHandler(this.problemComboBox_SelectedValueChanged);
-      // 
-      // refreshButton
-      // 
-      this.refreshButton.Location = new System.Drawing.Point(0, 79);
-      this.refreshButton.Name = "refreshButton";
-      this.refreshButton.Size = new System.Drawing.Size(75, 23);
-      this.refreshButton.TabIndex = 4;
-      this.refreshButton.Text = "&Refresh";
-      this.refreshButton.UseVisualStyleBackColor = true;
-      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
-      // 
-      // startButton
-      // 
-      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.startButton.Location = new System.Drawing.Point(81, 476);
-      this.startButton.Name = "startButton";
-      this.startButton.Size = new System.Drawing.Size(75, 23);
-      this.startButton.TabIndex = 11;
-      this.startButton.Text = "Start";
-      this.startButton.UseVisualStyleBackColor = true;
-      this.startButton.Click += new System.EventHandler(this.startButton_Click);
-      // 
-      // pauseButton
-      // 
-      this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.pauseButton.Location = new System.Drawing.Point(162, 476);
-      this.pauseButton.Name = "pauseButton";
-      this.pauseButton.Size = new System.Drawing.Size(75, 23);
-      this.pauseButton.TabIndex = 12;
-      this.pauseButton.Text = "Pause";
-      this.pauseButton.UseVisualStyleBackColor = true;
-      this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click);
-      // 
-      // stopButton
-      // 
-      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.stopButton.Location = new System.Drawing.Point(243, 476);
-      this.stopButton.Name = "stopButton";
-      this.stopButton.Size = new System.Drawing.Size(75, 23);
-      this.stopButton.TabIndex = 13;
-      this.stopButton.Text = "Stop";
-      this.stopButton.UseVisualStyleBackColor = true;
-      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
-      // 
-      // prepareButton
-      // 
-      this.prepareButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.prepareButton.Location = new System.Drawing.Point(0, 476);
-      this.prepareButton.Name = "prepareButton";
-      this.prepareButton.Size = new System.Drawing.Size(75, 23);
-      this.prepareButton.TabIndex = 10;
-      this.prepareButton.Text = "Prepare";
-      this.prepareButton.UseVisualStyleBackColor = true;
-      this.prepareButton.Click += new System.EventHandler(this.prepareButton_Click);
-      // 
-      // executionTimeLabel
-      // 
-      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.executionTimeLabel.AutoSize = true;
-      this.executionTimeLabel.Location = new System.Drawing.Point(476, 482);
-      this.executionTimeLabel.Name = "executionTimeLabel";
-      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
-      this.executionTimeLabel.TabIndex = 14;
-      this.executionTimeLabel.Text = "&Execution Time:";
-      // 
-      // executionTimeTextBox
-      // 
-      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.executionTimeTextBox.Location = new System.Drawing.Point(565, 479);
-      this.executionTimeTextBox.Name = "executionTimeTextBox";
-      this.executionTimeTextBox.ReadOnly = true;
-      this.executionTimeTextBox.Size = new System.Drawing.Size(145, 20);
-      this.executionTimeTextBox.TabIndex = 15;
-      // 
-      // tabControl
-      // 
-      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.tabControl.Controls.Add(this.problemParametersTabPage);
-      this.tabControl.Controls.Add(this.algorithmParametersTabPage);
-      this.tabControl.Controls.Add(this.resultsTabPage);
-      this.tabControl.Controls.Add(this.runsTabPage);
-      this.tabControl.Location = new System.Drawing.Point(0, 162);
-      this.tabControl.Name = "tabControl";
-      this.tabControl.SelectedIndex = 0;
-      this.tabControl.Size = new System.Drawing.Size(710, 308);
-      this.tabControl.TabIndex = 9;
-      // 
-      // problemParametersTabPage
-      // 
-      this.problemParametersTabPage.Controls.Add(this.problemParametersViewHost);
-      this.problemParametersTabPage.Location = new System.Drawing.Point(4, 22);
-      this.problemParametersTabPage.Name = "problemParametersTabPage";
-      this.problemParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.problemParametersTabPage.Size = new System.Drawing.Size(702, 282);
-      this.problemParametersTabPage.TabIndex = 0;
-      this.problemParametersTabPage.Text = "Problem Parameters";
-      this.problemParametersTabPage.UseVisualStyleBackColor = true;
-      // 
-      // algorithmParametersTabPage
-      // 
-      this.algorithmParametersTabPage.Controls.Add(this.algorithmParametersViewHost);
-      this.algorithmParametersTabPage.Location = new System.Drawing.Point(4, 22);
-      this.algorithmParametersTabPage.Name = "algorithmParametersTabPage";
-      this.algorithmParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.algorithmParametersTabPage.Size = new System.Drawing.Size(702, 282);
-      this.algorithmParametersTabPage.TabIndex = 1;
-      this.algorithmParametersTabPage.Text = "Algorithm Parameters";
-      this.algorithmParametersTabPage.UseVisualStyleBackColor = true;
-      // 
-      // resultsTabPage
-      // 
-      this.resultsTabPage.Controls.Add(this.resultsViewHost);
-      this.resultsTabPage.Location = new System.Drawing.Point(4, 22);
-      this.resultsTabPage.Name = "resultsTabPage";
-      this.resultsTabPage.Size = new System.Drawing.Size(702, 282);
-      this.resultsTabPage.TabIndex = 2;
-      this.resultsTabPage.Text = "Results";
-      this.resultsTabPage.UseVisualStyleBackColor = true;
-      // 
-      // runsTabPage
-      // 
-      this.runsTabPage.Controls.Add(this.runsViewHost);
-      this.runsTabPage.Location = new System.Drawing.Point(4, 22);
-      this.runsTabPage.Name = "runsTabPage";
-      this.runsTabPage.Size = new System.Drawing.Size(702, 282);
-      this.runsTabPage.TabIndex = 3;
-      this.runsTabPage.Text = "Runs";
-      this.runsTabPage.UseVisualStyleBackColor = true;
-      // 
-      // problemParametersViewHost
-      // 
-      this.problemParametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.problemParametersViewHost.Caption = "View";
-      this.problemParametersViewHost.Content = null;
-      this.problemParametersViewHost.Location = new System.Drawing.Point(6, 6);
-      this.problemParametersViewHost.Name = "problemParametersViewHost";
-      this.problemParametersViewHost.ReadOnly = false;
-      this.problemParametersViewHost.Size = new System.Drawing.Size(690, 270);
-      this.problemParametersViewHost.TabIndex = 0;
-      this.problemParametersViewHost.ViewType = null;
-      // 
-      // algorithmParametersViewHost
-      // 
-      this.algorithmParametersViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.algorithmParametersViewHost.Caption = "View";
-      this.algorithmParametersViewHost.Content = null;
-      this.algorithmParametersViewHost.Location = new System.Drawing.Point(6, 6);
-      this.algorithmParametersViewHost.Name = "algorithmParametersViewHost";
-      this.algorithmParametersViewHost.ReadOnly = false;
-      this.algorithmParametersViewHost.Size = new System.Drawing.Size(690, 270);
-      this.algorithmParametersViewHost.TabIndex = 1;
-      this.algorithmParametersViewHost.ViewType = null;
-      // 
-      // resultsViewHost
-      // 
-      this.resultsViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.resultsViewHost.Caption = "View";
-      this.resultsViewHost.Content = null;
-      this.resultsViewHost.Location = new System.Drawing.Point(6, 6);
-      this.resultsViewHost.Name = "resultsViewHost";
-      this.resultsViewHost.ReadOnly = false;
-      this.resultsViewHost.Size = new System.Drawing.Size(690, 270);
-      this.resultsViewHost.TabIndex = 1;
-      this.resultsViewHost.ViewType = null;
-      // 
-      // runsViewHost
-      // 
-      this.runsViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.runsViewHost.Caption = "View";
-      this.runsViewHost.Content = null;
-      this.runsViewHost.Location = new System.Drawing.Point(6, 6);
-      this.runsViewHost.Name = "runsViewHost";
-      this.runsViewHost.ReadOnly = false;
-      this.runsViewHost.Size = new System.Drawing.Size(690, 270);
-      this.runsViewHost.TabIndex = 1;
-      this.runsViewHost.ViewType = null;
-      // 
-      // OKBExperimentView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.algorithmComboBox);
-      this.Controls.Add(this.problemComboBox);
-      this.Controls.Add(this.algorithmLabel);
-      this.Controls.Add(this.problemLabel);
-      this.Controls.Add(this.tabControl);
-      this.Controls.Add(this.refreshButton);
-      this.Controls.Add(this.prepareButton);
-      this.Controls.Add(this.startButton);
-      this.Controls.Add(this.executionTimeTextBox);
-      this.Controls.Add(this.pauseButton);
-      this.Controls.Add(this.stopButton);
-      this.Controls.Add(this.executionTimeLabel);
-      this.Name = "OKBExperimentView";
-      this.Size = new System.Drawing.Size(710, 499);
-      this.Controls.SetChildIndex(this.executionTimeLabel, 0);
-      this.Controls.SetChildIndex(this.stopButton, 0);
-      this.Controls.SetChildIndex(this.pauseButton, 0);
-      this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
-      this.Controls.SetChildIndex(this.startButton, 0);
-      this.Controls.SetChildIndex(this.prepareButton, 0);
-      this.Controls.SetChildIndex(this.refreshButton, 0);
-      this.Controls.SetChildIndex(this.tabControl, 0);
-      this.Controls.SetChildIndex(this.problemLabel, 0);
-      this.Controls.SetChildIndex(this.algorithmLabel, 0);
-      this.Controls.SetChildIndex(this.problemComboBox, 0);
-      this.Controls.SetChildIndex(this.algorithmComboBox, 0);
-      this.Controls.SetChildIndex(this.nameLabel, 0);
-      this.Controls.SetChildIndex(this.descriptionLabel, 0);
-      this.Controls.SetChildIndex(this.nameTextBox, 0);
-      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
-      this.tabControl.ResumeLayout(false);
-      this.problemParametersTabPage.ResumeLayout(false);
-      this.algorithmParametersTabPage.ResumeLayout(false);
-      this.resultsTabPage.ResumeLayout(false);
-      this.runsTabPage.ResumeLayout(false);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Label algorithmLabel;
-    private System.Windows.Forms.Label problemLabel;
-    private System.Windows.Forms.ComboBox algorithmComboBox;
-    private System.Windows.Forms.ComboBox problemComboBox;
-    private System.Windows.Forms.Button refreshButton;
-    private System.Windows.Forms.Button startButton;
-    private System.Windows.Forms.Button pauseButton;
-    private System.Windows.Forms.Button stopButton;
-    private System.Windows.Forms.Button prepareButton;
-    private System.Windows.Forms.Label executionTimeLabel;
-    private System.Windows.Forms.TextBox executionTimeTextBox;
-    private System.Windows.Forms.TabControl tabControl;
-    private System.Windows.Forms.TabPage problemParametersTabPage;
-    private System.Windows.Forms.TabPage algorithmParametersTabPage;
-    private MainForm.WindowsForms.ViewHost problemParametersViewHost;
-    private MainForm.WindowsForms.ViewHost algorithmParametersViewHost;
-    private System.Windows.Forms.TabPage resultsTabPage;
-    private MainForm.WindowsForms.ViewHost resultsViewHost;
-    private System.Windows.Forms.TabPage runsTabPage;
-    private MainForm.WindowsForms.ViewHost runsViewHost;
-
-
-
-
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBExperimentView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBExperimentView.cs	(revision 5638)
+++ 	(revision )
@@ -1,257 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Clients.OKB {
-  [View("OKBItem View")]
-  [Content(typeof(OKBExperiment), true)]
-  public sealed partial class OKBExperimentView : NamedItemView {
-    public new OKBExperiment Content {
-      get { return (OKBExperiment)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public OKBExperimentView() {
-      InitializeComponent();
-    }
-
-    protected override void OnInitialized(System.EventArgs e) {
-      base.OnInitialized(e);
-      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
-      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
-      PopulateComboBoxes();
-    }
-
-    protected override void DeregisterContentEvents() {
-      Content.AlgorithmIdChanged -= new EventHandler(Content_AlgorithmIdChanged);
-      Content.ProblemIdChanged -= new EventHandler(Content_ProblemIdChanged);
-      Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
-      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
-      Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
-      Content.Prepared -= new EventHandler(Content_Prepared);
-      Content.Started -= new EventHandler(Content_Started);
-      Content.Paused -= new EventHandler(Content_Paused);
-      Content.Stopped -= new EventHandler(Content_Stopped);
-      base.DeregisterContentEvents();
-    }
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.AlgorithmIdChanged += new EventHandler(Content_AlgorithmIdChanged);
-      Content.ProblemIdChanged += new EventHandler(Content_ProblemIdChanged);
-      Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
-      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
-      Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
-      Content.Prepared += new EventHandler(Content_Prepared);
-      Content.Started += new EventHandler(Content_Started);
-      Content.Paused += new EventHandler(Content_Paused);
-      Content.Stopped += new EventHandler(Content_Stopped);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        algorithmComboBox.SelectedIndex = -1;
-        problemComboBox.SelectedIndex = -1;
-        problemParametersViewHost.Content = null;
-        algorithmParametersViewHost.Content = null;
-        resultsViewHost.Content = null;
-        runsViewHost.Content = null;
-        executionTimeTextBox.Text = "-";
-      } else {
-        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
-        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
-        problemParametersViewHost.Content = Content.ProblemParameters;
-        algorithmParametersViewHost.Content = Content.AlgorithmParameters;
-        resultsViewHost.Content = Content.Results;
-        runsViewHost.Content = Content.Runs;
-        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
-      }
-    }
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      algorithmComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (algorithmComboBox.Items.Count > 0);
-      problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0);
-      tabControl.Enabled = Content != null;
-      executionTimeTextBox.Enabled = Content != null;
-      SetEnabledStateOfExecutableButtons();
-    }
-
-    private void PopulateComboBoxes() {
-      algorithmComboBox.DataSource = null;
-      problemComboBox.DataSource = null;
-      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
-      if (platform != null) {
-        algorithmComboBox.DataSource = OKBClient.Instance.Algorithms.Where(x => x.PlatformId == platform.Id).ToList();
-        algorithmComboBox.DisplayMember = "Name";
-        problemComboBox.DataSource = OKBClient.Instance.Problems.Where(x => x.PlatformId == platform.Id).ToList();
-        problemComboBox.DisplayMember = "Name";
-      }
-    }
-
-    protected override void OnClosed(FormClosedEventArgs e) {
-      if ((Content != null) && (Content.ExecutionState == ExecutionState.Started)) Content.Stop();
-      OKBClient.Instance.Refreshing -= new EventHandler(OKBClient_Refreshing);
-      OKBClient.Instance.Refreshed -= new EventHandler(OKBClient_Refreshed);
-      base.OnClosed(e);
-    }
-
-    private void OKBClient_Refreshing(object sender, EventArgs e) {
-      if (InvokeRequired) {
-        Invoke(new EventHandler(OKBClient_Refreshing), sender, e);
-      } else {
-        Cursor = Cursors.AppStarting;
-        algorithmComboBox.Enabled = problemComboBox.Enabled = tabControl.Enabled = prepareButton.Enabled = startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = executionTimeTextBox.Enabled = false;
-      }
-    }
-    private void OKBClient_Refreshed(object sender, EventArgs e) {
-      if (InvokeRequired) {
-        Invoke(new EventHandler(OKBClient_Refreshed), sender, e);
-      } else {
-        PopulateComboBoxes();
-        SetEnabledStateOfControls();
-        Cursor = Cursors.Default;
-      }
-    }
-
-    #region Content Events
-    private void Content_AlgorithmIdChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_AlgorithmIdChanged), sender, e);
-      else {
-        algorithmComboBox.SelectedItem = OKBClient.Instance.Algorithms.FirstOrDefault(x => x.Id == Content.AlgorithmId);
-        algorithmParametersViewHost.Content = Content.AlgorithmParameters;
-        resultsViewHost.Content = Content.Results;
-        runsViewHost.Content = Content.Runs;
-        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    private void Content_ProblemIdChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ProblemIdChanged), sender, e);
-      else {
-        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
-        problemParametersViewHost.Content = Content.ProblemParameters;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    private void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred), sender, e);
-      else
-        ErrorHandling.ShowErrorDialog(this, e.Value);
-    }
-    private void Content_ExecutionStateChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
-      else
-        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = prepareButton.Enabled = false;
-    }
-    private void Content_ExecutionTimeChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
-      else
-        executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString();
-    }
-    private void Content_Prepared(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Prepared), sender, e);
-      else {
-        resultsViewHost.Content = Content.Results;
-        ReadOnly = Locked = false;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    private void Content_Started(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Started), sender, e);
-      else {
-        ReadOnly = Locked = true;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    private void Content_Paused(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Paused), sender, e);
-      else {
-        ReadOnly = Locked = false;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    private void Content_Stopped(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Stopped), sender, e);
-      else {
-        ReadOnly = Locked = false;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    #endregion
-
-    #region Control Events
-    private void refreshButton_Click(object sender, System.EventArgs e) {
-      OKBClient.Instance.Refresh();
-    }
-    private void algorithmComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
-      Algorithm algorithm = algorithmComboBox.SelectedValue as Algorithm;
-      if (Content != null) Content.Load(algorithm);
-    }
-    private void problemComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
-      Problem problem = problemComboBox.SelectedValue as Problem;
-      if (Content != null) Content.Load(problem);
-    }
-    private void prepareButton_Click(object sender, EventArgs e) {
-      Content.Prepare(false);
-    }
-    private void startButton_Click(object sender, EventArgs e) {
-      Content.Start();
-    }
-    private void pauseButton_Click(object sender, EventArgs e) {
-      Content.Pause();
-    }
-    private void stopButton_Click(object sender, EventArgs e) {
-      Content.Stop();
-    }
-    #endregion
-
-    #region Helpers
-    private void SetEnabledStateOfExecutableButtons() {
-      if ((Content == null) || (Content.AlgorithmId == 0) || (Content.ProblemId == 0)) {
-        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = prepareButton.Enabled = false;
-      } else {
-        startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
-        pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;
-        stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
-        prepareButton.Enabled = Content.ExecutionState != ExecutionState.Started;
-      }
-    }
-    #endregion
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBProblemView.Designer.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBProblemView.Designer.cs	(revision 5638)
+++ 	(revision )
@@ -1,130 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-namespace HeuristicLab.Clients.OKB {
-  partial class OKBProblemView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.problemLabel = new System.Windows.Forms.Label();
-      this.problemComboBox = new System.Windows.Forms.ComboBox();
-      this.refreshButton = new System.Windows.Forms.Button();
-      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
-      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.SuspendLayout();
-      // 
-      // problemLabel
-      // 
-      this.problemLabel.AutoSize = true;
-      this.problemLabel.Location = new System.Drawing.Point(3, 5);
-      this.problemLabel.Name = "problemLabel";
-      this.problemLabel.Size = new System.Drawing.Size(48, 13);
-      this.problemLabel.TabIndex = 0;
-      this.problemLabel.Text = "&Problem:";
-      // 
-      // problemComboBox
-      // 
-      this.problemComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.problemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.problemComboBox.FormattingEnabled = true;
-      this.problemComboBox.Location = new System.Drawing.Point(57, 1);
-      this.problemComboBox.Name = "problemComboBox";
-      this.problemComboBox.Size = new System.Drawing.Size(551, 21);
-      this.problemComboBox.TabIndex = 1;
-      this.problemComboBox.SelectedValueChanged += new System.EventHandler(this.problemComboBox_SelectedValueChanged);
-      // 
-      // refreshButton
-      // 
-      this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.refreshButton.Location = new System.Drawing.Point(614, 0);
-      this.refreshButton.Name = "refreshButton";
-      this.refreshButton.Size = new System.Drawing.Size(24, 24);
-      this.refreshButton.TabIndex = 2;
-      this.toolTip.SetToolTip(this.refreshButton, "Refresh Problems");
-      this.refreshButton.UseVisualStyleBackColor = true;
-      this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
-      // 
-      // viewHost
-      // 
-      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.viewHost.Caption = "View";
-      this.viewHost.Content = null;
-      this.viewHost.Enabled = false;
-      this.viewHost.Location = new System.Drawing.Point(0, 30);
-      this.viewHost.Name = "viewHost";
-      this.viewHost.ReadOnly = false;
-      this.viewHost.Size = new System.Drawing.Size(638, 422);
-      this.viewHost.TabIndex = 3;
-      this.viewHost.ViewsLabelVisible = true;
-      this.viewHost.ViewType = null;
-      // 
-      // OKBProblemView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.viewHost);
-      this.Controls.Add(this.problemComboBox);
-      this.Controls.Add(this.problemLabel);
-      this.Controls.Add(this.refreshButton);
-      this.Name = "OKBProblemView";
-      this.Size = new System.Drawing.Size(638, 452);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Label problemLabel;
-    private System.Windows.Forms.ComboBox problemComboBox;
-    private System.Windows.Forms.Button refreshButton;
-    private System.Windows.Forms.ToolTip toolTip;
-    private MainForm.WindowsForms.ViewHost viewHost;
-
-
-
-
-  }
-}
Index: anches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBProblemView.cs
===================================================================
--- /branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Views/OKBProblemView.cs	(revision 5638)
+++ 	(revision )
@@ -1,132 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Clients.OKB {
-  [View("OKBProblem View")]
-  [Content(typeof(OKBProblem), true)]
-  public sealed partial class OKBProblemView : ItemView {
-    public new OKBProblem Content {
-      get { return (OKBProblem)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public OKBProblemView() {
-      InitializeComponent();
-    }
-
-    protected override void OnInitialized(System.EventArgs e) {
-      base.OnInitialized(e);
-      OKBClient.Instance.Refreshing += new EventHandler(OKBClient_Refreshing);
-      OKBClient.Instance.Refreshed += new EventHandler(OKBClient_Refreshed);
-      PopulateComboBox();
-    }
-
-    protected override void DeregisterContentEvents() {
-      Content.ProblemChanged -= new EventHandler(Content_ProblemChanged);
-      base.DeregisterContentEvents();
-    }
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.ProblemChanged += new EventHandler(Content_ProblemChanged);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        problemComboBox.SelectedIndex = -1;
-        viewHost.Content = null;
-      } else {
-        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
-        viewHost.Content = Content.Problem;
-      }
-    }
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0);
-      refreshButton.Enabled = (Content != null) && !ReadOnly && !Locked;
-    }
-
-    private void PopulateComboBox() {
-      problemComboBox.DataSource = null;
-      Platform platform = OKBClient.Instance.Platforms.FirstOrDefault(x => x.Name == "HeuristicLab 3.3");
-      if (platform != null) {
-        problemComboBox.DataSource = OKBClient.Instance.Problems.Where(x => x.PlatformId == platform.Id).ToList();
-        problemComboBox.DisplayMember = "Name";
-      }
-    }
-
-    protected override void OnClosed(FormClosedEventArgs e) {
-      OKBClient.Instance.Refreshing -= new EventHandler(OKBClient_Refreshing);
-      OKBClient.Instance.Refreshed -= new EventHandler(OKBClient_Refreshed);
-      base.OnClosed(e);
-    }
-
-    private void OKBClient_Refreshing(object sender, EventArgs e) {
-      if (InvokeRequired) {
-        Invoke(new EventHandler(OKBClient_Refreshing), sender, e);
-      } else {
-        Cursor = Cursors.AppStarting;
-        problemComboBox.Enabled = refreshButton.Enabled = viewHost.Enabled = false;
-      }
-    }
-    private void OKBClient_Refreshed(object sender, EventArgs e) {
-      if (InvokeRequired) {
-        Invoke(new EventHandler(OKBClient_Refreshed), sender, e);
-      } else {
-        PopulateComboBox();
-        SetEnabledStateOfControls();
-        Cursor = Cursors.Default;
-      }
-    }
-
-    #region Content Events
-    private void Content_ProblemChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ProblemChanged), sender, e);
-      else {
-        problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
-        viewHost.Content = Content.Problem;
-      }
-    }
-    #endregion
-
-    #region Control Events
-    private void refreshButton_Click(object sender, System.EventArgs e) {
-      OKBClient.Instance.Refresh();
-    }
-    private void problemComboBox_SelectedValueChanged(object sender, System.EventArgs e) {
-      Problem problem = problemComboBox.SelectedValue as Problem;
-      if ((problem != null) && (Content != null)) {
-        Content.Load(problem.Id);
-        if (Content.ProblemId != problem.Id)  // reset selected item if load was not successful
-          problemComboBox.SelectedItem = OKBClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId);
-      }
-    }
-    #endregion
-  }
-}
